This question may be related to a resolved thread.
The fact that the {ip_address} variable is inaccessible within the module—seems to me like a bug to be fixed. Using the $SESS variable and putting my template into PHP Input mode means I have to do a lot of awkwardness.