Chat works

This commit is contained in:
Garry Newman
2016-04-29 19:44:37 +01:00
parent 8db1528ae5
commit 1ce541e2b0
4 changed files with 24 additions and 12 deletions
+7 -2
View File
@@ -17,8 +17,13 @@ function ConsoleController( $scope, rconService, $timeout )
$scope.OnMessage = function( msg )
{
if ( msg.Message.startsWith( "[rcon] " ) ) return;
if ( msg.Type != "Message" && msg.Type != "Error" && msg.Type != "Warning" ) return;
if ( msg.Type != "Generic" && msg.Type != "Log" && msg.Type != "Error" && msg.Type != "Warning" )
{
console.log( msg );
return;
}
msg.Class = msg.Type;
$scope.Output.push( msg );
@@ -40,7 +45,7 @@ function ConsoleController( $scope, rconService, $timeout )
{
console.log( "GetHistory" );
rconService.Request( "chat.tail 128", $scope, function ( msg )
rconService.Request( "console.tail 128", $scope, function ( msg )
{
var messages = JSON.parse( msg.Message );