MCPcopy Create free account
hub / github.com/Syncplay/syncplay / removeUser

Method removeUser

syncplay/client.py:1467–1480  ·  view source on GitHub ↗
(self, username)

Source from the content-addressed store, hash-verified

1465 self.userListChange(room)
1466
1467 def removeUser(self, username):
1468 hideFromOSD = not constants.SHOW_DIFFERENT_ROOM_OSD
1469 if username in self._users:
1470 user = self._users[username]
1471 if user.room:
1472 if self.isRoomSame(user.room):
1473 hideFromOSD = not constants.SHOW_SAME_ROOM_OSD
1474 if username in self._users:
1475 self._users.pop(username)
1476 message = getMessage("left-notification").format(username)
1477 self.ui.showMessage(message, hideFromOSD)
1478 self._client.lastLeftTime = time.time()
1479 self._client.lastLeftUser = username
1480 self.userListChange()
1481
1482 def __displayModUserMessage(self, username, room, file_, user, oldRoom):
1483 if file_ and not user.isFileSame(file_):

Callers

nothing calls this directly

Calls 4

isRoomSameMethod · 0.95
userListChangeMethod · 0.95
getMessageFunction · 0.90
showMessageMethod · 0.45

Tested by

no test coverage detected