From 5cea0fa73a2e981ef4096dee359914f9f6c8016a Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 27 Apr 2017 07:28:26 -0700 Subject: [PATCH 1/8] commands: remove extraneous private=True from showchan (cherry picked from commit 79e2d20d9d113398deedba1297c07a9e65711193) --- plugins/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/commands.py b/plugins/commands.py index 7d53fa3..a154c11 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -99,7 +99,7 @@ def showchan(irc, source, args): secret = ('s', None) in c.modes if secret and not verbose: # Hide secret channels from normal users. - irc.error('Unknown channel %r.' % channel, private=True) + irc.error('Unknown channel %r.' % channel) return nicks = [irc.users[u].nick for u in c.users] From bab6a71a2edba7d43244c99609172e994f4935e8 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 29 Apr 2017 00:08:07 -0700 Subject: [PATCH 2/8] example-conf: fix reversed option description for password encryption (cherry picked from commit e69e1f5f038deca72f2f1108818d231c4664792f) --- example-conf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example-conf.yml b/example-conf.yml index 011db49..f34120e 100644 --- a/example-conf.yml +++ b/example-conf.yml @@ -62,7 +62,7 @@ login: # 'mkpasswd' command or the 'pylink-mkpasswd' utility included with PyLink. password: "$6$rounds=81447$WlVlZYCgbnjPmVqy$28Tu/Zl0xNpePqimax2wABKn5GCoWomYEI1Pu5jqYyQNULazR4BxQmscZ0MgBHqBCCke.3u5eOtBSZwL3WwVf0" - # Determines whether the password given is in plain-text. Defaults to false + # Determines whether the password given is encrypted. Defaults to false # (plain text) for backwards compatibility. encrypted: true From 5b73e0a69108ceca375ba6787c6123bdb41f38ef Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 12 May 2017 18:45:27 -0700 Subject: [PATCH 3/8] service_support: fix service respawn on KILL (cherry picked from commit 7e51d3a7f5b184e3edafdd55c5f834177fe44b3a) --- coremods/service_support.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/coremods/service_support.py b/coremods/service_support.py index 103517b..a942c1a 100644 --- a/coremods/service_support.py +++ b/coremods/service_support.py @@ -94,10 +94,18 @@ utils.add_hook(handle_endburst, 'ENDBURST') def handle_kill(irc, source, command, args): """Handle KILLs to PyLink service bots, respawning them as needed.""" target = args['target'] + userdata = args.get('userdata') sbot = irc.getServiceBot(target) - if sbot: - spawn_service(irc, source, command, {'name': sbot.name}) - return + servicename = None + + if userdata and hasattr(userdata, 'service'): # Look for the target's service name attribute + servicename = userdata.service + elif sbot: # Or their service bot instance + servicename = sbot.name + if servicename: + log.debug('(%s) services_support: respawning service %s after KILL.', irc.name, servicename) + spawn_service(irc, source, command, {'name': servicename}) + utils.add_hook(handle_kill, 'KILL') def handle_kick(irc, source, command, args): From 2217306ca1147d4c14638c330b39772e4bbfc337 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 2 Jun 2017 08:09:19 -0700 Subject: [PATCH 4/8] p10: acknowledge incoming KICKs with a PART Per https://github.com/evilnet/nefarious2/blob/ed12d64/doc/p10.txt#L611-L616. This fixes autorejoin-on-kick not working with prefix modes because the remote verifies whether the KICK has been acknowledged properly. Closes #465. (backported from commit 1996b86e85aff5ba0465445574f9ff7e91b18034) --- protocols/nefarious.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/protocols/nefarious.py b/protocols/nefarious.py index 9b47daa..aa3384f 100644 --- a/protocols/nefarious.py +++ b/protocols/nefarious.py @@ -1218,6 +1218,11 @@ class P10Protocol(IRCS2SProtocol): kicked = args[1] self.handle_part(kicked, 'KICK', [channel, args[2]]) + + # Send PART in response to acknowledge the KICK, per + # https://github.com/evilnet/nefarious2/blob/ed12d64/doc/p10.txt#L611-L616 + self._send(kicked, 'L %s :%s' % (channel, args[2])) + return {'channel': channel, 'target': kicked, 'text': args[2]} def handle_topic(self, source, command, args): From 963e8e71806c67a6aa57ab7d661fed8959d30b94 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 6 Jun 2017 13:06:58 -0700 Subject: [PATCH 5/8] travis: rm skip_upload_docs rule This doesn't seem to do anything useful? --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index cc875b7..b9693be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,5 @@ deploy: condition: $(python3 -c 'import re,os; print(bool(re.match(r"^(\d+\.){2,}\d+$", os.environ.get("TRAVIS_TAG", ""))))') == "True" python: '3.6' - skip_upload_docs: true - notifications: email: false From 805aa52f59ad9700ac06d5ed4d9fd9804a4327e8 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 6 Jun 2017 13:21:20 -0700 Subject: [PATCH 6/8] travis: Move to Ubuntu 14.04; it has a newer pandoc version which better supports GitHub flavoured markdown --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index b9693be..00745b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +dist: trusty +sudo: false + language: python python: - '3.4' From f8a4f003f11ac2ebacef039b1a718efdd0cd9473 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 6 Jun 2017 13:38:40 -0700 Subject: [PATCH 7/8] setup.py: explicitly parse README.md as markdown_github --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fb0e357..1aac2e8 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ with open('__init__.py', 'w') as f: # Convert Markdown to RST for PyPI try: import pypandoc - long_description = pypandoc.convert('README.md', 'rst') + long_description = pypandoc.convert('README.md', 'rst', format='markdown_github') except ImportError: print('WARNING: PyPandoc not available; skipping writing long description.') long_description = None From 7794171d6255101e95e3d5d020d5926ebe11ec1a Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 6 Jun 2017 17:30:11 -0700 Subject: [PATCH 8/8] README: update with new nightly build repositories for Debian/Ubuntu --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 73a1950..c0dfe87 100644 --- a/README.md +++ b/README.md @@ -55,15 +55,23 @@ First, make sure the following dependencies are met: 3) Download or copy https://github.com/GLolol/PyLink/blob/master/example-conf.yml for an example configuration. -### Installing via Debian APT repository (stable branch only) +### Installing via Debian APT repository (8/Jessie+ and above) -[The Utopia Repository](https://packages.overdrivenetworks.com/) hosts `.deb` packages for PyLink. For Debian Jessie (stable) and Stretch/sid (testing), the `pylink` package and its dependencies are available in the `main` section. See https://packages.overdrivenetworks.com/#instructions for setup instructions. +[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: -Upon installing `pylink`, example configurations 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/), which is provided by the `pylink-doc` package. +- 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)) -### Installing via Ubuntu PPA (stable branch only) +See https://packages.overdrivenetworks.com/ for setup instructions. -Ubuntu packages for PyLink are available from the [PyLink PPA](https://launchpad.net/~tacocat/+archive/ubuntu/pylink) for Ubuntu 14.04 LTS (trusty) and above. Like with the Debian installation, example configurations and docs will be in `/usr/share/doc/pylink/examples` and `/usr/share/doc/pylink/docs` respectively. +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. + +- 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) ## Configuration