mirror of https://github.com/fluffle/goirc
Handle leading spaces in topics
This commit is contained in:
parent
8878b7c1d1
commit
eddff91b7a
|
@ -234,7 +234,7 @@ func appendtopic(conn *irc.Conn, nick *irc.Nick, args, target string) {
|
|||
|
||||
section := conn.Network + " " + channel
|
||||
basetopic, _ := conf.String(section, "basetopic")
|
||||
if basetopic == "" || !strings.HasPrefix(c.Topic, basetopic) {
|
||||
if basetopic == "" || !strings.HasPrefix(strings.TrimLeft(c.Topic, " "), basetopic) {
|
||||
basetopic = c.Topic
|
||||
say(conn, nick.Nick, "New basetopic: %s", basetopic)
|
||||
updateConf(section, "basetopic", basetopic)
|
||||
|
|
Loading…
Reference in New Issue