+HashList *GetThisRoomMAlias(StrBuf *Target, WCTemplputParams *TP)
+{
+ wcsession *WCC = WC;
+ StrBuf *Line;
+ StrBuf *Token;
+ HashList *Aliases = NULL;
+ const char *pComma;
+ long aliaslen;
+ long locallen;
+ long State;
+
+ serv_puts("GNET "FILE_MAILALIAS);
+ Line = NewStrBuf();
+ StrBuf_ServGetln(Line);
+ if (GetServerStatus(Line, &State) == 1)
+ {
+ int Done = 0;
+ int n = 0;
+
+ Aliases = NewHash(1, NULL);
+ while(!Done && (StrBuf_ServGetln(Line) >= 0))
+ if ( (StrLength(Line)==3) &&
+ !strcmp(ChrPtr(Line), "000"))
+ {
+ Done = 1;
+ }
+ else
+ {
+ pComma = strchr(ChrPtr(Line), ',');
+ if (pComma == NULL)
+ continue;
+ aliaslen = pComma - ChrPtr(Line);
+ locallen = StrLength(Line) - 1 - aliaslen;
+ if (locallen - 5 != StrLength(WCC->CurRoom.name))
+ continue;
+ if (strncmp(pComma + 1, "room_", 5) != 0)
+ continue;
+
+ if (strcasecmp(pComma + 6, ChrPtr(WCC->CurRoom.name)) != 0)
+ continue;
+ Token = NewStrBufPlain(ChrPtr(Line), aliaslen);
+ Put(Aliases,
+ IKEY(n),
+ Token,
+ HFreeStrBuf);
+ n++; /* #0 is the type... */
+ }
+ }
+ else if (State == 550)
+ AppendImportantMessage(_("Higher access is required to access this function."), -1);
+
+ FreeStrBuf(&Line);
+
+ return Aliases;
+}
+