Fix translation assistance message
This commit is contained in:
parent
6ee19cf45d
commit
591a96d2e5
1 changed files with 13 additions and 8 deletions
|
@ -202,16 +202,21 @@ func (s *server) handleFirstCommand(cmd serverCommand, keyword string, params []
|
|||
s.sendMOTD(cmd.client)
|
||||
|
||||
// Request translation assistance from international users.
|
||||
var found bool
|
||||
for _, language := range translatedLanguages {
|
||||
if language == cmd.client.language {
|
||||
found = true
|
||||
break
|
||||
if strings.HasPrefix(cmd.client.language, "bgammon-") {
|
||||
clientLanguage := cmd.client.language[8:]
|
||||
if clientLanguage != "" {
|
||||
var found bool
|
||||
for _, language := range translatedLanguages {
|
||||
if language == clientLanguage {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
cmd.client.sendNotice("Help translate this application into your preferred language at bgammon.org/translate")
|
||||
}
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
cmd.client.sendNotice("Help translate this application into your preferred language at bgammon.org/translate")
|
||||
}
|
||||
|
||||
c := cmd.client
|
||||
if c.accountID != 0 {
|
||||
|
|
Loading…
Reference in a new issue