moved stats to protocol for message
This commit is contained in:
parent
cae2b51056
commit
28ef543265
2 changed files with 2 additions and 1 deletions
|
@ -111,7 +111,6 @@ handle_cast({srv_cmd, "define", _Headers, Data}, #state { table = Table } = Stat
|
|||
{noreply, State};
|
||||
|
||||
handle_cast({game_cmd, Command, _Headers, Data}, #state { table = Table } = State) ->
|
||||
ggs_stats:message(),
|
||||
ggs_table:notify(Table, self(), {game, Command, Data}),
|
||||
{noreply, State};
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ create_message({Command, Data}) ->
|
|||
%% Assemble a message which can b
|
||||
%e used as a reply to a client
|
||||
create_message(Cmd, Enc, Acc, Data) ->
|
||||
ggs_stats:message(),
|
||||
Length = integer_to_list(string:len(Data)),
|
||||
Msg = "Client-Command: " ++ Cmd ++ "\n" ++
|
||||
"Client-Encoding: " ++ Enc ++ "\n" ++
|
||||
|
@ -109,6 +110,7 @@ code_change(_OldVsn, State, _Extra) ->
|
|||
|
||||
|
||||
prettify(Args, Data) ->
|
||||
ggs_stats:message(),
|
||||
case lists:keyfind("Server-Command", 1, Args) of
|
||||
{_, Value} ->
|
||||
{srv_cmd, Value, Args, Data};
|
||||
|
|
Reference in a new issue