Twitch TV chat bot code help!

Ok so i have been making my friend an IRC bot that can run in his channel and i have been writing it in JavaScript,

needless to say im rather new to JavaScript and i would like to know if anyone could help in the case of how to ban links or time out people that link stuff, this is how i have it set out (basic command)

 

on *:text: !youtube:#: {

  msg $chan go to my youtube at blah blah blah .com

}

 

and this will give the output to the channel, it also has little join messages and a points system.

also im using mIRC if that helps.

 

Thanks for any help you can give in advance