summaryrefslogtreecommitdiff
path: root/duck.go
diff options
context:
space:
mode:
Diffstat (limited to 'duck.go')
-rw-r--r--duck.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/duck.go b/duck.go
deleted file mode 100644
index 7900cc0..0000000
--- a/duck.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package main
-
-import (
- "strings"
-
- "dim13.org/duck"
- irc "github.com/fluffle/goirc/client"
-)
-
-type Duck struct{}
-
-func (Duck) Handle(conn *irc.Conn, line *irc.Line) {
- if q := strings.SplitN(line.Text(), " ", 2); len(q) == 2 {
- if a, err := duck.Abstract(q[1]); err != nil {
- conn.Notice(line.Target(), err.Error())
- } else {
- conn.Notice(line.Target(), a)
- }
- }
-}
-
-func (Duck) String() string {
- return "Perform duckduckgo instant answer search"
-}
-
-func init() {
- Register("define", &Duck{})
-}