]> jfr.im git - erebus.git/blobdiff - modules/control.py
move INJECT command from control to eval
[erebus.git] / modules / control.py
index aac0257b06907af5ba2e0b1e154aa3fc8b39f6cf..929fc25db9739c785a32d97ecafb72d8cc7b9c7f 100644 (file)
@@ -154,19 +154,3 @@ def qclear(bot, user, chan, realtarget, *args):
                        bot.fastmsg(user, "Syntax: QCLEAR [regular|slow]")
                        return #short-circuit
                bot.fastmsg(user, "Cleared that msgqueue.")
-
-@lib.hook(needchan=False, wantchan=True, glevel=lib.ADMIN)
-@lib.help("<nick> <message>", "inject a line as though it came from <nick>", "note that this injects lines, not commands", "ex: INJECT DimeCadmium !WHOAMI")
-def inject(bot, user, chan, realtarget, *args):
-       targetuser = bot.parent.user(args[0], create=False)
-       if targetuser is None:
-               bot.msg(user, "User is unknown.")
-               return
-       if targetuser.glevel > user.glevel:
-               bot.msg(user, "That user has a higher access level than you.")
-               return
-
-       if chan is not None:
-               bot.parsemsg(bot.parent.user(args[0], create=False), str(chan), ' '.join(args[1:]))
-       else:
-               bot.parsemsg(bot.parent.user(args[0], create=False), str(bot), ' '.join(args[1:]))