3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

Add the INFO command

This commit is contained in:
Daniel Oaks 2017-10-29 07:59:56 +00:00
parent 33651ea03c
commit d715abf0f0
3 changed files with 48 additions and 0 deletions

View File

@ -101,6 +101,9 @@ var Commands = map[string]Command{
handler: helpHandler,
minParams: 0,
},
"INFO": {
handler: infoHandler,
},
"INVITE": {
handler: inviteHandler,
minParams: 2,

View File

@ -186,6 +186,11 @@ Get an explanation of <argument>, or "index" for a list of help topics.`,
text: `HELPOP <argument>
Get an explanation of <argument>, or "index" for a list of help topics.`,
},
"info": {
text: `INFO
Sends information about the server, developers, etc.`,
},
"invite": {
text: `INVITE <nickname> <channel>

View File

@ -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, <daniel@danieloaks.net>
Shivaram Lingamneni, slingamn, <slingamn@cs.stanford.edu>
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
}