--- deliantra/server/socket/init.C 2007/01/20 13:47:17 1.36 +++ deliantra/server/socket/init.C 2007/03/14 15:44:47 1.41 @@ -131,24 +131,19 @@ mapx = 11; mapy = 11; itemcmd = 1; /* Default is version item1 command */ - - faces_sent = salloc0 (nrofpixmaps); + max_rate = 100000 / (1000000 / MAX_TIME); // ~1mbit is assumed per default /* Do this so we don't send a face command for the client for * this face. Face 0 is sent to the client to say clear * face information. */ - faces_sent[0] = NS_FACESENT_FACE; + faces_sent[0] = true; - // socket I/O is low priority - // we prefer to have the server run instead of handling client requests - socket_ev.prio (PE_PRIO_NORMAL + 1); + socket_ev.prio (PE_PRIO_NORMAL); socket_ev.fd (fd); socket_ev.poll (PE_R); - // command handling is even lower priority - // that way no client can monopolise the server - cmd_ev.prio (PE_PRIO_NORMAL + 2); + cmd_ev.prio (PE_PRIO_NORMAL); // initialisation done, kick it! send_packet_printf ("version %d %d %s\n", VERSION_CS, VERSION_SC, VERSION_INFO); @@ -163,7 +158,6 @@ { clients.erase (this); - sfree (faces_sent, nrofpixmaps); free (stats.range); free (stats.title); free (host); @@ -232,8 +226,6 @@ cst_lst.time_start = time (NULL); LOG (llevDebug, "Initialize new client/server data\n"); - - read_client_images (); } @@ -254,20 +246,9 @@ client * client::create (int fd, const char *peername) { - if (checkbanned (NULL, peername)) - { - LOG (llevInfo, "Banned host tried to connect: [%s]\n", peername); - return 0; - } - else - { - client *ns = new client (dup (fd), peername); - - ns->instantiate (); // effectively a nop right now - - INVOKE_CLIENT (CONNECT, ns); - - return ns; - } + client *ns = new client (dup (fd), peername); + ns->instantiate (); // effectively a nop right now + INVOKE_CLIENT (CONNECT, ns); + return ns; }