Hi, Ive looked on Google, and the TCL Archive, and found nothing. I know some codeing, but not a much as I would like to, maybe a lead in the right direction would help.
Decription:
Command= !needadmin
<swi7ch>!needadmin
<bot>Request Has Been Sent To Administration - Please Wait For A Replay
Thats would it would look like in the chan..
in the code. it would do..
/msg <admin name here> $nick is requesting help
/msg <admin name here> $nick is requesting help
Mutliple nicks..
If there is a tcl, and that can be modifed like a !cmd or a !help that would be much appreciated.
Last edited by swi7ch on Mon Jan 28, 2008 11:27 am, edited 1 time in total.
###
# trigger
set admin(cmd) "!needadmin"
# Admins list
set admin(list) "admin1 admin2 admin3"
###
bind pub - $admin(cmd) pub:needadmin
proc pub:needadmin { nick host hand chan arg } {
global admin
set counter 0
foreach ad [split $admin(list)] {
if {[onchan $ad $chan]} {
putquick "PRIVMSG $ad :\037$nick\017 is requesting some help "
incr counter
}
}
if {$counter == 0} {
putquick "PRIVMSG $chan :Sorry $nick ,can't find any admin online."
} else {
putquick "PRIVMSG $chan :$nick, your request has been sent to administration. Please wait."
}
}
Tcl error in file '&&&&.conf':
can't set "admin(cmd)": variable isn't array
while executing
"set admin(cmd) "!needadmin""
(file "scripts/needadmin.tcl" line 4)
invoked from within
"source scripts/needadmin.tcl"
(file "&&&&&.conf" line 159)
[02:46] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
Also, how would it know if a User was online or not? via.
if {$counter == 0} {
putquick "PRIVMSG $chan :Sorry $nick ,can't find any admin online."
Thanks so much, Just ran into that problem.. if u can help? or something maybe..
###
# trigger
set waffeles(cmd) "!needadmin"
# Admins list
set waffles(list) "admin1 admin2 admin3"
###
bind pub - $waffles(cmd) pub:needadmin
proc pub:needadmin { nick host hand chan arg } {
global admin
set counter 0
foreach ad [split $waffles(list)] {
if {[onchan $ad $chan]} {
putquick "PRIVMSG $ad :\037$nick\017 is requesting some help "
incr counter
}
}
if {$counter == 0} {
putquick "PRIVMSG $chan :Sorry $nick ,can't find any admin online."
} else {
putquick "PRIVMSG $chan :$nick, your request has been sent to administration. Please wait."
}
}
even if i change it..
can't read "waffles(cmd)": no such element in array
while executing
"bind pub - $waffles(cmd) pub:needadmin"
(file "scripts/need.tcl" line 11)
invoked from within
"source scripts/need.tcl"
(file "*****.conf" line 159)
[08:59] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)