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.
S
Stafford
Post
by Stafford » Wed Feb 27, 2002 2:13 am
Hi,
Can i know which bind should I use if I want the bot to echo to channel main when someone voice (+v) it? Thanks.
Souperman
Halfop
Posts: 69 Joined: Sat Feb 02, 2002 8:00 pm
Location: Cape Town, South Africa
Contact:
Post
by Souperman » Wed Feb 27, 2002 2:42 am
bind mode xxxxxxx
See tcl-commands.doc for the details.
S
Stafford
Post
by Stafford » Wed Feb 27, 2002 5:52 am
ahh, I've got it
Thanks anyway. Btw, how can I write a yes/no choice? For example, if 1 is selected, it is yes and 0 is selected, it is no. How can I do that to apply in my script?
Souperman
Halfop
Posts: 69 Joined: Sat Feb 02, 2002 8:00 pm
Location: Cape Town, South Africa
Contact:
Post
by Souperman » Thu Feb 28, 2002 6:02 pm
What do you mean by "selected"?
M
Mentolboy
Post
by Mentolboy » Fri Mar 01, 2002 11:24 am
global selected, answ
if { selected == 1 } { set answ "yes" }
elseif { selected == 0 } { set answ "no" }
is this what you mean or am I not getting your point? In other languages you can use a boolean var, I'm not sure if you can use it in TCL, but my code will work just fine.
Grtz
Petersen
Owner
Posts: 685 Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK
Post
by Petersen » Fri Mar 01, 2002 11:34 am
standard vars can act as bools when set as positive integers (with 0 being false and anything else being true).
eg
if {$var} {
#code to run if true
} else {
#code to run if false
}
also the ! operator can be used to reverse this
eg
if {!($var)} {
#code to run if false
} else {
#code to run if true
}
S
Stafford
Post
by Stafford » Sun Mar 03, 2002 10:46 am
Ahh Mentolboy, that's what I meant. You got it
Anyway, I've figured out how should it be like and it's working fine now. Thanks Everyone