Forums » Bugs

GetKeyInfo(): Return value 6

May 10, 2011 draugath link
I've been working on a plugin lately related to managing keys. This has led me to use the API function GetKeyInfo() in order to verify various key related information. Return value 6 appears to be a table consisting of an ascending sorted list of character ids, one per numeric index.

The first discovery I made which seemed kind of odd is that this return value is nil unless you have an active owner key to the station in question. This is odd since someone with a user key can use the the interface dialog associated with managing the user key to see a list of other characers with that key.

The second thing I noticed is that this table appears to be inconsistently populated.

* If you use the User Key management dialog to give someone a user key, the dialog appears to be updating the list which is returned by GetKeyInfo() with the name (in quotes) of the user added. If you close and then reopen this dialog, it updates the list by removing the name and putting in the proper character id.

* If you use the Owner Key management dialog to give someone a user key, the dialog does not update this list until such time as you view the user key information from the User Key dialog. At this time, the list is updated with the character id.

* If you use Keychain.giveuserkey() or Keychain.revokekey(), the list is not updated until you view the list from the User Key dialog, just like when using the Owner Key dialog.

In all cases, the proper access permissions appear to be given to the character, even though they aren't appearing in the list returned by GetKeyInfo()'s sixth return value.