From: pdbogen Date: Wed, 12 Sep 2007 21:55:07 +0000 (+0000) Subject: Fix some option handling for servers X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=3d32d0e15f0d42fccd9f00402f8720a975869277;p=destult.git Fix some option handling for servers git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@27 088b83a4-0077-4247-935c-42ec02c2848b --- 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'" );