summaryrefslogtreecommitdiff
path: root/modules/protocol/unreal.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-18 00:47:34 -0400
committerAdam <Adam@anope.org>2011-08-18 00:47:34 -0400
commitff7479f437c45a44d9c81f5e1102fa5a1ffe96a6 (patch)
tree77cbe42fa07a622de90ce46795e742ed9c9f1ee9 /modules/protocol/unreal.cpp
parent487d828fa0f69d1b425f17499c6f0991b5691c08 (diff)
Fixed attaching to events in db_mysql & possibly having ChannelInfo::WhoSends return NULL if there really are *no* bots
Diffstat (limited to 'modules/protocol/unreal.cpp')
-rw-r--r--modules/protocol/unreal.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp
index 60419c481..29ad1e1cd 100644
--- a/modules/protocol/unreal.cpp
+++ b/modules/protocol/unreal.cpp
@@ -132,7 +132,7 @@ class UnrealIRCdProto : public IRCDProto
void SendModeInternal(const BotInfo *source, const Channel *dest, const Anope::string &buf)
{
- send_cmd(source->nick, "G %s %s", dest->name.c_str(), buf.c_str());
+ send_cmd(source ? source->nick : Config->ServerName, "G %s %s", dest->name.c_str(), buf.c_str());
}
void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf)
@@ -341,7 +341,9 @@ class UnrealIRCdProto : public IRCDProto
* so we will join and part us now
*/
BotInfo *bi = c->ci->WhoSends();
- if (c->FindUser(bi) == NULL)
+ if (bi == NULL)
+ ;
+ else if (c->FindUser(bi) == NULL)
{
bi->Join(c);
bi->Part(c);