Class: Irc::Channel::UserMode
- Defined in:
- lib/rbot/irc.rb
Overview
Channel modes that change the User prefixes are like Channel modes of type B, except that they manipulate lists of Users, so they are somewhat similar to channel modes of type A
Instance Attribute Summary collapse
-
#list ⇒ Object
(also: #users)
readonly
Returns the value of attribute list.
Attributes inherited from Mode
Instance Method Summary collapse
-
#initialize(ch) ⇒ UserMode
constructor
A new instance of UserMode.
- #reset(val) ⇒ Object
- #set(val) ⇒ Object
Methods inherited from ModeTypeB
Constructor Details
Instance Attribute Details
#list ⇒ Object (readonly) Also known as: users
Returns the value of attribute list.
1204 1205 1206 |
# File 'lib/rbot/irc.rb', line 1204 def list @list end |
Instance Method Details
#reset(val) ⇒ Object
1216 1217 1218 1219 |
# File 'lib/rbot/irc.rb', line 1216 def reset(val) u = @channel.server.user(val) @list.delete(u) end |
#set(val) ⇒ Object
1211 1212 1213 1214 |
# File 'lib/rbot/irc.rb', line 1211 def set(val) u = @channel.server.user(val) @list << u unless @list.include?(u) end |