| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | function reply(string $text) |
||
| 30 | { |
||
| 31 | $myNick = core(Client::class)->user()->nickname(); |
||
| 32 | $senderNick = core(InboundMessage::class)->nickname(); |
||
| 33 | $targets = core(InboundMessage::class)->targets(); |
||
| 34 | $targets = array_map(function ($target) use ($myNick, $senderNick) { |
||
| 35 | return $target === $myNick ? $senderNick : $target; |
||
| 36 | }, $targets); |
||
| 37 | |||
| 38 | send_to($targets, $text); |
||
| 39 | } |
||
| 40 |