--- deliantra/server/socket/info.C 2006/12/13 21:27:09 1.13 +++ deliantra/server/socket/info.C 2006/12/14 01:12:35 1.14 @@ -47,19 +47,15 @@ static void esrv_print_msg (NewSocket * ns, int color, const char *str) { - char buf[HUGE_BUF]; + SockList sl (MAXSOCKBUF); if (ns->status == Ns_Old) - { - snprintf (buf, HUGE_BUF, "%s\n", str); - } + sl.printf ("%s\n", str); else - { - snprintf (buf, HUGE_BUF, "drawinfo %d %s", color, str); - } + sl.printf ("drawinfo %d %s", color, str); -/* LOG(llevDebug,"sending %s to socket, len=%d\n", buf, strlen(buf));*/ - Write_String_To_Socket (ns, buf, strlen (buf)); + ns->send_packet (sl); + sl.free (); } /** @@ -74,13 +70,11 @@ static void esrv_print_ext_msg (NewSocket * ns, int color, uint8 type, uint8 subtype, const char *message) { - char buf[HUGE_BUF]; - - snprintf (buf, HUGE_BUF, "drawextinfo %d %hhu %hhu %s", color, type, subtype, message); - Write_String_To_Socket (ns, buf, strlen (buf)); - -/* LOG(llevDebug,"sending %s to socket, len=%d", buf, strlen(buf));*/ + SockList sl (MAXSOCKBUF); + sl.printf ("drawextinfo %d %hhu %hhu %s", color, type, subtype, message); + ns->send_packet (sl); + sl.free (); } /**