| View previous topic :: View next topic |
| Author |
Message |
veblen Voice
Joined: 13 Mar 2007 Posts: 18
|
Posted: Fri Mar 23, 2007 7:52 pm Post subject: sending messages to allowed channels |
|
|
how can i use something such as setudf or similar to make changable variables, or a variable list for certain channels to send messsages to?
for example.. i have a bot sending news updates to a channel, is there a way i can use setudf together with foreach.. to easily set and unset multiple channels where the news updates will be sent to? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Mar 23, 2007 9:04 pm Post subject: |
|
|
| Code: | setudef flag sendnews
# Inside your proc which sends the news:
foreach chan [channels] {
if {[channel get $chan sendnews]} {
# send the news to $chan
}
} |
This way the news will be sent to +sendnews channels. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|