Module: Synacrb
- Defined in:
- lib/synacrb.rb,
lib/synacrb/state.rb,
lib/synacrb/common.rb,
lib/synacrb/version.rb
Defined Under Namespace
Modules: Common Classes: Session, State
Constant Summary collapse
- VERSION =
"0.3.2"
Class Method Summary collapse
-
.get_mode(channel, user) ⇒ Object
Get the mode bitmask for a user in a channel.
Class Method Details
.get_mode(channel, user) ⇒ Object
Get the mode bitmask for a user in a channel
11 12 13 14 15 16 17 18 19 |
# File 'lib/synacrb.rb', line 11 def self.get_mode(channel, user) if user.bot return channel.default_mode_bot unless user.modes.include? channel.id user.modes[channel.id] else return channel.default_mode_user unless user.modes.include? channel.id user.modes[channel.id] end end |