You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!reset) {
[...]
clear channel member info
[...]
is not triggered, because reset flags are set
but 1.8.21 code:
if (flags & CHAN_RESETWHO) {
[...]
clear channel member info
[...]
is triggered, because CHAN_RESETWHO flag is set
when chaninfo is cleared, ismember() will return 0 then for a while, and that caused the following mode change (and probably not only those) to not call tcl binds. the bot goes blind here.
i tried to unset CHAN_RESETWHO flag in chan.c:gotjoin() like:
reset_chan_info(chan, (CHAN_RESETALL & ~CHAN_RESETTOPIC & ~CHAN_RESETWHO));
but it didnt work out as expected.
then i tried to let it clear, and set nick again afterwards:
reset_chan_info(chan, (CHAN_RESETALL & ~CHAN_RESETTOPIC));
if (chan->channel.member)
strncpyz(chan->channel.member->nick, nick, sizeof(chan->channel.member->nick));
it seems to fix the problem, but i have little idea of what i am doing here.
please someone else take it from here...
Eggdrop 1.8.3. This is a tweaked cut from my other script:
The problem is that bot until it goes in sync with channel (get users, +beIR lists) does not trigger events (at least mode events). The test was:
Here is the log (most syncing parts removed):
[01/18:07:31] [@] wilk!wilk@somehost KICK #*** somebot :no reason
[01/18:07:31] #DEBUG# user_kick wilk wi wilk #*** somebot no reason
[01/18:07:31] #DEBUG# user_kick - me
[01/18:07:31] [!s] JOIN #***
[01/18:07:31] [s->] JOIN #***
[01/18:07:31] Adding penalty: 3
[01/18:07:31] [@] somebot!~someident@somehost JOIN :#***
[...]
[01/18:07:33] [@] wilk!wilk@somehost MODE #*** +o somebot
[...]
[01/18:07:45] [@] otherbot!otherident@somehost MODE #*** +v somebot
[01/18:07:53] [@] wilk!wilk@somehost MODE #*** +o somebot
[01/18:07:53] #DEBUG# chan_mode wilk wilk@somehost wilk #*** +o somebot / 1 1 1 1
The first +o while bot was syncing with channel was totally ignored.
I've put the same code on 1.6.21 and there is no such behaviour. Every mode is triggered:
[01/18:30:54] [@] wilk!wilk@somehost KICK #*** otherbot :no reason
[01/18:30:54] #DEBUG# user_kick wilk wilk@somehost wilk #*** otherbot no reason
[01/18:30:54] #DEBUG# user_kick - me
[01/18:30:54] [!s] JOIN #***
[01/18:30:55] [s->] JOIN #***
[01/18:30:55] Adding penalty: 3
[01/18:30:56] [@] otherbot!otherident@somehost JOIN :#***
[...]
[01/18:30:58] [@] wilk!wilk@somehost MODE #*** +o otherbot
[01/18:30:58] #DEBUG# chan_mode wilk wilk@somehost wilk #*** +o otherbot / 1 1 0 1
[...]
[01/18:31:22] [@] wilk!wilk@somehost MODE #*** +o otherbot
[01/18:31:22] #DEBUG# chan_mode wilk wilk@somehost wilk #*** +o otherbot / 1 1 1 1
The text was updated successfully, but these errors were encountered: