Skip to content

Instantly share code, notes, and snippets.

@MrMetric
Created May 30, 2011 09:58
Show Gist options
  • Save MrMetric/998666 to your computer and use it in GitHub Desktop.
Save MrMetric/998666 to your computer and use it in GitHub Desktop.
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