According to the API, SetMan.GetHubBot() should return the values bEnabled and bUseAsHubSecAlias as boolean.
However, these are returned as integer or nil (1/nil)
Tested on PtokaX 0.4.1.1 (Win32 GUI edition)
local tBot = SetMan.GetHubBot()
Core.SendToAll("<test> Showing values returned by SetMan.GetHubBot...|")
for k in pairs(tBot) do Core.SendToAll("<"..k.."> "..tostring(tBot[k]).."|") end
Core.SendToAll("<test> Using SetMan.SetHubBot with values returned by SetMan.GetHubBot...|")
Core.SendToAll("<SetMan.SetHubBot with SetMan.GetHubBot values result> "..tostring(SetMan.SetHubBot(tBot.bEnabled, tBot.sNick, tBot.sDescription, tBot.sEmail, tBot.bUseAsHubSecAlias)).."|")
Quote from: result
[23:21:04] <test> Showing values returned by SetMan.GetHubBot...
[23:21:04] <sDescription> Leviathan v4.1.1 from C??o?y†? & T?M?†r?V?ll?R
[23:21:04] <sEmail> LV_4@Bot.Hub
[23:21:04] <sNick> Leviathan_4.1
[23:21:04] <bEnabled> 1
[23:21:04] <bUsedAsHubSecAlias> 1
[23:21:04] <test> Using SetMan.SetHubBot with values returned by SetMan.GetHubBot...
[23:21:04] <Flaindead_Bry> [Error] xxxxxxxxx: bad argument #1 to 'SetHubBot' (boolean expected, got number)
The error shows that the expected types for SetMan.SetHubBot are correct though so the problem is limited to SetMan.GetHubBot :)
Found and fixed ::)
I know, and same for profile permissions :P
;D I didn't test em all. I found these by accident while I was looking (without finding) a way to update registered bots information without having to Unreg/Reg.
But thnx for the fixes :)