diff options
author | alex | 2018-10-26 12:40:02 +0100 |
---|---|---|
committer | alex | 2018-10-26 12:40:27 +0100 |
commit | db4c1257b9b588c55e4b251cd8c9a2240882e6e2 (patch) | |
tree | ec1f70df84ce12a2f787dd09ebae1a08395f8273 /wat/bot.go | |
parent | 2b1c9889e58cf11fd9df941924c4f8372c41550b (diff) | |
download | watbot-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.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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:] |