How best to store names and IP addresses in SQLite?
#2

The way I did this was to store name/IP pairs. I'm not if there's a better way but it seems to fit sqlite quite well. It also means you can store stuff like the last time they were online, and the total time they've been online.

Here's the functions I used http://pastebin.com/f52d88c15

Alias_Add should be used when they connect
Alias_Update when they leave (you'll need to store their IP since GetPlayerIp returns 255.255.255.255 in OnPlayerDisconnect)

The alias is the names used by the same IP, alias2 is the names on the same range, and alias3 is the names use by the player's previous IPs
Reply


Messages In This Thread
How best to store names and IP addresses in SQLite? - by Outbreak - 08.12.2009, 19:32
Re: How best to store names and IP addresses in SQLite? - by Dabombber - 09.12.2009, 06:20

Forum Jump:


Users browsing this thread: 1 Guest(s)