anchor.diff:  		{ok, CSocket} ->
   			ssl:ssl_accept(CSocket),
   			try
  -				log(0, "hello (new connection)"),
   				egs_proto:packet_send(CSocket, << 16#02020300:32, 0:352 >>),
   				Pid = spawn_link(?MODULE, process, [CSocket, 0]),
   				ssl:controlling_process(CSocket, Pid)
  
positive.code: 
  handle(16#0d04, CSocket, GID, _, Orig) ->
  	<< _:352, Flag:128/bits, A:16/bits, _:8, B/bits >> = Orig,
  	log(GID, io_lib:format("flag handler for ~s", [re:replace(Flag, "\\0+", "", [global, {return, binary}])])),
  	Packet = << 16#0d040300:32, 0:160, 16#00011300:32, GID:32/little-unsigned-integer, 0:64, Flag/binary, A/binary, 1, B/binary >>,
  	egs_proto:packet_send(CSocket, Packet);
  
  
negative.code: 		User ->
  			case User#users.auth of
  				Auth ->
  					log(GID, "auth success"),
  					LID = 1 + egs_db:next(lobby) rem 1023,
  					Time = calendar:datetime_to_gregorian_seconds(calendar:universal_time()),
  					egs_db:users_insert(#users{gid=GID, pid=self(), socket=CSocket, auth=success, time=Time, folder=User#users.folder, lid=LID}),
  					egs_proto:send_flags(CSocket, GID),
  					?MODULE:char_select(CSocket, GID, Version);
  				_ ->
  					log(GID, "quit, auth failed"),
  					egs_db:users_delete(GID),
  					ssl:close(CSocket)
  			end
  