diff --git a/multistreamer/irc/server.lua b/multistreamer/irc/server.lua index b9e9399..e8d62bf 100644 --- a/multistreamer/irc/server.lua +++ b/multistreamer/irc/server.lua @@ -110,6 +110,7 @@ function IRCServer.new(socket,user,parentServer) ['TOPIC'] = IRCServer.clientTopic, ['USERHOST'] = IRCServer.clientUnknown, ['USERS'] = IRCServer.clientUsers, + ['USERHOST'] = IRCServer.clientUserhost, ['WHO'] = IRCServer.clientWho, ['WHOIS'] = IRCServer.clientWhois, } @@ -664,6 +665,20 @@ function IRCServer:clientIson(nick,msg) return self:sendClientFromServer(nick,'303',resp) end +function IRCServer:clientUserhost(nick,msg) + local resp = ':' + local i = 1 + for _,u in pairs(msg.args) do + if self.users[u] then + if i > 1 then + u = ' ' .. u + end + resp = resp .. u .. '=' .. u .. '@' .. config.irc_hostname + end + end + return self:sendClientFromServer(nick,'302', resp) +end + function IRCServer:clientWhois(nick,msg) local nicks = msg.args[1]:split(',') for _,n in ipairs(nicks) do