Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ WHO trigger...

WHO trigger...

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Farawaymandy   (1 post)  Bio
Date Mon 08 Aug 2005 10:02 AM (UTC)
Message
Ok.
I have absolutely no idea what I'm doing... basically, I want to write a trigger so that when I type 'who' to get a connected players list for my MUSH, it won't write the list to my logs.

My who list, for clarification, looks as follows:

Player Name On For Idle Doing
Sofika 01:42 0s
1 Player logged in, 22 record, no maximum.

Any help would be greatly appreciated!
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #1 on Mon 08 Aug 2005 11:39 AM (UTC)
Message
You can create a multiline trigger and set it to "omit from log file", but I haven't messed with multiline much and I can't help you more there.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Scotty   Australia  (13 posts)  Bio
Date Reply #2 on Tue 09 Aug 2005 11:31 AM (UTC)
Message
Can you post a sample of the output WHO gives you on your particular mu*?
Top

Posted by Scotty   Australia  (13 posts)  Bio
Date Reply #3 on Tue 09 Aug 2005 12:24 PM (UTC)
Message
Heh - that'll teach me to read forums when I'm half asleep.

I don't line multiline triggers over more than a couple of lines, so I go with this kind of approach:

To me the logical approach SEEMS to be that you would have a trigger which fires on the first line:

Player Name On For Idle Doing

get THAT trigger to enable another trigger which matches any line: ie *

and then have a 3rd trigger which matches

* Player logged in, * record, no maximum.

which disables the 2nd trigger. Have all set to omit from logfile and it's covered.

eg:

The first trigger:

<triggers>
<trigger
enabled="y"
match="^Player Name On For Idle Doing$"
omit_from_log="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.EnableTriggerGroup "whogag", 1</send>
</trigger>
</triggers>

The second trigger:

<triggers>
<trigger
enabled="y"
match="^(.*)$"
name="whogag"
omit_from_log="y"
regexp="y"
sequence="100"
>
</trigger>
</triggers>


The third trigger:
<triggers>
<trigger
enabled="y"
match="^(.*?) Players logged in\, (.*?) record\, no maximum\.$"
omit_from_log="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.EnableTriggerGroup "whogag", 0</send>
</trigger>
</triggers>


A quick test worked for me
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #4 on Tue 09 Aug 2005 08:50 PM (UTC)
Message
Yeah, that's the alternative, and I prefer it to multiline too.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


17,831 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.