aboutsummaryrefslogtreecommitdiffstats
path: root/IRC/reaktor.py
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-04-27 18:17:23 +0200
committermakefu <github@syntax-fehler.de>2014-04-27 18:17:23 +0200
commit4b367ce717a91eda21337ff85a64fcb3f38db61d (patch)
tree84d2aa2aa045657afb573ed862c0510353e70e2e /IRC/reaktor.py
parent3005c4701cade073dbc2285e3629cb516b4a3cec (diff)
parent8ba1237707cf9da18344d2725e5d867f93dcd3c3 (diff)
Merge branch 'master' of ssh://github.com/krebscode/painload
Diffstat (limited to 'IRC/reaktor.py')
-rwxr-xr-xIRC/reaktor.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/IRC/reaktor.py b/IRC/reaktor.py
index b53ef65..ec306e7 100755
--- a/IRC/reaktor.py
+++ b/IRC/reaktor.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os
from ircasy import asybot
from asyncore import loop
@@ -36,7 +36,7 @@ class Reaktor(asybot):
return False
def on_join(self, prefix, command, params, rest):
- for command in getconf('on_join'):
+ for command in getconf('on_join', []):
self.execute_command(command, None, prefix, params)
def on_privmsg(self, prefix, command, params, rest):
@@ -69,6 +69,9 @@ class Reaktor(asybot):
log.info("cannot parse args!")
cwd = getconf('workdir')
+ if not os.access(cwd,os.W_OK):
+ log.error("Workdir '%s' is not Writable! Falling back to root dir"%cwd)
+ cwd = "/"
env = command.get('env', {})
env['_prefix'] = prefix
@@ -81,7 +84,6 @@ class Reaktor(asybot):
target.append(env['_from'])
log.debug('target:' +str(target))
- env['config_filename'] = os.path.abspath(self.config)
start = time()
try:
p = popen(myargv, bufsize=1, stdout=PIPE, stderr=PIPE, env=env, cwd=cwd)