From 2d19acb846f08c8b363d391ba17abdbbe3bc3973 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 24 Mar 2018 15:40:20 +1300 Subject: [PATCH] remove sendNamesOnWho quirk, use nickForGeneralMessages quirk on Yaaic as well as atomic --HG-- branch : nmdc-ircfrontend --- quirks.go | 8 +------- server.go | 7 +------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/quirks.go b/quirks.go index 7f60f49..ccf1f46 100644 --- a/quirks.go +++ b/quirks.go @@ -5,17 +5,11 @@ import ( ) type Quirks struct { - SendNamesOnWho bool RequireNickForGeneralMessages bool } func GetQuirksForClient(ver string) Quirks { - if strings.Contains(ver, "HexChat") { - return Quirks{ - SendNamesOnWho: true, - } - - } else if strings.Contains(ver, "mIRC") || /*strings.Contains(ver, "Revolution") ||*/ strings.Contains(ver, "Atomic") { + if strings.Contains(ver, "mIRC") || strings.Contains(ver, "Atomic") || strings.Contains(ver, "Yaaic") { return Quirks{ RequireNickForGeneralMessages: true, } diff --git a/server.go b/server.go index c80f009..08542f4 100644 --- a/server.go +++ b/server.go @@ -594,12 +594,7 @@ func (s *Server) handleJoinedCommand(command string, args []string) { return } - // s.sendWho(args[0]) - // s.sendNames() // fixes hexchat, but andchat always sends WHO /immediately/ after NAMES end, causing an infinite loop - - if s.quirks.SendNamesOnWho { - s.sendNames() - } + // Ignore this command case "MODE": if len(args) < 1 {