saviola777 / hhm-plugins

Plugins for the Haxball Headless Manager (HHM).
MIT License
3 stars 5 forks source link

sav/roles crashes room when removing admin #1

Closed morko closed 5 years ago

morko commented 5 years ago
VM40:171 Uncaught (in promise) TypeError: getPlayerAuth(...).delete is not a function
    at Proxy.removePlayerRole (eval at _executePlugin (PluginLoader.js:39), <anonymous>:171:53)
    at Proxy.setPlayerRole (eval at _executePlugin (PluginLoader.js:39), <anonymous>:204:14)
    at onPlayerAdminChangeHandler (eval at _executePlugin (PluginLoader.js:39), <anonymous>:279:8)
    at TrappedRoomManager._executeHandler (TrappedRoomManager.js:83)
    at TrappedRoomManager.onExecuteEventHandlers (TrappedRoomManager.js:465)
    at room.(anonymous function) (https://haxplugins.tk//hhm.js:520:41)
    at sa.u.ye (headless-min.js:61)
    at N.apply (headless-min.js:95)
    at xa.Ge (headless-min.js:43)
    at xa.Pb (headless-min.js:44)

Happens on this line: https://github.com/saviola777/hhm-plugins/blob/ffcf3f56749811e47b5a4840ba12e5ac99f3eae9/src/sav/roles.js#L169

morko commented 5 years ago

Here is my config for the plugin:

  'sav/roles': {
    roles: {
      'admin': haxroomie.adminPassword || 'haxroomie'
    },
  }