Permalink
Browse files

Add ability to configure the username/ident

Add 'username <username>' to the Server configuration
If it doesn't exists, old method applies
If it does exist, it will log in and display as user defined
  • Loading branch information...
1 parent ee0bb4d commit b85e2deee0614ef252a3c6ab79a99af0f7374f74 @an0maly an0maly committed Apr 6, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 radicalweed.pl
View
7 radicalweed.pl
@@ -10,13 +10,20 @@
my %config = read_config();
while( my ($server_addr,$server) = each %{$config{server}} ) {
+ my @username;
+
+ if( exists $server->{username} && defined $server->{username} ) {
+ @username = ( username => $server->{username} );
+
+ }
print "setting up $server_addr...\n";
# We create a new PoCo-IRC object
my $irc = POE::Component::IRC->spawn(
nick => $server->{nick},
ircname => $server->{description},
+ @username,
server => $server_addr,
) or die "Oh noooo! $!";

0 comments on commit b85e2de

Please sign in to comment.