mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[10331] More basic chat command parsing functions and its uses.
* Commands .debug update and .modify bit removed as redundent * Command .debug getvalue now can output values in float/int/hex/bitstring formats * Command .debug setvalue now ca accept values in int/float/hex/bitstring formats * Command .debug mod32value renamed to modvaue and can add int/float or apply hex mask (in 3 modes: |= &= &=~ ) to value in update field * Command .debug moditemvalue added similar .debug modvalue for item case. * Command .npc set movetype now propertly update spawned in world creature state. * Command .modify spell renamed to .debug spellmods and restored to working state. * Commands .account password and .account set password now allow use quoted strings for passwords and then now possible set from chat/console passwords with white spaces. * Many commands converted to new functions without modify functionality except better error detection in some cases at wrong command syntax use. * Also fixed warnings in reload commands after prev. chat commit. Thanks to SkirnirMaNGOS for reporting.
This commit is contained in:
parent
fefd648d3e
commit
59e672f1bc
17 changed files with 906 additions and 814 deletions
|
|
@ -1649,15 +1649,14 @@ void World::KickAllLess(AccountTypes sec)
|
|||
itr->second->KickPlayer();
|
||||
}
|
||||
|
||||
/// Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban
|
||||
BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, std::string duration, std::string reason, std::string author)
|
||||
/// Ban an account or ban an IP address, duration_secs if it is positive used, otherwise permban
|
||||
BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, uint32 duration_secs, std::string reason, std::string author)
|
||||
{
|
||||
LoginDatabase.escape_string(nameOrIP);
|
||||
LoginDatabase.escape_string(reason);
|
||||
std::string safe_author=author;
|
||||
LoginDatabase.escape_string(safe_author);
|
||||
|
||||
uint32 duration_secs = TimeStringToSecs(duration);
|
||||
QueryResult *resultAccounts = NULL; //used for kicking
|
||||
|
||||
///- Update the database with ban information
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue