--- deliantra/server/socket/request.C 2010/04/08 17:36:54 1.169 +++ deliantra/server/socket/request.C 2010/04/08 20:05:36 1.170 @@ -448,70 +448,6 @@ //+GPL -/* -#define MSG_TYPE_BOOK 1 -#define MSG_TYPE_CARD 2 -#define MSG_TYPE_PAPER 3 -#define MSG_TYPE_SIGN 4 -#define MSG_TYPE_MONUMENT 5 -#define MSG_TYPE_SCRIPTED_DIALOG 6*/ - -/** Reply to ExtendedInfos command */ -void -ToggleExtendedText (char *buf, int len, client * ns) -{ - char cmdback[MAX_BUF]; - char temp[10]; - char command[50]; - int info, nextinfo, i, flag; - - cmdback[0] = '\0'; - - nextinfo = 0; - while (1) - { - /* 1. Extract an info */ - info = nextinfo; - - while ((info < len) && (buf [info] == ' ')) - info++; - - if (info >= len) - break; - - nextinfo = info + 1; - - while ((nextinfo < len) && (buf [nextinfo] != ' ')) - nextinfo++; - - if (nextinfo - info >= 49) /*Erroneous info asked */ - continue; - - memcpy (command, buf + info, nextinfo - info); - command [nextinfo - info] = 0; - - /* 2. Interpret info */ - i = sscanf (command, "%d", &flag); - - if ((i == 1) && (flag > 0) && (flag <= MSG_TYPE_LAST)) - ns->supported_readables |= (1 << flag); - /*3. Next info */ - } - - /* Send resulting state */ - strcpy (cmdback, "ExtendedTextSet"); - - for (i = 0; i <= MSG_TYPE_LAST; i++) - if (ns->supported_readables & (1 << i)) - { - strcat (cmdback, " "); - snprintf (temp, sizeof (temp), "%d", i); - strcat (cmdback, temp); - } - - ns->send_packet (cmdback); -} - /** * This handles the general commands from the client (ie, north, fire, cast, * etc.)