Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpbrett committed Aug 22, 2018
1 parent 0535afb commit 791a64f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if (process.env.REDISTOGO_URL) {
}

function changeKarmaAndPost(rtm, team, channel, entity, delta) {
console.log("changing karma")
redis.zincrby(rkey(team), delta, entity,
function(err, obj) {
rtm.send({
Expand All @@ -26,10 +27,12 @@ function changeKarmaAndPost(rtm, team, channel, entity, delta) {
var handleMessage = function(rtm, message) {
console.log("karmabot handling message")
redis.get(rkey(message.team, "on"), function(err, obj) {
console.log("redis get success: err:" + err + " obj: " + obj)
if (obj && !err) {
var regex = /(\S+)(\+\+|--)\b/g
var match = null
while ((match = regex.exec(message.text)) !== null)
console.log("matching34: " + match)
{
var matchname = match[1]
var regexpString = "^<@>"
Expand Down

0 comments on commit 791a64f

Please sign in to comment.