Openkore.com

OpenKore Forums
It is currently 17 Nov 2018, 15:20

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Shout on console instead of GM
PostPosted: 11 May 2010, 02:49 
Offline
The Way Of Human
The Way Of Human
User avatar

Joined: 16 Aug 2009, 03:47
Posts: 188
Location: Gonryun
Openkore identifies shouts as GM messages.

example:

Quote:
[GM] Cool Idiot113 shouts: S>+9 idiotic pants [2] pm me


i guess it should be

Quote:
[Shout] Cool Idiot113 shouts: S>+9 idiotic pants [2] pm me

_________________
Just like old times.


Top
 Profile  
 
 Post subject: Re: Shout on console instead of GM
PostPosted: 11 May 2010, 08:05 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
Official server's Megaphone shouts are GM messages.
Form of messages can be different on each server and can be changed anytime, so configure this yourself (for example, with chatDomains plugin, if you need to filter there messages).


Top
 Profile  
 
 Post subject: Re: Shout on console instead of GM
PostPosted: 11 May 2010, 10:23 
Offline
The Way Of Human
The Way Of Human
User avatar

Joined: 16 Aug 2009, 03:47
Posts: 188
Location: Gonryun
EternalHarvest wrote:
Official server's Megaphone shouts are GM messages.
Form of messages can be different on each server and can be changed anytime, so configure this yourself (for example, with chatDomains plugin, if you need to filter there messages).


but the difference is clear when you are playing, shouts are white and gm messages are yellow.

_________________
Just like old times.


Top
 Profile  
 
 Post subject: Re: Shout on console instead of GM
PostPosted: 11 May 2010, 10:37 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 06 May 2008, 12:47
Posts: 801
If you play on kRO based servers, i suggest you play with, test and tweak this piece of code in Openkore-SVN/src/Network/Receive/Sakexe_0.pm:
Code:
# TODO: known prefixes (chat domains): micc | ssss | blue | tool
sub system_chat {
   my ($self, $args) = @_;

   my $domain = bytesToString($args->{domain});
   my ($name, $message, $color);

   if ($domain eq 'micc') {
      ($name, $color, $message) = unpack('Z24 a6 a*', $args->{message});
      $name = bytesToString($name);
      $color = bytesToString($color);
      $message = bytesToString($message);
   } elsif ($domain eq 'ssss') { # forces color yellow?
      $message = bytesToString($args->{message});
   } elsif ($domain eq 'blue') { # forces color blue?
      $message = bytesToString($args->{message});
   } elsif ($domain eq 'tool') { # not seen before?
      $message = bytesToString($args->{message});
   } else { # possible?
      $message = $domain . bytesToString($args->{message});
   }

   # TODO: hande different types of messages
   stripLanguageCode(\$message);
   chatLog("s", "$message\n") if ($config{logSystemChat});
   # Translation Comment: System/GM chat
   message TF("[GM] %s\n", $message), "schat";
   ChatQueue::add('gm', undef, undef, $message);

   Plugins::callHook('packet_sysMsg', {
      Msg => $message
   });

}


I wrote it to differentiate between the messages but never really implemented different message prefixes (GM, MIC, ...)

_________________
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group