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.
Tristam
Voice
Posts: 17 Joined: Sun Sep 21, 2003 11:28 am
Location: Finland
Post
by Tristam » Mon Oct 20, 2003 4:40 pm
Hello everyone! I would like to know how to make an "if statement" in tcl. My bot is on two channels, and the same command should get a different result on each channels. For example when I type "!info" the script should check which channel is it, and answer depending on the channel? How to make that?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Oct 20, 2003 5:05 pm
check the r0x0ring tutorial by Papillon for the
IF commands
Rusher2K
Halfop
Posts: 88 Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:
Post
by Rusher2K » Mon Oct 20, 2003 5:09 pm
HI
Code: Select all
bind pub - !info pub:info
proc pub:info { nick host hand chan text } {
global botnick
if { $chann == "#chan1" } {putmsg $chan "Hello World, hello $nick, i'm $botnick" }
if { $chann == "#chan2" } {putmsg $chan "Here is $botnick" }
}
CrazyCat
Revered One
Posts: 1304 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Tue Oct 21, 2003 2:59 am
Sir_Fz wrote: check the r0x0ring tutorial by Papillon for the
IF commands
Sir_Fz, you'd better explain him with simple words:
RTFM
Tristam
Voice
Posts: 17 Joined: Sun Sep 21, 2003 11:28 am
Location: Finland
Post
by Tristam » Tue Oct 21, 2003 4:13 am
Thanks Sir_Fz and Rusher. CrazyCat, if I would had that manual, I wouldnt have posted here
(but all the other so called tutorials suck ass
)