From 0f98dab8aaa31213c1ddc6c78d0987076e4a5a21 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 18 Dec 2013 19:55:28 +0100 Subject: Reaktor: _from is populated via environ --- Reaktor/IRC/asybot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Reaktor') diff --git a/Reaktor/IRC/asybot.py b/Reaktor/IRC/asybot.py index 89967c3f..048b94ce 100755 --- a/Reaktor/IRC/asybot.py +++ b/Reaktor/IRC/asybot.py @@ -128,10 +128,10 @@ class asybot(asychat): for command in getconf('irc_commands'): y = match(command['pattern'], rest) if y: - self.execute_command(command, y, PRIVMSG, ME) + self.execute_command(command, y, prefix, PRIVMSG, ME) break - def execute_command(self, command, match, PRIVMSG, ME): + def execute_command(self, command, match, prefix, PRIVMSG, ME): from os.path import realpath, dirname, join from subprocess import Popen as popen, PIPE from time import time @@ -141,6 +141,7 @@ class asybot(asychat): myargv = [exe] + command['argv'][1:] env = {} + env['_from'] = prefix.split('!', 1)[0] start = time() try: p = popen(myargv, bufsize=1, stdout=PIPE, stderr=PIPE, env=env) -- cgit v1.2.3