[JDEV] Jabber in a kiosk environment
Oliver Jones
oj at world.std.com
Mon Nov 26 07:32:00 CST 2001
At 02:15 PM 11/22/01 +0100, Jan Peter Hecking wrote:
>I therefore need to
>implement a solution that removes unused accounts after a certain amount
>of time (like a few days initially).
We do this. We use the file-system scheme for storing user.xml
files. There's a cron script on the jabberd server that removes user.xml
files that have gone unmodified for more than 20 days:
/usr/bin/find /var/...jspool/jabber.dmn.com -type f -mtime +20 -exec
rm -f {} \;
Our jabberd is configured to refrain from caching these files internally,
with a stanza in the configuration file like so. This is important because
otherwise removing the files from the file system will baffle the cache
subsystem. It doesn't seem to hurt performance measurably to disable caching.
<!-- This component handles all data storage, using the filesystem. -->
<xdb id="xdb">
<host/>
<load><xdb_file>/usr/local/jabber/bin/xdb_file.so</xdb_file></load>
<xdb_file xmlns="jabber:config:xdb_file">
<spool><jabberd:cmdline
flag="s">/var/...jspool</jabberd:cmdline></spool>
<timeout>0</timeout>
</xdb_file>
</xdb>
This seems to work flawlessly -- we've had this up and running for six months.
>1) Is it possible for a jabber server component (implemented using
> Net::Jabber) to delete an existing user account? How to do this?
Removing the user.xml file seems to do the trick, if you have access to the
jabber server's file system.
>2) Can this module determine when a user account was used the last time?
File system modification time on the file is accurate as to when the
account either most-recently logged in or out, or when another user sent
the account a message when the account was not logged in.
Ollie Jones
Digital Music Network
http://www.dmn.com
More information about the JDev
mailing list