#!/usr/bin/perl -w # # Implements auto-identify on Sorcery.net (irc.sorcery.net 9000) # Based on the PTlink auto-identify script # # By AsmodeusB (Mar 17, 2000) # IRC::print "\0035:: Auto-Ident for SorceryNet is loaded ::\003 \n"; IRC::add_message_handler("NOTICE", "identify"); IRC::register("NickServ Identify", "1.0", "", ""); # Enter your password here $my_password="password"; sub identify { my $line = shift(@_); $line =~ /:(.*)!(.*@.*) .*:(.*)/; my $nickfrom = $1; # Returns the server name you are currently on (works with multiple server connections) my $server = IRC::get_info(3); if ($nickfrom =~ /NickServ/) { if ($server =~ /\.sorcery\.net/) { if ($line =~ /If this is your nick please try: \/msg NickServ ID password/) { IRC::print("On a Sorcery.net server, sending identification to NickServ\n"); IRC::command("/msg NickServ identify $my_password"); return 1; } } else { IRC::print("Not on a sorcery.net server, from $nickfrom \n"); } } return 0; }