diff --git a/irc/commands.go b/irc/commands.go index 4ec35c5c..6d186dc0 100644 --- a/irc/commands.go +++ b/irc/commands.go @@ -101,6 +101,9 @@ var Commands = map[string]Command{ handler: helpHandler, minParams: 0, }, + "INFO": { + handler: infoHandler, + }, "INVITE": { handler: inviteHandler, minParams: 2, diff --git a/irc/help.go b/irc/help.go index d0f61b18..808d6c29 100644 --- a/irc/help.go +++ b/irc/help.go @@ -186,6 +186,11 @@ Get an explanation of , or "index" for a list of help topics.`, text: `HELPOP Get an explanation of , or "index" for a list of help topics.`, + }, + "info": { + text: `INFO + +Sends information about the server, developers, etc.`, }, "invite": { text: `INVITE diff --git a/irc/server.go b/irc/server.go index 1bd4255f..d5efe435 100644 --- a/irc/server.go +++ b/irc/server.go @@ -2120,3 +2120,43 @@ func userhostHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool return false } + +var ( + infoString = strings.Split(` ▄▄▄ ▄▄▄· ▄▄ • ▐ ▄ +▪ ▀▄ █·▐█ ▀█ ▐█ ▀ ▪▪ •█▌▐█▪ + ▄█▀▄ ▐▀▀▄ ▄█▀▀█ ▄█ ▀█▄ ▄█▀▄▪▐█▐▐▌ ▄█▀▄ +▐█▌.▐▌▐█•█▌▐█ ▪▐▌▐█▄▪▐█▐█▌ ▐▌██▐█▌▐█▌.▐▌ + ▀█▄▀▪.▀ ▀ ▀ ▀ ·▀▀▀▀ ▀█▄▀ ▀▀ █▪ ▀█▄▀▪ + + https://oragono.io/ + https://github.com/oragono/oragono + +Oragono is released under the MIT license. + +Thanks to Jeremy Latt for founding Ergonomadic, the project this is based on <3 + +Core Developers: + Daniel Oakley, DanielOaks, + Shivaram Lingamneni, slingamn, + +Contributors and Former Developers: + 3onyc + Edmund Huber + Euan Kemp (euank) + Jeremy Latt + Martin Lindhe (martinlindhe) + Roberto Besser (besser) + Robin Burchell (rburchell) + Sean Enck (enckse) + soul9 + Vegax +`, "\n") +) + +func infoHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { + for _, line := range infoString { + client.Send(nil, server.name, RPL_INFO, client.nick, line) + } + client.Send(nil, server.name, RPL_ENDOFINFO, client.nick, "End of /INFO") + return false +}