int is_recipient(SpoolControl *sc, const char *Name)
{
namelist *nptr;
+ size_t len;
+ len = strlen(Name);
nptr = sc->listrecps;
while (nptr != NULL) {
- if (strcmp(Name, nptr->name)==0)
+ if (strncmp(Name, nptr->name, len)==0)
return 1;
nptr = nptr->next;
}
/* Do the same for digestrecps */
nptr = sc->digestrecps;
while (nptr != NULL) {
- if (strcmp(Name, nptr->name)==0)
+ if (strncmp(Name, nptr->name, len)==0)
return 1;
nptr = nptr->next;
}
/* Do the same for participates */
nptr = sc->participates;
while (nptr != NULL) {
- if (strcmp(Name, nptr->name)==0)
+ if (strncmp(Name, nptr->name, len)==0)
return 1;
nptr = nptr->next;
}
else if (CC->room.QRflags2 & QR2_SUBSONLY){
SpoolControl *sc;
char filename[SIZ];
- char room_to_spool[SIZ];
int found;
if (RemoteIdentifier == NULL)
{
snprintf(errmsgbuf, n, "Need sender to permit access.");
- return (0);
- }
- if (getroom(&CC->room, room_to_spool) != 0) {
- lprintf(CTDL_CRIT, "ERROR: cannot load <%s>\n", room_to_spool);
- return (0);
+ return (ERROR + USERNAME_REQUIRED);
}
-
+
assoc_file_name(filename, sizeof filename, &CC->room, ctdl_netcfg_dir);
lprintf(CTDL_INFO, "Networking started for <%s>\n", CC->room.QRname);
{
end_critical_section(S_NETCONFIGS);
snprintf(errmsgbuf, n, "No Subscribers found.");
- return (0);
+ return (ERROR + NO_SUCH_USER);
}
end_critical_section(S_NETCONFIGS);
found = is_recipient (sc, RemoteIdentifier);
free_spoolcontrol_struct(&sc);
- return (found);
+ if (found)
+ return (0);
+ else
+ return (ERROR + NO_SUCH_USER);
}
else if (CC->room.QRflags2 & QR2_MODERATED) {
return (0);