From 4b7af20f49204102187437abfeb4b1916ee2397b Mon Sep 17 00:00:00 2001 From: Jared Johnson Date: Mon, 15 Sep 2014 10:40:46 -0500 Subject: [PATCH] Fix pattern substitution in user_config plugin --- plugins/user_config | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/user_config b/plugins/user_config index 2ce405b..1315265 100644 --- a/plugins/user_config +++ b/plugins/user_config @@ -33,11 +33,12 @@ sub init { } sub hook_user_config { - my ($self,$txn,$user,$conf) = @_; + my ($self,$txn,$addr,$conf) = @_; my $path = $self->{pattern} or return DECLINED; - $path =~ s/%u/$user->user/g; - $path =~ s/%h/$user->host/g; - $path =~ s/%a/$user->address/g; + my ( $user, $host, $address ) = ( $addr->user, $addr->host, $addr->address ); + $path =~ s/%u/$user/g; + $path =~ s/%h/$host/g; + $path =~ s/%a/$address/g; my $filename = "$path/$conf"; return DECLINED unless -f $filename; my $fh;