anchor.diff:  	end;
   
   handle_call( { leave, Id }, _From, Room = #room{ users = Users }) ->
  -	{ reply, ok, Room#room{ users = lists:delete(Id,Users) }};
  +	{ reply, ok, Room#room{ users = users:delete(Id,Users) }};
   
   handle_call( { ban, Id }, _From, Room = #room{ users = Users, bans = Bans }) ->
   	{ reply, ok, Room#room{ 
   		users = lists:delete(Id,Users),
   		bans = [ Id | Bans ] }};
   
  -handle_call( { announce, Id }, _From, Room = #room{ users = Users }) ->
  +handle_call( { unban, Id }, _From, Room = #room{ bans = Bans }) ->
  +	{ reply, ok, Room#room{ bans = lists:delete(Id,Bans) }};
  +
  +handle_call( { peer, Peer = #peer{} }, _From, Room = #room{ peers = Peers }) ->
  +	{ reply, ok, Room#room{ peers = [ Peer | Peers ] }};
  +
  +handle_call( { message, #user{ ipaddr = IPAddr, port = Port }, Message }, _From, Room = #room{ socket = Socket }) ->
  +	gen_udp:send(Socket,IPAddr,Port,Message),
   	{ reply, ok, Room };
   
  -handle_call( { message, Id, Message }, _From, Room = #room{ users = Users }) ->
  +handle_call( { broadcast, Message }, _From, Room = #room{ 
  +	users = Users, peers = Peers, socket = Socket }) ->
  +	[ broadcast(Socket,U,Message) || U <- Users ],
  +	[ relay(Socket,P,Message) || P <- Peers ],
   	{ reply, ok, Room };
   
  -handle_call( { broadcast, Message }, _From, Room = #room{ users = Users }) ->
  -	{ reply, ok, Room };
  +handle_call( users, _From, Room = #room{ users = Users }) ->
  +	{ reply, { ok, Users }, Room };
   
  -handle_call( list, _From, Room = #room{ users = Users }) ->
  -	{ reply, ok, Room };
  +handle_call( bans, _From, Room = #room{ bans = Bans }) ->
  +	{ reply, { ok, Bans }, Room };
   
  -handle_call( close, _From, Room ) ->
  -	{ reply, ok, Room };
  +handle_call( peers, _From, Room = #room{ peers = Peers }) ->
  +	{ reply, { ok, Peers }, Room };
  +
  +handle_call( close, _From, Room = #room{ socket = Socket }) ->
  +	gen_udp:close(Socket),
  +	{ reply, { stop, ok }, Room };
   
   handle_call( _Message, _From, Room ) ->
   	{ reply, ok, Room }.
  
positive.code: handle_cast( _Message, Room ) ->
  	{ noreply, Room }.
  
  handle_info( _Message, Room ) ->
  	{ noreply, Room }.
  
  terminate(Reason, Room = #room{ name = Name } ) ->
  	io:format("Shutting down ~p because ~p~n", [ Name, Reason ]),
  	ok.
  
  
negative.code: 	{ ok, Room }.	
  
  
  broadcast(Socket, #user{ ipaddr = IPAddr, port = Port }, Message ) ->
  	gen_udp:send(Socket,IPAddr,Port,Message).
  
  relay(Socket, #peer{ ipaddr = IPAddr, port = Port }, Message ) ->
  	gen_udp:send(Socket,IPAddr,Port,Message).
  
  member(IPAddr,Port,Users) ->
  	[] /= lists:filtermap( fun(#user{ ipaddr = I, port = P }) -> 
  		(I =:= IPAddr) and (P =:= Port) end, Users).
  	
  except(IPAddr,Port,Users) ->
  	lists:filtermap( fun(#user{ ipaddr = I, port = P }) ->
  		(I /= IPAddr) or (P /= Port) end, Users ).
  