Code: Select all
# Command trigger
variable trigger {.}
bind pub o|o ${trigger}op
bind pub o|o ${trigger}deop
bind pub o|o ${trigger}voice
bind pub o|o ${trigger}devoice
bind pub o|o ${trigger}kick
bind pub o|o ${trigger}kb
bind pub o|o ${trigger}nb
proc op {nick uhost hand chan text} {
global botnick
if {[botisop $nick $chan]} && {[isop $nick $chan]} {
set target [lindex $text 0]
set target1 [lindex $text 1]
set target2 [lindex $text 2]
if {$target == ""} {
putserv "MODE $chan +o $nick
}
}
}
proc deop {nick host hand chan text} {
global botnick
if {[isop $nick $chan]} {
set target [lindex $text 0]
set target1 [lindex $text 1]
set target2 [lindex $text 2]
if {$target == ""} {
putserv "MODE $chan -o $nick"
} else {
putserv "MODE $chan -ooo $target $target1 $target2"
}
}
}
proc voice {nick host hand chan text} {
global botnick
if {[isop $nick $chan]} {
set target [lindex $text 0]
set target1 [lindex $text 1]
set target2 [lindex $text 2]
if {$target == ""} {
putserv "MODE $chan +v $nick"
} else {
putserv "MODE $chan +vvv $target $target1 $target2"
}
}
}
proc devoice {nick host hand chan text} {
global botnick
if {[isop $nick $chan]} {
set target [lindex $text 0]
set target1 [lindex $text 1]
set target2 [lindex $text 2]
if {$target == ""} {
putserv "MODE $chan -v $nick"
} else {
putserv "MODE $chan -vvv $target $target1 $target2"
}
}
}
proc kb {nick host hand chan text} {
global botnick
if {[isop $nick $chan]} {
set target [lindex $text 0]
set reason [lrange $text 0 end]
set bhost [getchanhost $target $chan]
set banmask "*!*[string trimleft [string range $bhost [string first "!" $bhost] end] ?^~-_+?]"
if {$target == ""} {
putserv "MODE $chan +b $banmask"
putserv "kick $chan $target :$reason"
}
}
}
proc kick {nick host hand chan text} {
global botnick
if {[isop $nick $chan]} {
set target [lindex $text 0]
set reason [lrange $text 0 end]
if {$target == ""} {
putserv "kick $chan $target :$reason"
}
}
}
proc nb {nick host hand chan text} {
global botnick
if {[isop $nick $chan]} {
set target [lindex $text 0]
set reason [lrange $text 0 end]
if {$target == ""} {
putserv "MODE $chan +b $nick"
putserv "kick $chan $target :$reason"
}
}
}
Well, A public command tcl which works for the ppl who are op in that channel.. without adding the users to the bots userlist..
But i wonder whats wrong.. bot is not responding.
Rgds
Skipper