Created
August 23, 2013 20:36
-
-
Save NuckChorris/6323740 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class Storage | |
| include Enumerable | |
| def [] (key) | |
| return Object | |
| end | |
| def []= (key, val) | |
| return val | |
| end | |
| end | |
| class Authorization | |
| def can? (user, action) | |
| return Boolean | |
| end | |
| def can! (user, action) | |
| end | |
| end | |
| class CommandParser | |
| def parse (str) | |
| return CommandOutput | |
| end | |
| end | |
| class TriggerChecker | |
| def is_cmd (str) | |
| return Boolean | |
| end | |
| def get_cmd (str) | |
| return String | |
| end | |
| end | |
| class Protocol < EventEmitter | |
| emit :message | |
| emit :action | |
| emit :notice | |
| emit :join | |
| emit :part | |
| emit :quit | |
| emit :disconnect | |
| emit :kick | |
| emit :ban | |
| emit :user_mode | |
| emit :user_name | |
| emit :room_mode | |
| def message (msg) | |
| return msg | |
| end | |
| def action (msg) | |
| return msg | |
| end | |
| def notice (msg) | |
| return msg | |
| end | |
| def join (chan, pass) | |
| end | |
| def part (chan, msg) | |
| end | |
| def quit (msg) | |
| end | |
| def kick (user) | |
| return user | |
| end | |
| def ban (user) | |
| return user | |
| end | |
| def user_mode (user, mode) | |
| return user | |
| end | |
| def user_name (name) | |
| return name | |
| end | |
| def room_mode (room, mode) | |
| return room | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment