summaryrefslogtreecommitdiff
path: root/src/commands/cmd_topic.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-22 12:03:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-22 12:03:43 +0000
commit68730d4c9701b34c962302e6410908865fb2ba28 (patch)
treedfa6b0b1d79bfd894ab75d0415e054b54ff2d850 /src/commands/cmd_topic.cpp
parent9ee525bec55521e9d911df40c2d8ca8b0212ee22 (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_topic.cpp')
-rw-r--r--src/commands/cmd_topic.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/commands/cmd_topic.cpp b/src/commands/cmd_topic.cpp
index 46c26806f..f271a597d 100644
--- a/src/commands/cmd_topic.cpp
+++ b/src/commands/cmd_topic.cpp
@@ -31,22 +31,22 @@ CmdResult CommandTopic::Handle (const char* const* parameters, int pcnt, User *u
{
if ((Ptr->IsModeSet('s')) && (!Ptr->HasUser(user)))
{
- user->WriteServ("401 %s %s :No such nick/channel",user->nick, Ptr->name);
+ user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, Ptr->name);
return CMD_FAILURE;
}
if (Ptr->topicset)
{
- user->WriteServ("332 %s %s :%s", user->nick, Ptr->name, Ptr->topic);
- user->WriteServ("333 %s %s %s %d", user->nick, Ptr->name, Ptr->setby, Ptr->topicset);
+ user->WriteNumeric(332, "%s %s :%s", user->nick, Ptr->name, Ptr->topic);
+ user->WriteNumeric(333, "%s %s %s %d", user->nick, Ptr->name, Ptr->setby, Ptr->topicset);
}
else
{
- user->WriteServ("331 %s %s :No topic is set.", user->nick, Ptr->name);
+ user->WriteNumeric(331, "%s %s :No topic is set.", user->nick, Ptr->name);
}
}
else
{
- user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[0]);
+ user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, parameters[0]);
return CMD_FAILURE;
}
return CMD_SUCCESS;
@@ -60,12 +60,12 @@ CmdResult CommandTopic::Handle (const char* const* parameters, int pcnt, User *u
{
if (!Ptr->HasUser(user))
{
- user->WriteServ("442 %s %s :You're not on that channel!",user->nick, Ptr->name);
+ user->WriteNumeric(442, "%s %s :You're not on that channel!",user->nick, Ptr->name);
return CMD_FAILURE;
}
if ((Ptr->IsModeSet('t')) && (Ptr->GetStatus(user) < STATUS_HOP))
{
- user->WriteServ("482 %s %s :You must be at least a half-operator to change the topic on this channel", user->nick, Ptr->name);
+ user->WriteNumeric(482, "%s %s :You must be at least a half-operator to change the topic on this channel", user->nick, Ptr->name);
return CMD_FAILURE;
}
}
@@ -106,7 +106,7 @@ CmdResult CommandTopic::Handle (const char* const* parameters, int pcnt, User *u
}
else
{
- user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[0]);
+ user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, parameters[0]);
return CMD_FAILURE;
}
}