Posted to tcl by Modo at Thu Nov 29 23:42:40 GMT 2007view raw
- i want remove ban from eggdrop internal banlist, and via X too.
-
- bind pub n|o .ub pub:ub
-
- proc pub:ub {nick uhost hand chan text} {
- global botnick drchan drreason opsc
- if {[botisop $drchan]} {
- if {[string length $text] > 0} {
- set tnick [lindex $text 0]
- if {[ischanban $tnick $drchan]} {
- killchanban $drchan $tnick
- putquick "privmsg X :unban $drchan $tnick"
- putserv "privmsg $opsc :$hand/$nick: I removed \002$tnick\002 from $drchan" }
- if {[isban $tnick]}
- killban $tnick
- } else { puthelp "NOTICE $nick : I can't see that ban in the channel list" }
- } else { puthelp "NOTICE $nick :SYNTAX: .ub <nick!user@host> - unbans an address" }
- } else { puthelp "NOTICE $nick :Pfff n-am op!" }
- }
-
- but i get this error
-
- <)Modo> [17:19] Tcl error in file 'eggdrop.conf':
- <)Modo> [17:19] wrong # args: should be "proc name args body"
- <)Modo> while executing
- <)Modo> "proc pub:ub {nick uhost hand chan text} {
- <)Modo> global botnick drchan drreason opsc
- <)Modo> if {[botisop $drchan]} {
- <)Modo> if {[string length $text] > 0} {
- <)Modo> s..."
- <)Modo> (file "/home/nor7on/Modo/current/unban.tcl" line 3)
- <)Modo> invoked from within
- <)Modo> "source $files"
- <)Modo> ("foreach" body line 3)
- <)Modo> invoked from within
- <)Modo> "foreach files $qload(filelist) {
- <)Modo> if {$files == ""} {return 0}
- <)Modo> source $files
- <)Modo> }"
- <)Modo> ("foreach" body line 3)
- <)Modo> i
- <)Modo> [17:19] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)