Adding only to show the too much karma message when replying.
This commit is contained in:
parent
2ec3e34326
commit
cf2fa3df1e
@ -62,11 +62,11 @@ sub process_message_with_text {
|
|||||||
my $log_username = defined $username ? "\@$username" : '';
|
my $log_username = defined $username ? "\@$username" : '';
|
||||||
$logger->log_info(
|
$logger->log_info(
|
||||||
"'$message->{text}' received from $first_name:$log_username:$user_id");
|
"'$message->{text}' received from $first_name:$log_username:$user_id");
|
||||||
if ( $text eq '+1' && defined $reply_to_message ) {
|
if ( defined $reply_to_message && $text eq '+1' ) {
|
||||||
add_karma_to_replied_message_user($message);
|
add_karma_to_replied_message_user($message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( $text eq '-1' && defined $reply_to_message ) {
|
if ( defined $reply_to_message && $text eq '-1' ) {
|
||||||
substract_karma_to_replied_message_user($message);
|
substract_karma_to_replied_message_user($message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ sub process_message_with_text {
|
|||||||
show_top_ten_hate($message);
|
show_top_ten_hate($message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( $text =~ /^(?:-|\+)\d+$/ ) {
|
if ( defined $reply_to_message && $text =~ /^(?:-|\+)\d+$/ ) {
|
||||||
error_too_much_karma($message);
|
error_too_much_karma($message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user