Fix an uncaught exception in the Default Client advanced preferences from messing up the UI by removing all traces of MSN and Yahoo from the URL handler code.
#!/usr/bin/perl
# $Id$
#
# This program imports iChat logs using the program Logorrhea. Get it from
# http://spiny.com/logorrhea/
#
# Using Logorrhea, export all of your chats.
#
# Then run this script with "ichat2adium.pl filename" or run from the same
# directory as the exported contents.
#
# If you pass the "--usernames" flag, the script will prompt you for the
# usernames of the various aliases.
#
# The "--primary-user USERNAME" flag will set the name of the user to your
# username.
#
# Records that make no sense will be sent to "adiumLogs/bad".
#
# You should be able to drop the adiumLogs folder into ~/Library/Application
# Support/Users/YOU/Logs/.
useTime::Local;
usewarnings;
usestrict;
my$file;
my$users=0;
my$primary;
my@usernames;
my@chatnames;
if(@ARGV>0){
$file=$ARGV[0];
}else{
$file="iChat Export.txt";
}
for(my$i=1;$i<@ARGV;$i++){
if($ARGV[$i]eq"--usernames"){
$users=1;
}
if($ARGV[$i]eq"--primary-user"){
$primary=$ARGV[$i+1];
}
}
open(FILE,$file)ordieqq{Unable to open "$file": $!};
$/="\r";
my@input=<FILE>;
my$base_out;
if($primary){
$base_out="AIM.$primary";
}else{
$base_out="AIM.iChatLogs";
}
umask(000);
mkdir($base_out,0777)unless(-d$base_out);
my$outfile="$base_out/bad";
close(FILE);
for(my$i=0;$i<@input;$i++){
my($chatname,$sender,$date,$time,$message);
my($day,$month,$year);
my($hh,$mm,$ss,$modTime);
$_=$input[$i];
($chatname,$sender,$date,$time,$message)=
/(.*?)\t(.*?)\t(.*?)\t(.*?)\t.*?\t(.*)\r/s;
$_=$date;
if($date){
($month,$day,$year)=/(\d\d)\/(\d\d)\/(\d\d\d\d)/;
}
if($users&&$chatname&&$sender){
my$userfound=0;
for(my$j=0;$j<@chatnames;$j++){
if($chatnames[$j]eq$chatname){
$userfound=1;
$chatname=$usernames[$j];
}
}
if($userfound==0){
push(@chatnames,$chatname);
print"Enter username associated with $chatname [$sender]:";