| View previous topic :: View next topic |
| Author |
Message |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Thu Feb 23, 2006 11:22 am Post subject: setudef problem |
|
|
Hello!
This is my script:
| Code: | setudef flag help
bind pub - !help help
proc help {nick host hand chan rest} {
puthelp "privmsg $chan :blablabla"
} |
The bot is listened on more than one channel. And I want that it only answers on one of these channels. So I insert "setudef flag help" in my script. But now the bot still anwers in every channel. What do I have to add to my script that it works. |
|
| Back to top |
|
 |
deadite66 Halfop
Joined: 30 May 2005 Posts: 74 Location: Great Yarmouth, UK
|
Posted: Thu Feb 23, 2006 1:01 pm Post subject: |
|
|
try
| Code: | bind pub - !help help
proc help {nick host hand chan rest} {
if {$chan =="#mychannel"} {
puthelp "privmsg $chan :blablabla"
}
}
|
_________________ <- tcl newb |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Feb 23, 2006 1:34 pm Post subject: Re: setudef problem |
|
|
| darton wrote: | Hello!
This is my script:
| Code: | setudef flag help
bind pub - !help help
proc help {nick host hand chan rest} {
puthelp "privmsg $chan :blablabla"
} |
The bot is listened on more than one channel. And I want that it only answers on one of these channels. So I insert "setudef flag help" in my script. But now the bot still anwers in every channel. What do I have to add to my script that it works. |
You need to check if the channel is set to +help.
| Code: | if {[channel get $chan help]} {
puthelp "privmsg $chan :blablabla"
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
miCHa Voice
Joined: 07 Mar 2006 Posts: 1 Location: Gelsenkirchen (Germany)
|
Posted: Tue Mar 07, 2006 3:28 pm Post subject: |
|
|
sorry for pushing this thread. This is only a tip, if you dont want to use setudef (checkin if its on etc.)
| Code: | bind pub - !help help
proc help { nickname hostname handle channel arguments } {
if {[string equal -nocase $channel "#your_channel"]} {
putserv "privmsg $channel :your text!"
}
} |
_________________ #micha (on QuakeNet) - www.micha.es |
|
| Back to top |
|
 |
|