# These things might need tuning
-HOST = "localhost"
-PORT = 6659
-
XMIT_TTL = (3 * 60 * 60) # Time to live, seconds from last transmit
PING_TTL = (15 * 60) # Time to live, seconds from last PING
HANDSHAKE_TTL = 60 # Time to live, seconds from nick transmit
parser.add_argument(
'-l', '--log-file', metavar='PATH',
help='file for saving captured message traffic')
+ parser.add_argument(
+ '-H', '--host', metavar='ADDRESS', default='localhost',
+ help='IP address to listen on')
+ parser.add_argument(
+ '-P', '--port', metavar='PORT', default=6659, type=int,
+ help='port to listen on')
parser.add_argument(
'-n', '--nick', metavar='NAME', default='irker%03d',
help="nickname (optionally with a '%%.*d' server connection marker)")
raise SystemExit(1)
irker.thread_launch()
try:
- tcpserver = socketserver.TCPServer((HOST, PORT), IrkerTCPHandler)
- udpserver = socketserver.UDPServer((HOST, PORT), IrkerUDPHandler)
+ tcpserver = socketserver.TCPServer(
+ (args.host, args.port), IrkerTCPHandler)
+ udpserver = socketserver.UDPServer(
+ (args.host, args.port), IrkerUDPHandler)
for server in [tcpserver, udpserver]:
server = threading.Thread(target=server.serve_forever)
server.setDaemon(True)
<arg>-c <replaceable>ca-file</replaceable></arg>
<arg>-d <replaceable>debuglevel</replaceable></arg>
<arg>-l <replaceable>logfile</replaceable></arg>
+ <arg>-H <replaceable>host</replaceable></arg>
+ <arg>-P <replaceable>port</replaceable></arg>
<arg>-n <replaceable>nick</replaceable></arg>
<arg>-p <replaceable>password</replaceable></arg>
<arg>-i <replaceable>IRC-URL</replaceable></arg>
message data.</para></listitem>
</varlistentry>
<varlistentry>
+<term>-H</term>
+<listitem><para>Takes a following hostname, and binds to that address
+when listening for messages. <application>irkerd</application> binds
+to localhost by default, but you may want to use your host's public
+address to listen on a local network. Listening on a public interface
+is not recommended, as it makes spamming IRC channels very
+easy.</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>-P</term>
+<listitem><para>Takes a following port number, and binds to that port
+when listening for messages. <application>irkerd</application> binds
+to port 6659 by default.</para></listitem>
+</varlistentry>
+<varlistentry>
<term>-n</term>
<listitem><para>Takes a following value, setting the nick
to be used. If the nick contains a numeric format element
outside world. Priming your firewall with blocklists of IP addresses
known to spew spam is always a good idea.</para>
-<para>The absence of any option to set the service port is deliberate.
-If you think you need to do that, you have a problem better solved at
-your firewall.</para>
-
<para>IRC has a message length limit of 510 bytes; generate your
privmsg attribute values with appropriate care.</para>