Code: Select all
namespace eval MassKick {
# self explanatory
set mass(limit) "3:10"
set memo(mass) "The AOP of %nick user on %chan channel has been deleted due to attempt to masskick."
set memo(bot) "The AOP of %nick user on %chan channel has been deleted cos he kicked me."
# don't count or do anything to people with local/global friend flag or whatever you wish
set mass(friends) "f|f"
# don't edit below this line
setudef flag massKick
setudef str massKicker
setudef str massCount
# binds
bind kick * * [namespace current]::kicked
bind part - * [namespace current]::remove
bind sign - * [namespace current]::remove
bind nick - * [namespace current]::nickCh
# AOP removal and memo
proc takeAction {chan nick pos} {
dropAOP $chan $nick "1"
doThis "2" $chan $nick $pos
}
# bot kicked
proc botKicked {chan nick} {
dropAOP $chan $nick "2"
resetChan $chan
}
# reset
proc resetChan {chan} {
channel set $chan massKicker {}
channel set $chan massCount {}
}
# remove AOP, deop and send memo
proc dropAOP {chan nick act} {
variable memo
switch -- $act {
"1" {
set message [string map -nocase [list "%chan" "$chan" "%nick" "$nick"] $memo(mass)]
}
"2" {
set message [string map -nocase [list "%chan" "$chan" "%nick" "$nick"] $memo(bot)]
}
}
putserv "Memoserv send $chan $message"
putserv "Chanserv aop $chan del $nick"
putserv "Chanserv deop $chan $nick"
}
# triggers:
# 1 - add, 2 - remove, 3 - replace nick, 4 - replace count
proc doThis {act chan nick {pos ""} {count ""} {newNick ""}} {
set massKicker [channel get $chan massKicker]
set massCount [channel get $chan massCount]
switch -- $act {
"1" {
lappend massKicker $nick
lappend massCount 1
}
"2" {
set massKicker [lreplace $massKicker $pos $pos]
set massCount [lreplace $massCount $pos $pos]
}
"3" {
set massKicker [lreplace $massKicker $pos $pos $newNick]
}
"4" {
set massCount [lreplace $massCount $pos $pos $count]
}
}
channel set $chan massKicker $massKicker
channel set $chan massCount $massCount
}
# triggers:
# 1 - part & sign, 2 - nick change
proc eventThis {event chan nick {newNick ""}} {
set massKicker [channel get $chan massKicker]
if {$nick ni $massKicker} return
set pos [lsearch $massKicker $nick]
switch -- $event {
"1" {
doThis "2" $chan $nick $pos
}
"2" {
doThis "3" $chan $nick $pos "0" $newNick
}
}
}
# part & sign
proc remove {nick uhost handle chan {text ""}} {
if {![channel get $chan massKick]} return
if {[isbotnick $nick]} {
resetChan $chan
} else {
eventThis "1" $chan $nick
}
}
# nick
proc nickCh {nick uhost handle chan newnick} {
if {![channel get $chan massKick]} return
if {[isbotnick $nick]} return
eventThis "2" $chan $nick $newNick
}
# kick
proc kicked {nick uhost hand chan target reason} {
if {![channel get $chan massKick]} return
variable mass
if {[matchattr $hand $mass(friends) $chan]} return
if {[isbotnick $nick]} return
if {$nick eq "Chanserv"} return
if {[isbotnick $target]} {
botKicked $chan $nick
return
}
set massKicker [channel get $chan massKicker]
if {$nick ni $massKicker} {
doThis "1" $chan $nick
return
}
set pos [lsearch $massKicker $nick]
set massCount [channel get $chan massCount]
set count [lindex [split $massCount] $pos]
set info [split $mass(limit) :]
if {$count >= [lindex $info 0]} {
takeAction $chan $nick $pos
return
} else {
incr count
}
utimer [lindex $info 1] [list [namespace current]::doThis "2" $chan $nick $pos]
doThis "4" $chan $nick $pos $count
}
}
It sent me 3 memos of same thing so thts an error too. Thanks and take ure time[15:00] <(im> [07:00:31] Tcl error [::MassKick::kicked]: bad index "": must be integer?[+-]integer? or end?[+-]integer?
[15:00] <(im> [07:00:31] Tcl error [::MassKick::kicked]: bad index "": must be integer?[+-]integer? or end?[+-]integer?
[15:00] <(im> [07:00:31] Tcl error [::MassKick::kicked]: bad index "": must be integer?[+-]integer? or end?[+-]integer?
[15:00] <(im> [07:00:32] -ChanServ (service@dal.net)- vinkan has been successfully removed from the AOP list of #idsf
[15:00] <(im> [07:00:32] -ChanServ (service@dal.net)- DEOP of vinkan on #idsf was successful.
[15:00] -ChanServ:#makaveli- import has deopped vinkan
[15:00] <(im> [07:00:33] Tcl error in script for 'timer144':
[15:00] <(im> [07:00:33] bad index "": must be integer?[+-]integer? or end?[+-]integer?
[15:00] <(im> [07:00:33] Tcl error in script for 'timer145':
[15:00] <(im> [07:00:33] bad index "": must be integer?[+-]integer? or end?[+-]integer?
[15:00] <(im> [07:00:35] -MemoServ (service@dal.net)- Im does not wish to receive memos.
[15:00] -MemoServ- New memo from Import. For more information, use: /msg MemoServ@services.dal.net LIST
Code: Select all
if {![channel get $chan massKick]} return
Give me some time and will make it "forgive" higher ranked users.Syntax: /chanserv acc/access #channel [nick]
Information: This command lets an AOp or higher see what access he/someone else has to the channel. The access is displayed numerically, below are the definitions:
-2 = Channel is frozen or closed
-1 = AutoKICKed from the channel
0 = basic
10 = AutoOp
20 = SuperOp
30 = User has MANAGER access
40 = Has founder access via a NickServ access list mask
50 = Has founder access via identification to NickServ
60 = Has founder access via identification to ChanServ
If the USER is not online, the access will be 0.
Note: You must be an AOp or higher to use that command.