class
Circed::Repositories::ChannelRepository
- Circed::Repositories::ChannelRepository
- Reference
- Object
Included Modules
Defined in:
circed/repositories/channel_repository.crInstance Method Summary
- #add(name : String, channel : Domain::Channel) : Void
- #add_channel_mode(channel_name : String, mode : Char) : Bool
- #all : Array(Domain::Channel)
- #cleanup_empty_channels : Int32
- #clear : Void
- #count : Int32
-
#create_channel(name : String) : Domain::Channel
Channel-specific operations
- #exists?(name : String) : Bool
- #find_channels_with_local_users(user_repository : UserRepository) : Array(Domain::Channel)
-
#find_user_channels(nickname : String) : Array(Domain::Channel)
Query methods
- #get(name : String) : Domain::Channel | Nil
- #get_channel_users(channel_name : String) : Array(String)
- #get_user_modes_in_channel(channel_name : String, nickname : String) : Set(Char) | Nil
-
#join_user(channel_name : String, nickname : String, password : String | Nil = nil, modes : Set(Char) = Set(Char).new) : Bool
Unified join method that handles both password and modes
- #part_user(channel_name : String, nickname : String) : Bool
- #remove(name : String) : Bool
- #remove_channel_mode(channel_name : String, mode : Char) : Bool
-
#remove_user_from_all_channels(nickname : String) : Array(String)
Bulk operations
- #set_topic(channel_name : String, topic : String, set_by : String) : Bool
- #set_user_mode(channel_name : String, nickname : String, mode : Char, add : Bool) : Bool
- #size : Int32
-
#statistics : Hash(Symbol, Int32)
Statistics
- #user_in_channel?(channel_name : String, nickname : String) : Bool
- #user_operator?(channel_name : String, nickname : String) : Bool
- #user_voiced?(channel_name : String, nickname : String) : Bool
Instance methods inherited from module Circed::Core::Repository(Circed::Domain::Channel)
add(id : String, entity : T) : Void
add,
all : Array(T)
all,
clear : Void
clear,
get(id : String) : T | Nil
get,
remove(id : String) : Bool
remove,
size : Int32
size
Instance Method Detail
def get_user_modes_in_channel(channel_name : String, nickname : String) : Set(Char) | Nil
#
def join_user(channel_name : String, nickname : String, password : String | Nil = nil, modes : Set(Char) = Set(Char).new) : Bool
#
Unified join method that handles both password and modes
def set_user_mode(channel_name : String, nickname : String, mode : Char, add : Bool) : Bool
#