def validate_sessions(self):
        """
        Check all currently connected sessions (logged in and not) and
        see if any are dead or idle.

        """
        tcurr = time()
        reason = _("Idle timeout exceeded, disconnecting.")
        for session in (session for session in self.values()
                        if session.logged_in and _IDLE_TIMEOUT > 0
                        and _IDLE_TIMEOUT > (tcurr - session.cmd_last)):
            self.disconnect(session, reason=reason)
dataset/ETHPy150Open evennia/evennia/evennia/server/sessionhandler.py/ServerSessionHandler.validate_sessions/swapped operands of `>`