bugfix serverInfo

This commit is contained in:
Jeena Paradies 2011-05-05 13:47:12 +02:00
parent 08e086084c
commit b39ad8e97f
2 changed files with 3 additions and 2 deletions

View file

@ -26,6 +26,7 @@ class Chat
table_token = gets.chomp unless @is_bot
@ggs_network = GGSNetwork.new(self, table_token)
#@ggs_network.connect("192.168.0.2", 9000)
@ggs_network.connect("localhost", 9000)
end

View file

@ -93,8 +93,8 @@ expose(Global, Table) ->
ggs_table:notify_all_players(Table, {Command, Args})
end},
{"serverInfo", fun(#erlv8_fun_invocation{}, []) ->
{ok, TableList} = ggs_table:get_player_list(Table),
integer_to_list(length(TableList))
PlayerList = ggs_coordinator:get_all_players(),
integer_to_list(length(PlayerList))
end}
%{"log", fun(#erlv8_fun_invocation{}, [Arg]) -> erlang:display(Arg) end }
%{"setTimeout", fund(#erlv8_fun_invocation{}, [Time, FunctionName])-> setTimeout(Time, FunctionName) end}