This class represents channel bans.
The user who created the ban. Might be nil on networks that do not strictly follow the RFCs, for example IRCnet in some(?) cases.
@return [User, nil] The user who created the ban
@param [String, Mask] mask The mask @param [User, nil] by The user who created the ban. @param [Time] at The time at which the ban was created
# File lib/cinch/ban.rb, line 25 def initialize(mask, by, at) @by, @created_at = by, at if mask =~ /^[\$~]/ @extended = true @mask = mask else @extended = false @mask = Mask.from(mask) end end
@return [Boolean] true if the ban matches `user` @raise [Exceptions::UnsupportedFeature] Cinch does not support
Freenode's extended bans
# File lib/cinch/ban.rb, line 39 def match(user) raise UnsupportedFeature, "extended bans are not supported yet" if @extended @mask =~ user end
Generated with the Darkfish Rdoc Generator 2.