nmdc-ircfrontend/quirks.go
2018-03-24 14:37:40 +13:00

27 lines
480 B
Go

package main
import (
"strings"
)
type Quirks struct {
SendNamesOnWho bool
RequireNickForGeneralMessages bool
}
func GetQuirksForClient(ver string) Quirks {
if strings.Contains(ver, "HexChat") {
return Quirks{
SendNamesOnWho: true,
}
} else if strings.Contains(ver, "mIRC") || /*strings.Contains(ver, "Revolution") ||*/ strings.Contains(ver, "Atomic") {
return Quirks{
RequireNickForGeneralMessages: true,
}
} else {
return Quirks{}
}
}