- if (((ucrec*)(*i))->channel != NULL)
- {
- chanrec* curr = ((ucrec*)(*i))->channel;
- if ((curr->IsModeSet('N')) && (!*user->oper))
- {
- // don't allow the nickchange, theyre on at least one channel with +N set
- // and theyre not an oper
- user->WriteServ("447 %s :Can't change nickname while on %s (+N is set)",user->nick,curr->name);
- return 1;
- }
- }
+ user->WriteNumeric(ERR_CANTCHANGENICK, "%s :Can't change nickname while on %s (+N is set)", user->nick.c_str(), curr->name.c_str());
+ return 1;