From: Egor Date: Wed, 11 May 2022 20:23:23 +0000 (+0300) Subject: add GHOST command X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=67a5c97c0b5e7f8a87f013d1c7d0e69d0fd06b49;p=patchyircd.git add GHOST command --- diff --git a/irc.c b/irc.c index c400507..3be72f9 100644 --- a/irc.c +++ b/irc.c @@ -303,6 +303,15 @@ int processPacket(struct client_data *client, char *source, char *command, int a msg_notice_server(hostname, client->nick, "Your information has been recorded. Contact IRCops for assistance with registration."); sendbuf(client); + } else if(strcmp(command, "GHOST") == 0) { + if (client->umode & UMODE_REGISTERED) + return 0; // FIXME: error message + struct client_data *cl = findClient(client->username); + if (!cl) + return 0; // FIXME: error message + if (client == cl) + return 0; // FIXME: error message + killConnection(cl, false); } else if(strcmp(command, "JEDGAR") == 0) { if (!is_registered(client)) return err_notregistered(client), sendbuf(client), 0;