summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules.cpp1
-rw-r--r--src/modules/m_spanningtree.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 0f838032a..b3b2daab3 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -620,6 +620,7 @@ bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message)
{
log(DEBUG,"PseudoToUser");
zombie->fd = alive->fd;
+ FOREACH_MOD(I_OnUserQuit,OnUserQuit(alive,message));
alive->fd = FD_MAGIC_NUMBER;
alive->FlushWriteBuf();
alive->ClearBuffer();
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index f2836534c..e210263ac 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1569,7 +1569,7 @@ class TreeSocket : public InspSocket
if (params.size() == 1)
{
userrec* x = Srv->FindNick(params[0]);
- if (x->fd > -1)
+ if ((x) && (x->fd > -1))
{
userrec* x = Srv->FindNick(params[0]);
log(DEBUG,"Got IDLE");
@@ -1595,7 +1595,7 @@ class TreeSocket : public InspSocket
{
std::string who_did_the_whois = params[0];
userrec* who_to_send_to = Srv->FindNick(who_did_the_whois);
- if (who_to_send_to->fd > -1)
+ if ((who_to_send_to) && (who_to_send_to->fd > -1))
{
log(DEBUG,"Got final IDLE");
// an incoming reply to a whois we sent out