mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-07 17:05:43 -04:00
Be less spammy in privmsg
This commit is contained in:
parent
a01d80b90a
commit
f6e0fbd506
1 changed files with 4 additions and 4 deletions
|
@ -577,13 +577,13 @@ sub plugin_output {
|
|||
# that receive multiple lines and those that don't..
|
||||
$text = Encode::encode( "utf8", $text ); # set it up for raw bytes now
|
||||
while( length $text ) {
|
||||
my $substr = substr( $text, 0, 400, '' );
|
||||
my $substr = substr( $text, 0, 200, '' );
|
||||
$pci->yield( privmsg => $said->{name} => $substr );
|
||||
|
||||
# Try to avoid sending too many lines, since it may be annoying
|
||||
# and it tends to prevent the bot from sending other messages.
|
||||
|
||||
last MESSAGES if $messages_sent++ > 60;
|
||||
last MESSAGES if $messages_sent++ > 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue