rbot 0.9.14 → 0.9.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/AUTHORS +6 -2
- data/REQUIREMENTS +7 -1
- data/Rakefile +10 -32
- data/bin/rbot +6 -1
- data/bin/svnwatch-postcommit-hook +68 -0
- data/data/rbot/contrib/plugins/stats.rb +3 -3
- data/data/rbot/contrib/plugins/vandale.rb +1 -1
- data/data/rbot/filters/rss.rb +72 -0
- data/data/rbot/languages/finnish.lang +50 -0
- data/data/rbot/plugins/alias.rb +6 -6
- data/data/rbot/plugins/autorejoin.rb +41 -2
- data/data/rbot/plugins/bans.rb +100 -6
- data/data/rbot/plugins/bash.rb +9 -4
- data/data/rbot/plugins/cal.rb +1 -1
- data/data/rbot/plugins/chucknorris.rb +6 -6
- data/data/rbot/plugins/debugger.rb +7 -3
- data/data/rbot/plugins/deepthoughts.rb +1 -1
- data/data/rbot/plugins/delicious.rb +6 -2
- data/data/rbot/plugins/dice.rb +7 -7
- data/data/rbot/plugins/dict.rb +4 -3
- data/data/rbot/plugins/dictclient.rb +17 -13
- data/data/rbot/plugins/digg.rb +3 -3
- data/data/rbot/plugins/eightball.rb +1 -1
- data/data/rbot/plugins/factoids.rb +13 -4
- data/data/rbot/plugins/figlet.rb +4 -4
- data/data/rbot/plugins/forecast.rb +3 -3
- data/data/rbot/plugins/fortune.rb +14 -8
- data/data/rbot/plugins/freshmeat.rb +2 -2
- data/data/rbot/plugins/games/azgame.rb +72 -19
- data/data/rbot/plugins/games/hangman.rb +499 -0
- data/data/rbot/plugins/games/quiz.rb +15 -13
- data/data/rbot/plugins/games/roshambo.rb +1 -1
- data/data/rbot/plugins/games/roulette.rb +4 -4
- data/data/rbot/plugins/games/shiritori.rb +31 -31
- data/data/rbot/plugins/games/uno.rb +28 -6
- data/data/rbot/plugins/games/wheelfortune.rb +1 -3
- data/data/rbot/plugins/geoip.rb +83 -28
- data/data/rbot/plugins/googlefight.rb +64 -0
- data/data/rbot/plugins/greet.rb +45 -0
- data/data/rbot/plugins/grouphug.rb +40 -12
- data/data/rbot/plugins/imdb.rb +4 -4
- data/data/rbot/plugins/insult.rb +2 -2
- data/data/rbot/plugins/karma.rb +6 -5
- data/data/rbot/plugins/keywords.rb +26 -22
- data/data/rbot/plugins/lart.rb +5 -6
- data/data/rbot/plugins/lastfm.rb +488 -125
- data/data/rbot/plugins/lib_spotify.rb +84 -0
- data/data/rbot/plugins/linkbot.rb +1 -1
- data/data/rbot/plugins/markov.rb +567 -78
- data/data/rbot/plugins/math.rb +3 -3
- data/data/rbot/plugins/modes.rb +1 -1
- data/data/rbot/plugins/nickrecover.rb +1 -1
- data/data/rbot/plugins/nickserv.rb +7 -7
- data/data/rbot/plugins/note.rb +55 -0
- data/data/rbot/plugins/nslookup.rb +2 -2
- data/data/rbot/plugins/quakeauth.rb +4 -4
- data/data/rbot/plugins/quotes.rb +53 -19
- data/data/rbot/plugins/reaction.rb +76 -19
- data/data/rbot/plugins/remind.rb +3 -96
- data/data/rbot/plugins/ri.rb +1 -1
- data/data/rbot/plugins/rot13.rb +1 -1
- data/data/rbot/plugins/rss.rb +296 -190
- data/data/rbot/plugins/salut.rb +8 -8
- data/data/rbot/plugins/script.rb +48 -11
- data/data/rbot/plugins/search.rb +124 -28
- data/data/rbot/plugins/seen.rb +162 -31
- data/data/rbot/plugins/shortenurls.rb +1 -1
- data/data/rbot/plugins/slashdot.rb +19 -6
- data/data/rbot/plugins/spotify.rb +78 -0
- data/data/rbot/plugins/theyfightcrime.rb +10 -10
- data/data/rbot/plugins/time.rb +2 -2
- data/data/rbot/plugins/translator.rb +161 -85
- data/data/rbot/plugins/tube.rb +2 -2
- data/data/rbot/plugins/tumblr.rb +143 -0
- data/data/rbot/plugins/twitter.rb +25 -6
- data/data/rbot/plugins/urban.rb +6 -4
- data/data/rbot/plugins/url.rb +49 -10
- data/data/rbot/plugins/weather.rb +6 -6
- data/data/rbot/plugins/wserver.rb +5 -5
- data/data/rbot/plugins/youtube.rb +12 -12
- data/data/rbot/templates/lart/larts-italian +1 -1
- data/launch_here.rb +68 -0
- data/lib/rbot/botuser.rb +1 -1
- data/lib/rbot/compat19.rb +70 -0
- data/lib/rbot/config.rb +8 -6
- data/lib/rbot/core/auth.rb +37 -21
- data/lib/rbot/core/basics.rb +33 -2
- data/lib/rbot/core/config.rb +24 -17
- data/lib/rbot/core/filters_ui.rb +2 -2
- data/lib/rbot/core/irclog.rb +20 -11
- data/lib/rbot/core/remote.rb +9 -9
- data/lib/rbot/core/unicode.rb +4 -0
- data/lib/rbot/core/userdata.rb +16 -1
- data/lib/rbot/core/utils/extends.rb +76 -0
- data/lib/rbot/core/utils/filters.rb +47 -0
- data/lib/rbot/core/utils/httputil.rb +36 -26
- data/lib/rbot/core/utils/parse_time.rb +193 -0
- data/lib/rbot/core/utils/utils.rb +81 -56
- data/lib/rbot/core/utils/wordlist.rb +66 -0
- data/lib/rbot/core/wordlist_ui.rb +27 -0
- data/lib/rbot/irc.rb +59 -19
- data/lib/rbot/ircbot.rb +190 -58
- data/lib/rbot/ircsocket.rb +14 -8
- data/lib/rbot/language.rb +4 -3
- data/lib/rbot/load-gettext.rb +22 -9
- data/lib/rbot/message.rb +89 -18
- data/lib/rbot/messagemapper.rb +71 -19
- data/lib/rbot/plugins.rb +112 -44
- data/lib/rbot/{registry.rb → registry/bdb.rb} +226 -22
- data/lib/rbot/registry/tc.rb +531 -0
- data/lib/rbot/rfc2812.rb +33 -8
- data/lib/rbot/timer.rb +12 -20
- data/po/en_US/rbot-autorejoin.po +3 -0
- data/po/en_US/rbot-azgame.po +51 -43
- data/po/en_US/rbot-bash.po +15 -0
- data/po/en_US/rbot-dictclient.po +20 -20
- data/po/en_US/rbot-factoids.po +9 -9
- data/po/en_US/rbot-geoip.po +0 -0
- data/po/en_US/rbot-googlefight.po +24 -0
- data/po/en_US/rbot-grouphug.po +4 -4
- data/po/en_US/rbot-hangman.po +114 -0
- data/po/en_US/rbot-keywords.po +3 -3
- data/po/en_US/rbot-lastfm.po +268 -70
- data/po/en_US/rbot-markov.po +73 -2
- data/po/en_US/rbot-quotes.po +21 -21
- data/po/en_US/rbot-rss.po +6 -2
- data/po/en_US/rbot-script.po +3 -0
- data/po/en_US/rbot-seen.po +72 -0
- data/po/en_US/rbot-spell.po +2 -2
- data/po/en_US/rbot-translator.po +13 -13
- data/po/en_US/rbot-twitter.po +3 -3
- data/po/en_US/rbot-uno.po +131 -114
- data/po/en_US/rbot-wall.po +12 -13
- data/po/en_US/rbot-wheelfortune.po +41 -41
- data/po/en_US/rbot.po +254 -194
- data/po/fi/rbot-alias.po +82 -0
- data/po/fi/rbot-autoop.po +0 -0
- data/po/fi/rbot-autorejoin.po +20 -0
- data/po/fi/rbot-azgame.po +194 -0
- data/po/fi/rbot-bans.po +0 -0
- data/po/fi/rbot-bash.po +32 -0
- data/po/fi/rbot-botsnack.po +0 -0
- data/po/fi/rbot-cal.po +20 -0
- data/po/fi/rbot-chanserv.po +0 -0
- data/po/fi/rbot-chucknorris.po +0 -0
- data/po/fi/rbot-debugger.po +0 -0
- data/po/fi/rbot-deepthoughts.po +0 -0
- data/po/fi/rbot-delicious.po +0 -0
- data/po/fi/rbot-dice.po +0 -0
- data/po/fi/rbot-dict.po +0 -0
- data/po/fi/rbot-dictclient.po +111 -0
- data/po/fi/rbot-digg.po +0 -0
- data/po/fi/rbot-eightball.po +0 -0
- data/po/fi/rbot-excuse.po +0 -0
- data/po/fi/rbot-factoids.po +107 -0
- data/po/fi/rbot-figlet.po +36 -0
- data/po/fi/rbot-fish.po +0 -0
- data/po/fi/rbot-forecast.po +0 -0
- data/po/fi/rbot-fortune.po +0 -0
- data/po/fi/rbot-freshmeat.po +0 -0
- data/po/fi/rbot-geoip.po +0 -0
- data/po/fi/rbot-googlefight.po +24 -0
- data/po/fi/rbot-grouphug.po +35 -0
- data/po/fi/rbot-hangman.po +121 -0
- data/po/fi/rbot-hl2.po +0 -0
- data/po/fi/rbot-host.po +20 -0
- data/po/fi/rbot-imdb.po +0 -0
- data/po/fi/rbot-insult.po +0 -0
- data/po/fi/rbot-iplookup.po +0 -0
- data/po/fi/rbot-karma.po +0 -0
- data/po/fi/rbot-keywords.po +24 -0
- data/po/fi/rbot-lart.po +0 -0
- data/po/fi/rbot-lastfm.po +377 -0
- data/po/fi/rbot-linkbot.po +0 -0
- data/po/fi/rbot-markov.po +91 -0
- data/po/fi/rbot-math.po +0 -0
- data/po/fi/rbot-modes.po +0 -0
- data/po/fi/rbot-nickrecover.po +36 -0
- data/po/fi/rbot-nickserv.po +104 -0
- data/po/fi/rbot-nslookup.po +0 -0
- data/po/fi/rbot-quakeauth.po +0 -0
- data/po/fi/rbot-quiz.po +0 -0
- data/po/fi/rbot-quotes.po +108 -0
- data/po/fi/rbot-reaction.po +0 -0
- data/po/fi/rbot-remind.po +0 -0
- data/po/fi/rbot-remotectl.po +0 -0
- data/po/fi/rbot-ri.po +0 -0
- data/po/fi/rbot-roshambo.po +0 -0
- data/po/fi/rbot-rot13.po +0 -0
- data/po/fi/rbot-roulette.po +0 -0
- data/po/fi/rbot-rss.po +24 -0
- data/po/fi/rbot-salut.po +0 -0
- data/po/fi/rbot-script.po +20 -0
- data/po/fi/rbot-search.po +0 -0
- data/po/fi/rbot-seen.po +92 -0
- data/po/fi/rbot-shiritori.po +102 -0
- data/po/fi/rbot-shortenurls.po +0 -0
- data/po/fi/rbot-slashdot.po +0 -0
- data/po/fi/rbot-spell.po +54 -0
- data/po/fi/rbot-theyfightcrime.po +0 -0
- data/po/fi/rbot-threat.po +0 -0
- data/po/fi/rbot-time.po +0 -0
- data/po/fi/rbot-topic.po +0 -0
- data/po/fi/rbot-translator.po +77 -0
- data/po/fi/rbot-tube.po +0 -0
- data/po/fi/rbot-twitter.po +24 -0
- data/po/fi/rbot-uno.po +529 -0
- data/po/fi/rbot-urban.po +0 -0
- data/po/fi/rbot-url.po +0 -0
- data/po/fi/rbot-usermodes.po +0 -0
- data/po/fi/rbot-wall.po +32 -0
- data/po/fi/rbot-weather.po +0 -0
- data/po/fi/rbot-wheelfortune.po +205 -0
- data/po/fi/rbot-wow.po +0 -0
- data/po/fi/rbot-wserver.po +0 -0
- data/po/fi/rbot-youtube.po +58 -0
- data/po/fi/rbot.po +1152 -0
- data/po/fr/rbot-autorejoin.po +3 -0
- data/po/fr/rbot-azgame.po +51 -43
- data/po/fr/rbot-bash.po +15 -0
- data/po/fr/rbot-dictclient.po +20 -20
- data/po/fr/rbot-factoids.po +9 -9
- data/po/fr/rbot-geoip.po +0 -0
- data/po/fr/rbot-googlefight.po +24 -0
- data/po/fr/rbot-grouphug.po +4 -4
- data/po/fr/rbot-hangman.po +114 -0
- data/po/fr/rbot-keywords.po +3 -3
- data/po/fr/rbot-lastfm.po +268 -70
- data/po/fr/rbot-markov.po +74 -2
- data/po/fr/rbot-quotes.po +21 -21
- data/po/fr/rbot-rss.po +6 -2
- data/po/fr/rbot-script.po +3 -0
- data/po/fr/rbot-seen.po +72 -0
- data/po/fr/rbot-spell.po +2 -2
- data/po/fr/rbot-translator.po +13 -13
- data/po/fr/rbot-twitter.po +3 -3
- data/po/fr/rbot-uno.po +132 -114
- data/po/fr/rbot-wall.po +8 -9
- data/po/fr/rbot-wheelfortune.po +41 -41
- data/po/fr/rbot.po +268 -197
- data/po/it/rbot-autorejoin.po +3 -0
- data/po/it/rbot-azgame.po +50 -42
- data/po/it/rbot-bash.po +15 -0
- data/po/it/rbot-dictclient.po +20 -20
- data/po/it/rbot-factoids.po +9 -9
- data/po/it/rbot-geoip.po +0 -0
- data/po/it/rbot-googlefight.po +24 -0
- data/po/it/rbot-grouphug.po +4 -4
- data/po/it/rbot-hangman.po +114 -0
- data/po/it/rbot-keywords.po +3 -3
- data/po/it/rbot-lastfm.po +268 -70
- data/po/it/rbot-markov.po +75 -3
- data/po/it/rbot-quotes.po +21 -21
- data/po/it/rbot-rss.po +7 -3
- data/po/it/rbot-script.po +19 -0
- data/po/it/rbot-seen.po +72 -0
- data/po/it/rbot-spell.po +2 -2
- data/po/it/rbot-translator.po +13 -13
- data/po/it/rbot-twitter.po +3 -3
- data/po/it/rbot-uno.po +137 -116
- data/po/it/rbot-wall.po +8 -9
- data/po/it/rbot-wheelfortune.po +41 -41
- data/po/it/rbot.po +265 -208
- data/po/ja/rbot-autorejoin.po +3 -0
- data/po/ja/rbot-azgame.po +51 -43
- data/po/ja/rbot-bash.po +15 -0
- data/po/ja/rbot-dictclient.po +20 -20
- data/po/ja/rbot-factoids.po +9 -9
- data/po/ja/rbot-geoip.po +0 -0
- data/po/ja/rbot-googlefight.po +24 -0
- data/po/ja/rbot-grouphug.po +4 -4
- data/po/ja/rbot-hangman.po +114 -0
- data/po/ja/rbot-keywords.po +3 -3
- data/po/ja/rbot-lastfm.po +268 -70
- data/po/ja/rbot-markov.po +73 -2
- data/po/ja/rbot-quotes.po +21 -21
- data/po/ja/rbot-rss.po +6 -2
- data/po/ja/rbot-script.po +3 -0
- data/po/ja/rbot-seen.po +72 -0
- data/po/ja/rbot-spell.po +2 -2
- data/po/ja/rbot-translator.po +13 -13
- data/po/ja/rbot-twitter.po +3 -3
- data/po/ja/rbot-uno.po +131 -114
- data/po/ja/rbot-wall.po +8 -9
- data/po/ja/rbot-wheelfortune.po +41 -41
- data/po/ja/rbot.po +248 -192
- data/po/rbot-alias.pot +2 -2
- data/po/rbot-autorejoin.pot +21 -0
- data/po/rbot-azgame.pot +51 -43
- data/po/rbot-bash.pot +33 -0
- data/po/rbot-cal.pot +2 -2
- data/po/rbot-dictclient.pot +21 -21
- data/po/rbot-factoids.pot +10 -10
- data/po/rbot-figlet.pot +2 -2
- data/po/rbot-geoip.pot +0 -0
- data/po/rbot-googlefight.pot +25 -0
- data/po/rbot-grouphug.pot +6 -6
- data/po/rbot-hangman.pot +115 -0
- data/po/rbot-host.pot +2 -2
- data/po/rbot-keywords.pot +4 -4
- data/po/rbot-lastfm.pot +270 -72
- data/po/rbot-markov.pot +74 -3
- data/po/rbot-nickrecover.pot +2 -2
- data/po/rbot-nickserv.pot +2 -2
- data/po/rbot-quotes.pot +22 -22
- data/po/rbot-rss.pot +7 -3
- data/po/rbot-script.pot +21 -0
- data/po/rbot-seen.pot +90 -0
- data/po/rbot-shiritori.pot +2 -2
- data/po/rbot-spell.pot +3 -3
- data/po/rbot-translator.pot +14 -14
- data/po/rbot-twitter.pot +4 -4
- data/po/rbot-uno.pot +132 -115
- data/po/rbot-wall.pot +2 -2
- data/po/rbot-wheelfortune.pot +42 -42
- data/po/rbot-youtube.pot +2 -2
- data/po/rbot.pot +249 -193
- data/po/zh_CN/rbot-autorejoin.po +3 -0
- data/po/zh_CN/rbot-azgame.po +50 -42
- data/po/zh_CN/rbot-bash.po +15 -0
- data/po/zh_CN/rbot-dictclient.po +20 -20
- data/po/zh_CN/rbot-factoids.po +9 -9
- data/po/zh_CN/rbot-geoip.po +0 -0
- data/po/zh_CN/rbot-googlefight.po +24 -0
- data/po/zh_CN/rbot-grouphug.po +4 -4
- data/po/zh_CN/rbot-hangman.po +114 -0
- data/po/zh_CN/rbot-keywords.po +3 -3
- data/po/zh_CN/rbot-lastfm.po +268 -70
- data/po/zh_CN/rbot-markov.po +73 -2
- data/po/zh_CN/rbot-quotes.po +21 -21
- data/po/zh_CN/rbot-rss.po +6 -2
- data/po/zh_CN/rbot-script.po +3 -0
- data/po/zh_CN/rbot-seen.po +72 -0
- data/po/zh_CN/rbot-spell.po +2 -2
- data/po/zh_CN/rbot-translator.po +13 -13
- data/po/zh_CN/rbot-twitter.po +3 -3
- data/po/zh_CN/rbot-uno.po +131 -114
- data/po/zh_CN/rbot-wall.po +7 -8
- data/po/zh_CN/rbot-wheelfortune.po +41 -41
- data/po/zh_CN/rbot.po +248 -192
- data/po/zh_TW/rbot-autorejoin.po +3 -0
- data/po/zh_TW/rbot-azgame.po +50 -42
- data/po/zh_TW/rbot-bash.po +15 -0
- data/po/zh_TW/rbot-dictclient.po +20 -20
- data/po/zh_TW/rbot-factoids.po +9 -9
- data/po/zh_TW/rbot-geoip.po +0 -0
- data/po/zh_TW/rbot-googlefight.po +24 -0
- data/po/zh_TW/rbot-grouphug.po +4 -4
- data/po/zh_TW/rbot-hangman.po +114 -0
- data/po/zh_TW/rbot-keywords.po +3 -3
- data/po/zh_TW/rbot-lastfm.po +268 -70
- data/po/zh_TW/rbot-markov.po +73 -2
- data/po/zh_TW/rbot-quotes.po +21 -21
- data/po/zh_TW/rbot-rss.po +6 -2
- data/po/zh_TW/rbot-script.po +3 -0
- data/po/zh_TW/rbot-seen.po +72 -0
- data/po/zh_TW/rbot-spell.po +2 -2
- data/po/zh_TW/rbot-translator.po +13 -13
- data/po/zh_TW/rbot-twitter.po +3 -3
- data/po/zh_TW/rbot-uno.po +131 -114
- data/po/zh_TW/rbot-wall.po +7 -8
- data/po/zh_TW/rbot-wheelfortune.po +41 -41
- data/po/zh_TW/rbot.po +253 -194
- data/setup.rb +4 -4
- metadata +127 -18
- data/README +0 -43
- data/data/rbot/plugins/fish.rb +0 -121
- data/lib/rbot/dbhash.rb +0 -199
data/AUTHORS
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Original Author
|
|
2
2
|
o Tom Gilbert (giblet) <tom@linuxbrit.co.uk>
|
|
3
3
|
|
|
4
|
-
Ruthless Tyrant (yes, that means 'project
|
|
4
|
+
Ruthless Tyrant (yes, that means 'project leader')
|
|
5
5
|
o Giuseppe "Oblomov" Bilotta (tango_) <giuseppe.bilotta@gmail.com>
|
|
6
6
|
|
|
7
|
-
Sanity keeper
|
|
7
|
+
Sanity keeper (aka 'my main role here is to bitch a lot about even the legitimate patches')
|
|
8
8
|
o Dmitry Kim (jsn) <dmitry dot kim at gmail dot com>
|
|
9
9
|
|
|
10
10
|
YAML & Multilingual expert, blame collector
|
|
@@ -13,6 +13,9 @@ o Yaohan Chen (hagabaka) <yaohan.chen@gmail.com>
|
|
|
13
13
|
Insanity keeper
|
|
14
14
|
o Mark Kretschmann (markey) <markey@web.de>
|
|
15
15
|
|
|
16
|
+
Pusher (aka 'my main role here is to bitch a lot about the delay in the releases')
|
|
17
|
+
o Raine Virta (rane_) <raine.virta@gmail.com>
|
|
18
|
+
|
|
16
19
|
Chuck Norris trainer
|
|
17
20
|
o Chris Gahan (epitron) <chris@ill-logic.com>
|
|
18
21
|
|
|
@@ -28,6 +31,7 @@ o Jesse Keys (jessekeys) <jesse@teranetworks.de>
|
|
|
28
31
|
o Jan Wikholm (unfo-) <jw@jw.fi>
|
|
29
32
|
o Moritz Augsburger (moemoe) <rbot@moritz.augsburger.name>
|
|
30
33
|
o Alexander Beisig <alexander.beisig@gmx.de>
|
|
34
|
+
o Casey Link (Ramblurr) <unnamedrambler@gmail.com>
|
|
31
35
|
|
|
32
36
|
Module contributors
|
|
33
37
|
o dice.rb - David Dorward (Dorward) <david@david.us-lot.org>
|
data/REQUIREMENTS
CHANGED
|
@@ -2,7 +2,12 @@ Ruby modules needed for rbot
|
|
|
2
2
|
============================
|
|
3
3
|
|
|
4
4
|
Core requirements
|
|
5
|
-
|
|
5
|
+
tokyocabinet for "tc" DB adaptor
|
|
6
|
+
http://1978th.net/tokyocabinet/
|
|
7
|
+
you can install Ruby bindings via "gem install tokyocabinet",
|
|
8
|
+
but this still requires libtokyocabinet to be installed system-wide
|
|
9
|
+
bdb (berkeley db) for "bdb" DB adaptor or converting from it
|
|
10
|
+
http://raa.ruby-lang.org/project/bdb/
|
|
6
11
|
(which requires libdb4.x or better, formerly from
|
|
7
12
|
www.sleepycat.com, now at
|
|
8
13
|
http://www.oracle.com/technology/products/berkeley-db/index.html)
|
|
@@ -11,6 +16,7 @@ Core requirements
|
|
|
11
16
|
have a libdb-ruby packaged (or similar).
|
|
12
17
|
For Windows instructions, check at the bottom
|
|
13
18
|
of this file.
|
|
19
|
+
|
|
14
20
|
net/http 1.2+
|
|
15
21
|
net/https (for debian, this will also need libopenssl-ruby)
|
|
16
22
|
socket
|
data/Rakefile
CHANGED
|
@@ -4,38 +4,16 @@ require 'rake/gempackagetask'
|
|
|
4
4
|
|
|
5
5
|
task :default => [:buildext]
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# s.files = Dir.glob("**/*").delete_if { |item| item.include?(".svn") }
|
|
19
|
-
s.files = FileList['lib/**/*.rb', 'bin/*', 'data/rbot/**/*', 'AUTHORS', 'COPYING', 'README', 'REQUIREMENTS', 'TODO', 'ChangeLog', 'INSTALL', 'Usage_en.txt', 'setup.rb', 'po/*.pot', 'po/**/*.po'].to_a.delete_if {|item| item == ".svn"}
|
|
20
|
-
s.bindir = 'bin'
|
|
21
|
-
s.executables = ['rbot', 'rbot-remote']
|
|
22
|
-
s.default_executable = 'rbot'
|
|
23
|
-
s.extensions = 'Rakefile'
|
|
24
|
-
|
|
25
|
-
# s.autorequire = 'rbot/ircbot'
|
|
26
|
-
s.has_rdoc = true
|
|
27
|
-
s.rdoc_options = ['--exclude', 'post-install.rb',
|
|
28
|
-
'--title', 'rbot API Documentation', '--main', 'README', 'README']
|
|
29
|
-
|
|
30
|
-
s.author = 'Tom Gilbert'
|
|
31
|
-
s.email = 'tom@linuxbrit.co.uk'
|
|
32
|
-
s.homepage = 'http://ruby-rbot.org'
|
|
33
|
-
s.rubyforge_project = 'rbot'
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
|
37
|
-
pkg.need_zip = true
|
|
38
|
-
pkg.need_tar = true
|
|
7
|
+
SPECFILE = 'rbot.gemspec'
|
|
8
|
+
# The Rakefile is also used after installing the gem, to build
|
|
9
|
+
# the .mo files. Since in this case the SPECFILE is not available,
|
|
10
|
+
# we must (and can) skip defining the gem packaging tasks.
|
|
11
|
+
if File.exist? SPECFILE
|
|
12
|
+
spec = eval(File.read(SPECFILE), nil, SPECFILE)
|
|
13
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
|
14
|
+
pkg.need_zip = true
|
|
15
|
+
pkg.need_tar = true
|
|
16
|
+
end
|
|
39
17
|
end
|
|
40
18
|
|
|
41
19
|
# normalize a po/pot file
|
data/bin/rbot
CHANGED
|
@@ -47,7 +47,7 @@ require 'etc'
|
|
|
47
47
|
require 'getoptlong'
|
|
48
48
|
require 'fileutils'
|
|
49
49
|
|
|
50
|
-
$version ||= '0.9.
|
|
50
|
+
$version ||= '0.9.15'
|
|
51
51
|
$version_timestamp ||= 0
|
|
52
52
|
$opts = Hash.new
|
|
53
53
|
|
|
@@ -98,6 +98,11 @@ rescue LoadError => e
|
|
|
98
98
|
exit 2
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
+
# ruby 1.9 specific fixes
|
|
102
|
+
unless RUBY_VERSION < '1.9'
|
|
103
|
+
require 'rbot/compat19'
|
|
104
|
+
end
|
|
105
|
+
|
|
101
106
|
if ($opts["version"])
|
|
102
107
|
puts "rbot #{$version}"
|
|
103
108
|
exit 0
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# post-commit - a hook to talk to the svnwatch rbot plugin
|
|
3
|
+
# author(s): Robby Russell and Ben Bleything of the PDX.rb
|
|
4
|
+
# slightly modified to handle multiple repositorys by Daniel Hedberg
|
|
5
|
+
# This file should be placed in the repository's hooks directory
|
|
6
|
+
|
|
7
|
+
require 'drb'
|
|
8
|
+
|
|
9
|
+
# Configuration Options
|
|
10
|
+
chan = '#channel' #IRC channel that you want rbot to send notices to
|
|
11
|
+
|
|
12
|
+
@conf = {
|
|
13
|
+
:port => '7666', # 7666 (you will need this to be the same in post-commit)
|
|
14
|
+
:host => '192.168.130.5', # localhost, don't set to remote ip unless you know what you are doing
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
chan = '#svn-hardware'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# Okay. So we get two args from svn.
|
|
21
|
+
#
|
|
22
|
+
# [1] - repo path
|
|
23
|
+
# [2] - revision number
|
|
24
|
+
#
|
|
25
|
+
# We then use this information to gather relevant data about the commit
|
|
26
|
+
# and do with it as we please.
|
|
27
|
+
|
|
28
|
+
path = ARGV[0]
|
|
29
|
+
rev = ARGV[1]
|
|
30
|
+
|
|
31
|
+
if (path.nil? || rev.nil?)
|
|
32
|
+
puts "Usage: post-commit <repo path> <rev number>"
|
|
33
|
+
exit
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
path = File.expand_path(path)
|
|
37
|
+
|
|
38
|
+
DRb.start_service
|
|
39
|
+
bot = DRbObject.new(nil, "druby://#{@conf[:host]}:#{@conf[:port]}")
|
|
40
|
+
|
|
41
|
+
# The array contains this data:
|
|
42
|
+
# [0]: committer
|
|
43
|
+
# [1]: timestamp of commit
|
|
44
|
+
# [2]: Size of log entry, in bytes
|
|
45
|
+
# [3]: Log message
|
|
46
|
+
info_array = `svnlook info --revision #{rev} #{path}`.strip.split(/\n/, 4)
|
|
47
|
+
|
|
48
|
+
log = `svn log -v -r #{rev} file://#{path}`
|
|
49
|
+
|
|
50
|
+
# dumb idea, it would wrap too many lines if multiple files...
|
|
51
|
+
#changed = `svnlook changed -r #{rev} #{path}`.strip
|
|
52
|
+
|
|
53
|
+
# guess what the repository name is
|
|
54
|
+
repos = path.split(/\//).last
|
|
55
|
+
|
|
56
|
+
commit_info = { :author => info_array[0],
|
|
57
|
+
:revision => rev,
|
|
58
|
+
:repository => repos,
|
|
59
|
+
:log => log,
|
|
60
|
+
:chan => chan,
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
begin
|
|
64
|
+
bot.svn_commit commit_info
|
|
65
|
+
rescue
|
|
66
|
+
|
|
67
|
+
end
|
|
68
|
+
exit 0
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
|
|
20
20
|
class StatsPlugin < Plugin
|
|
21
21
|
|
|
22
|
-
@@commands = {
|
|
22
|
+
@@commands = {
|
|
23
23
|
"stats" => "handle_stats",
|
|
24
24
|
"track" => "handle_track",
|
|
25
|
-
"untrack" => "handle_untrack",
|
|
25
|
+
"untrack" => "handle_untrack",
|
|
26
26
|
"listtokens" => "handle_listtokens",
|
|
27
27
|
"rmabuser" => "handle_rmabuser"
|
|
28
28
|
}
|
|
@@ -61,7 +61,7 @@ class StatsPlugin < Plugin
|
|
|
61
61
|
m.reply "What a crazy fool! Did you mean |help stats?"
|
|
62
62
|
return
|
|
63
63
|
end
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
meth = self.method(@@commands[m.plugin])
|
|
66
66
|
meth.call(m)
|
|
67
67
|
end
|
|
@@ -16,7 +16,7 @@ class VanDalePlugin < Plugin
|
|
|
16
16
|
ret = Array.new
|
|
17
17
|
Utils.safe_exec("/usr/local/bin/gnuvd", m.params).each{|line| if line.length > 5 then ret << line end}
|
|
18
18
|
m.reply ret.delete_at(0)
|
|
19
|
-
while ret[0] =~ /^[[:alpha:]_]*[0-9]/
|
|
19
|
+
while ret[0] =~ /^[[:alpha:]_]*[0-9]/
|
|
20
20
|
m.reply ret.delete_at(0)
|
|
21
21
|
end
|
|
22
22
|
while ret[0] =~ /^[0-9]/
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#-- vim:sw=2:et
|
|
2
|
+
#++
|
|
3
|
+
|
|
4
|
+
rss_type :blog do |s|
|
|
5
|
+
author = s[:author] ? (s[:author] + " ") : ""
|
|
6
|
+
abt = s[:category] ? "about #{s[:category]} " : ""
|
|
7
|
+
line1 = "%{handle}%{date}%{author}blogged %{abt}at %{link}"
|
|
8
|
+
line2 = "%{handle}%{title} - %{desc}"
|
|
9
|
+
make_stream(line1, line2, s, :author => author, :abt => abt)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
rss_type :forum do |s|
|
|
13
|
+
author = s[:author] ? (s[:author] + " ") : ""
|
|
14
|
+
abt = s[:category] ? "on #{s[:category]} " : ""
|
|
15
|
+
line1 = "%{handle}%{date}%{author}posted %{abt}at %{link}"
|
|
16
|
+
line2 = "%{handle}%{title} - %{desc}"
|
|
17
|
+
make_stream(line1, line2, s, :author => author, :abt => abt)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
rss_type :git do |s|
|
|
21
|
+
author = s[:author].sub(/@\S+?\s*>/, "@...>") + " " if s[:author]
|
|
22
|
+
line1 = "%{handle}%{date}%{author}committed %{title}%{at}%{link}"
|
|
23
|
+
make_stream(line1, nil, s, :author => author)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
rss_type :gmane do |s|
|
|
27
|
+
line1 = "%{handle}%{date}Message %{title} sent by %{author}. %{desc}"
|
|
28
|
+
make_stream(line1, nil, s)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
rss_type :headlines do |s|
|
|
32
|
+
line1 = (s[:handle].empty? ? "%{date}" : "%{handle}") << "%{title}"
|
|
33
|
+
make_stream(line1, nil, s)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
rss_type :news do |s|
|
|
37
|
+
line1 = "%{handle}%{date}%{title}%{at}%{link}" % s
|
|
38
|
+
line2 = "%{handle}%{date}%{desc}" % s
|
|
39
|
+
make_stream(line1, line2, s)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
rss_type :photoblog do |s|
|
|
43
|
+
author = s[:author] ? (s[:author] + " ") : ""
|
|
44
|
+
abt = s[:category] ? "under #{s[:category]} " : ""
|
|
45
|
+
line1 = "%{handle}%{date}%{author}added an image %{abt}at %{link}"
|
|
46
|
+
line2 = "%{handle}%{title} - %{desc}"
|
|
47
|
+
make_stream(line1, line2, s, :author => author, :abt => abt)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
rss_type :trac do |s|
|
|
51
|
+
author = s[:author].sub(/@\S+?\s*>/, "@...>") + ": " if s[:author]
|
|
52
|
+
line1 = "%{handle}%{date}%{author}%{title}%{at}%{link}"
|
|
53
|
+
line2 = nil
|
|
54
|
+
unless s[:item].title =~ /^(?:Changeset \[(?:[\da-f]+)\]|\(git commit\))/
|
|
55
|
+
line2 = "%{handle}%{date}%{desc}"
|
|
56
|
+
end
|
|
57
|
+
make_stream(line1, line2, s, :author => author)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
rss_type :wiki do |s|
|
|
61
|
+
line1 = "%{handle}%{date}%{title}%{at}%{link}"
|
|
62
|
+
line1 << "has been edited by %{author}. %{desc}"
|
|
63
|
+
make_stream(line1, nil, s)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
rss_type :"/." do |s|
|
|
67
|
+
dept = "(from the #{s[:item].slash_department} dept) " rescue nil
|
|
68
|
+
sec = " in section #{s[:item].slash_section}" rescue nil
|
|
69
|
+
line1 = "%{handle}%{date}%{dept}%{title}%{at}%{link} "
|
|
70
|
+
line1 << "(posted by %{author}%{sec})"
|
|
71
|
+
make_stream(line1, nil, s, :dept => dept, :sec => sec)
|
|
72
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
okay:
|
|
2
|
+
okei
|
|
3
|
+
selvä :)
|
|
4
|
+
ok!
|
|
5
|
+
tehty
|
|
6
|
+
toki
|
|
7
|
+
valmis
|
|
8
|
+
dunno:
|
|
9
|
+
mitäh?
|
|
10
|
+
en tiedä
|
|
11
|
+
emt
|
|
12
|
+
ei hajuakaan
|
|
13
|
+
ei tietoa
|
|
14
|
+
hä?
|
|
15
|
+
häh?
|
|
16
|
+
älä multa kysy
|
|
17
|
+
dunno_about_X:
|
|
18
|
+
en tiedä mikä %s on
|
|
19
|
+
mikä on %s?
|
|
20
|
+
%s? mikä se on?
|
|
21
|
+
insult:
|
|
22
|
+
%s: :(
|
|
23
|
+
%s: vihaan sua :(
|
|
24
|
+
%s: kuole senkin paska!
|
|
25
|
+
%s: nyt loukkasit minua :'(
|
|
26
|
+
hello:
|
|
27
|
+
moi :)
|
|
28
|
+
terve
|
|
29
|
+
hei
|
|
30
|
+
päivää
|
|
31
|
+
hello_X:
|
|
32
|
+
terve %s :)
|
|
33
|
+
%s: terve
|
|
34
|
+
%s: moi :)
|
|
35
|
+
%s: hei
|
|
36
|
+
moi %s
|
|
37
|
+
%s: mitä kuuluu?
|
|
38
|
+
welcome:
|
|
39
|
+
ole hyvä :)
|
|
40
|
+
thanks:
|
|
41
|
+
kiitti
|
|
42
|
+
kiitos :)
|
|
43
|
+
tänks
|
|
44
|
+
thanks_X:
|
|
45
|
+
%s: kiitos
|
|
46
|
+
%s: kiitti :)
|
|
47
|
+
quit:
|
|
48
|
+
moikka
|
|
49
|
+
hyvästi
|
|
50
|
+
näkemiin
|
data/data/rbot/plugins/alias.rb
CHANGED
|
@@ -38,8 +38,8 @@ class AliasPlugin < Plugin
|
|
|
38
38
|
|
|
39
39
|
def initialize
|
|
40
40
|
super
|
|
41
|
-
@data_path =
|
|
42
|
-
@data_file =
|
|
41
|
+
@data_path = datafile
|
|
42
|
+
@data_file = File.join(@data_path, 'aliases.yaml')
|
|
43
43
|
# hash of alias => command entries
|
|
44
44
|
data = nil
|
|
45
45
|
aliases = if File.exist?(@data_file) &&
|
|
@@ -58,10 +58,10 @@ class AliasPlugin < Plugin
|
|
|
58
58
|
warning _("Invalid alias entry %{alias} : %{command} in %{filename}: %{reason}") %
|
|
59
59
|
{:alias => a, :command => c, :filename => @data_file, :reason => $1}
|
|
60
60
|
end
|
|
61
|
-
end
|
|
62
|
-
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
63
|
|
|
64
|
-
def save
|
|
64
|
+
def save
|
|
65
65
|
FileUtils.mkdir_p(@data_path)
|
|
66
66
|
Utils.safe_save(@data_file) {|f| f.write @aliases.to_yaml}
|
|
67
67
|
end
|
|
@@ -110,7 +110,7 @@ class AliasPlugin < Plugin
|
|
|
110
110
|
command.scan(/<(\w+)>/).flatten.to_set ==
|
|
111
111
|
text.split.grep(/\A[:*](\w+)\Z/) {$1}.to_set or
|
|
112
112
|
raise AliasDefinitionError.new(_('The arguments in alias must match the substitutions in command, and vice versa'))
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
begin
|
|
115
115
|
map text, :action => :"alias_handle<#{text}>", :auth_path => 'run'
|
|
116
116
|
rescue
|
|
@@ -1,26 +1,65 @@
|
|
|
1
|
+
#-- vim:sw=2:et
|
|
2
|
+
#++
|
|
3
|
+
#
|
|
4
|
+
# :title: Autorejoin
|
|
5
|
+
|
|
1
6
|
class AutoRejoinPlugin < Plugin
|
|
2
7
|
Config.register Config::BooleanValue.new('rejoin.insult',
|
|
3
8
|
:default => true,
|
|
4
9
|
:desc => "Determines if the bot will insult whoever kicked it, after rejoin")
|
|
10
|
+
Config.register Config::BooleanValue.new('rejoin.kick',
|
|
11
|
+
:default => false,
|
|
12
|
+
:desc => "Determines if the bot will kick whoever kicked it, after rejoin")
|
|
13
|
+
Config.register Config::ArrayValue.new('rejoin.no_kick_list',
|
|
14
|
+
:default => ["owner"],
|
|
15
|
+
:desc => "List of botusers that can kick the bot without being kicked")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def initialize
|
|
19
|
+
super
|
|
20
|
+
@should_kick = Hash.new
|
|
21
|
+
end
|
|
5
22
|
|
|
6
23
|
def help(plugin, topic="")
|
|
7
24
|
"performs an automatic rejoin if the bot is kicked from a channel"
|
|
8
25
|
end
|
|
9
26
|
|
|
10
27
|
def kick(m)
|
|
28
|
+
password = m.channel.mode[:k].value
|
|
29
|
+
|
|
11
30
|
if m.address?
|
|
31
|
+
if @bot.config['rejoin.kick'] and not @bot.config['rejoin.no_kick_list'].include? m.source.botuser.username
|
|
32
|
+
@should_kick[m.channel.downcase] = m.sourcenick
|
|
33
|
+
end
|
|
12
34
|
r = rand(10)
|
|
13
35
|
if r > 0
|
|
14
36
|
@bot.timer.add_once(r) {
|
|
15
|
-
@bot.join m.channel
|
|
37
|
+
@bot.join m.channel, password
|
|
16
38
|
@bot.say(m.channel, @bot.lang.get("insult") % m.sourcenick) if @bot.config['rejoin.insult']
|
|
17
39
|
}
|
|
18
40
|
else
|
|
19
|
-
@bot.join m.channel
|
|
41
|
+
@bot.join m.channel, password
|
|
20
42
|
@bot.say(m.channel, @bot.lang.get("insult") % m.sourcenick) if @bot.config['rejoin.insult']
|
|
21
43
|
end
|
|
22
44
|
end
|
|
23
45
|
end
|
|
46
|
+
|
|
47
|
+
def modechange(m)
|
|
48
|
+
# if we got opped on a channel we want to kick somebody from,
|
|
49
|
+
# do the kicking
|
|
50
|
+
|
|
51
|
+
# getting opped on a channel is a channel mode change, so bail out if this
|
|
52
|
+
# is not a channel mode change
|
|
53
|
+
return unless m.target.kind_of? Channel
|
|
54
|
+
# bail out if we are not op, too
|
|
55
|
+
return unless @bot.myself.is_op?(m.target)
|
|
56
|
+
# bail out if there's nobody to kick
|
|
57
|
+
to_kick = @should_kick.delete(m.target.downcase)
|
|
58
|
+
return unless to_kick
|
|
59
|
+
# kick the evil user that kicked us
|
|
60
|
+
@bot.kick m.target, to_kick, _("for kicking me out earlier")
|
|
61
|
+
end
|
|
62
|
+
|
|
24
63
|
end
|
|
25
64
|
|
|
26
65
|
plugin = AutoRejoinPlugin.new
|