From a post made in General Help and Support, I realised ULX 1.13 had no 'unban' command.
Either place the following code into a file such as gmod9/lua/ulx/modules/ulx_unban.lua (Recommended)
or, place this in your gmod9/lua/ulx/ulx_utils.lua file (NOT recommended, ULX v1 updates/re-installs would overwrite)
-- cc_ulxUnBan - responds to ulx_unban <user> or <steamid>, unbans the specified player/steamid
function cc_ulxUnBan( userid, args, argv, argc )
if argv[1] == nil then
return
end
if (string.find (argv[ 1 ],"STEAM",1,true) ~= nil) then
local unbanid = argv[1]
end
if unbanid == nil then
local target = getUser( userid, argv[1] )
if target == nil then -- something really went wrong. Panic out.
_PrintMessage(userid, HUD_PRINTCONSOLE, "Incorrect user or parameters. Make sure proper user, or STEAM is all caps.")
return
else
if _PlayerInfo( target, "connected" ) then
_ServerCommand( "removeid " .. _PlayerInfo( target, "networkid" ) .. ";writeid\n" )
ulx_log( "Admin " .. ulx_playerString( userid ) .. " unbanned player " .. ulx_playerString( target ) )
end
end
else
_ServerCommand( "removeid " .. unbanid .. ";writeid\n" )
ulx_log( "Admin " .. ulx_playerString( userid ) .. " unbanned steamid " .. ulx_playerString( unbanid ) )
end
end
ULX_CONCOMMAND( "ulx_unban", cc_ulxUnBan, ACCESS_BAN, "[user] or [STEAM:ID:BLAH] - unbans the specified player ", 1, "!unban" )
If the person isn't currently on your server (either you've kicked or they've left), you MUST know the SteamID of the user to remove.
Change the 'ACCESS_BAN' in the last line to something requiring higher access if you want.
This is untested code. Let me know if it doesn't work. Please, not "This doesn't work"
Let me know exact errors/details if any.
Edit 1: Removed ulx_PlayerString per Megiddo's reply. Thanks!