Glitch - A bloated irc/chat bot!

Glitch is a python chat bot to serve my purposes and poor coding standards. It is powered by the new and awesome asyncio library in Python 3.4. Asyncio grants Glitch awesome powers such as running irc, http, and websocket services in one event loop without those pesky threads.

There is quite a bit of delicious bloat to this bot. It requires a mongo database.

Installation

Using mercurial:

$ hg clone https://bitbucket.org/croxis/glitch
$ pip install -r requirements.txt
$ python setup.py install

To setup your first bot run the command:

$ glitch

A setup program will walk you through some common configuration options and set up the bot’s subdirectory and files. One set up check out the yaml configuration file:

$ cd yourbotsnamehere
$ nano/vi/emacs/whatever bot.yaml

Activate your bot:

$ glitch

Enjoy your nice, bloaty, rough around the edges bot!

I am not responsible if the program decides to format your root partition.

Welcome to Glitch’s documentation!

Testing test test

Contents:

# EyeRCBot | Glitch # Written by croxis # As is. If it somehow removes your root directory, it isn’t my fault.

glitch.get_nick(server)[source]

Return the bot nick of a given server. :param server:

glitch.init(conf)[source]

Bot setup and run forever. :param conf:

glitch.save_config()[source]

Write bot configuration to file.

glitch.plugins.get_command_functions(plugin)[source]

Returns a list of functions of functions that have a command bound to them from a given plugin.

glitch.plugins.get_config(plugin_name)[source]

Convenience function for an otherwise wordy dict lookup.

glitch.plugins.load_plugin(plugin_name) → bool[source]

Loads system plugins first followed by any user installed plugins in the bot directory.

glitch.plugins.manage_plugin_config(plugin_name, plugin_config, config_version)[source]

Manage plugin config in bot.yaml

This function has the very complicated task on managing and updating the main config with the plugin config. The goal is to preserve user config in the event of a plugin config update. Plugin config version requires a bot config version of equal or greater value. Less than means the config must be updated. Returns if bot needs reboot or not TODO: Does not update nested config expansions. Find a better way?

glitch.plugins.process_command(event)[source]

Process an incoming command message into plugin. :param event:

glitch.plugins.unload_plugin(plugin)[source]

Unload target plugin, remove maps from the messenger.

Admin plugin

glitch.plugins.admin.add_channel(event)[source]

Permanently joins a channel on the given server in a space delimited list.

glitch.plugins.admin.add_plugin(event)[source]

Space delimited list on plugins to try to add. Determines if plugin exists. Add to and save new config Reload plugins.

Indices and tables