Alan Dekok wrote:
Wichert Akkerman wrote:
Perhaps it would be interesting if a module could register a function for the 'not a real language'. That would allow the realm module to allow you to do something like:
if (HasRealm('IPASS', %{User-Name})) { ... }
(cough) As always, patches are welcome. :)
But yes, that's a good idea. The only problem is that the unlanguage ends up turning into something like PHP, which worries me.
Mmm realms # Ipass if("%{User-Name}" ~= "^([-._[:alnum:]]*)/([-._[:alnum:]]*)$"){ update request { Stripped-User-Name = "%{2}" Realm := "%{1}2 } } # @ if("%{User-Name}" ~= "^([-._[:alnum:]]*)@([-._[:alnum:]]*)$"){ update request { Stripped-User-Name = "%{1}" Realm := "%{2}" } } # % if("%{User-Name}" ~= "^([-._[:alnum:]]*)%([-._[:alnum:]]*)$"){ update request { Stripped-User-Name = "%{1}" Realm := "%{2}" } } # NT if("%{User-Name}" ~= "^([-._[:alnum:]]*)\\\\([-._[:alnum:]]*)$"){ update request { Stripped-User-Name = "%{2}" Realm := "%{1}" } } update config { Proxy-To-Realm := "%{Realm}" } Ooo can you use group declerations with the new unlanguage ? group realms { ... }