rendered paste bodyIndex: src/engine/ePlayer.cpp===================================================================--- src/engine/ePlayer.cpp (rvision 7364)+++ src/engine/ePlayer.cpp (copie de travail)@@ -1157,7 +1157,7 @@ }; void handle_chat_admin_commands(tJUST_CONTROLLED_PTR< ePlayerNetID > &p, tString say){- if (say.StartsWith("/login")) {+/* if (say.StartsWith("/login")) { tString params(""); if (say.StrPos(" ") == -1) return;@@ -1226,9 +1226,10 @@ } } else- {- sn_ConsoleOut("Unknown chat command.\n",p->Owner());- }+ { */+ // sn_ConsoleOut("Unknown chat command.\n",p->Owner());+ se_DisplayChatLocally(p, say);+// } } #endif @@ -1522,7 +1523,7 @@ } } #ifdef DEDICATED- else if (command == "/players") {+/* else if (command == "/players") { for ( int i2 = se_PlayerNetIDs.Len()-1; i2>=0; --i2 ) { ePlayerNetID* p2 = se_PlayerNetIDs(i2);@@ -1538,7 +1539,7 @@ sn_ConsoleOut(tos, p->Owner()); } return;- }+ } */ else { handle_chat_admin_commands(p, say); return;@@ -4789,3 +4790,56 @@ } static tConfItemFunc se_allowTeamChangesPlayerConf("ALLOW_TEAM_CHANGE_PLAYER", &se_allowTeamChangesPlayer); static tConfItemFunc se_disallowTeamChangesPlayerConf("DISALLOW_TEAM_CHANGE_PLAYER", &se_disallowTeamChangesPlayer);+++// PLAYER_MESSAGE++static void PlayerConsoleOut_conf(std::istream &s)+{+ int receiver = se_ReadUser(s);++ tString msg_core;+ msg_core.ReadLine( s, true );+ + int current_place=0; // current place in buffer_name.++ // Check for match+ int num_matches=-1;++ // One match, send it.+// if (num_matches == 1) {+ + // build chat string+ //tColoredString toServer = se_BuildChatString( p, receiver, msg_core );+ tColoredString toServer;+ se_AppendChat( toServer, msg_core );+ toServer << '\n';+ + // log locally+ sn_ConsoleOut(toServer,0);+ + // send to receiver+ //se_SendPrivateMessage( p, receiver, msg_core );+ sn_ConsoleOut(toServer, receiver);+ return;+// }+ // More than than one match for the current buffer. Complain about that.+/* else if (num_matches > 1) {+ tOutput toSender;+ toSender.SetTemplateParameter(1, buffer_name);+ toSender << "$msg_toomanymatches";+ sn_ConsoleOut(toSender,0);+ return;+ }+ // 0 matches. The user can't spell. Complain about that, too.+ else {+ tOutput toSender;+ toSender.SetTemplateParameter(1, buffer_name);+ toSender << "$msg_nomatch";+ sn_ConsoleOut(toSender, 0);+ return;+ } */+}++static tConfItemFunc PlayerConsoleOut_c("PLAYER_MESSAGE",&PlayerConsoleOut_conf);+