bug fix e rimozione vecchi easter eggs

This commit is contained in:
Enrico Fasoli 2015-05-06 18:09:11 +02:00
parent 2e5e6760a5
commit d80a53089e
2 changed files with 7 additions and 23 deletions

View File

@ -58,26 +58,11 @@ module.exports = (robot) ->
res.send res.random(stato)+'. tu?'
robot.respond /ridi/i, (res)->
res.send res.random risata
robot.hear /trogu/i, (res) ->
res.send 'comprate le prevendite da Trogu!!!'
robot.hear /sarte/i, (res) ->
res.send 'gesùùùù!!!'
robot.hear /migno/i, (res) ->
res.send 'il migno viene dal Molise... che non esiste... ahahah'
robot.hear /friz/i, (res)->
res.send 'Ehm... praticamente...'
robot.hear /dilda/i, (res)->
res.send 'oplààààà'
robot.hear /gg( \w+)?\.?$/i, (res)->
res.send 'wp' unless res.match[1] is ' wp'
robot.hear /^bravo (\w+).?$/i, (res)->
unless res.match[1].match /asjon|assa|assion|assioni(?:i|e)/i
res.send res.random(complim)+' '+res.match[1]
robot.hear /^(\w+) merda.?$/i, (res)->
if res.match[1].match /asjon|assa|assion|assioni/i
res.send res.random risata
else
res.send 'terra bruciata'
robot.respond /dove sei/i, (res) ->
robot.http('http://canihazip.com/s')

View File

@ -29,21 +29,20 @@ fs.readFile './config/orario.json', (err, data) ->
try
orario = JSON.parse data
catch e
console.log e
orario = undefined
fs.readFile './config/interrogazioni.json', (err, data) ->
try
interr = JSON.parse data
catch e
console.log e
interr = undefined
interr.sort (a,b) ->
if moment(a.day,'YYYY-MM-DD').isBefore(b.day,'day')
return -1
if moment(a.day,'YYYY-MM-DD').isAfter(b.day,'day')
return 1
return 0
if interr?.sort?.call?
interr.sort (a,b) ->
if moment(a.day,'YYYY-MM-DD').isBefore(b.day,'day')
return -1
if moment(a.day,'YYYY-MM-DD').isAfter(b.day,'day')
return 1
return 0
module.exports = (robot) ->
robot.respond /(?:che )?cosa abbiamo (?:per )?(domani|oggi)(?:\?)?/i, (res) ->