mirror of https://github.com/velour/catbase.git
Improved channel handling to allow /QUREY use of the bot
This commit is contained in:
parent
5b3784a9ed
commit
31d52248d7
|
@ -91,6 +91,9 @@ func (b *Bot) MsgRecieved(conn *irc.Conn, line *irc.Line) {
|
||||||
user := b.checkuser(line.Nick)
|
user := b.checkuser(line.Nick)
|
||||||
|
|
||||||
channel := line.Args[0]
|
channel := line.Args[0]
|
||||||
|
if channel == conn.Me.Nick {
|
||||||
|
channel = line.Nick
|
||||||
|
}
|
||||||
message := line.Args[1]
|
message := line.Args[1]
|
||||||
iscmd := false
|
iscmd := false
|
||||||
iscmd, message = b.isCmd(message)
|
iscmd, message = b.isCmd(message)
|
||||||
|
|
|
@ -137,7 +137,10 @@ func (p *BeersPlugin) LoadData() {
|
||||||
|
|
||||||
// Help responds to help requests. Every plugin must implement a help function.
|
// Help responds to help requests. Every plugin must implement a help function.
|
||||||
func (p *BeersPlugin) Help(channel string, parts []string) {
|
func (p *BeersPlugin) Help(channel string, parts []string) {
|
||||||
p.Bot.SendMessage(channel, "Sorry, Beers does not do a goddamn thing.")
|
msg := "Beers: imbibe by using either beers +=,=,++ or with the !imbibe/drink " +
|
||||||
|
"commands. I'll keep a count of how many beers you've had and then if you want " +
|
||||||
|
"to reset, just !puke it all up!"
|
||||||
|
p.Bot.SendMessage(channel, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *BeersPlugin) setBeers(user *bot.User, amount int) {
|
func (p *BeersPlugin) setBeers(user *bot.User, amount int) {
|
||||||
|
|
Loading…
Reference in New Issue