mirror of
https://github.com/anope/anope.git
synced 2026-07-02 07:06:38 +02:00
Fixed some left over useprivmsg problems and fixed some compiler warnings.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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))
|
||||
|
||||
+12
-9
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+19
-19
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user