Module: TinyIRC
- Defined in:
- lib/tinyirc.rb,
lib/tinyirc/event.rb,
lib/tinyirc/version.rb
Defined Under Namespace
Classes: App, AppLogger, Bot, Command, Group, IRCSocket, Permission, Plugin, UserCache
Constant Summary collapse
- VERSION =
'0.1.2'
Class Method Summary collapse
Class Method Details
.define_event_methods(h) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/tinyirc/event.rb', line 2 def self.define_event_methods(h) h.define_singleton_method :reply do |msg| raise RuntimeError, ':reply action is not supported' unless self[:reply_to] self[:socket].privmsg(self[:reply_to], msg) end h.define_singleton_method :nreply do |msg| raise RuntimeError, ':nreply action is not supported' unless self[:nick] self[:socket].notice(self[:nick], msg) end end |