Proposed Message Standardisation
#10
I like how you're currently moving the implementation directly into the server, so that we can avoid the awkward inter-plugin calls. I have a few notes, though:
- cWorld::BroadcastChat() should get an extra parameter, the message type, in front of the Exclude parameter
- cPlayer should get the same compliment of messaging functions (SendMessageInfo(), SendMessageWarning() ...)
- cPlayer:SendMessage() should get an extra parameter, the message type
- cWorld:BroadcastChatInfo() etc should redirect to cWorld:BroadcastChat using the appropriate MessageType parameter
- cWorld:BroadcastChat() should call cPlayer:SendMessage() with the appropriate message type
- cPlayer:SendMessage() should do the final message formatting

If the message formatting was configurable through a few world.ini settings (AddPrefixes, ColorizePrefixes, ColorizeMessages), that'd be great.

Moving the formatting to cPlayer::SendMessage() will allow us to later possibly add per-user formatting options, although currently it would only incur minor performance loss for the broadcast messages.

EDIT:
Note: by providing a manual binding for cWorld:BroadcastChat(), you will be able to support both the new and the old model - just detect the param count and types and decide what to do based on that. Similar for cPlayer:SendMessage().
Reply
Thanks given by:


Messages In This Thread
Proposed Message Standardisation - by tigerw - 08-08-2013, 02:45 AM
RE: Proposed Message Standardisation - by bearbin - 08-08-2013, 02:47 AM
RE: Proposed Message Standardisation - by tigerw - 08-08-2013, 03:11 AM
RE: Proposed Message Standardisation - by tigerw - 08-08-2013, 03:22 AM
RE: Proposed Message Standardisation - by xoft - 08-08-2013, 06:36 AM
RE: Proposed Message Standardisation - by bearbin - 08-08-2013, 06:47 AM
RE: Proposed Message Standardisation - by xoft - 08-08-2013, 06:52 AM
RE: Proposed Message Standardisation - by xoft - 02-06-2014, 09:06 PM
RE: Proposed Message Standardisation - by tigerw - 02-07-2014, 04:33 AM
RE: Proposed Message Standardisation - by bearbin - 02-07-2014, 05:30 AM
RE: Proposed Message Standardisation - by xoft - 02-07-2014, 07:24 AM
RE: Proposed Message Standardisation - by xoft - 02-07-2014, 07:56 AM
RE: Proposed Message Standardisation - by xoft - 02-07-2014, 08:44 PM
RE: Proposed Message Standardisation - by xoft - 02-08-2014, 12:27 AM
RE: Proposed Message Standardisation - by tigerw - 02-08-2014, 04:14 AM
RE: Proposed Message Standardisation - by bearbin - 02-08-2014, 04:40 AM
RE: Proposed Message Standardisation - by tigerw - 02-08-2014, 07:10 AM
RE: Proposed Message Standardisation - by tigerw - 02-08-2014, 08:04 AM
RE: Proposed Message Standardisation - by xoft - 02-08-2014, 08:37 AM
RE: Proposed Message Standardisation - by tigerw - 02-09-2014, 07:09 AM



Users browsing this thread: 11 Guest(s)