Georg Brandl <georg@python.org> contributed the Mercurial support in
irkerhook.py and explained how to make Control-C work right.
-Peter Scott <pjscott@iastate.edu> contributed the original greenlet
-support.
-
Laurent Bachelier <laurent@bachelier.name> fixed the Makefile so it
wouldn't break stuff and wrote the first version of the external
filtering option.
it. See <http://pypi.python.org/pypi/irc/>; use version 3.0, not the
older code from SourceForge.
-For higher performance, also install the eventlet library from
-<http://pypi.python.org/pypi/eventlet/>. This merges in a cooperative
-threading implementation that is faster and has much lower space
-overhead than system threads, making irkerd more resistant to
-potential DoS attacks.
-
The file org.catb.irkerd.plist is a Mac OS/X plist that can be
installed to launch irkerd as a boot-time service on that system.
CHANNEL_MAX = 18 # Max channels open per socket (default)
ANTI_FLOOD_DELAY = 0.5 # Anti-flood delay after transmissions, seconds
ANTI_BUZZ_DELAY = 0.09 # Anti-buzz delay after queue-empty check
+CONNECTION_MAX = 200 # To avoid hitting a thread limit
# No user-serviceable parts below this line
version = "1.9"
-# This black magic imports support for green threads (coroutines),
-# then has kinky sex with the import library internals, replacing
-# "threading" with a coroutine-using imposter. Threads then become
-# ultra-light-weight and cooperatively scheduled.
-try:
- import eventlet
- eventlet.monkey_patch()
- green_threads = True
- # With greenlets we don't worry about thread exhaustion, only the
- # file descriptor limit (typically 1024 on modern Unixes). Thus we
- # can handle a lot more concurrent sessions and generate less
- # join/leave spam under heavy load.
- CONNECTION_MAX = 1000
-except ImportError:
- # Threads are more expensive if we have to use OS-level ones
- # rather than greenlets. We need to avoid pushing thread limits
- # as well as fd limits. See security.txt for discussion.
- CONNECTION_MAX = 200
- green_threads = False
-
import sys, getopt, urlparse, time, random, socket
import threading, Queue, SocketServer
import irc.client, logging
from completely blocking all message traffic; the cost would be a
whole lot of join/leave spam due to connection churn.
-We also use greenlets (Python coroutines imitating system threads)
-when they are available. This reduces memory overhead due to
-threading substantially, making a thread-flooding DoS more dfficult.
-
== Authentication/Integrity ==
One way to help prevent DoS attacks would be in-band authentication -