Browse Source

Merge branch 'proto' into server again

server
Thomas Johnson 2 years ago
parent
commit
f83b1d2987
  1. 4
      proto/ProtoOut.java

4
proto/ProtoOut.java

@ -76,11 +76,11 @@ public class ProtoOut
commit(); // Make it so!
}
synchronized public void giveUserListing(String username, String names[]) throws IOException
synchronized public void giveUserListing(String username, ArrayList<String> names) throws IOException
{
out.writeByte(ProtoID.LISTING.b);
// I can recognize bad code when I write it, and this is bad code.
out.writeInt(Arrays.asList(names).stream().collect(Collectors.summingInt((s) -> s.getBytes().length)));
out.writeInt(names.stream().collect(Collectors.summingInt((s) -> s.getBytes().length)));
writeUserName(username);
for (String n : names)
{

Loading…
Cancel
Save