Hi!

Last nite my ~ partition ran out of space and licq crashed.. and it zeroed
out my users.conf file... and licq refused to startup.

So I wrote this script to regenerate the users.conf file from the contents
of the ~/.licq/users directory.

It's crude .. but what the hell it still works!! (I wrote it in a few
minutes !!)

I don't know if such a script exists but FWIW i'm posting it here with a
few lines of *documentation* added ! :-)

Kingsly
#!/usr/bin/perl

#####################################################################
#Author: Kingsly John <[EMAIL PROTECTED]>
#Date: Mon Dec 24 16:22:25 IST 2001
#
#This script (re)generates the users.conf for licq from the contents
#of the ~/.licq/users directory.
#
#Usage is ./regen.pl > ~/.licq/users.conf
#(Make sure you backup your existing users.conf file)
#
#As usual this script comes with absolutely no guarantees whatsover
#It worked for me for licq 1.1 (CVS) YMMV.
#####################################################################

$n=1;
@users = `ls -1 ~/.licq/users`;
print "[users]\nNumOfUsers = ".scalar(@users)."\n";

foreach (@users){

chomp;
chop;
chop;
chop;
chop;

print "User".$n++." = ".$_."\n";

}

Reply via email to