# Set up some useful functions and customizations sourounding aimlogin
# and logout.

my $aimusername;
my $aimpassword;

sub aim_set_username($) {
    $aimusername = shift;
    "username set to $aimusername";
}

sub aim_set_password($) {
    $aimpassword = shift;
}

sub aim_get_username() {
    $aimusername;
    "username set to $aimusername";
}

sub aim_get_password() {
    $aimpassword;
}

sub aim_login() {
    if ($aimusername && $aimpassword) {
	owl::command("aimlogin $aimusername $aimpassword");
	sepbartokens_add("AIM");
	"Logged in";
    }
}

sub aim_logout() {
    owl::command("aimlogout");
    sepbartokens_trim("AIM");
}

1;
