Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   player.communityname (https://forums.graalonline.com/forums/showthread.php?t=134260715)

xXziroXx 10-04-2010 07:03 AM

player.communityname
 
This is the most major bug that makes people on servers not work with community names at all, and I don't think it would be too hard for Stefan to do something about it.

On accounts that hasn't chosen a community name for their account yet, player.communityname equals "". Could it be made so that in those instances, it instead equals player.account (which would be Graal######)?

Examples:

PHP Code:

Account Type: [account name][community name]
---------------------------------------------
Lifetime Classic account: [xXziroXx][xXziroXx]

Gold account with defined community name: [Graal766206][MaloriaDev1]

Guest: [pc:4419][guest]

Trial account without defined community name: [Graal766276][]

Gold account without defined community name: [Graal766276][] 

As you can see, the result speaks for itself.

iSlayer 10-04-2010 07:06 AM

How is it a bug

MrDumbledore 10-04-2010 07:16 AM

Also, guests shouldn't have the "guest" community name. They need some kind of unique identifier that is also player-friendly.

xXziroXx 10-04-2010 07:17 AM

Quote:

Originally Posted by iSlayer (Post 1604039)
How is it a bug

Because doing findPlayerByCommunityName("") wouldn't work for accounts that doesn't have one defined.

The most common workaround for servers right now is to use a custom community name string, like...

NPC Code:
client.communityName = (player.communityname == "" ? player.account : player.communityname);


Tigairius 10-04-2010 08:02 AM

Yes, it would be nice if player.communityname returned the account name if no communityname is set. I know this has always been a big hassle with using player.communityname.

xXziroXx 10-04-2010 08:08 AM

Quote:

Originally Posted by MrDumbledore (Post 1604040)
Also, guests shouldn't have the "guest" community name. They need some kind of unique identifier that is also player-friendly.

I agree with this. I haven't tried it, but imagine trying to use findPlayerByCommunityName("guest") on a server with 10+ guests online?

Admins 10-11-2010 06:16 PM

Use account name for identification and nick name (or community name) for displaying.

fowlplay4 10-11-2010 07:05 PM

Quote:

Originally Posted by Stefan (Post 1605581)
Use account name for identification and nick name (or community name) for displaying.

We do... It's the inconsistencies that are the problem (clearly labeled in the original post), and here's one simple way to fix that.

1. Force new players (without a community name) to pick a community name off the bat (first client login).

a. Allows players to be more memorable within the community.
b. Fixes the issue with player.communityname equaling ""

2. Guest (pc:######) accounts should community name should default to something like Guest######.

The way it's setup right now makes us jump unnecessary hoops when a presentable default identifier could easily be provided without having to use a hack like this:

PHP Code:

public function getProperName() {
  if (
player.account.starts("pc:")) {
    return 
"Guest" player.substring(3);
  }
  return (
player.communityname player.communityname player.account);




All times are GMT +2. The time now is 02:10 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.