IRC_SERVER
By @hyunjunk (hyunjun2372@gmail.com)
Loading...
Searching...
No Matches
IrcReplies.hpp File Reference
#include <string>

Go to the source code of this file.

Namespaces

namespace  IRC
 

Macros

#define IRC_REPLY_TUPLE_LIST
 Tuple of the IRC replies | IRC_REPLY_X (reply_code, reply_number, (arguments), (reply_string))
 
#define IRC_REPLY_X(reply_code, reply_number, arguments, reply_string)
 
#define IRC_REPLY_X(reply_code, reply_number, arguments, reply_string)
 
#define PARM_X    const std::string serverName
 

Enumerations

enum  IRC::EIrcReplyCode {
  IRC::RPL_WELCOME = 001 ,
  IRC::ERR_NOSUCHNICK = 401 ,
  IRC::ERR_NOSUCHSERVER = 402 ,
  IRC::ERR_NOSUCHCHANNEL = 403 ,
  IRC::ERR_CANNOTSENDTOCHAN = 404 ,
  IRC::ERR_TOOMANYCHANNELS = 405 ,
  IRC::ERR_WASNOSUCHNICK = 406 ,
  IRC::ERR_TOOMANYTARGETS = 407 ,
  IRC::ERR_UNKNOWNCOMMAND = 421 ,
  IRC::ERR_NONICKNAMEGIVEN = 431 ,
  IRC::ERR_NICKNAMEINUSE = 433 ,
  IRC::ERR_ERRONEUSNICKNAME = 432 ,
  IRC::ERR_NOTREGISTED = 451 ,
  IRC::ERR_NEEDMOREPARAMS = 461 ,
  IRC::ERR_ALREADYREGISTRED = 462 ,
  IRC::ERR_BANNEDFROMCHAN = 474 ,
  IRC::ERR_INVITEONLYCHAN = 473 ,
  IRC::ERR_BADCHANNELKEY = 475 ,
  IRC::ERR_CHANNELISFULL = 471 ,
  IRC::ERR_BADCHANMASK = 476 ,
  IRC::ERR_UNKNOWNMODE = 472 ,
  IRC::ERR_CHANOPRIVSNEEDED = 482 ,
  IRC::ERR_NORECIPIENT = 411 ,
  IRC::ERR_NOTEXTTOSEND = 412 ,
  IRC::ERR_NOTONCHANNEL = 442 ,
  IRC::ERR_USERNOTINCHANNEL = 441 ,
  IRC::ERR_USERONCHANNEL = 443 ,
  IRC::RPL_NOTOPIC = 331 ,
  IRC::RPL_TOPIC = 332 ,
  IRC::RPL_LISTSTART = 321 ,
  IRC::RPL_LIST = 322 ,
  IRC::RPL_LISTEND = 323 ,
  IRC::RPL_NAMREPLY = 353 ,
  IRC::RPL_ENDOFNAMES = 366 ,
  IRC::RPL_CHANNELMODEIS = 324 ,
  IRC::RPL_INVITING = 341 ,
  IRC::IRC_REPLY_ENUM_MAX
}
 Enum of the IRC reply codes. More...
 

Functions

std::string IRC::MakeReplyMsg_RPL_WELCOME (PARM_X, const std::string nickname)
 Make an IRC reply message.
 
std::string IRC::MakeReplyMsg_ERR_NOSUCHNICK (PARM_X, const std::string nickname)
 
std::string IRC::MakeReplyMsg_ERR_NOSUCHSERVER (PARM_X, const std::string server_name)
 
std::string IRC::MakeReplyMsg_ERR_NOSUCHCHANNEL (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_CANNOTSENDTOCHAN (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_TOOMANYCHANNELS (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_WASNOSUCHNICK (PARM_X, const std::string nickname)
 
std::string IRC::MakeReplyMsg_ERR_TOOMANYTARGETS (PARM_X, const std::string target)
 
std::string IRC::MakeReplyMsg_ERR_UNKNOWNCOMMAND (PARM_X, const std::string command)
 
std::string IRC::MakeReplyMsg_ERR_NONICKNAMEGIVEN (PARM_X)
 
std::string IRC::MakeReplyMsg_ERR_NICKNAMEINUSE (PARM_X, const std::string nickname)
 
std::string IRC::MakeReplyMsg_ERR_ERRONEUSNICKNAME (PARM_X, const std::string nickname)
 
std::string IRC::MakeReplyMsg_ERR_NOTREGISTED (PARM_X)
 
std::string IRC::MakeReplyMsg_ERR_NEEDMOREPARAMS (PARM_X, const std::string command)
 
std::string IRC::MakeReplyMsg_ERR_ALREADYREGISTRED (PARM_X)
 
std::string IRC::MakeReplyMsg_ERR_BANNEDFROMCHAN (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_INVITEONLYCHAN (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_BADCHANNELKEY (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_CHANNELISFULL (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_BADCHANMASK (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_UNKNOWNMODE (PARM_X, const char mode)
 
std::string IRC::MakeReplyMsg_ERR_CHANOPRIVSNEEDED (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_NORECIPIENT (PARM_X, const std::string command)
 
std::string IRC::MakeReplyMsg_ERR_NOTEXTTOSEND (PARM_X)
 
std::string IRC::MakeReplyMsg_ERR_NOTONCHANNEL (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_USERNOTINCHANNEL (PARM_X, const std::string nickname, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_ERR_USERONCHANNEL (PARM_X, const std::string nickname, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_RPL_NOTOPIC (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_RPL_TOPIC (PARM_X, const std::string channel_name, const std::string topic)
 
std::string IRC::MakeReplyMsg_RPL_LISTSTART (PARM_X)
 
std::string IRC::MakeReplyMsg_RPL_LIST (PARM_X, const std::string channel_name, const std::string visible_user_count, const std::string topic)
 
std::string IRC::MakeReplyMsg_RPL_LISTEND (PARM_X)
 
std::string IRC::MakeReplyMsg_RPL_NAMREPLY (PARM_X, const std::string channel_name, const std::string nicknames)
 
std::string IRC::MakeReplyMsg_RPL_ENDOFNAMES (PARM_X, const std::string channel_name)
 
std::string IRC::MakeReplyMsg_RPL_CHANNELMODEIS (PARM_X, const std::string channel_name, const std::string mode)
 
std::string IRC::MakeReplyMsg_RPL_INVITING (PARM_X, const std::string nickname, const std::string channel_name)
 

Detailed Description

See also
RFC 1459, Chapter 6. Replies.
https://datatracker.ietf.org/doc/html/rfc1459

Macro Definition Documentation

◆ IRC_REPLY_TUPLE_LIST

#define IRC_REPLY_TUPLE_LIST

Tuple of the IRC replies | IRC_REPLY_X (reply_code, reply_number, (arguments), (reply_string))

◆ IRC_REPLY_X [1/2]

#define IRC_REPLY_X ( reply_code,
reply_number,
arguments,
reply_string )
Value:
reply_code = reply_number,

◆ IRC_REPLY_X [2/2]

#define IRC_REPLY_X ( reply_code,
reply_number,
arguments,
reply_string )
Value:
inline std::string MakeReplyMsg_##reply_code arguments \
{ \
std::string msg; \
msg += std::string() + ":" + serverName + " " + #reply_number + " " + reply_string; \
return msg; \
} \

◆ PARM_X

#define PARM_X    const std::string serverName