Difference between revisions of "Limnoria"
m (Added set -f to the shim because wildcard expansion is a bad thing) |
m (Bot: Cosmetic changes) |
||
Line 1: | Line 1: | ||
− | |||
Limnoria is the IRC bot we use in #sshc for normal IRC bot duties. It is a fork of Supybot. | Limnoria is the IRC bot we use in #sshc for normal IRC bot duties. It is a fork of Supybot. | ||
− | = Tips and Tricks = | + | = Tips and Tricks = |
− | == Announcing changes in the wiki== | + | == Announcing changes in the wiki == |
There's an old [http://www.mediawiki.org/wiki/Extension:SupybotNotify Mediawiki Extension] to handle this, but it broke with Mediawiki 1.22. Using Mediawiki's builtin features should make this a bit more robust: | There's an old [http://www.mediawiki.org/wiki/Extension:SupybotNotify Mediawiki Extension] to handle this, but it broke with Mediawiki 1.22. Using Mediawiki's builtin features should make this a bit more robust: | ||
− | Mediawiki has a built in feature that will announce recent changes to an arbitary UDP port. | + | Mediawiki has a built in feature that will announce recent changes to an arbitary UDP port. To turn that feature on, add this to LocalSettings.php: |
$wgRC2UDPAddress = '127.0.0.1'; | $wgRC2UDPAddress = '127.0.0.1'; | ||
$wgRC2UDPPort = '51666'; | $wgRC2UDPPort = '51666'; | ||
$wgRC2UDPPrefix = "#sshc "; | $wgRC2UDPPrefix = "#sshc "; | ||
− | Supybot has a plugin that will relay messages sent to an arbitrary TCP port to a channel. | + | Supybot has a plugin that will relay messages sent to an arbitrary TCP port to a channel. Add [https://git.fedorahosted.org/git/supybot-notify.git this plugin] to your Supybot installation, and configure it to listen to localhost on port 5050: |
load Notify | load Notify | ||
config supybot.plugins.Notify.server_address 127.0.0.1 | config supybot.plugins.Notify.server_address 127.0.0.1 | ||
Line 31: | Line 30: | ||
[http://sourceforge.net/projects/supybot/ Supybot Sourceforge Page] | [http://sourceforge.net/projects/supybot/ Supybot Sourceforge Page] | ||
+ | |||
+ | [[Category:IRC]] | ||
+ | [[Category:System Administration]] |
Revision as of 22:19, 27 February 2017
Limnoria is the IRC bot we use in #sshc for normal IRC bot duties. It is a fork of Supybot.
Tips and Tricks
Announcing changes in the wiki
There's an old Mediawiki Extension to handle this, but it broke with Mediawiki 1.22. Using Mediawiki's builtin features should make this a bit more robust:
Mediawiki has a built in feature that will announce recent changes to an arbitary UDP port. To turn that feature on, add this to LocalSettings.php:
$wgRC2UDPAddress = '127.0.0.1'; $wgRC2UDPPort = '51666'; $wgRC2UDPPrefix = "#sshc ";
Supybot has a plugin that will relay messages sent to an arbitrary TCP port to a channel. Add this plugin to your Supybot installation, and configure it to listen to localhost on port 5050:
load Notify config supybot.plugins.Notify.server_address 127.0.0.1 config supybot.plugins.Notify.server_port 5050
These then almost work together; if it wasn't for that pesky UDP->TCP translation. You can use netcat to make a quick shim:
set -f && while [ true ] ; do nc -w1 -u -l 51666 | while read line; do echo $line | nc 127.0.0.1 5050; done; done
And then you'll see notifications like this in your the IRC channel:
<oscarbot> [[Limnoria]] M http://wiki.sshchicago.org/index.php?diff=330&oldid=329&rcid=340 * Cswingler * (+1) Formatting
Security Caveats
Anyone who is capable of talking to the loopback interface on the server can push arbitrary messages to the IRC channel. Granted, those should be people you trust anyhow. :)