Changeset 94 for trunk/src/game/Level3.cpp
- Timestamp:
- 11/19/08 13:34:57 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Level3.cpp
r85 r94 4825 4825 } 4826 4826 4827 loginDatabase.escape_string(nameOrIP); 4828 QueryResult *result = CharacterDatabase.PQuery("SELECT account FROM characters WHERE name = '%s'", nameOrIP.c_str()); 4829 if (!result) 4827 accountid = objmgr.GetPlayerAccountIdByPlayerName (nameOrIP); 4828 if (!accountid) 4830 4829 { 4831 4830 PSendSysMessage(LANG_BANINFO_NOCHARACTER); 4832 4831 return true; 4833 4832 } 4834 fields = result->Fetch(); 4835 accountid = fields[0].GetUInt32(); 4836 delete result; 4837 result = loginDatabase.PQuery("SELECT username FROM account WHERE id = '%u'", accountid); 4838 if (!result) 4833 4834 if (!accmgr.GetName (accountid,accountname)) 4839 4835 { 4840 4836 PSendSysMessage(LANG_BANINFO_NOCHARACTER); 4841 4837 return true; 4842 4838 } 4843 fields = result->Fetch();4844 accountname = fields[0].GetCppString();4845 delete result;4846 4839 } 4847 4840 else