Add nickname to message in more appropriate place
authorunc0rr
Sun, 25 May 2008 18:09:21 +0000
changeset 950 feb18ec0c5c2
parent 949 866729775535
child 951 c021955435b2
Add nickname to message in more appropriate place
hedgewars/CCHandlers.inc
hedgewars/uChat.pas
hedgewars/uConsole.pas
--- a/hedgewars/CCHandlers.inc	Sun May 25 14:09:44 2008 +0000
+++ b/hedgewars/CCHandlers.inc	Sun May 25 18:09:21 2008 +0000
@@ -273,8 +273,9 @@
 
 procedure chSay(var s: shortstring);
 begin
-WriteLnToConsole('> ' + s);
-SendIPC('s'+s)
+s:= UserNick + ': ' + s;
+AddChatString(s);
+SendIPC('s' + s)
 end;
 
 procedure chTimer(var s: shortstring);
--- a/hedgewars/uChat.pas	Sun May 25 14:09:44 2008 +0000
+++ b/hedgewars/uChat.pas	Sun May 25 18:09:21 2008 +0000
@@ -123,9 +123,7 @@
 		13, 271: begin
 			if Length(InputStr.s) > 0 then
 				begin
-				s:= UserNick + ': ' + InputStr.s;
-				AddChatString(s);
-				ParseCommand('/say ' + s, true);
+				ParseCommand('/say ' + InputStr.s, true);
 				SetLine(InputStr, '')
 				end;
 			FreezeEnterKey;
--- a/hedgewars/uConsole.pas	Sun May 25 14:09:44 2008 +0000
+++ b/hedgewars/uConsole.pas	Sun May 25 18:09:21 2008 +0000
@@ -36,7 +36,8 @@
 implementation
 {$J+}
 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uWorld, uLand,
-     uRandom, uAmmos, uTriggers, GL, uStats, uGame;
+     uRandom, uAmmos, uTriggers, GL, uStats, uGame, uChat;
+
 const cLineWidth: LongInt = 0;
       cLinesCount = 256;