Hi
I just added support to Magicka to work with a database called
IP2Location.
It adds 2 lua functions you can use in your scripts:
bbs_ip_address
will return the ip address as a string.
bbs_ip_info
will return the countrycode, country, region and city of the ip address.
I've included a sample login_stanza_ipdata.lua (which should be renamed
to login_stanza.lua if you want to use it..)
The data base isn't included in magicka git, as zipped up it's about 60Mb (unzipped about 250Mb)
You can download a prepared sqlite3 database here:
https://magickabbs.com/index.php/source-code
This site or product includes IP2Location LITE data available from
http://www.ip2location.com.
You will need to add the location of the database into the paths section
of your bbs.ini
eg:
IPData Database = /home/andrew/MagickaBBS/ipdata.sq3
if you don't want to use it, just comment that out or don't put it in
your ini file :)
Andrew
--- MagickaBBS v0.12alpha (Linux/x86_64)
* Origin: The Fat Sandwich - sandwich.hopto.org:2023 (21:1/125)