Top

Excess Flood/Akilled match ban


TCL Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Mar 06, 2009
Last Updated  Oct 31, 2009
Tags  akill  excess  flood  killed 

Introduction

DALNet - Basic tcl someone asked me for.
This simply bans users who are killed/akilled and quit from an Excess Flood.

Grab the Code

bind sign - * quit:check
proc quit:check {nick uhost hand chan reason} {
  global botnick
  if {([isop $botnick $chan]) && (![validuser $hand]) && (![isop $nick $chan]) && (![isvoice $nick $chan])} {
    if {([string match -nocase "*excess*" $reason]) && ([string match -nocase "*flood*" $reason]) || ([string match -nocase "*killed*" $reason]) && (![string match -nocase "*ghost*" $reason]) && (![string match -nocase "*collision*" $reason])} {
      set mask *!*@[lindex [split [getchanhost $nick $chan] @] 1]
      putquick "MODE $chan +b $mask"
    }
  }
}

Comments

  (2)  RSS
PunkTuReD
Comments: 461
 
TCL Snippet:  Excess Flood/Akilled match ban
Posted on Mar 6, 2009 11:47 pm
i have no idea about TCL, but its gd to see some popping up here.
gd work Get_A_Fix
Get_A_Fix
Comments: 18
 
TCL Snippet:  Excess Flood/Akilled match ban
Posted on Mar 8, 2009 9:20 pm
Well, the above script works, does what I was asked for, but now more people seem to be asking for a modification, or two.

1) added a list so people can add more than the already set matches.
2) added userdefined setting, so script doesn't work global, can be channel specific.

Enable
------
PUB: .quitcheck on
MSG: /msg botnick quitcheck #channel on

Disable
-------
PUB: .quitcheck off
MSG: /msg botnick quitcheck #channel off


Code:

setudef flag quitcheck

set quitwords {
  "*excess flood*"
  "*k-line*"
  "*killed*"
  "*join #*"
  "*/server*"
}

bind pub - .quitcheck chanset:quitcheck
proc chanset:quitcheck {nick uhost hand chan text} {
  global botnick
  if {[matchattr $hand o|m $chan]} {

    if {[lindex $text 0] == "on"} {
      channel set $chan +quitcheck
      puthelp "PRIVMSG $chan :Enabled QuitCheck Protection for $chan"
    }

    if {[lindex $text 0] == "off"} {
      channel set $chan -quitcheck
      puthelp "PRIVMSG $chan :Disabled QuitCheck Protection for $chan"
    }
  }
}

bind msg - quitcheck quitcheck:msg
proc quitcheck:msg {nick uhost hand arg} {
  set chan [strlwr [lindex $arg 0]]
  if {[matchattr $hand o|m $chan]} {

    if {[lindex $arg 1] == "on"} {
      channel set $chan +quitcheck
      putquick "NOTICE $nick :Enabled QuitCheck Protection for $chan"
    }

    if {[lindex $arg 1] == "off"} {
      channel set $chan -quitcheck
      putquick "NOTICE $nick :Disabled QuitCheck Protection for $chan"
    }
  }
}

bind sign - * quit:check
proc quit:check {nick uhost hand chan reason} {
  global botnick quitwords
  if {[lsearch -exact [channel info $chan] +quitcheck] != -1} {
    foreach quitmatch $quitwords {
      if {([isop $botnick $chan]) && (![validuser $hand]) && (![isop $nick $chan]) && (![isvoice $nick $chan])} {
        if {([string match -nocase $quitmatch $reason]) && (![string match -nocase "*ghost*" $reason]) && (![string match -nocase "*collision*" $reason])} {
          set mask *!*@[lindex [split [getchanhost $nick $chan] @] 1]
          putquick "MODE $chan +b $mask"
        }
      }
    }
  }
}


Enjoy.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom