aboutsummaryrefslogtreecommitdiffstats
path: root/src/commands/cmd_oper.cpp
diff options
context:
space:
mode:
authorGravatar brain2008-03-22 12:03:43 +0000
committerGravatar brain2008-03-22 12:03:43 +0000
commit68730d4c9701b34c962302e6410908865fb2ba28 (patch)
treedfa6b0b1d79bfd894ab75d0415e054b54ff2d850 /src/commands/cmd_oper.cpp
parentAdd WriteNumeric() to User and OnNumeric module event. Note that modules do n... (diff)
Wheeee for HUGE commits. Convert all numerics to WriteNumeric so that OnNumeric can capture them.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9175 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_oper.cpp')
-rw-r--r--src/commands/cmd_oper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commands/cmd_oper.cpp b/src/commands/cmd_oper.cpp
index 4acf88329..ae66401aa 100644
--- a/src/commands/cmd_oper.cpp
+++ b/src/commands/cmd_oper.cpp
@@ -82,7 +82,7 @@ CmdResult CommandOper::Handle (const char* const* parameters, int, User *user)
/* found this oper's opertype */
if (!ServerInstance->IsNick(TypeName))
{
- user->WriteServ("491 %s :Invalid oper type (oper types must follow the same syntax as nicknames)",user->nick);
+ user->WriteNumeric(491, "%s :Invalid oper type (oper types must follow the same syntax as nicknames)",user->nick);
ServerInstance->SNO->WriteToSnoMask('o',"CONFIGURATION ERROR! Oper type '%s' contains invalid characters",OperType);
ServerInstance->Logs->Log("OPER",DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but oper type erroneous.",user->nick,user->ident,user->host);
return CMD_FAILURE;
@@ -108,7 +108,7 @@ CmdResult CommandOper::Handle (const char* const* parameters, int, User *user)
{
/* correct oper credentials */
ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s (using oper '%s')",user->nick,user->ident,user->host,irc::Spacify(OperType),parameters[0]);
- user->WriteServ("381 %s :You are now %s %s",user->nick, strchr("aeiouAEIOU", *OperType) ? "an" : "a", irc::Spacify(OperType));
+ user->WriteNumeric(381, "%s :You are now %s %s",user->nick, strchr("aeiouAEIOU", *OperType) ? "an" : "a", irc::Spacify(OperType));
if (!user->IsModeSet('o'))
user->Oper(OperType, LoginName);
}
@@ -132,7 +132,7 @@ CmdResult CommandOper::Handle (const char* const* parameters, int, User *user)
}
// tell them they suck, and lag them up to help prevent brute-force attacks
- user->WriteServ("491 %s :Invalid oper credentials",user->nick);
+ user->WriteNumeric(491, "%s :Invalid oper credentials",user->nick);
user->IncreasePenalty(10);
snprintf(broadcast, MAXBUF, "WARNING! Failed oper attempt by %s!%s@%s using login '%s': The following fields do not match: %s",user->nick,user->ident,user->host, parameters[0], fields.c_str());
@@ -146,7 +146,7 @@ CmdResult CommandOper::Handle (const char* const* parameters, int, User *user)
}
else
{
- user->WriteServ("491 %s :Your oper block does not have a valid opertype associated with it",user->nick);
+ user->WriteNumeric(491, "%s :Your oper block does not have a valid opertype associated with it",user->nick);
snprintf(broadcast, MAXBUF, "CONFIGURATION ERROR! Oper block '%s': missing OperType %s",parameters[0],OperType);