PtokaX forum

PtokaX => Feature Proposals => Topic started by: PPK on 14 October, 2011, 00:19:43

Poll
Question: With IPv6 support in PtokaX user can have two IP adresses. One for IPv6 and one for IPv4. Question is if and how to add access to both from Lua API.
Option 1: Change User.sIP to table with both addresses (compatibility break). votes: 0
Option 2: Add User.sIPs with table contains both adresses. votes: 4
Option 3: Don't change anything, is enough to know one IP (ip that user use to connect to hub). votes: 3
Title: Multiple IPs for user in Lua API.
Post by: PPK on 14 October, 2011, 00:19:43
 8)
Title: Re: Multiple IPs for user in Lua API.
Post by: bastya_elvtars on 22 October, 2011, 19:27:17
How about User.sIP6?
Title: Re: Multiple IPs for user in Lua API.
Post by: PPK on 22 October, 2011, 19:52:08
That can cause compatibility problems to scripts expecting that tUser.sIP is not empty.. and with tUser.sIP6 it can be empty for IPv6 only users or when IPv4 check for IPv6 user fail  ::)
Title: Re: Multiple IPs for user in Lua API.
Post by: bastya_elvtars on 22 October, 2011, 20:24:01
But if sIP becomes a table (it is a string now IIRC), then it also causes incompatibility problems.  Maybe sIP should fall back to v6 when v4 is b0rked.
Title: Re: Multiple IPs for user in Lua API.
Post by: PPK on 22 October, 2011, 20:41:08
But then it will be confusing for scripters :( From my point of view when there will be tUser.sIP6 then i will expect that here will be IPv6 addres and in tUser.sIP will be IPv4 address not that it will change in some cases.
Title: Re: Multiple IPs for user in Lua API.
Post by: PPK on 02 May, 2012, 00:39:53
User.tIPs was added to build 386 :P