From: Chris Porter Date: Fri, 17 Apr 2009 22:41:52 +0000 (+0100) Subject: Patch from thommey which adds support for old CGIIRC hostname spoofing. X-Git-Url: https://jfr.im/git/irc/quakenet/qwebirc.git/commitdiff_plain/711593cdb6d5218f13765e3845b71819eec426fa Patch from thommey which adds support for old CGIIRC hostname spoofing. Also add an AUTHORS file. --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..c719a31 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,4 @@ +The following people have contributed code to qwebirc: + +Chris Porter +Thomas Sader diff --git a/config.py.example b/config.py.example index 6728457..a4b4613 100644 --- a/config.py.example +++ b/config.py.example @@ -26,11 +26,14 @@ APP_TITLE = "FooNet Web IRC" DNS_TIMEOUT = 5 # Possible types include "webirc" (CGIIRC style webirc config block), +# "cgiirc" (old CGIIRC style serverpassword), # "hmac" (quakenet specific) and None (passes ip and host in realname) WEBIRC_MODE = "webirc" # webirc mode values WEBIRC_PASSWORD = "fish" +# cgiirc mode values +CGIIRC_STRING = "CGIIRC" # hmac mode values HMACKEY = "mrmoo" HMACTEMPORAL = 30 diff --git a/qwebirc/ircclient.py b/qwebirc/ircclient.py index e679530..28609a6 100644 --- a/qwebirc/ircclient.py +++ b/qwebirc/ircclient.py @@ -82,6 +82,9 @@ class QWebIRCClient(basic.LineReceiver): elif config.WEBIRC_MODE == "webirc": self.write("WEBIRC %s qwebirc %s %s" % (config.WEBIRC_PASSWORD, hostname, ip)) self.write("USER %s bleh %s :%s" % (ident, ip, realname)) + elif config.WEBIRC_MODE == "cgiirc": + self.write("PASS %s_%s_%s" % (config.CGIIRC_STRING, ip, hostname)) + self.write("USER %s bleh %s :%s" % (ident, ip, realname)) else: if ip == hostname: dispip = ip