From df50b7b137a1b3165aa28d9fd4db19d5ed2c4cca Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 19 Sep 2016 18:23:11 -0700 Subject: [PATCH 1/8] bots: allow JOIN/NICK/QUIT on ServiceBot clients (cherry picked from commit 1c86f3200302c3398a448436be79e507601b2f9c) --- plugins/bots.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/bots.py b/plugins/bots.py index 1dc1dde..53ecede 100644 --- a/plugins/bots.py +++ b/plugins/bots.py @@ -74,7 +74,7 @@ def joinclient(irc, source, args): irc.reply("Error: No valid channels given.") return - if not irc.isManipulatableClient(u): + if not (irc.isManipulatableClient(u) or irc.isServiceBot(u)): irc.reply("Error: Cannot force join a protected PyLink services client.") return @@ -116,7 +116,7 @@ def nick(irc, source, args): irc.reply('Error: Invalid nickname %r.' % newnick) return - elif not irc.isManipulatableClient(u): + elif not (irc.isManipulatableClient(u) or irc.isServiceBot(u)): irc.reply("Error: Cannot force nick changes for a protected PyLink services client.") return @@ -158,7 +158,7 @@ def part(irc, source, args): irc.reply("Error: No valid channels given.") return - if not irc.isManipulatableClient(u): + if not (irc.isManipulatableClient(u) or irc.isServiceBot(u)): irc.reply("Error: Cannot force part a protected PyLink services client.") return From d05917222d248050f6d5b029e733fe43181efa1c Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 20 Sep 2016 06:58:04 -0700 Subject: [PATCH 2/8] relay: clobber colour codes in hosts (cherry picked from commit b467da13b12b87b972714d89129e7e93f11e7137) --- plugins/relay.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/relay.py b/plugins/relay.py index 1d9e410..6174f25 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -182,6 +182,15 @@ def normalizeHost(irc, host): if irc.protoname not in ('inspircd', 'ts6', 'clientbot', 'nefarious'): # UnrealIRCd and IRCd-Hybrid don't allow slashes in hostnames host = host.replace('/', '.') + host = host.replace('\x03', '') # Strip colours + host = host.replace('\x02', '') # Strip bold + host = host.replace('\x1f', '') # Strip underline + host = host.replace('\x1d', '') # Strip italic + host = host.replace('\x0f', '') # Strip color reset + host = host.replace('\x16', '') # Strip reverse color + # And no, I'm not supporting colours in hosts. Screw your IRCd-breaking patches if you think + # this is cool. -GL + return host[:63] # Limit hosts to 63 chars for best compatibility def loadDB(): From aa0d1596b0c41bb957bdfa402d277f26cbd3e87c Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 1 Oct 2016 00:34:38 -0700 Subject: [PATCH 3/8] ts6: don't crash when CHGHOST target is a nick instead of UID (cherry picked from commit 4dcbc85a816eee8d509940dfefea9bdd078bb56d) --- protocols/ts6.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocols/ts6.py b/protocols/ts6.py index e42d4ca..036c8ef 100644 --- a/protocols/ts6.py +++ b/protocols/ts6.py @@ -630,7 +630,7 @@ class TS6Protocol(TS6BaseProtocol): def handle_chghost(self, numeric, command, args): """Handles incoming CHGHOST commands.""" - target = args[0] + target = self._getUid(args[0]) self.irc.users[target].host = newhost = args[1] return {'target': target, 'newhost': newhost} From 8486d7c85bdf49860bb7aa48f307c8e527e03987 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 5 Oct 2016 19:07:37 -0700 Subject: [PATCH 4/8] setup.py: Ship the VERSION file as well --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 38ac142..28d770e 100644 --- a/setup.py +++ b/setup.py @@ -81,7 +81,7 @@ setup( # Data files package_data={ - '': ['example-conf.yml', 'example-permissions.yml'], + '': ['example-conf.yml', 'example-permissions.yml', 'VERSION'], }, package_dir = {'pylinkirc': '.'}, From 613bece13adb3bb3d250a0ef6302b71d7a55e194 Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 19 Sep 2016 18:23:25 -0700 Subject: [PATCH 5/8] .gitattributes: force .py and .md to LF (cherry picked from commit 8acdfc81c1d40250f2eac2986a6f15f06a57303f) --- .gitattributes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 4c62c20..9cf0cce 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,7 @@ * text=auto -*.py text -*.md text +*.py eol=lf +*.md eol=lf *.png binary *.jpg binary From 738f027f33353159e266df8d6db90569075f14d0 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 5 Oct 2016 19:13:00 -0700 Subject: [PATCH 6/8] PyLink 1.0.1 --- RELNOTES.md | 18 ++++++++++++++++-- VERSION | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/RELNOTES.md b/RELNOTES.md index 72cf5a5..bfd74d7 100644 --- a/RELNOTES.md +++ b/RELNOTES.md @@ -1,5 +1,19 @@ -# PyLink 1.0.0 -Tagged as **1.0.0** by [GLolol](https://github.com/GLolol) +# PyLink 1.0.1 +Tagged as **1.0.1** by [GLolol](https://github.com/GLolol) + +The "Beam" release. + +### Changes from 1.0.0 + +#### Bug fixes + +- **Fix PyLink being uninstallable via PyPI due to a missing VERSION file.** +- ts6: don't crash when CHGHOST target is a nick instead of UID +- relay: clobber colour codes in hosts +- bots: allow JOIN/NICK/QUIT on ServiceBot clients + +# [PyLink 1.0.0](https://github.com/GLolol/PyLink/releases/tag/1.0.0) +Tagged as **1.0.0** by [GLolol](https://github.com/GLolol) on 2016-09-17T05:25:51Z The "Benevolence" release. diff --git a/VERSION b/VERSION index 3eefcb9..7dea76e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0 +1.0.1 From e22d75d1a16af8def9692fb6bfbc143a2844c5c3 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 5 Oct 2016 19:22:23 -0700 Subject: [PATCH 7/8] setup: install README.md as well ... --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 28d770e..8e81522 100644 --- a/setup.py +++ b/setup.py @@ -81,7 +81,7 @@ setup( # Data files package_data={ - '': ['example-conf.yml', 'example-permissions.yml', 'VERSION'], + '': ['example-conf.yml', 'example-permissions.yml', 'VERSION', 'README.md'], }, package_dir = {'pylinkirc': '.'}, From 8bffffa000a95154c98e55ae9b867d8538767a93 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 5 Oct 2016 20:30:32 -0700 Subject: [PATCH 8/8] example-conf: comment out filerotation: so it doesn't become an empty, null-valued block --- example-conf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example-conf.yml b/example-conf.yml index 6b98c7c..9656db4 100644 --- a/example-conf.yml +++ b/example-conf.yml @@ -381,7 +381,7 @@ logging: #"debug": # loglevel: DEBUG - filerotation: + #filerotation: # Configures optional log file rotation. When enabled, PyLink will create rotate files # in the format pylink-commands.log, pylink-commands.log.1, pylink-commands.log.2, etc. # If either max_bytes or backup_count is 0, log rotation will be disabled.