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
This commit is contained in:
w00t 2007-05-11 18:09:22 +00:00
parent e1f34688d6
commit 9c3a20c151
11 changed files with 23 additions and 5 deletions

View File

@ -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;
}
};

View File

@ -111,6 +111,7 @@ class cmd_cban : public command_t
}
}
/* we want this routed! */
return CMD_SUCCESS;
}
};

View File

@ -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;
}
}

View File

@ -50,6 +50,7 @@ class cmd_devoice : public command_t
ServerInstance->SendMode(modes,3,n);
delete n;
/* route it */
return CMD_SUCCESS;
}

View File

@ -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;
}

View File

@ -42,6 +42,7 @@ class cmd_globops : public command_t
}
ServerInstance->SNO->WriteToSnoMask('g',line);
/* route it (ofc :p) */
return CMD_SUCCESS;
}
};

View File

@ -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;
}

View File

@ -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

View File

@ -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;
}
};

View File

@ -201,6 +201,7 @@ class RemoveBase
return CMD_FAILURE;
}
/* route me */
return CMD_SUCCESS;
}
};

View File

@ -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;
}
};