Thankyou! Grabbed this for our IRC server yesterday. We found it didn't read links obtained from embedded youtube videos, eg: https://www.youtube.com/watch?feature=player_embedded&v=
To fix this we changed line 21 to
set youtubecheck [regexp -all -nocase {(?:\?v=|\&v=|youtu\.be\/)([\d\w-]{11})} $text match youtubeid]
And added
bind pubm -|- "*youtube.*&v=*" youtubesurl