module

Circed::Utils::IrcUtils

Consolidated IRC utilities to eliminate duplicate validation and helper code

Class methods

each_list_param(param : String, & : String -> ) : Nil
Source
format_hostmask(nickname : String, username : String, hostname : String) : String
Source
mode_set(modes : String) : Set(Char)
Source
mode_string(modes : Set(Char)) : String
Source
send_bad_channel_key_error(sender : Client, channel_name : String)
Source
send_banned_from_channel_error(sender : Client, channel_name : String)
Source
send_cannot_send_to_channel_error(sender : Client, channel_name : String)
Source
send_channel_error(sender : Client, channel_name : String)
Source
send_channel_full_error(sender : Client, channel_name : String)
Source
send_invite_only_error(sender : Client, channel_name : String)
Source
send_nickname_in_use_error(sender : Client, nickname : String)
Source
send_no_such_channel_error(sender : Client, channel_name : String)
Source
send_no_such_nick_error(sender : Client, nickname : String)

Common error sending helpers

Source
send_not_on_channel_error(sender : Client, channel_name : String)
Source
send_not_operator_error(sender : Client, channel_name : String)
Source
send_not_registered_error(sender : Client)
Source
send_user_on_channel_error(sender : Client, channel_name : String)
Source
send_users_dont_match_error(sender : Client)
Source
split_list_param(param : String) : Array(String)
Source
split_list_param(param : String | Nil) : Array(String)
Source
trailing_param(params : Array(String), start_index : Int32, default = "") : String
Source
user_has_channel_mode?(channel : Domain::Channel, nickname : String, mode : Char) : Bool

Check if a user has a specific mode in a channel

Source
user_is_operator?(channel : Domain::Channel, nickname : String) : Bool

Check if user is operator in channel

Source
valid_channel_name?(channel_name : String) : Bool

Channel validation utilities

Source
valid_nickname?(nickname : String) : Bool

Nickname validation utilities

Source
validate_channel_name(sender : Client, channel_name : String) : Bool

Validate channel name and send error if invalid

Source

Nested types