All pastes #91163 Raw Edit

Someone

public text v1 · immutable
#91163 ·published 2006-07-18 10:27 UTC
rendered paste body
#!/usr/bin/perl
package AutoJoinOnInvite;

use strict;

Xchat::register ("Casta Autojoin", "1.0", "", "");
Xchat::hook_print ("Invited", \&invited);

my @AutoJoinOnInvite::channels = (
    '#aes-sat',
);

sub invited {
    my $args = $_[0]; # Ref d'array contenant les données
    my $chan = lc shift @$args;

    
    my $auth = 0;
    foreach my $c (@AutoJoinOnInvite::channels)
    {
        $auth = 1 if $c eq $chan;
    }
    
    if ($auth)
    {
        Xchat::command("join $chan");
    }
    
    return Xchat::EAT_NONE;
}

1;