orangesquid (os) wrote,
orangesquid
os

pork auto-sign-on

I made perl script that automatically signs on your accounts (assuming you have passwords saved), and a bash script to get pork, an AIM client for unix, to load the perl script on startup.


~/.pork/pork-run: (chmod 755)
#!/bin/bash
cd ~/.pork
cp porkrc porkrc-rc
cat porkrc-rc porkrc-perl >porkrc
/usr/local/bin/pork
cp porkrc-rc porkrc



(replace /home/os with your home directory below)
~/.pork/porkrc-perl:
perl_load /home/os/.pork/scripts/autosignon.pl



(replace my screennames with the ones you want to auto sign on)
~/.pork/scripts/autosignon.pl:
my $unload_refnum;
my @screen_names = ("orangesquid", "regurgination", "orangepunksquid");

sub unload_handler {
  PORK::event_del_refnum($unload_refnum);
}
 
sub setup {
  my $sn;

  $unload_refnum = PORK::event_add("UNLOAD", "unload_handler");
  if (!defined $unload_refnum) {
    PORK::err_msg("Error setting up unload handler.");
    return(-1);
  }
   
  foreach (@screen_names) {
    PORK::connect($_);
  }
   
  return (0);
}

setup();


This was needed because LOGIN_ON_STARTUP seems to be broken, at least with multiple screen names.
Tags: aim, bash, perl, pork, programming, scripts
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments