PliegerNicolas / ft_irc

2 stars 0 forks source link

TODO #9

Closed PliegerNicolas closed 6 months ago

PliegerNicolas commented 1 year ago

...

PliegerNicolas commented 1 year ago

General IRC commands :

  1. /NICK This sets the user's nickname. It must be unique on the server (or channel).
  2. /USER Useful for server-to-server communicate. We could omit this. Users don't interact with it directly.
  3. /QUIT Disconnects from the server.
  4. /JOIN <channel_password (optional)> Join an existing channel. Some channels might need a channel password but it's optional.
  5. /WHOIS Gets information about an existing user.
  6. /LIST Lists available channels on the server.
  7. /PRIVMSG <username/channel_name> : Sends a private message to a user or a channel (from outside if needed but careful for spammers !).
  8. /NOTICE <username/channel_name> : Just like a private message but intended for server-related messages.

Channel IRC commands :

While being in a Channel, the field # is implicite. If not specified it will point to the current channel.

  1. /KICK #<channel_name (optional)> Removes a user from a channel. It should need privileges check.
  2. /MODE #<channel_name (optional)> <+/-> Change user or channels permissions.
  3. /TOPIC #<channel_name (optional)> : Set or view the topic depending on the passed params.
  4. /INVITE #<channel_name (optional)> Invite a user to join a specific channel.
  5. /WHO #<channel_name (optional)> List the users in a channel (names, real names, server info, operator status, ...).
  6. /NAMES #<channel_name (optional)> Lists the user's nicknames and operator status only.
  7. /PART #<channel_name (optional)> <message (optional)> Exit a channel and leave a message while doing this.
PliegerNicolas commented 1 year ago

First model for command functions prototypes

/NICK (Client *me, const std::string &nickname).

/QUIT (Client *me)

/JOIN (Client *me, const std::string &channel, const std::string &password)

/WHOIS (Client *other)

/PRIVMSG (Client me, Client other/Channel *channel, const std::string &message)

/NOTICE (Client me, Client other/Channel *channel, const std::string &notice)

/KICK (Channel channel, Client me, Client *other)

/MODE (Channel channel, Client me, Client *other, const enum &permission)

/TOPIC (Channel *channel, const std::string &topic)

/INVITE (Channel channel, Client other)

/WHO (Channel *channel)

/NAMES (Channel *channel)

/PART (Channel *channel, const std::string &message)