diff options
Diffstat (limited to 'irc/pylon.lua')
| -rw-r--r-- | irc/pylon.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/irc/pylon.lua b/irc/pylon.lua index 039ec38..1be3ab2 100644 --- a/irc/pylon.lua +++ b/irc/pylon.lua @@ -34,10 +34,11 @@ function Irc.recving(self) local channel_name = msg.args[1] local body = msg.args[2] local sender = msg.source - self.wilson:deliver({ - source_channel = Thing(self, channel_name), + self.wilson:deliver(Message { + pylon = self, + channel = Thing(self, channel_name), + author = Thing(self, sender), body = body, - sender = sender, }) elseif msg.op == 'ERROR' then error(msg.args[1]) @@ -65,7 +66,7 @@ function Irc.sending(self) say('WILSON', '#test', 'i am wilson') for dest_channel, message in self.inbox:iter() do - local nick = message.sender.."["..message.source_channel.pylon.shortname.."]" + local nick = message.author:name_with_shortname() local channel_name = dest_channel.id say(nick, channel_name, message.body) end |
