Code: Select all
bind need -|- "*" q:need
proc q:need {channel need} {
global qscript
set target ""
if {[matchattr Q |o $channel]} {
set target $qscript(qtarget)
}
if {[matchattr L |o $channel]} {
set target $qscript(ltarget)
}
if {$target==""} { return 0 }
switch -exact [string tolower $need] {
"op" {
putquick "PRIVMSG $target :OP $channel"
return 1
}
"unban" {
if {[matchattr L |o $channel]} {
putquick "PRIVMSG $target :recover $channel"
putquick "JOIN $chan"
utimer 1 "putquick \"JOIN $chan\""
}
if {[matchattr Q |o $channel]} {
putquick "PRIVMSG $target :unbanall $channel"
putquick "PRIVMSG $target :deopall $channel"
putquick "JOIN $chan"
utimer 1 "putquick \"JOIN $chan\""
}
return 1
}
"invite" {
putquick "PRIVMSG $target :INVITE $channel"
putquick "JOIN $chan"
utimer 1 "putquick \"JOIN $chan\""
return 1
}
}
putquick "PRIVMSG $target :CLEARCHAN $channel"
putquick "JOIN $chan"
utimer 1 "putquick \"JOIN $chan\""
return 1
}