Skip to content

Commit

Permalink
Remove community and temp column from ban list
Browse files Browse the repository at this point in the history
  • Loading branch information
jlillis committed Nov 1, 2023
1 parent 175bd70 commit b8085e8
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions [admin]/admin2/client/main/admin_bans.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ function aBansTab.Create(tab)
guiGridListAddColumn(aBansTab.BansList, "Name", 0.22)
guiGridListAddColumn(aBansTab.BansList, "IP", 0.25)
guiGridListAddColumn(aBansTab.BansList, "Serial", 0.25)
guiGridListAddColumn(aBansTab.BansList, "Username", 0.25)
guiGridListAddColumn(aBansTab.BansList, "Date", 0.17)
guiGridListAddColumn(aBansTab.BansList, "Expires", 0.17)
guiGridListAddColumn(aBansTab.BansList, "Banned by", 0.22)
guiGridListAddColumn(aBansTab.BansList, "Temporary", 0.22)
aBansTab.Details = guiCreateButton(0.82, 0.07, 0.17, 0.04, "Details", true, aBansTab.Tab)
aBansTab.Ban = guiCreateButton(0.82, 0.12, 0.17, 0.04, "Add ban", true, aBansTab.Tab, "ban")
aBansTab.Unban = guiCreateButton(0.82, 0.17, 0.17, 0.04, "Unban", true, aBansTab.Tab, "unban")
Expand Down Expand Up @@ -76,7 +74,6 @@ function aBansTab.onBansListSearch()
((ban.nick and string.find(string.upper(ban.nick), text)) or
(ban.ip and string.find(string.upper(ban.ip), text)) or
(ban.serial and string.find(string.upper(ban.serial), text)) or
(ban.username and string.find(string.upper(ban.username), text)) or
(ban.banner and string.find(string.upper(ban.banner), text)))
then
aBansTab.AddRow(id, ban)
Expand Down Expand Up @@ -113,22 +110,12 @@ function aBansTab.AddRow(id, data)
guiGridListSetItemText(list, row, 1, data.nick or "Unknown", false, false)
guiGridListSetItemText(list, row, 2, data.ip or "", false, false)
guiGridListSetItemText(list, row, 3, data.serial or "", false, false)
guiGridListSetItemText(list, row, 4, data.username or "", false, false)
if (data.time) then
local time = getRealTime(data.time)
guiGridListSetItemText(
list,
row,
5,
time.monthday .. " " .. getMonthName(time.month) .. " " .. (1900 + time.year),
false,
false
)
if (data.unban) then
guiGridListSetItemText(list, row, 4, formatDate("m/d/y h:m", nil, data.unban), false, false)
else
guiGridListSetItemText(list, row, 5, "", false, false)
guiGridListSetItemText(list, row, 4, "Never", false, false)
end
guiGridListSetItemText(list, row, 6, data.banner or "", false, false)
guiGridListSetItemText(list, row, 7, iif(data.unban, "Yes", "No"), false, false)
guiGridListSetItemText(list, row, 5, data.banner or "", false, false)

guiGridListSetItemData(list, row, 1, id)
end
Expand Down

0 comments on commit b8085e8

Please sign in to comment.