Commit 64ab234c authored by rswindell's avatar rswindell

Notify (short-message, email) the sysop when they've been paged to chat.

Try that, Nelgin.
parent 278f43db
......@@ -706,8 +706,9 @@ bool sbbs_t::sysop_page(void)
|| (cfg.sys_chat_ar[0] && chk_ar(cfg.sys_chat_ar,&useron,&client))
|| useron.exempt&FLAG('C')) {
sprintf(str,"paged sysop for chat");
logline("C",str);
logline("C", "paged sysop for chat");
sprintf(str, "%s paged you to chat", useron.alias);
notify(&cfg, 1, str, NULL);
ftouch(syspage_semfile);
for(i=0;i<cfg.total_pages;i++)
......
......@@ -629,9 +629,14 @@ extern "C" int DLLCALL notify(scfg_t* cfg, uint usernumber, const char* subject,
smb_freemsgmem(&msg);
char smsg[1024];
safe_snprintf(smsg, sizeof(smsg),"\1n\1h%s \1r%s:\r\n%s\1n\r\n"
,timestr(cfg, msg.hdr.when_imported.time, str)
,subject
,text);
if(text != NULL)
safe_snprintf(smsg, sizeof(smsg),"\1n\1h%s \1r%s:\r\n%s\1n\r\n"
,timestr(cfg, msg.hdr.when_imported.time, str)
,subject
,text);
else
safe_snprintf(smsg, sizeof(smsg),"\1n\1h%s \1r%s\1n\r\n"
,timestr(cfg, msg.hdr.when_imported.time, str)
,subject);
return putsmsg(cfg, usernumber, smsg);
}
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