This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Advice on TCL that will ban with user defined /msg triggers

Old posts that have not been replied to for several years.
Locked
b
birdrop
Voice
Posts: 14
Joined: Wed Feb 05, 2003 12:56 am

Advice on TCL that will ban with user defined /msg triggers

Post by birdrop »

Im looking for a simple script that will ban on /msg text

Specificly /msg botname pass text

But the more configurable, the better.
Ive been looking all over the place with no luck.

Thanks
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

set banwords [list pass bla1 bla2 bla3]
bind msgm - * ban_on_privmsg
proc ban_on_privmsg {nick host hand arg} {
  global banwords 
  foreach x $banwords {
    if {[lsearch [split $arg] $x] != -1} {
      put the bancode in here
    }
  }
} 
Elen sila lúmenn' omentielvo
b
birdrop
Voice
Posts: 14
Joined: Wed Feb 05, 2003 12:56 am

Post by birdrop »

I appreciate that code, but Im real new and 1. Dont even know where to put it and 2, Not sure how to edit it.

Thanks alot tho. Ill try and figure it out

The part where "put the bancode in here" Is that the banmask?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

It's where you put the code to do get the hostmask and execute the ban.
take a look at these sites to learn what to put in there.
http://www.egghelp.org/enhance.htm#tclscripts
http://www.suninet.nl/tclguide/

also check out the tcl-commands.doc in the /doc dir of your eggdrop
Elen sila lúmenn' omentielvo
Locked