i want to modify badserv.tcl when user use !voice, !v or + in channel
bot whois user, and if user in a $server get voice..
Here tcl:
Code: Select all
##############################
# All Right Reserved by Paco #
##############################
# Vuvedete serverite, koito ako nqkoj potrebitel, koito e wlqzal na tqh da mu bude daden op ili voice!
set opvoiceserv {
{irc.server1.com}
{irc.server2.com}
}
# Napishete kanala, za koito da raboti scripta.
set chan "#Channel"
## Script ##
bind pub -|- + pun:server
bind pub -|- !v pun:server
bind pub -|- !voice pun:server
###################
#Start voice check#
###################
proc pun:server {nick uhost hand chan} {
global botnick
if {[string tolower $botnick] == [string tolower $nick]} {
return
}
putquick "whois $nick"
}
# Start Voice check #
bind raw - 312 server:whois
proc server:whois {from key bns} {
global chan opvoiceserv
set nick [lindex [split $bns " "] 1]
set server [string tolower [lindex [split $bns " "] 2]]
foreach bserv $opvoiceserv {
if {[string tolower $bserv] == $server} {
pushmode $chan +v $nick
return
}
}
}
putlog "Loaded Op/Voice server check tcl writen by Paco (irc.techno-link.net)"
Tcl error [pun:server]: wrong # args: should be "pun:server nick uhost hand chan"
Where is my error?