]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Convert, convert, convert
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 13 Jul 2008 19:24:38 +0000 (19:24 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 13 Jul 2008 19:24:38 +0000 (19:24 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10009 e03df62e-2008-0410-955e-edbf42e46eb7

include/numerics.h
src/users.cpp

index 446966bbb515189e7c6fc01abc1e6ffa47224ab6..79d6fe7dc7976cd5c87095d2c4ba058e467144a6 100644 (file)
@@ -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,
index d75016f2f7498de32a80a0642d53e12769440a0b..14fcf9c4326a9edabb2d908d35e166e7d458168f 100644 (file)
@@ -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)