Trim '@' from name if it is present

This commit is contained in:
Robert Herbig 2016-07-29 15:03:31 -04:00
parent be8a8e7948
commit 1b249fc746
1 changed files with 2 additions and 1 deletions

View File

@ -54,7 +54,8 @@ func (p *RememberPlugin) Message(message msg.Message) bool {
// we have a remember! // we have a remember!
// look through the logs and find parts[1] as a user, if not, // look through the logs and find parts[1] as a user, if not,
// fuck this hoser // fuck this hoser
nick := parts[1] // some people use @nick instead of just nick
nick := strings.TrimPrefix(parts[1], "@")
snip := strings.Join(parts[2:], " ") snip := strings.Join(parts[2:], " ")
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]