diff --git a/irc/config.go b/irc/config.go index 905ff432..be365a21 100644 --- a/irc/config.go +++ b/irc/config.go @@ -398,7 +398,7 @@ func LoadConfig(filename string) (config *Config, err error) { var newWebIRC []webircConfig for _, webirc := range config.Server.WebIRC { // skip webirc blocks with no hosts (such as the example one) - if len(webirc.hosts) == 0 { + if len(webirc.Hosts) == 0 { continue } diff --git a/irc/gateways.go b/irc/gateways.go index 03cd3a0e..a0328f4b 100644 --- a/irc/gateways.go +++ b/irc/gateways.go @@ -16,15 +16,15 @@ import ( ) type webircConfig struct { - passwordString string `yaml:"password"` - password []byte `yaml:"password-bytes"` - hosts []string + PasswordString string `yaml:"password"` + Password []byte `yaml:"password-bytes"` + Hosts []string } // ProcessPassword populates our password. func (wc *webircConfig) ProcessPassword() error { - password, error := passwd.DecodePasswordHash(wc.passwordString) - wc.password = password + password, error := passwd.DecodePasswordHash(wc.PasswordString) + wc.Password = password return error } @@ -40,11 +40,11 @@ func webircHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { server.configurableStateMutex.RLock() defer server.configurableStateMutex.RUnlock() for _, info := range server.webirc { - for _, address := range info.hosts { + for _, address := range info.Hosts { if clientHostname == address || clientAddress == address { // confirm password givenPassword := msg.Params[0] - if passwd.ComparePasswordString(info.password, givenPassword) == nil { + if passwd.ComparePasswordString(info.Password, givenPassword) == nil { proxiedIP := msg.Params[3] return client.ApplyProxiedIP(proxiedIP)