diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/cs_ban.c | 2 | ||||
-rw-r--r-- | src/core/cs_info.c | 4 | ||||
-rw-r--r-- | src/core/cs_kick.c | 2 | ||||
-rw-r--r-- | src/core/cs_xop.c | 2 | ||||
-rw-r--r-- | src/core/ns_identify.c | 2 | ||||
-rw-r--r-- | src/core/ns_info.c | 18 | ||||
-rw-r--r-- | src/core/ns_register.c | 2 | ||||
-rw-r--r-- | src/core/os_news.c | 2 | ||||
-rw-r--r-- | src/modules/hs_request.c | 2 |
9 files changed, 18 insertions, 18 deletions
diff --git a/src/core/cs_ban.c b/src/core/cs_ban.c index d0bbbfbb4..bacc8dff8 100644 --- a/src/core/cs_ban.c +++ b/src/core/cs_ban.c @@ -17,7 +17,7 @@ class CommandCSBan : public Command { public: - CommandCSBan(const std::string &cname) : Command(cname, 2, 3) + CommandCSBan(const ci::string &cname) : Command(cname, 2, 3) { } diff --git a/src/core/cs_info.c b/src/core/cs_info.c index 60e8ebf50..9131d1a3a 100644 --- a/src/core/cs_info.c +++ b/src/core/cs_info.c @@ -43,7 +43,7 @@ class CommandCSInfo : public Command ChannelInfo *ci; char buf[BUFSIZE]; struct tm *tm; - bool has_auspex = u->Account() && u->Account()->HasPriv("chanserv/auspex"); + bool has_auspex = u->IsIdentified() && u->Account()->HasPriv("chanserv/auspex"); int show_all = 0; time_t expt; @@ -146,7 +146,7 @@ class CommandCSInfo : public Command bool OnHelp(User *u, const ci::string &subcommand) { notice_lang(Config.s_ChanServ, u, CHAN_HELP_INFO); - if (u->Account() && u->Account()->HasPriv("chanserv/auspex")) + if (u->IsIdentified() && u->Account()->HasPriv("chanserv/auspex")) notice_lang(Config.s_ChanServ, u, CHAN_SERVADMIN_HELP_INFO); return true; diff --git a/src/core/cs_kick.c b/src/core/cs_kick.c index bce32d401..9614c8cc3 100644 --- a/src/core/cs_kick.c +++ b/src/core/cs_kick.c @@ -17,7 +17,7 @@ class CommandCSKick : public Command { public: - CommandCSKick(const std::string& cname) : Command(cname, 2, 3) + CommandCSKick(const ci::string &cname) : Command(cname, 2, 3) { } diff --git a/src/core/cs_xop.c b/src/core/cs_xop.c index 702919d8e..a6f980ad0 100644 --- a/src/core/cs_xop.c +++ b/src/core/cs_xop.c @@ -396,7 +396,7 @@ class XOPBase : public Command return MOD_CONT; } public: - XOPBase(const std::string &command) : Command(command, 2, 3) + XOPBase(const ci::string &command) : Command(command, 2, 3) { } diff --git a/src/core/ns_identify.c b/src/core/ns_identify.c index 866497fc0..b574c1207 100644 --- a/src/core/ns_identify.c +++ b/src/core/ns_identify.c @@ -17,7 +17,7 @@ class CommandNSIdentify : public Command { public: - CommandNSIdentify(const std::string &cname) : Command(cname, 1, 1) + CommandNSIdentify(const ci::string &cname) : Command(cname, 1, 1) { this->SetFlag(CFLAG_ALLOW_UNREGISTERED); } diff --git a/src/core/ns_info.c b/src/core/ns_info.c index 421d33f97..020745008 100644 --- a/src/core/ns_info.c +++ b/src/core/ns_info.c @@ -79,19 +79,19 @@ class CommandNSInfo : public Command { struct tm *tm; char buf[BUFSIZE]; - int nick_online = 0; - int show_hidden = 0; + bool nick_online = false, show_hidden = false; time_t expt; + bool has_auspex = u->IsIdentified() && u->Account()->HasPriv("nickserv/auspex"); /* Is the real owner of the nick we're looking up online? -TheShadow */ User *u2 = finduser(na->nick); if (u2 && u2->Account() == na->nc) - nick_online = 1; + nick_online = true; /* Only show hidden fields to owner and sadmins and only when the ALL * parameter is used. -TheShadow */ - if (!param.empty() && param == "ALL" && u->Account() && (na->nc == u->Account() || u->Account()->IsServicesOper())) - show_hidden = 1; + if (!param.empty() && param == "ALL" && u->Account() && (na->nc == u->Account() || has_auspex)) + show_hidden = true; notice_lang(Config.s_NickServ, u, NICK_INFO_REALNAME, na->nick, na->last_realname); @@ -100,7 +100,6 @@ class CommandNSInfo : public Command if (show_hidden || (!(na->nc->HasFlag(NI_HIDE_STATUS)))) { notice_lang(Config.s_NickServ, u, NICK_INFO_SERVICES_OPERTYPE, na->nick, na->nc->ot->GetName().c_str()); - } } @@ -111,7 +110,8 @@ class CommandNSInfo : public Command else notice_lang(Config.s_NickServ, u, NICK_INFO_ADDRESS_ONLINE_NOHOST, na->nick); } - else { + else + { if (show_hidden || !(na->nc->HasFlag(NI_HIDE_MASK))) notice_lang(Config.s_NickServ, u, NICK_INFO_ADDRESS, na->last_usermask); } @@ -178,7 +178,7 @@ class CommandNSInfo : public Command } } - if (!show_hidden && u->Account() && (na->nc == u->Account() || u->Account()->IsServicesOper())) + if (!show_hidden && u->Account() && (na->nc == u->Account() || has_auspex)) notice_lang(Config.s_NickServ, u, NICK_INFO_FOR_MORE, Config.s_NickServ, na->nick); } return MOD_CONT; @@ -187,7 +187,7 @@ class CommandNSInfo : public Command bool OnHelp(User *u, const ci::string &subcommand) { notice_help(Config.s_NickServ, u, NICK_HELP_INFO); - if (u->Account() && u->Account()->IsServicesOper()) + if (u->IsIdentified() && u->Account()->HasPriv("nickserv/auspex")) notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP_INFO); return true; diff --git a/src/core/ns_register.c b/src/core/ns_register.c index 4a9bfb6fe..9074f109f 100644 --- a/src/core/ns_register.c +++ b/src/core/ns_register.c @@ -143,7 +143,7 @@ class CommandNSConfirm : public Command } public: - CommandNSConfirm(const std::string &cmdn, int min, int max) : Command(cmdn, min, max) + CommandNSConfirm(const ci::string &cmdn, int min, int max) : Command(cmdn, min, max) { this->SetFlag(CFLAG_ALLOW_UNREGISTERED); } diff --git a/src/core/os_news.c b/src/core/os_news.c index 9daf1b443..e39db8011 100644 --- a/src/core/os_news.c +++ b/src/core/os_news.c @@ -300,7 +300,7 @@ class NewsBase : public Command return MOD_CONT; } public: - NewsBase(const std::string &newstype) : Command(newstype, 1, 2, "operserv/news") + NewsBase(const ci::string &newstype) : Command(newstype, 1, 2, "operserv/news") { } diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c index ebc46dfe8..0113817b7 100644 --- a/src/modules/hs_request.c +++ b/src/modules/hs_request.c @@ -339,7 +339,7 @@ class HSListBase : public Command return MOD_CONT; } public: - HSListBase(const std::string &cmd, int min, int max) : Command(cmd, min, max, "hostserv/set") + HSListBase(const ci::string &cmd, int min, int max) : Command(cmd, min, max, "hostserv/set") { } |