Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- ntc = {
- "PING": lambda x: "PONG NOTICE!",
- "MEOW": lambda x: "Woof!"
- }
- prv = {
- }
- cmd = {
- "PING": lambda x: "PONG",
- "NOTICE": lambda x: ntc.get(x[1], "Nothing")(x),
- "PRIVMSG": lambda x: prv.get(x[1], "Nopes")(x)
- }
- data = ("NOTICE", "PING")
- print cmd.get(data[0])(data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement