0 Members and 2 Guests are viewing this topic.
if !ulx then return endfunction ulx.cc_removeuser( ply, command, argv, args ) if #argv < 2 then if #argv ~= 0 then ULib.tsay( ply, ulx.LOW_ARGS ) else ULib.console( ply, "ulx removeuser <user>" ) ULib.console( ply, "user - The user to remove" ) ULib.console( ply, "This user WILL be removed to the permanent users list!" ) end return end local target, err = ULib.getUser( argv[ 1 ], _, ply ) if not target then ULib.tsay( ply, err ) return end if target:IsUserGroup( ULib.ACCESS_SUPERADMIN ) and ply:IsValid() and not ply:IsListenServerHost() then ULib.tsay( ply, "Sorry, for security reasons, you can't change the access of a superadmin!" ) return end local info = ULib.ucl.authed[ target ] if info.type == "guest" or info.type == "listen host" then ULib.ucl.removeUser( target:Nick(), true ) else ULib.ucl.removeUser( info.account, true ) end ulx.logUserAct( ply, target, "#A removed user #T from group \"" .. group .. "\"" )endulx.concommand( "removeuser", ulx.cc_removeuser, "<user> - Use with no args for more help.", ULib.ACCESS_SUPERADMIN, _, _, ulx.ID_PLAYER_HELP )