GRRR!!!!!!!!!!!!!!

Ok, lets try this one more time:

ive attached the script this time..

#!/usr/bin/perl -w

# Trillian to LICQ convertor
# By Peter Revill ([EMAIL PROTECTED])
# HUGE thanks to #Perl on irc.openprojects.net especially carbon :)

# Copyright(c) 2002 Peter Revill

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.



use warnings;
use strict;

my $string_data;
my $users =3D 0;

    my $searchstring;
    my $new_usersconf;

    my ($file_buffer, $file_path, $i, $ans);
    print "To run, copy Buddies.xml from your trillian profile (normally tr=
illian/users/default/Buddies.xml and supply Buddies.xml as the file name)";
   =20
    print "Please enter a file to read: ";


    $ans =3D <STDIN>; chomp($ans);

    $file_path =3D $ans;
        if(open(FH, $file_path))
        {


        while(<FH>) {


        if(/A(\d+)%/) {

                $users++;



                }
        }

        }
        close(FH);

        open(FHD,$file_path);
        $new_usersconf =3D "[users] \nNumOfUsers =3D " . $users . "\n";

        my $count =3D 1;

        while(<FHD>) {

                if(/A(\d+)%/) {


                        $new_usersconf =3D $new_usersconf . "User" . $count . " =3D " 
. $1 . "\n=
";
                        open(USE,"> .licq/users/" . $1 . ".uin");
                        print USE "

                        [user] \n
History =3D default\n
Groups.System =3D\n
Groups.User =3D\n
Ip =3D\n
IntIp =3D\n
Port =3D\n
NewMessages =3D\n
LastOnline =3D\n
LastSent =3D\n
LastRecv =3D\n
LastCheckedAR =3D\n
AutoAccept =3D\n
StatusToUser =3D\n
CustomAutoRsp =3D\n
SendIntIp =3D\n
UserEncoding =3D\n
SID =3D\n
GSID =3D\n
Alias =3D\n
FirstName =3D\n
LastName =3D\n
Email1 =3D\n
Email2 =3D\n
EmailO =3D\n
City =3D\n
State =3D\n
PhoneNumber =3D\n
FaxNumber =3D\n
Address =3D\n
CellularNumber =3D\n
Zipcode =3D\n
Country =3D\n
Timezone =3D\n
Authorization =3D\n
HideEmail =3D\n
Age =3D\n
Gender =3D\n
Homepage =3D\n
BirthYear =3D\n
BirthMonth =3D\n
BirthDay =3D\n
Language1 =3D\n
Language2 =3D\n
Language3 =3D\n
CompanyCity =3D\n
CompanyState =3D\n
CompanyPhoneNumber =3D\n
CompanyFaxNumber =3D\n
CompanyAddress =3D\n
CompanyZip =3D\n
CompanyCountry =3D\n
CompanyName =3D\n
CompanyDepartment =3D\n
CompanyPosition =3D\n
CompanyHomepage =3D\n
";
                        close(USE);

                        $count++;



                }
        }

        # now its time to write to users.conf

        open(USER, "> users.conf");

        print USER $new_usersconf;

        print $new_usersconf;

        print "Work complete, to finish off, all you need to do is copy users.conf=
 (which should be in this dir, to .licq/users.conf (use cp users.conf .licq=
/users.conf if you want) (this assumes you have run this script in your hom=
e directory)";

        print "\n Then, go into licq, all the nicknames will come up as unknown, b=
ut click Licq: user functions - update all users and walla, problem solved =
:)";
        print "\n Enjoy! Cheers Peter Revill";

        close(USER);


                # the first thing we do is split it into a nice array

Reply via email to