Adjust bot to changes in config.
Temporarily disable jan and papiez plugins until.master
parent
bc36369497
commit
1a298e4e06
|
@ -0,0 +1,11 @@
|
|||
package bot
|
||||
|
||||
import (
|
||||
"github.com/arachnist/gorepost/config"
|
||||
)
|
||||
|
||||
var cfg *config.Config
|
||||
|
||||
func Initialize(config *config.Config) {
|
||||
cfg = config
|
||||
}
|
|
@ -7,7 +7,6 @@ package bot
|
|||
import (
|
||||
"log"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ import (
|
|||
"github.com/moovweb/gokogiri"
|
||||
"github.com/moovweb/gokogiri/xpath"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ package bot
|
|||
import (
|
||||
"strings"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build configfix
|
||||
//
|
||||
// Copyright 2015 Robert S. Gerus. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
@ -11,7 +13,6 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import (
|
|||
"log"
|
||||
"regexp"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build configfix
|
||||
//
|
||||
// Copyright 2015 Robert S. Gerus. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
@ -11,7 +13,6 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
@ -257,7 +257,7 @@ var eventTests = []struct {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
/* {
|
||||
desc: "papież",
|
||||
in: irc.Message{
|
||||
Command: "PRIVMSG",
|
||||
|
@ -336,7 +336,7 @@ var eventTests = []struct {
|
|||
Trailing: "Jan Paweł II predicate małe specified-object",
|
||||
},
|
||||
},
|
||||
},
|
||||
}, */
|
||||
{
|
||||
desc: "roll multiple",
|
||||
in: irc.Message{
|
||||
|
@ -815,6 +815,9 @@ func configLookupHelper(map[string]string) []string {
|
|||
|
||||
func TestMain(m *testing.M) {
|
||||
log.SetOutput(ioutil.Discard)
|
||||
cfg.SetFileListBuilder(configLookupHelper)
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func init() {
|
||||
Initialize(config.New(configLookupHelper))
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import (
|
|||
|
||||
"github.com/cloudflare/gokabinet/kt"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
cfg "github.com/arachnist/gorepost/config"
|
||||
"github.com/arachnist/gorepost/irc"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue