Skip to content

Commit 9b706c0

Browse files
Added SUP check #36
Added a SUP check to prevent the user from adding ranks with a leading empty space. Described in #36
1 parent 06a4546 commit 9b706c0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lua/msync/client_gui/modules/cl_mrsync.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ MSync.modules.MRSync = MSync.modules.MRSync or {}
66
* @package MySQL Rank Sync
77
* @author Aperture Development
88
* @license root_dir/LICENCE
9-
* @version 2.1.2
9+
* @version 2.1.3
1010
]]
1111

1212
--[[
@@ -16,7 +16,7 @@ MSync.modules.MRSync.info = {
1616
Name = "MySQL Rank Sync",
1717
ModuleIdentifier = "MRSync",
1818
Description = "Synchronise your ranks across your servers",
19-
Version = "2.1.2"
19+
Version = "2.1.3"
2020
}
2121

2222
--[[
@@ -72,7 +72,7 @@ function MSync.modules.MRSync.adminPanel(sheet)
7272
allserver_button:SetSize( 130, 20 )
7373
allserver_button.DoClick = function()
7474
if string.len(allserver_textentry:GetValue()) > 0 and not MSync.modules.MRSync.settings.nosync[allserver_textentry:GetValue()] and not MSync.modules.MRSync.settings.syncall[allserver_textentry:GetValue()] then
75-
if string.match(allserver_textentry:GetValue(), "^%s*$") or string.match(allserver_textentry:GetValue(), "%s+$") then return end
75+
if string.match(allserver_textentry:GetValue(), "^%s*$") or string.match(allserver_textentry:GetValue(), "^%s") or string.match(allserver_textentry:GetValue(), "%s$") then return end
7676
allserver_table:AddLine(allserver_textentry:GetValue())
7777
MSync.modules.MRSync.settings.syncall[allserver_textentry:GetValue()] = true
7878
allserver_textentry:SetText("")
@@ -119,7 +119,7 @@ function MSync.modules.MRSync.adminPanel(sheet)
119119
nosync_button:SetSize( 130, 20 )
120120
nosync_button.DoClick = function()
121121
if string.len(nosync_textentry:GetValue()) > 0 and not MSync.modules.MRSync.settings.nosync[nosync_textentry:GetValue()] and not MSync.modules.MRSync.settings.syncall[nosync_textentry:GetValue()] then
122-
if string.match(nosync_textentry:GetValue(), "^%s*$") or string.match(nosync_textentry:GetValue(), "%s+$") then return end
122+
if string.match(nosync_textentry:GetValue(), "^%s*$") or string.match(nosync_textentry:GetValue(), "^%s") or string.match(nosync_textentry:GetValue(), "%s$") then return end
123123
nosync_table:AddLine(nosync_textentry:GetValue())
124124
MSync.modules.MRSync.settings.nosync[nosync_textentry:GetValue()] = true
125125
nosync_textentry:SetText("")

lua/msync/server/modules/sv_mrsync.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ MSync.modules.MRSync = MSync.modules.MRSync or {}
66
* @package MySQL Rank Sync
77
* @author Aperture Development
88
* @license root_dir/LICENCE
9-
* @version 2.1.2
9+
* @version 2.1.3
1010
]]
1111

1212
--[[
@@ -16,7 +16,7 @@ MSync.modules.MRSync.info = {
1616
Name = "MySQL Rank Sync",
1717
ModuleIdentifier = "MRSync",
1818
Description = "Synchronise your ranks across your servers",
19-
Version = "2.1.2"
19+
Version = "2.1.3"
2020
}
2121

2222
--[[

0 commit comments

Comments
 (0)