This can affect correct result in cases big guid values
(out of range for possitive part of int32 range) at x86 platforms.
Some other cases addded in addition to original patch fixes
where %d wrongly/unsafe used for unsigned values.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* 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.
We in any case modify args string content at parsing in commands,
so cast it to char* early. This let avoid lot later casts.
Some other code style exist in related code.
* Use single command search function with recursion and reuse it in now more simple
and consistent for execute/help/loading
* Add intergiry checks for hardcoded part of commands list. Fix some cases base at it.
* Fixed diff small problems in past code:
- in console single symbol commands rejected (without dot start)
- .help not output propertly subcommands list for not found subcommand
- some other...
* Use ACE_RW_Thread_Mutex, since there's much more reading than writing.
* Use read lock in Find(), and write lock in Insert() and Remove().
* Correctly lock the hashmap on outside calls.
* Now at login by RA-connection RA-connection use account id/access level
for commands execute. So at login with moderator access by RA-connection you
can execute only moderator level commands. For administrator level accounts
allowed execute only console level commands if new config option RA.Stricted = 0.
For security reasons by default RA.Stricted = 1.
* RA-connection executed commands now logged for associalted account id
* Some own account related commands allowed execute in RA-connection
NOTE: config version updated because RA.Stricted = 1 not compatible with old
way work and this can break tools thta use RA-access if it not disabled.
Yuo will need update mangosd.conf.
all warnings from Wunused
and some from Wall
cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code
for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint
also note for coding:
if you do something like
if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)
Signed-off-by: balrok <der-coole-carl@gmx.net>
* GM.InGMList replaced by GM.InGMList.Level with default value 3 (visible any gm levels)
* GM.InWhoList replaced by GM.InWhoList.Level with default value 3 (visible any gm levels)
Update mangosd.conf if used non default value for old GM.InGMList and GM.InWhoList
* Changed genrevision to use * instead of unknown when some info can not be found
* Added the git_id tool which is used to generate changes to revision_nr.h and the commit message
Including fix _SCallback for 3 params, triggred mode correct call for .cast back and .cast target.
Remove outdated code for support old 19421 (and ranks) implementation in client data.
Also svn_revision.h renmaed to revision.h and defines in to it also renamed. MaNGOS code updated.
Other projects using this genrevison tool need to be updated in similar way.
gvnrevision still support svn version generation and have addition options now (see sources).
gensvnrevision/svn_revision.h and other svn reference will fixed later.
Now version strings include commit date/time that can be used in git case for fast find git commit without using git hash most time.
In chat ".server info" output git hash can be copied by shift-click in chat and then copied to cliboard if need.
slit ban/baninfi/banlist/unban commands to subcommands (this allow write not full subcomand string ".ban acc ...".
Fixed crash at unexpected use .account in console.
Fixed hide .gm on by .gm online (renamed to .gm ingame)