Skip to content

Instantly share code, notes, and snippets.

@chancez
Created July 24, 2012 00:28
Show Gist options
  • Save chancez/3167154 to your computer and use it in GitHub Desktop.
Save chancez/3167154 to your computer and use it in GitHub Desktop.
def parsemsg2(info, msg, send, COMMAND_LIST):
ret = ''
if msg[0] == '!':
cmd = msg.split(' ',1)
if (cmd in COMMAND_LIST):
command = COMMAND_LIST.get(cmd)
ret = command(cmd[2])
return ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment