From e24293df247019b05045abd01fca574a3a8de20b Mon Sep 17 00:00:00 2001 From: raylu Date: Mon, 18 Oct 2010 19:55:41 -0400 Subject: [PATCH] Update hosts when people speak --- handler.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/handler.go b/handler.go index 1bdac2c..f91f780 100644 --- a/handler.go +++ b/handler.go @@ -26,6 +26,10 @@ var commands = map [string]func(*irc.Conn, string, string, string) { const googleAPIKey = "ABQIAAAA6-N_jl4ETgtMf2M52JJ_WRQjQjNunkAJHIhTdFoxe8Di7fkkYhRRcys7ZxNbH3MIy_MKKcEO4-9_Ag" func handlePrivmsg(conn *irc.Conn, line *irc.Line) { + if n := conn.GetNick(line.Nick); n != nil { + n.Host = line.Host + } + target := line.Args[0] if isChannel(target) { // message to a channel