summaryrefslogtreecommitdiff
path: root/modules/commands/cs_info.cpp
diff options
context:
space:
mode:
authorlethality <lethality@anope.org>2012-06-22 21:26:33 +0100
committerlethality <lethality@anope.org>2012-06-22 21:26:33 +0100
commitd8a99d619f7ae301ecf188dc460b1f5c7cb791ac (patch)
treeb327ce05b9b5cb598fbc829e48041d465bc2d579 /modules/commands/cs_info.cpp
parentba53c7eb03add30acefbbc95bbd8b4b825b465b0 (diff)
parent2dec8e767a70def4b9b04a96ae4f75e4d1013038 (diff)
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/commands/cs_info.cpp')
-rw-r--r--modules/commands/cs_info.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp
index cee3c8251..3c113269e 100644
--- a/modules/commands/cs_info.cpp
+++ b/modules/commands/cs_info.cpp
@@ -40,7 +40,7 @@ class CommandCSInfo : public Command
{
const Anope::string &chan = params[0];
- User *u = source.u;
+ NickCore *nc = source.nc;
ChannelInfo *ci = cs_findchan(params[0]);
if (ci == NULL)
{
@@ -48,14 +48,14 @@ class CommandCSInfo : public Command
return;
}
- bool has_auspex = u->IsIdentified() && u->HasPriv("chanserv/auspex");
+ bool has_auspex = source.HasPriv("chanserv/auspex");
bool show_all = false;
/* Should we show all fields? Only for sadmins and identified users */
- if (has_auspex || ci->AccessFor(u).HasPriv("INFO"))
+ if (has_auspex || source.AccessFor(ci).HasPriv("INFO"))
show_all = true;
- InfoFormatter info(u);
+ InfoFormatter info(nc);
source.Reply(CHAN_INFO_HEADER, chan.c_str());
if (ci->GetFounder())
@@ -82,21 +82,21 @@ class CommandCSInfo : public Command
info["Ban type"] = stringify(ci->bantype);
Anope::string optbuf;
- CheckOptStr(optbuf, CI_KEEPTOPIC, _("Topic Retention"), ci, u->Account());
- CheckOptStr(optbuf, CI_PEACE, _("Peace"), ci, u->Account());
- CheckOptStr(optbuf, CI_PRIVATE, _("Private"), ci, u->Account());
- CheckOptStr(optbuf, CI_RESTRICTED, _("Restricted Access"), ci, u->Account());
- CheckOptStr(optbuf, CI_SECURE, _("Secure"), ci, u->Account());
- CheckOptStr(optbuf, CI_SECUREFOUNDER, _("Secure Founder"), ci, u->Account());
- CheckOptStr(optbuf, CI_SECUREOPS, _("Secure Ops"), ci, u->Account());
+ CheckOptStr(optbuf, CI_KEEPTOPIC, _("Topic Retention"), ci, nc);
+ CheckOptStr(optbuf, CI_PEACE, _("Peace"), ci, nc);
+ CheckOptStr(optbuf, CI_PRIVATE, _("Private"), ci, nc);
+ CheckOptStr(optbuf, CI_RESTRICTED, _("Restricted Access"), ci, nc);
+ CheckOptStr(optbuf, CI_SECURE, _("Secure"), ci, nc);
+ CheckOptStr(optbuf, CI_SECUREFOUNDER, _("Secure Founder"), ci, nc);
+ CheckOptStr(optbuf, CI_SECUREOPS, _("Secure Ops"), ci, nc);
if (ci->HasFlag(CI_SIGNKICK))
- CheckOptStr(optbuf, CI_SIGNKICK, _("Signed kicks"), ci, u->Account());
+ CheckOptStr(optbuf, CI_SIGNKICK, _("Signed kicks"), ci, nc);
else
- CheckOptStr(optbuf, CI_SIGNKICK_LEVEL, _("Signed kicks"), ci, u->Account());
- CheckOptStr(optbuf, CI_TOPICLOCK, _("Topic Lock"), ci, u->Account());
- CheckOptStr(optbuf, CI_PERSIST, _("Persistant"), ci, u->Account());
- CheckOptStr(optbuf, CI_NO_EXPIRE, _("No expire"), ci, u->Account());
- CheckOptStr(optbuf, CI_STATS, _("Chanstats"), ci, u->Account());
+ CheckOptStr(optbuf, CI_SIGNKICK_LEVEL, _("Signed kicks"), ci, nc);
+ CheckOptStr(optbuf, CI_TOPICLOCK, _("Topic Lock"), ci, nc);
+ CheckOptStr(optbuf, CI_PERSIST, _("Persistant"), ci, nc);
+ CheckOptStr(optbuf, CI_NO_EXPIRE, _("No expire"), ci, nc);
+ CheckOptStr(optbuf, CI_STATS, _("Chanstats"), ci, nc);
info["Options"] = optbuf.empty() ? _("None") : optbuf;
info["Mode lock"] = ci->GetMLockAsString(true);