Skip to content

Commit 2ac5e98

Browse files
committed
Print actual nickname
Instead of repyling back what was requested, or replying with a overnormalized string.
1 parent 97d9d28 commit 2ac5e98

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

xbin/Tellable.p6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ multi method irc-to-me($msg where { m:r/^ \s* [[to|tell|ask] \s+]?
137137
to => $who,
138138
}
139139
}
140-
I'll pass your message to $who
140+
I'll pass your message to {%seen{$normalized}<nick>}
141141
}
142142

143143
my %*BOT-ENV = %();

xt/tellable.t

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,35 +177,35 @@ $t.test(‘passing messages to the bot itself’,
177177

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

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)