goimports
parent
0901f91b42
commit
a43b511fbe
|
@ -86,7 +86,7 @@ func FallbackServers(server string) []string {
|
|||
fallbacks := make([]string, 0)
|
||||
|
||||
conf := Conf()
|
||||
|
||||
|
||||
// find server
|
||||
for _, srv := range conf.Servers {
|
||||
if srv.Name == server {
|
||||
|
@ -100,7 +100,7 @@ func FallbackServers(server string) []string {
|
|||
if len(conf.Servers) == 0 {
|
||||
return fallbacks
|
||||
}
|
||||
|
||||
|
||||
return append(fallbacks, conf.Servers[0].Name)
|
||||
} else {
|
||||
return append(fallbacks, conf.FallbackServers...)
|
||||
|
|
|
@ -538,7 +538,7 @@ 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 == cmd.TooManyClts || cmd.Reason == cmd.UnsupportedVer {
|
||||
clt.SendChatMsg(cmd.String())
|
||||
for _, srvName := range FallbackServers(sc.name) {
|
||||
|
@ -547,7 +547,7 @@ func (sc *ServerConn) process(pkt mt.Pkt) {
|
|||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue