Go to file
luk3yx 4de8d1119c Add deprecation notice to minetest-trackr.py
The code is now in a separate repo
2021-12-16 17:33:08 +13:00
.gitignore Initial commit 2018-09-13 16:46:18 +12:00
LICENSE.md Initial commit 2018-09-13 16:46:18 +12:00
README.md Add miniirc_bootstrap.py 2019-08-18 10:03:49 +12:00
example.py Mostly code style changes 2019-06-20 18:21:25 +12:00
lua.py Add lua.py 2019-07-12 15:21:55 +12:00
minetest-trackr.py Add deprecation notice to minetest-trackr.py 2021-12-16 17:33:08 +13:00
miniirc_bootstrap.py Avoid installing distutils after its scheduled removal 2021-04-25 18:59:23 +12:00
relay.py relay.py: Use colon=False. 2019-08-18 09:34:38 +12:00
stdinbot.py Mostly code style changes 2019-06-20 18:21:25 +12:00

README.md

stdinbot

A collection of miniirc bots.

stdinbot.py

A stupidly simple IRC bot to interact with stdin.

example.py

An example miniirc bot. If you want to make your own bot, you can use this as the base.

relay.py

A miniirc-based relay bot. Edit the networks list before using.

minetest-trackr.py

Made for IRC channels with lots of Minetest servers, where only Minetest servers are voiced, and will allow IRC users to run .players to get a list of players on all the servers without flooding the channel (as badly as requesting a player list from every server). Currently not cross-channel and will ignore devoices.

Python scripts/applications that aren't strictly bots

miniirc_bootstrap.py

Automatically installs pip (if required) and then runs pip install --upgrade miniirc. This should work if pip isn't in your PATH or if the pip in your PATH is for a different Python version.

You do not need this if you already have and know how to install packages with pip.

lua.py

A wrapper around lupa to make creating miniirc bots with lua easier. This may move eventually.

Dependencies: sudo pip3 install lupa>=1.8 miniirc_extras miniirc>=1.4.0

Usage

./lua.py <path to lua file>

This lua file will be able to use the miniirc global variable. IRC objects are not called with : (irc.msg(...) instead of irc:msg(...)). Remember that lua table indexes start with 1 and not 0.

await

Handlers are executed inside coroutines and an await function is created, so that Python functions can be called without blocking the lua thread. The main lua file can return a function that will be called inside a coroutine.

await(blocking_python_function, parameters)
await{blocking_python_function, parameters, keyword='argument'}

Note: awaiting a lua function is pointless and will still block the lua thread.

sleep

The same syntax as time.sleep, doesn't block the lua thread if called inside a coroutine.

miniirc

A simple IRC client framework.

The miniirc framework is now on a separate repo (GitLab, GitHub) and can be installed via pip with sudo -H pip3 install miniirc.