summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-15 01:33:25 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-15 01:33:25 +0000
commit1acecec2792dc20260546a27be079db4818e9491 (patch)
treee2683894e2b4af7d43849ae9335c9db3757a6d2c /src
parentd783bb290f3123b51e66678c0027604cf2e18abd (diff)
Allow forced nick change to bypass Q:Lines
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12460 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_sanick.cpp8
-rw-r--r--src/users.cpp2
2 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index fc1d15293..199513efa 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -57,15 +57,13 @@ class CommandSanick : public Command
{
std::string oldnick = user->nick;
std::string newnick = target->nick;
- if (target->ForceNickChange(parameters[1].c_str()))
+ if (target->ChangeNick(parameters[1], true))
{
- ServerInstance->SNO->WriteToSnoMask('a', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
- ServerInstance->PI->SendSNONotice("A", oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
+ ServerInstance->SNO->WriteGlobalSno('a', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
}
else
{
- ServerInstance->SNO->WriteToSnoMask('a', oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
- ServerInstance->PI->SendSNONotice("A", oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
+ ServerInstance->SNO->WriteGlobalSno('a', oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
}
}
diff --git a/src/users.cpp b/src/users.cpp
index 89a064b1f..0f6cba2da 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -861,7 +861,7 @@ bool User::ChangeNick(const std::string& newnick, bool force)
* Also don't check Q:Lines for remote nickchanges, they should have our Q:Lines anyway to enforce themselves.
* -- w00t
*/
- if (IS_LOCAL(this))
+ if (IS_LOCAL(this) && !force)
{
XLine* mq = ServerInstance->XLines->MatchesLine("Q",newnick);
if (mq)