*/
void master_startup(void) {
struct timeval tv;
- struct quickroom qrbuf;
+ struct ctdlroom qrbuf;
lprintf(9, "master_startup() started\n");
time(&server_startup_time);
}
/*
- * check a hostname against the public_clients file
+ * Check a hostname against the public_clients file. This determines
+ * whether the client is allowed to change the hostname for this session
+ * (for example, to show the location of the user rather than the location
+ * of the client).
*/
int is_public_client(char *where)
{
char buf[SIZ];
FILE *fp;
- lprintf(9, "Checking whether %s is a public client\n", where);
-
+ lprintf(9, "Checking whether %s is a local client\n", where);
if (hostnames_match(where, "localhost")) return(1);
if (hostnames_match(where, config.c_fqdn)) return(1);
- fp = fopen("public_clients","r");
+ lprintf(9, "Checking whether %s is a public client\n", where);
+ fp = fopen("public_clients", "r");
if (fp == NULL) return(0);
while (fgets(buf, sizeof buf, fp)!=NULL) {
while (isspace((buf[strlen(buf)-1])))
buf[strlen(buf)-1] = 0;
- if (hostnames_match(where,buf)) {
+ if (hostnames_match(where, buf)) {
fclose(fp);
return(1);
}
struct CitContext *viewed,
struct CitContext *viewer) {
- strcpy(real_room, viewed->quickroom.QRname);
- if (viewed->quickroom.QRflags & QR_MAILBOX) {
+ strcpy(real_room, viewed->room.QRname);
+ if (viewed->room.QRflags & QR_MAILBOX) {
strcpy(real_room, &real_room[11]);
}
- if (viewed->quickroom.QRflags & QR_PRIVATE) {
- if ( (CtdlRoomAccess(&viewed->quickroom, &viewer->usersupp)
+ if (viewed->room.QRflags & QR_PRIVATE) {
+ if ( (CtdlRoomAccess(&viewed->room, &viewer->user)
& UA_KNOWN) == 0) {
strcpy(real_room, "<private room>");
}
return(-1);
}
- if (CC->usersupp.axlevel >= 6) return(0);
+ if (CC->user.axlevel >= 6) return(0);
if (required_level >= ac_aide) {
cprintf("%d This command requires Aide access.\n",
ERROR+HIGHER_ACCESS_REQUIRED);
for (ccptr = ContextList; ccptr != NULL; ccptr = ccptr->next) {
if (session_num == ccptr->cs_pid) {
found_it = 1;
- if ((ccptr->usersupp.usernum == CC->usersupp.usernum)
- || (CC->usersupp.axlevel >= 6)) {
+ if ((ccptr->user.usernum == CC->user.usernum)
+ || (CC->user.axlevel >= 6)) {
allowed = 1;
ccptr->kill_me = 1;
}