aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/mt-multiserver-proxy/.gitignore1
-rw-r--r--process.go1
-rw-r--r--telnet.go2
3 files changed, 2 insertions, 2 deletions
diff --git a/cmd/mt-multiserver-proxy/.gitignore b/cmd/mt-multiserver-proxy/.gitignore
index ef1a813..238faa1 100644
--- a/cmd/mt-multiserver-proxy/.gitignore
+++ b/cmd/mt-multiserver-proxy/.gitignore
@@ -2,3 +2,4 @@ config.json
cache/
*.log
auth/
+mt-multiserver-proxy
diff --git a/process.go b/process.go
index 5208c97..fd4f19b 100644
--- a/process.go
+++ b/process.go
@@ -538,7 +538,6 @@ func (sc *ServerConn) process(pkt mt.Pkt) {
return
case *mt.ToCltKick:
sc.Log("<-", "deny access", cmd)
-
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) {
diff --git a/telnet.go b/telnet.go
index c98e25a..015f022 100644
--- a/telnet.go
+++ b/telnet.go
@@ -64,7 +64,7 @@ func handleTelnet(conn net.Conn) {
readString := func(delim byte) (string, error) {
s, err := bufio.NewReader(conn).ReadString(delim)
- i := int(math.Max(float64(len(s)-2), 1))
+ i := int(math.Max(float64(len(s)-1), 1))
s = s[:i]
return s, err
}