ft_irc 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Replies.hpp ファイル

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

#include <string>
#include <vector>
Replies.hpp の依存先関係図:
被依存関係図:

[ソースコード]

マクロ定義

#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 に定義があります。

マクロ定義詳解

◆ ERR_ALREADYREGISTRED

#define ERR_ALREADYREGISTRED   "462 :Unauthorized command (already registered)"

Replies.hpp77 行目に定義があります。

◆ ERR_BADCHANNELKEY

#define ERR_BADCHANNELKEY   "475 %s :Cannot join channel (+k)"

Replies.hpp81 行目に定義があります。

◆ ERR_CANNOTSENDTOCHAN

#define ERR_CANNOTSENDTOCHAN   "404 %s :Cannot send to channel"

Replies.hpp66 行目に定義があります。

◆ ERR_CHANNELISFULL

#define ERR_CHANNELISFULL   "471 %s :Cannot join channel (+l)"

Replies.hpp82 行目に定義があります。

◆ ERR_CHANOPRIVSNEEDED

#define ERR_CHANOPRIVSNEEDED   "482 %s :You're not an operator on this channel"

Replies.hpp80 行目に定義があります。

◆ ERR_ERRONEUSNICKNAME

#define ERR_ERRONEUSNICKNAME   "432 %s :Erroneous nickname"

Replies.hpp72 行目に定義があります。

◆ ERR_INVITEONLYCHAN

#define ERR_INVITEONLYCHAN   "473 %s :Cannot join channel (+i)"

Replies.hpp83 行目に定義があります。

◆ ERR_NEEDMOREPARAMS

#define ERR_NEEDMOREPARAMS   "461 %s :Not enough parameters"

Replies.hpp76 行目に定義があります。

◆ ERR_NICKNAMEINUSE

#define ERR_NICKNAMEINUSE   "433 %s :Nickname is already in use"

Replies.hpp73 行目に定義があります。

◆ ERR_NONICKNAMEGIVEN

#define ERR_NONICKNAMEGIVEN   "431 :No nickname given"

Replies.hpp71 行目に定義があります。

◆ ERR_NOORIGIN

#define ERR_NOORIGIN   "409 :No origin specified"

Replies.hpp69 行目に定義があります。

◆ ERR_NORECIPIENT

#define ERR_NORECIPIENT   "411 :No recipient given (%s)"

Replies.hpp67 行目に定義があります。

◆ ERR_NOSUCHCHANNEL

#define ERR_NOSUCHCHANNEL   "403 %s :No such channel"

Replies.hpp65 行目に定義があります。

◆ ERR_NOSUCHNICK

#define ERR_NOSUCHNICK   "401 %s :No such nick/channel"

Replies.hpp64 行目に定義があります。

◆ ERR_NOTEXTTOSEND

#define ERR_NOTEXTTOSEND   "412 :No text to send"

Replies.hpp68 行目に定義があります。

◆ ERR_NOTONCHANNEL

#define ERR_NOTONCHANNEL   "442 %s :You're not on that channel"

Replies.hpp75 行目に定義があります。

◆ ERR_PASSWDMISMATCH

#define ERR_PASSWDMISMATCH   "464 :Password incorrect"

Replies.hpp78 行目に定義があります。

◆ ERR_UNKNOWNCOMMAND

#define ERR_UNKNOWNCOMMAND   "421 %s :Unknown command"

Replies.hpp70 行目に定義があります。

◆ ERR_UNKNOWNMODE

#define ERR_UNKNOWNMODE   "472 %s :is unknown mode char to me for %s"

Replies.hpp79 行目に定義があります。

◆ ERR_USERNOTINCHANNEL

#define ERR_USERNOTINCHANNEL   "441 %s %s :They aren't on that channel"

Replies.hpp74 行目に定義があります。

◆ ERR_USERONCHANNEL

#define ERR_USERONCHANNEL   "443 %s %s :is already on channel"

Replies.hpp84 行目に定義があります。

◆ RPL_ENDOFNAMES

#define RPL_ENDOFNAMES   "366 %s :End of NAMES list"

Replies.hpp56 行目に定義があります。

◆ RPL_ENDOFWHO

#define RPL_ENDOFWHO   "315 %s :End of WHO list"

Replies.hpp54 行目に定義があります。

◆ RPL_ENDOFWHOIS

#define RPL_ENDOFWHOIS   "318 %s :End of WHOIS list"

Replies.hpp61 行目に定義があります。

◆ RPL_LIST

#define RPL_LIST   "322 %s %s :%s"

Replies.hpp51 行目に定義があります。

◆ RPL_LISTEND

#define RPL_LISTEND   "323 :End of /LIST"

Replies.hpp52 行目に定義があります。

◆ RPL_LISTSTART

#define RPL_LISTSTART   "321 Channel :Users Name"

Replies.hpp50 行目に定義があります。

◆ RPL_NAMREPLY

#define RPL_NAMREPLY   "353 = %s :%s"

Replies.hpp55 行目に定義があります。

◆ RPL_NOTOPIC

#define RPL_NOTOPIC   "331 %s :No topic is set"

Replies.hpp49 行目に定義があります。

◆ RPL_TOPIC

#define RPL_TOPIC   "332 %s :%s"

Replies.hpp48 行目に定義があります。

◆ RPL_WELCOME

#define RPL_WELCOME   "001 :Welcome to the Internet Relay Network %s"

Replies.hpp46 行目に定義があります。

◆ RPL_WHOISCHANNELS

#define RPL_WHOISCHANNELS   "319 %s :%s"

Replies.hpp59 行目に定義があります。

◆ RPL_WHOISIDLE

#define RPL_WHOISIDLE   "317 %s %s :seconds idle"

Replies.hpp60 行目に定義があります。

◆ RPL_WHOISUSER

#define RPL_WHOISUSER   "311 %s %s %s %s :%s"

Replies.hpp58 行目に定義があります。

◆ RPL_WHOREPLY

#define RPL_WHOREPLY   "352 %s %s %s %s %s %s :%s %s"

Replies.hpp53 行目に定義があります。

◆ RPL_YOURHOST

#define RPL_YOURHOST   "002 %s :Your host is %s, running version 1.0"

Replies.hpp47 行目に定義があります。

関数詳解

◆ formatReply() [1/2]

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".

引数
serverNameThe name of the server sending the reply.
clientNicknameThe nickname of the client to whom the reply is directed.
replyCodeAndFormatThe numeric reply code and its printf-style format string (e.g., "002 %s :Your host is %s").
argsA vector of strings to substitute into the format string's "%s" placeholders.
戻り値
The formatted IRC reply string.

Replies.cpp23 行目に定義があります。

◆ formatReply() [2/2]

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".

引数
serverNameThe name of the server sending the reply.
clientNicknameThe nickname of the client to whom the reply is directed.
replyCodeAndTextThe numeric reply code and its associated fixed text (e.g., "001 :Welcome...").
戻り値
The formatted IRC reply string.

Replies.cpp14 行目に定義があります。