From 441f2244a9fbe36b6dc015b3e95b126eb2596358 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 21 Aug 2016 18:06:53 -0700 Subject: [PATCH 1/5] relay: fix overzealous host normalization due to variable replacement during iteration (cherry picked from commit 09c98f66ff34d98127b8fa82aa91b6ae70f491b2) --- plugins/relay.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index 6aed4c4..9e745f6 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -180,6 +180,7 @@ def normalizeNick(irc, netname, nick, times_tagged=0, uid=''): def normalizeHost(irc, host): """Creates a normalized hostname for the given host suitable for introduction to a remote network (as a relay client).""" + log.debug('(%s) relay.normalizeHost: IRCd=%s, host=%s', irc.name, irc.protoname, host) if irc.protoname not in ('inspircd', 'ts6', 'clientbot', 'nefarious'): # UnrealIRCd and IRCd-Hybrid don't allow slashes in hostnames host = host.replace('/', '.') @@ -1168,8 +1169,10 @@ def handle_chgclient(irc, source, command, args): remoteirc = world.networkobjects[netname] try: if field == 'HOST': - text = normalizeHost(remoteirc, text) - remoteirc.proto.updateClient(user, field, text) + newtext = normalizeHost(remoteirc, text) + else: # Don't overwrite the original text variable on every iteration. + newtext = text + remoteirc.proto.updateClient(user, field, newtext) except NotImplementedError: # IRCd doesn't support changing the field we want log.debug('(%s) relay.handle_chgclient: Ignoring changing field %r of %s on %s (for %s/%s);' ' remote IRCd doesn\'t support it', irc.name, field, From 3e2c6ea1b70509642306aef9386cb0847552c247 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 23 Aug 2016 07:28:48 -0700 Subject: [PATCH 2/5] launcher: show VCS version in "pylink -v" (cherry picked from commit a04bf6119e69343f69d37f75e1382d99f2c952db) --- pylink | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pylink b/pylink index 221928d..8ecd368 100755 --- a/pylink +++ b/pylink @@ -13,7 +13,7 @@ except ImportError: "setup.py install' (global install) or 'python3 setup.py install --user'" " (local install)\n") sys.exit(1) -from pylinkirc import conf, __version__ +from pylinkirc import conf, __version__, real_version if __name__ == '__main__': import argparse @@ -25,7 +25,7 @@ if __name__ == '__main__': args = parser.parse_args() if args.version: # Display version and exit - print('PyLink ' + __version__) + print('PyLink %s (in VCS: %s)' % (__version__, real_version)) sys.exit() # Load the config From 02f3c71e8bcc80a55638e3452cfb6248f5ce237e Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 31 Aug 2016 22:03:43 -0700 Subject: [PATCH 3/5] README: more thorough description of branches & installation --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3bdc7b1..baeb61c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ You can also find support via our IRC channels: `#PyLink @ irc.overdrivenetworks ## Installation -### Installing from source (recommended) +### Installing from source First, make sure the following dependencies are met: @@ -32,11 +32,16 @@ First, make sure the following dependencies are met: 1) Clone the repository: `git clone https://github.com/GLolol/PyLink && cd PyLink` -2) Install PyLink using `python3 setup.py install` (global install) or `python3 setup.py install --user` (local install) - - Note: `--user` is a *literal* string; *do not* replace it with your username. +2) Pick your branch. + - By default you'll be on the **master** (stable) branch, which is bugfix only for the most part (except when a new stable release is introduced). + - However, new features or more intensive bug fixes may not always be included. Instead, the **devel** (pre-release) branch is where active development goes, and it can be accessed by running `git checkout devel` in your Git tree. -### Installing via PyPI -1) Make sure you're running the right pip command: on most distros, pip for Python3 uses the command `pip3`. +3) Install PyLink using `python3 setup.py install` (global install) or `python3 setup.py install --user` (local install) + - Note: `--user` is a *literal* string; *do not* replace it with your username. + - **Whenever you switch branches or update PyLink's sources via `git pull`, you will need to re-run this command for changes to apply!** + +### Installing via PyPI (stable branch only) +1) Make sure you're running the right pip command: on most distros, pip for Python 3 uses the command `pip3`. 2) Run `pip3 install pylinkirc` to download and install PyLink. pip will automatically resolve dependencies. From c4a68d2f7314c806859f1f21c157ed85b2e33cf4 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 31 Aug 2016 22:05:32 -0700 Subject: [PATCH 4/5] README: fix formatting --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index baeb61c..0203852 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,12 @@ First, make sure the following dependencies are met: 1) Clone the repository: `git clone https://github.com/GLolol/PyLink && cd PyLink` 2) Pick your branch. - - By default you'll be on the **master** (stable) branch, which is bugfix only for the most part (except when a new stable release is introduced). - - However, new features or more intensive bug fixes may not always be included. Instead, the **devel** (pre-release) branch is where active development goes, and it can be accessed by running `git checkout devel` in your Git tree. +* By default you'll be on the **master** (stable) branch, which is bugfix only for the most part (except when a new stable release is introduced). +* However, new features or more intensive bug fixes may not always be included. Instead, the **devel** (pre-release) branch is where active development goes, and it can be accessed by running `git checkout devel` in your Git tree. 3) Install PyLink using `python3 setup.py install` (global install) or `python3 setup.py install --user` (local install) - - Note: `--user` is a *literal* string; *do not* replace it with your username. - - **Whenever you switch branches or update PyLink's sources via `git pull`, you will need to re-run this command for changes to apply!** +* Note: `--user` is a *literal* string; *do not* replace it with your username. +* **Whenever you switch branches or update PyLink's sources via `git pull`, you will need to re-run this command for changes to apply!** ### Installing via PyPI (stable branch only) 1) Make sure you're running the right pip command: on most distros, pip for Python 3 uses the command `pip3`. From eeca2c080dd95c0a3bb67924cf6cff4ac899f4d9 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 31 Aug 2016 22:07:13 -0700 Subject: [PATCH 5/5] README: update webchat link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0203852..3bdb156 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ PyLink and any bundled software are licensed under the Mozilla Public License, v Please report any bugs you find to the [issue tracker](https://github.com/GLolol/PyLink/issues). Pull requests are open if you'd like to contribute, though new stuff generally goes to the **devel** branch. -You can also find support via our IRC channels: `#PyLink @ irc.overdrivenetworks.com `([webchat](https://webchat.overdrivenetworks.com/?channels=PyLink,dev)) or `#PyLink @ chat.freenode.net`. Ask your questions and be patient for a response. +You can also find support via our IRC channels: `#PyLink @ irc.overdrivenetworks.com `([webchat](https://webchat.overdrivenetworks.com/?channels=PyLink)) or `#PyLink @ chat.freenode.net`. Ask your questions and be patient for a response. ## Installation