Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
Kepler - Java v14+ server (SnowStorm, BattleBall, Camera, Wobble Squabble)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Quackster" data-source="post: 466448" data-attributes="member: 971"><p>Happy New Year, Merry Christmas, Saturnalia, Yule etc. <img src="/styles/default/xenforo/smilies/emojione/tongue.png" class="smilie" loading="lazy" alt=":p" title="Stick Out Tongue :p" data-shortname=":p" /></p><p></p><p>I hope that this release brings many people joy, to make up for what a horrible year that 2020 has been.</p><p></p><p><strong>Changelog</strong></p><p></p><ul> <li data-xf-list-type="ul">Add: SnowStorm! All maps have been added along with all features. Please read README_SnowStorm.txt to get SnowStorm working correctly.</li> <li data-xf-list-type="ul">Fix: Moving furniture properly unregisters it from its previous spot.</li> <li data-xf-list-type="ul">Fix: Game history will show the last 15 games played, instead of expiring them after 10 minutes.</li> </ul><p>Huge thanks to Sefhriloff for figuring out the SnowStorm checksum override to make SnowStorm a possibility.</p><p></p><p>Please make sure to run the v1.3 migration SQL to enable SnowStorm from inside the server.</p><p></p><p><strong>Download:</strong> <a href="https://github.com/Quackster/Kepler/releases/download/v1.3/Kepler.v1.3.zip" target="_blank">https://github.com/Quackster/Kepler/releases/download/v1.3/Kepler.v1.3.zip</a></p><p></p><p><img src="https://i.imgur.com/5fZ7dIg.gif" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>[automerge]1609498405[/automerge]</p><p>A small little update to Kepler.</p><p></p><p>I've finished the RCON system so I've completely removed the old system and added a new system, included a PHP example of how to send RCON commands to Kepler too.</p><p></p><p><strong>Changelog</strong></p><p></p><ul> <li data-xf-list-type="ul">Added: New RCON system</li> <li data-xf-list-type="ul">Removed old unused libraries which cut down the compiled size of Kepler by 6 megabytes.</li> </ul><p></p><p><strong>Reminder!</strong> Do not make RCON listen on anything other than localhost/127.0.01, if you are please make sure you know what you're doing by exposing the RCON port to the outside world. RCON is not the same as the MUS connection which Kepler also uses.</p><p></p><p><strong>Download:</strong> <a href="https://github.com/Quackster/Kepler/releases/tag/v1.31" target="_blank">https://github.com/Quackster/Kepler/releases/tag/v1.31</a></p><p></p><p>PHP code example for sending RCON commands alongside their valid usages:</p><p></p><p>[php]</p><p><?php</p><p></p><p>sendRcon("127.0.0.1", "12309", build("hotel_alert", array(</p><p> "message" => "Hello, World!",</p><p> "sender" => "Alex"</p><p>)));</p><p></p><p>sendRcon("127.0.0.1", "12309", build("hotel_alert", array(</p><p> "message" => "Hello, World!"</p><p>)));</p><p></p><p>sendRcon("127.0.0.1", "12309", build("refresh_looks", array(</p><p> "userId" => "1"</p><p>)));</p><p></p><p>sendRcon("127.0.0.1", "12309", build("refresh_hand", array(</p><p> "userId" => "1"</p><p>)));</p><p></p><p>sendRcon("127.0.0.1", "12309", build("refresh_club", array(</p><p> "userId" => "1"</p><p>)));</p><p></p><p>sendRcon("127.0.0.1", "12309", build("refresh_credits", array(</p><p> "userId" => "1"</p><p>)));</p><p></p><p>function build($header, $parameters) {</p><p> $message = "";</p><p> $message .= pack('N', strlen($header));</p><p> $message .= $header;</p><p> $message .= pack('N', count($parameters));</p><p> </p><p> foreach ($parameters as $key => $value) {</p><p> $message .= pack('N', strlen($key));</p><p> $message .= $key;</p><p> </p><p> $message .= pack('N', strlen($value));</p><p> $message .= $value;</p><p> }</p><p> </p><p> $buffer = "";</p><p> $buffer .= pack('N', strlen($message));</p><p> $buffer .= $message;</p><p> return $buffer;</p><p>}</p><p></p><p>function sendRcon($ip, $port, $command) {</p><p> $socket = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));</p><p> socket_connect($socket, $ip, $port);</p><p> socket_send($socket, $command, strlen($command), MSG_DONTROUTE); </p><p> socket_close($socket);</p><p>} </p><p></p><p>?>[/php]</p><p></p><p>Java example:</p><p></p><p>[php]</p><p>public class RconCommand {</p><p> private final RconHeader header;</p><p> private final Map<String, Object> parameters;</p><p></p><p> public RconCommand(RconHeader header, Map<String, Object> parameters) {</p><p> this.header = header;</p><p> this.parameters = parameters;</p><p> }</p><p> </p><p> public void send() {</p><p> try (Socket socket = new Socket(ServerConfiguration.getString("rcon.ip"), ServerConfiguration.getInteger("rcon.port"))) {</p><p> ByteArrayOutputStream baos = new ByteArrayOutputStream();</p><p> DataOutputStream daos = new DataOutputStream(baos);</p><p></p><p> daos.writeInt(header.getRawHeader().length());</p><p> daos.write(header.getRawHeader().getBytes(StringUtil.getCharset()));</p><p> daos.writeInt(parameters.size());</p><p></p><p> for (var entry : parameters.entrySet()) {</p><p> daos.writeInt(entry.getKey().length());</p><p> daos.write(entry.getKey().getBytes(StringUtil.getCharset()));</p><p></p><p> daos.writeInt(entry.getValue().toString().length());</p><p> daos.write(entry.getValue().toString().getBytes(StringUtil.getCharset()));</p><p> }</p><p></p><p> try (DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream())) {</p><p> byte[] message = baos.toByteArray();</p><p></p><p> dataOutputStream.writeInt(message.length);</p><p> dataOutputStream.write(message);</p><p> dataOutputStream.flush();</p><p></p><p> baos.close();</p><p> daos.close();</p><p> socket.close();</p><p> } catch (IOException ignored) {</p><p></p><p> }</p><p> } catch (IOException ignored) {</p><p></p><p> }</p><p> }</p><p>}</p><p>[/php]</p></blockquote><p></p>
[QUOTE="Quackster, post: 466448, member: 971"] Happy New Year, Merry Christmas, Saturnalia, Yule etc. :p I hope that this release brings many people joy, to make up for what a horrible year that 2020 has been. [B]Changelog[/B] [LIST] [*]Add: SnowStorm! All maps have been added along with all features. Please read README_SnowStorm.txt to get SnowStorm working correctly. [*]Fix: Moving furniture properly unregisters it from its previous spot. [*]Fix: Game history will show the last 15 games played, instead of expiring them after 10 minutes. [/LIST] Huge thanks to Sefhriloff for figuring out the SnowStorm checksum override to make SnowStorm a possibility. Please make sure to run the v1.3 migration SQL to enable SnowStorm from inside the server. [B]Download:[/B] [URL]https://github.com/Quackster/Kepler/releases/download/v1.3/Kepler.v1.3.zip[/URL] [IMG]https://i.imgur.com/5fZ7dIg.gif[/IMG] [automerge]1609498405[/automerge] A small little update to Kepler. I've finished the RCON system so I've completely removed the old system and added a new system, included a PHP example of how to send RCON commands to Kepler too. [B]Changelog[/B] [LIST] [*]Added: New RCON system [*]Removed old unused libraries which cut down the compiled size of Kepler by 6 megabytes. [/LIST] [B]Reminder![/B] Do not make RCON listen on anything other than localhost/127.0.01, if you are please make sure you know what you're doing by exposing the RCON port to the outside world. RCON is not the same as the MUS connection which Kepler also uses. [B]Download:[/B] [url]https://github.com/Quackster/Kepler/releases/tag/v1.31[/url] PHP code example for sending RCON commands alongside their valid usages: [php] <?php sendRcon("127.0.0.1", "12309", build("hotel_alert", array( "message" => "Hello, World!", "sender" => "Alex" ))); sendRcon("127.0.0.1", "12309", build("hotel_alert", array( "message" => "Hello, World!" ))); sendRcon("127.0.0.1", "12309", build("refresh_looks", array( "userId" => "1" ))); sendRcon("127.0.0.1", "12309", build("refresh_hand", array( "userId" => "1" ))); sendRcon("127.0.0.1", "12309", build("refresh_club", array( "userId" => "1" ))); sendRcon("127.0.0.1", "12309", build("refresh_credits", array( "userId" => "1" ))); function build($header, $parameters) { $message = ""; $message .= pack('N', strlen($header)); $message .= $header; $message .= pack('N', count($parameters)); foreach ($parameters as $key => $value) { $message .= pack('N', strlen($key)); $message .= $key; $message .= pack('N', strlen($value)); $message .= $value; } $buffer = ""; $buffer .= pack('N', strlen($message)); $buffer .= $message; return $buffer; } function sendRcon($ip, $port, $command) { $socket = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp')); socket_connect($socket, $ip, $port); socket_send($socket, $command, strlen($command), MSG_DONTROUTE); socket_close($socket); } ?>[/php] Java example: [php] public class RconCommand { private final RconHeader header; private final Map<String, Object> parameters; public RconCommand(RconHeader header, Map<String, Object> parameters) { this.header = header; this.parameters = parameters; } public void send() { try (Socket socket = new Socket(ServerConfiguration.getString("rcon.ip"), ServerConfiguration.getInteger("rcon.port"))) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream daos = new DataOutputStream(baos); daos.writeInt(header.getRawHeader().length()); daos.write(header.getRawHeader().getBytes(StringUtil.getCharset())); daos.writeInt(parameters.size()); for (var entry : parameters.entrySet()) { daos.writeInt(entry.getKey().length()); daos.write(entry.getKey().getBytes(StringUtil.getCharset())); daos.writeInt(entry.getValue().toString().length()); daos.write(entry.getValue().toString().getBytes(StringUtil.getCharset())); } try (DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream())) { byte[] message = baos.toByteArray(); dataOutputStream.writeInt(message.length); dataOutputStream.write(message); dataOutputStream.flush(); baos.close(); daos.close(); socket.close(); } catch (IOException ignored) { } } catch (IOException ignored) { } } } [/php] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
Kepler - Java v14+ server (SnowStorm, BattleBall, Camera, Wobble Squabble)
Top