- tempQR2 = CC->room; // Remember where we parked
- CC->room = tempQR;
-
- err = CtdlDoIHavePermissionToPostInThisRoom( // check for write permissions to room
- errmsg,
- sizeof errmsg,
- RemoteIdentifier,
- Flags,
- 0 // 0 means "not a reply"
- );
- if (err) {
+ char mail_to_room[ROOMNAMELEN];
+ char *m;
+ strncpy(mail_to_room, &this_recp[5], sizeof mail_to_room);
+ for (m = mail_to_room; *m; ++m) {
+ if (m[0] == '_') m[0]=' ';
+ }
+ if (!CtdlGetRoom(&CC->room, mail_to_room)) { // Find the room they asked for
+
+ err = CtdlDoIHavePermissionToPostInThisRoom( // check for write permissions to room
+ errmsg,
+ sizeof errmsg,
+ RemoteIdentifier,
+ Flags,
+ 0 // 0 means "this is not a reply"
+ );
+ if (err) {
+ ++ret->num_error;
+ invalid = 1;
+ }
+ else {
+ ++ret->num_room;
+ if (!IsEmptyStr(ret->recp_room)) {
+ strcat(ret->recp_room, "|");
+ }
+ strcat(ret->recp_room, &this_recp[5]);
+
+ if (!IsEmptyStr(ret->recp_orgroom)) {
+ strcat(ret->recp_orgroom, "|");
+ }
+ strcat(ret->recp_orgroom, org_recp);
+
+ }
+ }
+ else { // no such room exists