diff options
Diffstat (limited to 'cmd_user.go')
-rw-r--r-- | cmd_user.go | 31 |
1 files changed, 0 insertions, 31 deletions
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 -} |