X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/33af27c632e4227f266466ffd26260986cfcc5f7..52c80cff91dce5fa14ae903c6c2bf20533ccca46:/modules/sockets.py diff --git a/modules/sockets.py b/modules/sockets.py index cf79e70..f9577e1 100644 --- a/modules/sockets.py +++ b/modules/sockets.py @@ -1,9 +1,34 @@ # Erebus IRC bot - Author: Erebus Team # vim: fileencoding=utf-8 +# Configurable sockets module. DO NOT USE without understanding the risks # This file is released into the public domain; see http://unlicense.org/ # Note: this module doesn't do any kind of authentication, so anyone who can connect to the bound port can spam you. +""" +To use - add in bot.config something like: + +[sockets] +127.0.0.1:1337 = #example + +The left side is the address to listen on and the right side is the channel to send to. +The exmaple will send incoming lines/packets on localhost, port 1337 to channel #example + +The full syntax for the address is: +[unix:] +[udp|tcp:][:] + + +Address examples: + +Unix domain socket: /path +Unix domain socket: unix:/path +TCP socket (all interfaces): 1337 +TCP socket (one interface): 127.0.0.1:1337 +UDP socket (all interfaces): udp:1337 +UDP socket (one interface): udp:127.0.0.1:1337 +""" + # module info modinfo = { 'author': 'Erebus Team',