| View previous topic :: View next topic |
| Author |
Message |
alisetan Voice
Joined: 21 May 2006 Posts: 36
|
Posted: Mon Jul 31, 2006 1:33 pm Post subject: help for script |
|
|
| Code: | # 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 |
|
| Back to top |
|
 |
krimson Halfop

Joined: 19 Apr 2006 Posts: 86
|
Posted: Mon Jul 31, 2006 2:47 pm Post subject: |
|
|
please post your code between [code] if you wish to get any help here
if you'd also post what error you recieve it would be much easier to debug |
|
| Back to top |
|
 |
alisetan Voice
Joined: 21 May 2006 Posts: 36
|
Posted: Mon Jul 31, 2006 2:55 pm Post subject: Re: help for script |
|
|
| 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 J 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 |
|
| Back to top |
|
 |
krimson Halfop

Joined: 19 Apr 2006 Posts: 86
|
Posted: Mon Jul 31, 2006 4:26 pm Post subject: |
|
|
put this at the top of your script:
| Code: | | set dj "<dj's nick>" |
and replace <dj's nick> with your dj's nick |
|
| Back to top |
|
 |
alisetan Voice
Joined: 21 May 2006 Posts: 36
|
Posted: Tue Aug 01, 2006 1:32 am Post subject: |
|
|
| krimson wrote: | put this at the top of your script:
| Code: | | set dj "<dj's nick>" |
and replace <dj's nick> with your dj's nick |
it is manual.. or auto adding nick dj?? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Aug 01, 2006 2:50 am Post subject: |
|
|
| alisetan wrote: | | krimson wrote: | put this at the top of your script:
| Code: | | set dj "<dj's nick>" |
and replace <dj's nick> with your dj's nick |
it is manual.. or auto adding nick dj?? |
That snippet is "manual". _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
alisetan Voice
Joined: 21 May 2006 Posts: 36
|
Posted: Tue Aug 01, 2006 3:58 am Post subject: |
|
|
| krimson wrote: | put this at the top of your script:
| Code: | | set dj "<dj's nick>" |
and replace <dj's nick> with your dj's nick |
how in this thing i want if !dj none... the bot will notice no dj available
proc req {nick host hand chan arg} {
global url pathqstat cc nopub dj
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}request <^BExact Songname^B>"
return 0
} |
|
| Back to top |
|
 |
|