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

Comparing deliantra/server/socket/info.C (file contents):
Revision 1.13 by root, Wed Dec 13 21:27:09 2006 UTC vs.
Revision 1.14 by root, Thu Dec 14 01:12:35 2006 UTC

45 * replaced with this, just using black as the color. 45 * replaced with this, just using black as the color.
46 */ 46 */
47static void 47static void
48esrv_print_msg (NewSocket * ns, int color, const char *str) 48esrv_print_msg (NewSocket * ns, int color, const char *str)
49{ 49{
50 char buf[HUGE_BUF]; 50 SockList sl (MAXSOCKBUF);
51 51
52 if (ns->status == Ns_Old) 52 if (ns->status == Ns_Old)
53 { 53 sl.printf ("%s\n", str);
54 snprintf (buf, HUGE_BUF, "%s\n", str);
55 }
56 else 54 else
57 {
58 snprintf (buf, HUGE_BUF, "drawinfo %d %s", color, str); 55 sl.printf ("drawinfo %d %s", color, str);
59 }
60 56
61/* LOG(llevDebug,"sending %s to socket, len=%d\n", buf, strlen(buf));*/ 57 ns->send_packet (sl);
62 Write_String_To_Socket (ns, buf, strlen (buf)); 58 sl.free ();
63} 59}
64 60
65/** 61/**
66 * Draws an extended message on the client. 62 * Draws an extended message on the client.
67 * ns the socket to send message to 63 * ns the socket to send message to
72 * message The main message 68 * message The main message
73 */ 69 */
74static void 70static void
75esrv_print_ext_msg (NewSocket * ns, int color, uint8 type, uint8 subtype, const char *message) 71esrv_print_ext_msg (NewSocket * ns, int color, uint8 type, uint8 subtype, const char *message)
76{ 72{
77 char buf[HUGE_BUF]; 73 SockList sl (MAXSOCKBUF);
78 74
79 snprintf (buf, HUGE_BUF, "drawextinfo %d %hhu %hhu %s", color, type, subtype, message); 75 sl.printf ("drawextinfo %d %hhu %hhu %s", color, type, subtype, message);
80 Write_String_To_Socket (ns, buf, strlen (buf)); 76 ns->send_packet (sl);
81 77 sl.free ();
82/* LOG(llevDebug,"sending %s to socket, len=%d", buf, strlen(buf));*/
83
84} 78}
85 79
86/** 80/**
87 * Frontend for esrv_print_msg 81 * Frontend for esrv_print_msg
88 * \param colr message color 82 * \param colr message color

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines