aboutsummaryrefslogtreecommitdiff
path: root/cmd_user.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-30 01:23:40 +0000
committerRunxi Yu <me@runxiyu.org>2024-12-30 01:23:40 +0000
commitdce03955174abe5ad83c01c930e3bf47fe39d8ce (patch)
treecf4cddc3f83bc6eb9efd5be959d349fa47606c84 /cmd_user.go
parentReformat (diff)
downloadmeseircd-dce03955174abe5ad83c01c930e3bf47fe39d8ce.tar.gz
meseircd-dce03955174abe5ad83c01c930e3bf47fe39d8ce.tar.zst
meseircd-dce03955174abe5ad83c01c930e3bf47fe39d8ce.zip
Revamp
Diffstat (limited to '')
-rw-r--r--cmd_user.go31
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
-}