summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-13 19:19:15 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-13 19:19:15 +0000
commit3a9cee1356d0e46ced89826c9433fd1ecac3a9e7 (patch)
tree29be8c5553917ae3cff0ad99e52f9a6ad1aee580
parent4f7d99c193420035b8b75d075dd458df535d5bda (diff)
Convert a bunch of crap
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10008 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/numerics.h11
-rw-r--r--src/users.cpp12
2 files changed, 16 insertions, 7 deletions
diff --git a/include/numerics.h b/include/numerics.h
index f78cd60d0..446966bbb 100644
--- a/include/numerics.h
+++ b/include/numerics.h
@@ -26,6 +26,13 @@ enum Numerics
/*
* Reply range of numerics.
*/
+ RPL_WELCOME = 001,
+ RPL_YOURHOSTIS = 002,
+ RPL_SERVERCREATED = 003,
+ RPL_SERVERVERSION = 004,
+
+ RPL_YOURUUID = 042, // taken from ircnet
+
RPL_TOPIC = 332,
RPL_TOPICTIME = 333,
RPL_NAMREPLY = 353,
@@ -42,5 +49,7 @@ enum Numerics
ERR_INVITEONLYCHAN = 473,
ERR_CHANNELISFULL = 471,
ERR_BANNEDFROMCHAN = 474,
- ERR_CHANOPRIVSNEEDED = 482
+ ERR_CHANOPRIVSNEEDED = 482,
+
+ ERR_UNKNOWNSNOMASK = 501
};
diff --git a/src/users.cpp b/src/users.cpp
index 268c61b3b..d75016f2f 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -82,7 +82,7 @@ std::string User::ProcessNoticeMasks(const char *sm)
}
}
else
- this->WriteNumeric(501, "%s %c :is unknown snomask char to me", this->nick.c_str(), *c);
+ this->WriteNumeric(ERR_UNKNOWNSNOMASK, "%s %c :is unknown snomask char to me", this->nick.c_str(), *c);
oldadding = adding;
break;
@@ -933,13 +933,13 @@ void User::FullConnect()
return;
this->WriteServ("NOTICE Auth :Welcome to \002%s\002!",ServerInstance->Config->Network);
- this->WriteNumeric(001, "%s :Welcome to the %s IRC Network %s!%s@%s",this->nick.c_str(), ServerInstance->Config->Network, this->nick.c_str(), this->ident.c_str(), this->host.c_str());
- this->WriteNumeric(002, "%s :Your host is %s, running version InspIRCd-1.2",this->nick.c_str(),ServerInstance->Config->ServerName);
- this->WriteNumeric(003, "%s :This server was created %s %s", this->nick.c_str(), __TIME__, __DATE__);
- this->WriteNumeric(004, "%s %s InspIRCd-1.2 %s %s %s", this->nick.c_str(), ServerInstance->Config->ServerName, ServerInstance->Modes->UserModeList().c_str(), ServerInstance->Modes->ChannelModeList().c_str(), ServerInstance->Modes->ParaModeList().c_str());
+ this->WriteNumeric(RPL_WELCOME, "%s :Welcome to the %s IRC Network %s!%s@%s",this->nick.c_str(), ServerInstance->Config->Network, this->nick.c_str(), this->ident.c_str(), this->host.c_str());
+ this->WriteNumeric(RPL_YOURHOSTIS, "%s :Your host is %s, running version InspIRCd-1.2",this->nick.c_str(),ServerInstance->Config->ServerName);
+ this->WriteNumeric(RPL_SERVERCREATED, "%s :This server was created %s %s", this->nick.c_str(), __TIME__, __DATE__);
+ this->WriteNumeric(RPL_SERVERVERSION, "%s %s InspIRCd-1.2 %s %s %s", this->nick.c_str(), ServerInstance->Config->ServerName, ServerInstance->Modes->UserModeList().c_str(), ServerInstance->Modes->ChannelModeList().c_str(), ServerInstance->Modes->ParaModeList().c_str());
ServerInstance->Config->Send005(this);
- this->WriteNumeric(42, "%s %s :your unique ID", this->nick.c_str(), this->uuid.c_str());
+ this->WriteNumeric(RPL_YOURUUID, "%s %s :your unique ID", this->nick.c_str(), this->uuid.c_str());
this->ShowMOTD();