mirror of https://github.com/velour/catbase.git
Removing requirement that you not try to quote yourself.
Multiline quotes cannot reasonably enforce this policy.
This commit is contained in:
parent
25a8936f1b
commit
5433f51508
|
@ -1,8 +1,8 @@
|
||||||
package plugins
|
package plugins
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/chrissexton/alepale/bot"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/chrissexton/alepale/bot"
|
||||||
"labix.org/v2/mgo"
|
"labix.org/v2/mgo"
|
||||||
"labix.org/v2/mgo/bson"
|
"labix.org/v2/mgo/bson"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
@ -53,12 +53,6 @@ func (p *RememberPlugin) Message(message bot.Message) bool {
|
||||||
nick := parts[1]
|
nick := parts[1]
|
||||||
snip := strings.Join(parts[2:], " ")
|
snip := strings.Join(parts[2:], " ")
|
||||||
|
|
||||||
if nick == user.Name {
|
|
||||||
msg := fmt.Sprintf("Don't try to quote yourself, %s.", nick)
|
|
||||||
p.Bot.SendMessage(message.Channel, msg)
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := len(p.Log[message.Channel]) - 1; i >= 0; i-- {
|
for i := len(p.Log[message.Channel]) - 1; i >= 0; i-- {
|
||||||
entry := p.Log[message.Channel][i]
|
entry := p.Log[message.Channel][i]
|
||||||
if entry.User.Name == nick && strings.Contains(entry.Body, snip) {
|
if entry.User.Name == nick && strings.Contains(entry.Body, snip) {
|
||||||
|
|
Loading…
Reference in New Issue