diff options
| author | Adam <Adam@anope.org> | 2011-08-02 05:07:59 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-08-02 05:07:59 -0400 |
| commit | 09f5591abac6b29b7c2b41b4747c2b523efa6c63 (patch) | |
| tree | 1dd1ee2488f53cd898e4b499a6bb1f09a55f1a93 /modules | |
| parent | f690cd802ecbf540732e35e44a757adb4699a48d (diff) | |
Fixed /cs clone copying channel access, fixed restricted, and fixed some compiler warnings
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/core/cs_clone.cpp | 2 | ||||
| -rw-r--r-- | modules/core/ns_info.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/cs_enforce.cpp | 26 |
3 files changed, 10 insertions, 20 deletions
diff --git a/modules/core/cs_clone.cpp b/modules/core/cs_clone.cpp index b7f8763f7..5ede6a9e4 100644 --- a/modules/core/cs_clone.cpp +++ b/modules/core/cs_clone.cpp @@ -65,7 +65,7 @@ public: if (what.empty()) { delete target_ci; - target_ci = new ChannelInfo(ci); + target_ci = new ChannelInfo(*ci); target_ci->name = target; RegisteredChannelList[target_ci->name] = target_ci; target_ci->c = findchan(target_ci->name); diff --git a/modules/core/ns_info.cpp b/modules/core/ns_info.cpp index e2c45958f..5a6d9dc0c 100644 --- a/modules/core/ns_info.cpp +++ b/modules/core/ns_info.cpp @@ -148,7 +148,7 @@ class CommandNSInfo : public Command source.Reply(" "); source.Reply(_("Displays information about the given nickname, such as\n" "the nick's owner, last seen address and time, and nick\n" - "options. If no nick is given, an you are identified,\n" + "options. If no nick is given, and you are identified,\n" "your account name is used, else your current nickname is\n" "used.")); diff --git a/modules/extra/cs_enforce.cpp b/modules/extra/cs_enforce.cpp index 5f59a4b31..26885c9b0 100644 --- a/modules/extra/cs_enforce.cpp +++ b/modules/extra/cs_enforce.cpp @@ -69,34 +69,24 @@ class CommandCSEnforce : public Command void DoRestricted(Channel *c) { - /*ChannelInfo *ci; - int16 old_nojoin_level; - Anope::string mask; - - if (!(ci = c->ci)) + ChannelInfo *ci = c->ci; + if (ci == NULL) return; - old_nojoin_level = ci->levels[CA_NOJOIN]; - if (ci->levels[CA_NOJOIN] < 0) - ci->levels[CA_NOJOIN] = 0; - for (CUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end; ) { UserContainer *uc = *it++; + User *user = uc->user; - if (check_access(uc->user, ci, CA_NOJOIN)) + if (ci->AccessFor(user).empty()) { - get_idealban(ci, uc->user, mask); - Anope::string reason = translate(uc->user, CHAN_NOT_ALLOWED_TO_JOIN); + Anope::string mask; + get_idealban(ci, user, mask); + Anope::string reason = translate(user, CHAN_NOT_ALLOWED_TO_JOIN); c->SetMode(NULL, CMODE_BAN, mask); - c->Kick(NULL, uc->user, "%s", reason.c_str()); + c->Kick(NULL, user, "%s", reason.c_str()); } } - - ci->levels[CA_NOJOIN] = old_nojoin_level; - XXX - */ - } void DoCModeR(Channel *c) |
