41 lines
2.2 KiB
C
41 lines
2.2 KiB
C
/*
|
|
* This file is part of uIRC. (https://git.redxen.eu/caskd/uIRC)
|
|
* Copyright (c) 2019-2021 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/>.
|
|
*/
|
|
|
|
#include "uirc/command.h"
|
|
|
|
static const char* const cmd_table[] = {
|
|
[IRC_CMD_PASS] = "PASS", [IRC_CMD_NICK] = "NICK", [IRC_CMD_USER] = "USER", [IRC_CMD_OPER] = "OPER",
|
|
[IRC_CMD_MODE] = "MODE", [IRC_CMD_SERVICE] = "SERVICE", [IRC_CMD_QUIT] = "QUIT", [IRC_CMD_SQUIT] = "SQUIT",
|
|
[IRC_CMD_JOIN] = "JOIN", [IRC_CMD_PART] = "PART", [IRC_CMD_TOPIC] = "TOPIC", [IRC_CMD_NAMES] = "NAMES",
|
|
[IRC_CMD_LIST] = "LIST", [IRC_CMD_INVITE] = "INVITE", [IRC_CMD_KICK] = "KICK", [IRC_CMD_PRIVMSG] = "PRIVMSG",
|
|
[IRC_CMD_NOTICE] = "NOTICE", [IRC_CMD_MOTD] = "MOTD", [IRC_CMD_LUSERS] = "LUSERS", [IRC_CMD_VERSION] = "VERSION",
|
|
[IRC_CMD_STATS] = "STATS", [IRC_CMD_LINKS] = "LINKS", [IRC_CMD_TIME] = "TIME", [IRC_CMD_CONNECT] = "CONNECT",
|
|
[IRC_CMD_TRACE] = "TRACE", [IRC_CMD_ADMIN] = "ADMIN", [IRC_CMD_INFO] = "INFO", [IRC_CMD_SERVLIST] = "SERVLIST",
|
|
[IRC_CMD_SQUERY] = "SQUERY", [IRC_CMD_WHO] = "WHO", [IRC_CMD_WHOIS] = "WHOIS", [IRC_CMD_WHOWAS] = "WHOWAS",
|
|
[IRC_CMD_KILL] = "KILL", [IRC_CMD_PING] = "PING", [IRC_CMD_PONG] = "PONG", [IRC_CMD_ERROR] = "ERROR",
|
|
[IRC_CMD_AWAY] = "AWAY", [IRC_CMD_REHASH] = "REHASH", [IRC_CMD_DIE] = "DIE", [IRC_CMD_RESTART] = "RESTART",
|
|
[IRC_CMD_SUMMON] = "SUMMON", [IRC_CMD_USERS] = "USERS", [IRC_CMD_WALLOPS] = "WALLOPS", [IRC_CMD_USERHOST] = "USERHOST",
|
|
[IRC_CMD_ISON] = "ISON",
|
|
};
|
|
|
|
const char*
|
|
IRC_CMD(enum uirc_table_command cmd)
|
|
{
|
|
return cmd_table[cmd];
|
|
}
|