Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Beckyanne
Newbie


Joined: 11 Jun 2011
Posts: 4

PostPosted: Sat Jun 11, 2011 3:36 pm   

Selective/temporary gagging or using #GAG only for a specific output
 
I read through a lot of the documentation on #GAG, and even #TEMP, but after playing around with them I couldn't get them to do what I wanted. I also went searching through the forums to no avail, so I'm hoping someone will be able to help with this one.

Up to half of the players logged on at any time are idle for hours/days, and are clearly not currently available to play. I was looking for a way to strip them out of the who output so I could get an idea of who is really around. Below is a sampling of a typical who list.

Code:
Player Name          On For   Idle  random changing text
Player1               00:47    52s 
Player2               01:15     0s 
Player3               01:29     1h  random changing text
Player4               01:37     5m 
Player5               02:15     2h 
Player6               06:50    11m 
Player7               08:07     8h 
Player8               2d 16:01     1d
There are 8 players connected.


I was successful in gagging players idle for hours or days using:

#TRIGGER {Player Name} {#GAG %dh;#GAG %dd}

The trouble I have now is finding a way so that gag only triggers when using "who" and not all the time. While it's very unlikely bits like 4d or 6h will come up in day to day play outside of being listed in the who list, I'm paranoid about inadvertently gagging important things. I thought that matching the pattern to {Player Name} would have done it, but the gagging is global. I then tried using #UNGAG with {There are %d players connected.} to stop gagging at the end of the who output, but that wasn't working either.

So, in short, how would I set up a #GAG that is specific only for the output of one command, and not globally throughout the game?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Sat Jun 11, 2011 10:09 pm   
 
The way you are using #GAG is wrong

#GAG %dd

is the same as

#TR {%dd} {#GAG}

which will gag any line containing a number followed by a d, clearly not what you want

You need to be more specific in your pattern and then just use #GAG by itself.
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Sat Jun 11, 2011 10:14 pm   
 
try:

#TR {^%w %s * %d:%d %s %d{d|h}} {#GAG}
_________________
Discord: Shalimarwildcat
Reply with quote
mikeC130
Apprentice


Joined: 03 Jul 2006
Posts: 108

PostPosted: Sun Jun 12, 2011 3:56 am   
 
In addition to making your trigger more specific to the lines you see, you could also use an alias for which would activate a class with your GAG trigger and then send the WHO command to the MUD.

In the class with your GAG trigger include another trigger which will activate on the last line returned from the MUD (There are %d players connected.) which will then deactivate the class until the next time you activate via the alias.

Mike
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net