summaryrefslogtreecommitdiff
path: root/NET/worlds/network/AnonRoomServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/network/AnonRoomServer.java')
-rw-r--r--NET/worlds/network/AnonRoomServer.java146
1 files changed, 146 insertions, 0 deletions
diff --git a/NET/worlds/network/AnonRoomServer.java b/NET/worlds/network/AnonRoomServer.java
new file mode 100644
index 0000000..6111533
--- /dev/null
+++ b/NET/worlds/network/AnonRoomServer.java
@@ -0,0 +1,146 @@
+/* */ package NET.worlds.network;
+/* */
+/* */ import NET.worlds.core.IniFile;
+/* */ import java.io.PrintStream;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class AnonRoomServer
+/* */ extends WorldServer
+/* */ {
+/* */ protected sessionInitCmd buildSessionInitCmd()
+/* */ {
+/* 56 */ OldPropertyList props = new OldPropertyList();
+/* 57 */ String username = null;
+/* */
+/* */
+/* 60 */ assert (this._galaxy.getLoginMode() != 1);
+/* */
+/* 62 */ assert (this._galaxy.getPassword() == null);
+/* 63 */ assert (this._galaxy.getSerialNum() == null);
+/* */
+/* */
+/* 66 */ props.addProperty(new netProperty(3,
+/* 67 */ String.valueOf(getVersion())));
+/* 68 */ props.addProperty(new netProperty(9,
+/* 69 */ String.valueOf(this._clientVersion)));
+/* */
+/* 71 */ this._firstLogon = this._galaxy.addPendingServer(this);
+/* 72 */ assert (this._firstLogon);
+/* */
+/* 74 */ int avatars = IniFile.gamma().getIniInt("avatars", 24);
+/* 75 */ props.addProperty(new netProperty(7,
+/* 76 */ Integer.toString(avatars)));
+/* */
+/* 78 */ switch (this._galaxy.getLoginMode()) {
+/* */ case 3:
+/* 80 */ assert (this._galaxy.getGuestExpiration() != null);
+/* 81 */ props.addProperty(new netProperty(14, this._galaxy
+/* 82 */ .getGuestExpiration()));
+/* 83 */ props.addProperty(new netProperty(12, "1"));
+/* 84 */ break;
+/* */
+/* */
+/* */
+/* */ case 2:
+/* 89 */ assert (this._galaxy.getChatname() != null);
+/* 90 */ username = this._galaxy.getChatname();
+/* */
+/* */
+/* */
+/* 94 */ regShortID(1, username);
+/* */
+/* 96 */ props.addProperty(new netProperty(2, username));
+/* 97 */ break;
+/* */ default:
+/* 99 */ if (!$assertionsDisabled) { throw new AssertionError();
+/* */ }
+/* */ break;
+/* */ }
+/* 103 */ if ((getDebugLevel() & 0x4) > 0) {
+/* 104 */ synchronized (System.out) {
+/* 105 */ System.out.println(this._serverURL.getHost() +
+/* 106 */ ": sending AnonRoomServer sessionInit.");
+/* 107 */ if ((this._firstLogon) &&
+/* 108 */ (this._galaxy.getLoginMode() == 3)) {
+/* 109 */ System.out.println(" VAR_GUEST");
+/* */ } else {
+/* 111 */ assert (username != null);
+/* 112 */ System.out.println(" username = \"" + username + "\"");
+/* */ }
+/* */ }
+/* */ }
+/* 116 */ return new sessionInitCmd(props);
+/* */ }
+/* */
+/* */ protected void state_XMIT_SI()
+/* */ {
+/* 121 */ if (this._requestOffline) {
+/* 122 */ this._state.setState(17);
+/* 123 */ return;
+/* */ }
+/* 125 */ sessionInitCmd SI = buildSessionInitCmd();
+/* */
+/* 127 */ if (SI != null) {
+/* */ try {
+/* 129 */ sendNetMsg(SI);
+/* */ } catch (PacketTooLargeException e) {
+/* 131 */ if (!$assertionsDisabled) throw new AssertionError();
+/* */ }
+/* 133 */ this._state.setState(8);
+/* */ }
+/* */ else {
+/* 136 */ this._lastError = new VarErrorException(204);
+/* 137 */ this._state.setState(17);
+/* */ }
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\AnonRoomServer.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file