fix regex
This commit is contained in:
parent
584ac25c36
commit
4772cd7f71
2
bot.go
2
bot.go
@ -188,7 +188,7 @@ func botPasswd(m *tb.Message) {
|
||||
bot.SendChat(m.Chat.ID, "User not registered.")
|
||||
return
|
||||
}
|
||||
r := regexp.MustCompile("^\\/register( )+(?P<Passwd>[.^\\ ]+)$")
|
||||
r := regexp.MustCompile("^\\/passwd( )+(?P<Passwd>[^ ]+)$")
|
||||
if r.MatchString(m.Text) {
|
||||
// we have a parameter
|
||||
passwd := r.ReplaceAllString(m.Text, "${Passwd}")
|
||||
|
Loading…
Reference in New Issue
Block a user