From 36ad701b3b699987d77ba97aa499e1b39df36a54 Mon Sep 17 00:00:00 2001 From: "." <.@.> Date: Sat, 7 May 2016 18:38:25 +1200 Subject: [PATCH] use full info when relaying PRIVMSG, fixes display in andchat --HG-- branch : nmdc-ircfrontend --- TODO.txt | 6 ++---- server.go | 7 +++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/TODO.txt b/TODO.txt index e4580fc..82abb0a 100644 --- a/TODO.txt +++ b/TODO.txt @@ -5,11 +5,9 @@ PRE-RELEASE - hexchat: missing nick list --- works if we reply NAMES to WHO queries, but that throws andchat -- Atomic: fix crash on connection (even with autojoin disabled) +- yaaic/atomic: doesn't recognise the room join (even with autojoin disabled) -- yaaic: doesn't recognise the room join (even with autojoin disabled) - -- andchat: user nicks not appearing in < angle brackets > +- andchat: system message styling - part all nicks upon upstream server disconnection diff --git a/server.go b/server.go index 93312f9..980b09f 100644 --- a/server.go +++ b/server.go @@ -159,6 +159,7 @@ func (s *Server) upstreamWorker() { switch hubEvent.EventType { case libnmdc.EVENT_USER_JOINED: s.reply(rplJoin, hubEvent.Nick, BLESSED_CHANNEL) + // If we want to JOIN with the full power of the supplied nick!user@host, then we'll need to actually remember the active client's USER parameters case libnmdc.EVENT_USER_PART: s.reply(rplPart, hubEvent.Nick, BLESSED_CHANNEL, "Disconnected") @@ -173,13 +174,15 @@ func (s *Server) upstreamWorker() { s.sendChannelTopic(hubEvent.Nick) case libnmdc.EVENT_PRIVATE: - s.reply(rplMsg, hubEvent.Nick, s.upstreamLauncher.Self.Nick, hubEvent.Message) + //s.reply(rplMsg, hubEvent.Nick, s.upstreamLauncher.Self.Nick, hubEvent.Message) + s.reply(rplMsg, hubEvent.Nick+"!"+hubEvent.Nick+"@"+hubEvent.Nick, s.upstreamLauncher.Self.Nick, hubEvent.Message) case libnmdc.EVENT_PUBLIC: if hubEvent.Nick == s.upstreamLauncher.Self.Nick && hubEvent.Message == s.lastMessage { s.lastMessage = "" // irc doesn't echo our own pubchat } else { - s.reply(rplMsg, hubEvent.Nick, BLESSED_CHANNEL, hubEvent.Message) + // s.reply(rplMsg, hubEvent.Nick, BLESSED_CHANNEL, hubEvent.Message) + s.reply(rplMsg, hubEvent.Nick+"!"+hubEvent.Nick+"@"+hubEvent.Nick, BLESSED_CHANNEL, hubEvent.Message) } case libnmdc.EVENT_SYSTEM_MESSAGE_FROM_CONN, libnmdc.EVENT_SYSTEM_MESSAGE_FROM_HUB: