[DONE] Porting m_chansno (in-channel snomask system)

These are old archives. They are kept for historic purposes only.

Moderators: Gottem, Supporters

Post Reply
Gottem
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

[DONE] Porting m_chansno (in-channel snomask system)

Post by Gottem »

My port of AngryWolf's module for Unreal 3.x.

Allows you to assign different channels for different types of server notifications. It works like the snomask system, but instead of receiving notifications in your private server console thingy, you will get the messages in channels. ;]

Example config block:

Code: Select all

chansno {
	msgtype privmsg;

	channel "#servermonitor" {
		server-connects; squits; oper-ups;
	};

	channel "#chanmonitor" {
		mode-changes; topics; joins; parts; kicks;
	};
};
The first directive, msgtype, can either be privmsg or notice. The first one dumps a plain message as if it were a user, the second is a channel notice.

And here's a list of types you can use:
  • mode-changes => Mode changes inside channels
  • topics => Topic changes
  • joins => Join messages
  • parts => Part messages
  • kicks => Kick messages
  • nickchanges => Nickname changes
  • connects => Local client connections
  • disconnects => Local client disconnections
  • server-connects => Local server connections
  • squits => Local server disconnections
  • unknown-users => Disconnections of unknown (local) clients
  • channel-creations => Channel creations (previously non-existent channels)
  • channel-destructions => Channel destructions (the last user parted from a channel), notify local users only (to prevent duplicates)
  • oper-ups => Successful oper-ups, displays opernick and operclass
  • spamfilter-hits => Notify whenever someone matches a spamfilter (new addition)
You may have noticed the term local a lot above. This means the underlying hook only triggers for clients connected directly to that particular server. So people on server A doing a chanmode change won't cause server B to pick up on it. In this case A will simply broadcast it so everyone gets notified. =] The exception on this are channel destructions; every server will see the event so they will only broadcast it to their local users. I added this to prevent the earlier mentioned duplicates.

Keep up to speed with the git.
If you like my modules, pls consider donating (credit card or iDEAL, use the custom job fee option in my shop) ;];]
Dragone2
Posts: 5
Joined: Sun Apr 02, 2017 2:46 pm
Location: IT

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by Dragone2 »

Dear Gottem,
Thanks for your module. I'm replying to your post because today I installed it on UnrealIRCd 4.0.11 and the IRCd crashed after some hours. The cause was this module, as reported by Syzop in my Unrealircd crash report segnalation.
Can you fix it? I paste here the configuration that I have adopted for this module:

Code: Select all

chansno {
        msgtype privmsg;

        channel "#Services" {
                mode-changes; topics; kicks; unknown-users; spamfilter-hits; channel-creations; channel-destructions;
        };
};
Gottem
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by Gottem »

I'm gonna need more information to be able to help you out. =] Refer to my instructions to see what I need you to do.
If you like my modules, pls consider donating (credit card or iDEAL, use the custom job fee option in my shop) ;];]
Dragone2
Posts: 5
Joined: Sun Apr 02, 2017 2:46 pm
Location: IT

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by Dragone2 »

Dear Gottem,
Here is the crash report generated using gdb: https://pastebin.com/qNgQQVSp
It's a segmentation fault.
I hope this will help you a lot!
Good luck,
Dragone2
rcschaff
Posts: 53
Joined: Sun Jan 15, 2017 5:06 pm

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by rcschaff »

Dragone2. You should also give him a complete list of 3rd party modules that you use. It could be a conflict between modules.
Dragone2
Posts: 5
Joined: Sun Apr 02, 2017 2:46 pm
Location: IT

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by Dragone2 »

Here is the complete list of loaded 3rd party modules

Code: Select all

loadmodule "third/m_netadmins";
loadmodule "third/m_operpasswd";
loadmodule "third/m_clones";
//loadmodule "third/m_chansno";
loadmodule "third/m_commandsno";
loadmodule "third/m_joinmute";
loadmodule "third/m_listdelay";
loadmodule "third/m_noinvite";
loadmodule "third/m_pmdelay";
loadmodule "third/m_repeatprot";
loadmodule "third/m_securequery";
Gottem
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by Gottem »

That does give me enough info to fix this, thanks. =] I've saved the log and I'll probably take a look tomorrow. ;]
If you like my modules, pls consider donating (credit card or iDEAL, use the custom job fee option in my shop) ;];]
Gottem
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by Gottem »

Alrighty then, it looks like setting +f on the target channel for notices does break stuff. The problem has multiple aspects:
  • The module sent messages in such a way that hooks/overrides were fired (such as the one for +f), which is unnecessary. Changing the way it handles sending to the snochan fixes the crash.
  • But there still seems to be a bug with a core IRCd call.
I also went ahead and revisited other modules that may suffer from the IsServer() bug. These are the other ones I've updated that you happen to be using (some of these actually needed a change, for others I did it just to make sure):
  • m_netadmins
  • m_listdelay
  • m_pmdelay
  • m_repeatprot
  • m_securequery
If you like my modules, pls consider donating (credit card or iDEAL, use the custom job fee option in my shop) ;];]
Dragone2
Posts: 5
Joined: Sun Apr 02, 2017 2:46 pm
Location: IT

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by Dragone2 »

Very nice, thanks for your quick reply :D
Gottem
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by Gottem »

No prob, lemme know if it works (or doesn't :>).
If you like my modules, pls consider donating (credit card or iDEAL, use the custom job fee option in my shop) ;];]
Dragone2
Posts: 5
Joined: Sun Apr 02, 2017 2:46 pm
Location: IT

Re: [DONE] Porting m_chansno (in-channel snomask system)

Post by Dragone2 »

Hi, I'm running it since 18:58 and still no crash, so it seems to work (I tested join / parts etc.). I updated every module, thanks again for your great work :)
Post Reply