From dce03955174abe5ad83c01c930e3bf47fe39d8ce Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 30 Dec 2024 01:23:40 +0000 Subject: Revamp --- cmd_user.go | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 cmd_user.go (limited to 'cmd_user.go') diff --git a/cmd_user.go b/cmd_user.go deleted file mode 100644 index 93ee17e..0000000 --- a/cmd_user.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( -// "log/slog" -) - -func init() { - CommandHandlers["USER"] = handleClientUser -} - -func handleClientUser(msg RMsg, client *Client) error { - if len(msg.Params) < 4 { - return client.Send(MakeMsg(self, ERR_NEEDMOREPARAMS, "USER", "Not enough parameters")) - } - switch { - case client.State < ClientStateRegistered: - client.Ident = "~" + msg.Params[0] - client.Gecos = msg.Params[3] - err := client.checkRegistration() - if err != nil { - return err - } - case client.State == ClientStateRegistered: - err := client.Send(MakeMsg(self, ERR_ALREADYREGISTERED, client.Nick, "You may not reregister")) - if err != nil { - return err - } - case client.State == ClientStateRemote: - } - return nil -} -- cgit v1.2.3