Binary Module Request Thread

Hi. Summer is starting to bore me, so I’m looking for more projects to occupy my time with. If you want lua bindings to anything, source engine or otherwise, request them here!
Note that I have a job irl, so I probably won’t be able to get every request done nor requests that are really big or intricate.

A decent/working geoIP module! There used to be one but AFAIK it’s broken currently. An update/fix to that would be great!

Linux luasockets

Actually, I can’t really see why you would need one
You could do something like this:

gameevent.Listen( "player_connect" )

function IPSearch( data )

	local name =
	local steam = data.networkid
	local ip = data.address
	local usrid = data.userid
	local bot =
	local index = data.index

	if ( !ip or ip == "" ) then

	local exploded = string.Explode(":", ip)

	if ( !exploded or exploded == "" or exploded == "localhost" ) then

	http.Fetch(""..exploded[1], function(body, len, headers, code)
		IPCallback( name, steam, body )

hook.Add("player_connect", "GetIPInfo", IPSearch)

function IPCallback( name, steam, contents )
	local tab = string.Explode(",", contents)
	local ip = tab[1]
	local country = tab[3]
	if ( !country ) then return end

	country = string.gsub(country, [["]], [[]])
	ip = string.gsub(ip, [["]], [[]])

	if ( country == "United States" ) then
		country = "The USA"

	local basetext = name .. " has joined the server from " .. " (" .. steam .. ")"
	print( basetext .. " [" .. ip .. "] !")

	for k,v in pairs(player.GetAll()) do
		v:ChatPrint( basetext .. " !")


Why not make it send the country code of that system to the server instead, and have the server process it? It’s a much simpler way than messing with GeoIP.


These may be of use too:

local countries = {
	["US"]="the United States",
	["GB"]="the United Kingdom",
	["KR"]="South Korea",
	["NZ"]="New Zealand",
	["AE"]="the UAE",
	["NL"]="the Netherlands",
	["AN"]="the Netherlands [Antilles]",
	["NZ"]="New Zealand",
	["HK"]="Hong Kong",
	["CN"]="the D.P.R.O. China",
	["FX"]="Metropolitan France",
	["KP"]="the D.P.R.O. Korea",
	["LY"]="Libyan Arab Jamahiriya",
	["SI"]="Slovakia [Republic of]",
	["TW"]="Taiwan, China",
	["TT"]="Trinidad & Tobago",
	["UM"]="a United States Minor Island",
	["IE"]="the Republic of Ireland",
	["CZ"]="the Czech Republic",
	["PF"]="French Indonesia",
	["KY"]="Cayman Islands",

Dunno if the locale changes it though. My PC is set to japanese, would lua think I’m in japan?

Most likely, though it’s not something I’ve tried really experimenting with.

My code was simply an example, the tab contains more than just the ip and the country

Okay, so am I or am I not working on the geoip module?

Never done a linux module before, so as long as garry’s module crap doesn’t throw a fit, I’ll give it a go. What specifically do you want?

[editline]12th July 2014[/editline]

Wow, nerd.

Seems that I’ve forgotten to send newest binaries, compile yourself from svn://

Original thread:


Windows and linux working (plus ipv6 support)

If you would like to add your own project there or contribute a fix leave a steam/facepunch profile message.

Can you get a http listing of that svn server. I haven’t installed an svn client in years and don’t intend to!


gm_vfs for gmod 13.

Because there are so many good things to be made from creating (read:downloading) files in-game without making the entire filesystem vulnerable

To quote coldfusion in that thread:

As the owner of a server, in order to do the downloading crap you want to do, you’d need to have each client install this module.

Unless you want a module that just gives you unrestricted file i/o?

I’m fine requiring that clients install it as long as I can implement a check that it’s loaded

And I actually am looking for “unrestricted” i/o but only within the garrysmod directory (or a search path within it like vfs uses), if a server owner asked me to install a completely unrestricted i/o module I’d probably say hell no

EDIT: The reason I am looking for this specifically is to implement a new pac3 part that lets players with this module loaded load mdl/vtf/etc files from URL. Players without the module would just see an error, but players with the module would download the models and precache them, so then the source engine could just handle them normally

What’s the point of binary modules?
I request that we team up and write some

Ben Jojo’s svn out

Binding shit to gmod’s lua interface for fun and profit.

For instance, I could bind sdk functions that people want but no one has made modules for, or I could bind stuff like winamp or whatever to a module.