diff --git a/main.go b/main.go index a383f83..681362b 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,14 @@ import ( "github.com/velour/catbase/config" "github.com/velour/catbase/irc" "github.com/velour/catbase/plugins" + "github.com/velour/catbase/plugins/admin" + "github.com/velour/catbase/plugins/beers" "github.com/velour/catbase/plugins/counter" + "github.com/velour/catbase/plugins/dice" + "github.com/velour/catbase/plugins/downtime" + "github.com/velour/catbase/plugins/fact" + "github.com/velour/catbase/plugins/talker" + "github.com/velour/catbase/plugins/your" "github.com/velour/catbase/slack" ) @@ -34,18 +41,18 @@ func main() { b := bot.NewBot(c, client) // b.AddHandler(plugins.NewTestPlugin(b)) - b.AddHandler("admin", plugins.NewAdminPlugin(b)) + b.AddHandler("admin", admin.NewAdminPlugin(b)) // b.AddHandler("first", plugins.NewFirstPlugin(b)) - b.AddHandler("downtime", plugins.NewDowntimePlugin(b)) - b.AddHandler("talker", plugins.NewTalkerPlugin(b)) - b.AddHandler("dice", plugins.NewDicePlugin(b)) - b.AddHandler("beers", plugins.NewBeersPlugin(b)) + b.AddHandler("downtime", downtime.NewDowntimePlugin(b)) + b.AddHandler("talker", talker.NewTalkerPlugin(b)) + b.AddHandler("dice", dice.NewDicePlugin(b)) + b.AddHandler("beers", beers.NewBeersPlugin(b)) b.AddHandler("counter", counter.NewCounterPlugin(b)) - b.AddHandler("remember", plugins.NewRememberPlugin(b)) + b.AddHandler("remember", fact.NewRememberPlugin(b)) b.AddHandler("skeleton", plugins.NewSkeletonPlugin(b)) - b.AddHandler("your", plugins.NewYourPlugin(b)) + b.AddHandler("your", your.NewYourPlugin(b)) // catches anything left, will always return true - b.AddHandler("factoid", plugins.NewFactoidPlugin(b)) + b.AddHandler("factoid", fact.NewFactoidPlugin(b)) client.Serve() } diff --git a/plugins/admin.go b/plugins/admin/admin.go similarity index 99% rename from plugins/admin.go rename to plugins/admin/admin.go index 9ef3227..f7f60d8 100644 --- a/plugins/admin.go +++ b/plugins/admin/admin.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package admin import ( "database/sql" diff --git a/plugins/beers.go b/plugins/beers/beers.go similarity index 99% rename from plugins/beers.go rename to plugins/beers/beers.go index 8a92c8d..1b16150 100644 --- a/plugins/beers.go +++ b/plugins/beers/beers.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package beers import ( "encoding/json" diff --git a/plugins/dice.go b/plugins/dice/dice.go similarity index 99% rename from plugins/dice.go rename to plugins/dice/dice.go index e25eef9..d414933 100644 --- a/plugins/dice.go +++ b/plugins/dice/dice.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package dice import "github.com/velour/catbase/bot" diff --git a/plugins/downtime.go b/plugins/downtime/downtime.go similarity index 99% rename from plugins/downtime.go rename to plugins/downtime/downtime.go index 3fe5b24..b5e9473 100644 --- a/plugins/downtime.go +++ b/plugins/downtime/downtime.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package downtime import ( "database/sql" diff --git a/plugins/factoid.go b/plugins/fact/factoid.go similarity index 99% rename from plugins/factoid.go rename to plugins/fact/factoid.go index b45e3fa..9573057 100644 --- a/plugins/factoid.go +++ b/plugins/fact/factoid.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package fact import ( "database/sql" diff --git a/plugins/remember.go b/plugins/fact/remember.go similarity index 99% rename from plugins/remember.go rename to plugins/fact/remember.go index ed6e43f..609fd02 100644 --- a/plugins/remember.go +++ b/plugins/fact/remember.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package fact import ( "fmt" diff --git a/plugins/webTemplates.go b/plugins/fact/webTemplates.go similarity index 99% rename from plugins/webTemplates.go rename to plugins/fact/webTemplates.go index efe11a9..1c2d115 100644 --- a/plugins/webTemplates.go +++ b/plugins/fact/webTemplates.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package fact // I hate this, but I'm creating strings of the templates to avoid having to // track where templates reside. diff --git a/plugins/first.go b/plugins/first/first.go similarity index 99% rename from plugins/first.go rename to plugins/first/first.go index 15ad9b0..3bc43a7 100644 --- a/plugins/first.go +++ b/plugins/first/first.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package first import ( "database/sql" diff --git a/plugins/talker.go b/plugins/talker/talker.go similarity index 99% rename from plugins/talker.go rename to plugins/talker/talker.go index eedd190..2236078 100644 --- a/plugins/talker.go +++ b/plugins/talker/talker.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package talker import ( "fmt" diff --git a/plugins/your.go b/plugins/your/your.go similarity index 99% rename from plugins/your.go rename to plugins/your/your.go index 0fb1eea..4f02b67 100644 --- a/plugins/your.go +++ b/plugins/your/your.go @@ -1,6 +1,6 @@ // © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. -package plugins +package your import ( "log"