summaryrefslogtreecommitdiff
path: root/modules/commands/cs_xop.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-06-23 09:45:15 -0400
committerAdam <Adam@anope.org>2014-06-23 09:45:15 -0400
commitfd9bb0ea7e3c8a39f1632c2ebbdc25d0fac192a0 (patch)
tree1d68e86065e0b012aee41533d4f9b289ee0707ac /modules/commands/cs_xop.cpp
parent148b26f687ce85dc01e852a2358b03d493757ada (diff)
parent9a947fa4359c667be58ebae4634d9ac0e53d5db4 (diff)
Merge branch '2.0' into 2.1
Conflicts: cmake/Anope.cmake cmake/FindGettext.cmake include/access.h include/messages.h include/modes.h include/modules.h include/users.h modules/CMakeLists.txt modules/commands/bs_bot.cpp modules/commands/cs_access.cpp modules/commands/cs_ban.cpp modules/commands/cs_clone.cpp modules/commands/cs_flags.cpp modules/commands/cs_info.cpp modules/commands/cs_list.cpp modules/commands/cs_log.cpp modules/commands/cs_mode.cpp modules/commands/cs_status.cpp modules/commands/cs_suspend.cpp modules/commands/cs_updown.cpp modules/commands/cs_xop.cpp modules/commands/ms_check.cpp modules/commands/ns_access.cpp modules/commands/ns_cert.cpp modules/commands/ns_group.cpp modules/commands/ns_register.cpp modules/commands/ns_set.cpp modules/commands/ns_suspend.cpp modules/commands/os_session.cpp modules/commands/os_svs.cpp modules/extra/m_ldap_authentication.cpp modules/extra/m_regex_pcre.cpp modules/extra/m_sql_authentication.cpp modules/extra/stats/m_chanstats.cpp modules/protocol/bahamut.cpp modules/protocol/hybrid.cpp modules/protocol/inspircd12.cpp modules/protocol/inspircd20.cpp modules/protocol/unreal.cpp modules/pseudoclients/chanserv.cpp modules/pseudoclients/chanserv/channel.cpp modules/pseudoclients/nickserv/nickserv.cpp modules/webcpanel/pages/chanserv/access.cpp src/access.cpp src/bots.cpp src/channels.cpp src/language.cpp src/modes.cpp src/modulemanager.cpp src/process.cpp src/users.cpp src/version.sh
Diffstat (limited to 'modules/commands/cs_xop.cpp')
-rw-r--r--modules/commands/cs_xop.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index 53730cb57..c3b43cd3e 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -182,11 +182,11 @@ class CommandCSXOP : public Command
{
const ChanServ::ChanAccess *a = ci->GetAccess(i);
- if (a->mask.equals_ci(mask))
+ if (a->Mask().equals_ci(mask))
{
if ((!highest || *a >= *highest) && !access.founder && !source.HasPriv("chanserv/access/modify"))
{
- source.Reply(_("Access denied. You do not have enough privileges on \002{0}\002 to lower the access of \002{1}\002."), ci->name, a->mask);
+ source.Reply(_("Access denied. You do not have enough privileges on \002{0}\002 to lower the access of \002{1}\002."), ci->name, a->Mask());
return;
}
@@ -206,8 +206,7 @@ class CommandCSXOP : public Command
if (!provider)
return;
XOPChanAccess *acc = anope_dynamic_static_cast<XOPChanAccess *>(provider->Create());
- acc->ci = ci;
- acc->mask = mask;
+ acc->SetMask(mask, ci);
acc->creator = source.GetNick();
acc->type = source.command.upper();
acc->last_seen = 0;
@@ -217,7 +216,7 @@ class CommandCSXOP : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask;
Event::OnAccessAdd(&Event::AccessAdd::OnAccessAdd, ci, source, acc);
- source.Reply(_("\002%s\002 added to %s %s list."), acc->mask.c_str(), ci->name.c_str(), source.command.c_str());
+ source.Reply(_("\002%s\002 added to %s %s list."), acc->Mask(), ci->name.c_str(), source.command.c_str());
}
void DoDel(CommandSource &source, ChanServ::Channel *ci, const std::vector<Anope::string> &params)
@@ -320,9 +319,9 @@ class CommandCSXOP : public Command
++deleted;
if (!nicks.empty())
- nicks += ", " + caccess->mask;
+ nicks += ", " + caccess->Mask();
else
- nicks = caccess->mask;
+ nicks = caccess->Mask();
ci->EraseAccess(number - 1);
Event::OnAccessDel(&Event::AccessDel::OnAccessDel, ci, source, caccess);
@@ -341,11 +340,11 @@ class CommandCSXOP : public Command
if (a->provider->name != "access/xop" || source.command.upper() != a->AccessSerialize())
continue;
- if (a->mask.equals_ci(mask))
+ if (a->Mask().equals_ci(mask))
{
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << a->mask;
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to delete " << a->Mask();
- source.Reply(_("\002%s\002 deleted from %s %s list."), a->mask.c_str(), ci->name.c_str(), source.command.c_str());
+ source.Reply(_("\002%s\002 deleted from %s %s list."), a->Mask().c_str(), ci->name.c_str(), source.command.c_str());
ci->EraseAccess(i);
Event::OnAccessDel(&Event::AccessDel::OnAccessDel, ci, source, a);
@@ -405,7 +404,7 @@ class CommandCSXOP : public Command
ListFormatter::ListEntry entry;
entry["Number"] = stringify(Number);
- entry["Mask"] = a->mask;
+ entry["Mask"] = a->Mask();
this->list.AddEntry(entry);
}
} nl_list(list, ci, nick, source);
@@ -419,12 +418,12 @@ class CommandCSXOP : public Command
if (a->provider->name != "access/xop" || source.command.upper() != a->AccessSerialize())
continue;
- else if (!nick.empty() && !Anope::Match(a->mask, nick))
+ else if (!nick.empty() && !Anope::Match(a->Mask(), nick))
continue;
ListFormatter::ListEntry entry;
entry["Number"] = stringify(i + 1);
- entry["Mask"] = a->mask;
+ entry["Mask"] = a->Mask();
list.AddEntry(entry);
}
}