Nickserv module #1055

Open
opened 2026-10-05 05:00:48 +02:00 by adam · 5 comments
Owner

For unexpected matters, I've been forced to move to other irc networks, based on unread.. inspircd..

Each nickserv has it's own text telling user that the nick is registered and it will be changed if there is no password provided.

The znc's nickserv module works for generally most of cases by catching the nickserv message and matching phrases. We can see this by reading nickserv.cpp.

Now, one especially network has it's nickserv text changed and znc's nickserv module is basically useless.

Playing with *nickserv, does not solve this problem because we are not able to set a specific nickserv message. I am forced to use the *perform and use "nickserv identify password" in order to identify against nickserv each time the znc account connects to the irc.

I have no idea why znc doesn't allow users to specify the nickserv magic message. Messing up with nickserv.cpp is a big no-no for many users. Nickserv.cpp can break if not properly coded.

To me, the nickserv module needs to be rewritten.

So can we have the built-in messages from nickserv.cpp removed?
Can we specify specific nickserv messages?

The view commends would be like:

| match | identify command


1 | If you do not change within 1 minute,* | nickserv identify {password}
2 | This nickname is registered. Please choose a different nickname,* | nickserv identify {nick} {password}

etc

For unexpected matters, I've been forced to move to other irc networks, based on unread.. inspircd.. Each nickserv has it's own text telling user that the nick is registered and it will be changed if there is no password provided. The znc's nickserv module works for generally most of cases by catching the nickserv message and matching phrases. We can see this by reading nickserv.cpp. Now, one especially network has it's nickserv text changed and znc's nickserv module is basically useless. Playing with *nickserv, does not solve this problem because we are not able to set a specific nickserv message. I am forced to use the *perform and use "nickserv identify password" in order to identify against nickserv each time the znc account connects to the irc. I have no idea why znc doesn't allow users to specify the nickserv magic message. Messing up with nickserv.cpp is a big no-no for many users. Nickserv.cpp can break if not properly coded. To me, the nickserv module needs to be rewritten. So can we have the built-in messages from nickserv.cpp removed? Can we specify specific nickserv messages? The view commends would be like: ------------------------------------------------------------------------------------------- # | match | identify command ------------------------------------------------------------------------------------- 1 | If you do not change within 1 minute,* | nickserv identify {password} 2 | This nickname is registered. Please choose a different nickname,* | nickserv identify {nick} {password} etc <!-- github-sync-id:2842506295 -->
Author
Owner

If the network in question supports SASL (many do), use that instead. It's standard auth protocol and doesn't require matching any custom messages.

If the network in question supports SASL (many do), use that instead. It's standard auth protocol and doesn't require matching any custom messages. <!-- github-comment-id:2648112888 -->
Author
Owner

I can confirm the issue.

Raw log from HexChat:

<< znc *nickserv set <password>
>> :*nickserv!nickserv@znc.in PRIVMSG testuser :Password set

<< znc disconnect
>> :*status!status@znc.in PRIVMSG testuser :Disconnected from IRC. Use 'connect' to reconnect.
>> @time=2025-02-10T15:20:57.561Z :irc.znc.in CAP testuser DEL :account-notify
>> @time=2025-02-10T15:20:57.561Z :irc.znc.in CAP testuser DEL :account-tag
>> @time=2025-02-10T15:20:57.561Z :irc.znc.in CAP testuser DEL :away-notify
>> @time=2025-02-10T15:20:57.561Z :irc.znc.in CAP testuser DEL :extended-join
>> @time=2025-02-10T15:20:57.561Z :testuser!testuser@9A77601C.BF708BDB.212AA93E.IP MODE testuser :-Iirwxz

<< znc connect
>> :*status!status@znc.in PRIVMSG testuser :Connecting to irc.ptirc.org...
>> @time=2025-02-10T15:21:39.925Z :testuser MODE testuser :+iwxzI
>> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :This nickname is registered and protected.  If it is your
>> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :nick, type /NS IDENTIFY password.  Otherwise,
>> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :please choose a different nick.
>> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :If you do not change within 1 minute, I will change your nick.

>> @time=2025-02-10T15:22:40.703Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :Your nickname is now being changed to Guest-3249
>> @time=2025-02-10T15:22:40.782Z :testuser NICK :Guest-3249

This is weird, because https://github.com/znc/znc/blob/master/modules/nickserv.cpp#L111 definitely matches >> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :please choose a different nick.

I can confirm the issue. Raw log from HexChat: ``` << znc *nickserv set <password> >> :*nickserv!nickserv@znc.in PRIVMSG testuser :Password set << znc disconnect >> :*status!status@znc.in PRIVMSG testuser :Disconnected from IRC. Use 'connect' to reconnect. >> @time=2025-02-10T15:20:57.561Z :irc.znc.in CAP testuser DEL :account-notify >> @time=2025-02-10T15:20:57.561Z :irc.znc.in CAP testuser DEL :account-tag >> @time=2025-02-10T15:20:57.561Z :irc.znc.in CAP testuser DEL :away-notify >> @time=2025-02-10T15:20:57.561Z :irc.znc.in CAP testuser DEL :extended-join >> @time=2025-02-10T15:20:57.561Z :testuser!testuser@9A77601C.BF708BDB.212AA93E.IP MODE testuser :-Iirwxz << znc connect >> :*status!status@znc.in PRIVMSG testuser :Connecting to irc.ptirc.org... >> @time=2025-02-10T15:21:39.925Z :testuser MODE testuser :+iwxzI >> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :This nickname is registered and protected. If it is your >> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :nick, type /NS IDENTIFY password. Otherwise, >> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :please choose a different nick. >> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :If you do not change within 1 minute, I will change your nick. >> @time=2025-02-10T15:22:40.703Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :Your nickname is now being changed to Guest-3249 >> @time=2025-02-10T15:22:40.782Z :testuser NICK :Guest-3249 ``` This is weird, because https://github.com/znc/znc/blob/master/modules/nickserv.cpp#L111 definitely matches `>> @time=2025-02-10T15:21:39.769Z :NickServ!NickServ@services.ptirc.org NOTICE testuser :please choose a different nick.` <!-- github-comment-id:2648385582 -->
Author
Owner

@TehPeGaSuS ptirc.org supports SASL, so unload the nickserv module, and load and configure the sasl module.

@TehPeGaSuS ptirc.org supports SASL, so unload the nickserv module, and load and configure the sasl module. <!-- github-comment-id:2648410928 -->
Author
Owner

@DarthGandalf, yes, I know (I own the network).

Stil, the nickserv module should have been triggered, right?

I mean, the NickServ message definitely has a match on the line I specified above.

@DarthGandalf, yes, I know (I own the network). Stil, the nickserv module should have been triggered, right? I mean, the NickServ message definitely has a match on the line I specified above. <!-- github-comment-id:2648416732 -->
Author
Owner

For that you should check not the Hexchat logs, but what's between ZNC and server, e.g. via znc -D

Still, not too interested in debugging and improving the nickserv module, as SASL works.

For that you should check not the Hexchat logs, but what's between ZNC and server, e.g. via `znc -D` Still, not too interested in debugging and improving the nickserv module, as SASL works. <!-- github-comment-id:2648476301 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#1055