summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-04 13:56:11 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-04 13:56:11 +0000
commita8b19c295d3a105005d47ef9de04412fcb14d2e8 (patch)
treeb5492c1c634b33571ec2b55626721a4b681601ce /src/users.cpp
parentfeb4dbeef44537599abca584ee4b78ab188c2ec9 (diff)
Brain, look at this please
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8817 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 7847d8281..edcc54be5 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -884,25 +884,33 @@ bool User::ForceNickChange(const char* newnick)
{
try
{
- int MOD_RESULT = 0;
+ /*
+ * XXX this makes no sense..
+ * why do we do nothing for change on users not REG_ALL?
+ * why do we trigger events twice for everyone previously (and just them now)
+ * i think the first if () needs removing totally, or? -- w00t
+ */
+ if (this->registered != REG_ALL)
+ {
+ int MOD_RESULT = 0;
- this->InvalidateCache();
+ this->InvalidateCache();
- FOREACH_RESULT(I_OnUserPreNick,OnUserPreNick(this, newnick));
+ FOREACH_RESULT(I_OnUserPreNick,OnUserPreNick(this, newnick));
- if (MOD_RESULT)
- {
- ServerInstance->stats->statsCollisions++;
- return false;
- }
+ if (MOD_RESULT)
+ {
+ ServerInstance->stats->statsCollisions++;
+ return false;
+ }
- if (ServerInstance->XLines->MatchesLine("Q",newnick))
- {
- ServerInstance->stats->statsCollisions++;
- return false;
+ if (ServerInstance->XLines->MatchesLine("Q",newnick))
+ {
+ ServerInstance->stats->statsCollisions++;
+ return false;
+ }
}
-
- if (this->registered == REG_ALL)
+ else
{
std::deque<classbase*> dummy;
Command* nickhandler = ServerInstance->Parser->GetHandler("NICK");