Commit Graph

277 Commits (master)

Author SHA1 Message Date
Robert Gerus 4f11dcb03a Prevent sending empty JOIN. 2015-11-19 11:46:39 +01:00
Robert Gerus 0cce9ec4d3 Partially works now.
Is now exploitable by titles with newlines…
2015-11-19 11:24:32 +01:00
Robert Gerus 863f8f1ba8 Urltitle plugin. Does not work yet, at all.
I guess the xpath is wrong.
```
goroutine 44 [running]:
github.com/arachnist/gorepost/bot.getUrlTitle(0xc82025b92f, 0x23, 0x0, 0x0)
        /home/arachnist/gocode/src/github.com/arachnist/gorepost/bot/urltitle.go:63 +0x8e9
github.com/arachnist/gorepost/bot.linktitle(0xc820076660, 0xc820267cb0, 0xc820267c80, 0xc82025b917, 0x7, 0xc8202ca330, 0x1, 0x1, 0xc82025b92f,
0x23, ...)
        /home/arachnist/gocode/src/github.com/arachnist/gorepost/bot/urltitle.go:80 +0x482
created by github.com/arachnist/gorepost/bot.Dispatcher
        /home/arachnist/gocode/src/github.com/arachnist/gorepost/bot/dispatcher.go:55 +0x102b
```
2015-11-19 11:07:48 +01:00
Robert Gerus 953c651fed Add more examples to example configuration. 2015-11-19 09:03:59 +01:00
Robert Gerus 058005a166 Join +i-only channels on identification. 2015-11-19 08:51:23 +01:00
Robert Gerus 9fb64a8088 Add nickserv plugin and test. 2015-11-19 08:24:07 +01:00
Robert Gerus 5045a61151 No need to respawn collector in loop.
Should make our tests less racy.
2015-11-19 08:21:06 +01:00
Robert Gerus c8de32ddbf Build tag is more important that copyright. 2015-11-19 02:23:03 +01:00
Robert Gerus dd3adb922e Avoid using interface{} in expeceted values. 2015-11-19 02:16:29 +01:00
Robert Gerus 0102e0e6bb Remove legacy cruft. 2015-11-19 02:11:08 +01:00
Robert Gerus bf0b022586 Disable half of irc package tests for now. 2015-11-19 01:49:14 +01:00
Robert Gerus d38714728f Try making tests go1.2 compatible again. 2015-11-19 01:44:10 +01:00
Robert Gerus bfd5674e2a Crude set of tests for irc connection. 2015-11-19 01:40:15 +01:00
Robert Gerus 787a8d3256 Leftover cruft. 2015-11-19 01:38:13 +01:00
Robert Gerus e6825f5a9a irc.Keeper() and irc.Cleaner() can now quit.
It should now be possible to write test for irc.
2015-11-18 22:16:02 +01:00
Robert Gerus b2cdd42980 Import message tests from github.com/sorcix/irc 2015-11-18 20:26:28 +01:00
Robert Gerus e199492be3 Apparently we do have io/ioutil 2015-11-18 19:37:25 +01:00
Robert Gerus 0672bd513f Try and try again. 2015-11-18 19:24:59 +01:00
Robert Gerus ceb938d8a3 Fix tests on go1.2 2015-11-18 19:20:50 +01:00
Robert Gerus c98987577e Silence needlessly verbose logs. 2015-11-18 19:12:54 +01:00
Robert Gerus 3f496c483e Test suite for config package. 2015-11-18 19:07:08 +01:00
Robert Gerus 7766aaff32 Fix GoDoc link. 2015-11-18 17:17:17 +01:00
Robert Gerus 0f15fab9e0 Fix example configuration.
Empty "Ignore" is now harmful and configuration directory is passed as
commandline argument.
2015-11-18 17:14:52 +01:00
Robert Gerus 7a5f48784d Fix Dispatcher()
It tried to look up things in WhitelistedPlugins despite it not being declared.
2015-11-18 16:51:10 +01:00
Robert Gerus bbe1a3288a Implement plugin whitelist.
Fixes #9.
2015-11-18 16:24:30 +01:00
Robert Gerus aed3f49e41 Fix a bug in config.LookupStringMap. 2015-11-18 16:23:34 +01:00
Robert Gerus 279be22965 Dispatcher now handles nonexisting keys. 2015-11-18 15:29:54 +01:00
Robert Gerus e08994f0d2 Use config.LookupStringMap in bot. 2015-11-18 15:21:02 +01:00
Robert Gerus 41bc3afc93 Add config.LookupStringMap for efficient lookups. 2015-11-18 15:17:29 +01:00
Robert Gerus b7a3b29336 Remove platforms we don't test or run on anyway. 2015-11-18 14:37:04 +01:00
Robert Gerus aac5f3ffe8 Fix config.LookupStringSlice.
It behaved badly (paniced) when lookupvar returned nil.
2015-11-18 14:27:58 +01:00
Robert Gerus 96f4ee200a Give gorepost its own username in example. 2015-11-18 14:27:35 +01:00
Robert Gerus 14b8f803b5 Use new config interfaces in gorepost.go 2015-11-18 14:07:38 +01:00
Robert Gerus fb20706ed7 Use new interfaces from config in irc. 2015-11-18 14:04:56 +01:00
Robert Gerus f7cd422dae Use new interfaces from config in bot. 2015-11-18 14:00:55 +01:00
Robert Gerus 0d9aa21cbf Add LookupString and LookupStringSlice to config.
Allows for cleaner lookups in places that need it.
2015-11-18 13:57:55 +01:00
Robert Gerus 3f3683dade Replace reflect.DeepEqual with fmt.Sprintf("%+v")
Seems more predictable.
2015-11-18 11:28:18 +01:00
Robert Gerus ada4ec7550 Fix imports for older Go. 2015-11-17 19:49:17 +01:00
Robert Gerus 67dbb69052 Try, and try again… 2015-11-17 19:46:48 +01:00
Robert Gerus d7f6a4e865 Fix tests for go1.2, hopefully. 2015-11-17 19:38:42 +01:00
Robert Gerus f252737dff Fix error strings.
"golint -min_confidence 0.4 ./..." complained.
2015-11-17 18:51:47 +01:00
Robert Gerus d069578cbc That function is not needed anymore. 2015-11-17 18:50:38 +01:00
Robert Gerus 175aa6e79a Add tests for bot package. 2015-11-17 18:44:52 +01:00
Robert Gerus 5c146edc02 Add GoDoc badge to README. 2015-11-17 15:16:26 +01:00
Robert Gerus c0e212b8fb Fix documentation after previous commit. 2015-11-17 15:11:15 +01:00
Robert Gerus c160a8a362 Dispatcher does not need to be a goroutine.
This simplifies irc.Connection structure (removes quitdispatcher and output
channels), simplifies logic (no need to clean up those two channels and the
dispatcher goroutine) and will make testing bot dispatcher and plugins easier.
2015-11-17 14:34:30 +01:00
Robert Gerus da032ba160 Brainfart 2015-11-16 20:27:43 +01:00
Robert Gerus 0598ee7a91 Fix godoc a bit. 2015-11-16 20:25:18 +01:00
Robert Gerus 3f389ea843 Document irc package
Fixes #11 and silences golint
2015-11-12 14:07:57 +01:00
Robert Gerus 6b6f7cd0c3 Documentation/comment/readme fixes here and there. 2015-11-12 12:55:51 +01:00