diff options
author | lethality <lethality@anope.org> | 2012-06-22 21:26:33 +0100 |
---|---|---|
committer | lethality <lethality@anope.org> | 2012-06-22 21:26:33 +0100 |
commit | d8a99d619f7ae301ecf188dc460b1f5c7cb791ac (patch) | |
tree | b327ce05b9b5cb598fbc829e48041d465bc2d579 /modules/commands/cs_clone.cpp | |
parent | ba53c7eb03add30acefbbc95bbd8b4b825b465b0 (diff) | |
parent | 2dec8e767a70def4b9b04a96ae4f75e4d1013038 (diff) |
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/commands/cs_clone.cpp')
-rw-r--r-- | modules/commands/cs_clone.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp index be6907b81..99c635c8f 100644 --- a/modules/commands/cs_clone.cpp +++ b/modules/commands/cs_clone.cpp @@ -28,7 +28,7 @@ public: const Anope::string &target = params[1]; Anope::string what = params.size() > 2 ? params[2] : ""; - User *u = source.u; + User *u = source.GetUser(); ChannelInfo *ci = cs_findchan(params[0]); if (ci == NULL) { @@ -36,7 +36,7 @@ public: return; } - if (!ci->AccessFor(u).HasPriv("SET")) + if (!source.AccessFor(ci).HasPriv("SET")) { source.Reply(ACCESS_DENIED); return; @@ -48,7 +48,7 @@ public: source.Reply(CHAN_X_NOT_REGISTERED, target.c_str()); return; } - if (!IsFounder(u, ci) || !IsFounder(u, target_ci)) + if (!source.IsFounder(ci) || !source.IsFounder(target_ci)) { source.Reply(ACCESS_DENIED); return; @@ -71,7 +71,7 @@ public: target_ci->c->CheckModes(); ChannelMode *cm; - if (u->FindChannel(target_ci->c) != NULL) + if (u && u->FindChannel(target_ci->c) != NULL) { /* On most ircds you do not receive the admin/owner mode till its registered */ if ((cm = ModeManager::FindChannelModeByName(CMODE_OWNER))) @@ -155,7 +155,7 @@ public: return; } - Log(LOG_COMMAND, u, this, ci) << "to clone " << (what.empty() ? "everything from it" : what) << " to " << target_ci->name; + Log(LOG_COMMAND, source, this, ci) << "to clone " << (what.empty() ? "everything from it" : what) << " to " << target_ci->name; return; } |