Skip to content

Instantly share code, notes, and snippets.

@dz0ny
Created May 6, 2013 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dz0ny/5527663 to your computer and use it in GitHub Desktop.
Save dz0ny/5527663 to your computer and use it in GitHub Desktop.
odgovori_spam_prot = (r, msg)->
redis.get("irc:antispam").then (anti)->
unless anti
redis.set "irc:antispam", msg
redis.expireat "irc:antispam", moment().add("hours", 1).unix()
r.reply msg
bot.command /^jutro$/i, (r) ->
odgovori_spam_prot r, "Jutro #{r.nick} !"
bot.command /^dan$/i, (r) ->
odgovori_spam_prot r, "Dan #{r.nick} !"
bot.command /^caw$/i, (r) ->
odgovori_spam_prot r, "Adijo #{r.nick}"
bot.command /^ju+hu+$/i, (r) ->
odgovori_spam_prot r, "Lepo te je slišati #{r.nick}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment