From 90884924a80aca9fb4427f44807308b93ed70016 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 7 Jul 2017 13:43:30 -0700 Subject: [PATCH 1/5] relay: remove a useless logging line (cherry picked from commit 3b091f9e204ef17e6f4a63245f8f251fe982f877) --- plugins/relay.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index 07fdb5c..224a255 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -635,8 +635,6 @@ def relay_joins(irc, channel, users, ts, burst=True): # just skip it continue - log.debug('(%s) relay.relay_joins: got %r for users', irc.name, users) - for user in users.copy(): if isRelayClient(irc, user): # Don't clone relay clients; that'll cause bad infinite loops. From d1f835815929d7bb5b26e787a1512887a38f3bf4 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 15 Aug 2017 21:26:18 -0700 Subject: [PATCH 2/5] Fix wrong logging for CIDR ranges in match_host (cherry picked from commit 761d3ef500db4991c2546df89eda35ba67c243ea) --- classes.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/classes.py b/classes.py index 52c3aad..82f53c5 100644 --- a/classes.py +++ b/classes.py @@ -1220,18 +1220,16 @@ class Irc(utils.DeprecatedAttributesObject): # HACK: support CIDR hosts in the hosts portion try: header, cidrtarget = glob.split('@', 1) - log.debug('(%s) Processing CIDRs for %s (full host: %s)', self.name, - cidrtarget, glob) # Try to parse the host portion as a CIDR range network = ipaddress.ip_network(cidrtarget) - log.debug('(%s) Found CIDR for %s, replacing target host with IP %s', self.name, - realhost, target) real_ip = self.users[target].ip if ipaddress.ip_address(real_ip) in network: # If the CIDR matches, hack around the host matcher by pretending that # the lookup target was the IP and not the CIDR range! glob = '@'.join((header, real_ip)) + log.debug('(%s) Found matching CIDR %s for %s, replacing target host with IP %s', self.name, + cidrtarget, target, real_ip) except ValueError: pass From f3e82cc15bb23298b9fb64bbc2fca736492be9ae Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 16 Aug 2017 00:03:13 -0700 Subject: [PATCH 3/5] Concisify match_host CIDR logging again We're replacing the glob, not the target's host. (cherry picked from commit 7aa836efa68962c5202a8e6346785e2ea60d2003) --- classes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes.py b/classes.py index 82f53c5..59115e6 100644 --- a/classes.py +++ b/classes.py @@ -1228,7 +1228,7 @@ class Irc(utils.DeprecatedAttributesObject): # If the CIDR matches, hack around the host matcher by pretending that # the lookup target was the IP and not the CIDR range! glob = '@'.join((header, real_ip)) - log.debug('(%s) Found matching CIDR %s for %s, replacing target host with IP %s', self.name, + log.debug('(%s) Found matching CIDR %s for %s, replacing target glob with IP %s', self.name, cidrtarget, target, real_ip) except ValueError: pass From 149fdde92f0dd9cc7ffff490d6ac9222f9811742 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 5 Sep 2017 19:11:37 -0700 Subject: [PATCH 4/5] README: drop Debian repo instructions There seems to be little user interest in these builds, and they take too much maintenance effort (3 different dists) to be worthwhile. --- README.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e913c4a..5636819 100644 --- a/README.md +++ b/README.md @@ -55,20 +55,11 @@ You can also find support via our IRC channels: `#PyLink @ irc.overdrivenetworks 3) Download or copy https://github.com/GLolol/PyLink/blob/master/example-conf.yml for an example configuration. -### Installing via Debian APT repository (8/Jessie+ and above) - -[The Utopia Repository](https://packages.overdrivenetworks.com/) hosts unofficial Debian packages for PyLink, which are available for Jessie and Stretch/unstable. Two versions of the `pylink` package are available: - -- The latest stable release and its dependencies are available in the `main` section of the corresponding Debian version (e.g. [`jessie/main`)](https://packages.overdrivenetworks.com/jessie_list.html). -- Nightly builds of the PyLink `devel` branch are available in the corresponding `nightlies` section (e.g. [`jessie-nightlies/main`](https://packages.overdrivenetworks.com/jessie-nightlies_list.html)) - -See https://packages.overdrivenetworks.com/ for setup instructions. - -Upon installing `pylink`, example configuration and docs will be in `/usr/share/doc/pylink/examples` and `/usr/share/doc/pylink/docs` respectively. You can also install a local copy of the [PyLink API reference](https://pylink.github.io/) through the `pylink-doc` package. - ### Installing via Ubuntu PPA (14.04/Trusty and above) -Unofficial Ubuntu packages for PyLink are available via two PPAs for Ubuntu 14.04 LTS (trusty) and above. Like with the Debian installation, example configuration and docs will be in `/usr/share/doc/pylink/examples` and `/usr/share/doc/pylink/docs` respectively. +Unofficial Ubuntu packages for PyLink are available via two PPAs for Ubuntu 14.04 LTS (trusty) and above. + +Upon installing the `pylink` package, example configuration and docs will be in `/usr/share/doc/pylink/examples` and `/usr/share/doc/pylink/docs` respectively. You can also install a local copy of the [PyLink API reference](https://pylink.github.io/) through the `pylink-doc` package. - Stable releases: [PyLink Stable PPA](https://launchpad.net/~tacocat/+archive/ubuntu/pylink) - Nightly builds (devel branch): [PyLink Nightly Builds PPA](https://launchpad.net/~tacocat/+archive/ubuntu/pylink-nightly) From 93704d85bf7d011ef55cbe5f98e1eea609f95d84 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 5 Sep 2017 21:21:16 -0700 Subject: [PATCH 5/5] unreal: fix TypeError when a set is given for modes in mode() --- protocols/unreal.py | 1 + 1 file changed, 1 insertion(+) diff --git a/protocols/unreal.py b/protocols/unreal.py index b072464..b4148b9 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -224,6 +224,7 @@ class UnrealProtocol(TS6BaseProtocol): if utils.isChannel(target): + modes = list(modes) # Needed for indexing # Make sure we expand any PUIDs when sending outgoing modes... for idx, mode in enumerate(modes): if mode[0][-1] in self.irc.prefixmodes: