Skip to content

Commit

Permalink
Sleep a little bit between messages
Browse files Browse the repository at this point in the history
Otherwise they are sometimes delivered out of order.
  • Loading branch information
AlexDaniel committed Aug 19, 2019
1 parent c46a08f commit 72b3976
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xbin/Tellable.p6
Expand Up @@ -74,7 +74,8 @@ multi method irc-privmsg-channel($msg) {
next if .<heard> and timestampish() - DateTime.new(.<timestamp>) ≤ $heard-timeout
and .<channel> eq $msg.channel and not %*ENV<TESTABLE>;
my $text = sprintf %s %s <%s> %s, .<timestamp channel from text>;
$msg.irc.send-cmd: 'PRIVMSG', $msg.channel, $text, :server($msg.server)
$msg.irc.send-cmd: 'PRIVMSG', $msg.channel, $text, :server($msg.server);
sleep 0.3;
}
%mail{$normalized}:delete;
$db-tell.write: %mail;
Expand Down

0 comments on commit 72b3976

Please sign in to comment.