function DataArrival(curUser, sData) if(strsub(sData, 1, 7) == "$MyINFO") then if(curUser.iVersion == nil) then curUser:SendPM("test", "Your client is stupid"); curUser:Disconnect(); return; end if(strfind(curUser.iVersion, "^1.0091$") and curUser.bOperator == nil) then -- the . is a magic char on purpose curUser:SendData("$GetNetInfo|"); end end if(strsub(sData, 1, 8) == "$NetInfo") then local info = strsub(sData, 9, -1); local s, e, slots, hubs, mode, cap = strfind(sData, "^%$NetInfo (%d+)%$(%d+)%$(%w)%$*(%d*)%|$"); if(s == nil) then curUser:Disconnect();-- the search failed, incorrect NetInfo elseif(cap == "") then curUser:SendData("Hub-Security", "Please download the latest Neo Modus Client"); curUser:Disconnect(); else slots = tonumber(slots) or 0; hubs = tonumber(hubs) or -1; -- second value is for invalid number cap = tonumber(cap) or -1; -- second value is for invalid number -- do what you want with the rest of the stuff above -- slots: duh -- hubs: all open hubs (even if OP and even if the user isn't connected :-\ ) -- mode: A or P -- cap: kB/sec upload cap end return 1; end return 0; end