mirror of https://github.com/velour/catbase.git
Oh, and handle the plurals…
This commit is contained in:
parent
83289d65f0
commit
85b649bc98
|
@ -79,7 +79,7 @@ func (p *EmojifyMePlugin) Message(message msg.Message) bool {
|
||||||
//Check to see if we can strip the trailing "es" off and get an emoji
|
//Check to see if we can strip the trailing "es" off and get an emoji
|
||||||
temp := strings.TrimSuffix(token, "s")
|
temp := strings.TrimSuffix(token, "s")
|
||||||
if _, ok := p.Emoji[temp]; ok {
|
if _, ok := p.Emoji[temp]; ok {
|
||||||
if token != "a" && token != "it" {
|
if temp != "a" && temp != "it" {
|
||||||
emojied++
|
emojied++
|
||||||
}
|
}
|
||||||
tokens[i] = ":" + temp + ":s"
|
tokens[i] = ":" + temp + ":s"
|
||||||
|
@ -87,7 +87,7 @@ func (p *EmojifyMePlugin) Message(message msg.Message) bool {
|
||||||
//Check to see if we can strip the trailing "es" off and get an emoji
|
//Check to see if we can strip the trailing "es" off and get an emoji
|
||||||
temp := strings.TrimSuffix(token, "es")
|
temp := strings.TrimSuffix(token, "es")
|
||||||
if _, ok := p.Emoji[temp]; ok {
|
if _, ok := p.Emoji[temp]; ok {
|
||||||
if token != "a" && token != "it" {
|
if temp != "a" && temp != "it" {
|
||||||
emojied++
|
emojied++
|
||||||
}
|
}
|
||||||
tokens[i] = ":" + temp + ":es"
|
tokens[i] = ":" + temp + ":es"
|
||||||
|
|
Loading…
Reference in New Issue