X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fimap%2Fserv_imap.c;h=2a47b4e223c7247356912faa56f7792b4860c3ca;hb=60617b628daa3da5c4d8343d7623e70666ff4a3e;hp=d3f5e9eb4f53c75b8dad9a8aa4f164356d526d6e;hpb=3e63b6e9f731fe0144d07c35b16889e3296c9b4b;p=citadel.git diff --git a/citadel/modules/imap/serv_imap.c b/citadel/modules/imap/serv_imap.c index d3f5e9eb4..2a47b4e22 100644 --- a/citadel/modules/imap/serv_imap.c +++ b/citadel/modules/imap/serv_imap.c @@ -881,6 +881,7 @@ void imap_create(int num_parms, char *parms[]) int flags; int newroomtype = 0; int newroomview = 0; + char *notification_message = NULL; if (strchr(parms[2], '\\') != NULL) { cprintf("%s NO Invalid character in folder name\r\n", @@ -924,6 +925,18 @@ void imap_create(int num_parms, char *parms[]) cprintf("%s NO Mailbox already exists, or create failed\r\n", parms[0]); } else { cprintf("%s OK CREATE completed\r\n", parms[0]); + /* post a message in Aide> describing the new room */ + notification_message = malloc(1024); + snprintf(notification_message, 1024, + "A new room called \"%s\" has been created by %s%s%s%s\n", + roomname, + CC->user.fullname, + ((ret & QR_MAILBOX) ? " [personal]" : ""), + ((ret & QR_PRIVATE) ? " [private]" : ""), + ((ret & QR_GUESSNAME) ? " [hidden]" : "") + ); + aide_message(notification_message, "Room Creation Message"); + free(notification_message); } CtdlLogPrintf(CTDL_DEBUG, "imap_create() completed\n"); }