Fix Dispatcher()

It tried to look up things in WhitelistedPlugins despite it not being declared.
configurable-file-paths
Robert Gerus 2015-11-18 16:51:10 +01:00
parent bbe1a3288a
commit 7a5f48784d
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ func Dispatcher(output chan irc.Message, input irc.Message) {
}
if callbacks[input.Command] != nil {
if cfg.LookupStringMap(input.Context, "WhitelistedPlugins") != nil {
if len(cfg.LookupStringMap(input.Context, "WhitelistedPlugins")) > 0 {
for i, f := range callbacks[input.Command] {
if _, ok := cfg.LookupStringMap(input.Context, "DisabledPlugins")[i]; ok {
log.Println("Context:", input.Context, "Plugin disabled", i)