Bots: Difference between revisions
From Buzznet
No edit summary |
No edit summary |
||
Line 70: | Line 70: | ||
git clone <nowiki>https://github.com/jlu5/Limnoria-NuWeather</nowiki> NuWeather | git clone <nowiki>https://github.com/jlu5/Limnoria-NuWeather</nowiki> NuWeather | ||
== Web == | === Web === | ||
URL Previews in a channel | URL Previews in a channel | ||
!load Web | !load Web |
Revision as of 16:27, 2 October 2025
Getting Started with Limnoria/Supybot
Introduction
- Ok, so you’ve decided to try out Limnoria. That’s great!
- Limnoria, is the best IRC bot in the world :)
Initial Setup
- YOU NEED ROOT
- First create a user call supybot
adduser supybot
- You need to add your user to sudoers list
nano /etc/sudoers
- ADD this line to user privilege specification
supybot ALL=(ALL:ALL) ALL
- Switch to the new user with
su supybot
- Is the time to installation
sudo apt install limnoria
- you may create a ‘runbot’ directory inside your home directory.
mkdir runbot
- Now you can cd to your ‘runbot’ directory,
cd runbot
- and from within it run
supybot-wizard
, which will walk you through a series of questions to generate the bot config file.
supybot-wizard
- Once you generate the config file, which will be named
yourbotnick.conf
(where “yourbotnick” is the nick you have chosen for your bot in the wizard), it will be placed in your ‘runbot’ directory. (
- Now to start the bot, run, still from within the ‘runbot’ directory:
supybot -d yourbotnick.conf
- The operation succeeded xD
Limnoria Plugins
- is always a good choice to load PluginDownloader do this command in the channel
!load PluginDownloader
RelayNext
git clone https://github.com/jlu5/Limnoria-RelayNext RelayNext
- Load the plugins via #channel
!load RelayNext
- RelayNext is a next generation relayer system for Limnoria, designed with two-way relays in mind. It is intended as a replacement for the stock Relay plugin, and an alternative to the LinkRelay plugin.
- RelayNext supports relaying between channels with different names, and stores its entries in a database instead of the configuration, preventing various forms of entry corruption.
- Creating a relay is simple, simply run:
!relaynext add Your-relay-name #channel1@networkOne #somewhere@networkTwo
NuWeather
git clone https://github.com/jlu5/Limnoria-NuWeather NuWeather
Web
URL Previews in a channel
!load Web
!config channel #Buzznet supybot.plugins.Web.titleSnarfer true
This is a table of notable bots on Buzznet.
- If you host a bot related to service, join it to #services.
Manual:IRC RC Bot
- To create an IRC bot to display recent changes to your Wiki
LocalSettings.php
- Add the following to your local settings file (see $wgRCFeeds):
// IRC # port: 1338 $wgRCFeeds['ircfeed'] = array( 'formatter' => 'IRCColourfulRCFeedFormatter', 'uri' => 'udp://127.0.0.1:1338', 'add_interwiki_prefix' => false, 'omit_bots' => true, );
SOCAT and ircII (or similar cli irc client)
- Use socat instead of netcat. Some versions of netcat (on Debian at least) stop listening after receiving the first RC entry, because the wiki changes the port used to send the UDP packet.
socat -T5 - udp4-listen:1338,reuseaddr,fork | ircII -d -c \#<channel> <nick> <irc_server>
- Use -T5 to specify a timeout (5 seconds here) after which each UDP connection will be closed for inactivity. Otherwise, the fork option will create more and more processes for each connection, potentially reaching the open file description limit or exhaust your server resources.