aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-12-18 19:55:28 +0100
committermakefu <github@syntax-fehler.de>2013-12-18 19:55:28 +0100
commitd67495509e1df31ce812f2f085be57d263394d97 (patch)
treeb2548f370d515ffbd02c715ad8e7b474d21074ab
parent16cd627dcb1a580d6095a2962b48ce7731d8f716 (diff)
Reaktor: _from is populated via environ
-rwxr-xr-xIRC/asybot.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/IRC/asybot.py b/IRC/asybot.py
index 89967c3..048b94c 100755
--- a/IRC/asybot.py
+++ b/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)