Weirdo wrote:Code: Select all
if {{$chan == $runchan} || {onchan $runchan $nick} == 0 } {return 0}
[17:53:44] <Minako> [17:53] Tcl error [pub:infosend]: expected boolean value but got "$chan != $runchan"
onchan <nickname> [channel]
Returns: 1 if someone by that nickname is on the specified channel (or
any channel if none is specified); 0 otherwise
Module: irc
Have i got the right usage of this, as if its 0, then the proc will stop, if its 1 then itll continue. Does the channel need to be specified in the onchan?
Cause of this boolean thingy, havent got a reading for the second run chan[/code]
Hmm, stereo was not good enough
1. ==> {$chan == $runchan}
Do not put { } around it.
2. {onchan $runchan $nick}
put [ ] around this, since [onchan] is a command that returns something (0 or 1).
3. You write:
onchan $runchan $nick
and tcl-commands.doc writes:
onchan <nickname> [channel].
You see the difference in the order/location of the nickname and the channelname?
4. Even if you use the [onchan] correctly, are you sure this test is needed?