summaryrefslogtreecommitdiff
path: root/src/core/cs_info.c
diff options
context:
space:
mode:
authorAdam <Adam@drink-coca-cola.info>2010-05-06 14:42:21 -0400
committerAdam <Adam@anope.org>2010-06-18 20:58:55 -0400
commita93be9ff1c417d73015fd53a9ee778ea2a642328 (patch)
treea87c2cd3c4577ad0b9d7d9b4d70505a8648e851e /src/core/cs_info.c
parent5d437d9ab5988c36def1a78c7d3d3077eb6804e3 (diff)
Added two events called in ns_info and cs_info that allows modules to easially add info output. Made os_info use this
Diffstat (limited to 'src/core/cs_info.c')
-rw-r--r--src/core/cs_info.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/cs_info.c b/src/core/cs_info.c
index 9131d1a3a..b3e7a1077 100644
--- a/src/core/cs_info.c
+++ b/src/core/cs_info.c
@@ -44,7 +44,7 @@ class CommandCSInfo : public Command
char buf[BUFSIZE];
struct tm *tm;
bool has_auspex = u->IsIdentified() && u->Account()->HasPriv("chanserv/auspex");
- int show_all = 0;
+ bool show_all = false;
time_t expt;
ci = cs_findchan(chan);
@@ -64,7 +64,7 @@ class CommandCSInfo : public Command
/* Should we show all fields? Only for sadmins and identified users */
if (!param.empty() && param == "ALL" && (check_access(u, ci, CA_INFO) || has_auspex))
- show_all = 1;
+ show_all = true;
notice_lang(Config.s_ChanServ, u, CHAN_INFO_HEADER, chan);
notice_lang(Config.s_ChanServ, u, CHAN_INFO_NO_FOUNDER, ci->founder->display);
@@ -138,6 +138,8 @@ class CommandCSInfo : public Command
notice_lang(Config.s_ChanServ, u, CHAN_X_SUSPENDED, ci->forbidby, (ci->forbidreason ? ci->forbidreason : getstring(u, NO_REASON)));
}
+ FOREACH_MOD(I_OnChanInfo, OnChanInfo(u, ci, show_all));
+
if (!show_all && (check_access(u, ci, CA_INFO) || has_auspex))
notice_lang(Config.s_ChanServ, u, NICK_INFO_FOR_MORE, Config.s_ChanServ, ci->name.c_str());
return MOD_CONT;