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.cr

Instance Method Summary

Instance Method Detail

def broadcast_to_servers(message : String, exclude_server : LinkServer | Nil = nil) : Int32 #

Broadcast message to multiple servers (for server-to-server communication)


[View source]
def format_hostmask(nickname : String, username : String, hostname : String) : String #

Format user hostmask efficiently


[View source]
def safe_send(message : String) : Bool #

Socket-based messaging with performance tracking


[View source]
def send_client_error(client : Client, code : String, item : String, message : String) #

Send error message to client with additional parameter


[View source]
def send_client_error(client : Client, code : String, message : String) #

Send error message to client with error code


[View source]
def send_error(error_message : String) #

Send error and close connection


[View source]
def send_irc_message(command : String, params : Array(String) = [] of String, prefix : String | Nil = nil) #

Build and send IRC message with prefix and parameters


[View source]
def send_message(message : String) #

Legacy send_message method for compatibility


[View source]
def send_to_user_channels(user : Client, message : String) : Int32 #

Send message to all users in user's channels (consolidated from ActionHelper)


[View source]
def send_to_users(user_nicknames : Array(String), message : String) : Int32 #

Send message to specific users efficiently


[View source]