(RADIATOR) More questions!

Adam Armstrong lists at memetic.org
Tue Aug 21 16:27:11 CDT 2007


Hugh Irvine wrote:
>
> Hello Adam -
>
> You can use hooks in your Radiator configuration file to do whatever 
> special processing you require.
>
> There are many example hooks in "goodies/hooks.txt" in the Radiator 
> distribution.
Aha!

I'm not a perl person, but i think maybe be able to work out how to do it...

        PostAuthSelectHook sub{ \
                       my($self,$name,$p,$user,$row)=@_;\
                       my $ip = $row->[3];\
                       if($ip) {\
                          &main::log($main::LOG_INFO,"IP : $ip");\
                          $_[2]->add_attr('Framed-IP-Address', "$ip");\
                          $_[2]->add_attr('Framed-IP-Netmask', 
"255.255.255.255");\
                       }\
                 }


This adds a log entry when it sees an IP address, but it doesn't add an 
attribute? Can i add an attribute here?

Can I store the IP information somewhere (i don't really understand perl 
variables, just seems like crazy punctuated voodoo too me!) to use later 
on, in a PostAuthHook?

Thanks,
adam

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list