diff --git a/.gitignore b/.gitignore index 2462b1e..4ca04be 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,6 @@ _cgo_export.* _testmain.go *.exe -alepale +catbase config.json *.db diff --git a/.travis.yml b/.travis.yml index 422e13e..742e73c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,3 @@ language: go go: 1.1 branches: master - rewrite diff --git a/README.md b/README.md index 0fc155d..96d357f 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,36 @@ -# AlePale +# CatBase -[![Build Status](https://api.travis-ci.org/chrissexton/alepale.png)](http://travis-ci.org/chrissexton/alepale) - -AlePale is a bot that trolls our little corner of the IRC world and keeps our friends laughing from time to time. Sometimes he makes us angry too. He is crafted as a clone of XKCD's Bucket bot, which learns from things he's told and regurgitates his knowledge to the various channels that he lives in. I've found in many such projects that randomness can often make bots feel much more alive than they are, so AlePale is a big experiment in how great randomness is. - -- [Project Page](http://chrissexton.org/projects/alepale) +CatBase is a bot that trolls our little corner of the IRC world and keeps our friends laughing from time to time. Sometimes he makes us angry too. He is crafted as a clone of XKCD's Bucket bot, which learns from things he's told and regurgitates his knowledge to the various channels that he lives in. I've found in many such projects that randomness can often make bots feel much more alive than they are, so CatBase is a big experiment in how great randomness is. ## Getting Help The bot has some very basic help functions built in. Just ask for help and he'll give it to you! -> Chris: AlePale, help +> Chris: CatBase, help -> AlePale: Help topics: about variables, talker, remember, admin, factoid, beers, skeleton +> CatBase: Help topics: about variables, talker, remember, admin, factoid, beers, skeleton -> Chris: AlePale, help about +> Chris: CatBase, help about -> AlePale: Hi, I'm based on godeepintir version 0.81. I'm written in Go, and you can find my source code on the internet here: http://bitbucket.org/phlyingpenguin/godeepintir +> CatBase: Hi, I'm based on godeepintir version 0.81. I'm written in Go, and you can find my source code on the internet here: http://bitbucket.org/phlyingpenguin/godeepintir ## Factoids -The primary interaction with AlePale is through factoids. These are simply just statements which can be taught to the bot and triggered at a later time. They may be triggered via the text specified in a factoid, or they may be triggered randomly by the bot when the room is silent. A simple factoid takes the shape of some trigger text, a verb, and the body of the factoid. By default, the verb is included in the full text that the bot repeats, but there are two special verbs, <reply> and <action> which do not come out in the final message. +The primary interaction with CatBase is through factoids. These are simply just statements which can be taught to the bot and triggered at a later time. They may be triggered via the text specified in a factoid, or they may be triggered randomly by the bot when the room is silent. A simple factoid takes the shape of some trigger text, a verb, and the body of the factoid. By default, the verb is included in the full text that the bot repeats, but there are two special verbs, <reply> and <action> which do not come out in the final message. An example: -> Chris: AlePale, Chris <is> amazing. +> Chris: CatBase, Chris <is> amazing. -> AlePale: Okay Chris. +> CatBase: Okay Chris. -> Chris: AlePale, Chris +> Chris: CatBase, Chris -> AlePale: Chris is amazing. +> CatBase: Chris is amazing. -When teaching facts, verbs are always enclosed with <>, no exceptions. Using <reply> causes AlePale to reply with only the body text, omitting both the verb and the trigger. Using <action> is similar to the <reply> verb except he sends an IRC action (/me) instead of a regular reply. +When teaching facts, verbs are always enclosed with <>, no exceptions. Using <reply> causes CatBase to reply with only the body text, omitting both the verb and the trigger. Using <action> is similar to the <reply> verb except he sends an IRC action (/me) instead of a regular reply. -Factoids can be removed by telling the bot, "forget that." They can be searched and updated using the =~ operator. This works by giving a trigger, the operator, and an RE2 compatible regular expression. For example, "AlePale: Chris =~ s/amazing/the best/" would update the previous factoid to be more accurate. +Factoids can be removed by telling the bot, "forget that." They can be searched and updated using the =~ operator. This works by giving a trigger, the operator, and an RE2 compatible regular expression. For example, "CatBase: Chris =~ s/amazing/the best/" would update the previous factoid to be more accurate. ### Variables @@ -63,17 +59,17 @@ An example: > Chris: Everything I say is great. -> Jordan: AlePale, remember Chris Everything +> Jordan: CatBase, remember Chris Everything -> AlePale: Okay Jordan. Remembering what Chris said about Everything. +> CatBase: Okay Jordan. Remembering what Chris said about Everything. -> Jordan: AlePale, Chris quotes +> Jordan: CatBase, Chris quotes -> AlePale: Chris: Everything I say is great. +> CatBase: Chris: Everything I say is great. ## Beers -One of the fun parts about AlePale is that he remembers how many beers we have. Gamification of our drinking habits is a great motivator to get out and have more beer, so he will keep track. The keywords to know are: beers, beers++, beers = X (where X is an integer), and puke. Upon puking, your beer count is reset. Otherwise, the functionality is obvious. The spacing on "beers++" and "beers = X" is important. He also knows "bourbon++" if you're drinking something else. This counts as two beers, use sparingly! +One of the fun parts about CatBase is that he remembers how many beers we have. Gamification of our drinking habits is a great motivator to get out and have more beer, so he will keep track. The keywords to know are: beers, beers++, beers = X (where X is an integer), and puke. Upon puking, your beer count is reset. Otherwise, the functionality is obvious. The spacing on "beers++" and "beers = X" is important. He also knows "bourbon++" if you're drinking something else. This counts as two beers, use sparingly! ### Untappd @@ -81,7 +77,7 @@ One small improvement for the beer tracker is integration into [Untappd](http:// ## Other, randomer things -The saga of bots in our channel started out with a simple bot named FredFelps which would just reply about how God hates our users at various times when they talked about the real Felps. This is still a tradition that AlePale keeps up, but could be easily modified to fit somebody else's needs. +The saga of bots in our channel started out with a simple bot named FredFelps which would just reply about how God hates our users at various times when they talked about the real Felps. This is still a tradition that CatBase keeps up, but could be easily modified to fit somebody else's needs. We're also a bit OCD about the length of the IRC nicks that people use. As it turns out, if everybody agrees on a particular length, say 9 characters, then the messages and names all line up very nicely when using a fixed-width font. We like 9 characters. diff --git a/TODO.md b/TODO.md index db80ddf..eef63ca 100644 --- a/TODO.md +++ b/TODO.md @@ -24,4 +24,6 @@ This bot was written a long time back in the spare time of a busy person. The co * Verify (fix) untappd integration * Has not even been run * Write godoc for pretty much everything and explain why functions exist +* Write a history doc +* Fix formatting everywhere * Enter all of this into GitHub tickets diff --git a/bot/bot.go b/bot/bot.go index 2da3966..919e5a4 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package bot @@ -11,7 +11,7 @@ import ( "time" "code.google.com/p/velour/irc" - "github.com/chrissexton/alepale/config" + "github.com/velour/catbase/config" _ "github.com/mattn/go-sqlite3" ) diff --git a/bot/handlers.go b/bot/handlers.go index c5f7b9b..bf907ff 100644 --- a/bot/handlers.go +++ b/bot/handlers.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package bot @@ -269,7 +269,7 @@ func (b *Bot) listVars(channel string, parts []string) { func (b *Bot) Help(channel string, parts []string) { msg := fmt.Sprintf("Hi, I'm based on godeepintir version %s. I'm written in Go, and you "+ "can find my source code on the internet here: "+ - "http://github.com/chrissexton/alepale", b.Version) + "http://github.com/velour/catbase", b.Version) b.SendMessage(channel, msg) } diff --git a/bot/users.go b/bot/users.go index 8e2ca34..c442e78 100644 --- a/bot/users.go +++ b/bot/users.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package bot diff --git a/config/config.go b/config/config.go index f9a02c1..18b0d62 100644 --- a/config/config.go +++ b/config/config.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package config diff --git a/main.go b/main.go index 4139c5d..af6c643 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package main @@ -10,9 +10,9 @@ import ( "time" "code.google.com/p/velour/irc" - "github.com/chrissexton/alepale/bot" - "github.com/chrissexton/alepale/config" - "github.com/chrissexton/alepale/plugins" + "github.com/velour/catbase/bot" + "github.com/velour/catbase/config" + "github.com/velour/catbase/plugins" ) const ( diff --git a/plugins/admin.go b/plugins/admin.go index 7a8f1cb..ca24b47 100644 --- a/plugins/admin.go +++ b/plugins/admin.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/chrissexton/alepale/bot" + "github.com/velour/catbase/bot" ) // This is a admin plugin to serve as an example and quick copy/paste for new plugins. diff --git a/plugins/beers.go b/plugins/beers.go index dec7d96..58b3f78 100644 --- a/plugins/beers.go +++ b/plugins/beers.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins @@ -15,7 +15,7 @@ import ( "strings" "time" - "github.com/chrissexton/alepale/bot" + "github.com/velour/catbase/bot" ) // This is a skeleton plugin to serve as an example and quick copy/paste for new plugins. diff --git a/plugins/counter.go b/plugins/counter.go index e43b9a6..5c49f35 100644 --- a/plugins/counter.go +++ b/plugins/counter.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins @@ -8,7 +8,7 @@ import ( "log" "strings" - "github.com/chrissexton/alepale/bot" + "github.com/velour/catbase/bot" ) // This is a counter plugin to count arbitrary things. diff --git a/plugins/dice.go b/plugins/dice.go index 32c83b3..e25eef9 100644 --- a/plugins/dice.go +++ b/plugins/dice.go @@ -1,8 +1,8 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins -import "github.com/chrissexton/alepale/bot" +import "github.com/velour/catbase/bot" import ( "fmt" diff --git a/plugins/downtime.go b/plugins/downtime.go index f6f387f..a240dab 100644 --- a/plugins/downtime.go +++ b/plugins/downtime.go @@ -1,11 +1,11 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins import ( "database/sql" - "github.com/chrissexton/alepale/bot" + "github.com/velour/catbase/bot" ) import ( diff --git a/plugins/factoid.go b/plugins/factoid.go index b159edd..dbf5da0 100644 --- a/plugins/factoid.go +++ b/plugins/factoid.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/chrissexton/alepale/bot" + "github.com/velour/catbase/bot" ) // The factoid plugin provides a learning system to the bot so that it can diff --git a/plugins/first.go b/plugins/first.go index d289a32..88daed6 100644 --- a/plugins/first.go +++ b/plugins/first.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/chrissexton/alepale/bot" + "github.com/velour/catbase/bot" ) // This is a first plugin to serve as an example and quick copy/paste for new plugins. diff --git a/plugins/plugins.go b/plugins/plugins.go index 57fdc09..375f13f 100644 --- a/plugins/plugins.go +++ b/plugins/plugins.go @@ -1,9 +1,9 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins import "fmt" -import "github.com/chrissexton/alepale/bot" +import "github.com/velour/catbase/bot" // Plugin interface defines the methods needed to accept a plugin type Plugin interface { diff --git a/plugins/remember.go b/plugins/remember.go index e8bbef9..bbd2248 100644 --- a/plugins/remember.go +++ b/plugins/remember.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/chrissexton/alepale/bot" + "github.com/velour/catbase/bot" ) // This is a skeleton plugin to serve as an example and quick copy/paste for new diff --git a/plugins/skeleton.go b/plugins/skeleton.go index 91aee4e..f30df1c 100644 --- a/plugins/skeleton.go +++ b/plugins/skeleton.go @@ -1,8 +1,8 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins -import "github.com/chrissexton/alepale/bot" +import "github.com/velour/catbase/bot" // This is a skeleton plugin to serve as an example and quick copy/paste for new plugins. diff --git a/plugins/talker.go b/plugins/talker.go index a45886e..eedd190 100644 --- a/plugins/talker.go +++ b/plugins/talker.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/chrissexton/alepale/bot" + "github.com/velour/catbase/bot" ) var goatse []string = []string{ diff --git a/plugins/webTemplates.go b/plugins/webTemplates.go index 8dd4e9f..efe11a9 100644 --- a/plugins/webTemplates.go +++ b/plugins/webTemplates.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins diff --git a/plugins/your.go b/plugins/your.go index a284eba..0fb1eea 100644 --- a/plugins/your.go +++ b/plugins/your.go @@ -1,4 +1,4 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package plugins @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/chrissexton/alepale/bot" + "github.com/velour/catbase/bot" ) type YourPlugin struct { diff --git a/version.go b/version.go index 019f278..c2d9bee 100644 --- a/version.go +++ b/version.go @@ -1,5 +1,5 @@ -// © 2013 the AlePale Authors under the WTFPL. See AUTHORS for the list of authors. +// © 2013 the CatBase Authors under the WTFPL. See AUTHORS for the list of authors. package main -const Version = "0.81" +const Version = "0.9"