mirror of https://github.com/velour/catbase.git
Enabling new stuff
This commit is contained in:
parent
543526478e
commit
cc58de580a
|
@ -94,6 +94,7 @@ type Message struct {
|
|||
Command bool
|
||||
Action bool
|
||||
Time time.Time
|
||||
Host string
|
||||
}
|
||||
|
||||
type Variable struct {
|
||||
|
|
|
@ -136,6 +136,7 @@ func (b *Bot) buildMessage(conn *irc.Conn, line *irc.Line) Message {
|
|||
Command: iscmd,
|
||||
Action: isaction,
|
||||
Time: time.Now(),
|
||||
Host: line.Host,
|
||||
}
|
||||
|
||||
return msg
|
||||
|
|
|
@ -90,6 +90,18 @@ func (p *FirstPlugin) allowed(message bot.Message) bool {
|
|||
return false
|
||||
}
|
||||
}
|
||||
for _, host := range p.Bot.Config.Bad.Hosts {
|
||||
if host == message.Host {
|
||||
log.Println("Disallowing first: ", message.User.Name, ":", message.Body)
|
||||
return false
|
||||
}
|
||||
}
|
||||
for _, nick := range p.Bot.Config.Bad.Nicks {
|
||||
if nick == message.User.Name {
|
||||
log.Println("Disallowing first: ", message.User.Name, ":", message.Body)
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue