Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Only delay messages when needed #6

Description

@camilstaps

Currently, every message is delayed by 500ms (send in IRCBot). It would be preferable if this delay is only induced when needed to avoid throttling. One way to do this is to move the sleep call to after send_MT. This is still rather conservative; if a state is kept with the timestamps of previous messages the delay would not have to be used if only one other message has been sent recently. A slightly simpler (though again, more conservative) way would be to keep a counter of recent messages, and when it reaches a certain threshold delay for a certain amount of time (longer than 500ms).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions