aboutsummaryrefslogtreecommitdiff
path: root/clients.go
diff options
context:
space:
mode:
Diffstat (limited to 'clients.go')
-rw-r--r--clients.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/clients.go b/clients.go
index eb97ebe..0744bcf 100644
--- a/clients.go
+++ b/clients.go
@@ -1,9 +1,10 @@
package main
import (
- "log/slog"
"net"
"sync"
+
+ "git.sr.ht/~runxiyu/meseircd/meselog"
)
type Client struct {
@@ -27,7 +28,7 @@ func (client *Client) SendRaw(s string) error {
if client.conn == nil {
panic("not implemented")
}
- slog.Debug("send", "line", s, "client", client.CID)
+ meselog.Debug("send", "line", s, "client", client.CID)
_, err := (*client.conn).Write([]byte(s))
if err != nil {
// TODO: Should shut down the netFd instead but the stdlib
@@ -52,11 +53,11 @@ func (client *Client) Teardown() {
(*client.conn).Close()
}
if !cidToClient.CompareAndDelete(client.CID, client) {
- slog.Error("cid inconsistent", "cid", client.CID, "client", client)
+ meselog.Error("cid inconsistent", "cid", client.CID, "client", client)
}
if client.State >= ClientStateRegistered || client.Nick != "*" {
if !nickToClient.CompareAndDelete(client.Nick, client) {
- slog.Error("nick inconsistent", "nick", client.Nick, "client", client)
+ meselog.Error("nick inconsistent", "nick", client.Nick, "client", client)
}
}
}