### Example Plugin Installation Workflow Source: https://github.com/progval/limnoria/blob/master/plugins/PluginDownloader/README.rst Demonstrates the typical sequence of commands to discover, inspect, and install a plugin using the PluginDownloader. Ensure the PluginDownloader is loaded before use. ```text @load PluginDownloader Ok. @plugindownloader repolist Antibody, jlu5, Hoaas, Iota, progval, SpiderDave, boombot, code4lib, code4lib-edsu, code4lib-snapshot, doorbot, frumious, jonimoose, mailed-notifier, mtughan-weather, nanotube-bitcoin, nyuszika7h, nyuszika7h-old, pingdom, quantumlemur, resistivecorpse, scrum, skgsergio, stepnem @plugindownloader repolist progval AttackProtector, AutoTrans, Biography, Brainfuck, ChannelStatus, Cleverbot, Coffee, Coinpan, Debian, ERepublik, Eureka, Fortune, GUI, GitHub, Glob2Chan, GoodFrench, I18nPlaceholder, IMDb, IgnoreNonVoice, Iwant, Kickme, LimnoriaChan, LinkRelay, ListEmpty, Listener, Markovgen, MegaHAL, MilleBornes, NoLatin1, NoisyKarma, OEIS, PPP, PingTime, Pinglist, RateLimit, Rbls, Redmine, Scheme, Seeks, (1 more message) more SilencePlugin, StdoutCapture, Sudo, SupyML, SupySandbox, TWSS, Trigger, Trivia, Twitter, TwitterStream, Untiny, Variables, WebDoc, WebLogs, WebStats, Website, WikiTrans, Wikipedia, WunderWeather @plugindownloader info progval Wikipedia Grabs data from Wikipedia. @plugindownloader install progval Wikipedia Ok. @load Wikipedia Ok. ``` -------------------------------- ### Command: install Source: https://github.com/progval/limnoria/blob/master/plugins/PluginDownloader/README.rst Use this command to download and install a plugin from a specified repository. Requires the repository name and plugin name as arguments. ```text install ``` -------------------------------- ### Implement GET Request Handling in HTTP Server Callback Source: https://github.com/progval/limnoria/wiki/The-http-server Implement the `doGet` method to handle GET requests for specific URIs. This example shows how to respond to '/supybot', '/gribble', and '/limnoria', and return a 404 error for other paths. ```python class SupystoryServerCallback(httpserver.SupyHTTPServerCallback): name = 'Supystory' defaultResponse = """ This plugin handles only GET request, please don't use other requests. """ def doGet(self, handler, path): if path == '/supybot': response = 'Supybot is the best IRC bot ever.' elif path == '/gribble': response = 'Thanks to Gribble, we have many bug fixes and SQLite 3 support' elif path == '/limnoria': response = 'Because of Limnoria, you need to internationalize your plugins and read this f*cking do.' else: response = None if response is None: handler.send_response(404) # Not found, as described by the HTTP protocol handler.send_header('Content-type', 'text/html') # This is the MIME for HTML data handler.end_headers() # We won't send more headers handler.wfile.write(""" Error

404 Not found

The document could not be found. Try one of this links: Supybot Gribble Limnoria

") else: handler.send_response(404) # Not found, as described by the HTTP protocol handler.send_header('Content-type', 'text/plain') # This is the MIME for plain text handler.end_headers() # We won't send more headers handler.wfile.write(response) ``` -------------------------------- ### Install Limnoria Bot Source: https://github.com/progval/limnoria/blob/master/README.md Installs Limnoria and its dependencies using apt-get and pip. Ensure the user's local bin directory is in the PATH. ```bash sudo apt-get install python3 python3-pip python3-wheel pip3 install --user limnoria # You might need to add $HOME/.local/bin to your PATH supybot-wizard ``` -------------------------------- ### Example: Proving Bot Ownership Source: https://github.com/progval/limnoria/blob/master/plugins/Anonymous/README.rst This example demonstrates how to configure the Anonymous plugin to prove bot ownership to network operators. It loads the plugin, sets the 'owner' capability requirement, and allows private targets for messages. ```python @load Anonymous @config plugins.anonymous.requirecapability owner @config plugins.anonymous.allowprivatetarget True @anonymous say Hi, my owner is :) ``` -------------------------------- ### Basic Sed Replacement Example Source: https://github.com/progval/limnoria/blob/master/plugins/SedRegex/README.rst Demonstrates a simple text replacement using the 's/text/replacement/' format. The bot will announce the corrected message if a match is found. ```text 20:24 helli world 20:24 s/i/o/ 20:24 jlu5 meant to say: hello world ``` -------------------------------- ### Sign Token and Upload to Pastebin Source: https://github.com/progval/limnoria/blob/master/plugins/GPG/README.rst Signs the obtained token using GPG and uploads the clearsigned content to a pastebin service (sprunge.us in this example) using curl. ```bash echo "{03640620-97ea-4fdf-b0c3-ce8fb62f2dc5}"|gpg --clearsign|curl -F 'sprunge=<-' http://sprunge.us ``` -------------------------------- ### Apache VirtualHost Configuration for Supybot HTTP Server Source: https://github.com/progval/limnoria/wiki/The-http-server This Apache configuration example demonstrates how to proxy requests to the Supybot HTTP server, enabling the use of subdomains. It includes directives for setting the server name, proxying requests, and rewriting URLs. ```apache ServerName stats.yourdomain.org ProxyPass http://localhost:8080/webstats/ SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 RewriteEngine On RewriteRule ^/webstats/(.*)$ /$1 ``` -------------------------------- ### Get Authentication Token Source: https://github.com/progval/limnoria/blob/master/plugins/GPG/README.rst Obtains a token from the bot that needs to be signed with your GPG key for authentication. ```irc logs +gpg gettoken Your token is: {03640620-97ea-4fdf-b0c3-ce8fb62f2dc5}. Please sign it with your GPG key, paste it somewhere, and call the 'auth' command with the URL to the (raw) file containing the signature. ``` -------------------------------- ### Command: info Source: https://github.com/progval/limnoria/blob/master/plugins/PluginDownloader/README.rst Use this command to display information about a specific plugin within a given repository. Requires the repository name and plugin name as arguments. ```text info ``` -------------------------------- ### Command: repolist Source: https://github.com/progval/limnoria/blob/master/plugins/PluginDownloader/README.rst Use this command to list available repositories or plugins within a specific repository. If no repository is specified, it lists all available repositories. ```text repolist [] ``` -------------------------------- ### Import Alias Database Source: https://github.com/progval/limnoria/blob/master/plugins/Aka/README.rst Imports the Alias database into Aka's database and cleans the former. Takes no arguments. ```text importaliasdatabase ``` -------------------------------- ### Load Alias and Aka Plugins Source: https://github.com/progval/limnoria/blob/master/plugins/Aka/README.rst Load the Alias and Aka plugins into Supybot. This is a prerequisite for importing aliases. ```text @load Alias @load Aka ``` -------------------------------- ### Import Alias Database and Unload Alias Source: https://github.com/progval/limnoria/blob/master/plugins/Aka/README.rst Import the existing Alias database into Aka and then unload the Alias plugin. This facilitates a smooth transition from Alias to Aka. ```text @importaliasdatabase @unload Alias ``` -------------------------------- ### Add a Basic Alias with Aka Source: https://github.com/progval/limnoria/blob/master/plugins/Aka/README.rst Define a new alias named 'alias' that executes the 'aka $1 $*' command. This allows using 'alias' as a shortcut for the 'aka' command with arguments. ```text @aka add "alias" "aka $1 $*" ``` -------------------------------- ### Add GPG Key to Account Source: https://github.com/progval/limnoria/blob/master/plugins/GPG/README.rst Associates a GPG key with your Limnoria account. Requires the key ID and the key server address. ```irc logs +gpg add 0x0C207F07B2F32B67 pool.sks-keyservers.net 1 key imported, 0 unchanged, 0 not imported. ``` -------------------------------- ### Enable SedRegex Plugin Source: https://github.com/progval/limnoria/blob/master/plugins/SedRegex/README.rst Enable the SedRegex plugin on a specific channel to activate its functionality. This command configures the plugin to process sed-style replacements within the designated channel. ```text config channel #yourchannel plugins.sedregex.enable True ``` -------------------------------- ### Define an Alias with Arguments Source: https://github.com/progval/limnoria/blob/master/plugins/Alias/README.rst Defines an alias named that executes a given . Uses $1, $2, etc. for positional arguments and @1, @2, etc. for optional arguments. $* captures all remaining arguments. ```text add ``` -------------------------------- ### Authenticate with GPG Signature Source: https://github.com/progval/limnoria/blob/master/plugins/GPG/README.rst Provides the bot with the URL to the plain text signature file for authentication. The bot will verify the signature using the associated GPG key. ```irc logs +gpg auth http://sprunge.us/DUdd You are now authenticated as Mikaela. ``` -------------------------------- ### Show Alias Content Source: https://github.com/progval/limnoria/blob/master/plugins/Aka/README.rst Displays the content of a specified alias. Usage: show [--channel <#channel>] ```text show [--channel <#channel>] ``` -------------------------------- ### Importing the HTTP Server Module in a Supybot Plugin Source: https://github.com/progval/limnoria/wiki/The-http-server This Python code snippet shows how to import the necessary HTTP server module for use within a Supybot plugin. ```python import supybot.httpserver as httpserver. ```