Fix !freload

This commit is contained in:
nyuszika7h 2014-04-30 18:19:41 +02:00
parent 959ef98f51
commit 26cde6c312

View File

@ -3118,7 +3118,7 @@ def fsend(cli, nick, rest):
print('fsend ({0}): {1}'.format(nick, rest)) print('fsend ({0}): {1}'.format(nick, rest))
cli.send(rest) cli.send(rest)
@cmd("freload" "frehash", admin_only=True) @cmd("freload", "frehash", admin_only=True)
def freload(cli, nick, chan, rest): def freload(cli, nick, chan, rest):
try: try:
# No, this doesn't clear the stasis list. # No, this doesn't clear the stasis list.
@ -3126,14 +3126,14 @@ def freload(cli, nick, chan, rest):
reload(botconfig) reload(botconfig)
except ImportError: except ImportError:
if chan == nick: if chan == nick:
pm(nick, '{0}: {1}'.format(type(e), e)) pm(cli, nick, '{0}: {1}'.format(type(e), e))
else: else:
cli.msg(chan, '{0}: {1}'.format(type(e), e)) cli.msg(chan, '{0}: {1}'.format(type(e), e))
raise raise
else: else:
if chan == nick: if chan == nick:
pm(nick, '{0}: {1}'.format(type(e), e)) pm(cli, nick, '{0}: {1}'.format(type(e), e))
else: else:
cli.msg(chan, 'Reloaded config.') cli.msg(chan, 'Reloaded config.')