summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 18:59:13 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 18:59:13 +0000
commitfea1a27cb96a114f698eedcf90401b78406108fb (patch)
tree194649decb5d88184149307571bba6873537853d /src/command_parse.cpp
parenta7543c881be4c900b68a54714de7c1e677acbb09 (diff)
WHEEEEE!!!!!
All of: Write(), WriteTo(), WriteFrom(), WriteServ() are now methods of userrec. Write_NoFormat(), WriteTo_NoFormat(), WriteFrom_NoFormat(), WriteServ_NoFormat() are now std::string-taking overloaded methods of the functions above All modules updated to use new syntax, my fingers hurt :( git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4798 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 922427c28..bcea36439 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -228,27 +228,27 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
{
if (!user->IsModeSet(cm->second->flags_needed))
{
- WriteServ(user->fd,"481 %s :Permission Denied- You do not have the required operator privilages",user->nick);
+ user->WriteServ("481 %s :Permission Denied- You do not have the required operator privilages",user->nick);
return;
}
if (!user->HasPermission(command))
{
- WriteServ(user->fd,"481 %s :Permission Denied- Oper type %s does not have access to command %s",user->nick,user->oper,command.c_str());
+ user->WriteServ("481 %s :Permission Denied- Oper type %s does not have access to command %s",user->nick,user->oper,command.c_str());
return;
}
}
if ((user->registered == REG_ALL) && (!*user->oper) && (cm->second->IsDisabled()))
{
/* command is disabled! */
- WriteServ(user->fd,"421 %s %s :This command has been disabled.",user->nick,command.c_str());
+ user->WriteServ("421 %s %s :This command has been disabled.",user->nick,command.c_str());
return;
}
if (items < cm->second->min_params)
{
- WriteServ(user->fd,"461 %s %s :Not enough parameters.", user->nick, command.c_str());
+ user->WriteServ("461 %s %s :Not enough parameters.", user->nick, command.c_str());
/* If syntax is given, display this as the 461 reply */
if ((Config->SyntaxHints) && (cm->second->syntax.length()))
- WriteServ(user->fd,"304 %s :SYNTAX %s %s", user->nick, cm->second->command.c_str(), cm->second->syntax.c_str());
+ user->WriteServ("304 %s :SYNTAX %s %s", user->nick, cm->second->command.c_str(), cm->second->syntax.c_str());
return;
}
if ((user->registered == REG_ALL) || (cm->second == command_user) || (cm->second == command_nick) || (cm->second == command_pass))
@@ -273,7 +273,7 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
}
else
{
- WriteServ(user->fd,"451 %s :You have not registered",command.c_str());
+ user->WriteServ("451 %s :You have not registered",command.c_str());
return;
}
}
@@ -281,7 +281,7 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
else if (user)
{
ServerInstance->stats->statsUnknown++;
- WriteServ(user->fd,"421 %s %s :Unknown command",user->nick,command.c_str());
+ user->WriteServ("421 %s %s :Unknown command",user->nick,command.c_str());
}
}