chat_info

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
malufwet
Noob
Noob
Posts: 6
Joined: 08 Apr 2008, 01:50

chat_info

#1 Post by malufwet »

code in my plugin

Code: Select all

	for (my $i = 0; $i < @::chatRoomsID; $i++) {
		next if ($::chatRoomsID[$i] eq "");
		my $pubOwnerID = unpack("L1",$::chatRoomsID[$i]);
		print $pubOwnerID . "\n";
	}
servertype0.pm

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});
		Plugins::callHook('packet_chat', {ID => $args->{ID}, title => $title});
	}

	$chat->{title} = $title;
	$chat->{ownerID} = $args->{ownerID};
	$chat->{limit} = $args->{limit};
	$chat->{public} = $args->{public};
	$chat->{num_users} = $args->{num_users};
}
I was able to print pubOwnerID after that i'm lost. :roll:
I want to print pubOwnerID pubOwner pubTitle pubOwnerMap pubOwnerX pubOwnerY

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: chat_info

#2 Post by EternalHarvest »

Code: Select all

my $actor = Actor::get($pubOwnerID);
print Data::Dumper::Dumper($actor);

Locked