Code: Select all
#Creator Spyda,
#made for ComputerTech
bind PUB B .join bn:pub:join
proc bn:pub:join {nick uhost hand chan args} {
global botnick
set c 0
if {[llength [join $args]] > 0} {
if {![string match -nocase [lindex [join $args] 0] $botnick]} {
return
}
if {[llength [join $args]] > 1} {
incr c
}
}
if {$c} {
putquick "PRIVMSG $chan :\[ok, channel add $botnick joining [lindex [join $args] 1]\]"
channel add [lindex [join $args] 1]
}
}
bind PUB B .part bn:pub:part
proc bn:pub:part {nick uhost hand chan args} {
global botnick
set c 0
if {[llength [join $args]] > 0} {
if {![string match -nocase [lindex [join $args] 0] $botnick]} {
return
}
if {[llength [join $args]] > 1} {
incr c
}
}
if {$c} {
putquick "PRIVMSG $chan :\[ok, channel removed $botnick parting [lindex [join $args] 1]\]"
channel remove [lindex [join $args] 1]
}
}
bind PUB B .jump bn:pub:jump
proc bn:pub:jump {nick uhost hand chan args} {
global botnick
set c 0
if {[llength [join $args]] > 0} {
if {![string match -nocase [lindex [join $args] 0] $botnick]} {
return
}
if {[llength [join $args]] > 1} {
incr c
}
}
if {$c} {
putquick "PRIVMSG $chan :\[ok, jumping $botnick to [lindex [join $args] 1]:[lindex [join $args] 2]\]"
jump [lindex [join $args] 1] [lindex [join $args] 2]
} else {
putquick "PRIVMSG $chan :\[ok, jumping $botnick to default\]"
jump
}
}
bind pub B .restart do:restart
proc do:restart {nick uhost hand chan args} {
global botnick
set c 0
if {[llength [join $args]] > 0} {
if {![string match -nocase [lindex [join $args] 0] $botnick]} {
return
}
if {[llength [join $args]] > 1} {
incr c
}
}
putquick "PRIVMSG $chan :Restart Requested By $nick Restarting...)"
restart
}
bind pub B .rehash do:rehash
proc do:rehash {nick uhost hand chan args} {
global botnick
set c 0
if {[llength [join $args]] > 0} {
if {![string match -nocase [lindex [join $args] 0] $botnick]} {
return
}
if {[llength [join $args]] > 1} {
incr c
}
}
putquick "PRIVMSG $chan :Rehash Requested By $nick Rehashing...)"
rehash
}
bind pub B .die do:die
proc do:die {nick uhost hand chan args} {
global botnick
set c 0
if {[llength [join $args]] > 0} {
if {![string match -nocase [lindex [join $args] 0] $botnick]} {
return
}
if {[llength [join $args]] > 1} {
incr c
}
}
putquick "PRIVMSG $chan :Shutdown Requested By $nick Shutting Down...)"
die
}
bind pub B .say do:say
proc do:say {nick uhost hand chan args} {
global botnick
set c 0
if {[llength [join $args]] > 0} {
if {![string match -nocase [lindex [join $args] 0] $botnick]} {
return
}
if {[llength [join $args]] > 1} {
incr c
}
}
set msg [lrange [lindex $text 0] 1 end]
putserv "privmsg $chan :$msg"
}