The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Convos::Core - TODO

SYNOPSIS

TODO

ATTRIBUTES

archive

Holds a Convos::Archive::File object.

log

Holds a Mojo::Log object.

redis

Holds a Mojo::Redis object.

METHODS

control

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

Used to issue a control command.

start

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

add_connection

  $self->add_connection({
    login => $str,
    name => $str,
    nick => $str,
    server => $str, # irc_server[:port]
  }, $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]
  }, $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);

delete_user

  $self = $self->delete_user(
            { login => $str },
            sub { my ($self, $err) = @_; ... },
          );

This method will delete a user and all the conversations, connections, and related data. It will also stop all the connections.

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