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.
Old posts that have not been replied to for several years.
stere0
Halfop
Posts: 47 Joined: Sun Sep 23, 2001 8:00 pm
Location: Brazil
Post
by stere0 » Tue Sep 25, 2001 4:22 pm
Can i refer a channel in a tcl script without put your name? Like assuming the name set in the .conf file?
stdragon
Owner
Posts: 959 Joined: Sun Sep 23, 2001 8:00 pm
Contact:
Post
by stdragon » Tue Sep 25, 2001 7:08 pm
Sure, it will be a variable just like any other. If you call the variable "the_channel", then in the config file put:
set the_channel #sheep
And in your script, do this:
proc someproc {} {
global the_channel
putserv "PRIVMSG $the_channel :sheep rule!"
}
slennox
Owner
Posts: 593 Joined: Sat Sep 22, 2001 8:00 pm
Contact:
Post
by slennox » Tue Sep 25, 2001 7:09 pm
Not exactly sure if this is what you want, but the 'channels' command returns the list of channels the bot has defined. To do something on each of these channels you would use something like
Code: Select all
foreach chan [channels] {
puthelp "PRIVMSG $chan :Hello there!"
}
<font size=-1>[ This Message was edited by: slennox on 2001-09-25 17:10 ]</font>