aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth_files.go1
-rw-r--r--chat.go2
-rw-r--r--config.go2
-rw-r--r--process.go4
4 files changed, 3 insertions, 6 deletions
diff --git a/auth_files.go b/auth_files.go
index e6b4abf..e05cff3 100644
--- a/auth_files.go
+++ b/auth_files.go
@@ -146,7 +146,6 @@ func (a authFiles) Unban(id string) error {
if string(name) == id {
return os.Remove(Path("ban/", f.Name()))
- break
}
}
}
diff --git a/chat.go b/chat.go
index 8a10f05..61e8ca8 100644
--- a/chat.go
+++ b/chat.go
@@ -20,7 +20,7 @@ func (cc *ClientConn) SendChatMsg(msg ...string) {
// Colorize returns the minetest-colorized version of the input.
func Colorize(text, color string) string {
- return string(0x1b) + "(c@" + color + ")" + text + string(0x1b) + "(c@#FFF)"
+ return string([]rune{0x1b}) + "(c@" + color + ")" + text + string([]rune{0x1b}) + "(c@#FFF)"
}
func onChatMsg(cc *ClientConn, cmd *mt.ToSrvChatMsg) (string, bool) {
diff --git a/config.go b/config.go
index d3394dd..4adb4ae 100644
--- a/config.go
+++ b/config.go
@@ -105,8 +105,6 @@ func FallbackServers(server string) []string {
} else {
return append(fallbacks, conf.FallbackServers...)
}
-
- return fallbacks
}
// LoadConfig attempts to parse the configuration file.
diff --git a/process.go b/process.go
index 59b8f06..5208c97 100644
--- a/process.go
+++ b/process.go
@@ -539,10 +539,10 @@ func (sc *ServerConn) process(pkt mt.Pkt) {
case *mt.ToCltKick:
sc.Log("<-", "deny access", cmd)
- if cmd.Reason == mt.Shutdown || cmd.Reason == mt.Crash || cmd.Reason == mt.SrvErr || cmd.Reason == cmd.TooManyClts || cmd.Reason == cmd.UnsupportedVer {
+ if cmd.Reason == mt.Shutdown || cmd.Reason == mt.Crash || cmd.Reason == mt.SrvErr || cmd.Reason == mt.TooManyClts || cmd.Reason == mt.UnsupportedVer {
clt.SendChatMsg(cmd.String())
for _, srvName := range FallbackServers(sc.name) {
- if err := clt.Hop(); err != nil {
+ if err := clt.Hop(srvName); err != nil {
clt.Log("<-", err)
break
}