mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 13:27:15 +00:00
Fix toon names being allowed with lower case starting char
This commit is contained in:
@@ -3,6 +3,7 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
== 09/19/2014 ==
|
||||
demonstar55: Added Client::Tell_StringID (used in tell queue messages)
|
||||
demonstar55: Tell queues (and offline) messages now show correctly
|
||||
demonstar55: Fix starting with capital check
|
||||
|
||||
== 09/18/2014==
|
||||
demonstar55: Implement tell queues
|
||||
|
||||
+8
-14
@@ -471,8 +471,8 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Client::HandleNameApprovalPacket(const EQApplicationPacket *app) {
|
||||
|
||||
bool Client::HandleNameApprovalPacket(const EQApplicationPacket *app)
|
||||
{
|
||||
if (GetAccountID() == 0) {
|
||||
clog(WORLD__CLIENT_ERR,"Name approval request with no logged in account");
|
||||
return false;
|
||||
@@ -490,27 +490,21 @@ bool Client::HandleNameApprovalPacket(const EQApplicationPacket *app) {
|
||||
outapp->pBuffer = new uchar[1];
|
||||
outapp->size = 1;
|
||||
|
||||
bool valid;
|
||||
if(!database.CheckNameFilter(char_name)) {
|
||||
bool valid = false;
|
||||
if (!database.CheckNameFilter(char_name))
|
||||
valid = false;
|
||||
}
|
||||
else if(char_name[0] < 'A' && char_name[0] > 'Z') {
|
||||
else if (islower(char_name[0]))
|
||||
//name must begin with an upper-case letter.
|
||||
valid = false;
|
||||
}
|
||||
else if (database.ReserveName(GetAccountID(), char_name)) {
|
||||
else if (database.ReserveName(GetAccountID(), char_name))
|
||||
valid = true;
|
||||
}
|
||||
else {
|
||||
valid = false;
|
||||
}
|
||||
|
||||
outapp->pBuffer[0] = valid ? 1 : 0;
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
|
||||
if(!valid) {
|
||||
if (!valid)
|
||||
memset(char_name, 0, sizeof(char_name));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user