Commit Graph

158 Commits (30513fc0d57db518631cd5c2e81f8b6a4edeb4b6)

Author SHA1 Message Date
Robert Gerus 30513fc0d5 Make irc.Sender a function instead of coroutine.
Also, remove two channels that were used with this coroutine.
This patch does not contain the necessary changes in bot package.
2015-11-29 14:34:09 +01:00
Robert S. Gerus ca3d3a2cc8 Merge pull request #16 from arachnist/google
Add "google" plugin.
2015-11-25 15:02:53 +01:00
Robert Gerus c5ec7e9c07 Add "google" plugin. 2015-11-25 14:56:59 +01:00
Robert S. Gerus 2145c7d276 Merge pull request #14 from arachnist/identify
Check on demand if person is identified.
2015-11-23 19:35:29 +01:00
Robert Gerus 07a3b07e03 Check on demand if person is identified.
Works with freenode services. Might possibly crash somewhere else…
2015-11-23 19:16:35 +01:00
Robert S. Gerus 3fecebc78a Merge pull request #13 from arachnist/config-LookupInt
LookupInt function in config.
2015-11-23 18:12:24 +01:00
Robert Gerus 1edaac90ac Add LookupInt interface to config.
Not a pretty addition, because javascript, and therefore json, only has floats,
so the interface{} is first casted onto a float64 and then an int.
2015-11-23 18:07:06 +01:00
Robert Gerus 7b85c167f0 Preliminary version. 2015-11-23 17:53:08 +01:00
Robert Gerus 1cd5057bb0 Rounding to seconds makes more sense. 2015-11-22 11:53:13 +01:00
Robert Gerus f3a6400620 Fix crash 2015-11-22 11:42:20 +01:00
Robert S. Gerus aa54f36242 Merge pull request #12 from arachnist/seen
Add "seen" plugin.
2015-11-22 11:38:56 +01:00
Robert Gerus 449fbc99c5 Added formatting. 2015-11-22 11:34:28 +01:00
Robert Gerus 294fb3fdf8 Fix a crash in httpGetXpath()
doc, err := gokogiri.ParseHtml(buf) can leave both err and doc nil. Added a
check condition for that.
2015-11-22 01:59:57 +01:00
Robert Gerus 5692d3111a Prefix "seen" messages. 2015-11-21 12:43:44 +01:00
Robert Gerus 3ef8b9aeca Initial version of seen plugin.
Doesn't format the output yet, and has several other shortcomings.
2015-11-21 05:47:14 +01:00
Robert Gerus 130b600923 Lock configuration until file list builder is set. 2015-11-21 02:19:10 +01:00
Robert Gerus 771adfe1e6 Add json tag and rename field to silence golint. 2015-11-20 12:41:47 +01:00
Robert Gerus 9bec013fe7 Don't use bytes.Buffer when not needed. 2015-11-20 10:27:09 +01:00
Robert Gerus 970883081b Trim characters prefixing urls. 2015-11-20 10:07:08 +01:00
Robert Gerus f05a9e1e11 Silence golint and go vet, mostly. 2015-11-20 09:53:54 +01:00
Robert Gerus 1c19411c22 Don't post titles for things that don't have them. 2015-11-19 23:40:55 +01:00
Robert Gerus 9e5bac3e6f Checkinator is now working correctly. 2015-11-19 22:39:24 +01:00
Robert Gerus 3418c0798d Initial version of checkinator 2015-11-19 20:33:26 +01:00
Robert Gerus 11876334d9 Post kittens on :kotki 2015-11-19 18:47:47 +01:00
Robert Gerus 9f9dd527fe Use reply helper in urltitle.go 2015-11-19 17:25:47 +01:00
Robert Gerus 0ad574b711 Add a reply helper to reduce code duplication. 2015-11-19 16:47:02 +01:00
Robert Gerus 57cd8ac5e7 Generalize http and xpath extraction functions. 2015-11-19 15:13:45 +01:00
Robert Gerus 6dc9e68c18 Do away with go1.2.
Ubuntu 14.04 LTS has go1.3 and go1.2 lacks TLSHandshakeTimeout in http.Transport
2015-11-19 12:52:10 +01:00
Robert Gerus 2de6780d83 Update example with urltitle settings. 2015-11-19 12:49:50 +01:00
Robert Gerus 4fea7a0116 Remove nasty chars. 2015-11-19 12:48:43 +01:00
Robert Gerus 7b7fae25ad Try and try again. 2015-11-19 11:51:02 +01:00
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