ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/init.C
(Generate patch)

Comparing deliantra/server/socket/init.C (file contents):
Revision 1.37 by root, Tue Jan 23 01:05:18 2007 UTC vs.
Revision 1.39 by root, Sun Mar 11 02:12:45 2007 UTC

130 darkness = 1; 130 darkness = 1;
131 mapx = 11; 131 mapx = 11;
132 mapy = 11; 132 mapy = 11;
133 itemcmd = 1; /* Default is version item1 command */ 133 itemcmd = 1; /* Default is version item1 command */
134 134
135 faces_sent = salloc0<uint8> (nrofpixmaps);
136
137 /* Do this so we don't send a face command for the client for 135 /* Do this so we don't send a face command for the client for
138 * this face. Face 0 is sent to the client to say clear 136 * this face. Face 0 is sent to the client to say clear
139 * face information. 137 * face information.
140 */ 138 */
141 faces_sent[0] = NS_FACESENT_FACE; 139 faces_sent[0] = NS_FACESENT_FACE;
157 155
158client::~client () 156client::~client ()
159{ 157{
160 clients.erase (this); 158 clients.erase (this);
161 159
162 sfree<uint8> (faces_sent, nrofpixmaps);
163 free (stats.range); 160 free (stats.range);
164 free (stats.title); 161 free (stats.title);
165 free (host); 162 free (host);
166} 163}
167 164
226{ 223{
227 cst_tot.time_start = time (NULL); 224 cst_tot.time_start = time (NULL);
228 cst_lst.time_start = time (NULL); 225 cst_lst.time_start = time (NULL);
229 226
230 LOG (llevDebug, "Initialize new client/server data\n"); 227 LOG (llevDebug, "Initialize new client/server data\n");
231
232 read_client_images ();
233} 228}
234 229
235 230
236/******************************************************************************* 231/*******************************************************************************
237 * 232 *
248} 243}
249 244
250client * 245client *
251client::create (int fd, const char *peername) 246client::create (int fd, const char *peername)
252{ 247{
253 if (checkbanned (NULL, peername))
254 {
255 LOG (llevInfo, "Banned host tried to connect: [%s]\n", peername);
256 return 0;
257 }
258 else
259 {
260 client *ns = new client (dup (fd), peername); 248 client *ns = new client (dup (fd), peername);
261
262 ns->instantiate (); // effectively a nop right now 249 ns->instantiate (); // effectively a nop right now
263
264 INVOKE_CLIENT (CONNECT, ns); 250 INVOKE_CLIENT (CONNECT, ns);
265
266 return ns; 251 return ns;
267 }
268} 252}
269 253

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines