kunt

golang IRC bot
git clone git://git.2f30.org/kunt.git
Log | Files | Refs | LICENSE

commit 5cd2cdc57c4b26303e7f395b16740aa9b795a051
parent 4209386bf7981a3786b6664d2471af5c04d72153
Author: sin <sin@2f30.org>
Date:   Fri May 10 15:33:16 +0100

add !copyright

Diffstat:
src/kunt/kunt.go | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/kunt/kunt.go b/src/kunt/kunt.go @@ -111,6 +111,7 @@ func cmdHelp(msg irc.Message) { "!src -> Fetch kunt's source code", "!TODO -> Print the TODO list", "!version -> Show version", + "!copyright -> Show copyright info", } for _, i := range help { kunt.ircCtx.Privmsg(msg.Args[0], i) @@ -282,6 +283,18 @@ func cmdGame(msg irc.Message) { gchan <- irc.Message{Command: "SETCHAN", Args: []string{msg.Args[0]}} } +func cmdCopyright(msg irc.Message) { + copyright := []string{ + "Copyright 2013 TLH and dsp. All rights reserved.", + "Use of this source code is governed by a BSD-style", + "license that can be found in the LICENSE file.", + } + for _, i := range copyright { + kunt.ircCtx.Privmsg(msg.Args[0], i) + time.Sleep(512 * time.Millisecond) + } +} + var sslon = flag.Bool("s", false, "SSL support") var quoteDb *mapfs.Mapfs @@ -360,6 +373,7 @@ func main() { "!src": cmdSrc, "!TODO": cmdTodo, "!game": cmdGame, + "!copyright": cmdCopyright, } cfg := irc.Config{