Skip to content

Commit

Permalink
Merge pull request #79 from Aperture-Development/development
Browse files Browse the repository at this point in the history
Update v1.4
  • Loading branch information
ApertureDevelopment authored Mar 6, 2022
2 parents 4dcdf8d + e06c6f3 commit 66c9f5a
Show file tree
Hide file tree
Showing 12 changed files with 413 additions and 372 deletions.
8 changes: 4 additions & 4 deletions lua/msync/client_gui/cl_admin_gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ function MSync.AdminPanel.InitMySQL( sheet )
info:InsertColorChange(10, 10, 10, 255)
info:AppendText("Copyright 2018 - Aperture Development")

info.Paint = function( pnl, w, h )
info.Paint = function( parentPanel, w, h )
draw.RoundedBox( 5, 0, 0, w, h, Color(215, 215, 215) )
end

info.ActionSignal = function( pnl, signalName, signalValue )
info.ActionSignal = function( parentPanel, signalName, signalValue )
if signalName == "TextClicked" then
if signalValue == "OpenWebsite" then
gui.OpenURL( "https://www.Aperture-Development.de" )
Expand Down Expand Up @@ -243,7 +243,7 @@ function MSync.AdminPanel.InitMySQL( sheet )
end
end

if not MSync.settings == nil then
if MSync.settings and MSync.settings.mysql then
mysqlip:SetText(MSync.settings.mysql.host)
mysqlport:SetText(MSync.settings.mysql.port)
mysqldb:SetText(MSync.settings.mysql.database)
Expand Down Expand Up @@ -330,7 +330,7 @@ function MSync.AdminPanel.InitModuleSettings( sheet )
local files, _ = file.Find("msync/client_gui/modules/*.lua", "LUA")

for k, v in pairs(files) do
local info = include("msync/client_gui/modules/"..v)
local info = include("msync/client_gui/modules/" .. v)

if MSync.moduleState[info["ModuleIdentifier"]] then
MSync.modules[info.ModuleIdentifier]["init"]()
Expand Down
10 changes: 5 additions & 5 deletions lua/msync/client_gui/cl_modules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MSync.modules = MSync.modules or {}
function MSync.loadModules()
local files, _ = file.Find("msync/client_gui/modules/*.lua", "LUA")
for k, v in pairs(files) do
include("msync/client_gui/modules/"..v)
include("msync/client_gui/modules/" .. v)
end
MSync.initModules()
end
Expand All @@ -27,7 +27,7 @@ function MSync.initModules()
v["net"]()
v["ulx"]()
v["hooks"]()
MSync.log(MSYNC_DBG_INFO, "["..v["info"]["Name"].."] Module loaded")
MSync.log(MSYNC_DBG_INFO, "[" .. v["info"]["Name"] .. "] Module loaded")
end
end

Expand All @@ -46,7 +46,7 @@ function MSync.loadModule(path)
MSync.modules[info.ModuleIdentifier].ulx()
MSync.modules[info.ModuleIdentifier].hooks()

MSync.log(MSYNC_DBG_INFO, "["..MSync.modules[info.ModuleIdentifier]["info"]["Name"].."] Module loaded")
MSync.log(MSYNC_DBG_INFO, "[" .. MSync.modules[info.ModuleIdentifier]["info"]["Name"] .. "] Module loaded")

end

Expand All @@ -61,7 +61,7 @@ function MSync.enableModule( module )
MSync.modules[module].net()
MSync.modules[module].ulx()
MSync.modules[module].hooks()
MSync.log(MSYNC_DBG_INFO, "["..MSync.modules[module]["info"]["Name"].."] Module loaded")
MSync.log(MSYNC_DBG_INFO, "[" .. MSync.modules[module]["info"]["Name"] .. "] Module loaded")
else
MSync.log(MSYNC_DBG_WARNING, "Cannot enable non-existant module \"" .. module .. "\"")
end
Expand All @@ -76,7 +76,7 @@ function MSync.disableModule( module )
if MSync.modules[module] then
if MSync.modules[module].disable then
MSync.modules[module].disable()
MSync.log(MSYNC_DBG_INFO, "["..MSync.modules[module]["info"]["Name"].."] Module disabled")
MSync.log(MSYNC_DBG_INFO, "[" .. MSync.modules[module]["info"]["Name"] .. "] Module disabled")
else
MSync.log(MSYNC_DBG_WARNING, "Cannot disable outdated module \"" .. module .. "\"")
end
Expand Down
4 changes: 2 additions & 2 deletions lua/msync/client_gui/cl_net.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ net.Receive( "msync.sendMessage", function( len, pl )
local state = net.ReadString()

if state == "error" then
chat.AddText(Color(255,0,0),"[MSync_ERROR] "..net.ReadString())
chat.AddText(Color(255,0,0),"[MSync_ERROR] " .. net.ReadString())
elseif state == "advert" then
chat.AddText(Color(255,255,255), "[MSync] ", Color(0,0,255), net.ReadString())
else
chat.AddText(Color(255,255,255), "[MSync] "..net.ReadString())
chat.AddText(Color(255,255,255), "[MSync] " .. net.ReadString())
end
end )

Expand Down
Loading

0 comments on commit 66c9f5a

Please sign in to comment.