mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Send RPL_SAVENICK from irc2 when renaming a user to their UUID.
This commit is contained in:
parent
aa0221d87c
commit
96befc58f0
@ -49,6 +49,7 @@ enum
|
||||
RPL_MAP = 15, // ircu
|
||||
RPL_ENDMAP = 17, // ircu
|
||||
RPL_MAPUSERS = 18, // insp-specific
|
||||
RPL_SAVENICK = 43, // From irc2.
|
||||
|
||||
RPL_STATS = 210, // From aircd.
|
||||
RPL_UMODEIS = 221,
|
||||
|
@ -83,7 +83,10 @@ class ModuleCodepage
|
||||
{
|
||||
LocalUser* user = *iter;
|
||||
if (user->nick != user->uuid && !ServerInstance->IsNick(user->nick))
|
||||
{
|
||||
user->WriteNumeric(RPL_SAVENICK, user->uuid, "Your nickname is no longer valid.");
|
||||
user->ChangeNick(user->uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,7 @@ CmdResult CommandSVSNick::Handle(User* user, Params& parameters)
|
||||
if (!u->ChangeNick(nick, NickTS))
|
||||
{
|
||||
// Changing to 'nick' failed (it may already be in use), change to the uuid
|
||||
u->WriteNumeric(RPL_SAVENICK, u->uuid, "Your nickname is in use by an older user on a new server.");
|
||||
u->ChangeNick(u->uuid);
|
||||
}
|
||||
}
|
||||
|
@ -688,6 +688,7 @@ bool QLine::Matches(User *u)
|
||||
void QLine::Apply(User* u)
|
||||
{
|
||||
/* Force to uuid on apply of Q-line, no need to disconnect anymore :) */
|
||||
u->WriteNumeric(RPL_SAVENICK, u->uuid, "Your nickname has been Q-lined.");
|
||||
u->ChangeNick(u->uuid);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user