From 1b249fc746bf2a2e544eaa1b274ac0577923b329 Mon Sep 17 00:00:00 2001 From: Robert Herbig Date: Fri, 29 Jul 2016 15:03:31 -0400 Subject: [PATCH] Trim '@' from name if it is present --- plugins/fact/remember.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/fact/remember.go b/plugins/fact/remember.go index e4fc6bd..e226ba5 100644 --- a/plugins/fact/remember.go +++ b/plugins/fact/remember.go @@ -54,7 +54,8 @@ func (p *RememberPlugin) Message(message msg.Message) bool { // we have a remember! // look through the logs and find parts[1] as a user, if not, // fuck this hoser - nick := parts[1] + // some people use @nick instead of just nick + nick := strings.TrimPrefix(parts[1], "@") snip := strings.Join(parts[2:], " ") for i := len(p.Log[message.Channel]) - 1; i >= 0; i-- { entry := p.Log[message.Channel][i]