summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-07-29 19:27:37 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-07-29 19:27:37 +0200
commit6e30eab40b911e7abc168f1380465e599395587e (patch)
tree2524fa3342f94de005dfaafec601a46029670b91
parent0cd984ce8208816b048fb3badfd24ef218f8c778 (diff)
Replace Privmsg with Notice
-rw-r--r--blame.go2
-rw-r--r--duck.go4
-rw-r--r--help.go2
-rw-r--r--href.go2
-rw-r--r--last.go2
-rw-r--r--rfc.go6
-rw-r--r--rss.go2
-rw-r--r--theo.go2
-rw-r--r--top.go2
-rw-r--r--urban.go4
10 files changed, 14 insertions, 14 deletions
diff --git a/blame.go b/blame.go
index 6085459..20fc560 100644
--- a/blame.go
+++ b/blame.go
@@ -12,7 +12,7 @@ func (_ Blame) Handle(conn *irc.Conn, line *irc.Line) {
"Install: go get dim13.org/bot",
}
for _, s := range src {
- conn.Privmsg(line.Target(), s)
+ conn.Notice(line.Target(), s)
}
}
diff --git a/duck.go b/duck.go
index 83e4440..2801125 100644
--- a/duck.go
+++ b/duck.go
@@ -14,9 +14,9 @@ func (_ Duck) WithArgs(_ int) bool { return true }
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.Privmsg(line.Target(), err.Error())
+ conn.Notice(line.Target(), err.Error())
} else {
- conn.Privmsg(line.Target(), a)
+ conn.Notice(line.Target(), a)
}
}
}
diff --git a/help.go b/help.go
index 22fa60e..c505d45 100644
--- a/help.go
+++ b/help.go
@@ -16,7 +16,7 @@ func (_ Help) Handle(conn *irc.Conn, line *irc.Line) {
}
sort.Sort(sort.StringSlice(msg))
for _, s := range msg {
- conn.Privmsg(line.Nick, s)
+ conn.Notice(line.Nick, s)
}
}
diff --git a/href.go b/href.go
index 976d7fb..bb01191 100644
--- a/href.go
+++ b/href.go
@@ -82,7 +82,7 @@ func ExtractLinks(conn *irc.Conn, line *irc.Line) {
log.Println(err)
}
if t != "" {
- conn.Privmsg(line.Target(), "Title: "+t)
+ conn.Notice(line.Target(), t)
}
}(v)
}
diff --git a/last.go b/last.go
index d2d1d8d..ff63bb0 100644
--- a/last.go
+++ b/last.go
@@ -19,7 +19,7 @@ func (_ Last) Handle(conn *irc.Conn, line *irc.Line) {
s := fmt.Sprintf("%v (UTC) <%v> %v",
l.Time.UTC().Format("15:04"),
l.Nick, l.Text())
- conn.Privmsg(line.Nick, s)
+ conn.Notice(line.Nick, s)
}
})
}
diff --git a/rfc.go b/rfc.go
index b76b789..b083216 100644
--- a/rfc.go
+++ b/rfc.go
@@ -23,9 +23,9 @@ func (_ RFC) Handle(conn *irc.Conn, line *irc.Line) {
kw := strings.ToLower(f[1])
if e, ok := rfcKW[kw]; ok {
s := strings.Join(e, ", ")
- conn.Privmsg(line.Target(), s)
+ conn.Notice(line.Target(), s)
} else {
- conn.Privmsg(line.Target(), "no matches")
+ conn.Notice(line.Target(), "no matches")
}
}
}
@@ -37,7 +37,7 @@ func ExtractRFC(conn *irc.Conn, line *irc.Line) {
if _, err := fmt.Sscanf(w, "RFC%d", &id); err == nil {
if entry, ok := rfcMap[id]; ok {
s := fmt.Sprint(entry)
- conn.Privmsg(line.Target(), s)
+ conn.Notice(line.Target(), s)
}
}
}
diff --git a/rss.go b/rss.go
index 9247598..0e089cf 100644
--- a/rss.go
+++ b/rss.go
@@ -31,7 +31,7 @@ func ShowNews(conn *irc.Conn, _ *irc.Line) {
n := <-news
s := fmt.Sprintf("%v: %v - %v", n.Source,
n.Item.Title, n.Item.Link)
- conn.Privmsg(*room, s)
+ conn.Notice(*room, s)
}
}
diff --git a/theo.go b/theo.go
index fe246d7..2da46e2 100644
--- a/theo.go
+++ b/theo.go
@@ -8,7 +8,7 @@ import (
type Theo struct{ Command }
func (_ Theo) Handle(conn *irc.Conn, line *irc.Line) {
- conn.Privmsg(line.Target(), theo.Theo())
+ conn.Notice(line.Target(), theo.Theo())
}
func init() {
diff --git a/top.go b/top.go
index 10a557f..80c40d9 100644
--- a/top.go
+++ b/top.go
@@ -14,7 +14,7 @@ func (_ Top) Handle(conn *irc.Conn, line *irc.Line) {
n = 10
}
s := fmt.Sprint(NewScores(n))
- conn.Privmsg(line.Target(), s)
+ conn.Notice(line.Target(), s)
}
func init() {
diff --git a/urban.go b/urban.go
index cf17a2e..0886863 100644
--- a/urban.go
+++ b/urban.go
@@ -15,10 +15,10 @@ func (_ Urban) WithArgs(_ int) bool { return true }
func (_ Urban) Handle(conn *irc.Conn, line *irc.Line) {
if q := strings.SplitN(line.Text(), " ", 2); len(q) == 2 {
if u, err := urban.QueryTop(q[1]); err != nil {
- conn.Privmsg(line.Target(), err.Error())
+ conn.Notice(line.Target(), err.Error())
} else {
s := fmt.Sprintf("%v: %v", u.Word, u.Definition)
- conn.Privmsg(line.Target(), s)
+ conn.Notice(line.Target(), s)
}
}
}