#include "commands.h"
#include "gui.h"
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <stdio.h>
#include <ctype.h>

// Command table
static const irc_command_t commands[] = {
    {"help", "h", "/help [command]", "Show help", cmd_help},
    {"join", "j", "/join #channel", "Join channel", cmd_join},
    {"part", "p", "/part", "Leave channel", cmd_part},
    {"msg", "m", "/msg <nick> <text>", "Send message", cmd_msg},
    {"privmsg", NULL, "/privmsg <target> <text>", "Private message", cmd_privmsg},
    {"notice", NULL, "/notice <target> <text>", "Send notice", cmd_notice},
    {"nick", "n", "/nick <newnick>", "Change nickname", cmd_nick},
    {"quit", "q", "/quit [reason]", "Disconnect", cmd_quit},
    {"names", NULL, "/names", "List users", cmd_names},
    {"who", NULL, "/who [mask]", "List users", cmd_who},
    {"whois", "ws", "/whois <nick>", "User info", cmd_whois},
    {"list", "l", "/list [pattern]", "List channels", cmd_list},
    {"topic", NULL, "/topic [topic]", "Channel topic", cmd_topic},
    {"mode", NULL, "/mode [modes]", "Set modes", cmd_mode},
    {"kick", "k", "/kick <nick>", "Kick user", cmd_kick},
    {"ban", "b", "/ban <mask>", "Ban user", cmd_ban},
    {"op", NULL, "/op <nick>", "Give op", cmd_op},
    {"voice", NULL, "/voice <nick>", "Give voice", cmd_voice},
    {"deop", NULL, "/deop <nick>", "Remove op", cmd_deop},
    {"devoice", NULL, "/devoice <nick>", "Remove voice", cmd_devoice},
    {"away", "a", "/away [msg]", "Away status", cmd_away},
    {"back", NULL, "/back", "Back online", cmd_back},
    {"ignore", NULL, "/ignore <nick>", "Ignore user", cmd_ignore},
    {"unignore", NULL, "/unignore <nick>", "Unignore user", cmd_unignore},
    {"version", "v", "/version", "Version", cmd_version},
    {"time", "t", "/time", "Time", cmd_time},
    {"ping", NULL, "/ping <nick>", "Ping user", cmd_ping},
    {"motd", NULL, "/motd", "MOTD", cmd_motd},
    {"stats", NULL, "/stats", "Stats", cmd_stats},
    {"admin", NULL, "/admin", "Admin info", cmd_admin},
    {"info", "i", "/info", "Server info", cmd_info},
    {"links", NULL, "/links", "Server links", cmd_links},
    {"clear", "c", "/clear", "Clear chat", cmd_clear},
    {"me", NULL, "/me <action>", "Action", cmd_me},
    {"action", NULL, "/action <action>", "Action", cmd_action},
    {"slap", NULL, "/slap <nick>", "Slap user", cmd_slap},
    {"status", "s", "/status", "Status", cmd_status},
    {"query", NULL, "/query <nick>", "Private chat", cmd_query},
    {"close", NULL, "/close", "Close query", cmd_close},
    {"invite", NULL, "/invite <nick> #chan", "Invite user", cmd_invite},
    {"kill", NULL, "/kill <nick>", "Kill (oper)", cmd_kill},
    {"oper", NULL, "/oper <login> <pwd>", "Become oper", cmd_oper},
    {"nickserv", "ns", "/ns <cmd>", "NickServ", cmd_nickserv},
    {"ns", NULL, "/ns <cmd>", "NickServ shortcut", cmd_ns},
    {"chanserv", "cs", "/cs <cmd>", "ChanServ", cmd_chanserv},
    {"cs", NULL, "/cs <cmd>", "ChanServ shortcut", cmd_cs},
    {"memoserv", "ms", "/ms <cmd>", "MemoServ", cmd_memoserv},
    {"ms", NULL, "/ms <cmd>", "MemoServ shortcut", cmd_ms},
    {"botserv", NULL, "/botserv <cmd>", "BotServ", cmd_botserv},
    {"hostserv", NULL, "/hostserv <cmd>", "HostServ", cmd_hostserv},
    {"theme", NULL, "/theme <name>", "Change theme", cmd_theme},
    {"reconnect", NULL, "/reconnect <opts>", "Auto-reconnect", cmd_reconnect},
    {"filter", NULL, "/filter <opts>", "Message filter", cmd_filter},
    {"alias", NULL, "/alias <opts>", "Command alias", cmd_alias},
    {"dcc", NULL, "/dcc <opts>", "DCC transfers", cmd_dcc},
    {"proxy", NULL, "/proxy <opts>", "Proxy settings", cmd_proxy},
    {"ipv6", NULL, "/ipv6 [addr]", "IPv6 support", cmd_ipv6},
    {"cert", NULL, "/cert <opts>", "TLS certs", cmd_cert},
    {"network", NULL, "/network <opts>", "Multi-network", cmd_network},
    {NULL, NULL, NULL, NULL, NULL}
};

// Command implementations
void cmd_help(irc_client_t *client, const char *args) {
    (void)client;
    if (args && args[0]) {
        show_command_help(args);
    } else {
        show_all_help();
    }
}

void cmd_join(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /join #channel");
        return;
    }
    irc_join_channel(client, args);
}

void cmd_part(irc_client_t *client, const char *args) {
    irc_leave_channel(client, args && args[0] ? args : client->current_channel);
}

void cmd_msg(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /msg <target> <message>");
        return;
    }
    char *space = strchr(args, ' ');
    if (!space) {
        gui_add_notice("Usage: /msg <target> <message>");
        return;
    }
    char target[64];
    int len = space - args;
    strncpy(target, args, len);
    target[len] = '\0';
    irc_send_message(client, target, space + 1);
}

void cmd_privmsg(irc_client_t *client, const char *args) {
    cmd_msg(client, args);
}

void cmd_notice(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /notice <target> <message>");
        return;
    }
    char *space = strchr(args, ' ');
    if (!space) {
        gui_add_notice("Usage: /notice <target> <message>");
        return;
    }
    char target[64];
    int len = space - args;
    strncpy(target, args, len);
    target[len] = '\0';
    char cmd[512];
    snprintf(cmd, sizeof(cmd) - 1, "NOTICE %s :%s", target, space + 1);
    irc_send_command(client, cmd);
}

void cmd_nick(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /nick <newnick>");
        return;
    }
    char cmd[128];
    snprintf(cmd, sizeof(cmd) - 1, "NICK %s", args);
    irc_send_command(client, cmd);
}

void cmd_quit(irc_client_t *client, const char *args) {
    char cmd[512];
    if (args && args[0]) {
        snprintf(cmd, sizeof(cmd) - 1, "QUIT :%s", args);
    } else {
        snprintf(cmd, sizeof(cmd) - 1, "QUIT :Leaving");
    }
    irc_send_command(client, cmd);
}

void cmd_names(irc_client_t *client, const char *args) {
    const char *channel = args && args[0] ? args : client->current_channel;
    irc_request_names(client, channel);
}

void cmd_who(irc_client_t *client, const char *args) {
    char cmd[128];
    if (args && args[0]) {
        snprintf(cmd, sizeof(cmd) - 1, "WHO %s", args);
    } else {
        snprintf(cmd, sizeof(cmd) - 1, "WHO");
    }
    irc_send_command(client, cmd);
}

void cmd_whois(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /whois <nick>");
        return;
    }
    char cmd[128];
    snprintf(cmd, sizeof(cmd) - 1, "WHOIS %s", args);
    irc_send_command(client, cmd);
}

void cmd_list(irc_client_t *client, const char *args) {
    char cmd[256];
    if (args && args[0]) {
        snprintf(cmd, sizeof(cmd) - 1, "LIST %s", args);
    } else {
        snprintf(cmd, sizeof(cmd) - 1, "LIST");
    }
    irc_send_command(client, cmd);
}

void cmd_topic(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        char cmd[64];
        snprintf(cmd, sizeof(cmd) - 1, "TOPIC %s", client->current_channel);
        irc_send_command(client, cmd);
        return;
    }
    char *space = strchr(args, ' ');
    if (space) {
        char channel[64];
        int len = space - args;
        strncpy(channel, args, len);
        channel[len] = '\0';
        char cmd[256];
        snprintf(cmd, sizeof(cmd) - 1, "TOPIC %s :%s", channel, space + 1);
        irc_send_command(client, cmd);
    } else {
        char cmd[128];
        snprintf(cmd, sizeof(cmd) - 1, "TOPIC %s", args);
        irc_send_command(client, cmd);
    }
}

void cmd_mode(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /mode [target] [+/-modes]");
        return;
    }
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "MODE %s", args);
    irc_send_command(client, cmd);
}

void cmd_kick(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /kick #channel <nick>");
        return;
    }
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "KICK %s", args);
    irc_send_command(client, cmd);
}

void cmd_ban(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /ban #channel <mask>");
        return;
    }
    char *space = strchr(args, ' ');
    if (!space) {
        gui_add_notice("Usage: /ban #channel <mask>");
        return;
    }
    char channel[64];
    int len = space - args;
    strncpy(channel, args, len);
    channel[len] = '\0';
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "MODE %s +b %s", channel, space + 1);
    irc_send_command(client, cmd);
}

void cmd_op(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /op #channel <nick>");
        return;
    }
    char *space = strchr(args, ' ');
    if (!space) {
        gui_add_notice("Usage: /op #channel <nick>");
        return;
    }
    char channel[64];
    int len = space - args;
    strncpy(channel, args, len);
    channel[len] = '\0';
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "MODE %s +o %s", channel, space + 1);
    irc_send_command(client, cmd);
}

void cmd_voice(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /voice #channel <nick>");
        return;
    }
    char *space = strchr(args, ' ');
    if (!space) {
        gui_add_notice("Usage: /voice #channel <nick>");
        return;
    }
    char channel[64];
    int len = space - args;
    strncpy(channel, args, len);
    channel[len] = '\0';
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "MODE %s +v %s", channel, space + 1);
    irc_send_command(client, cmd);
}

void cmd_deop(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /deop #channel <nick>");
        return;
    }
    char *space = strchr(args, ' ');
    if (!space) {
        gui_add_notice("Usage: /deop #channel <nick>");
        return;
    }
    char channel[64];
    int len = space - args;
    strncpy(channel, args, len);
    channel[len] = '\0';
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "MODE %s -o %s", channel, space + 1);
    irc_send_command(client, cmd);
}

void cmd_devoice(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /devoice #channel <nick>");
        return;
    }
    char *space = strchr(args, ' ');
    if (!space) {
        gui_add_notice("Usage: /devoice #channel <nick>");
        return;
    }
    char channel[64];
    int len = space - args;
    strncpy(channel, args, len);
    channel[len] = '\0';
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "MODE %s -v %s", channel, space + 1);
    irc_send_command(client, cmd);
}

void cmd_invite(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /invite <nick> #channel");
        return;
    }
    char *space = strchr(args, ' ');
    if (!space) {
        gui_add_notice("Usage: /invite <nick> #channel");
        return;
    }
    char nick[64];
    int len = space - args;
    strncpy(nick, args, len);
    nick[len] = '\0';
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "INVITE %s %s", nick, space + 1);
    irc_send_command(client, cmd);
}

void cmd_away(irc_client_t *client, const char *args) {
    char cmd[256];
    if (args && args[0]) {
        snprintf(cmd, sizeof(cmd) - 1, "AWAY :%s", args);
    } else {
        snprintf(cmd, sizeof(cmd) - 1, "AWAY");
    }
    irc_send_command(client, cmd);
}

void cmd_back(irc_client_t *client, const char *args) {
    (void)args;
    irc_send_command(client, "AWAY");
}

void cmd_ignore(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /ignore <nick>");
        return;
    }
    gui_add_notice("Ignoring: %s", args);
}

void cmd_unignore(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /unignore <nick>");
        return;
    }
    gui_add_notice("No longer ignoring: %s", args);
}

void cmd_version(irc_client_t *client, const char *args) {
    if (args && args[0]) {
        irc_send_ctcp_version(client, args);
    } else {
        irc_send_command(client, "VERSION");
    }
}

void cmd_time(irc_client_t *client, const char *args) {
    if (args && args[0]) {
        irc_send_ctcp_time(client, args);
    } else {
        irc_send_command(client, "TIME");
    }
}

void cmd_ping(irc_client_t *client, const char *args) {
    if (args && args[0]) {
        irc_send_ctcp_ping(client, args, NULL);
    } else {
        gui_add_notice("Usage: /ping <nick>");
    }
}

void cmd_motd(irc_client_t *client, const char *args) {
    char cmd[128];
    if (args && args[0]) {
        snprintf(cmd, sizeof(cmd) - 1, "MOTD %s", args);
    } else {
        snprintf(cmd, sizeof(cmd) - 1, "MOTD");
    }
    irc_send_command(client, cmd);
}

void cmd_stats(irc_client_t *client, const char *args) {
    char cmd[128];
    if (args && args[0]) {
        snprintf(cmd, sizeof(cmd) - 1, "STATS %s", args);
    } else {
        snprintf(cmd, sizeof(cmd) - 1, "STATS");
    }
    irc_send_command(client, cmd);
}

void cmd_admin(irc_client_t *client, const char *args) {
    char cmd[128];
    if (args && args[0]) {
        snprintf(cmd, sizeof(cmd) - 1, "ADMIN %s", args);
    } else {
        snprintf(cmd, sizeof(cmd) - 1, "ADMIN");
    }
    irc_send_command(client, cmd);
}

void cmd_info(irc_client_t *client, const char *args) {
    char cmd[128];
    if (args && args[0]) {
        snprintf(cmd, sizeof(cmd) - 1, "INFO %s", args);
    } else {
        snprintf(cmd, sizeof(cmd) - 1, "INFO");
    }
    irc_send_command(client, cmd);
}

void cmd_links(irc_client_t *client, const char *args) {
    char cmd[256];
    if (args && args[0]) {
        snprintf(cmd, sizeof(cmd) - 1, "LINKS %s", args);
    } else {
        snprintf(cmd, sizeof(cmd) - 1, "LINKS");
    }
    irc_send_command(client, cmd);
}

void cmd_clear(irc_client_t *client, const char *args) {
    (void)client;
    (void)args;
    gui_add_notice("Chat cleared");
}

void cmd_me(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /me <action>");
        return;
    }
    char msg[256];
    snprintf(msg, sizeof(msg) - 1, "\001ACTION %s\001", args);
    irc_send_message(client, client->current_channel, msg);
}

void cmd_action(irc_client_t *client, const char *args) {
    cmd_me(client, args);
}

void cmd_slap(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /slap <nick>");
        return;
    }
    char action[256];
    snprintf(action, sizeof(action) - 1, "slaps %s with a large trout", args);
    cmd_me(client, action);
}

void cmd_status(irc_client_t *client, const char *args) {
    (void)args;
    gui_add_notice("Connected: %s:%d | Channel: %s | Nick: %s",
                  client->server, client->port, 
                  client->current_channel, client->nickname);
}

void cmd_query(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /query <nick>");
        return;
    }
    gui_add_notice("Opening query with %s", args);
}

void cmd_close(irc_client_t *client, const char *args) {
    (void)client;
    (void)args;
    gui_add_notice("Query closed");
}

void cmd_nickserv(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /nickserv <command>");
        return;
    }
    irc_send_message(client, "NickServ", (char *)args);
}

void cmd_ns(irc_client_t *client, const char *args) {
    cmd_nickserv(client, args);
}

void cmd_chanserv(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /chanserv <command>");
        return;
    }
    irc_send_message(client, "ChanServ", (char *)args);
}

void cmd_cs(irc_client_t *client, const char *args) {
    cmd_chanserv(client, args);
}

void cmd_memoserv(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /memoserv <command>");
        return;
    }
    irc_send_message(client, "MemoServ", (char *)args);
}

void cmd_ms(irc_client_t *client, const char *args) {
    cmd_memoserv(client, args);
}

void cmd_botserv(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /botserv <command>");
        return;
    }
    irc_send_message(client, "BotServ", (char *)args);
}

void cmd_hostserv(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /hostserv <command>");
        return;
    }
    irc_send_message(client, "HostServ", (char *)args);
}

void cmd_oper(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /oper <login> <password>");
        return;
    }
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "OPER %s", args);
    irc_send_command(client, cmd);
}

void cmd_kill(irc_client_t *client, const char *args) {
    if (!args || !args[0]) {
        gui_add_notice("Usage: /kill <nick> <reason> (oper only)");
        return;
    }
    char cmd[256];
    snprintf(cmd, sizeof(cmd) - 1, "KILL %s", args);
    irc_send_command(client, cmd);
}

void cmd_theme(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Available themes: default, dark, light, neon");
        return;
    }
    gui_add_notice("Theme set to: %s", args);
}

void cmd_reconnect(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /reconnect enable|disable|status");
        return;
    }
    gui_add_notice("Auto-reconnect: %s", args);
}

void cmd_filter(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /filter add|remove|list <pattern>");
        return;
    }
    gui_add_notice("Filter: %s", args);
}

void cmd_alias(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /alias add|remove|list <name>");
        return;
    }
    gui_add_notice("Alias: %s", args);
}

void cmd_dcc(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /dcc send|receive|list <params>");
        return;
    }
    gui_add_notice("DCC: %s", args);
}

void cmd_proxy(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /proxy socks5|http|disable <host>:<port>");
        return;
    }
    gui_add_notice("Proxy: %s", args);
}

void cmd_ipv6(irc_client_t *client, const char *args) {
    (void)client;
    (void)args;
    gui_add_notice("IPv6 Support: Enabled");
}

void cmd_cert(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /cert pin|verify|allow-selfsigned");
        return;
    }
    gui_add_notice("Certificate: %s", args);
}

void cmd_network(irc_client_t *client, const char *args) {
    (void)client;
    if (!args || !args[0]) {
        gui_add_notice("Usage: /network add|remove|switch|list");
        return;
    }
    gui_add_notice("Network: %s", args);
}

// Main command processor
int process_command(irc_client_t *client, const char *input) {
    if (!input || !input[0]) return -1;
    
    const char *cmd_str = input;
    if (input[0] == '/') {
        cmd_str = input + 1;
    }
    
    char cmd_name[64];
    const char *args = "";
    
    char *space = strchr(cmd_str, ' ');
    if (space) {
        int cmd_len = space - cmd_str;
        strncpy(cmd_name, cmd_str, cmd_len);
        cmd_name[cmd_len] = '\0';
        args = space + 1;
    } else {
        strncpy(cmd_name, cmd_str, 63);
        cmd_name[63] = '\0';
    }
    
    const irc_command_t *cmd = find_command(cmd_name);
    
    if (cmd && cmd->handler) {
        cmd->handler(client, args);
        return 0;
    }
    
    gui_add_notice("Unknown command: %s. Try /help", cmd_name);
    return -1;
}

const irc_command_t *find_command(const char *name) {
    if (!name) return NULL;
    
    for (int i = 0; commands[i].command; i++) {
        if (strcasecmp(commands[i].command, name) == 0) {
            return &commands[i];
        }
        if (commands[i].alias && strcasecmp(commands[i].alias, name) == 0) {
            return &commands[i];
        }
    }
    
    return NULL;
}

void show_command_help(const char *command_name) {
    const irc_command_t *cmd = find_command(command_name);
    
    if (!cmd) {
        gui_add_notice("Unknown command: %s", command_name);
        return;
    }
    
    gui_add_notice("──────────────────────────");
    gui_add_notice("Command: %s", cmd->command);
    if (cmd->alias) {
        gui_add_notice("Alias: /%s", cmd->alias);
    }
    gui_add_notice("Syntax: %s", cmd->syntax);
    gui_add_notice("Help: %s", cmd->description);
    gui_add_notice("──────────────────────────");
}

void show_all_help(void) {
    gui_add_notice("════════════════════════════════════════════════════════════");
    gui_add_notice("                    A-Net IRC - Commands Help");
    gui_add_notice("════════════════════════════════════════════════════════════");
    gui_add_notice(" ");
    gui_add_notice("BASIC: /join, /part, /msg, /nick, /quit");
    gui_add_notice("INFO: /names, /whois, /who, /list, /version, /time, /ping");
    gui_add_notice("CHANNEL: /topic, /mode, /op, /voice, /kick, /ban, /invite");
    gui_add_notice("STATUS: /away, /back, /status, /ignore, /unignore");
    gui_add_notice("SERVER: /motd, /stats, /admin, /info, /links");
    gui_add_notice("ACTIONS: /me, /action, /slap, /query, /close");
    gui_add_notice("SERVICES: /ns, /cs, /ms, /botserv, /hostserv, /oper");
    gui_add_notice("ADVANCED: /theme, /network, /reconnect, /filter, /alias");
    gui_add_notice("          /dcc, /proxy, /ipv6, /cert");
    gui_add_notice(" ");
    gui_add_notice("Type /help <command> for more info on a specific command");
    gui_add_notice("════════════════════════════════════════════════════════════");
}