Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 4c375e2c authored by rswindell's avatar rswindell

Create a semaphore file (ctrl/syspage.<node_num>) when the sysop is being

paged by a user on the terminal server.
parent e0f7f22e
/* chat.cpp */
/* Synchronet real-time chat functions */
// vi: tabstop=4
/* $Id$ */
......@@ -714,6 +713,7 @@ bool sbbs_t::sysop_page(void)
sprintf(str,"%s paged sysop for chat",useron.alias);
logline("C",str);
ftouch(syspage_semfile);
for(i=0;i<cfg.total_pages;i++)
if(chk_ar(cfg.page[i]->ar,&useron,&client))
break;
......@@ -737,6 +737,8 @@ bool sbbs_t::sysop_page(void)
,sys_status&SS_SYSPAGE ? text[ON] : text[OFF]);
nosound();
}
if(!(sys_status&SS_SYSPAGE))
remove(syspage_semfile);
return(true);
}
......
......@@ -3059,6 +3059,8 @@ sbbs_t::sbbs_t(ushort node_num, union xp_sockaddr *addr, size_t addr_len, const
if(node_num>0) {
strcpy(cfg.node_dir, cfg.node_path[node_num-1]);
prep_dir(cfg.node_dir, cfg.temp_dir, sizeof(cfg.temp_dir));
SAFEPRINTF2(syspage_semfile, "%ssyspage.%u", cfg.ctrl_dir, node_num);
remove(syspage_semfile);
} else { /* event thread needs exclusive-use temp_dir */
if(startup->temp_dir[0])
SAFECOPY(cfg.temp_dir,startup->temp_dir);
......@@ -3563,6 +3565,9 @@ sbbs_t::~sbbs_t()
logfile_fp=NULL;
}
if(syspage_semfile[0])
remove(syspage_semfile);
/********************************/
/* Free allocated class members */
/********************************/
......
/* Synchronet class (sbbs_t) definition and exported function prototypes */
// vi: tabstop=4
/* $Id$ */
/****************************************************************************
......@@ -379,6 +379,7 @@ public:
#endif
char syspage_semfile[MAX_PATH+1]; /* Sysop page semaphore file */
char menu_dir[128]; /* Over-ride default menu dir */
char menu_file[128]; /* Over-ride menu file */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment