module
Circed::UnifiedMessaging
Overview
Unified messaging module that consolidates functionality from SocketHelper and ActionHelper Eliminates code duplication across Client, LinkServer, and Actions
Direct including types
Defined in:
circed/mixins/unified_messaging.crInstance Method Summary
-
#broadcast_to_servers(message : String, exclude_server : LinkServer | Nil = nil) : Int32
Broadcast message to multiple servers (for server-to-server communication)
-
#format_hostmask(nickname : String, username : String, hostname : String) : String
Format user hostmask efficiently
-
#safe_send(message : String) : Bool
Socket-based messaging with performance tracking
-
#send_client_error(client : Client, code : String, item : String, message : String)
Send error message to client with additional parameter
-
#send_client_error(client : Client, code : String, message : String)
Send error message to client with error code
-
#send_error(error_message : String)
Send error and close connection
-
#send_irc_message(command : String, params : Array(String) = [] of String, prefix : String | Nil = nil)
Build and send IRC message with prefix and parameters
-
#send_message(message : String)
Legacy send_message method for compatibility
-
#send_to_user_channels(user : Client, message : String) : Int32
Send message to all users in user's channels (consolidated from ActionHelper)
-
#send_to_users(user_nicknames : Array(String), message : String) : Int32
Send message to specific users efficiently
Instance Method Detail
Broadcast message to multiple servers (for server-to-server communication)
Format user hostmask efficiently
Send error message to client with additional parameter
Send error message to client with error code
Build and send IRC message with prefix and parameters
Send message to all users in user's channels (consolidated from ActionHelper)
Send message to specific users efficiently