egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sending messages to allowed channels

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
veblen
Voice


Joined: 13 Mar 2007
Posts: 18

PostPosted: Fri Mar 23, 2007 7:52 pm    Post subject: sending messages to allowed channels Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Mar 23, 2007 9:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber