Skip to content

Commit

Permalink
Print actual nickname
Browse files Browse the repository at this point in the history
Instead of repyling back what was requested, or replying with a
overnormalized string.
  • Loading branch information
AlexDaniel committed Aug 16, 2019
1 parent 97d9d28 commit 2ac5e98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion xbin/Tellable.p6
Expand Up @@ -137,7 +137,7 @@ multi method irc-to-me($msg where { m:r/^ \s* [[to|tell|ask] \s+]?
to => $who,
}
}
I'll pass your message to $who
I'll pass your message to {%seen{$normalized}<nick>}
}

my %*BOT-ENV = %();
Expand Down
16 changes: 8 additions & 8 deletions xt/tellable.t
Expand Up @@ -177,35 +177,35 @@ $t.test(‘passing messages to the bot itself’,

$t.test(.tell (normalization, matrix users),
.tell {$t.our-nick}[m] whatever,
{$t.our-nick}, I'll pass your message to {$t.our-nick}[m]);
{$t.our-nick}, I'll pass your message to {$t.our-nick});

$t.test(.tell (normalization, garbage at the end),
.tell {$t.our-nick}``| whatever,
{$t.our-nick}, I'll pass your message to {$t.our-nick}``|);
{$t.our-nick}, I'll pass your message to {$t.our-nick});

$t.test(.tell (normalization, garbage at the end, colon),
.tell {$t.our-nick}``|: whatever,
{$t.our-nick}, I'll pass your message to {$t.our-nick}``|);
{$t.our-nick}, I'll pass your message to {$t.our-nick});

$t.test(.tell (normalization, garbage at the beginning),
.tell `|{$t.our-nick} whatever,
{$t.our-nick}, I'll pass your message to `|{$t.our-nick});
{$t.our-nick}, I'll pass your message to {$t.our-nick});

$t.test(.tell (normalization, garbage at the end and beginning),
.tell `|{$t.our-nick}`| whatever,
{$t.our-nick}, I'll pass your message to `|{$t.our-nick}`|);
{$t.our-nick}, I'll pass your message to {$t.our-nick});

$t.test(.tell (normalization, hyphens),
.tell {$t.our-nick.comb.join: -} whatever,
{$t.our-nick}, I'll pass your message to {$t.our-nick.comb.join: -});
{$t.our-nick}, I'll pass your message to {$t.our-nick});

$t.test(.tell (normalization, numbers),
.tell {$t.our-nick}242134 whatever,
{$t.our-nick}, I'll pass your message to {$t.our-nick}242134);
{$t.our-nick}, I'll pass your message to {$t.our-nick});

$t.test(.tell (normalization, doubled letters),
.tell {$t.our-nick.comb.map({$_ x 2}).join} whatever,
{$t.our-nick}, I'll pass your message to {$t.our-nick.comb.map({$_ x 2}).join});
{$t.our-nick}, I'll pass your message to {$t.our-nick});

$t.test(receiving all messages (normalization),
I'm back!,
Expand Down

0 comments on commit 2ac5e98

Please sign in to comment.