
i found a code and i edit somethings. but it has some problems like this code should be remove ban of user in a timed period. i set ban for chan-ignore and its been working nicely but when time comes for remove it that mode is not working..i tried different type of timing sets for remove that mode when timer finished but nope..
and i wanna ask you something how can we set user-nick in msg part i tried like : hi $nick welcome etc.. but $nick shows botnick

need your help ..thank you..
Code: Select all
#########################################################################
set canales "#muy-chan"
set badidents {
"1020*"
"1030*"
"1040*"
"2050*"
"1042*"
"1031*"
}
########################################################
set tiempoban 15
set noflagban "fmo|omf"
set mensaje "my first msg"
set mensaje1 "this is my second one*"
set mensaje2 "i'm still talking"
##########################################################
bind join - * join:bbadident
proc join:bbadident {nick host hand chan} {
global botnick badidents canales noflagban tiempoban mensaje mensaje1 mensaje2
if {(([lsearch -exact [string tolower $canales] [string tolower $chan]] != -1) || ($canales== "*")) && ($nick != $botnick)} {
foreach bbadident [string tolower $badidents] {
set badidban "*!*$bbadident*@*"
set userident "[string trimleft [string tolower [lindex [split $host "@"] 0]] "~"]"
if {[string match *$bbadident* [string tolower $userident]]} {
if {([botisop $chan]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand $noflagban $chan]) && ([onchan $nick $chan])} {
putquick "MODE $chan +b ~q:$badidban"
putserv "NOTICE $nick :$mensaje"
putserv "NOTICE $nick :$mensaje1"
putserv "NOTICE $nick :$mensaje2"
timer $tiempoban "pushmode $chan -b ~q:$badidban"
return 0
}
}
}
}
}
putlog "-= Loaded: BadIdban.tcl By Chino_^ =-"
return