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

Comparing deliantra/server/socket/lowlevel.C (file contents):
Revision 1.39 by root, Mon Apr 23 19:10:17 2007 UTC vs.
Revision 1.41 by root, Fri May 18 19:46:22 2007 UTC

1/* 1/*
2 * CrossFire, A Multiplayer game for X-windows 2 * CrossFire, A Multiplayer game
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team 4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
5 * Copyright (C) 1992 Frank Tore Johansen 5 * Copyright (C) 1992 Frank Tore Johansen
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
511client::send_drawinfo (const char *msg, int flags) 511client::send_drawinfo (const char *msg, int flags)
512{ 512{
513 send_packet_printf ("drawinfo %d %s", flags, msg); 513 send_packet_printf ("drawinfo %d %s", flags, msg);
514} 514}
515 515
516void
517client::send_msg (int color, const char *type, const char *msg)
518{
519 if (can_msg)
520 send_packet_printf ("msg %d %s %s", color, type, msg);
521 else if (color < 0)
522 return; // client cannot handle this
523 else if (strchr (msg, '<') || strchr (msg, '&'))
524 {
525 //TODO: should escape/modify to old syntax
526 send_packet_printf ("drawinfo %d %s", color, msg);
527 }
528 else
529 send_packet_printf ("drawinfo %d %s", color, msg);
530}
531
516/*********************************************************************** 532/***********************************************************************
517 * 533 *
518 * packet functions/utilities 534 * packet functions/utilities
519 * 535 *
520 **********************************************************************/ 536 **********************************************************************/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines