From: Keith F. <ven...@us...> - 2003-03-25 08:15:16
|
Update of /cvsroot/planeshift/planeshift/src/server In directory sc8-pr-cvs1:/tmp/cvs-serv6864 Modified Files: chatmanager.cpp Log Message: Changed how tells are handled a little bit. Index: chatmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/chatmanager.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** chatmanager.cpp 18 Mar 2003 20:33:03 -0000 1.55 --- chatmanager.cpp 25 Mar 2003 08:15:12 -0000 1.56 *************** *** 209,212 **** --- 209,221 ---- { CPrintf ("SendTell!\n"); + + if (msg.sPerson.Length()) + { + // normalize format of nickname + msg.sPerson.strlwr(); + char c = toupper(msg.sPerson.GetAt(0)); + msg.sPerson.SetAt(0,c); + } + // Find the addr token of the named TELL person Client *p = clients->Find(msg.sPerson); *************** *** 216,221 **** // Create a new message and send it to that person if found psChatMessage cmsg(p->GetClientNum(), who, msg.sText, msg.iChatType); - msghandler->SendMessage(cmsg.msg); } else --- 225,233 ---- // Create a new message and send it to that person if found psChatMessage cmsg(p->GetClientNum(), who, msg.sText, msg.iChatType); msghandler->SendMessage(cmsg.msg); + + // Echo the message back to the speaker also + psChatMessage cmsg2(clientfrom, msg.sPerson, msg.sText, CHAT_TELLSELF); + msghandler->SendMessage(cmsg2.msg); } else |