mirror of
https://github.com/fluffle/goirc
synced 2025-06-08 15:53:20 +00:00
Also filter out #s from YouTube videos
This commit is contained in:
parent
fe1bae990a
commit
ce202d03f1
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue