hedgewars/uChat.pas
changeset 4404 6bae4e9461aa
parent 4402 54a78ec6aac4
child 4465 743673c67d0c
equal deleted inserted replaced
4403:0dfe26f48ec1 4404:6bae4e9461aa
   306     InputStrL[byte(InputStr.s[0]) + btw]:= InputStr.s[0];
   306     InputStrL[byte(InputStr.s[0]) + btw]:= InputStr.s[0];
   307     SetLine(InputStr, InputStr.s + utf8, true)
   307     SetLine(InputStr, InputStr.s + utf8, true)
   308     end
   308     end
   309 end;
   309 end;
   310 
   310 
       
   311 procedure chChatMessage(var s: shortstring);
       
   312 begin
       
   313     AddChatString(s)
       
   314 end;
       
   315 
   311 procedure chSay(var s: shortstring);
   316 procedure chSay(var s: shortstring);
   312 begin
   317 begin
   313     SendIPC('s' + s);
   318     SendIPC('s' + s);
   314 
   319 
   315     if copy(s, 1, 4) = '/me ' then
   320     if copy(s, 1, 4) = '/me ' then
   353         end
   358         end
   354 end;
   359 end;
   355 
   360 
   356 procedure initModule;
   361 procedure initModule;
   357 begin
   362 begin
       
   363     RegisterVariable('chatmsg', vtCommand, @chChatMessage, true);
   358     RegisterVariable('say', vtCommand, @chSay, true);
   364     RegisterVariable('say', vtCommand, @chSay, true);
   359     RegisterVariable('team', vtCommand, @chTeamSay, true);
   365     RegisterVariable('team', vtCommand, @chTeamSay, true);
   360     RegisterVariable('history', vtCommand, @chHistory, true );
   366     RegisterVariable('history', vtCommand, @chHistory, true );
   361     RegisterVariable('chat', vtCommand, @chChat, true );
   367     RegisterVariable('chat', vtCommand, @chChat, true );
   362 
   368