summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-02-14 19:03:09 -0500
committerAdam <Adam@anope.org>2012-02-14 19:03:09 -0500
commitdb59f1a70f75d26a94df73492dc4aa462546f3d9 (patch)
tree1a6490f6782bfdf77e2822b157abf6d4a470347c /src
parenta9772cde21407c89abd161d51aff45267f87b1fb (diff)
Fixed detecting when to set +r and fixed crash on shutdown introduced by the last commit
Diffstat (limited to 'src')
-rw-r--r--src/modes.cpp4
-rw-r--r--src/users.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/modes.cpp b/src/modes.cpp
index 0b61440a5..580c9f2d7 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -473,8 +473,8 @@ void ModeManager::StackerAddInternal(BotInfo *bi, Base *Object, Mode *mode, bool
else if (Type == ST_USER)
s->bi = NULL;
- static ModePipe mpipe;
- mpipe.Notify();
+ static ModePipe *mpipe = new ModePipe();
+ mpipe->Notify();
}
/** Add a user mode to Anope
diff --git a/src/users.cpp b/src/users.cpp
index c85aadd5b..661c75671 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -371,7 +371,9 @@ void User::Identify(NickAlias *na)
this->Login(na->nc);
ircdproto->SendLogin(this);
- if (!Config->NoNicknameOwnership && na->nc == this->Account() && na->nc->HasFlag(NI_UNCONFIRMED) == false)
+
+ NickAlias *this_na = findnick(this->nick);
+ if (!Config->NoNicknameOwnership && this_na && this_na->nc == na->nc && na->nc->HasFlag(NI_UNCONFIRMED) == false)
this->SetMode(findbot(Config->NickServ), UMODE_REGISTERED);
FOREACH_MOD(I_OnNickIdentify, OnNickIdentify(this));