summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-06-18 21:25:43 +0200
committerattilamolnar <attilamolnar@hush.com>2013-06-18 21:25:43 +0200
commit50ecf259b61eb389559dc24a7c4af718c225ec8d (patch)
treeb0475a42827973ff338e5a1d6b1b56c81dcaac89 /src
parente0cb6bd46fb1d804ad6adea5688c844f7e1a0f6f (diff)
Remove dead code from the InspIRCd and CommandParser classes and typedefs.h
Removed functions: InspIRCd: - Restart() - unused - DoSocketTimeouts() - no implementation exists - AddCommand() - useless wrapper around ModuleManager::AddService() CommandParser: - IsValidCommand() - unused - ProcessParameters() - no implementation exists
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 (...)