summaryrefslogtreecommitdiffstats
path: root/wat/bot.go
diff options
context:
space:
mode:
authoralex2018-10-26 12:40:02 +0100
committeralex2018-10-26 12:40:27 +0100
commitdb4c1257b9b588c55e4b251cd8c9a2240882e6e2 (patch)
treeec1f70df84ce12a2f787dd09ebae1a08395f8273 /wat/bot.go
parent2b1c9889e58cf11fd9df941924c4f8372c41550b (diff)
downloadwatbot-db4c1257b9b588c55e4b251cd8c9a2240882e6e2.tar.gz
watbot-db4c1257b9b588c55e4b251cd8c9a2240882e6e2.tar.bz2
watbot-db4c1257b9b588c55e4b251cd8c9a2240882e6e2.zip
fixed rand to use crypto rand
fixed imp with imps but should go back to privmsg detection give the bot money when people lose lel
Diffstat (limited to 'wat/bot.go')
-rw-r--r--wat/bot.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/wat/bot.go b/wat/bot.go
index dbb16b2..bbb03a4 100644
--- a/wat/bot.go
+++ b/wat/bot.go
@@ -19,6 +19,7 @@ var allowedChannels = []string {
"##wat",
"##test",
"##sweden",
+ "##freedom",
}
func NewWatBot(config *irc.ClientConfig, serverConn *tls.Conn) *WatBot {
@@ -77,9 +78,9 @@ func (w *WatBot) Msg(m *irc.Message) {
if w.Admin(m) {
// allow impersonation of the robot from anywhere
- if args[0] == "imp" && len(args) > 2 {
- if args[1] == "PRIVMSG" {
- w.write(args[1], strings.Join(args[2:], " "))
+ if (args[0] == "imp" || args[0] == "imps") && len(args) > 2 {
+ if args[0] == "imps" {
+ w.write(args[1], args[2], strings.Join(args[3:], " "))
} else {
w.write(args[1], args[2:]...)
}
@@ -97,7 +98,6 @@ func (w *WatBot) Msg(m *irc.Message) {
return
}
-
// clean input
if args[0][0] == '#' {
args[0] = args[0][1:]