From 5df79c53745fde5d6c3340a2979b1429cd5892c1 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sat, 8 Oct 2011 20:30:28 +0200 Subject: Initial import of htcd system 1.0 Signed-off-by: Henrik Rydberg --- htc/system.htc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 htc/system.htc (limited to 'htc/system.htc') diff --git a/htc/system.htc b/htc/system.htc new file mode 100644 index 0000000..ecae08e --- /dev/null +++ b/htc/system.htc @@ -0,0 +1,35 @@ +% +% User stuff +% +\def{mail.root}{xx}{ + \log{mail root: \1} + \mail{\ROOT}{}{\ROOT}{server root}{\now}{\1}{text/plain}{\2} +} +\def{mail.admin}{xx}{ + \log{mail admin: \1} + \mail{\ADMIN}{}{\ADMIN}{server admin}{\now}{\1}{text/plain}{\2} +} +\def{mail.user}{xx}{ + \if{\user.id}{ + \log{mail user: \1} + \mail{\ADMIN}{}{\user.email}{\HOST}{\now}{\1}{text/plain}{\2} + } +} +% +% Modification time handling +% +\def{statmod}{x}{ + [mtime:=\dirmtime{\1}]; + \if(mtime>stat.LASTMOD)(stat.LASTMOD=mtime); + \1 +} +\def{statinclude}{x}{ + \include{\statmod{\1}} +} +\def{statopen}{xx?}{ + \open{\1}{\statmod{\2}}{\3} +} +\def{statdb}{x}{ + [mtime:=\dbmod{\1}]; + \if(mtime>stat.LASTMOD)(stat.LASTMOD=mtime); +} -- cgit v1.2.3