class Circed::Domain::Channel

Overview

Domain model for IRC channels

Defined in:

circed/domain/entities.cr

Constant Summary

SIMPLE_MODES = {'i', 'm', 'n', 't', 's', 'p'}
USER_MODES = {'o', 'h', 'v'}

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(name : String) #

[View source]

Class Method Detail

def self.member_prefix(modes : Set(Char)) : Char | Nil #

[View source]

Instance Method Detail

def add_ban(ban_mask : String) : Nil #

Ban management


[View source]
def add_invite(nickname : String) : Nil #

Invite management


[View source]
def add_member(nickname : String, user_modes = Set(Char).new) : Nil #

[View source]
def add_mode(mode : Char) : Nil #

[View source]
def apply_modes(mode_string : String, params : Array(String), parameter_index : Int32 = 0) : NamedTuple(modes: String, parameter_count: Int32) #

[View source]
def ban_list : Set(String) #

[View source]
def ban_list=(ban_list : Set(String)) #

[View source]
def banned?(hostmask : String) : Bool #

[View source]
def banned?(context : BanMatchContext) : Bool #

[View source]
def created_at : Time #

[View source]
def created_at=(created_at : Time) #

[View source]
def empty? : Bool #

[View source]
def full? : Bool #

[View source]
def has_member?(nickname : String) : Bool #

[View source]
def has_mode?(mode : Char) : Bool #

[View source]
def has_password? : Bool #

[View source]
def has_user_limit? : Bool #

[View source]
def invite_list : Set(String) #

[View source]
def invite_list=(invite_list : Set(String)) #

[View source]
def invite_only? : Bool #

[View source]
def invited?(nickname : String) : Bool #

[View source]
def member_count : Int32 #

[View source]
def member_modes?(nickname : String) : Set(Char) | Nil #

[View source]
def members : Hash(String, Set(Char)) #

[View source]
def members=(members : Hash(String, Set(Char))) #

[View source]
def modes : Set(Char) #

[View source]
def modes=(modes : Set(Char)) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def password : String | Nil #

[View source]
def password=(new_password : String | Nil) #

Password management


[View source]
def password_matches?(provided_password : String | Nil) : Bool #

[View source]
def private? : Bool #

[View source]
def remove_ban(ban_mask : String) : Bool #

[View source]
def remove_invite(nickname : String) : Bool #

[View source]
def remove_member(nickname : String) : Bool #

[View source]
def remove_mode(mode : Char) : Nil #

[View source]
def rename_member(old_nickname : String, new_nickname : String) : Bool #

[View source]
def secret? : Bool #

[View source]
def topic : String | Nil #

[View source]
def topic=(topic : String | Nil) #

[View source]
def topic_set_at : Time | Nil #

[View source]
def topic_set_at=(topic_set_at : Time | Nil) #

[View source]
def topic_set_by : String | Nil #

[View source]
def topic_set_by=(topic_set_by : String | Nil) #

[View source]
def user_limit : Int32 | Nil #

[View source]
def user_limit=(limit : Int32 | Nil) #

User limit management


[View source]
def visible_to?(nickname : String | Nil) : Bool #

[View source]