/* * 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 . */ /*! \file */ #ifndef UIRC_GUARD_PUBLIC_CTCP #define UIRC_GUARD_PUBLIC_CTCP #ifdef UIRC_FEATURE_CTCP enum formatting { IRC_CTCP_BOLD = 0x02, IRC_CTCP_COLOR = 0x03, IRC_CTCP_COLOR_HEX = 0x04, IRC_CTCP_RESET = 0x0F, IRC_CTCP_MONOSPACE = 0x11, IRC_CTCP_REVERSE = 0x16, IRC_CTCP_ITALICS = 0x1D, IRC_CTCP_STRIKETHROUGH = 0x1E, IRC_CTCP_UNDERLINE = 0x1F, }; enum colors { IRC_CTCP_COLORS_WHITE = 0, IRC_CTCP_COLORS_BLACK = 1, IRC_CTCP_COLORS_BLUE, IRC_CTCP_COLORS_GREEN, IRC_CTCP_COLORS_RED, IRC_CTCP_COLORS_BROWN, IRC_CTCP_COLORS_MAGENTA, IRC_CTCP_COLORS_ORANGE, IRC_CTCP_COLORS_YELLOW, IRC_CTCP_COLORS_LIGHT_GREEN, IRC_CTCP_COLORS_CYAN, IRC_CTCP_COLORS_LIGHT_CYAN, IRC_CTCP_COLORS_LIGHT_BLUE, IRC_CTCP_COLORS_PINK, IRC_CTCP_COLORS_GREY, IRC_CTCP_COLORS_LIGHT_GREY, IRC_CTCP_COLORS_DEFAULT = 99, }; short UIRC_FORMAT_ANSI[] = { [IRC_CTCP_COLORS_WHITE] = 97, [IRC_CTCP_COLORS_BLACK] = 30, [IRC_CTCP_COLORS_BLUE] = 34, [IRC_CTCP_COLORS_GREEN] = 32, [IRC_CTCP_COLORS_RED] = 31, [IRC_CTCP_COLORS_BROWN] = 94, [IRC_CTCP_COLORS_MAGENTA] = 35, [IRC_CTCP_COLORS_ORANGE] = 166, [IRC_CTCP_COLORS_YELLOW] = 33, [IRC_CTCP_COLORS_LIGHT_GREEN] = 92, [IRC_CTCP_COLORS_CYAN] = 36, [IRC_CTCP_COLORS_LIGHT_CYAN] = 96, [IRC_CTCP_COLORS_LIGHT_BLUE] = 94, [IRC_CTCP_COLORS_PINK] = 127, [IRC_CTCP_COLORS_GREY] = 90, [IRC_CTCP_COLORS_LIGHT_GREY] = 37, [IRC_CTCP_COLORS_DEFAULT] = 39, [IRC_CTCP_BOLD] = 1, [IRC_CTCP_RESET] = 0, [IRC_CTCP_REVERSE] = 7, [IRC_CTCP_ITALICS] = 3, [IRC_CTCP_STRIKETHROUGH] = 9, [IRC_CTCP_UNDERLINE] = 4, [16] = 52, /* See https://modern.ircdocs.horse/formatting.html */ [17] = 94, [18] = 100, [19] = 58, [20] = 22, [21] = 29, [22] = 23, [23] = 24, [24] = 17, [25] = 54, [26] = 53, [27] = 89, [28] = 88, [29] = 130, [30] = 142, [31] = 64, [32] = 28, [33] = 35, [34] = 30, [35] = 25, [36] = 18, [37] = 91, [38] = 90, [39] = 125, [40] = 124, [41] = 166, [42] = 184, [43] = 106, [44] = 34, [45] = 49, [46] = 37, [47] = 33, [48] = 19, [49] = 129, [50] = 127, [51] = 161, [52] = 196, [53] = 208, [54] = 226, [55] = 154, [56] = 46, [57] = 86, [58] = 51, [59] = 75, [60] = 21, [61] = 171, [62] = 201, [63] = 198, [64] = 203, [65] = 215, [66] = 227, [67] = 191, [68] = 83, [69] = 122, [70] = 87, [71] = 111, [72] = 63, [73] = 177, [74] = 207, [75] = 205, [76] = 217, [77] = 223, [78] = 229, [79] = 193, [80] = 157, [81] = 158, [82] = 159, [83] = 153, [84] = 147, [85] = 183, [86] = 219, [87] = 212, [88] = 16, [89] = 233, [90] = 235, [91] = 237, [92] = 239, [93] = 241, [94] = 244, [95] = 247, [96] = 250, [97] = 254, [98] = 231, }; #endif /* UIRC_FEATURE_CTCP */ #endif /* UIRC_GUARD_PUBLIC_CTCP */