]> jfr.im git - erebus.git/blobdiff - modules/sockets.py
update comments
[erebus.git] / modules / sockets.py
index cf79e70d36a912fc8e100e6936062cef8ec9e1a0..f9577e18fbbee6eb70f0941d86720624bd6237ca 100644 (file)
@@ -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:]</path/to/socket>
+[udp|tcp:][<ip>:]<port>
+
+
+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',