|
ft_irc 1.0
|
Implements functions for formatting IRC server replies. [詳解]

関数 | |
| 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. | |
Implements functions for formatting IRC server replies.
This file contains utility functions to format numeric replies and error messages according to the IRC protocol, handling both fixed and variable arguments.
Replies.cpp に定義があります。
| 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 行目に定義があります。