make isValidChannelMode public

This commit is contained in:
Liam Stanley 2017-02-20 21:30:44 -05:00
parent fabc1c65b8
commit 59d4358d66

View File

@ -253,8 +253,8 @@ func newCModes(channelModes, userPrefixes string) CModes {
}
}
// isValidChannelMode validates a channel mode (CHANMODES).
func isValidChannelMode(raw string) bool {
// IsValidChannelMode validates a channel mode (CHANMODES).
func IsValidChannelMode(raw string) bool {
if len(raw) < 1 {
return false
}
@ -363,7 +363,7 @@ func handleMODE(c *Client, e Event) {
// chanModes returns the ISUPPORT list of server-supported channel modes,
// alternatively falling back to ModeDefaults.
func (s *state) chanModes() string {
if modes, ok := s.serverOptions["CHANMODES"]; ok && isValidChannelMode(modes) {
if modes, ok := s.serverOptions["CHANMODES"]; ok && IsValidChannelMode(modes) {
return modes
}