summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command_parse.cpp24
-rw-r--r--src/inspircd.cpp29
-rw-r--r--src/modmanager_static.cpp2
3 files changed, 1 insertions, 54 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 31e61d161..457934d2b 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -108,30 +108,6 @@ bool CommandParser::LoopCall(User* user, Command* handler, const std::vector<std
return true;
}
-bool CommandParser::IsValidCommand(const std::string &commandname, unsigned int pcnt, User * user)
-{
- Commandtable::iterator n = cmdlist.find(commandname);
-
- if (n != cmdlist.end())
- {
- if ((pcnt >= n->second->min_params))
- {
- if (IS_LOCAL(user) && n->second->flags_needed)
- {
- if (user->IsModeSet(n->second->flags_needed))
- {
- return (user->HasPermission(commandname));
- }
- }
- else
- {
- return true;
- }
- }
- }
- return false;
-}
-
Command* CommandParser::GetHandler(const std::string &commandname)
{
Commandtable::iterator n = cmdlist.find(commandname);
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index a469de640..29156973c 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -140,35 +140,6 @@ void InspIRCd::Cleanup()
DeleteZero(this->Logs);
}
-void InspIRCd::Restart(const std::string &reason)
-{
- /* SendError flushes each client's queue,
- * regardless of writeability state
- */
- this->SendError(reason);
-
- /* Figure out our filename (if theyve renamed it, we're boned) */
- std::string me;
-
- char** argv = Config->cmdline.argv;
-
-#ifdef _WIN32
- char module[MAX_PATH];
- if (GetModuleFileNameA(NULL, module, MAX_PATH))
- me = module;
-#else
- me = argv[0];
-#endif
-
- this->Cleanup();
-
- if (execv(me.c_str(), argv) == -1)
- {
- /* Will raise a SIGABRT if not trapped */
- throw CoreException(std::string("Failed to execv()! error: ") + strerror(errno));
- }
-}
-
void InspIRCd::SetSignals()
{
#ifndef _WIN32
diff --git a/src/modmanager_static.cpp b/src/modmanager_static.cpp
index c82ee3f7a..44c36919b 100644
--- a/src/modmanager_static.cpp
+++ b/src/modmanager_static.cpp
@@ -58,7 +58,7 @@ class AllModule : public Module
{
Command* c = (*i)(this);
cmds.push_back(c);
- ServerInstance->AddCommand(c);
+ ServerInstance->Modules->AddService(*c);
}
}
catch (...)