Skip to content

Commit 0572755

Browse files
committed
Fix wrong automatic .tell to bridged users
1 parent 8a573ba commit 0572755

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

xbin/Tellable.p6

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
use Whateverable;
1919
use Whateverable::Bits;
20+
use Whateverable::Discordable;
2021
use Whateverable::FootgunDB;
2122
use Whateverable::Userlist;
2223

@@ -66,6 +67,7 @@ multi method irc-privmsg($msg where IRC::Client::Message::Privmsg::Channel) {
6667
channel => $msg.channel,
6768
timestamp => timestampish,
6869
nick => $msg.nick,
70+
bridged => ($msg.nick ~~ FromDiscord).so,
6971
}
7072
}
7173
my %mail = $db-tell.read;
@@ -91,6 +93,7 @@ multi method irc-privmsg-channel($msg where { m:r/^ \s* $<who>=<.&irc-nick> ‘:
9193
my $normalized = normalize-weirdly $who;
9294
my %seen := $db-seen.read;
9395
return $.NEXT unless %seen{$normalized}:exists; # haven't seen them talk ever
96+
return $.NEXT if %seen{$normalized}<bridged>; # we don't know status of bridged users
9497
# TODO ↓ this should go through all nicknames on the channel
9598
my $previous-nick = %seen{$normalized}<nick>;
9699
return $.NEXT if self.userlist($msg){$previous-nick}; # previous nickname still on the channel

0 commit comments

Comments
 (0)