Auto-Identify to Anope NickServ on IrCQNet

By gooshie on Apr 11, 2010

Place this snippet into your xchat user folder to auto-identify to NickServ on IrCQNet. You must have the password set within Network list. The advantage to adding this is that it will identify even after you have connected and change to another nickname for instance if you have an away nick. This snippet could be easily adapted to any server.

Image

# Name:     idicqns-1.0.pl
# Version:  1.0
# Author:   gooshie <http://www.hawkee.com/profile/58973/>
# Date:     2010-04-11
# Description:  Auto-Identify to Anope NickServ on IrCQNet

# Version History at end of file

# No changes needed within this file

use strict;
use warnings;
use Xchat qw(:all);

my ($serv,$ns,$t_hook) = ('\.icq\.aol\.com$',':NickServ!services@icq.com','');
my %msg = (
':This nickname is registered and protected.  If it is your' => 1,
":nick, type \x02/msg NickServ IDENTIFY \x1Fpassword\x1F\x02.  Otherwise," => 1,
':please choose a different nick.' => 1,
':If you do not change within one minute, I will change your nick.' => 1,
':If you do not change within 20 seconds, I will change your nick.' => 1,
);

hook_server('NOTICE', sub {
        if ((get_info('server') =~ /$serv/) && ($_[0][0] eq $ns) && ($msg{$_[1][3]})) {
                if ($t_hook) { unhook($t_hook) }
                $t_hook = hook_timer(2222, sub {
                    command("ns identify ".get_info('nickserv')."");
                    return REMOVE;
                });
                return EAT_XCHAT;
        }
        return EAT_NONE;
    });

my ($name, $version) = ('Ident IrCQnet NickServ', '1.0');
register($name, $version, 'Auto-Identify to Anope NickServ on IrCQNet');
prnt("$name $version Loaded");

__END__

Version History:
0.1  2010-04-07 Initial Code
0.2  2010-04-08 Added Timer so all identify lines trigger but only one reply
0.3  2010-04-10 Put NickServ messages in hash
1.0  2010-04-11 Cleaned up code, finally released

Comments

Sign in to comment.
jsg55   -  Apr 22, 2010

good job gooshie, and its nice to see someone posting a perl snippet on here lol.

 Respond  
Spoof   -  Apr 22, 2010

w0w and I'm posting simple pop up menu scripts in mIRC... You smart kids. lol

 Respond  
gooshie   -  Apr 12, 2010

Jethro,
A few months ago I switched to using linux. I began using Xchat because mIRC does not run well in wine. Also, this allows me to learn perl and I hope to post more perl scripts here in the future. I have a couple I am working on that run on their own without Xchat.

edgy,
You are correct most installations install python support and if not can be added as can ruby and tcl. There may be support for other languages as well. Most people choose to create Xchat add-ons in perl and the perl support module is possibly better written.

 Respond  
edgy   -  Apr 12, 2010

Perl is quite nice on XChat, I believe that XChat supports Python too but I do not see that many Python scripts on the web that are made for XChat.

 Respond  
Jethro   -  Apr 12, 2010

When have you gone Perl, gooshie? :p

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.