mirror of https://github.com/fluffle/goirc
Also filter out #s from YouTube videos
This commit is contained in:
parent
fe1bae990a
commit
ce202d03f1
|
@ -36,10 +36,12 @@ func handlePrivmsg(conn *irc.Conn, line *irc.Line) {
|
||||||
video = line.Text[27:]
|
video = line.Text[27:]
|
||||||
}
|
}
|
||||||
if video != "" {
|
if video != "" {
|
||||||
amp := strings.Index(video, "&")
|
if amp := strings.Index(video, "&"); amp > -1 {
|
||||||
if amp > -1 {
|
|
||||||
video = video[0:amp]
|
video = video[0:amp]
|
||||||
}
|
}
|
||||||
|
if pound := strings.Index(video, "#"); pound > -1 {
|
||||||
|
video = video[0:pound]
|
||||||
|
}
|
||||||
youtube(conn, line.Nick, video, target)
|
youtube(conn, line.Nick, video, target)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue