nickserv identify not working #239

Closed
opened 2026-10-05 04:07:08 +02:00 by adam · 12 comments
Owner

i wondered why the nickserv auto identify didn't work..
i found the answer in the code..

void HandleMessage(CNick& Nick, const CString& sMessage) {
CString sNickServName = (!GetNV("NickServName").empty()) ? GetNV("NickServName") : "NickServ";
if (!GetNV("Password").empty()
&& Nick.GetNick().Equals(sNickServName)
&& (sMessage.find("msg") != CString::npos
|| sMessage.find("authenticate") != CString::npos
|| sMessage.find("choose a different nickname") != CString::npos
|| sMessage.find("If this is your nick, type") != CString::npos
|| sMessage.find("type /NickServ IDENTIFY password") != CString::npos)
&& sMessage.AsUpper().find("IDENTIFY") != CString::npos
&& sMessage.find("help") == CString::npos) {
MCString msValues;
msValues["password"] = GetNV("Password");
PutIRC(CString::NamedFormat(GetNV("IdentifyCmd"), msValues));
}
}

so the server which i'm on is not a standard or i don't know but the trigger msg is the following:

This nickname is registered and protected. If it is your
nick, type /msg NickServ IDENTIFY password. Otherwise,
please choose a different nick.

if you can see the patterns are not match for these lines.. :(

i wondered why the nickserv auto identify didn't work.. i found the answer in the code.. void HandleMessage(CNick& Nick, const CString& sMessage) { CString sNickServName = (!GetNV("NickServName").empty()) ? GetNV("NickServName") : "NickServ"; if (!GetNV("Password").empty() && Nick.GetNick().Equals(sNickServName) && (sMessage.find("msg") != CString::npos || sMessage.find("authenticate") != CString::npos || sMessage.find("choose a different nickname") != CString::npos || sMessage.find("If this is your nick, type") != CString::npos || sMessage.find("type /NickServ IDENTIFY password") != CString::npos) && sMessage.AsUpper().find("IDENTIFY") != CString::npos && sMessage.find("help") == CString::npos) { MCString msValues; msValues["password"] = GetNV("Password"); PutIRC(CString::NamedFormat(GetNV("IdentifyCmd"), msValues)); } } so the server which i'm on is not a standard or i don't know but the trigger msg is the following: This nickname is registered and protected. If it is your nick, type /msg NickServ IDENTIFY password. Otherwise, please choose a different nick. if you can see the patterns are not match for these lines.. :( <!-- github-sync-id:14814540 -->
adam closed this issue 2026-10-05 04:07:08 +02:00
Author
Owner

What network is this occurring on?

What network is this occurring on? <!-- github-comment-id:18520017 -->
Author
Owner

We really have to start to collect the various messages from nickserv that we are meant to react to. There was once a problem were some services used a really weird syntax and znc's "/msg nickserv identify foo" was replied to with some help messages, which triggered znc sending the password again etc...

We really have to start to collect the various messages from nickserv that we are meant to react to. There was once a problem were some services used a really weird syntax and znc's "/msg nickserv identify foo" was replied to with some help messages, which triggered znc sending the password again etc... <!-- github-comment-id:18543334 -->
Author
Owner

RFC1459 does say:

The NOTICE message is used similarly to PRIVMSG. The difference between NOTICE and PRIVMSG is that automatic replies must never be sent in response to a NOTICE message. This rule applies to servers too - they must not send any error reply back to the client on receipt of a notice. The object of this rule is to avoid loops between a client automatically sending something in response to something it received. This is typically used by automatons (clients with either an AI or other interactive program controlling their actions) which are always seen to be replying lest they end up in a loop with another automaton.

I don't think we should have a module which breaches the RFC.

RFC1459 does say: > The NOTICE message is used similarly to PRIVMSG. The difference between NOTICE and PRIVMSG is that automatic replies must never be sent in response to a NOTICE message. This rule applies to servers too - they must not send any error reply back to the client on receipt of a notice. The object of this rule is to avoid loops between a client automatically sending something in response to something it received. This is typically used by automatons (clients with either an AI or other interactive program controlling their actions) which are always seen to be replying lest they end up in a loop with another automaton. I don't think we should have a module which breaches the RFC. <!-- github-comment-id:18555979 -->
Author
Owner

ineedalifetoday: ircline.org
i agree with psychon.

ineedalifetoday: ircline.org i agree with psychon. <!-- github-comment-id:18556174 -->
Author
Owner

@kylef that would mean dropping nickserv module at all (in favor of sasl?)

@kylef that would mean dropping nickserv module at all (in favor of sasl?) <!-- github-comment-id:18565161 -->
Author
Owner

now i use perform which does not encrypt the pw. :( so i think ns module would be awesome but the developer should really gather the infos from the users.

now i use perform which does not encrypt the pw. :( so i think ns module would be awesome but the developer should really gather the infos from the users. <!-- github-comment-id:18573971 -->
Author
Owner

AHHH, closed by mistake. :|

AHHH, closed by mistake. :| <!-- github-comment-id:18573998 -->
Author
Owner

Services that network is using are one of the two major IRC services (Anope / Atheme). see " /quote version services.* ".

:services.ircline.org 351 KindOne Anope-1.8.7 (3089) services.ircline.org :UnrealIRCd 3.2.x - M (enc_none) -- build #1, compiled Feb 24 2013 22:51:38]

Now your issue:

  • Networks default language seems to be Spanish. So, I set it to English. " /msg NickServ set Language 1 "
  • Network is not using the NickServ nick, its using "N", but it replied to /msg NickServ help. So set the nickserv module to use "N" " /msg *nickserv SetNSName N " -- this is most likely the main reason as to why it is failing for you. -- NOTE - This will only work in git/nightly not 1.0 -- 73f794c455
  • Reconnect and the nickserv module will work for you (assuming you set your language to English) (and are running git/nightly)

You forgot to mention that the network is not using 'NickServ' as the nick, its using 'N'.
[16:05:12] -N- This nickname is registered and protected. If it is your
[16:05:12] -N- nick, type /msg N IDENTIFY password. Otherwise,
[16:05:12] -N- please choose a different nick.
[16:05:12] -N- Password accepted - you are now recognized.

Services that network is using are one of the two major IRC services (Anope / Atheme). see " /quote version services.\* ". :services.ircline.org 351 KindOne Anope-1.8.7 (3089) services.ircline.org :UnrealIRCd 3.2.x - M (enc_none) -- build #1, compiled Feb 24 2013 22:51:38] Now your issue: - Networks default language seems to be Spanish. So, I set it to English. " /msg NickServ set Language 1 " - Network is not using the NickServ nick, its using "N", but it replied to /msg NickServ help. So set the nickserv module to use "N" " /msg *nickserv SetNSName N " -- this is most likely the main reason as to why it is failing for you. -- NOTE - This will only work in git/nightly not 1.0 -- 73f794c455c905be5529587357d65b6e501a0582 - Reconnect and the nickserv module will work for you (assuming you set your language to English) (and are running git/nightly) You forgot to mention that the network is not using 'NickServ' as the nick, its using 'N'. [16:05:12] -N- This nickname is registered and protected. If it is your [16:05:12] -N- nick, type /msg N IDENTIFY password. Otherwise, [16:05:12] -N- please choose a different nick. [16:05:12] -N- Password accepted - you are now recognized. <!-- github-comment-id:18576875 -->
Author
Owner

ineedalifetoday: will check. thx. but i would say we should upgrade the matches for the identify to match in all networks.. (or try to.)

ineedalifetoday: will check. thx. but i would say we should upgrade the matches for the identify to match in all networks.. (or try to.) <!-- github-comment-id:18577414 -->
Author
Owner

@Lord255 nickserv module doesn't encrypt pwd either. It just hides it. But it's stored in plain text on file system.

@Lord255 nickserv module doesn't encrypt pwd either. It just hides it. But it's stored in plain text on file system. <!-- github-comment-id:18594422 -->
Author
Owner

DarthGandalf: right, my mistake. i thought is the one but it's for the account. but either way, i can't see the nickserv pass in the conf file.

btw: in 0.98 it was worked fine. on my new server i intalled 1.0 and that's the one which has the "error".

DarthGandalf: right, my mistake. i thought <Pass> is the one but it's for the account. but either way, i can't see the nickserv pass in the conf file. btw: in 0.98 it was worked fine. on my new server i intalled 1.0 and that's the one which has the "error". <!-- github-comment-id:18605993 -->
Author
Owner

It looks like this is fixed, but not closed with the commit.

It looks like this is fixed, but not closed with the commit. <!-- github-comment-id:138910831 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#239