Mailinglists: possible room aliases have to be prepared to not contain blanks and...
authorWilfried Goesgens <dothebart@citadel.org>
Wed, 12 Jun 2013 20:11:53 +0000 (22:11 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Wed, 12 Jun 2013 20:11:53 +0000 (22:11 +0200)
webcit/roomlist.c

index 2b282ff727631fcfc5b4a4e6d4a567adb0c71965..d45db6dc8d999c6b6f3484092d8aeb210f316a2d 100644 (file)
@@ -427,6 +427,7 @@ HashList *GetThisRoomPossibleMAlias(StrBuf *Target, WCTemplputParams *TP)
        HashList *Domains;
        StrBuf *Line;
        StrBuf *Token;
+       StrBuf *RoomName;
        HashList *PossibleAliases = NULL;
        
        const char *pComma;
@@ -441,12 +442,15 @@ HashList *GetThisRoomPossibleMAlias(StrBuf *Target, WCTemplputParams *TP)
                return NULL;
        PossibleAliases = NewHash(1, NULL);
        Line = NewStrBuf();
+       RoomName = NewStrBufDup(WCC->CurRoom.name);
+       StrBufAsciify(RoomName, '_');
+       StrBufReplaceChars(RoomName, ' ', '_');
 
        AppendPossibleAliasWithDomain(PossibleAliases,
                                      &n,
                                      Domains,
                                      HKEY("room_"),
-                                     SKEY(WCC->CurRoom.name));
+                                     SKEY(RoomName));
 
 
        serv_puts("GNET "FILE_MAILALIAS);
@@ -502,7 +506,7 @@ HashList *GetThisRoomPossibleMAlias(StrBuf *Target, WCTemplputParams *TP)
                AppendImportantMessage(_("Higher access is required to access this function."), -1);
 
        FreeStrBuf(&Line);
-
+       FreeStrBuf(&RoomName);
        return PossibleAliases;
 }