package NET.worlds.network; import NET.worlds.core.IniFile; public class AnonRoomServer extends WorldServer { protected sessionInitCmd buildSessionInitCmd() { OldPropertyList props = new OldPropertyList(); String username = null; assert this._galaxy.getLoginMode() != 1; assert this._galaxy.getPassword() == null; assert this._galaxy.getSerialNum() == null; props.addProperty(new netProperty(3, String.valueOf(this.getVersion()))); props.addProperty(new netProperty(9, String.valueOf(this._clientVersion))); this._firstLogon = this._galaxy.addPendingServer(this); assert this._firstLogon; int avatars = IniFile.gamma().getIniInt("avatars", 24); props.addProperty(new netProperty(7, Integer.toString(avatars))); switch (this._galaxy.getLoginMode()) { case 2: assert this._galaxy.getChatname() != null; username = this._galaxy.getChatname(); this.regShortID(1, username); props.addProperty(new netProperty(2, username)); break; case 3: assert this._galaxy.getGuestExpiration() != null; props.addProperty(new netProperty(14, this._galaxy.getGuestExpiration())); props.addProperty(new netProperty(12, "1")); break; default: assert false; } if ((getDebugLevel() & 4) > 0) { synchronized (System.out) { System.out.println(this._serverURL.getHost() + ": sending AnonRoomServer sessionInit."); if (this._firstLogon && this._galaxy.getLoginMode() == 3) { System.out.println(" VAR_GUEST"); } else { assert username != null; System.out.println(" username = \"" + username + "\""); } } } return new sessionInitCmd(props); } @Override protected void state_XMIT_SI() { if (this._requestOffline) { this._state.setState(17); } else { sessionInitCmd SI = this.buildSessionInitCmd(); if (SI != null) { try { this.sendNetMsg(SI); } catch (PacketTooLargeException var3) { assert false; } this._state.setState(8); } else { this._lastError = new VarErrorException(204); this._state.setState(17); } } } }