CommandHelper

CommandHelper

46.5k Downloads

get_server_info() addition

LadyCailinBot opened this issue ยท 5 comments

commented

CMDHELPER-2715 - Reported by Lildirt

Fetch the servers MOTD in the server.properties with get_server_info()

Attempt to port over the coloring of MOTDs if possible, otherwise strip the colors.

commented

Comment by jb_aero

What are you using this for?

commented

Comment by Lildirt

I am using this in a variety of commands. My MOTD has a version number in it that depicts.. well .. the server version. Not the Mi ecraft version, however.

commented

Comment by Lildirt

Did not mean to post that yet.
Anyways, I am more or less asking so that I wouldn't have to run around and update every file in the world.
I suppose I could use servername for this, but color from the motd is relatively crucial.

commented

Comment by PseudoKnight

Why don't you use CH's server_ping event to handle the MOTD, that way you don't have to bother using server.properties for the motd.

commented

Comment by Hekta

Otherwise you can get the motd with this script :

/motd = msg(array_get(ini_decode(read('../../server.properties')), 'motd'))