From 0e570ba8ad39c1545e517db87f96742d4559b513 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 2 Jun 2020 09:57:51 -0400 Subject: [PATCH] fix #1078 --- irc/commands.go | 6 ++++++ irc/handlers.go | 12 ++++++++++++ irc/help.go | 10 ++++++++++ 3 files changed, 28 insertions(+) diff --git a/irc/commands.go b/irc/commands.go index 1ad9f484..aff2d57a 100644 --- a/irc/commands.go +++ b/irc/commands.go @@ -282,6 +282,9 @@ func init() { handler: setnameHandler, minParams: 1, }, + "SUMMON": { + handler: summonHandler, + }, "TAGMSG": { handler: messageHandler, minParams: 1, @@ -324,6 +327,9 @@ func init() { handler: userhostHandler, minParams: 1, }, + "USERS": { + handler: usersHandler, + }, "VERSION": { handler: versionHandler, minParams: 0, diff --git a/irc/handlers.go b/irc/handlers.go index c1153763..c68b2170 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -2417,6 +2417,12 @@ func setnameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *R return false } +// SUMMON [parameters] +func summonHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool { + rb.Add(nil, server.name, ERR_SUMMONDISABLED, client.Nick(), client.t("SUMMON has been disabled")) + return false +} + // TIME func timeHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool { rb.Add(nil, server.name, RPL_TIME, client.nick, server.name, time.Now().UTC().Format(time.RFC1123)) @@ -2576,6 +2582,12 @@ func userhostHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb * return false } +// USERS [parameters] +func usersHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool { + rb.Add(nil, server.name, ERR_USERSDISABLED, client.Nick(), client.t("USERS has been disabled")) + return false +} + // VERSION func versionHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool { rb.Add(nil, server.name, RPL_VERSION, client.nick, Ver, server.name) diff --git a/irc/help.go b/irc/help.go index fcdc6df9..4dbd2c82 100644 --- a/irc/help.go +++ b/irc/help.go @@ -432,6 +432,11 @@ The SCENE command is used to send a scene notification to the given target.`, text: `SETNAME The SETNAME command updates the realname to be the newly-given one.`, + }, + "summon": { + text: `SUMMON [parameters] + +The SUMMON command is not implemented.`, }, "tagmsg": { text: `@+client-only-tags TAGMSG {,} @@ -492,6 +497,11 @@ For example: Used in connection registration, sets your username and realname to the given values (though your username may also be looked up with Ident).`, + }, + "users": { + text: `USERS [parameters] + +The USERS command is not implemented.`, }, "userhost": { text: `USERHOST { }