summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-11 18:09:22 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-11 18:09:22 +0000
commit9c3a20c15123c4812c236f33418c1fdfe74c3ff2 (patch)
treea498a0ef72af84819c7dff00d5b8a2c61d841f24 /src/modules
parente1f34688d6326a7b60d8044f8bfe8bbaeb464602 (diff)
Last commit of that batch: Fix some returncodes (some stuff here really didn't need to be routed), clarify a few in comments, and also add some todos for myself next.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6978 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alltime.cpp3
-rw-r--r--src/modules/m_cban.cpp1
-rw-r--r--src/modules/m_dccallow.cpp3
-rw-r--r--src/modules/m_devoice.cpp1
-rw-r--r--src/modules/m_globalload.cpp5
-rw-r--r--src/modules/m_globops.cpp1
-rw-r--r--src/modules/m_nicklock.cpp2
-rw-r--r--src/modules/m_opermotd.cpp6
-rw-r--r--src/modules/m_randquote.cpp3
-rw-r--r--src/modules/m_remove.cpp1
-rw-r--r--src/modules/m_setidle.cpp2
11 files changed, 23 insertions, 5 deletions
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp
index 3356974c6..04ae63b17 100644
--- a/src/modules/m_alltime.cpp
+++ b/src/modules/m_alltime.cpp
@@ -53,7 +53,8 @@ class cmd_alltime : public command_t
Event ev((char *) &params, NULL, "send_push");
ev.Send(ServerInstance);
}
-
+
+ /* we want this routed out! */
return CMD_SUCCESS;
}
};
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 5491f5e3a..e6e3b92b0 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -111,6 +111,7 @@ class cmd_cban : public command_t
}
}
+ /* we want this routed! */
return CMD_SUCCESS;
}
};
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index d92aeed82..4fd0277a8 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -190,7 +190,8 @@ class cmd_dccallow : public command_t
{
user->WriteServ("994 %s %s :Added %s to DCCALLOW list for this session", user->nick, user->nick, target->nick);
}
-
+
+ /* route it. */
return CMD_SUCCESS;
}
}
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index 8960995e8..7400d2212 100644
--- a/src/modules/m_devoice.cpp
+++ b/src/modules/m_devoice.cpp
@@ -50,6 +50,7 @@ class cmd_devoice : public command_t
ServerInstance->SendMode(modes,3,n);
delete n;
+ /* route it */
return CMD_SUCCESS;
}
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index 2280572d7..ca945b496 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -36,11 +36,14 @@ class cmd_gloadmodule : public command_t
{
ServerInstance->WriteOpers("*** NEW MODULE '%s' GLOBALLY LOADED BY '%s'",parameters[0],user->nick);
user->WriteServ("975 %s %s :Module successfully loaded.",user->nick, parameters[0]);
+
+ /* route it! */
return CMD_SUCCESS;
}
else
{
user->WriteServ("974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
+ /* XXX - returning CMD_FAILURE here could potentially mean half the net loads it, half doesn't. pass it on anyway? -- w00t */
return CMD_FAILURE;
}
}
@@ -63,10 +66,12 @@ class cmd_gunloadmodule : public command_t
{
ServerInstance->WriteOpers("*** MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0],user->nick);
user->WriteServ("973 %s %s :Module successfully unloaded.",user->nick, parameters[0]);
+ /* route it! */
return CMD_SUCCESS;
}
else
{
+ /* XXX - see above note about returning CMD_FAILURE here -- w00t */
user->WriteServ("972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
return CMD_FAILURE;
}
diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp
index 3d48eb92a..7e4d88d94 100644
--- a/src/modules/m_globops.cpp
+++ b/src/modules/m_globops.cpp
@@ -42,6 +42,7 @@ class cmd_globops : public command_t
}
ServerInstance->SNO->WriteToSnoMask('g',line);
+ /* route it (ofc :p) */
return CMD_SUCCESS;
}
};
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index 509b565ca..519aabe13 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -41,6 +41,7 @@ class cmd_nicklock : public command_t
irc::string server;
irc::string me;
+ /* XXX - these ifs look damn ugly, note to myself to fix them -- w00t */
if (source)
{
if (source->GetExt("nick_locked", dummy))
@@ -59,6 +60,7 @@ class cmd_nicklock : public command_t
}
source->Extend("nick_locked", "ON");
+ /* route */
return CMD_SUCCESS;
}
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index a80aa513c..447468caf 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -29,14 +29,18 @@ CmdResult ShowOperMOTD(userrec* user)
user->WriteServ(std::string("425 ") + user->nick + std::string(" :OPERMOTD file is missing"));
return CMD_FAILURE;
}
+
user->WriteServ(std::string("375 ") + user->nick + std::string(" :- IRC Operators Message of the Day"));
+
for(int i=0; i != opermotd->FileSize(); i++)
{
user->WriteServ(std::string("372 ") + user->nick + std::string(" :- ") + opermotd->GetLine(i));
}
+
user->WriteServ(std::string("376 ") + user->nick + std::string(" :- End of OPERMOTD"));
- return CMD_SUCCESS;
+ /* don't route me */
+ return CMD_LOCALONLY;
}
/** Handle /OPERMOTD
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index 034bea040..2eb5539b8 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -52,7 +52,8 @@ class cmd_randquote : public command_t
user->WriteServ("NOTICE %s :Your administrator specified an invalid quotes file, please bug them about this.", user->nick);
return CMD_FAILURE;
}
- return CMD_SUCCESS;
+
+ return CMD_LOCALONLY;
}
};
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index 23fee34c3..e5c433b84 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -201,6 +201,7 @@ class RemoveBase
return CMD_FAILURE;
}
+ /* route me */
return CMD_SUCCESS;
}
};
diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp
index 255a55322..76a1ea3e5 100644
--- a/src/modules/m_setidle.cpp
+++ b/src/modules/m_setidle.cpp
@@ -45,7 +45,7 @@ class cmd_setidle : public command_t
ServerInstance->WriteOpers(std::string(user->nick)+" used SETIDLE to set their idle time to "+ConvToStr(atoi(parameters[0]))+" seconds");
user->WriteServ("944 %s :Idle time set.",user->nick);
- return CMD_SUCCESS;
+ return CMD_LOCALONLY;
}
};