AOL-TOC
view release on metacpan or search on metacpan
sub send_im {
my ($self, $nickname, $message, $auto) = @_;
$auto = "" unless defined $auto;
$self->send("toc_send_im $nickname " . &encode_string($message) . " $auto");
return;
}
sub add_buddy {
my ($self, @buddies) = @_;
$self->send("toc_add_buddy @buddies");
return;
}
sub remove_buddy {
my ($self, @buddies) = @_;
$self->send("toc_remove_buddy @buddies");
return;
}
sub set_config {
my ($self, $config) = @_;
$self->send("toc_set_config $config");
return;
}
sub evil {
my ($self, $nickname, $mode) = @_;
$self->send("toc_evil $nickname $mode\n");
return;
}
sub add_permit {
my ($self, @buddies) = @_;
$self->send("toc_add_permit @buddies");
return;
}
sub add_deny {
my ($self, @buddies) = @_;
$self->send("toc_add_deny @buddies");
return;
}
sub chat_join {
my $self = shift;
my $exchange = shift;
my $room;
if ($exchange =~ /\D/) {
$room = $exchange;
$exchange = 4;
} else {
$room = shift;
}
$self->send("toc_chat_join $exchange " . &encode_string($room));
return;
}
sub _chat_join {
my ($self, $room_id, $room_name) = @_;
$self->{chatrooms}{$room_id} = $room_name;
$self->{chatrooms}{$room_name} = $room_id;
return;
}
sub chat_send {
my ($self, $room_id, $message) = @_;
if ($room_id =~ /\D/) {
$room_id = $self->{chatrooms}{$room_id};
}
$self->send("toc_chat_send $room_id " . &encode_string($message));
return;
}
sub chat_whisper {
my ($self, $room_id, $nickname, $message) = @_;
if ($room_id =~ /\D/) {
$room_id = $self->{chatrooms}{$room_id};
}
$self->send("toc_chat_whisper $room_id $nickname " . &encode_string($message));
return;
}
sub chat_evil {
my ($self, $room_id, $nickname, $mode) = @_;
if ($room_id =~ /\D/) {
$room_id = $self->{chatrooms}{$room_id};
}
$self->send("toc_chat_evil $room_id $nickname $mode");
return;
}
sub chat_invite {
my ($self, $room_id, $message, @buddies) = @_;
if ($room_id =~ /\D/) {
$room_id = $self->{chatrooms}{$room_id};
}
$self->send("toc_chat_invite $room_id " . &encode_string($message) . " @buddies");
return;
}
( run in 2.020 seconds using v1.01-cache-2.11-cpan-d8267643d1d )