diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-13 21:26:38 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-13 21:26:38 +0000 |
commit | d3d64c27b199622c90075d6f59dd08e44acbb378 (patch) | |
tree | 68029e10dc754271235e2a4e3d04b3fb19ddd15c /src/core/cs_info.c | |
parent | 1fd66851320e239b531720c27614a5ad4c604c97 (diff) |
Complete rewrite of everything associated with modes, this breaks saving and reading mlocked modes from the databases until the new databases are implemented
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2560 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/cs_info.c')
-rw-r--r-- | src/core/cs_info.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/cs_info.c b/src/core/cs_info.c index 77e840d36..8a13b73a2 100644 --- a/src/core/cs_info.c +++ b/src/core/cs_info.c @@ -47,6 +47,7 @@ class CommandCSInfo : public Command bool has_auspex = u->nc && u->nc->HasPriv("chanserv/auspex"); int show_all = 0; time_t expt; + ChannelMode *cm; ci = cs_findchan(chan); @@ -80,10 +81,12 @@ class CommandCSInfo : public Command tm = localtime(&ci->last_used); strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm); notice_lang(s_ChanServ, u, CHAN_INFO_LAST_USED, buf); + + cm = ModeManager::FindChannelModeByName(CMODE_SECRET); // XXX: yuck. if (ci->last_topic && - (show_all || (!(ci->mlock_on & anope_get_secret_mode()) - && (!ci->c || !(ci->c->mode & anope_get_secret_mode()))))) + (show_all || (!ci->HasMLock(cm->Name, true)) + && (!ci->c || !(ci->c->HasMode(CMODE_SECRET))))) { notice_lang(s_ChanServ, u, CHAN_INFO_LAST_TOPIC, ci->last_topic); notice_lang(s_ChanServ, u, CHAN_INFO_TOPIC_SET_BY, ci->last_topic_setter); |