mirror of
https://github.com/anope/anope.git
synced 2026-07-08 09:43:13 +02:00
Changed params parameter of Command's Execute() from std::vector<std::string> to std::vector<ci::string>, seems to have no ill effects but may require some testing to be sure.
Also a few minor cleanups here and there. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2392 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+10
-10
@@ -74,7 +74,7 @@ class CommandHSRequest : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<std::string> ¶ms)
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
{
|
||||
char *nick;
|
||||
const char *rawhostmask = params[0].c_str();
|
||||
@@ -206,7 +206,7 @@ class CommandHSActivate : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<std::string> ¶ms)
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
{
|
||||
if (!u->nc->HasPriv("hostserv/set"))
|
||||
{
|
||||
@@ -271,7 +271,7 @@ class CommandHSReject : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<std::string> ¶ms)
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
{
|
||||
if (!u->nc->HasPriv("hostserv/set"))
|
||||
{
|
||||
@@ -330,7 +330,7 @@ class CommandHSReject : public Command
|
||||
class HSListBase : public Command
|
||||
{
|
||||
protected:
|
||||
CommandReturn DoList(User *u, std::vector<std::string> ¶ms)
|
||||
CommandReturn DoList(User *u)
|
||||
{
|
||||
if (!u->nc->HasPriv("hostserv/set"))
|
||||
{
|
||||
@@ -383,9 +383,9 @@ class CommandHSWaiting : public HSListBase
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<std::string> ¶ms)
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoList(u, params);
|
||||
return this->DoList(u);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const ci::string &subcommand)
|
||||
@@ -691,17 +691,17 @@ class HSRequest : public Module
|
||||
delete [] HSRequestDBName;
|
||||
}
|
||||
|
||||
EventReturn OnPreCommand(User *u, const std::string &service, const std::string &command, const std::vector<std::string> ¶ms)
|
||||
EventReturn OnPreCommand(User *u, const std::string &service, const ci::string &command, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
if (service == s_HostServ)
|
||||
{
|
||||
if (command == "LIST")
|
||||
{
|
||||
const char *key = params.size() ? params[0].c_str() : NULL;
|
||||
ci::string key = params.size() ? params[0] : "";
|
||||
|
||||
if (key && !stricmp(key, "+req"))
|
||||
if (!key.empty() && key == "+req")
|
||||
{
|
||||
std::vector<std::string> emptyParams;
|
||||
std::vector<ci::string> emptyParams;
|
||||
Command *c = findCommand(HOSTSERV, "WAITING");
|
||||
c->Execute(u, emptyParams);
|
||||
return EVENT_STOP;
|
||||
|
||||
Reference in New Issue
Block a user