Created
May 30, 2011 09:58
-
-
Save MrMetric/998666 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from util import hook | |
@hook.command | |
def join(inp, input=None): | |
"omg please join <channel>" | |
if input.nick not in input.bot.config["admins"]: | |
return "Only bot admins can use this command!" | |
chan = inp.split(' ', 1) | |
#if len(chan) != 1: | |
#return "Usage: omg please join <channel>" | |
input.say("Joining " + inp) | |
input.conn.send("JOIN " + inp) | |
@hook.command | |
def part(inp, input=None): | |
"omg please part <channel> - Leave a channel" | |
if input.nick not in input.bot.config["admins"]: | |
return "Only bot admins can use this command!" | |
chan = inp.split(' ', 1) | |
#if len(chan) != 1: | |
#return "Usage: omg please part <channel>" | |
input.say("Parting from " + inp + " D:") | |
input.conn.send("PART " + inp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment