Using
isop,
chanlist, or any channel-status command on the join-binding will produce "non-authorative" results (it will considder itself the only member of the channel, and not being op'd).
At the same time, if sticking with "classic" ircd behaviour, if you are the creator of a channel you will actually join the channel with operator status. IE, there will be no servermode (hence the mode-binding will not trigger), instead the 353 numeric response will already show the client as an operator. Unfortunately, as arfer mentioned, channel members list will not be updated until the response of a /who-request is recieved (which is performed after the join-binding triggers).
One more reliable workaround would be to listen for the 315 (End of WHO) numeric, indicating your eggdrop has already recieved (and parsed) all the channel-data it needs.
Keep in mind that when working with raw-bindings, eggdrop will only extract the source (servername in this case) and command (315 in this case), leaving the rest of the line unparsed as the third argument. As such, you'll need to extract the channelname from here to see that we've joined the right channel... Also, having a returncode other than 0 may result in unpredictable behaviour, as this prevents further processing of this message (possibly blocking eggdrop from "seeing" important "stuff").
Something like this should convert the line to a proper list, and make a decent skeleton for dealing with raw bindings:
Code: Select all
proc myraw {source command text} {
set i [string first " :" $text]
set list [split [string range $text 0 [expr $i-1]]]
lappend list [string range $text [expr $i+2] end]
#your code here
#Make sure we return 0, so we won't block eggdrop's own raw bindings.
return 0
}
Reading rfc1459 reveals the rest being nickname, channel and "End of WHO list.", so [
lindex $list 1] should yield the channelname for the 315 numeric reply.