summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index ef8ad4784..8da3fa296 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1725,8 +1725,7 @@ ACMD_FUNC(item)
}
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs & LOG_COMMAND_ITEMS)
- log_pick_pc(sd, "A", item_id, number, NULL);
+ log_pick_pc(sd, LOG_TYPE_COMMAND, item_id, number, NULL);
clif_displaymessage(fd, msg_txt(18)); // Item created.
return 0;
@@ -1800,8 +1799,7 @@ ACMD_FUNC(item2)
}
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs & LOG_COMMAND_ITEMS)
- log_pick_pc(sd, "A", item_tmp.nameid, number, &item_tmp);
+ log_pick_pc(sd, LOG_TYPE_COMMAND, item_tmp.nameid, number, &item_tmp);
clif_displaymessage(fd, msg_txt(18)); // Item created.
} else {
@@ -1824,8 +1822,7 @@ ACMD_FUNC(itemreset)
if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) {
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs & LOG_COMMAND_ITEMS)
- log_pick_pc(sd, "A", sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ log_pick_pc(sd, LOG_TYPE_COMMAND, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0);
}
@@ -2865,8 +2862,7 @@ ACMD_FUNC(produce)
clif_misceffect(&sd->bl, 3);
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs & LOG_COMMAND_ITEMS)
- log_pick_pc(sd, "A", tmp_item.nameid, 1, &tmp_item);
+ log_pick_pc(sd, LOG_TYPE_COMMAND, tmp_item.nameid, 1, &tmp_item);
if ((flag = pc_additem(sd, &tmp_item, 1)))
clif_additem(sd, 0, 0, flag);
@@ -5947,8 +5943,7 @@ void getring (struct map_session_data* sd)
item_tmp.card[3] = sd->status.partner_id >> 16;
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs & LOG_COMMAND_ITEMS)
- log_pick_pc(sd, "A", item_id, 1, &item_tmp);
+ log_pick_pc(sd, LOG_TYPE_COMMAND, item_id, 1, &item_tmp);
if((flag = pc_additem(sd,&item_tmp,1))) {
clif_additem(sd,0,0,flag);
@@ -8726,10 +8721,7 @@ ACMD_FUNC(delitem)
}
//Logs (A)dmins items [Lupus]
- if( log_config.enable_logs & LOG_COMMAND_ITEMS )
- {
- log_pick_pc(sd, "A", nameid, -delamount, &sd->status.inventory[idx]);
- }
+ log_pick_pc(sd, LOG_TYPE_COMMAND, nameid, -delamount, &sd->status.inventory[idx]);
pc_delitem(sd, idx, delamount, 0, 0);
@@ -9276,6 +9268,14 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
}
if( strcmpi("adjgmlvl",command+1) && ssd ) ssd->gmlevel = lv;
+ //Log atcommands
+ if( *atcmd_msg == atcommand_symbol )
+ log_atcommand(sd, info->level, atcmd_msg);
+
+ //Log Charcommands
+ if( *atcmd_msg == charcommand_symbol && ssd != NULL )
+ log_atcommand(sd, info->level2, message);
+
return true;
}