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.

How to make a warn script to a 2x warn + time kickban

Old posts that have not been replied to for several years.
Locked
Q
Questor

How to make a warn script to a 2x warn + time kickban

Post by Questor »

I've been puzzled and have been trying to look to other scripts how to get this done... I've got a small badword script dat detects words propper but i've got no clue how i can make this script work so it first will give off 2 warning (also mentioning the nr of warnings) and than the 3rd time kick and ban someone from a channel. Can anyone help me....

set badword {
badword1
badword2
}
bind pubm - * checkword
proc checkword {nick uhost handle chan text} {
global badword
if (![matchattr $nick +o]) {
foreach n $badword {
if ([string match $n [string tolower $text]]) {
putlog "$nick said bad word in $chan - $n"
putkick $chan $nick "1st bad word,please don`t use it"
return 0
}
}
}
}
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

there are many ways to do this, one is to make 2 lists, putting the nick of the one who said the bad word first in the #1 list, then in the next and finally do the kick if he is already in both lists.
Another way to do it is to use the XTRA field of the user, of course this means that you have to add the user to your userlist, so if you have a busy channel this might be a bad solution ;)
Elen sila lúmenn' omentielvo
Q
Questor

Post by Questor »

Hi Papillon, i think adding someone to my userlist would be the best way, however i have no idea how to program it like that. I'm quite new to this material and am trying to create someting that warns twice with different messages and than kicks/bans. But i want the ban time to be variable.

Could you show how i have to do this?

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

Post by Papillon »

read the tcl-command.doc document in your eggdrop first, then make a little code... or try to :), then I'll give you a few pointers if you are stuck :)
Elen sila lúmenn' omentielvo
Locked