def _handle_other(self, arguments, command, source, tags):
        target = None
        if command == "quit":
            arguments = [arguments[0]]
        elif command == "ping":
            target = arguments[0]
        else:
            target = arguments[0] if arguments else None
            arguments = arguments[1:]
        if command == "mode":
            if not is_channel(target):
                command = "umode"
        log.debug(
            "command: %s, source: %s, target: %s, " "arguments: %s, tags: %s",
            command,
            source,
            target,
            arguments,
            tags,
        )
        event = Event(command, source, target, arguments, tags)
        self._handle_event(event)