Skip to content

Commit

Permalink
only respond with f'up when writing to channels
Browse files Browse the repository at this point in the history
  • Loading branch information
stargo committed Mar 17, 2018
1 parent 9d89f65 commit ac1e31d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions telegram.pl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ ($;$)
if (defined $srv) {
if (length($text)) {
$srv->command($cmd);
$followup = $numfollowup;
if ($chan =~ m/^#/) {
$followup = $numfollowup;
} else {
$followup = 0;
}
telegram_send_message($user, "->${chan}".($followup?" (f'up: ".$followup.")":""));
} else {
telegram_send_message($user, "${chan} on $srv->{tag} ".(defined($modifier)?"(${modifier}) ":"")."selected as new target.");
Expand Down Expand Up @@ -157,7 +161,11 @@ ($;$)
my $cmd = "msg ${target} ".$text;
print $cmd if ($debug);
$server->command($cmd);
$followup = $numfollowup;
if ($target =~ m/^#/) {
$followup = $numfollowup;
} else {
$followup = 0;
}
telegram_send_message($user, "->${target}".($followup?" (f'up: ".$followup.")":""));
}
}
Expand Down

0 comments on commit ac1e31d

Please sign in to comment.