#include <string>
#include <sstream>
#include <vector>
-#include <sched.h>
-#ifdef THREADED_DNS
-#include <pthread.h>
-#endif
+#include <algorithm>
#include "users.h"
#include "globals.h"
#include "modules.h"
#include "commands.h"
#include "xline.h"
#include "inspstring.h"
-#include "dnsqueue.h"
#include "helperfuncs.h"
#include "hashcomp.h"
#include "socketengine.h"
std::string command = tokens.GetToken();
while (((para[items] = tokens.GetToken()) != "") && (items < 127))
+ {
+ log(DEBUG,"Param: '%s'",para[items].c_str());
command_p[items] = para[items++].c_str();
+ }
- for (std::string::iterator makeupper = command.begin(); makeupper != command.end(); makeupper++)
- *makeupper = toupper(*makeupper);
+ std::transform(command.begin(), command.end(), command.begin(), ::toupper);
int MOD_RESULT = 0;
FOREACH_RESULT(I_OnPreCommand,OnPreCommand(command,command_p,items,user,false));
WriteServ(user->fd,"481 %s :Permission Denied- You do not have the required operator privilages",user->nick);
return;
}
- }
- if ((cm->second->flags_needed) && (!user->HasPermission(command)))
- {
- WriteServ(user->fd,"481 %s :Permission Denied- Oper type %s does not have access to command %s",user->nick,user->oper,command.c_str());
- return;
+ if (!user->HasPermission(command))
+ {
+ WriteServ(user->fd,"481 %s :Permission Denied- Oper type %s does not have access to command %s",user->nick,user->oper,command.c_str());
+ return;
+ }
}
if ((user->registered == REG_ALL) && (!*user->oper) && (cm->second->IsDisabled()))
{