summaryrefslogtreecommitdiff
path: root/src/map/log.c
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-13 01:19:04 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-13 01:19:04 +0000
commit526217d77d50dc27b0815e3d5895df7bfa38ff76 (patch)
tree9fb6152ef59b7d08e7f226fbdc47eb6ba9617cc6 /src/map/log.c
parent87469dc59de62990878ce6ccd29769ebd5b7d675 (diff)
downloadhercules-526217d77d50dc27b0815e3d5895df7bfa38ff76.tar.gz
hercules-526217d77d50dc27b0815e3d5895df7bfa38ff76.tar.bz2
hercules-526217d77d50dc27b0815e3d5895df7bfa38ff76.tar.xz
hercules-526217d77d50dc27b0815e3d5895df7bfa38ff76.zip
- Added `libconfig` (configuration file library: http://www.hyperrealm.com/libconfig/):
- Updated VS9/10 project files. - Updated `configure` & `Makefile`s. - New GM, Commands & Permissions system: - '''This is a backwards compatibility breaking update''', please read tid:58877 - Replaced GM levels with Player Groups. - Commands permissions & other privileges now depend on group, not GM level. - `@help` command improvements: requires "commandname" param and shows more detailed info about commands. - Modified GM whisper system to deliver messages basing on permissions, not GM level. - Remote trade request is now possible only if player is allowed to use `@trade` command as well. - Added a proper permission to use `/changemaptype` command. - `clif_displaymessage` is now capable of displaying multiline messages. - All `ACMD_FUNC`s are static now, and the only way to invoke them is with `is_atcommand()`; all client commands (starting with `/`) are now translated into corresponding atcommands (with exception of `/kick` used on monster, as there is no atcommand to kill single monster). - Removed nonsense "bot check" triggering when player blocked (`/ex`) Server. - Merged `@monster`, `@monsterbig` and `@monstersmall`. - Improved flow of atcommand execution to avoid revealing info about online players or existing commands to non-privileged players. - Merged `atcommand` and `charcommand` script functions (`charcommand` is aliased to `atcommand`). - Fixed `atcommand` script function reading unknown memory area (possible access violation). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15572 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/log.c')
-rw-r--r--src/map/log.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/map/log.c b/src/map/log.c
index 7823b5e02..4d4fa166a 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -282,12 +282,13 @@ void log_mvpdrop(struct map_session_data* sd, int monster_id, int* log_mvp)
}
-/// logs used GM commands
-void log_atcommand(struct map_session_data* sd, int cmdlvl, const char* message)
+/// logs used atcommands
+void log_atcommand(struct map_session_data* sd, const char* message)
{
nullpo_retv(sd);
- if( cmdlvl < log_config.gm )
+ if( !log_config.commands ||
+ !pc_should_log_commands(sd) )
return;
if( log_config.sql_logs )
@@ -460,8 +461,8 @@ int log_config_read(const char* cfgName)
log_config.filter = config_switch(w2);
else if( strcmpi(w1, "log_zeny") == 0 )
log_config.zeny = config_switch(w2);
- else if( strcmpi(w1, "log_gm") == 0 )
- log_config.gm = config_switch(w2);
+ else if( strcmpi(w1, "log_commands") == 0 )
+ log_config.commands = config_switch(w2);
else if( strcmpi(w1, "log_npc") == 0 )
log_config.npc = config_switch(w2);
else if( strcmpi(w1, "log_chat") == 0 )
@@ -508,9 +509,9 @@ int log_config_read(const char* cfgName)
{
ShowInfo("Logging chat to %s '%s'.\n", target, log_config.log_chat);
}
- if( log_config.gm )
+ if( log_config.commands )
{
- ShowInfo("Logging gm commands to %s '%s'.\n", target, log_config.log_gm);
+ ShowInfo("Logging commands to %s '%s'.\n", target, log_config.log_gm);
}
if( log_config.mvpdrop )
{