mirror of https://gitlab.com/bashrc2/epicyon
Store earlier
parent
340d301ec4
commit
1f50dfdc19
28
daemon.py
28
daemon.py
|
@ -2808,6 +2808,20 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if not fields.get('location'):
|
if not fields.get('location'):
|
||||||
fields['location']=None
|
fields['location']=None
|
||||||
|
|
||||||
|
# Store a file which contains the time in seconds
|
||||||
|
# since epoch when an attempt to post something was made.
|
||||||
|
# This is then used for active monthly users counts
|
||||||
|
lastUsedFilename= \
|
||||||
|
self.server.baseDir+'/accounts/'+ \
|
||||||
|
nickname+'@'+self.server.domain+'/.lastUsed'
|
||||||
|
try:
|
||||||
|
lastUsedFile=open(lastUsedFilename,'w')
|
||||||
|
if lastUsedFile:
|
||||||
|
lastUsedFile.write(str(int(time.time())))
|
||||||
|
lastUsedFile.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
if postType=='newpost':
|
if postType=='newpost':
|
||||||
messageJson= \
|
messageJson= \
|
||||||
createPublicPost(self.server.baseDir, \
|
createPublicPost(self.server.baseDir, \
|
||||||
|
@ -2834,20 +2848,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
else:
|
else:
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
# Store a file which contains the time in seconds
|
|
||||||
# since epoch when an attempt to post something was made.
|
|
||||||
# This is then used for active monthly users counts
|
|
||||||
lastUsedFilename= \
|
|
||||||
self.server.baseDir+'/accounts/'+ \
|
|
||||||
nickname+'@'+self.server.domain+'/.lastUsed'
|
|
||||||
try:
|
|
||||||
lastUsedFile=open(lastUsedFilename,'w')
|
|
||||||
if lastUsedFile:
|
|
||||||
lastUsedFile.write(str(int(time.time())))
|
|
||||||
lastUsedFile.close()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if postType=='newunlisted':
|
if postType=='newunlisted':
|
||||||
messageJson= \
|
messageJson= \
|
||||||
createUnlistedPost(self.server.baseDir, \
|
createUnlistedPost(self.server.baseDir, \
|
||||||
|
|
Loading…
Reference in New Issue