forked from davidscholberg/irkbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterject.go
More file actions
24 lines (21 loc) · 767 Bytes
/
Copy pathinterject.go
File metadata and controls
24 lines (21 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package module
import (
"fmt"
"github.com/davidscholberg/irkbot/lib/configure"
"github.com/davidscholberg/irkbot/lib/message"
"strings"
)
func HelpInterject() []string {
s := "interject [subject] - give a pedantic rant about the proper way to refer to" +
" the given subject, defaulting to Linux if no subject given"
return []string{s}
}
func Interject(cfg *configure.Config, in *message.InboundMsg, actions *Actions) {
interMsg := "Linux"
if len(in.MsgArgs[1:]) > 0 {
interMsg = strings.Join(in.MsgArgs[1:], " ")
}
msg := fmt.Sprintf("I'd just like to interject for a moment. What you're refering"+
" to as %s, is in fact, GNU *slash* %s, or as I've recently taken to calling it, GNU *plus* %s.", interMsg, interMsg, interMsg)
actions.Say(msg)
}