Permalink
Browse files

patches are now in the patches sub directory

  • Loading branch information...
1 parent 214c540 commit 30f7943fbf2ad9e4ea12a6da80d62602fdcfe0dc @fs111 committed Mar 3, 2010
Showing with 43 additions and 0 deletions.
  1. +11 −0 patches/phenny-bot-IPv6-patch_irc.py.patch
  2. +32 −0 patches/phenny-bot-username-access-in-plugins.patch
@@ -0,0 +1,11 @@
+--- /tmp/phenny/irc.py 2010-01-30 12:23:24.000000000 +0100
++++ irc.py 2010-02-28 23:14:31.000000000 +0100
+@@ -71,7 +71,7 @@
+ if self.verbose:
+ message = 'Connecting to %s:%s...' % (host, port)
+ print >> sys.stderr, message,
+- self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
++ self.create_socket(socket.AF_INET6, socket.SOCK_STREAM)
+ self.connect((host, port))
+ try: asyncore.loop()
+ except KeyboardInterrupt:
@@ -0,0 +1,32 @@
+--- ../phenny_orig/bot.py 2009-10-05 23:18:36.000000000 +0200
++++ bot.py 2009-10-05 23:22:34.000000000 +0200
+@@ -185,6 +185,11 @@
+ except Exception, e:
+ self.error(origin)
+
++ def call_with_origin(self, func, origin, phenny, input):
++ try: func(phenny, input, origin)
++ except Exception, e:
++ self.error(origin)
++
+ def limit(self, origin, func):
+ if origin.sender and origin.sender.startswith('#'):
+ if hasattr(self.config, 'limit'):
+@@ -209,12 +214,14 @@
+
+ phenny = self.wrapped(origin, text, match)
+ input = self.input(origin, text, bytes, match, event, args)
+-
++ target = self.call
++ if hasattr(func, "with_origin"):
++ target = self.call_with_origin
+ if func.thread:
+ targs = (func, origin, phenny, input)
+- t = threading.Thread(target=self.call, args=targs)
++ t = threading.Thread(target=target, args=targs)
+ t.start()
+- else: self.call(func, origin, phenny, input)
++ else: target(func, origin, phenny, input)
+
+ for source in [origin.sender, origin.nick]:
+ try: self.stats[(func.name, source)] += 1

0 comments on commit 30f7943

Please sign in to comment.