nmdc-ircfrontend/quirks.go

27 lines
480 B
Go
Raw Normal View History

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{}
}
}