1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-05-21 23:13:20 +00:00

Handle leading spaces in topics

This commit is contained in:
raylu 2011-04-10 21:25:35 -04:00
parent 8878b7c1d1
commit eddff91b7a

View file

@ -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)