Class: Irc::Channel::ModeTypeA
Overview
Channel modes of type A manipulate lists
Example: b (banlist)
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Attributes inherited from Mode
Instance Method Summary collapse
-
#initialize(ch) ⇒ ModeTypeA
constructor
A new instance of ModeTypeA.
- #reset(val) ⇒ Object
- #set(val) ⇒ Object
Constructor Details
#initialize(ch) ⇒ ModeTypeA
Returns a new instance of ModeTypeA.
1154 1155 1156 1157 |
# File 'lib/rbot/irc.rb', line 1154 def initialize(ch) super @list = NetmaskList.new end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
1153 1154 1155 |
# File 'lib/rbot/irc.rb', line 1153 def list @list end |
Instance Method Details
#reset(val) ⇒ Object
1164 1165 1166 1167 |
# File 'lib/rbot/irc.rb', line 1164 def reset(val) nm = @channel.server.new_netmask(val) @list.delete(nm) end |
#set(val) ⇒ Object
1159 1160 1161 1162 |
# File 'lib/rbot/irc.rb', line 1159 def set(val) nm = @channel.server.new_netmask(val) @list << nm unless @list.include?(nm) end |