function chat_startup()
{
// everything as it was
while(1)
{
if(key_c == ON && enet_get_connection() != SERVER_MODE)
{
enet_clsend_event(17,tmpMsg,0,BROADCAST); //sends the chat msg to everyone
if(enet_get_connection() == CLIENT_SERVER_MODE)
{
enet_clsend_event(17,tmpMsg,0,enet_get_clientid()); //sends the chat msg to me
}
}
wait(1);
}
}