summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-13 19:24:38 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-13 19:24:38 +0000
commit0579cdd300433f232b05aef41e281ea7d0a9bd79 (patch)
tree1cb6c7393bb1a1578c6515c44cc2c538cd3ee8d4
parent3a9cee1356d0e46ced89826c9433fd1ecac3a9e7 (diff)
Convert, convert, convert
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10009 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/numerics.h11
-rw-r--r--src/users.cpp18
2 files changed, 20 insertions, 9 deletions
diff --git a/include/numerics.h b/include/numerics.h
index 446966bbb..79d6fe7dc 100644
--- a/include/numerics.h
+++ b/include/numerics.h
@@ -33,17 +33,28 @@ enum Numerics
RPL_YOURUUID = 042, // taken from ircnet
+ RPL_RULES = 232,
+
+ RPL_RULESTART = 308,
+ RPL_RULESEND = 309,
RPL_TOPIC = 332,
RPL_TOPICTIME = 333,
RPL_NAMREPLY = 353,
RPL_ENDOFNAMES = 366,
+ RPL_MOTD = 372,
+ RPL_MOTDSTART = 375,
+ RPL_ENDOFMOTD = 376,
+
+ RPL_YOURDISPLAYEDHOST = 396, // from charybdis/etc, common convention
/*
* Error range of numerics.
*/
ERR_NOSUCHNICK = 401,
ERR_TOOMANYCHANNELS = 405,
+ ERR_NOMOTD = 422,
+ ERR_NORULES = 434,
ERR_USERNOTINCHANNEL = 441,
ERR_BADCHANNELKEY = 475,
ERR_INVITEONLYCHAN = 473,
diff --git a/src/users.cpp b/src/users.cpp
index d75016f2f..14fcf9c43 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1671,7 +1671,7 @@ bool User::ChangeDisplayedHost(const char* shost)
}
if (IS_LOCAL(this))
- this->WriteNumeric(396, "%s %s :is now your displayed host",this->nick.c_str(),this->dhost.c_str());
+ this->WriteNumeric(RPL_YOURDISPLAYEDHOST, "%s %s :is now your displayed host",this->nick.c_str(),this->dhost.c_str());
return true;
}
@@ -1948,31 +1948,31 @@ void User::ShowMOTD()
{
if (!ServerInstance->Config->MOTD.size())
{
- this->WriteNumeric(422, "%s :Message of the day file is missing.",this->nick.c_str());
+ this->WriteNumeric(ERR_NOMOTD, "%s :Message of the day file is missing.",this->nick.c_str());
return;
}
- this->WriteNumeric(375, "%s :%s message of the day", this->nick.c_str(), ServerInstance->Config->ServerName);
+ this->WriteNumeric(RPL_MOTDSTART, "%s :%s message of the day", this->nick.c_str(), ServerInstance->Config->ServerName);
for (file_cache::iterator i = ServerInstance->Config->MOTD.begin(); i != ServerInstance->Config->MOTD.end(); i++)
- this->WriteNumeric(372, "%s :- %s",this->nick.c_str(),i->c_str());
+ this->WriteNumeric(RPL_MOTD, "%s :- %s",this->nick.c_str(),i->c_str());
- this->WriteNumeric(376, "%s :End of message of the day.", this->nick.c_str());
+ this->WriteNumeric(RPL_ENDOFMOTD, "%s :End of message of the day.", this->nick.c_str());
}
void User::ShowRULES()
{
if (!ServerInstance->Config->RULES.size())
{
- this->WriteNumeric(434, "%s :RULES File is missing",this->nick.c_str());
+ this->WriteNumeric(RPL_NORULES, "%s :RULES File is missing",this->nick.c_str());
return;
}
- this->WriteNumeric(308, "%s :- %s Server Rules -",this->nick.c_str(),ServerInstance->Config->ServerName);
+ this->WriteNumeric(RUL_RULESTART, "%s :- %s Server Rules -",this->nick.c_str(),ServerInstance->Config->ServerName);
for (file_cache::iterator i = ServerInstance->Config->RULES.begin(); i != ServerInstance->Config->RULES.end(); i++)
- this->WriteNumeric(232, "%s :- %s",this->nick.c_str(),i->c_str());
+ this->WriteNumeric(RPL_RULES, "%s :- %s",this->nick.c_str(),i->c_str());
- this->WriteNumeric(309, "%s :End of RULES command.",this->nick.c_str());
+ this->WriteNumeric(RPL_RULESEND, "%s :End of RULES command.",this->nick.c_str());
}
void User::HandleEvent(EventType et, int errornum)