Sir_Fz wrote:strikelight wrote:[snip]
the {found} is where you put the code you want to handle the case where a match is found, the {not} is where you put the code you want to handle the case where a match is NOT found.
Um, "||" is the logical OR , and "&&" is the logical "AND".. So "&&" is infact what he wanted.
I highly suggest you go through the
suninet eggdrop tcl tutorial.
well I didn't get much of the found not... would you please give me an example, because if commands usualy are
if {bla} {do} so how come you're telling me
if {command} {found} {not} ... it confuses me.
can you please give an example ?
also some example about the "|| or" and the "&& and" , using them in lots of cases but not figuring out how they function.
thank you

The forum is polluted with examples, as is the suninet site that was posted in my last reply in this thread...
However.. Staying with the example from this thread:
Code: Select all
if {[botisop $chan] && [string match \[a-z\]* $nick]} {
# Here is what is meant by "found"....
putlog "The bot is opped in $chan -AND- The first letter of the nick "$nick" is a lowercase letter"
} {
# Here is what is meant by "not found"
putlog "Either the bot is not opped in $chan -OR- The first letter of the nick "$nick" is NOT a lowercase letter"
}
Now, many times you'll see an 'else' in the middle of that code between the } and the { , which is perfectly acceptable, but unnecessary.
For more examples, again, I emplore you to read through various threads on this forum, and also visit various tcl tutorial sites, such as the mentioned suninet.nl site.