receive_message - provides the interface used by the message efun.
void receive_message( string type, string message );
The message() efun calls this method in the living targets' objects. The
type parameter is typically used to indicate the type (say, tell, emote,
combat, room description, etc) of the message. The receive_message()
apply together with the message() efun can provide a good mechanism for
interfacing with a "smart" client.
void receive_message(string type, string message) {
if(member_array(type, arrayOfIgnoredMessageTypes) != -1) {
// simple filtering example
return;
} else if(type == "say") {
// simple formatting example
message = "%^CYAN%^" + replace_string(message, ":", ":%^RESET%^");
}
receive(message);
}
catch_tell(4), message(3), receive(3), receive_snoop(4)