eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

evnt got-chanlist doesn't react to raw 315

Open crazycatdevs opened this issue 6 months ago • 4 comments

Eggdrop version: 1.10.0

For test, I added this script:

proc tgc {type {chan ""}} {
   putlog "*** $type for $chan ***" 
}
bind evnt * * tgc

Then I made my eggdrop joining an empty and a non-empty channel

.+chan #emptytest
[09:51:02] tcl: builtin dcc call: *dcc:+chan crazycat 16 #emptytest
[09:51:02] [!s] JOIN #emptytest
[09:51:02] #crazycat# +chan #emptytest
[09:51:03] [s->] JOIN #emptytest
[09:51:03] [@] :[email protected] JOIN #emptytest Myrddin :Please ignore me
[09:51:03] triggering bind ::puzzle::ujoin
[09:51:03] triggered bind ::puzzle::ujoin, user 0.248ms sys 0.140ms
[09:51:03] triggering bind autolog_join
[09:51:03] triggered bind autolog_join, user 0.495ms sys 0.279ms
[09:51:03] [!m] MODE #emptytest +b
[09:51:03] [m->] MODE #emptytest +b
[09:51:03] [!m] MODE #emptytest
[09:51:03] [m->] MODE #emptytest
[09:51:03] [!m] WHO #emptytest c%chnufat,222
[09:51:03] [m->] WHO #emptytest c%chnufat,222
[09:51:03] [@] :avalon.zeolia.chat MODE #emptytest +nt 
[09:51:03] [@] :avalon.zeolia.chat 353 Myrddin = #emptytest :@Myrddin
[09:51:03] [@] :avalon.zeolia.chat 366 Myrddin #emptytest :End of /NAMES list.
[09:51:03] [@] :avalon.zeolia.chat 368 Myrddin #emptytest :End of Channel Ban List
[09:51:03] [@] :avalon.zeolia.chat 324 Myrddin #emptytest +nt 
[09:51:03] [@] :avalon.zeolia.chat 329 Myrddin #emptytest 1753689063
[09:51:03] [@] :avalon.zeolia.chat 354 Myrddin 222 #emptytest myrddin user.myrddin Myrddin HrsB@ Myrddin
[09:51:03] [@] :avalon.zeolia.chat 315 Myrddin #emptytest :End of /WHO list.
.+chan #test
[09:52:07] tcl: builtin dcc call: *dcc:+chan crazycat 16 #test
[09:52:07] [!s] JOIN #test
[09:52:07] #crazycat# +chan #test
[09:52:08] [s->] JOIN #test
[09:52:08] [@] :[email protected] JOIN #test Myrddin :Please ignore me
[09:52:08] triggering bind ::puzzle::ujoin
[09:52:08] triggered bind ::puzzle::ujoin, user 0.109ms sys 0.061ms
[09:52:08] triggering bind autolog_join
[09:52:08] triggered bind autolog_join, user 0.471ms sys 0.265ms
[09:52:08] [!m] MODE #test +b
[09:52:08] [m->] MODE #test +b
[09:52:08] [!m] MODE #test
[09:52:08] [m->] MODE #test
[09:52:08] [!m] WHO #test c%chnufat,222
[09:52:08] [m->] WHO #test c%chnufat,222
[09:52:08] [@] :avalon.zeolia.chat 332 Myrddin #test :Canal de test
[09:52:08] [@] :avalon.zeolia.chat 333 Myrddin #test [email protected] 1721666876
[09:52:08] [@] :avalon.zeolia.chat 353 Myrddin @ #test :Myrddin @[Zeolia] @Jarvis +Viviane
[09:52:08] [@] :avalon.zeolia.chat 366 Myrddin #test :End of /NAMES list.
[09:52:08] [@] :avalon.zeolia.chat 368 Myrddin #test :End of Channel Ban List
[09:52:08] [@] :avalon.zeolia.chat 324 Myrddin #test +nrst 
[09:52:08] [@] :avalon.zeolia.chat 329 Myrddin #test 1744854060
[09:52:08] [@] :avalon.zeolia.chat 354 Myrddin 222 #test myrddin user.myrddin Myrddin HrsB Myrddin
[09:52:08] [@] :avalon.zeolia.chat 354 Myrddin 222 #test zeolia services.zeolia.chat [Zeolia] HB*@ 0
[09:52:08] [@] :avalon.zeolia.chat 354 Myrddin 222 #test Jarvis stark.limited Jarvis Hrs@ Jarvis
[09:52:08] [@] :avalon.zeolia.chat 354 Myrddin 222 #test viviane user.viviane Viviane HrsB+ Viviane
[09:52:08] [@] :avalon.zeolia.chat 315 Myrddin #test :End of /WHO list.

In each case, the RAW 315 is seen but the bind didin't react...

.binds evnt
[09:53:25] tcl: builtin dcc call: *dcc:binds crazycat 16 evnt
[09:53:25] #crazycat# binds evnt
Command bindings:
  TYPE FLAGS    COMMAND              HITS BINDING (TCL)
  evnt -|-      *                       0 tgc

And same occures (or doesn't occure) if my bind is strictly on got-chanlist

crazycatdevs avatar Jul 28 '25 07:07 crazycatdevs

Additionnal info: same occures when the bind evnt * got-chanlist tgc is used.

crazycatdevs avatar Jul 28 '25 22:07 crazycatdevs

OK, this happens when the userhost-in-names CAP is enabled (can you confirm you have this CAP enabled?). Need to re-review this to see if we have all the info we need from NAMES. I don't know off the top of my head but this could be 'dangerous' to perform functions waiting on the WHO information if we don't actually get the WHO information (the purpose behind userhost-in-names). I'll compare the two and think more on how to approach this. But for now, try not requesting userhost-in-names and I think you should be good

vanosg avatar Jul 30 '25 02:07 vanosg

I'll add we specifically made an assumption when this was designed:

    /* The assumption here is the user enabled userhost-in-names because WHO
     * is disabled. We remove the pending flag here because we'll never get a
     * a WHO to do it
     */
    if (chan) {
      chan->status |= CHAN_ACTIVE;
      chan->status &= ~CHAN_PEND;
    }
  }
  return 0;

By setting the channel to ACTIVE, we effectively ignore the 315 later on in got315()

vanosg avatar Jul 30 '25 03:07 vanosg

I add here what I said in channel: even with all CAP disabled, the evnt got-chanlist is not working, when raw 315 works.

crazycatdevs avatar Jul 31 '25 06:07 crazycatdevs