Cuberite Forum

Full Version: SexyMOTD Request
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
If you're going to port SexyMOTD than you need to port ProtocolLib to. Maybe you can implement it?
(08-07-2014, 05:03 PM)Stino Wrote: [ -> ]If you're going to port SexyMOTD than you need to port ProtocolLib to. Maybe you can implement it?

I think a good HOOK_SERVER_PING is enough.
ProtocolLib isn't needed.
Oke succes with making it. I will give you developer right on my server when it' s ready as thanks.Big Grin
Is this good enough?
-- HOOK_SERVER_PING
function OnServerPing(PlayerName, Motd, CurrentPlayers, MaxPlayers, Favicon, OnlinePlayersList)
	-- Modify max players
	MaxPlayers = 0
	return false, PlayerName, Motd, CurrentPlayers, MaxPlayers, Favicon, OnlinePlayersList
end
What's the datatype for Favicon and OnlinePlayersList? And don't call it Motd, it's ServerDescription; MOTD is the message sent to the player the first thing they connect.
(08-08-2014, 03:24 PM)xoft Wrote: [ -> ]What's the datatype for Favicon and OnlinePlayersList? And don't call it Motd, it's ServerDescription; MOTD is the message sent to the player the first thing they connect.

OnlinePlayersList - StringList
Favicon - AString (Base64 Image)
I'm more interested in the Lua datatypes. There's no StringList type in Lua. Will it be a regular array-table containing strings? What if the plugin returns a table containing other stuff than strings? What if it returns an empty string? Or a number?
The hook doesn't have the IP parameter, so there's no way to implement this plugin anyway.
Pages: 1 2