Posted to tcl by Modo at Thu Nov 29 23:42:40 GMT 2007view raw

  1. i want remove ban from eggdrop internal banlist, and via X too.
  2.  
  3. bind pub n|o .ub pub:ub
  4.  
  5. proc pub:ub {nick uhost hand chan text} {
  6. global botnick drchan drreason opsc
  7. if {[botisop $drchan]} {
  8. if {[string length $text] > 0} {
  9. set tnick [lindex $text 0]
  10. if {[ischanban $tnick $drchan]} {
  11. killchanban $drchan $tnick
  12. putquick "privmsg X :unban $drchan $tnick"
  13. putserv "privmsg $opsc :$hand/$nick: I removed \002$tnick\002 from $drchan" }
  14. if {[isban $tnick]}
  15. killban $tnick
  16. } else { puthelp "NOTICE $nick : I can't see that ban in the channel list" }
  17. } else { puthelp "NOTICE $nick :SYNTAX: .ub <nick!user@host> - unbans an address" }
  18. } else { puthelp "NOTICE $nick :Pfff n-am op!" }
  19. }
  20.  
  21. but i get this error
  22.  
  23. <)Modo> [17:19] Tcl error in file 'eggdrop.conf':
  24. <)Modo> [17:19] wrong # args: should be "proc name args body"
  25. <)Modo> while executing
  26. <)Modo> "proc pub:ub {nick uhost hand chan text} {
  27. <)Modo> global botnick drchan drreason opsc
  28. <)Modo> if {[botisop $drchan]} {
  29. <)Modo> if {[string length $text] > 0} {
  30. <)Modo> s..."
  31. <)Modo> (file "/home/nor7on/Modo/current/unban.tcl" line 3)
  32. <)Modo> invoked from within
  33. <)Modo> "source $files"
  34. <)Modo> ("foreach" body line 3)
  35. <)Modo> invoked from within
  36. <)Modo> "foreach files $qload(filelist) {
  37. <)Modo> if {$files == ""} {return 0}
  38. <)Modo> source $files
  39. <)Modo> }"
  40. <)Modo> ("foreach" body line 3)
  41. <)Modo> i
  42. <)Modo> [17:19] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)