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.

ban

Old posts that have not been replied to for several years.
Locked
z
zlobus
Voice
Posts: 16
Joined: Sun Sep 12, 2004 12:07 pm

ban

Post by zlobus »

i want script to ban user which said *http://www.netwars.ru/go.php?login=*
But i want to be able to change the forbidden word, bantime, banmask and reason.
help.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

what to do:

- create a variable list with words using set
- then use bind pubm
- match each word using foreach with string match or regexp against your list, import this list into your proc using global

or read this
XplaiN but think of me as stupid
z
zlobus
Voice
Posts: 16
Joined: Sun Sep 12, 2004 12:07 pm

Post by zlobus »

i don't think that without any examples i can do it. even with your help. I don't want leatn tcl i just want to create one small script.... maybe something like this is already created... then show me plz.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

old and not most efficient code i am sur but should work .. or at least it will put you in the right direction

http://ftp.ofloo.net/pub/scripts/contrib/badword.tcl.gz
XplaiN but think of me as stupid
User avatar
Kurupt
Voice
Posts: 26
Joined: Sun Aug 22, 2004 7:57 pm
Location: Hermanstat

Post by Kurupt »

Code: Select all

bind pubm - "*http://www.netwars.ru/go.php?login=*" ban:word
proc ban:word {nick uhost hand chan text} {
global botnick
set reason "You use a forbiden word"
set time "60" # in minutes
set banmask *!*@[lindex [split $uhost @] 1] # will be *!*@ip
newchanban $chan $banmask $botnick $reason $time
Locked