[done] Differentiate Join/leave server message color ?

The next generation of server controlling with clean and powerful user interface

Moderators: oliverde8, reaby, NADEO

Post Reply
Orpel
Posts: 7
Joined: 07 Jul 2016, 19:18

[done] Differentiate Join/leave server message color ?

Post by Orpel »

Cheers happy racers !

Would anyone know how I could get the messages for Joining and Leaving to have a different color, to make it more obvious without 'reading' ?

From the GUI, the color option is the same for both...

Also, can a specific login be associated with a specific message text color (or can you create groups beside admins and have a setting for it in GUI ?)

Cheers
jaga01
Posts: 47
Joined: 06 Jan 2015, 14:31
Location: Romania

Re: Differentiate Join/leave server message color ?

Post by jaga01 »

Config settings > Chat messages > Join/Leave messages
oliverde8
Posts: 1286
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: Differentiate Join/leave server message color ?

Post by oliverde8 »

jaga01 wrote:Config settings > Chat messages > Join/Leave messages
I think he means to changing the color of each of the messages separately. red for leave & green for join for example.

Which at the moment is not possible :(
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...
jaga01
Posts: 47
Joined: 06 Jan 2015, 14:31
Location: Romania

Re: Differentiate Join/leave server message color ?

Post by jaga01 »

oliverde8 wrote:
jaga01 wrote:Config settings > Chat messages > Join/Leave messages
I think he means to changing the color of each of the messages separately. red for leave & green for join for example.

Which at the moment is not possible :(

true.. my bad :roflol:
Orpel
Posts: 7
Joined: 07 Jul 2016, 19:18

Re: Differentiate Join/leave server message color ?

Post by Orpel »

jaga01 wrote:true.. my bad :roflol:
Don't hurt yourself too much, it is nice you replied anyway, and it shows you must be as fast a rider than a reader ;)
oliverde8 wrote:Which at the moment is not possible
Which makes me wonder:
- Where is the color value given by GUI stored for the 'Join/leave msg' ?
- Where/when is the color of that string retreived to print the 'Join/leave msg' ?
- Where is the chat text color retreived to print a player chat msg ?
Knowing that could help me hardcode the file(s) to my fitting... and get closer
to understand how to modify GUI and file(s) for more lasting options.

Cheers
reaby
Posts: 956
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: Differentiate Join/leave server message color ?

Post by reaby »

Orpel wrote: Which makes me wonder:
- Where is the color value given by GUI stored for the 'Join/leave msg' ?
- Where/when is the color of that string retreived to print the 'Join/leave msg' ?
- Where is the chat text color retreived to print a player chat msg ?
Well... To answer this, maybe I should open little how the config system under the hood works:

Our ingame configurator values are recieved from Config-classes of the plugins...
at Metadata you create the configurator default values, and define the variable types and
also the place where you would like to see the variable at configurator. Configurator has then types for colorcodes, strings, lists, booleans etc.. so it knows to draw right type of setting changer and save the variables right.

The variables you define later are stored as serialized objects at \config\eXp\settings.exp and settings_servername.exp files depending the scope of variable type.. Thera can be global (if you run multiple servers with same exp installation) and local types.

To answer your question, by the default those color codes are stored at Core-plugin:
1. Core\Config::$colors_* && Core\Metadata

Ok, so the string then: We have full multilingual support, so...
2. somewhere at the plugin there should be eXpGetMessage(), this loads the default english message of the string.
The messages for other languages are stored at \pluginpath\messages\*.txt, where * = 2-letter code of language.

3. colorcodes are processed automatically with eXpChatSendServerMessage(). But you can use $this->colorParser at plugins and ColorParser::getInstance() at gui or other classes to register, deregister or parse colors.

I'll try to find time today to apply your wish. Easiest and propably best would be just add leave messages value at Core\Config::$colors_, add entry at metadata and edit the messages strings...
Orpel wrote:Knowing that could help me hardcode the file(s) to my fitting... and get closer
to understand how to modify GUI and file(s) for more lasting options.
:)

*edit*
and a fix is available :)
Orpel
Posts: 7
Joined: 07 Jul 2016, 19:18

Re: [done] Differentiate Join/leave server message color ?

Post by Orpel »

Thanks for the fix, it has been installed and works perfect :)

Is there some type of 'diff' I can check to see which files changed,
and where, to understand better your full powered eXplanations !

I could test adding gui input to some hardcoded colors for the cplive plugin...
Post Reply

Return to “eXpansion”

Who is online

Users browsing this forum: No registered users and 1 guest