StalkR / goircbot

Go IRC Bot
https://godoc.org/github.com/StalkR/goircbot
Apache License 2.0
37 stars 8 forks source link

bot: move setup back from Run to New #22

Closed StalkR closed 5 years ago

StalkR commented 5 years ago

Follow-up to PR #21 for issue #19.

@quite what do you think?

Tested working with:

go run $GOPATH/src/github.com/StalkR/goircbot/examplebot.go -host=irc.stalkr.net -channels=#dev -nick=godev
StalkR commented 5 years ago

The other nice thing about this change is if we need to extend setup to return an error, it was not possible in Run but now is in New.

quite commented 5 years ago

Ouch! I had a note about this a some point, that somebody might expect things from Bot, but lost it :/

At least the patch is small now, and yesit makes doubly sense with the added erroring opportunity.

StalkR commented 5 years ago

Cool merging then.