ClassiCube / MCGalaxy

A Minecraft Classic / ClassiCube server software
GNU General Public License v3.0
175 stars 83 forks source link

It is impossible to /send to an offline user whose username is a subset of another online user #556

Open xnotx123 opened 4 years ago

xnotx123 commented 4 years ago

More specifically, the subset must be shifted all the way to the right. Here's an example of something impossible to do: Online user: xnotx123+ Offline user: notx123+ Here's an example of something that is possible to do: Online user: xnotx123+ Offline user: notx12+

EDIT: same goes for /whowas

UnknownShadow200 commented 4 years ago

Changed /send to not treat online players specially.

However I am very reluctant to change the behaviour of /whowas with preferring online players (since it is not an actual command, just an alias of /info).

rdebath commented 3 years ago

I notice that the + pins the right hand end of the substring. How about having it magically pin the left end too.

Honestly, that's what I'd expect it to do anyway, with the + marking a full (but still case insensitive) name.

Goodlyay commented 3 years ago

A plus at the beginning of a name already has a different meaning in multiple commands. Also, the + pinning the right end is not really explicit behavior, it's just a side effect of all names ending with + if the server happens to be configured to use + on end of names. Given that, I don't think it's appropriate to make + at the start pin the left side

rdebath commented 3 years ago

Okay, though I suppose that raises the question as to why the server is configured to use a + on the end of names?

Goodlyay commented 3 years ago

ClassiCube began before Classic was shut down. Meaning that ClassiCube and Minecraft accounts could both play on the same server at once. A + at the end was necessary to differentiate them (Goodly - Minecraft account; Goodly+ - ClassiCube account).

rdebath commented 3 years ago

Um, that look's like the same usage to me.

The + was added to make the classicube accounts unique (from Minecraft accounts).

My suggestion is to use the + suffix to make classicube accounts unique (from each other too).

After your rejection, I was going to suggest that a different prefix/suffix be used eg: ^ like a regex anchor, but that seems a bit pointless as you'd have one affix to make the name distinct from Class B and a second affix to make it distinct from both Class A and Class B.

BTW: I didn't mean that a + should be added as a prefix, but that the suffix should label the name as a complete (Classicube) name. And this rolls back round to the idea that I think this is what the users are assuming happens anyway. For example OP and I.

Goodlyay commented 3 years ago

You're right, I misunderstood. I thought you meant you should be able to add a + at the start.

So now the problem is that you would have to do something like goodlyay++ to mark a complete classicube username and goodlyay+ to mark a complete minecraft username, which is just weird and ugly. Not to mention goodlyay+ looks like it should be a classicube username (and currently acts that way, changing the behavior would be confusing).

My entire point is that + shouldn't be used because it already has a different meaning in multiple scenarios (as part of a name, or part of the syntax for /perbuild and /pervisit).

A better solution would be to surround the name with quotes if you want it to be an exact match. /whois "goodlyay" (minecraft account) /whois "goodlyay+" (classicube account)

This would solve the issue where it's impossible to look up my Minecraft account info while my ClassiCube account is online. (And the OP's issue as well)

rdebath commented 3 years ago

The quotes would work. Though, being from a Unix background I do feel that quoting should be strictly consistent across all commands.

Also, "Doh!", I should have added examples, specifically: /whois goodlyay -- Generic substring search /whois goodlyay+ -- Fixed string Classicube lookup /whois goodlyay@ -- Ignored/something else for fixed string Minecraft lookup as a Microsoft account is an Email address and doesn't need this.

Goodlyay commented 3 years ago

I don't understand your last example. "Microsoft account is an Email address and doesn't need this.". Minecraft.net accounts stored in ClassiCube servers are not marked with email addresses.

Again, I don't think plus should be used to mean anything more than it currently does because it's just part of the username. And won't make sense (or won't work?) when searching for a Minecraft account or a ClassiCube account on a server that is not configured to use + on end of names

rdebath commented 3 years ago

Okay, I don't know how much Microsoft have or haven't changed since classic as I haven't found the source to your authentication server.

Quotes will work fine.