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.
1171 1172 1173 |
# File 'lib/rbot/irc.rb', line 1171 def list @list end |
Instance Method Details
#reset(val) ⇒ Object
1183 1184 1185 1186 |
# File 'lib/rbot/irc.rb', line 1183 def reset(val) u = @channel.server.user(val) @list.delete(u) end |
#set(val) ⇒ Object
1178 1179 1180 1181 |
# File 'lib/rbot/irc.rb', line 1178 def set(val) u = @channel.server.user(val) @list << u unless @list.include?(u) end |