Circed::Network::NetworkState
Inherits Reference / Object
Global network state manager for RFC 2813 compliance Maintains network-wide information about servers, users, and channels
Constants
NICKNAME_DELAY = 30.seconds
Class methods
add_channel(name : String, created_at : Time = Time.unix(Time.utc.to_unix))
Add channel to global network state
add_server(name : String, hopcount : Int32, description : String, link_server : LinkServer | Nil = nil, token : String | Nil = nil) : Bool
Add server to global network state
add_user(nickname : String, username : String, hostname : String, realname : String, server : String, hopcount : Int32 = 0, connected_at : Time = Time.unix(Time.utc.to_unix)) : Bool
Add user to global network state
apply_channel_modes(name : String, mode_string : String, params : Array(String), created_at : Time | Nil = nil, parameter_index : Int32 = 0) : Bool
Sourcechannels
Sourceget_channel(name : String)
Sourceget_server(name : String)
Sourceget_user(nickname : String)
Sourcejoin_user_to_channel(nickname : String, channel_name : String, modes : Set(Char) = Set(Char).new)
Join user to channel
merge_channel(name : String, created_at : Time, modes : Set(Char)) : Bool
Sourcenickname_reserved?(nickname : String) : Bool
Sourceremove_server(name : String, send_squit : Bool = true)
Remove server and cascade to users/channels
remove_server_link(server1 : String, server2 : String)
Sourceroute_to_server(target_server : String, from_server : String = Server.name) : String | Nil
Find route to server (for message routing)
set_channel_topic(name : String, topic : String | Nil, set_by : String | Nil = nil, set_at : Time = Time.unix(Time.utc.to_unix), created_at : Time | Nil = nil) : Bool
Set topic for a channel
set_user_away(nickname : String, message : String | Nil)
Set away message for a user - optimized
sync_channel(channel : Domain::Channel) : Nil
Sourcesync_channel_repository(name : String) : Nil
Sourcetopology
Sourceuser_routed_through?(nickname : String, server_name : String) : Bool
Sourceusers
Source