Add !fsend for admins to send raw IRC messages

This commit is contained in:
nyuszika7h 2014-02-22 20:14:51 +01:00
parent 664270d3ae
commit 8a3cc33794

View File

@ -551,6 +551,7 @@ def stats(cli, nick, chan, rest):
cli.msg(chan, msg)
var.LOGGER.logMessage(msg.replace("\02", ""))
else:
cli.notice(nick, msg)
if var.PHASE == "join":
@ -3064,6 +3065,10 @@ def git_pull(cli, nick, chan, rest):
def git_pull_pm(cli, nick, rest):
git_pull(cli, nick, nick, rest)
@pmcmd("fsend", admin_only=True)
def fsend(cli, nick, rest):
print('fsend ({0}): {1}'.format(nick, rest))
cli.send(rest)
before_debug_mode_commands = list(COMMANDS.keys())
before_debug_mode_pmcommands = list(PM_COMMANDS.keys())
@ -3305,6 +3310,7 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
if var.PHASE not in ('none','join'):
chk_win(cli)
if botconfig.ALLOWED_NORMAL_MODE_COMMANDS and not botconfig.DEBUG_MODE:
for comd in list(COMMANDS.keys()):
if (comd not in before_debug_mode_commands and