Commit Graph

309 Commits

Author SHA1 Message Date
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Spp
e954498560 Core/Misc: Random changes here and there to minimize differences with 4.3.4 branch 2012-11-27 13:03:12 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Vincent-Michael
ea60648c88 Core: Fix typo 2012-11-24 00:25:56 +01:00
Spp
26006551e2 Fix wrong replacement in 32c259b1ce (Fixes a minor error msg) 2012-11-23 12:30:11 +01:00
Spp
b1ec4b61ac Fix error in 32c259b1ce (broken chat) 2012-11-23 01:03:46 +01:00
Spp
32c259b1ce Core/Channels: Remove unnecessary calls to FindPlayer wherever is possible
- Add better opcode debug messages
- Move isValidChatMessage debug messages to trace
2012-11-22 12:11:35 +01:00
Spp
b99c347747 Core: Remove Player.h dependency from all the possible headers 2012-11-17 05:18:37 +01:00
leak
6bf9cb56a9 Core/Chat: Prevent client crashes with invalid chat language and message type combinations
Fixes #8083
2012-11-01 20:04:35 +01:00
Spp
9fbc4c0ae2 Core/Misc: reduced amount of string memory allocations (Step II) 2012-10-24 15:34:48 +02:00
Spp
013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02:00
Spp
f8846cdeaf Core/Utilities: Do not expose internal store structure in Tokens and rename it to Tokenizer 2012-10-02 11:54:41 +02:00
Spp
358c6a26d6 Core: Warning fixes (Also some -pedantic under game folder) 2012-09-10 13:04:31 +02:00
Nay
e3d9768a50 Core: Fix many "errors"/warnings and coding style (3)
Game

Errors were found using Cppcheck, open-source static analysis tool
2012-08-30 22:44:33 +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
Vincent-Michael
4a3df36bd9 Core/Commands: Convert more misc commands in commandscript 2012-07-29 15:03:26 +02:00
Vincent-Michael
6f69a3326d Convert misc commands in commandscript 2012-07-29 01:23:51 +02:00
Vincent-Michael
a9812a0860 Core/Commands: Convert ticket commands in commandscript 2012-07-15 22:20:22 +02:00
Vincent-Michael
9e84942917 Core/Commands: Convert ban / unban / baninfo / banlist commands in commandscript 2012-07-14 13:37:57 +02:00
Vincent-Michael
91cd7109e4 Core/Commands: Convert lookup commands in commandscript 2012-07-06 21:38:18 +02:00
Vincent-Michael
f8374fac0b Core/Commands: Convert guild commands in commandscript 2012-07-02 21:57:50 +02:00
Vincent-Michael
5de44b3632 Core/Commands: Convert reset commands in commandscript 2012-06-21 23:41:03 +02:00
Vincent-Michael
d3bf4626d0 Core/Commands: Convert list commands in commandscript 2012-06-21 17:21:23 +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
Vincent-Michael
c19f13e6fc Core/Commands: Convert cast commands in commandscript 2012-06-19 20:42:11 +02:00
Vincent-Michael
0e8889415d Core/Chat: Convert instance commands in commandscript 2012-06-14 17:33:46 +02:00
4m1g0
985e8cdcd3 Core/Commands: Fixed lookup quest command to show [rewarded] mark on rewarded quests 2012-06-03 06:13:28 +02:00
Shocker
83e1e17649 Merge pull request #6008 from cookta2012/troy09
Core/Commands: Some porting and organizing

Moving a commands around eliminating a unnecessary file, and porting the "demorph" command
 * moved the "wpgps" command into the cs_debug.cpp because it seems more fitting
 * organized the "modify speed" commands into a table of their own
 * moved the "gps" command into the cs_misc.cpp
2012-04-23 17:21:42 -07:00
Machiavelli
74b5b3bd8e Core/Commands: Remove recently defunct .hover command. All this spell did before hoverheight changes was .cast/.unaura spell 11010. And since we do not have .autoattack, .steadyshot, .heroicstrike, .shootwand etc. either, there's no place for this command in the core (there never was). 2012-04-12 12:04:04 +02:00
faramir118
ccf50f4c3d dead code 2012-04-11 20:01:27 +02:00
faramir118
e3f198ca56 couple wrong return types 2012-04-11 19:58:12 +02:00
kaelima
3988e8ed96 Core/DBLayer: Correct a type in HandleUnFreezeCommand (lowguid) 2012-04-09 14:26:50 +02:00
Shauren
ae0a6cde21 Core/DBLayer: More type fixes. 2012-04-07 17:27:40 +02:00
cookta2012
7e793575be Moving a commands around eliminating a unnecessary file, and porting the "demorph" command
* moved the "wpgps" command into the cs_debug.cpp because it seems more fitting
* organized the "modify speed" commands into a table of their own
* moved the "gps" command into the cs_misc.cpp
2012-04-05 17:43:06 -05:00
Subv
2987d4f40d Core/Commands: Allow combatstop command to be used from console with the player name as parameter
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-04-01 11:03:47 -05:00
Nay
0b645a825d Core/DBLayer: More type fixes 2012-03-31 17:47:18 +01:00
Nay
91c7b5d2ca Core/DBLayer: Delete a triplicated prepared statement (LoginDatabase)
Thanks to Anubiss for spotting it
2012-03-31 15:48:40 +01:00
Gyx
360014856d Core/Game: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-29 13:42:04 +08:00
Gyx
72cdcbfced Core/Game: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-28 19:11:50 +08:00
kaelima
786c226b74 Core/CombatLog:
- Send more proper hitinfo values in SMSG_ATTACKERSTATEUPDATE (still lot of research todo)
- Some renaming and commenting

- Minor cleanup in Player::UpdateZone
2012-03-26 02:16:19 +02:00
leak
ffbee169f4 Core/DBLayer: Restore pinfo ban info output 2012-03-25 21:23:27 +02:00
click
cbcd4e6afb Core: Fix .pinfo handling of player level and securitylevel after recent cleanups (and clean up my last commit) 2012-03-24 22:59:23 +01:00
leak
5f9ca3b998 Core/DBLayer: C/P fix 2012-03-24 16:49:33 +01:00
Shauren
c8bf09d504 Core/DBLayer: Match field type reads in core with data types in db for prepared statements 2012-03-24 16:44:01 +01:00
leak
12e55a04bb Core/DBLayer: Convert PQuery() queries to prepared statements 2012-03-24 01:25:08 +01:00
Spp
0fe4580fe0 Core/Commands: Add support for ip2nation database lookups when using .pinfo command.
This will (when a full database exists) allow for seeing (approximately) which country a player might be from when doing .pinfo <player>
Note: External data required for this patch to work correctly can be found at http://www.ip2nation.com/ip2nation/Download

Signed-off-by: click <click@gonnamakeyou.com>
2012-03-23 05:35:32 +01:00
Gyx
1e94ab8d51 Core/Game: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-17 20:13:37 +08:00
Subv
2c23fdf912 Core/Channels: Players should not be able to invite non-visible GMs to channels
closes #5467
2012-02-27 17:50:21 -05:00
Shauren
5c00e93602 Core/Commands: Added lost group commands 2012-02-25 16:56:25 +01:00
click
5411e1ce52 Core: Clean up whitespace and tabs in the base sourcetree 2012-02-18 16:52:08 +01:00