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

NAME

Convos::Loopback - Loopback connection

DESCRIPTION

This class represents a loopback connection. That is a connection which is only visible internally to convos, and thus does not require a IRC server.

This module must be compatible with Mojo::IRC.

SYNOPSIS

  my $connection = Convos::Core::Connection->new(....);
  my $loopback = Convos::Loopback->new(connection => $connection);

  $loopback->connect(sub {
    my($loopback, $error) = @_;
    # ...
  });

ATTRIBUTES

server

Cannot be set. Will always return "loopback".

name

The name of this IRC client. Defaults to "Convos".

nick

Holds the nick.

pass

Exists for Mojo::IRC compat reasons.

tls

Exists for Mojo::IRC compat reasons.

user

Alias for "nick".

ioloop

Holds an instance of Mojo::IOLoop.

redis

Holds an instance of Mojo::Redis.

connection

Holds and instance of Convos::Core::Connection. Must be provided in constructor.

METHODS

new

Used to create a new object. "connection" is required parameter.

change_nick

Used to change "nick".

connect

  $self->connect($cb);

Will start subscribing to messages sent to this nick.

disconnect

Does nothing.

write

See "write" in Mojo::IRC.

AUTHOR

Jan Henning Thorsen - jhthorsen@cpan.org