42wim/matterircd

Join/leave weirdness

Closed this issue · 5 comments

TLDR

With the recent commits this seems to mostly have cross-interface effects (ie. interface A responding incorrectly to something in interface B happening), aside from a weird (but not so bothersome) NOTICE on leaving channels with the current HEAD of matterircd.

Information

webui := mattermost 5.8.0 web ui
ircd-old := matterircd v0.19.1
ircd-new := matterircd c1c5fd9

Scenario 1 - webui join/leave starting in channel

  • Action 1-0: be in channel, connect to ircds
  • State 1-0: webui: in; ircd-old: in; ircd-new: in
  • Action 1-1: leave channel via webui
  • State 1-1: webui: out; ircd-old: in; ircd-new: out
  • Action 1-2: join channel via webui
  • State 1-2: webui: in; ircd-old: out; ircd-new: out
  • Action 1-3: leave channel via webui
  • State 1-3: webui: out; ircd-old: out; ircd-new: out (with NOTICE #channelname: You're not on that channel)
  • Action 1-4: join channel via webui
  • State 1-4: webui: in; ircd-old: in; ircd-new: out
  • Action 1-5: leave channel via webui
  • State 1-5: webui: out; ircd-old: in; ircd-new: out (with NOTICE #channelname: You're not on that channel)
  • Action 1-6: join channel via webui
  • State 1-6: State 1-2
  • [..]

Scenario 2 - webui join/leave starting out of channel

  • Action 2-0: be out of channel, connect to ircds
  • State 2-0: webui: out; ircd-old: out; ircd-new: out
  • Action 2-1: join channel via webui
  • State 2-1: webui: in; ircd-old: in; ircd-new: out
  • Action 2-2: leave channel via webui
  • State 2-2: State 1-5
    [..]

Scenario 3 - irc-old join/leave starting in channel

  • Action 3-0: be in channel, connect to ircds
  • State 3-0: webui: in; ircd-old: in; ircd-new: in
  • Action 3-1: leave channel via ircd-old
  • State 3-1: webui: out; ircd-old: out; ircd-new: out
  • Action 3-2: join channel via ircd-old
  • State 3-2: webui: in; ircd-old: in; ircd-new: out
  • Action 3-3: leave channel via ircd-old
  • State 3-3: webui: out; ircd-old: out; ircd-new: out (with NOTICE #channelname: You're not on that channel)
  • Action 3-4: join channel via ircd-old
  • State 3-4: webui: in; ircd-old: out; ircd-new: out
  • Action 3-5: leave channel via ircd-old
  • State 3-5: nothing happens
  • Action 3-6: join channel via ircd-old
  • State 3-6: webui: in; ircd-old: in; ircd-new: out
  • Action 3-7: leave channel via ircd-old
  • State 3-7: State 3-3
    [..]

Scenario 4 - irc-old join/leave starting out of channel

  • Action 4-0: be out of channel, connect to ircds
  • State 4-0: webui: out; ircd-old: out; ircd-new: out
  • Action 4-1: join channel via ircd-old
  • State 4-1: webui: in; ircd-old: out; ircd-new: out
  • Action 4-2: leave channel via ircd-old
  • State 4-2: nothing happens
  • Action 4-3: join channel via ircd-old
  • State 4-3: webui: in; ircd-old: in; ircd-new: out
  • Action 4-4: leave channel via ircd-old
  • State 4-4: webui: out; ircd-old: out; ircd-new: out (with NOTICE #channelname: You're not on that channel)
  • Action 4-5: join channel via ircd-old
  • State 4-5: State 4-1
    [..]

Note: I have not yet managed to detect the pattern of when ircd-old does or does not get kicked out of a channel immediately after joining, but it does not seem to affect ircd-new anymore so perhaps a moot point.

Scenario 5 - irc-new join/leave starting in channel

  • Action 5-0: be in channel, connect to ircds
  • State 5-0: webui: in; ircd-old: in; ircd-new: in
  • Action 5-1: leave channel via ircd-new
  • State 5-1: webui: out; ircd-old: in; ircd-new: out (with NOTICE #channelname: You're not on that channel)
  • Action 5-2: join channel via ircd-new
  • State 5-3: webui: in; ircd-old: out; ircd-new: in
  • Action 5-4: leave channel via ircd-new
  • State 5-4: webui: out; ircd-old: out; ircd-new: out (with NOTICE #channelname: You're not on that channel)
  • Action 5-5: join channel via ircd-new
  • State 5-5: State 5-0
    [..]

Scenario 6 - irc-new join/leave starting out of channel

  • Action 6-0: be out of channel, connect to ircds
  • State 6-0: webui: out; ircd-old: out; ircd-new: out
  • Action 6-1: join channel via ircd-new
  • State 6-1: webui: in; ircd-old: in; ircd-new: in
  • Action 6-2: leave channel via ircd-new
  • State 6-2: webui: out; ircd-old: in; ircd-new: out (with NOTICE #channelname: You're not on that channel)
  • Action 6-3: join channel via ircd-new
  • State 6-3: webui: in; ircd-old: out; ircd-new: in
  • Action 6-4: leave channel via ircd-new
  • State 6-4: webui: out; ircd-old: out; ircd-new: out (with NOTICE #channelname: You're not on that channel)
  • Action 6-5: join channel via ircd-new
  • State 6-5: State 6-1
    [..]
42wim commented

Thanks for reporting.
Add a fix to master which makes the GUI <=> ircd in sync.
So I think everything should be working now with ircd-new ?

Seems like it, yes, thanks for the quick fix 👍

In trying to implement a fix for #237 I stumbled upon the fact that latest HEAD (c1f0356) does not join a newly created channel when creating it in the webui.

Furthermore, leaving a channel from IRC (with /part or /close) still seems to try to leave the channel twice, resulting in the #channelname: You're not on that channel notice.

42wim commented

master now joins a newly created channel.
The /part /close works fine, can't reproduce with irssi, maybe a client issue?

If you're making a PR to fix #237 make sure to make this an option in matterircd.toml which is false by default.