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 10916f3c authored by rswindell's avatar rswindell

Add PCR (post/call ratio) @-code.

parent 6697291f
......@@ -916,6 +916,13 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode)
return(str);
}
if(strcmp(sp, "PCR") == 0) {
float f = 0;
if(useron.posts)
f = (float)useron.logons / useron.posts;
safe_snprintf(str, maxlen, "%u", f ? (uint)(100 / f) : useron.posts > useron.logons ? 100 : 0);
}
if(!strcmp(sp,"LASTNEW"))
return(unixtodstr(&cfg,(time32_t)ns_time,str));
......
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