summaryrefslogtreecommitdiff
path: root/NET/worlds/network/AnonUserServer.java
blob: 9448a0428deb225f6e4397ac4e0cd88bc18f85ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*     */ package NET.worlds.network;
/*     */ 
/*     */ import java.io.PrintStream;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class AnonUserServer
/*     */   extends WorldServer
/*     */ {
/*     */   protected sessionInitCmd buildSessionInitCmd()
/*     */   {
/*  59 */     OldPropertyList props = new OldPropertyList();
/*     */     
/*     */ 
/*  62 */     props.addProperty(new netProperty(3, 
/*  63 */       String.valueOf(getVersion())));
/*  64 */     props.addProperty(new netProperty(9, 
/*  65 */       String.valueOf(this._clientVersion)));
/*     */     
/*  67 */     this._firstLogon = this._galaxy.addPendingServer(this);
/*  68 */     assert (this._firstLogon);
/*     */     
/*     */ 
/*  71 */     assert (this._galaxy.getPassword() == null);
/*     */     
/*     */ 
/*  74 */     assert (this._galaxy.getLoginMode() != 1);
/*  75 */     assert (this._galaxy.getLoginMode() != 4);
/*  76 */     assert (this._galaxy.getSerialNum() == null);
/*     */     
/*  78 */     switch (this._galaxy.getLoginMode()) {
/*     */     case 3: 
/*  80 */       assert (this._galaxy.getGuestExpiration() != null);
/*  81 */       props.addProperty(new netProperty(14, this._galaxy
/*  82 */         .getGuestExpiration()));
/*  83 */       if (this._firstLogon)
/*  84 */         props.addProperty(new netProperty(12, "1"));
/*  85 */       break;
/*     */     
/*     */ 
/*     */     case 2: 
/*  89 */       assert (this._galaxy.getChatname() != null);
/*     */       
/*     */ 
/*  92 */       regShortID(1, this._galaxy.getChatname());
/*     */       
/*  94 */       props.addProperty(new netProperty(2, this._galaxy
/*  95 */         .getChatname()));
/*  96 */       if (this._firstLogon)
/*  97 */         props.addProperty(new netProperty(12, "1"));
/*  98 */       break;
/*     */     default: 
/* 100 */       if (!$assertionsDisabled) { throw new AssertionError();
/*     */       }
/*     */       break;
/*     */     }
/*     */     
/* 105 */     if ((getDebugLevel() & 0x4) > 0) {
/* 106 */       synchronized (System.out) {
/* 107 */         System.out.println(this._serverURL.getHost() + 
/* 108 */           ": sending sessionInit.");
/* 109 */         System.out.println("  username = \"" + 
/* 110 */           this._galaxy.getChatname() + "\"");
/* 111 */         if (this._galaxy.getPassword() != null)
/* 112 */           System.out.println("  password = " + 
/* 113 */             this._galaxy.getPassword());
/* 114 */         if (this._galaxy.getLoginMode() == 3) {
/* 115 */           System.out.println("             VAR_GUEST");
/*     */         }
/*     */       }
/*     */     }
/* 119 */     return new sessionInitCmd(props);
/*     */   }
/*     */   
/*     */   protected void state_XMIT_SI()
/*     */   {
/* 124 */     if (this._requestOffline) {
/* 125 */       this._state.setState(17);
/* 126 */       return;
/*     */     }
/* 128 */     sessionInitCmd SI = buildSessionInitCmd();
/*     */     try
/*     */     {
/* 131 */       sendNetMsg(SI);
/*     */     } catch (PacketTooLargeException e) {
/* 133 */       if (!$assertionsDisabled) throw new AssertionError();
/*     */     }
/* 135 */     this._state.setState(8);
/*     */   }
/*     */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\AnonUserServer.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */