|
ft_irc 1.0
|
Defines IRC numeric replies and error messages. [詳解]


マクロ定義 | |
| #define | RPL_WELCOME "001 :Welcome to the Internet Relay Network %s" |
| #define | RPL_YOURHOST "002 %s :Your host is %s, running version 1.0" |
| #define | RPL_TOPIC "332 %s :%s" |
| #define | RPL_NOTOPIC "331 %s :No topic is set" |
| #define | RPL_LISTSTART "321 Channel :Users Name" |
| #define | RPL_LIST "322 %s %s :%s" |
| #define | RPL_LISTEND "323 :End of /LIST" |
| #define | RPL_WHOREPLY "352 %s %s %s %s %s %s :%s %s" |
| #define | RPL_ENDOFWHO "315 %s :End of WHO list" |
| #define | RPL_NAMREPLY "353 = %s :%s" |
| #define | RPL_ENDOFNAMES "366 %s :End of NAMES list" |
| #define | RPL_WHOISUSER "311 %s %s %s %s :%s" |
| #define | RPL_WHOISCHANNELS "319 %s :%s" |
| #define | RPL_WHOISIDLE "317 %s %s :seconds idle" |
| #define | RPL_ENDOFWHOIS "318 %s :End of WHOIS list" |
| #define | ERR_NOSUCHNICK "401 %s :No such nick/channel" |
| #define | ERR_NOSUCHCHANNEL "403 %s :No such channel" |
| #define | ERR_CANNOTSENDTOCHAN "404 %s :Cannot send to channel" |
| #define | ERR_NORECIPIENT "411 :No recipient given (%s)" |
| #define | ERR_NOTEXTTOSEND "412 :No text to send" |
| #define | ERR_NOORIGIN "409 :No origin specified" |
| #define | ERR_UNKNOWNCOMMAND "421 %s :Unknown command" |
| #define | ERR_NONICKNAMEGIVEN "431 :No nickname given" |
| #define | ERR_ERRONEUSNICKNAME "432 %s :Erroneous nickname" |
| #define | ERR_NICKNAMEINUSE "433 %s :Nickname is already in use" |
| #define | ERR_USERNOTINCHANNEL "441 %s %s :They aren't on that channel" |
| #define | ERR_NOTONCHANNEL "442 %s :You're not on that channel" |
| #define | ERR_NEEDMOREPARAMS "461 %s :Not enough parameters" |
| #define | ERR_ALREADYREGISTRED "462 :Unauthorized command (already registered)" |
| #define | ERR_PASSWDMISMATCH "464 :Password incorrect" |
| #define | ERR_UNKNOWNMODE "472 %s :is unknown mode char to me for %s" |
| #define | ERR_CHANOPRIVSNEEDED "482 %s :You're not an operator on this channel" |
| #define | ERR_BADCHANNELKEY "475 %s :Cannot join channel (+k)" |
| #define | ERR_CHANNELISFULL "471 %s :Cannot join channel (+l)" |
| #define | ERR_INVITEONLYCHAN "473 %s :Cannot join channel (+i)" |
| #define | ERR_USERONCHANNEL "443 %s %s :is already on channel" |
関数 | |
| std::string | formatReply (const std::string &serverName, const std::string &clientNickname, const std::string &replyCodeAndText) |
| Formats an IRC reply message without extra parameters. | |
| std::string | formatReply (const std::string &serverName, const std::string &clientNickname, const std::string &replyCodeAndFormat, const std::vector< std::string > &args) |
| Formats an IRC reply message with variable string arguments. | |
Defines IRC numeric replies and error messages.
This file contains definitions for standard IRC numeric replies (RPL_*) and error messages (ERR_*) used by the server to communicate with clients.
Replies.hpp に定義があります。
| #define ERR_ALREADYREGISTRED "462 :Unauthorized command (already registered)" |
Replies.hpp の 77 行目に定義があります。
| #define ERR_BADCHANNELKEY "475 %s :Cannot join channel (+k)" |
Replies.hpp の 81 行目に定義があります。
| #define ERR_CANNOTSENDTOCHAN "404 %s :Cannot send to channel" |
Replies.hpp の 66 行目に定義があります。
| #define ERR_CHANNELISFULL "471 %s :Cannot join channel (+l)" |
Replies.hpp の 82 行目に定義があります。
| #define ERR_CHANOPRIVSNEEDED "482 %s :You're not an operator on this channel" |
Replies.hpp の 80 行目に定義があります。
| #define ERR_ERRONEUSNICKNAME "432 %s :Erroneous nickname" |
Replies.hpp の 72 行目に定義があります。
| #define ERR_INVITEONLYCHAN "473 %s :Cannot join channel (+i)" |
Replies.hpp の 83 行目に定義があります。
| #define ERR_NEEDMOREPARAMS "461 %s :Not enough parameters" |
Replies.hpp の 76 行目に定義があります。
| #define ERR_NICKNAMEINUSE "433 %s :Nickname is already in use" |
Replies.hpp の 73 行目に定義があります。
| #define ERR_NONICKNAMEGIVEN "431 :No nickname given" |
Replies.hpp の 71 行目に定義があります。
| #define ERR_NOORIGIN "409 :No origin specified" |
Replies.hpp の 69 行目に定義があります。
| #define ERR_NORECIPIENT "411 :No recipient given (%s)" |
Replies.hpp の 67 行目に定義があります。
| #define ERR_NOSUCHCHANNEL "403 %s :No such channel" |
Replies.hpp の 65 行目に定義があります。
| #define ERR_NOSUCHNICK "401 %s :No such nick/channel" |
Replies.hpp の 64 行目に定義があります。
| #define ERR_NOTEXTTOSEND "412 :No text to send" |
Replies.hpp の 68 行目に定義があります。
| #define ERR_NOTONCHANNEL "442 %s :You're not on that channel" |
Replies.hpp の 75 行目に定義があります。
| #define ERR_PASSWDMISMATCH "464 :Password incorrect" |
Replies.hpp の 78 行目に定義があります。
| #define ERR_UNKNOWNCOMMAND "421 %s :Unknown command" |
Replies.hpp の 70 行目に定義があります。
| #define ERR_UNKNOWNMODE "472 %s :is unknown mode char to me for %s" |
Replies.hpp の 79 行目に定義があります。
| #define ERR_USERNOTINCHANNEL "441 %s %s :They aren't on that channel" |
Replies.hpp の 74 行目に定義があります。
| #define ERR_USERONCHANNEL "443 %s %s :is already on channel" |
Replies.hpp の 84 行目に定義があります。
| #define RPL_ENDOFNAMES "366 %s :End of NAMES list" |
Replies.hpp の 56 行目に定義があります。
| #define RPL_ENDOFWHO "315 %s :End of WHO list" |
Replies.hpp の 54 行目に定義があります。
| #define RPL_ENDOFWHOIS "318 %s :End of WHOIS list" |
Replies.hpp の 61 行目に定義があります。
| #define RPL_LIST "322 %s %s :%s" |
Replies.hpp の 51 行目に定義があります。
| #define RPL_LISTEND "323 :End of /LIST" |
Replies.hpp の 52 行目に定義があります。
| #define RPL_LISTSTART "321 Channel :Users Name" |
Replies.hpp の 50 行目に定義があります。
| #define RPL_NAMREPLY "353 = %s :%s" |
Replies.hpp の 55 行目に定義があります。
| #define RPL_NOTOPIC "331 %s :No topic is set" |
Replies.hpp の 49 行目に定義があります。
| #define RPL_TOPIC "332 %s :%s" |
Replies.hpp の 48 行目に定義があります。
| #define RPL_WELCOME "001 :Welcome to the Internet Relay Network %s" |
Replies.hpp の 46 行目に定義があります。
| #define RPL_WHOISCHANNELS "319 %s :%s" |
Replies.hpp の 59 行目に定義があります。
| #define RPL_WHOISIDLE "317 %s %s :seconds idle" |
Replies.hpp の 60 行目に定義があります。
| #define RPL_WHOISUSER "311 %s %s %s %s :%s" |
Replies.hpp の 58 行目に定義があります。
| #define RPL_WHOREPLY "352 %s %s %s %s %s %s :%s %s" |
Replies.hpp の 53 行目に定義があります。
| #define RPL_YOURHOST "002 %s :Your host is %s, running version 1.0" |
Replies.hpp の 47 行目に定義があります。
| std::string formatReply | ( | const std::string & | serverName, |
| const std::string & | clientNickname, | ||
| const std::string & | replyCodeAndFormat, | ||
| const std::vector< std::string > & | args | ||
| ) |
Formats an IRC reply message with variable string arguments.
This function constructs a standard IRC reply string, replacing "%s" placeholders in the replyCodeAndFormat string with the provided arguments. The format is: ":<serverName> <replyCode> <clientNickname> <formattedReplyText>\r\n".
| serverName | The name of the server sending the reply. |
| clientNickname | The nickname of the client to whom the reply is directed. |
| replyCodeAndFormat | The numeric reply code and its printf-style format string (e.g., "002 %s :Your host is %s"). |
| args | A vector of strings to substitute into the format string's "%s" placeholders. |
Replies.cpp の 23 行目に定義があります。
| std::string formatReply | ( | const std::string & | serverName, |
| const std::string & | clientNickname, | ||
| const std::string & | replyCodeAndText | ||
| ) |
Formats an IRC reply message without extra parameters.
This function constructs a standard IRC reply string in the format: ":<serverName> <replyCode> <clientNickname> <replyText>\r\n".
| serverName | The name of the server sending the reply. |
| clientNickname | The nickname of the client to whom the reply is directed. |
| replyCodeAndText | The numeric reply code and its associated fixed text (e.g., "001 :Welcome..."). |
Replies.cpp の 14 行目に定義があります。