diff options
author | Benny Morrison <benmorrison@ttm.sh> | 2019-03-16 01:14:48 -0400 |
---|---|---|
committer | Benny Morrison <benmorrison@ttm.sh> | 2019-03-16 01:14:48 -0400 |
commit | 5ce5470199300e14549177fc90b9f48bb184b312 (patch) | |
tree | de7558427e645f371d5d2b7914c4efac484c9f98 | |
parent | cdd4ad3d757b4b2f9f6fc4480a795a54aa333629 (diff) | |
download | goofbot-5ce5470199300e14549177fc90b9f48bb184b312.tar.gz |
finally debugged !join command
-rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go index f174b16..2668b85 100644 --- a/main.go +++ b/main.go @@ -39,7 +39,7 @@ func main() { } // check if the command was issued by a specific person before dying - // i had to delve into girc/commands.go to find e.Source.Name + // i had to delve into girc/event.go to find e.Source.Name if strings.HasPrefix(e.Last(), "die, devil bird!") && e.Source.Name == owner { c.Cmd.Reply(e, "SQUAWWWWWK!!") time.Sleep(100 * time.Millisecond) @@ -53,9 +53,10 @@ func main() { } // when requested by owner, join channel specified if strings.HasPrefix(e.Last(), "!join") && e.Source.Name == owner { + dest := strings.Split(e.Params[1], " ") c.Cmd.Reply(e, "Right away, cap'n!") time.Sleep(100 * time.Millisecond) - c.Cmd.Join(e.Params[1]) + c.Cmd.Join(dest[1]) } // respond with uptime / load if strings.HasPrefix(e.Last(), "!uptime") { |