(RADIATOR) Editing Reply-Message

Toomas Kärner tomkar at estpak.ee
Thu Oct 10 09:25:23 CDT 2002


Got it working. If interests anybodu then:

PostAuthHook    sub { \
my $originalmessage=${$_[3]}; \
my $mymessage; \
    if (${$_[2]} == $main::REJECT  )  {\
    $_=$originalmessage; \
    if(/NAS-Port/) { \
        $mymessage='This card is not vaild in this access zone.'; \
        } \
    if(/Password/) { \
        $mymessage='Password kind\'a sucks'; \
        } \

    if(/StringLookedForInRelpy/) { \
        $mymessage='My New Message'; \
        } \

    ${$_[3]}=$mymessage; \
    } \
}


----- Original Message -----
From: "Toomas Kärner" <tomkar at estpak.ee>
To: <radiator at open.com.au>
Sent: Thursday, October 10, 2002 12:12 PM
Subject: (RADIATOR) Editing Reply-Message


> Hi All,
>
> I have seen in the examples and it also partly works but not as I would
> expect.
>
> PostAuthHook    sub { \
>         ${$_[1]}->change_attr('Reply-Message' , 'MyMessage') \
>         if (${$_[2]} == $main::REJECT  ); \
> }
>
> results in:
>
> Code:       Access-Reject
> Identifier: 208
> Authentic:  5<8><0><0>=`<0><0><231>;<0><0>oY<0><0>
> Attributes:
>         Reply-Message = "MyMessage"
>         Reply-Message = "Bad Password"
>
> Somehow it results in two Reply-Messages, but I would like to send only
> mine.
>
> Rgds.
> Toomas
>
>
> ===
> 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.
>

===
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