http://lexi.org.uk/modules/sourcebans.lua
I don't see where or how its getting the admins table.
Two specific areas I see.
The database query is set up first apparently. I say 'apparently' because 1) I don't know the gm_mysqloo lua syntax. 2) I don't know SQL from scratch (I'm just decent at reading code/queries related to SQL)
In --[[ Tables ]]--, -- Admins
["Select Admins"] = "SELECT a.aid, a.user, a.authid, a.srv_group, a.srv_flags, a.immunity FROM %s_admins a, %s_admins_servers_groups g WHERE g.server_id = %i AND g.admin_id = a.aid";
And the actual function that seems to read / use that data; under "--[[ Query Functions ]]--"
It sets the data local, and the function is titled loadadmins.
function loadAdmins()
admins = {};
adminGroups = {};
adminsByID = {};
local query = database:query(queries["Select Admin Groups"]:format(config.dbprefix));
query.onFailure = adminGroupLoaderOnFailure;
query.onSuccess = adminGroupLoaderOnSuccess;
query:start();
notifymessage("Loading Admin Groups . . .");
end
So, summarized, with what little I know of SQL and GM SQLOO syntax, but what I do know of lua, it seems that code expects any "admin" passed to the admin variable sourceban command to be an admin in Sourcebans too. Otherwise, Sourceban's ignores them, sets it as nil, which then makes it 'console' set the ban.
Best, but not necessarily easiest way, to work around that, would be to have Lexic modify to allow the API to pass non sourcebans admins, and validate/look the player object up when passed.