projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3e63b6e
)
Now IMAP posts Aide messages when a room is created.
author
Dave West
<davew@uncensored.citadel.org>
Wed, 28 May 2008 00:26:36 +0000
(
00:26
+0000)
committer
Dave West
<davew@uncensored.citadel.org>
Wed, 28 May 2008 00:26:36 +0000
(
00:26
+0000)
This is in line with what happens if the CRE8 command had been used.
citadel/modules/imap/serv_imap.c
patch
|
blob
|
history
diff --git
a/citadel/modules/imap/serv_imap.c
b/citadel/modules/imap/serv_imap.c
index d3f5e9eb4f53c75b8dad9a8aa4f164356d526d6e..2a47b4e223c7247356912faa56f7792b4860c3ca 100644
(file)
--- 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;
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",
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]);
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");
}
}
CtdlLogPrintf(CTDL_DEBUG, "imap_create() completed\n");
}