summaryrefslogtreecommitdiff
path: root/modules/protocol/unreal.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-03-19 18:36:03 -0400
committerAdam <Adam@anope.org>2017-03-19 18:36:03 -0400
commit2a886acbedb6b6386dbff3e591b0d4035d516b2a (patch)
tree765218b2fc476e9b1517d7f1e4aa78f57de87752 /modules/protocol/unreal.cpp
parentf237405a52f6b8efb606c5181ffe3bd75a6a6a8a (diff)
Get rid of relying on if(this) in WhoSends()
Diffstat (limited to 'modules/protocol/unreal.cpp')
-rw-r--r--modules/protocol/unreal.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp
index fd6e31875..0bca595df 100644
--- a/modules/protocol/unreal.cpp
+++ b/modules/protocol/unreal.cpp
@@ -104,10 +104,16 @@ void unreal::senders::MessageChannel::Send(Channel* c)
/* Unreal does not support updating a channels TS without actually joining a user,
* so we will join and part us now
*/
- ServiceBot *bi = c->ci->WhoSends();
+ ServiceBot *bi;
+ if (c->ci)
+ bi = c->ci->WhoSends();
+ else
+ bi = Config->GetClient("ChanServ");
+
if (!bi)
- ;
- else if (c->FindUser(bi) == NULL)
+ return;
+
+ if (c->FindUser(bi) == NULL)
{
bi->Join(c);
bi->Part(c);