diff --git a/irc/config.go b/irc/config.go index c0d94656..12e47ce0 100644 --- a/irc/config.go +++ b/irc/config.go @@ -537,8 +537,7 @@ type Config struct { } Roleplay struct { - Enabled *bool - enabled bool + Enabled bool RequireChanops bool `yaml:"require-chanops"` RequireOper bool `yaml:"require-oper"` AddSuffix *bool `yaml:"add-suffix"` @@ -1192,7 +1191,6 @@ func LoadConfig(filename string) (config *Config, err error) { config.History.ZNCMax = config.History.ChathistoryMax } - config.Roleplay.enabled = utils.BoolDefaultTrue(config.Roleplay.Enabled) config.Roleplay.addSuffix = utils.BoolDefaultTrue(config.Roleplay.AddSuffix) config.Datastore.MySQL.ExpireTime = time.Duration(config.History.Restrictions.ExpireTime) @@ -1272,7 +1270,7 @@ func (config *Config) generateISupport() (err error) { isupport.Add("NETWORK", config.Network.Name) isupport.Add("NICKLEN", strconv.Itoa(config.Limits.NickLen)) isupport.Add("PREFIX", "(qaohv)~&@%+") - if config.Roleplay.enabled { + if config.Roleplay.Enabled { isupport.Add("RPCHAN", "E") isupport.Add("RPUSER", "E") } diff --git a/irc/roleplay.go b/irc/roleplay.go index fdd59584..9da11f9e 100644 --- a/irc/roleplay.go +++ b/irc/roleplay.go @@ -18,7 +18,7 @@ const ( func sendRoleplayMessage(server *Server, client *Client, source string, targetString string, isAction bool, messageParts []string, rb *ResponseBuffer) { config := server.Config() - if !config.Roleplay.enabled { + if !config.Roleplay.Enabled { rb.Add(nil, client.server.name, ERR_CANNOTSENDRP, targetString, client.t("Roleplaying has been disabled by the server administrators")) return }