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

Need a module converted from 3.2.x to UnrealIRCd 4? Or looking for a certain module? Ask here.

Moderators: Gottem, Supporters

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

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

Post by Gottem » Mon Jan 16, 2017 8:33 pm

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 (through PayPal) or becoming a monthly Patron ;];]

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 » Sun Apr 02, 2017 2:57 pm

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
Posts: 180
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

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

Post by Gottem » Sun Apr 02, 2017 5:56 pm

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 (through PayPal) or becoming a monthly Patron ;];]

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 » Tue Apr 04, 2017 1:38 pm

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 » Tue Apr 04, 2017 3:56 pm

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 » Tue Apr 04, 2017 4:03 pm

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
Posts: 180
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

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

Post by Gottem » Tue Apr 04, 2017 7:23 pm

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 (through PayPal) or becoming a monthly Patron ;];]

Gottem
Posts: 180
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

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

Post by Gottem » Wed Apr 05, 2017 4:07 pm

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 (through PayPal) or becoming a monthly Patron ;];]

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 » Wed Apr 05, 2017 4:47 pm

Very nice, thanks for your quick reply :D

Gottem
Posts: 180
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

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

Post by Gottem » Wed Apr 05, 2017 5:58 pm

No prob, lemme know if it works (or doesn't :>).
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

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 » Wed Apr 05, 2017 6:28 pm

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