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.

SpamKicker.tcl

Support & discussion of released scripts, and announcements of new releases.
Post Reply
A
AlIt0
Voice
Posts: 11
Joined: Wed Apr 14, 2010 8:09 am

SpamKicker.tcl

Post by AlIt0 »

Code: Select all

bind bot Z kb kbspam

proc kbspam {botnc kb inviter} {
  global kb_reason ban_time exflag dkick
  set nick [lindex $inviter 0]
  set bmask [lindex $inviter 1]
  set host "$nick![getchanhost $nick]"
  set dmask [maskhost $uhost]
  set nickhand [nick2hand $nick]
  if {[string match $ban $botname] == 0} {
   if {[string match "*html.chat" $uhost]} { set ban "*!*[lindex [split [maskhost $uhost] "!"] 1]"  } { set ban "*!*@[lindex [split $uhost "@"] 1]"} 
    return 0
  }
  putlog "makes invites <<|$botnc|>>-> $bmask" 
  putlog "Ban/Kicking $bmask from channels..."
  foreach chan [channels] {
   if {[onchan $nick $chan] == 1} {
      putquick "KICK $chan $nick :[censored] inviter"
      putserv "MODE $chan +b :$dmask"
      return 0
      }
#     newban $fmask chek3r $dkick 0
     newchanban $chan $nick chek3r "$nick is a stewpid inviter" $ban_time
  }
}
putlog "spam kicker running."
Tcl error [kbspam]: can't read "uhost": no such variable
Will you tell me what to replace "uhost"
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

I think $uhost equal to

Code: Select all

set host "$nick![getchanhost $nick]"
Try to change $uhost to $host or

Code: Select all

set host "$nick![getchanhost $nick]"
to

Code: Select all

set uhost "$nick![getchanhost $nick]"
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
A
AlIt0
Voice
Posts: 11
Joined: Wed Apr 14, 2010 8:09 am

Re

Post by AlIt0 »

Yup, changed as he wrote, but now I have this problem
[15:47] <(Linux> [15:45] Tcl error [kbspam]: can't read "ban": no such variable
Post Reply