This is the Chat Info Hook.
Find :
Code: Select all
sub chat_info {
my ($self, $args) = @_;
my $title;
$self->decrypt(\$title, $args->{title});
$title = bytesToString($title);
my $chat = $chatRooms{$args->{ID}};
if (!$chat || !%{$chat}) {
$chat = $chatRooms{$args->{ID}} = {};
binAdd(\@chatRoomsID, $args->{ID});
}
...
Code: Select all
sub chat_info {
my ($self, $args) = @_;
my $title;
$self->decrypt(\$title, $args->{title});
$title = bytesToString($title);
my $chat = $chatRooms{$args->{ID}};
if (!$chat || !%{$chat}) {
$chat = $chatRooms{$args->{ID}} = {};
binAdd(\@chatRoomsID, $args->{ID});
}
$chat->{title} = $title;
$chat->{ownerID} = $args->{ownerID};
$chat->{limit} = $args->{limit};
$chat->{public} = $args->{public};
$chat->{num_users} = $args->{num_users};
Plugins::callHook('packet_chatinfo', {
title => $title,
ownerID => $args->{ownerID},
limit => $args->{limit},
public => $args->{public},
num_users => $args->{num_users}
});
}
