NAME

Convos::Core - TODO

SYNOPSIS

TODO

ATTRIBUTES

log

Holds a Mojo::Log object.

redis

Holds a Mojo::Redis object.

METHODS

control

$self->control($command, $cb);

Used to issue a control command.

reset

$self = $self->reset;

Used to reset connection stats when backend is restarted.

send_convos_message

$self = $self->send_convos_message($login, $message);
$self = $self->send_convos_message($login, $message, $cb);

Used to add a $message to the user $login.

start_convos_conversation

$self = $self->start_convos_conversation($login);

Will add default messages to the convos conversation.

start

Will fetch connection information from the database and try to connect to them.

add_connection

$self->add_connection({
  channels => [ '#foo', '#bar', '...' ],
  login => $str,
  name => $str,
  nick => $str,
  server => $str, # irc_server[:port]
  tls => $bool,
}, $callback);

Add a new connection to redis. Will create a new connection id and set all the keys in the %connection hash

update_connection

$self->update_connection({
  login => $str,
  name => $str,
  nick => $str,
  server => $str, # irc_server[:port]
  tls => $bool,
}, $callback);

Update a connection's settings. This might issue a reconnect or issue IRC commands to reflect the changes.

delete_connection

$self->delete_connection({
  login => $str,
  name => $str,
}, $cb);

ctrl_stop

$self->ctrl_stop($login, $server);

Stop a connection by connection id.

ctrl_restart

$self->ctrl_restart($login, $server);

Restart a connection by connection id.

ctrl_start

Start a single connection by connection id.

login

$self->login({ login => $str, password => $str }, $callback);

Will call callback after authenticating the user. $callback will receive either:

$callback->($self, ''); # success
$callback->($self, 'error message'); # on error

COPYRIGHT

See Convos.

AUTHOR

Jan Henning Thorsen

Marcus Ramberg