This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

sending messages to allowed channels

Help for those learning Tcl or writing their own scripts.
Post Reply
v
veblen
Voice
Posts: 18
Joined: Tue Mar 13, 2007 11:23 am

sending messages to allowed channels

Post by veblen »

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?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

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.
Post Reply