Commit 32c9d3f6b320fed4e00a95a4aac89a32a3f4e85d
- Diff rendering mode:
- inline
- side by side
lib/rif/bot.rb
(1 / 1)
|   | |||
| 12 | 12 | end | |
| 13 | 13 | ||
| 14 | 14 | def on_privmsg(event) | |
| 15 | if event.message =~ /^#{@operator}(\w+)(\s|.+)*/ | ||
| 15 | if event.message =~ /^#{Regexp.escape(@operator)}\s*(\w+)(\s|.+)*/ | ||
| 16 | 16 | command = $1 | |
| 17 | 17 | args = $2.to_s.split(/\s+/) | |
| 18 | 18 | method = "do_#{command}".to_sym |

