From 3d32d0e15f0d42fccd9f00402f8720a975869277 Mon Sep 17 00:00:00 2001 From: pdbogen Date: Wed, 12 Sep 2007 21:55:07 +0000 Subject: [PATCH] Fix some option handling for servers git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@27 088b83a4-0077-4247-935c-42ec02c2848b --- core.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core.pl b/core.pl index 63b6249..3545c0a 100644 --- a/core.pl +++ b/core.pl @@ -112,12 +112,12 @@ sub on_start { $kernel->alias_set( "core" ); print( "CORE: Started.\n" ); for my $server ( split( / /, $Destult::config{ 'SERVERS' } ) ) { - $server =~ m'([^:]+)://([^/]+)(/[^/]+)*'i; - my( $prot, $host, $opts ) = ( $1, $2, $3 ); - print( "Connect to $host over $prot: $opts\n" ); + $server =~ m'([^:]+)://(.*)'i; + my( $prot, $rest ) = ( $1, $2 ); + my( $host, $opts ) = split( '/', $rest, 2 ); + print( "CORE: Connect to $host over $prot: $opts\n" ); if( $prot =~ /irc/i ) { my @opts = split( '/', $opts ); - shift @opts; push @{ $heap->{ 'servers' } }, irc::new( $host, shift @opts, @opts ); } else { die( "CORE: Unknown protocol: '$prot'" ); -- 2.11.0