Browse Source

online users

Maxim Sokhatsky 11 years ago
parent
commit
88ab62ff39
1 changed files with 2 additions and 0 deletions
  1. 2 0
      apps/server/src/game_manager.erl

+ 2 - 0
apps/server/src/game_manager.erl

@@ -12,6 +12,8 @@
 -include_lib("db/include/scoring.hrl").
 -include_lib("db/include/scoring.hrl").
 -record(state, { game_tavla = 0, game_okey = 0 }).
 -record(state, { game_tavla = 0, game_okey = 0 }).
 
 
+online() -> [X||X<-qlc:e(gproc:table()),element(1,X)=={p,l,broadcast}].
+
 destroy_game(Pid,Sup) -> game_sup:stop_game(Sup,Pid).
 destroy_game(Pid,Sup) -> game_sup:stop_game(Sup,Pid).
 
 
 gen_game_id() ->
 gen_game_id() ->