diff options
author | Adam <Adam@anope.org> | 2011-03-29 13:43:22 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-03-29 13:43:22 -0400 |
commit | 685e99be0241e97665cefe8730bb4aa53647aeb2 (patch) | |
tree | dc62fa62a4af26a360a4aa661d81514e9441aa0c | |
parent | b14b7bd55ec9b26ca7787060022b63fc3c001196 (diff) |
Fixed some left over useprivmsg problems and fixed some compiler warnings.
-rw-r--r-- | include/regchannel.h | 8 | ||||
-rw-r--r-- | modules/core/bs_kick.cpp | 4 | ||||
-rw-r--r-- | modules/core/cs_help.cpp | 2 | ||||
-rw-r--r-- | modules/core/cs_xop.cpp | 21 | ||||
-rw-r--r-- | modules/core/ns_recover.cpp | 3 | ||||
-rw-r--r-- | src/regchannel.cpp | 38 |
6 files changed, 39 insertions, 37 deletions
diff --git a/include/regchannel.h b/include/regchannel.h index 80277803c..f2eaf5952 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -204,11 +204,11 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, /** Erase an entry from the channel access list * - * @param access The access to remove + * @param taccess The access to remove * * Clears the memory used by the given access entry and removes it from the vector. */ - void EraseAccess(ChanAccess *access); + void EraseAccess(ChanAccess *taccess); /** Clear the entire channel access list * @@ -327,11 +327,11 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, std::pair<ModeList::iterator, ModeList::iterator> GetModeList(ChannelModeName Name); /** Get details for a specific mlock - * @param name The mode name + * @param mname The mode name * @param An optional param to match with * @return The MLock, if any */ - ModeLock *GetMLock(ChannelModeName name, const Anope::string ¶m = ""); + ModeLock *GetMLock(ChannelModeName mname, const Anope::string ¶m = ""); /** Check whether a user is permitted to be on this channel * @param u The user diff --git a/modules/core/bs_kick.cpp b/modules/core/bs_kick.cpp index 3e1902445..82882b480 100644 --- a/modules/core/bs_kick.cpp +++ b/modules/core/bs_kick.cpp @@ -479,7 +479,7 @@ class CommandBSKick : public Command "on a specific option.\n" " \n" "Note: access to this command is controlled by the\n" - "level SET."), Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str()); + "level SET."), Config->UseStrictPrivMsgString.c_str(), BotServ->nick.c_str()); else if (subcommand.equals_ci("BADWORDS")) source.Reply(_("Syntax: \002KICK \037#channel\037 BADWORDS {\037ON|OFF\037} [\037ttb\037]\002\n" "Sets the bad words kicker on or off. When enabled, this\n" @@ -490,7 +490,7 @@ class CommandBSKick : public Command "more information.\n" "ttb is the number of times a user can be kicked\n" "before it get banned. Don't give ttb to disable\n" - "the ban system once activated."), Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str()); + "the ban system once activated."), Config->UseStrictPrivMsgString.c_str(), BotServ->nick.c_str()); else if (subcommand.equals_ci("BOLDS")) source.Reply(_("Syntax: \002KICK \037channel\037 BOLDS {\037ON|OFF\037} [\037ttb\037]\002\n" "Sets the bolds kicker on or off. When enabled, this\n" diff --git a/modules/core/cs_help.cpp b/modules/core/cs_help.cpp index a13bf7829..be2436d29 100644 --- a/modules/core/cs_help.cpp +++ b/modules/core/cs_help.cpp @@ -40,7 +40,7 @@ class CommandCSHelp : public Command "commands are listed below; to use them, type\n" "\002%s%s \037command\037\002. For more information on a\n" "specific command, type \002%s%s HELP \037command\037\002."), - ChanServ->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str(), + ChanServ->nick.c_str(), ChanServ->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str(), ChanServ->nick.c_str()); for (CommandMap::const_iterator it = ChanServ->Commands.begin(); it != ChanServ->Commands.end(); ++it) if (!Config->HidePrivilegedCommands || it->second->permission.empty() || u->HasCommand(it->second->permission)) diff --git a/modules/core/cs_xop.cpp b/modules/core/cs_xop.cpp index 8c80f05d0..c1ea9f81d 100644 --- a/modules/core/cs_xop.cpp +++ b/modules/core/cs_xop.cpp @@ -438,8 +438,8 @@ class CommandCSQOP : public XOPBase " 7 through 9.\n" " \n" "The \002QOP CLEAR\002 command clears all entries of the\n" - "QOP list.\n" - " \n" + "QOP list.\n")); + source.Reply(_(" \n" "The \002QOP\002 commands are limited to\n" "founders (unless SECUREOPS is off). However, any user on the\n" "QOP list may use the \002QOP LIST\002 command.\n" @@ -448,7 +448,8 @@ class CommandCSQOP : public XOPBase "in that case you need to use the access list. See \n" "\002%s%s HELP ACCESS\002 for information about the access list,\n" "and \002%s%s HELP SET XOP\002 to know how to toggle between \n" - "the access list and xOP list systems."), Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str(), + "the access list and xOP list systems."), + Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str()); return true; } @@ -500,8 +501,8 @@ class CommandCSAOP : public XOPBase " 7 through 9.\n" " \n" "The \002AOP CLEAR\002 command clears all entries of the\n" - "AOP list.\n" - " \n" + "AOP list.\n")); + source.Reply(_(" \n" "The \002AOP ADD\002 and \002AOP DEL\002 commands are limited to\n" "SOPs or above, while the \002AOP CLEAR\002 command can only\n" "be used by the channel founder. However, any user on the\n" @@ -561,8 +562,8 @@ class CommandCSHOP : public XOPBase " 7 through 9.\n" " \n" "The \002HOP CLEAR\002 command clears all entries of the\n" - "HOP list.\n" - " \n" + "HOP list.\n")); + source.Reply(_(" \n" "The \002HOP ADD\002, \002HOP DEL\002 and \002HOP LIST\002 commands are \n" "limited to AOPs or above, while the \002HOP CLEAR\002 command \n" "can only be used by the channel founder.\n" @@ -622,7 +623,8 @@ class CommandCSSOP : public XOPBase " 7 through 9.\n" " \n" "The \002SOP CLEAR\002 command clears all entries of the\n" - "SOP list.\n" + "SOP list.\n")); + source.Reply(_( " \n" "The \002SOP ADD\002, \002SOP DEL\002 and \002SOP CLEAR\002 commands are \n" "limited to the channel founder. However, any user on the\n" @@ -682,7 +684,8 @@ class CommandCSVOP : public XOPBase " 7 through 9.\n" " \n" "The \002VOP CLEAR\002 command clears all entries of the\n" - "VOP list.\n" + "VOP list.\n")); + source.Reply(_( " \n" "The \002VOP ADD\002, \002VOP DEL\002 and \002VOP LIST\002 commands are \n" "limited to AOPs or above, while the \002VOP CLEAR\002 command \n" diff --git a/modules/core/ns_recover.cpp b/modules/core/ns_recover.cpp index aa12975bd..936e2b51a 100644 --- a/modules/core/ns_recover.cpp +++ b/modules/core/ns_recover.cpp @@ -111,8 +111,7 @@ class CommandNSRecover : public Command "current address as shown in /WHOIS must be on that nick's\n" "access list, you must be identified and in the group of\n" "that nick, or you must supply the correct password for\n" - "the nickname."), NickServ->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), NickServ->nick.c_str(), relstr.c_str(), - NickServ->nick.c_str()); + "the nickname."), NickServ->nick.c_str(), NickServ->nick.c_str(), relstr.c_str(), Config->UseStrictPrivMsgString.c_str(), NickServ->nick.c_str()); return true; } diff --git a/src/regchannel.cpp b/src/regchannel.cpp index a5788d9af..7ced380e5 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -89,16 +89,16 @@ ChannelInfo::ChannelInfo(ChannelInfo *ci) : Flags<ChannelInfoFlag, CI_END>(Chann for (unsigned i = 0; i < ci->GetAccessCount(); ++i) { - ChanAccess *access = ci->GetAccess(i); - this->AddAccess(access->mask, access->level, access->creator, access->last_seen); + ChanAccess *taccess = ci->GetAccess(i); + this->AddAccess(taccess->mask, taccess->level, taccess->creator, taccess->last_seen); } for (unsigned i = 0; i < ci->GetAkickCount(); ++i) { - AutoKick *akick = ci->GetAkick(i); - if (akick->HasFlag(AK_ISNICK)) - this->AddAkick(akick->creator, akick->nc, akick->reason, akick->addtime, akick->last_used); + AutoKick *takick = ci->GetAkick(i); + if (takick->HasFlag(AK_ISNICK)) + this->AddAkick(takick->creator, takick->nc, takick->reason, takick->addtime, takick->last_used); else - this->AddAkick(akick->creator, akick->mask, akick->reason, akick->addtime, akick->last_used); + this->AddAkick(takick->creator, takick->mask, takick->reason, takick->addtime, takick->last_used); } for (unsigned i = 0; i < ci->GetBadWordCount(); ++i) { @@ -222,15 +222,15 @@ ChanAccess *ChannelInfo::GetAccess(User *u, int16 level) ChanAccess *highest = NULL; for (unsigned i = 0, end = this->access.size(); i < end; ++i) { - ChanAccess *access = this->access[i]; + ChanAccess *taccess = this->access[i]; - if (level && level != access->level) + if (level && level != taccess->level) continue; /* Access entry is a mask and we match it */ - else if (!access->nc && (Anope::Match(u->nick, access->mask) || Anope::Match(u->GetDisplayedMask(), access->mask))) + else if (!taccess->nc && (Anope::Match(u->nick, taccess->mask) || Anope::Match(u->GetDisplayedMask(), taccess->mask))) ; /* Access entry is a nick core and we are identified for that account */ - else if (access->nc && u->IsIdentified() && u->Account() == access->nc) + else if (taccess->nc && u->IsIdentified() && u->Account() == taccess->nc) ; else continue; @@ -238,8 +238,8 @@ ChanAccess *ChannelInfo::GetAccess(User *u, int16 level) if (u->IsIdentified() || (na && u->IsRecognized() && !this->HasFlag(CI_SECURE))) { /* Use the highest level access available */ - if (!highest || access->level > highest->level) - highest = access; + if (!highest || taccess->level > highest->level) + highest = taccess; } } @@ -316,15 +316,15 @@ void ChannelInfo::EraseAccess(unsigned index) /** Erase an entry from the channel access list * - * @param access The access to remove + * @param taccess The access to remove * * Clears the memory used by the given access entry and removes it from the vector. */ -void ChannelInfo::EraseAccess(ChanAccess *access) +void ChannelInfo::EraseAccess(ChanAccess *taccess) { for (unsigned i = 0, end = this->access.size(); i < end; ++i) { - if (this->access[i] == access) + if (this->access[i] == taccess) { this->access.erase(this->access.begin() + i); break; @@ -685,20 +685,20 @@ std::pair<ChannelInfo::ModeList::iterator, ChannelInfo::ModeList::iterator> Chan } /** Get details for a specific mlock - * @param name The mode name + * @param mname The mode name * @param param An optional param to match with * @return The MLock, if any */ -ModeLock *ChannelInfo::GetMLock(ChannelModeName name, const Anope::string ¶m) +ModeLock *ChannelInfo::GetMLock(ChannelModeName mname, const Anope::string ¶m) { - std::multimap<ChannelModeName, ModeLock>::iterator it = this->mode_locks.find(name); + std::multimap<ChannelModeName, ModeLock>::iterator it = this->mode_locks.find(mname); if (it != this->mode_locks.end()) { if (param.empty()) return &it->second; else { - std::multimap<ChannelModeName, ModeLock>::iterator it_end = this->mode_locks.upper_bound(name); + std::multimap<ChannelModeName, ModeLock>::iterator it_end = this->mode_locks.upper_bound(mname); for (; it != it_end; ++it) { if (Anope::Match(param, it->second.param)) |