mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-20 00:12:25 +00:00
Adjust #logs set
This commit is contained in:
parent
47bb4c0b2b
commit
ef0d383de9
@ -10420,32 +10420,12 @@ void command_crashtest(Client *c, const Seperator *sep)
|
||||
void command_logs(Client *c, const Seperator *sep){
|
||||
int logs_set = 0;
|
||||
if (sep->argnum > 0) {
|
||||
/* #logs reload_all */
|
||||
if(strcasecmp(sep->arg[1], "reload_all") == 0){
|
||||
c->Message(0, "Yes this is working");
|
||||
}
|
||||
if (strcasecmp(sep->arg[1], "set") == 0){
|
||||
if (strcasecmp(sep->arg[2], "console") == 0){
|
||||
Log.log_settings[atoi(sep->arg[3])].log_to_console = atoi(sep->arg[4]);
|
||||
logs_set = 1;
|
||||
}
|
||||
else if (strcasecmp(sep->arg[2], "file") == 0){
|
||||
Log.log_settings[atoi(sep->arg[3])].log_to_file = atoi(sep->arg[4]);
|
||||
logs_set = 1;
|
||||
}
|
||||
else if (strcasecmp(sep->arg[2], "gmsay") == 0){
|
||||
Log.log_settings[atoi(sep->arg[3])].log_to_gmsay = atoi(sep->arg[4]);
|
||||
logs_set = 1;
|
||||
}
|
||||
else{
|
||||
c->Message(0, "--- #logs set [console|file|gmsay] <category_id> <debug_level (1-3)> - Sets log settings during the lifetime of the zone");
|
||||
c->Message(0, "--- #logs set gmsay 20 1 - Would output Quest errors to gmsay");
|
||||
}
|
||||
if (logs_set == 1){
|
||||
c->Message(15, "Your Log Settings have been applied");
|
||||
c->Message(15, "Output Method: %s :: Debug Level: %i - Category: %s", sep->arg[2], atoi(sep->arg[4]), Logs::LogCategoryName[atoi(sep->arg[3])]);
|
||||
}
|
||||
}
|
||||
if (strcasecmp(sep->arg[1], "list_settings") == 0){
|
||||
/* #logs list_settings */
|
||||
if (strcasecmp(sep->arg[1], "list_settings") == 0 || (strcasecmp(sep->arg[1], "set") == 0 && strcasecmp(sep->arg[3], "") == 0)){
|
||||
c->Message(0, "[Category ID | console | file | gmsay | Category Description]");
|
||||
int redisplay_columns = 0;
|
||||
for (int i = 0; i < Logs::LogCategory::MaxCategoryID; i++){
|
||||
@ -10457,6 +10437,29 @@ void command_logs(Client *c, const Seperator *sep){
|
||||
redisplay_columns++;
|
||||
}
|
||||
}
|
||||
/* #logs set */
|
||||
if (strcasecmp(sep->arg[1], "set") == 0){
|
||||
if (strcasecmp(sep->arg[2], "console") == 0){
|
||||
Log.log_settings[atoi(sep->arg[3])].log_to_console = atoi(sep->arg[4]);
|
||||
logs_set = 1;
|
||||
}
|
||||
else if (strcasecmp(sep->arg[2], "file") == 0){
|
||||
Log.log_settings[atoi(sep->arg[3])].log_to_file = atoi(sep->arg[4]);
|
||||
logs_set = 1;
|
||||
}
|
||||
else if (strcasecmp(sep->arg[2], "gmsay") == 0){
|
||||
Log.log_settings[atoi(sep->arg[3])].log_to_gmsay = atoi(sep->arg[4]);
|
||||
logs_set = 1;
|
||||
}
|
||||
else{
|
||||
c->Message(0, "--- #logs set [console|file|gmsay] <category_id> <debug_level (1-3)> - Sets log settings during the lifetime of the zone");
|
||||
c->Message(0, "--- #logs set gmsay 20 1 - Would output Quest errors to gmsay");
|
||||
}
|
||||
if (logs_set == 1){
|
||||
c->Message(15, "Your Log Settings have been applied");
|
||||
c->Message(15, "Output Method: %s :: Debug Level: %i - Category: %s", sep->arg[2], atoi(sep->arg[4]), Logs::LogCategoryName[atoi(sep->arg[3])]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
c->Message(0, "#logs usage:");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user