mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-22 09:42:26 +00:00
Adjust #logs set
This commit is contained in:
parent
47bb4c0b2b
commit
ef0d383de9
@ -10420,9 +10420,24 @@ void command_crashtest(Client *c, const Seperator *sep)
|
|||||||
void command_logs(Client *c, const Seperator *sep){
|
void command_logs(Client *c, const Seperator *sep){
|
||||||
int logs_set = 0;
|
int logs_set = 0;
|
||||||
if (sep->argnum > 0) {
|
if (sep->argnum > 0) {
|
||||||
|
/* #logs reload_all */
|
||||||
if(strcasecmp(sep->arg[1], "reload_all") == 0){
|
if(strcasecmp(sep->arg[1], "reload_all") == 0){
|
||||||
c->Message(0, "Yes this is working");
|
c->Message(0, "Yes this is working");
|
||||||
}
|
}
|
||||||
|
/* #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++){
|
||||||
|
if (redisplay_columns == 10){
|
||||||
|
c->Message(0, "[Category ID | console | file | gmsay | Category Description]");
|
||||||
|
redisplay_columns = 0;
|
||||||
|
}
|
||||||
|
c->Message(0, StringFormat("--- %i | %u | %u | %u | %s", i, Log.log_settings[i].log_to_console, Log.log_settings[i].log_to_file, Log.log_settings[i].log_to_gmsay, Logs::LogCategoryName[i]).c_str());
|
||||||
|
redisplay_columns++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #logs set */
|
||||||
if (strcasecmp(sep->arg[1], "set") == 0){
|
if (strcasecmp(sep->arg[1], "set") == 0){
|
||||||
if (strcasecmp(sep->arg[2], "console") == 0){
|
if (strcasecmp(sep->arg[2], "console") == 0){
|
||||||
Log.log_settings[atoi(sep->arg[3])].log_to_console = atoi(sep->arg[4]);
|
Log.log_settings[atoi(sep->arg[3])].log_to_console = atoi(sep->arg[4]);
|
||||||
@ -10445,18 +10460,6 @@ void command_logs(Client *c, const Seperator *sep){
|
|||||||
c->Message(15, "Output Method: %s :: Debug Level: %i - Category: %s", sep->arg[2], atoi(sep->arg[4]), Logs::LogCategoryName[atoi(sep->arg[3])]);
|
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){
|
|
||||||
c->Message(0, "[Category ID | console | file | gmsay | Category Description]");
|
|
||||||
int redisplay_columns = 0;
|
|
||||||
for (int i = 0; i < Logs::LogCategory::MaxCategoryID; i++){
|
|
||||||
if (redisplay_columns == 10){
|
|
||||||
c->Message(0, "[Category ID | console | file | gmsay | Category Description]");
|
|
||||||
redisplay_columns = 0;
|
|
||||||
}
|
|
||||||
c->Message(0, StringFormat("--- %i | %u | %u | %u | %s", i, Log.log_settings[i].log_to_console, Log.log_settings[i].log_to_file, Log.log_settings[i].log_to_gmsay, Logs::LogCategoryName[i]).c_str());
|
|
||||||
redisplay_columns++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c->Message(0, "#logs usage:");
|
c->Message(0, "#logs usage:");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user