if u can and have the time for it, i would much apreciate
. the option of using also the botnick as a trigger
example:
now we use !op, i would like to use also botnick op
-----
ty in advance
Code: Select all
##############################################
# Rls: botdo.tcl #
# Date: 15/01/11 #
# Coded by: doggo #
# Contact: #alt.binaries.inner-sanctum EFNET #
##############################################
# Usage: botnick op <nick>
# botnick voive <nick>
# Script Starts Here
bind pubm - * botdo
proc botdo {nick host hand chan text} {
set bot [lindex [split $text] 0]
set do [lindex [split $text] 1]
set who [join [lrange [split $text] 2 end]]
if {![isbotnick $bot]} { return }
switch -exact -- [string tolower $do] {
"op" {
if {![matchattr $hand o|o $chan]} { putserv "PRIVMSG $chan :you dont have the POWER!"; return }
if {![onchan $who $chan]} { putserv "PRIVMSG $chan :$who ?"; return }
putserv "MODE $chan +o $who"
}
"voice" {
if {![matchattr $hand o|o $chan]} { putserv "PRIVMSG $chan :you dont have the POWER!"; return }
if {![onchan $who $chan]} { putserv "PRIVMSG $chan :$who ?"; return }
putserv "MODE $chan +v $who"
}
default {
putserv "PRIVMSG $chan :hmm $do ?"
}
}
}
putlog "botdo.tcl loaded"