Skip to content

Commit

Permalink
Merge pull request github#158 from whitman/demolition-man
Browse files Browse the repository at this point in the history
Add demolition man script
  • Loading branch information
Tom Bell committed Nov 16, 2011
2 parents c22aef0 + 09218cf commit 6e20c54
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/scripts/demolition-man.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Watch your language!

module.exports = (robot) ->

words = [
'arse',
'ass',
'bastard',
'bugger',
'bollocks',
'bullshit',
'cock',
'cunt',
'damn',
'dick',
'douche',
'fag',
'fuck',
'fucked',
'piss',
'shit',
'wank'
]
regex = new RegExp('(?:^|\\s)(' + words.join('|') + ')(?:\\s|\\.|\\?|!|$)', 'i');

robot.hear regex, (msg) ->
msg.send 'You have been fined one credit for a violation of the verbal morality statute.'

0 comments on commit 6e20c54

Please sign in to comment.