Module: IIRC::AcceptInvites
- Defined in:
- lib/iirc/modules/accept_invites.rb
Overview
Accept INVITEs to join a channel.
By default, all invites are accepted.
To choose which ones to accept, define #accept_invite? on your object / class.
Instance Method Summary collapse
-
#accept_invite?(evt) ⇒ true
Decides whether to accept a given INVITE.
- #accept_invites(evt) ⇒ Object private
- #configure_accept_invites ⇒ Object private
Instance Method Details
#accept_invite?(evt) ⇒ true
Decides whether to accept a given INVITE. By default, all invites are accepted.
10 11 12 |
# File 'lib/iirc/modules/accept_invites.rb', line 10 def accept_invite?(evt) true end |
#accept_invites(evt) ⇒ Object (private)
19 20 21 22 23 |
# File 'lib/iirc/modules/accept_invites.rb', line 19 def accept_invites(evt) if me === evt.target and accept_invite?(evt) join evt.args[1] end end |
#configure_accept_invites ⇒ Object (private)
15 16 17 |
# File 'lib/iirc/modules/accept_invites.rb', line 15 def configure_accept_invites on :invite, :accept_invites end |