42wim/matterircd

Add regexp to JoinExclude

Closed this issue · 3 comments

TL;DR: I want to use a regexp in JoinExclude.

I was looking into adding this but it probably makes sense to add a config parameter JoinExcludeRegexps, as to be backwards-compatible with the current config.

Would this make sense? Do you agree?


Full story:

Not sure if this is a custom feature on our company MM server or not, but it seems special channels are being created on-the-fly when someone starts a group chat with multiple other users. For example, if I create a group chat with "bob" and "alice" (and my username is "baz"), a new channel will be created called "#baz-bob-alice".

When I part these channels, the server ignores my command (presumably in case alice messages me again), which means on join I am getting added to all the channels of group chats I have ever had.

The only commonality is that my username is in the channel name. So I want to solve it by doing a JoinExclude on a regexp like "#.*baz.*" (where baz is my username).

Yes, please! This is driving me crazy!

For now what I'm doing in weechat:

/set irc.server.mattermost.command "/msg mattermost login user pass; /wait 10 /allchan -current -include=*mynickname* /close"
42wim commented

JoinInclude / JoinExclude / JoinOnly now support regexps in master