diff options
Diffstat (limited to 'Reaktor/IRC/reaktor.py')
-rwxr-xr-x | Reaktor/IRC/reaktor.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Reaktor/IRC/reaktor.py b/Reaktor/IRC/reaktor.py index b53ef651..ec306e7c 100755 --- a/Reaktor/IRC/reaktor.py +++ b/Reaktor/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) |