bugfix serverInfo
This commit is contained in:
parent
08e086084c
commit
b39ad8e97f
2 changed files with 3 additions and 2 deletions
|
@ -26,6 +26,7 @@ class Chat
|
||||||
table_token = gets.chomp unless @is_bot
|
table_token = gets.chomp unless @is_bot
|
||||||
|
|
||||||
@ggs_network = GGSNetwork.new(self, table_token)
|
@ggs_network = GGSNetwork.new(self, table_token)
|
||||||
|
#@ggs_network.connect("192.168.0.2", 9000)
|
||||||
@ggs_network.connect("localhost", 9000)
|
@ggs_network.connect("localhost", 9000)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,8 @@ expose(Global, Table) ->
|
||||||
ggs_table:notify_all_players(Table, {Command, Args})
|
ggs_table:notify_all_players(Table, {Command, Args})
|
||||||
end},
|
end},
|
||||||
{"serverInfo", fun(#erlv8_fun_invocation{}, []) ->
|
{"serverInfo", fun(#erlv8_fun_invocation{}, []) ->
|
||||||
{ok, TableList} = ggs_table:get_player_list(Table),
|
PlayerList = ggs_coordinator:get_all_players(),
|
||||||
integer_to_list(length(TableList))
|
integer_to_list(length(PlayerList))
|
||||||
end}
|
end}
|
||||||
%{"log", fun(#erlv8_fun_invocation{}, [Arg]) -> erlang:display(Arg) end }
|
%{"log", fun(#erlv8_fun_invocation{}, [Arg]) -> erlang:display(Arg) end }
|
||||||
%{"setTimeout", fund(#erlv8_fun_invocation{}, [Time, FunctionName])-> setTimeout(Time, FunctionName) end}
|
%{"setTimeout", fund(#erlv8_fun_invocation{}, [Time, FunctionName])-> setTimeout(Time, FunctionName) end}
|
||||||
|
|
Reference in a new issue