From: Art Cancro Date: Mon, 23 Apr 2012 14:42:35 +0000 (-0400) Subject: When changes are made via the admin socket, post Aide messages indicating that the... X-Git-Tag: v8.11~75^2~5 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=a9d212c452ddc4c041c6b1ca30670dde9a321a07 When changes are made via the admin socket, post Aide messages indicating that the changes were made 'by an administrator' instead of 'by (not logged in)'. --- diff --git a/citadel/control.c b/citadel/control.c index 1e469b489..b81526cf1 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -693,8 +693,9 @@ void cmd_conf(char *argbuf) } put_config(); snprintf(buf, sizeof buf, - "The global system configuration has been edited by %s.\n", - CC->curr_user); + "The global system configuration has been edited by %s.\n", + (CC->logged_in ? CC->curr_user : "an administrator") + ); CtdlAideMessage(buf,"Citadel Configuration Manager Message"); if (!IsEmptyStr(config.c_logpages)) diff --git a/citadel/room_ops.c b/citadel/room_ops.c index c91551739..c9e651b15 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -1608,7 +1608,9 @@ void cmd_setr(char *args) mkdir(buf, 0755); } snprintf(buf, sizeof buf, "The room \"%s\" has been edited by %s.\n", - CC->room.QRname, CC->curr_user); + CC->room.QRname, + (CC->logged_in ? CC->curr_user : "an administrator") + ); CtdlAideMessage(buf, "Room modification Message"); cprintf("%d Ok\n", CIT_OK); } @@ -1853,7 +1855,9 @@ void cmd_kill(char *argbuf) /* tell the world what we did */ snprintf(msg, sizeof msg, "The room \"%s\" has been deleted by %s.\n", - deleted_room_name, CC->curr_user); + deleted_room_name, + (CC->logged_in ? CC->curr_user : "an administrator") + ); CtdlAideMessage(msg, "Room Purger Message"); cprintf("%d '%s' deleted.\n", CIT_OK, deleted_room_name); } else { @@ -2071,7 +2075,7 @@ void cmd_cre8(char *args) snprintf(notification_message, 1024, "A new room called \"%s\" has been created by %s%s%s%s%s%s\n", new_room_name, - CC->user.fullname, + (CC->logged_in ? CC->curr_user : "an administrator"), ((newflags & QR_MAILBOX) ? " [personal]" : ""), ((newflags & QR_PRIVATE) ? " [private]" : ""), ((newflags & QR_GUESSNAME) ? " [hidden]" : ""), diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 29b6f621f..370d00811 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -1577,7 +1577,8 @@ int CtdlInvtKick(char *iuser, int op) { iuser, ((op == 1) ? "invited to" : "kicked out of"), CC->room.QRname, - CC->user.fullname); + (CC->logged_in ? CC->user.fullname : "an administrator") + ); CtdlAideMessage(bbb,"User Admin Message"); return(0); @@ -1956,7 +1957,9 @@ void cmd_asup(char *cmdbuf) if (deleted) { snprintf(notify, SIZ, "User \"%s\" has been deleted by %s.\n", - usbuf.fullname, CC->user.fullname); + usbuf.fullname, + (CC->logged_in ? CC->user.fullname : "an administrator") + ); CtdlAideMessage(notify, "User Deletion Message"); }