summaryrefslogtreecommitdiff
path: root/modules/greet.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-10-07 21:10:47 -0400
committerAdam <Adam@anope.org>2017-10-07 21:10:47 -0400
commit2312f1fbd06ac01bb55e1d99070cde05a09a5a17 (patch)
tree69239628ed39e342650574f93d441f58d6d82b7b /modules/greet.cpp
parent286bffa2cd6a3f564334c5a4669ea3aadfb27a0a (diff)
No longer expose c->ci and ci->c
Diffstat (limited to 'modules/greet.cpp')
-rw-r--r--modules/greet.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/greet.cpp b/modules/greet.cpp
index 2c1531dc1..e4026825b 100644
--- a/modules/greet.cpp
+++ b/modules/greet.cpp
@@ -190,14 +190,15 @@ class Greet : public Module
* to has synced, or we'll get greet-floods when the net
* recovers from a netsplit. -GD
*/
- if (!c->ci || !c->ci->GetBot() || !user->server->IsSynced() || !user->Account())
+ ChanServ::Channel *ci = c->GetChannel();
+ if (!ci || !ci->GetBot() || !user->server->IsSynced() || !user->Account())
return;
Anope::string greet = user->Account()->GetGreet();
- if (c->ci->IsGreet() && !greet.empty() && c->FindUser(c->ci->GetBot()) && c->ci->AccessFor(user).HasPriv("GREET"))
+ if (ci->IsGreet() && !greet.empty() && c->FindUser(ci->GetBot()) && ci->AccessFor(user).HasPriv("GREET"))
{
- IRCD->SendPrivmsg(c->ci->GetBot(), c->name, "[{0}] {1}", user->Account()->GetDisplay(), greet);
- c->ci->GetBot()->lastmsg = Anope::CurTime;
+ IRCD->SendPrivmsg(ci->GetBot(), c->name, "[{0}] {1}", user->Account()->GetDisplay(), greet);
+ ci->GetBot()->lastmsg = Anope::CurTime;
}
}