Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add ability to register/identify the nick

Add 'password <password>' to the server section of the configuration
No attempt to encrypt the password as it is passed somewhat plain text across
the pipe anyway

This does a very basic job looking for the server to say that the nick is
registered and that you need to identify yourself.  When it receives that
message, it sends the expected /msg NickServ identify <password> message.

This is to support FreeNode.
  • Loading branch information...
commit 0f28177b6269eaec9ddcb571a719a82bf1e79c7e 1 parent b85e2de
Brian Kurle an0maly authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 radicalweed.pl
19 radicalweed.pl
View
@@ -59,6 +59,25 @@
$irc->yield( mode => "#$channel" => '+o' => $nick );
}
},
+
+ irc_notice => sub {
+ my ( $sender, $what, $message ) = @_[ ARG0 .. ARG2 ];
+ my $i = 0;
+
+ if( $sender =~ /NickServ/i && $message =~ /This nickname is registered/ ) {
+
+ # do we have a password for our nick for this server?
+ if( exists $config{server}{$server_addr}{password} ) {
+ # Register our nick
+ $irc->yield( privmsg => 'NickServ', "identify " . $config{server}{$server_addr}{password} );
+ return;
+
+ }
+
+ }
+
+ },
+
},
heap => { irc => $irc },
);
Please sign in to comment.
Something went wrong with that request. Please try again.