summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-13 19:01:17 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-13 19:01:17 +0000
commit95538518b3d672ffd9ad46a91293a8b2d4b35220 (patch)
tree8865370dfe131970a4ab5b4e012112aec63aae3d /src
parent33f80efab6317529a999aabeab8082972a2754a4 (diff)
Add include/numerics.h, contains/will contain an enum for numerics. Work in progress.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10006 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index f169efb87..c9e0209d9 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -229,7 +229,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool
{
if (user->chans.size() >= user->GetMaxChans())
{
- user->WriteNumeric(405, "%s %s :You are on too many channels",user->nick.c_str(), cn);
+ user->WriteNumeric(ERR_TOOMANYCHANNELS, "%s %s :You are on too many channels",user->nick.c_str(), cn);
return NULL;
}
}
@@ -239,7 +239,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool
{
if (user->chans.size() >= Instance->Config->OperMaxChans)
{
- user->WriteNumeric(405, "%s %s :You are on too many channels",user->nick.c_str(), cn);
+ user->WriteNumeric(ERR_TOOMANYCHANNELS, "%s %s :You are on too many channels",user->nick.c_str(), cn);
return NULL;
}
}
@@ -247,7 +247,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool
{
if (user->chans.size() >= Instance->Config->MaxChans)
{
- user->WriteNumeric(405, "%s %s :You are on too many channels",user->nick.c_str(), cn);
+ user->WriteNumeric(ERR_TOOMANYCHANNELS, "%s %s :You are on too many channels",user->nick.c_str(), cn);
return NULL;
}
}
@@ -310,7 +310,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool
{
if ((!key) || Ptr->key == key)
{
- user->WriteNumeric(475, "%s %s :Cannot join channel (Incorrect channel key)",user->nick.c_str(), Ptr->name.c_str());
+ user->WriteNumeric(ERR_BADCHANNELKEY, "%s %s :Cannot join channel (Incorrect channel key)",user->nick.c_str(), Ptr->name.c_str());
return NULL;
}
}
@@ -323,7 +323,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool
{
if (!user->IsInvited(Ptr->name.c_str()))
{
- user->WriteNumeric(473, "%s %s :Cannot join channel (Invite only)",user->nick.c_str(), Ptr->name.c_str());
+ user->WriteNumeric(ERR_INVITEONLYCHAN, "%s %s :Cannot join channel (Invite only)",user->nick.c_str(), Ptr->name.c_str());
return NULL;
}
}
@@ -337,7 +337,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool
{
if (Ptr->GetUserCounter() >= Ptr->limit)
{
- user->WriteNumeric(471, "%s %s :Cannot join channel (Channel is full)",user->nick.c_str(), Ptr->name.c_str());
+ user->WriteNumeric(ERR_CHANNELISFULL, "%s %s :Cannot join channel (Channel is full)",user->nick.c_str(), Ptr->name.c_str());
return NULL;
}
}
@@ -346,7 +346,7 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool
{
if (Ptr->IsBanned(user))
{
- user->WriteNumeric(474, "%s %s :Cannot join channel (You're banned)",user->nick.c_str(), Ptr->name.c_str());
+ user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s %s :Cannot join channel (You're banned)",user->nick.c_str(), Ptr->name.c_str());
return NULL;
}
}
@@ -416,8 +416,8 @@ Channel* Channel::ForceChan(InspIRCd* Instance, Channel* Ptr, User* user, const
{
if (Ptr->topicset)
{
- user->WriteNumeric(332, "%s %s :%s", user->nick.c_str(), Ptr->name.c_str(), Ptr->topic.c_str());
- user->WriteNumeric(333, "%s %s %s %lu", user->nick.c_str(), Ptr->name.c_str(), Ptr->setby.c_str(), (unsigned long)Ptr->topicset);
+ user->WriteNumeric(RPL_TOPIC, "%s %s :%s", user->nick.c_str(), Ptr->name.c_str(), Ptr->topic.c_str());
+ user->WriteNumeric(RPL_TOPICTIME, "%s %s %s %lu", user->nick.c_str(), Ptr->name.c_str(), Ptr->setby.c_str(), (unsigned long)Ptr->topicset);
}
Ptr->UserList(user);
}