Fix user disconnects from source plugin

- transitionGoneUser tried to remove disconnected users
  from groups on the server. Now only done for users still
  connected.
This commit is contained in:
Stefan Hacker 2013-04-05 14:33:10 +02:00
parent 2348d1a655
commit a8707696a0

View File

@ -209,9 +209,10 @@ class source(MumoModule):
assert(old)
self.users.remove(sid, old.state.session)
self.removeFromGroups(mumble_server, old.state.session, old.game, old.server, old.identity["team"])
if new:
self.removeFromGroups(mumble_server, old.state.session, old.game, old.server, old.identity["team"])
bcid = self.cfg().source.basechannelid
self.dlog(sid, old.state, "User stopped playing. Moving to %d.", bcid)
self.moveUserToCid(mumble_server, new.state, bcid)