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 ➜ Tips and tricks ➜ How to gag annoying players

How to gag annoying players

Posting of new messages is disabled at present.

Refresh page


Pages: 1 2  3  

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Mon 05 Feb 2001 06:42 PM (UTC)

Amended on Wed 20 Jun 2001 02:28 AM (UTC) by Nick Gammon

Message
I get asked frequently how to "gag" players using MUSHclient.

You can do this easily using a trigger. Just match on what is needed to identify the annoying player, and check "omit from output". This will stop the matching line from appearing in your output window.

There are a few ways of matching on the name of the player(s) in question. A simple one is to simply specify the player name, like this:


Match on: Zayldan
Omit from output: checked
Regular expression: checked


This would match "Zayldan" anywhere in the line. The only disadvantage to this is that it would match on messages about Zayldan as well as from him.

A better way might be:


Match on: ^Zayldan (says|pages)
Omit from output: checked
Regular expression: checked


This would match on any line starting with Zayldan (that is what the "^" means), followed by "says" or "pages".

Gagging multiple players

To gag multiple players, you can use the "or" symbol in a regular expression. For example, to gag Zayldan, Vudric and Haoen, you could make this trigger:


Match on: ^(Zayldan|Vudric|Haoen) (says|pages)
Omit from output: checked
Regular expression: checked


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LRRodriguez   (1 post)  Bio
Date Reply #1 on Wed 20 Jun 2001 01:37 AM (UTC)
Message
I like your method better than mine (currently I call /gag playername and it adds a trigger for them). What I'd like to know is if I can load trigger off a list stored in a variable somewhere?
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #2 on Wed 20 Jun 2001 02:25 AM (UTC)
Message
This is a pretty common request, so I've done a script for it (in VBscript). The Jscript one would look similar. :)

What it does is store a list of gagged players in a variable "gaglist", and when you add another it appends them to the end of it. The script then adds a trigger (replacing an existing one if necessary) to do the appropriate gagging.

To use this, add the script below to your script file, and then make an alias:

Alias: GAG *
Send: (nothing)
Label: gag
Script: OnGag





' --------------------------------------------
' Alias to gag players automatically
'
'  Call from the alias: GAG *
'
'   eg. GAG twerp
'
'  It maintains a list of gagged players in the
'   variable "gaglist" (which you can edit in the
'   world configuration screen if you need)
'
'  You may need to change the text of the trigger
'  match slightly. (eg. add "tells")
'
' --------------------------------------------

sub OnGag (thename, theoutput, thewildcards)
dim sName
dim sList
dim flags

sName = Trim (thewildcards (1))

' do nothing if no name
if sName = "" then exit sub

' get existing list
sList = world.GetVariable ("gaglist")

' if empty create new one, otherwise add to end
if IsEmpty (sList) then
  sList = sName
else
  slist = sList + "|" + sName
end if

' remember gag list for next time
world.SetVariable "gaglist", sList

' addtrigger flags
'    1 = enabled
'    2 = omit from log file
'    4 = omit from output
'   16 = ignore case
'   32 = regular expression
' 1024 = replace existing trigger of same name

flags = 1 + 2 + 4 + 16 + 32 + 1024

World.addtrigger "gag", "^(" + sList + ") (says|pages)", _
                 "", flags, -1, 0, "", ""

End Sub

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Rinor   (16 posts)  Bio
Date Reply #3 on Tue 26 Jun 2001 09:03 PM (UTC)
Message
Umm I also have a question...
I play the mud Medievia in which we do trade runs as a way of making money. During trs you haul goods from one trade post to another over a long distance. Usually over long trs we use mounts to travel faster, ie: warhorse, morgans and so on.

Problem is that the mounts have annoying messages like:
A warhorse pants or A morgan collapses...
whenever we move too fast. So is there a way to gag this? At the moment I have to add a trigger for each line in order to gag them. I tried to use ^A morgan but that doesn't seem to work...
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #4 on Wed 27 Jun 2001 08:31 AM (UTC)
Message
A trigger like this should work:


A warhorse *


This is *not* a regular expression. To do the same thing using a regular expression you would use:


^A warhorse .*$






- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Syros   USA  (26 posts)  Bio
Date Reply #5 on Mon 08 Sep 2003 02:54 AM (UTC)
Message
Is there a way to gag everything or only up to a certain line? I mean it gags like 4 or 5 lines of text and everything else past that slips through.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #6 on Tue 09 Sep 2003 10:40 PM (UTC)
Message
Probably the "everything else" is new lines - gagging gags the current line - in some cases a long line will wrap around so one logical line is 5 physical lines.

However the gagging gags the logical line, however long that is.

You could conceivably turn on another trigger (matching *) that would gag all lines, then you would need to detect when you needed to turn that trigger off, or you would not see anything else that session.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Christian Landry   Canada  (11 posts)  Bio
Date Reply #7 on Sun 21 Dec 2003 05:12 PM (UTC)
Message
Is there a way to set yourself NOSPOOF, and gag someone based on their DB number? I'd also be interested to know if there's a way to remove a DB number from the output when you set yourself NOSPOOF.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #8 on Sun 21 Dec 2003 09:16 PM (UTC)
Message
Gagging someone based on the DB number would be easy enough, you just need to modify the matching trigger appropriately. Paste an example line if you aren't sure.

As for dropping the DB numbers from the output that is a bit trickier. Triggers don't allow you to modify the text, however what you *can* do is omit the triggered text from output and then redisplay it, with parts missing. However the colour changes to the world note colour, not the original colour. This might not matter if most text is the same colour anyway, just make the note colour that colour.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Christian Landry   Canada  (11 posts)  Bio
Date Reply #9 on Mon 22 Dec 2003 11:25 PM (UTC)
Message
What do I have the trigger match, exactly, to omit the DB?For instance, I'd like this:

[Someone(#666)] Someone pages: Test.

To turn to this:

Someone pages: Test.

I know I could enter each individual DB as a separate trigger, but that'd be just too much work. How would I go about setting a global trigger for all DBs exactly?
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #10 on Tue 23 Dec 2003 04:29 AM (UTC)

Amended on Tue 23 Dec 2003 08:17 PM (UTC) by Nick Gammon

Message
I would have a trigger like this:

Trigger


<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   match="[*(#*)] * pages: *"
   omit_from_output="y"
   script="OnPage"
   sequence="100"
  >
  </trigger>
</triggers>



In your script file put a sub like this:

Script


sub OnPage (name, line, wildcards)

  select case wildcards (2)

'
'  list the ones you want to suppress here
'
    case "666"
    case "777"
    case "888"

'
'  others will get echoed to the screen
'
    case else

      world.colournote "white", "black", _
             wildcards (3) & " pages: " & _
             wildcards (4)

  end select

end sub

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Christian Landry   Canada  (11 posts)  Bio
Date Reply #11 on Tue 23 Dec 2003 05:03 PM (UTC)
Message
I feel stupid. I couldn't make heads or tails of any of the example.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #12 on Tue 23 Dec 2003 07:37 PM (UTC)

Amended on Tue 23 Dec 2003 08:16 PM (UTC) by Nick Gammon

Message
  1. Copy the subroutine from this web page between the second set of lines above (script). Use the MUSHclient notepad or any text editor, such as the Windows Notepad. Paste in the subroutine into a new document. Save it as my_scripts.vbs in your MUSHclient directory.

  2. Go into scripts configuration and check 'enable script', and browse for the script file you just created. Like this:

    The script window will not look exactly like this, I took this image from an earlier screen shot.

    The other things you can leave as the defaults (World Open, World Connect etc. can all be blank).

    The script prefix is normally a slash, and is used to call scripts directly from the command area.

  3. Copy from this web page between the first set of lines above (trigger). Go to the trigger configuration screen in MUSHclient - the one with the list of triggers. The 'Paste' button will become active. Click it. That will paste in the trigger.
Now you should be ready to use it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Norbert   USA  (61 posts)  Bio
Date Reply #13 on Sat 24 Jan 2004 01:53 PM (UTC)
Message
How can I get my configurations window to look like this with tabs instead of the scroll bar on the left hand side?

Norbert

-Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens
It's a dumb question... skip it.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #14 on Sat 24 Jan 2004 06:41 PM (UTC)
Message
Go back about 20 versions. :)

I borrowed that configuration example from an earlier version.

The later ones have the scroll bar and the config screens grouped together into categories.

I normally check "auto-expand config screens" in the global configuration so that the individual configuration items are always visible - that will probably help.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


103,459 views.

This is page 1, subject is 3 pages long: 1 2  3  [Next page]

Posting of new messages is disabled at present.

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.