This is my script. It works fine but if the nick of user to kick or ban contains bad chars don't works! i.e. if the nick to kick contains the char 0, tcl don't works!### ChanServ's list synchronizer v1.2 for eggdrop
### Written by Progeny <progeny@azzurra.org>
###
### Now your eggdrop may be sinchronized to the channel's op list.
### You don't add manually any op to your eggdrop!
### Thanks to C|ty_Hunter, Neiken for the helpful test
set csrehash 15
set tmpchans ""
set dyntmpchan ""
set tmpnick ""
set gnick ""
set gchan ""
set gcmd ""
set csmask "ChanServ!service@azzurra.org"
set liststrig "*list di*"
set xoplist "*) * (*) by *"
set stopcode "Fine della Lista"
bind pub - !op giveop
bind pub - !deop takeop
bind pub - !ban buser
bind pub - !kick kickuser
bind pub n !csrehash rehashlists
bind raw - "NOTICE" addoptolist
bind raw - 307 setid
set flood-msg 0
proc checkid {nick} {
putserv "whois $nick"
}
proc setid {from keyword text} {
global gnick gchan gcmd
checkop $gnick $gchan $gcmd
}
proc checkop {nick channel comando} {
global tmpchans greason
foreach tmpchan $tmpchans {
set dynnick [lindex [split $tmpchan ":"] 0]
set dynchan [lindex [split $tmpchan ":"] 1]
if {([string tolower $nick] == [string tolower $dynnick]) && ([string tolower $channel] == [string tolower $dynchan])} {
if {[string tolower $comando] == "op"} { putserv "mode $channel +o $nick" }
if {[string tolower $comando] == "deop"} { putserv "mode $channel -o $nick" }
if {[string tolower $comando] == "kick"} { putserv "kick $channel $nick :$greason" }
if {[string tolower $comando] == "ban"} { putserv "mode $channel +b [getchanhost $nick]"
putserv "kick $channel $nick :$greason"
}
}
}
}
proc giveop {nick uhost handle channel text} {
global gcmd gchan gnick
set gnick $nick
set gchan $channel
set gcmd "op"
checkid $nick
}
proc takeop {nick uhost handle channel text} {
global gcmd gchan gnick
set gnick $nick
set gchan $channel
set gcmd "deop"
checkid $nick
}
proc buser {nick uhost handle channel text} {
global gcmd gchan gnick greason
set gnick [lindex $text 0]
set gchan $channel
set gcmd "ban"
set greason [lrange $text 1 end]
checkid $nick
}
proc kickuser {nick uhost handle channel text} {
global gcmd gchan gnick greason
set gnick [lindex $text 0]
set gchan $channel
set gcmd "kick"
set greason [lrange $text 1 end]
checkid $nick
}
proc rehashlists {nick uhost handle channel text} {
sendrehash
}
proc sendrehash {} {
global tmpchans csrehash
set tmpchans ""
foreach chan [channels] {
puthelp "PRIVMSG ChanServ :aop $chan list"
puthelp "PRIVMSG ChanServ :sop $chan list"
puthelp "PRIVMSG ChanServ :cf $chan list"
}
dccbroadcast "CS Synch: Updating CS lists."
timer $csrehash sendrehash
}
proc addoptolist {from keyword text} {
global csmask liststrig xoplist tmpchans dyntmpchan tmpnick stopcode
if {[string tolower $from] == [string tolower $csmask]} {
if {[string match [string tolower $liststrig] [string tolower $text]]} {
set dyntmpchan [lindex $text 4]
regsub -all "\002" $dyntmpchan "" dyntmpchan
}
}
if {[string match [string tolower $xoplist] [string tolower $text]]} {
set tmpnick [lindex $text 3]
regsub -all "\002" $tmpnick "" tmpnick
lappend tmpchans "$tmpnick:$dyntmpchan"
}
}
timer $csrehash sendrehash
putlog "ChanServ's list synchronizer"
Anyone has suggestions?