diff options
author | Adam <Adam@anope.org> | 2011-05-06 18:02:53 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-05-16 04:10:18 -0400 |
commit | fd4b52ec385167794eaadb18ee635bef757728ee (patch) | |
tree | 49d3e835b072a10887309d8d9155982a5aa61ed0 /modules/core/cs_info.cpp | |
parent | b59602abf85d522bb2f188be70b6cb7c9556a856 (diff) |
Added os_forbid
Diffstat (limited to 'modules/core/cs_info.cpp')
-rw-r--r-- | modules/core/cs_info.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/modules/core/cs_info.cpp b/modules/core/cs_info.cpp index 71a8b132f..ba26a8c77 100644 --- a/modules/core/cs_info.cpp +++ b/modules/core/cs_info.cpp @@ -32,7 +32,6 @@ class CommandCSInfo : public Command { this->SetFlag(CFLAG_ALLOW_UNREGISTERED); this->SetFlag(CFLAG_ALLOW_SUSPENDED); - this->SetFlag(CFLAG_ALLOW_FORBIDDEN); this->SetDesc(_("Lists information about the named registered channel")); } @@ -46,16 +45,6 @@ class CommandCSInfo : public Command bool has_auspex = u->IsIdentified() && u->HasPriv("chanserv/auspex"); bool show_all = false; - if (ci->HasFlag(CI_FORBIDDEN)) - { - if (u->HasMode(UMODE_OPER) && !ci->forbidby.empty()) - source.Reply(_(CHAN_X_FORBIDDEN_OPER), chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : _(NO_REASON)); - else - source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str()); - - return MOD_CONT; - } - /* Should we show all fields? Only for sadmins and identified users */ if (has_auspex || check_access(u, ci, CA_INFO)) show_all = true; @@ -106,7 +95,12 @@ class CommandCSInfo : public Command source.Reply(_(" Expires on: %s"), do_strftime(ci->last_used + Config->CSExpire).c_str()); } if (ci->HasFlag(CI_SUSPENDED)) - source.Reply(_(" Suspended: [%s] %s"), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : _(NO_REASON)); + { + Anope::string by, reason; + ci->GetExtRegular("suspend_by", by); + ci->GetExtRegular("suspend_reason", reason); + source.Reply(_(" Suspended: [%s] %s"), by.c_str(), !reason.empty() ? reason.c_str() : _(NO_REASON)); + } FOREACH_MOD(I_OnChanInfo, OnChanInfo(source, ci, show_all)); |