From: Dave West Date: Wed, 28 May 2008 00:26:36 +0000 (+0000) Subject: Now IMAP posts Aide messages when a room is created. X-Git-Tag: v7.86~2203 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=60617b628daa3da5c4d8343d7623e70666ff4a3e Now IMAP posts Aide messages when a room is created. This is in line with what happens if the CRE8 command had been used. --- 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"); }