From 98e8ef43bae65fe5f11f77ed94086c76c51569eb Mon Sep 17 00:00:00 2001 From: "." <.@.> Date: Sat, 7 May 2016 17:51:21 +1200 Subject: [PATCH] simulate PROTOCTL NAMESX --HG-- branch : nmdc-ircfrontend --- server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.go b/server.go index f37afad..df338d8 100644 --- a/server.go +++ b/server.go @@ -226,6 +226,9 @@ func (s *Server) handleCommand(command string, args []string) { } */ + case "PROTOCTL": + // we advertised support for NAMESX, if this happens the client accepted it + case "PASS": // RFC2812 registration. Stash the password for later if len(args) < 1 { @@ -510,6 +513,8 @@ func (s *Server) reply(code replyCode, args ...string) { switch code { case rplWelcome: s.writeClient(fmt.Sprintf(":%s 001 %s :Welcome to %s", s.name, s.upstreamLauncher.Self.Nick, s.name)) + s.writeClient(fmt.Sprintf(":%s 005 %s NAMESX :are supported by this server", s.name, s.upstreamLauncher.Self.Nick)) + case rplJoin: s.writeClient(fmt.Sprintf(":%s JOIN %s", args[0], args[1])) case rplPart: