From: w00t Date: Sun, 13 Jul 2008 19:24:38 +0000 (+0000) Subject: Convert, convert, convert X-Git-Tag: v2.0.23~2931 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=0579cdd300433f232b05aef41e281ea7d0a9bd79;p=user%2Fhenk%2Fcode%2Finspircd.git Convert, convert, convert git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10009 e03df62e-2008-0410-955e-edbf42e46eb7 --- 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)