-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: urcd action: commit revision: path_from: revision_from: c3ab2b4172b3ed376940f69e3432b573a45ea498: path_to: revision_to:
commit c3ab2b4172b3ed376940f69e3432b573a45ea498 Author: root <root@localhost.(none)> Date: Tue Jul 22 07:54:11 2014 +0000 [CryptoServ] allow disabling EXPIRY by setting env/EXPIRY to 0 diff --git a/README b/README
--- a/README +++ b/README @@ -367,8 +367,9 @@ POLICY and ISUPPORT: can write to the network. EXPIRY: - integer argument with a default of 32 days. This is how long a CryptoServ - account has until it is deleted from inactivity. + integer argument with a default of 32 days. this is how long a CryptoServ + account has until it is deleted from inactivity. setting this value to 0 + will disable account expirations. COLOUR: integer default is 0. changing this value to 1 will allow colour encoding diff --git a/src/cryptoserv.c b/src/cryptoserv.c
--- a/src/cryptoserv.c +++ b/src/cryptoserv.c @@ -146,27 +146,29 @@ main(int argc, char *argv[]) memcpy(buffer2+2+12+4+8,":CryptoServ!urc@service PRIVMSG ",32); - memcpy(path,"urcsigndb/",10); - if (!(directory=opendir("urcsigndb/"))) exit(4); - while ((file=readdir(directory))) - { - if (file->d_name[0] == '.') continue; - bzero(path+10,-10+512); - memcpy(path+10,file->d_name,strlen(file->d_name)); - stat(path,(struct stat *)&stats); - if (time((long *)0) - stats.st_atime >= EXPIRY) remove(path); - } closedir(directory); - - memcpy(path,"urccryptoboxdir/",16); - if (!(directory=opendir("urccryptoboxdir/"))) exit(5); - while ((file=readdir(directory))) - { - if (file->d_name[0] == '.') continue; - bzero(path+16,-16+512); - memcpy(path+16,file->d_name,strlen(file->d_name)); - stat(path,(struct stat *)&stats); - if (time((long *)0) - stats.st_atime >= EXPIRY) remove(path); - } closedir(directory); + if (EXPIRY) { + memcpy(path,"urcsigndb/",10); + if (!(directory=opendir("urcsigndb/"))) exit(4); + while ((file=readdir(directory))) + { + if (file->d_name[0] == '.') continue; + bzero(path+10,-10+512); + memcpy(path+10,file->d_name,strlen(file->d_name)); + stat(path,(struct stat *)&stats); + if (time((long *)0) - stats.st_atime >= EXPIRY) remove(path); + } closedir(directory); + + memcpy(path,"urccryptoboxdir/",16); + if (!(directory=opendir("urccryptoboxdir/"))) exit(5); + while ((file=readdir(directory))) + { + if (file->d_name[0] == '.') continue; + bzero(path+16,-16+512); + memcpy(path+16,file->d_name,strlen(file->d_name)); + stat(path,(struct stat *)&stats); + if (time((long *)0) - stats.st_atime >= EXPIRY) remove(path); + } closedir(directory); + } while (1) {
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 14:36:03 2024