example:
i guess it should be[GM] Cool Idiot113 shouts: S>+9 idiotic pants [2] pm me
[Shout] Cool Idiot113 shouts: S>+9 idiotic pants [2] pm me
Moderator: Moderators
i guess it should be[GM] Cool Idiot113 shouts: S>+9 idiotic pants [2] pm me
[Shout] Cool Idiot113 shouts: S>+9 idiotic pants [2] pm me
but the difference is clear when you are playing, shouts are white and gm messages are yellow.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).
Code: Select all
# 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
});
}