Convos::Core::ConnectionProfile - Default settings for connections

  1. DESCRIPTION
  2. ATTRIBUTES
    1. core
    2. id
    3. max_bulk_message_size
    4. max_message_length
    5. service_accounts
    6. url
    7. webirc_password
  3. METHODS
    1. find_service_account
    2. load_p
    3. save_p
    4. skip_queue
    5. split_message
    6. too_long_messages
    7. uri
  4. SEE ALSO

DESCRIPTION

Convos::Core::ConnectionProfile is a class that represents the default settings for a Convos::Core::Connection.

ATTRIBUTES

core

$core = $connection_settings->core;

A Convos::Core object.

id

$str = $connection_settings->id;

A unique identifier.

max_bulk_message_size

$int = $connection_settings->max_bulk_message_size;
$connection_settings = $connection_settings->max_bulk_message_size(3);

Max number of lines before "too_long_messages" will return true.

max_message_length

$int = $connection_settings->max_message_length;
$connection_settings = $connection_settings->max_message_length(512);

Max number of characters before "split_message" will split a single message. Also used by "too_long_messages" to detect if the message is too long.

service_accounts

$array_ref = $connection_settings->service_accounts;
$connection_settings = $connection_settings->service_accounts([qw(chanserv nickserv)]);

List of service accounts for this connection.

url

$url = $connection_settings->url;
$connection_settings = $connection_settings->url(Mojo::URL->new);

The default URL for a connection.

webirc_password

$str = $connection_settings->webirc_password;
$connection_settings = $connection_settings->webirc_password('s3cret');

A password used when identifying with a WEBIRC ready IRC server.

METHODS

find_service_account

$str = $connection_settings->find_service_account(@str);

Returns the first match in "service_accounts" or undef.

load_p

$p = $connection_settings->load_p;

Load settings from Convos::Core::Backend.

save_p

$p = $connection_settings->save_p;

Save settings to Convos::Core::Backend.

skip_queue

$bool = $connection_settings->skip_queue;
$connection_settings = $connection_settings->skip_queue(true);

Used to skip the initial connection queue.

split_message

$messages = $connection_settings->split_message($str);

Split $str based on "max_message_length".

too_long_messages

$bool = $connection_settings->too_long_messages(\@messages);

Returns true if @messages violate either "max_bulk_message_size" or "max_message_length".

uri

$str = $connection_settings->uri;

The URI used by Convos::Core::Backend when saving this object.

SEE ALSO

Convos, Convos::Core::Connection.