Class: Robut::Plugin::AliasNick
- Inherits:
-
Object
- Object
- Robut::Plugin::AliasNick
- Includes:
- Robut::Plugin
- Defined in:
- lib/robit/plugins/alias_nick.rb
Instance Method Summary collapse
Instance Method Details
#handle(time, sender_nick, message) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/robit/plugins/alias_nick.rb', line 26 def handle time, sender_nick, if =~ /^#aliases\s+@??(.+)/ handle_aliases "@#{$1}" elsif =~ /^#aliases\s*$/ handle_aliases elsif =~ /^#alias\s+@??(\w+?)\W\s*(@.*+)/ handle_alias "@#{$1}", $2.split(' ') elsif sent_to_me?() # nop else mentions = .scan /@\w+/ handle_notification sender_nick, mentions, end end |
#usage ⇒ Object
21 22 23 |
# File 'lib/robit/plugins/alias_nick.rb', line 21 def usage '#alias <nick> <rooms> - When mentioning <nick>, <rooms> will be notified' end |