def quit(self, quit_reason=''): """Invokes the before_quit hook of all loaded plugins before the QUIT message is sent to the server.""" # invoke system hook self.plugin_dispatcher.invoke_all("before_quit") BotBot.quit(self, quit_reason)