]> Cypherpunks.ru repositories - goircd.git/blobdiff - client.go
io/ioutil is deprecated since Go 1.16
[goircd.git] / client.go
index 6e82e1409794db633ba4eca3b27cf7c31994cc9f..bd65d37915e99f02417a44182535db6fd5ec2180 100644 (file)
--- a/client.go
+++ b/client.go
@@ -23,9 +23,9 @@ import (
        "crypto/subtle"
        "encoding/hex"
        "fmt"
-       "io/ioutil"
        "log"
        "net"
+       "os"
        "regexp"
        "sort"
        "strings"
@@ -233,7 +233,7 @@ func (c *Client) SendMotd() {
                c.ReplyNicknamed("422", "MOTD File is missing")
                return
        }
-       motdText, err := ioutil.ReadFile(*motd)
+       motdText, err := os.ReadFile(*motd)
        if err != nil {
                log.Printf("can not read motd file %s: %v", *motd, err)
                c.ReplyNicknamed("422", "Error reading MOTD File")
@@ -418,7 +418,7 @@ func (c *Client) Register(cmd string, cols []string) {
                                c.Close()
                                return
                        }
-                       contents, err := ioutil.ReadFile(*passwords)
+                       contents, err := os.ReadFile(*passwords)
                        if err != nil {
                                log.Fatalf("can not read passwords file %s: %s", *passwords, err)
                                return