ft_irc 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Replies.hpp
[詳解]
1
8#ifndef REPLIES_HPP
9#define REPLIES_HPP
10
11#include <string>
12#include <vector>
13
14// Function to format replies
26std::string formatReply(const std::string &serverName, const std::string &clientNickname,
27 const std::string &replyCodeAndText);
42std::string formatReply(const std::string &serverName, const std::string &clientNickname,
43 const std::string &replyCodeAndFormat, const std::vector<std::string> &args);
44
45// Numeric Replies
46#define RPL_WELCOME "001 :Welcome to the Internet Relay Network %s"
47#define RPL_YOURHOST "002 %s :Your host is %s, running version 1.0"
48#define RPL_TOPIC "332 %s :%s"
49#define RPL_NOTOPIC "331 %s :No topic is set"
50#define RPL_LISTSTART "321 Channel :Users Name"
51#define RPL_LIST "322 %s %s :%s"
52#define RPL_LISTEND "323 :End of /LIST"
53#define RPL_WHOREPLY "352 %s %s %s %s %s %s :%s %s"
54#define RPL_ENDOFWHO "315 %s :End of WHO list"
55#define RPL_NAMREPLY "353 = %s :%s"
56#define RPL_ENDOFNAMES "366 %s :End of NAMES list"
57
58#define RPL_WHOISUSER "311 %s %s %s %s :%s"
59#define RPL_WHOISCHANNELS "319 %s :%s"
60#define RPL_WHOISIDLE "317 %s %s :seconds idle"
61#define RPL_ENDOFWHOIS "318 %s :End of WHOIS list"
62
63// Error Replies
64#define ERR_NOSUCHNICK "401 %s :No such nick/channel"
65#define ERR_NOSUCHCHANNEL "403 %s :No such channel"
66#define ERR_CANNOTSENDTOCHAN "404 %s :Cannot send to channel"
67#define ERR_NORECIPIENT "411 :No recipient given (%s)"
68#define ERR_NOTEXTTOSEND "412 :No text to send"
69#define ERR_NOORIGIN "409 :No origin specified"
70#define ERR_UNKNOWNCOMMAND "421 %s :Unknown command"
71#define ERR_NONICKNAMEGIVEN "431 :No nickname given"
72#define ERR_ERRONEUSNICKNAME "432 %s :Erroneous nickname"
73#define ERR_NICKNAMEINUSE "433 %s :Nickname is already in use"
74#define ERR_USERNOTINCHANNEL "441 %s %s :They aren't on that channel"
75#define ERR_NOTONCHANNEL "442 %s :You're not on that channel"
76#define ERR_NEEDMOREPARAMS "461 %s :Not enough parameters"
77#define ERR_ALREADYREGISTRED "462 :Unauthorized command (already registered)"
78#define ERR_PASSWDMISMATCH "464 :Password incorrect"
79#define ERR_UNKNOWNMODE "472 %s :is unknown mode char to me for %s"
80#define ERR_CHANOPRIVSNEEDED "482 %s :You're not an operator on this channel"
81#define ERR_BADCHANNELKEY "475 %s :Cannot join channel (+k)"
82#define ERR_CHANNELISFULL "471 %s :Cannot join channel (+l)"
83#define ERR_INVITEONLYCHAN "473 %s :Cannot join channel (+i)"
84#define ERR_USERONCHANNEL "443 %s %s :is already on channel"
85
86#endif
std::string formatReply(const std::string &serverName, const std::string &clientNickname, const std::string &replyCodeAndText)
Formats an IRC reply message without extra parameters.
Definition Replies.cpp:14