This repository has been archived on 2021-04-17. You can view files and clone it, but cannot push or open issues or pull requests.
uIRC/src/public/commands.h

147 lines
4.1 KiB
C

/*
* This file is part of uIRC. (https://git.redxen.eu/caskd/uIRC)
* Copyright (c) 2019, 2020 Alex-David Denes
*
* uIRC is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* uIRC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with uIRC. If not, see <https://www.gnu.org/licenses/>.
*/
/*! \file */
#ifndef UIRC_GUARD_COMMANDS
#define UIRC_GUARD_COMMANDS
#define UIRC_FCMD ADMIN
/*!
* \brief List of possible string commands
*
* This contains all the commands defined by RFC2812 (LIST, TIME, NAMES, QUIT ...) and extra ones defined by submodules
* It is used for mapping string commands to integers instead of storing them as strings
*/
enum commands {
/*! Used to find information about the administrator of the given server, or current server */
ADMIN = 10,
/*! Clients can set an automatic reply string for any PRIVMSG commands directed at them */
AWAY,
/*! Used to request a server to try to establish a new connection to another server immediately */
CONNECT,
/*! Shutdown the server */
DIE,
/*! Used by servers when reporting a serious or fatal error to its peers */
ERROR,
/*! Return information describing the server */
INFO,
/*! Invite a user to a channel */
INVITE,
/*! Checks whether a given nickname is currently on IRC */
ISON,
/*! Request to start listening to the specific channel */
JOIN,
/*! Request the forced removal of a user from a channel */
KICK,
/*! Closes client-server connection */
KILL,
/*! List all servernames */
LINKS,
/*! List channels and their topics */
LIST,
/*! Get statistics about the size of the IRC network */
LUSERS,
/*! Query and change the characteristics of a channel */
MODE,
/*! Get the "Message Of The Day" of the given server */
MOTD,
/*! List all nicknames that are visible to him */
NAMES,
/*! Give user a nickname or change the existing one */
NICK,
/*! Similar to PRIVMSG but without automatic replies
* \sa PRIVMSG */
NOTICE,
/*! Obtain operator privileges */
OPER,
/*! User sending the message is removed from the list of active members */
PART,
/*! Set connection password */
PASS,
/*! Test the presence of an active client or server at the other end of the connection
* \sa PING */
PING,
/*! Reply to ping message
* \sa PONG */
PONG,
/*! Send private messages between users or channels
* \sa NOTICE */
PRIVMSG,
// TODO: Document the lines below
QUIT,
REHASH,
RESTART,
SERVER,
SERVICE,
SERVLIST,
SQUERY,
SQUIT,
STATS,
SUMMON,
TIME,
TOPIC,
TRACE,
USER,
USERHOST,
USERS,
VERSION,
WALLOPS,
WHO,
WHOIS,
WHOWAS,
#ifdef UIRC_IRCV3
/*! \sa https://github.com/ircv3/ircv3-specifications/pull/276 */
ACC,
/*! \sa https://ircv3.net/specs/extensions/account-notify-3.1 */
ACCOUNT,
/*! \sa https://ircv3.net/specs/extensions/labeled-response */
ACK,
/*! \sa https://ircv3.net/specs/extensions/sasl-3.1 */
AUTHENTICATE,
/*! \sa https://ircv3.net/specs/extensions/batch-3.2 */
BATCH,
/*! \sa https://ircv3.net/specs/core/capability-negotiation */
CAP,
/*! \sa https://ircv3.net/specs/extensions/chghost-3.2 */
CHGHOST,
/*! \sa https://ircv3.net/specs/extensions/standard-replies */
FAIL,
/*! \sa https://ircv3.net/specs/core/monitor-3.2 */
MONITOR,
/*! \sa https://ircv3.net/specs/extensions/standard-replies */
NOTE,
/*! \sa https://github.com/ircv3/ircv3-specifications/pull/420 */
RENAME,
/*! \sa https://github.com/ircv3/ircv3-specifications/pull/306 */
RESUME,
/*! \sa https://ircv3.net/specs/extensions/setname */
SETNAME,
/*! \sa https://ircv3.net/specs/extensions/standard-replies */
WARN,
/*! \sa https://ircv3.net/specs/extensions/webirc */
WEBIRC,
#define UIRC_LCMD WEBIRC
#else /* UIRC_IRCV3 */
#define UIRC_LCMD WHOWAS
#endif /* UIRC_IRCV3 */
};
extern const char* const IRC_Cmds[];
#endif /* UIRC_GUARD_COMMANDS */