diff --git a/plugins/admin.py b/plugins/admin.py index 3075998..f817f1d 100644 --- a/plugins/admin.py +++ b/plugins/admin.py @@ -105,6 +105,27 @@ def say(inp, input=None, notice=None): out = "PRIVMSG " + input.chan + " :" + message input.conn.send(out) +@hook.command +def act(inp, input=None, notice=None): + ".act [channel] -- makes the bot act in [channel]. if [channel] is blank the bot will act the in the channel the command was used in." + if input.nick not in input.bot.config["admins"]: + notice("Only bot admins can use this command!") + return + stuff = inp.split(" ") + if stuff[0][0] == "#": + message = "" + for x in stuff[1:]: + message = message + x + " " + message = message[:-1] + out = "PRIVMSG " + stuff[0] + " :\x01ACTION " + message + "\x01" + else: + message = "" + for x in stuff[0:]: + message = message + x + " " + message = message[:-1] + out = "PRIVMSG " + input.chan + " :\x01ACTION " + message + "\x01" + input.conn.send(out) + @hook.command def topic(inp, input=None, notice=None): ".topic [channel] -- change the topic of a channel"