[FIXED] /Worlds populated

Fixed bugs, solved problems, and old reports.
Locked
Jonty800
Offline
Posts: 280
Joined: August 21st, 2011, 6:31 am
Location: United Kingdom
Contact:

[FIXED] /Worlds populated

Post by Jonty800 »

I noticed that /worlds populated lists all worlds that are loaded, but surely this will mean that if the main world is empty, it will still be listed? I noticed this and changed it to: if (world.Players.Count > 0)

I also noticed quite a while back that in /help mark it says "/Mark X Y H".

H is like.... soooooooo last branch xD
You cannot use certain BBCodes: [img].

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: /Worlds populated

Post by fragmer »

If you use...

Code: Select all

.Where( w => w.Count > 0 )
...then you will be revealing worlds that have hidden players online. To be safe, I recommend doing...

Code: Select all

.Where( w => w.Players.Any( player.CanSee ) )
fCraft already uses this method for "/worlds populated" since 0.611 (r1277+).

I fixed "/Help Mark" in 0.700 (r1340), thank you for catching it.

Jonty800
Offline
Posts: 280
Joined: August 21st, 2011, 6:31 am
Location: United Kingdom
Contact:

Re: /Worlds populated

Post by Jonty800 »

Oh, facepalm, I forgot about hidden players thanks!

Is there a way I can see a long list of all your commits? Cia only shows me the last 20 or something.
You cannot use certain BBCodes: [img].

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: /Worlds populated

Post by fragmer »

Use an SVN client to see the complete revision log.

Locked