diff --git a/protocols/clientbot.py b/protocols/clientbot.py index 898d9b1..4f2e0c4 100644 --- a/protocols/clientbot.py +++ b/protocols/clientbot.py @@ -170,6 +170,8 @@ class ClientbotBaseProtocol(PyLinkNetworkCoreWithUtils): def part(self, source, channel, reason=''): """STUB: Parts a user from a channel.""" + if self.pseudoclient and source == self.pseudoclient.uid: + raise NotImplementedError("Explicitly leaving channels is not supported here.") self._channels[channel].remove_user(source) self.users[source].channels.discard(channel) self.call_hooks([source, 'CLIENTBOT_PART', {'channel': channel, 'text': reason}])