# Public command trigger
set tr "!"
set cc "!"
# Channels you _dont_ want the bot to reply to public triggers on (seperate with spaces):
set nopub "#q3f"
bind pub -|- ${tr}dj dj
bind pub -|- ${tr}request req
proc dj {nick host hand chan arg} {
global url pathqstat cc nopub dj
if ($nick == $dj) { set $dj None }
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}dj <Exact Nickname>"
return 0
}
set dj "$arg"
putserv "NOTICE $chan :DJ set to $dj"
}
proc req {nick host hand chan arg} {
global url pathqstat cc nopub dj
if ($dj == None)
putserv "NOTICE $nick $nick No DJ Online!"
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}request <^BExact Songname^B>"
return 0
}
set songname "$arg"
putserv "PRIVMSG $dj :$nick requested $songname" from [ $nick ] [ chan ]
putserv "NOTICE $nick :You have request $songname. Please do not re-request this."
}
alisetan wrote:# Public command trigger
set tr "!"
set cc "!"
# Channels you _dont_ want the bot to reply to public triggers on (seperate with spaces):
set nopub "#q3f"
bind pub -|- ${tr}dj dj
bind pub -|- ${tr}request req
proc dj {nick host hand chan arg} {
global url pathqstat cc nopub dj
if ($nick == $dj) { set $dj None }
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}dj <Exact Nickname>"
return 0
}
set dj "$arg"
putserv "NOTICE $chan :DJ set to $dj"
}
proc req {nick host hand chan arg} {
global url pathqstat cc nopub dj
if ($dj == None)
putserv "NOTICE $nick $nick No DJ Online!"
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}request <^BExact Songname^B>"
return 0
}
set songname "$arg"
putserv "PRIVMSG $dj :$nick requested $songname" from [ $nick ] [ chan ]
putserv "NOTICE $nick :You have request $songname. Please do not re-request this."
}
what error for this.. blurr.. anyone can help
when i type !dj nick
[19:52] Tcl error [dj]: can't read "dj": no such variable <-- this thing happen.. what i want to do is.. when tyep !dj nick it set the dj nick.. when type !dj none.. if somebody type !request the bot notice putserv "NOTICE $nick $nick No DJ Online!" if the dj available.. the request is on