Help - Search - Members - Calendar
Full Version: Xchat - Auto-identify/ghost & join channels.
#Help Board > Users Section > Βοήθεια για Linux/Unix Clients
zamanfou
Kanei ghost kai identify to nick mas prwta kai meta join ta channels tis @channels list.

CODE
#!/usr/bin/perl
# $user kai $pass ta allazoume :)
# opws kai tin @channels list
no warnings;

my $nick = 'To-nick-mas-edw';
my $pass = 'kai-o-kwdikos';

Xchat::register('ns','v0.1','Auto-identify/recover nick');
Xchat::hook_server('433',r433);
Xchat::hook_server('376',r376);
Xchat::hook_server('NOTICE',notice);

my @channels = ('#channel1','#channel2','#channel3');

sub r433 {
    Xchat::command("MSG nickserv ghost $nick $pass");
}

sub r376 {
    Xchat::command("NICK $nick")
}

sub notice {
    my $data = "@{$_[0]}";
    my $tmpnick = Xchat::get_info('nick');
    if ($data =~ /:(\S+)!(\S+)@(\S+) NOTICE $tmpnick :(.*)/i) {
        ($id,$ident,$host,$msg) = ($1,$2,$3,$4);
        if ($id eq 'NickServ' && $ident eq 'service' && $host eq 'irc.gr') {
            if ($msg =~ /This nickname is registered and protected. If it is your/i) {
                Xchat::command("MSG $id IDENTIFY $pass")
            }
            if ($msg =~ /Ghost with your nick has been killed/i) {
                Xchat::command("NICK $nick")
            }
            if ($msg =~ /Password accepted - you are now recognized/) {
                if (Xchat::get_info('nick') eq $nick) {
                    foreach my $x (0..$#channels) {
                        Xchat::command("JOIN $channels[$x]")
                    }
                }
            }
        }
    }
    Xchat::EAT_NONE
}


Gia lazy idlers :)
dbk
efxaristw gia to script.
Alla prospathei na kanei identify me to sygekrimeno nick se opoiondhpote server syndeomai, dn tha prepe na to kanei mono gia to grnet?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.