Commit Graph

71 Commits

Author SHA1 Message Date
Treeston
378691aaa2 [3.3.5] Core/ChatCommands: Show error messages from argument parsers (PR #25443)
(cherry picked from commit 75f9e7396e)
2022-02-05 23:42:15 +01:00
Max Drosdo.www
1b605eb5b0 Worldserver/CLI: console printf fix (#24802)
* Remove extra cli printf call for non-Windows systems

* Codestyle changes

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 1e9c84a3ea)
2022-01-06 22:10:03 +01:00
Shauren
a9018d1609 Core/CLI: Fixed utf-8 console input on windows
(cherry picked from commit 901af6546b)
2021-11-21 15:03:48 +01:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Shauren
b8db320bf1 Core/Misc: Prefix all preprocessor defines from CompilerDefs with TRINITY_ to avoid conflicts (PLATFORM_WINDOWS is used/defined by CascLib) 2017-03-04 18:46:18 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Shauren
2d942ddcc5 Core/Commands: Refactored chat command script hook, fixes a crash when building with gcc 5
Closes #15616
Closes #15740
2015-10-22 20:26:56 +02:00
Vincent-Michael
ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
leak
33dc72a812 Replaced Threading and SFMT access related code with std::thread and boost TSS
Note: The remote access thread is currently broken due to unknown ACE fail (will be replaced at some point anyways..)
2014-06-21 19:39:16 +02:00
Dehravor
24ae6a6802 Core/Misc: Remove obsolete C++11 backward compatibility macros
OVERRIDE, FINAL, DELETE_MEMBER
2014-04-29 16:35:11 +02:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Spp
94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
jackpoz
5eff0b62ae Core/Command Line: Fix memory leak
Fix memory leak in command line handler on platforms other than Windows. The result of readline() is supposed to be freed with free() as described at http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC24 .

Valgrind log:
 11 bytes in 2 blocks are definitely lost in loss record 6 of 61
  at 0x4C28BED: malloc (vg_replace_malloc.c:263)
  by 0x4E5F6E8: xmalloc (in /lib/x86_64-linux-gnu/libreadline.so.6.2)
  by 0x4E4571A: readline_internal_teardown (in /lib/x86_64-linux-gnu/libreadline.so.6.2)
  by 0x4E46541: readline (in /lib/x86_64-linux-gnu/libreadline.so.6.2)
  by 0x1005284: CliRunnable::run() (CliRunnable.cpp:161)
  by 0x163A3DA: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
  by 0x518C555: ACE_OS_Thread_Adapter::invoke() (OS_Thread_Adapter.cpp:103)
  by 0x61D7B4F: start_thread (pthread_create.c:304)
  by 0x6C66A7C: clone (clone.S:112)
2013-09-04 21:55:10 +02:00
Nay
f71d894a21 Servers: Fix some code style issues in world and authserver 2013-07-28 16:59:07 +01:00
Shauren
779a59e7e2 Core/Config: Refactored ConfigMgr
* Loading initial configuration files is now separate from loading any additional custom configs
2013-07-15 17:31:44 +02:00
Spp
d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Spp
55ce180f28 Core/Logging: Add Asyncronous logging with Loggers ("What to log") and Appenders ("Where to log") system. Will allow to select to full log some parts of core while others are not even logged.
- Logging System is asyncronous to improve performance.
- Each msg and Logger has a Log Type and Log Level assigned. Each msg is assigned the Logger of same Log Type or "root" Logger is selected if there is no Logger configured for the given Log Type
- Loggers have a list of Appenders to send the msg to. The Msg in the Logger is not sent to Appenders if the msg LogLevel is lower than Logger LogLevel.
- There are three (at the moment) types of Appenders: Console, File or DB (this is WIP, not working ATM). Msg is not written to the resource if msg LogLevel is lower than Appender LogLevel.
- Appender and Console Log levels can be changed while server is active with command '.set loglevel (a/l) name level'

Explanation of use with Sample config:

Appender.Console.Type=1       (1 = Console)
Appender.Console.Level=2      (2 = Debug)

Appender.Server.Type=2        (2 = File)
Appender.Server.Level=3       (3 = Info)
Appender.Server.File=Server.log

Appender.SQL.Type=2           (2 = File)
Appender.SQL.Level=1          (1 = Trace)
Appender.SQL.File=sql.log

Appenders=Console Server      (NOTE: SQL has not been included here... that will make core ignore the config for "SQL" as it's not in this list)

Logger.root.Type=0            (0 = Default - if it's not created by config, server will create it with LogLevel = DISABLED)
Logger.root.Level=5           (5 = Error)
Logger.root.Appenders=Console

Logger.SQL.Type=26            (26 = SQL)
Logger.SQL.Level=3            (2 = Debug)
Logger.SQL.Appenders=Console Server SQL

Logger.SomeRandomName.Type=24 (24 = Guild)
Logger.SomeRandomName.Level=5 (5 = Error)
Loggers=root SQL SomeRandomName

* At loading Appender SQL will be ignored, as it's not present on "Appenders"

* sLog->outDebug(LOG_FILTER_GUILD, "Some log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomName is found but it's LogLevel = 5 and Msg LogLevel=2... Msg is not logged

* sLog->outError(LOG_FILTER_GUILD, "Some error log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomeName is found with proper LogLevel but Logger does not have any Appenders assigned to that logger... Msg is not logged

* sLog->outDebug(LOG_FILTER_SQL, "Some msg related to SQLs")
  - Msg is sent to Logger SQL (matches type), as it matches LogLevel the msg is sent to Appenders Console, Server and SQL
    - Appender Console has lower Log Level: Msg is logged to Console
    - Appender Server has higher Log Level: Msg is not logged to file
    - Appender SQL has lower Log Level: Msg is logged to file sql.log

* sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Some msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). As Logger has higher LogLevel msg is not sent to any appender

* sLog->outError(LOG_FILTER_BATTLEGROUND, "Some error msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). Msg has lower LogLevel and is sent to Appender Console
    - Appender Console has lower LogLevel: Msg is logged to Console
2012-08-03 14:20:18 +02:00
Xees
a312cd4ba1 Scripts/Commands: Convert character and server commands to commandscript
Closes #6856

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-06-21 00:11:11 +01:00
Shauren
d9451cedd8 Core/World: Add character name data after loading PlayerDump
Closes #3653

Note: Manual changes in database while the server is running are not advised thus not supported
2012-04-03 00:02:58 +02:00
leak
12e55a04bb Core/DBLayer: Convert PQuery() queries to prepared statements 2012-03-24 01:25:08 +01:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
leak
8adac3f246 Core/DBLayer: Convert PExecute() queries to prepared statements No. 3 2011-12-31 00:32:05 +01:00
Spp
d59c5e627f Fix warnings 2011-12-15 11:12:15 +01:00
Spp
e3f8588a22 Minor changes here and there:
- Cosmetic changes
- 'Engrish fix'
- Initialization of some vars
- Remove some not needed includes
2011-10-18 14:59:23 +02:00
Spp
b16d2245bb Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
Spp
be12603150 Configuration/ConfigMgr: converted from singleton to namespace with free functions. 2011-09-28 13:00:43 +02:00
Spp
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
Spp-
eddcb8ffbf AccountMgr singleton converted to namespace with free functions as it has no internal state 2011-09-08 10:49:58 +02:00
Machiavelli
3d56bd5eb8 Core/CLI: Fix a possible crash in utf8print on linux. (Remove parsing non-existent va_args) 2011-07-29 15:02:22 +02:00
Spp-
b2a84d9f1e Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons) 2011-07-27 12:14:27 +02:00
click
f16df538ee Core: More codestyle cleanups 2011-06-12 01:47:45 +02:00
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
Shauren
9710c41a40 More warning fixes 2011-03-08 19:11:02 +01:00
Shauren
ca0adc6a75 Core/CLI: Use proper define in platform checks 2011-03-08 17:44:28 +01:00
leak
a7df9ddff1 SQL: Characters db storage type cleanup No. 4 2011-01-19 22:46:21 +01:00
Machiavelli
957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Shauren
928443d899 Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
2010-12-23 23:25:44 +01:00
Shauren
0f3b9019a8 Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG--
branch : trunk
2010-12-22 21:25:23 +01:00
click
67fade84d3 Core/Commands: Enable SQL query logging by config and command )patch by leak)
Closes issue 4853.

--HG--
branch : trunk
2010-11-19 13:13:07 +01:00
click
e22426c7c0 Core/Scripts: Reinstate commandscripts, now with extra bling and working commands (and yes, we did test it thoroughly this time)
Thanks to Paradox for sorting the commandscripts and chanhandlers out to work as they were intentionally ment to be like.

--HG--
branch : trunk
2010-11-12 20:47:03 +01:00
click
03e4ecfbfd Core: Partial revert of rcb3188281e, rc85b35f076, r97f9a0fa3e due to missing loader implementation.
(files disabled but kept in repo, and will be fully reinstated once everything is sorted out)
Note: SQL-update-data is NOT supplied for 're-converting' to old help-system - this is after all considered a workrepo untill we tag a commit as stable!

--HG--
branch : trunk
2010-11-10 05:22:27 +01:00
Paradox
de1798e4ac Core/Scripts Part 1 of moving all commands to commandscripts
closes issue 4669
(first 5 patches rolled into 1)
Patch by Paradox

--HG--
branch : trunk
2010-11-09 10:15:35 -05:00