# Shitty plugin made by iloveportalz0r # Broken by The Noodle from util import hook @hook.command def join(inp, input=None, db=None, notice=None): ".join -- joins a channel" if input.nick not in input.bot.config["admins"]: notice("Only bot admins can use this command!") return chan = inp.split(' ', 1) #if len(chan) != 1: #return "Usage: omg please join " notice("Joining " + inp) input.conn.send("JOIN " + inp) @hook.command def cycle(inp, input=None, db=None, notice=None): ".cycle -- cycles a channel" if input.nick not in input.bot.config["admins"]: notice("Only bot admins can use this command!") return notice("Cycling " + inp + ".") input.conn.send("PART " + inp) input.conn.send("JOIN " + inp) @hook.command def part(inp, input=None, notice=None): ".part -- leaves a channel" if input.nick not in input.bot.config["admins"]: notice("Only bot admins can use this command!") return chan = inp.split(' ', 1) #if len(chan) != 1: #return "Usage: omg please part " notice("Parting from " + inp + ".") input.conn.send("PART " + inp) @hook.command def chnick(inp, input=None, notice=None): ".chnick - Change the nick!" if input.nick not in input.bot.config["admins"]: notice("Only bot admins can use this command!") return chan = inp.split(' ', 1) #if len(chan) != 1: #return "Usage: omg please part " notice("Changing nick to " + inp + ".") input.conn.send("NICK " + inp) @hook.command def raw(inp, input=None, notice=None): ".raw - Send a RAW IRC command!" if input.nick not in input.bot.config["admins"]: notice("Only bot admins can use this command!") return chan = inp.split(' ', 1) notice("Raw command sent.") input.conn.send(inp) @hook.command def kick(inp, input=None, notice=None): ".kick [channel] [reason] -- kick a user!" 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] == "#": out = "KICK " + stuff[0] + " " + stuff[1] if len(stuff) > 2: reason = "" for x in stuff[2:]: reason = reason + x + " " reason = reason[:-1] out = out+" :"+reason else: out = "KICK " + input.chan + " " + stuff[0] if len(stuff) > 1: reason = "" for x in stuff[1:]: reason = reason + x + " " reason = reason[:-1] out = out + " :" + reason input.conn.send(out) @hook.command def say(inp, input=None, notice=None): ".say [channel] -- makes the bot say in [channel]. if [channel] is blank the bot will say 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] + " :" + message else: message = "" for x in stuff[0:]: message = message + x + " " message = message[:-1] out = "PRIVMSG " + input.chan + " :" + message input.conn.send(out) @hook.command def topic(inp, input=None, notice=None): ".topic [channel] -- change the topic of a channel" 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] == "#": out = "TOPIC " + stuff[0] + " :" + stuff[1] else: out = "TOPIC " + input.chan + " :" + stuff[0] input.conn.send(out)