summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Gerus <arachnist@i.am-a.cat>2015-12-06 11:58:24 +0100
committerRobert Gerus <arachnist@i.am-a.cat>2015-12-06 11:58:24 +0100
commit6c413653aa0b3ea7122da412a9f8159b997bf25d (patch)
treefd2c726f6788bc760a8335faaa3d0f56bf9bc96c
parentf837889e2a2b4156cc60096ff31cca39378aa61f (diff)
downloadgorepost-6c413653aa0b3ea7122da412a9f8159b997bf25d.tar.gz
gorepost-6c413653aa0b3ea7122da412a9f8159b997bf25d.tar.bz2
gorepost-6c413653aa0b3ea7122da412a9f8159b997bf25d.tar.xz
gorepost-6c413653aa0b3ea7122da412a9f8159b997bf25d.zip
Don't always spoil the link contents with title.
-rw-r--r--bot/urltitle.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/urltitle.go b/bot/urltitle.go
index 7785704..c62b48b 100644
--- a/bot/urltitle.go
+++ b/bot/urltitle.go
@@ -44,6 +44,10 @@ func linktitle(output func(irc.Message), msg irc.Message) {
var r []string
for _, s := range strings.Split(msg.Trailing, " ") {
+ if s == "notitle" {
+ return
+ }
+
b, err := regexp.Match("https?://", []byte(s))
if err != nil {
log.Println("Context:", msg.Context, "linktitle regex error:", err)