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

Comparing deliantra/server/socket/request.C (file contents):
Revision 1.39 by root, Fri Dec 15 03:53:44 2006 UTC vs.
Revision 1.40 by root, Fri Dec 15 04:21:29 2006 UTC

214 } 214 }
215 } 215 }
216 216
217 socket.current_x = ob->x; 217 socket.current_x = ob->x;
218 socket.current_y = ob->y; 218 socket.current_y = ob->y;
219}
220
221/**
222 * RequestInfo is sort of a meta command. There is some specific
223 * request of information, but we call other functions to provide
224 * that information.
225 */
226void
227RequestInfo (char *buf, int len, client_socket * ns)
228{
229 char *params = NULL, *cp;
230
231 /* No match */
232 char bigbuf[MAX_BUF];
233 int slen;
234
235 /* Set up replyinfo before we modify any of the buffers - this is used
236 * if we don't find a match.
237 */
238 strcpy (bigbuf, "replyinfo ");
239 slen = strlen (bigbuf);
240 safe_strcat (bigbuf, buf, &slen, MAX_BUF);
241
242 /* find the first space, make it null, and update the
243 * params pointer.
244 */
245 for (cp = buf; *cp != '\0'; cp++)
246 if (*cp == ' ')
247 {
248 *cp = '\0';
249 params = cp + 1;
250 break;
251 }
252
253 if (!strcmp (buf, "image_info"))
254 send_image_info (ns, params);
255 else if (!strcmp (buf, "image_sums"))
256 send_image_sums (ns, params);
257 else if (!strcmp (buf, "skill_info"))
258 send_skill_info (ns, params);
259 else if (!strcmp (buf, "spell_paths"))
260 send_spell_paths (ns, params);
261 else
262 ns->send_packet (bigbuf, len);
219} 263}
220 264
221void 265void
222ExtCmd (char *buf, int len, player *pl) 266ExtCmd (char *buf, int len, player *pl)
223{ 267{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines