                     timeSinceLastPing: #{timeSinceLastPing},
                     houndFrequency: #{user.settings.houndFrequency}"
 
-      if timeSinceLastPing == 0 or
-         timeSinceLastPing >= user.settings.houndFrequency
+      if (timeSinceLastPing == 0 or timeSinceLastPing >= user.settings.houndFrequency) and
+         timeSinceLastPunch > 0.25
         if user.salary
-          if not lastPunch and not user.isInactive()
+          if not lastPunch and not user.isInactive() and not passive
             Logger.debug "Considering hounding #{user.slack} because of missing lastPunch during active period"
-            if now.isAfter(start) and timeSinceStart <= 0.5
+            if now.isAfter(start) and timeSinceStart >= 0.5
               user.hound strings.punchin[Math.floor(Math.random() * strings.punchin.length)], Logger
             else if now.isAfter(end) and timeSinceEnd >= 0.5
               user.hound strings.punchout[Math.floor(Math.random() * strings.punchout.length)], Logger

                  lastPunch.mode is 'sick' or
                  lastPunch.mode is 'unpaid'
            Logger.debug "Considering hounding #{user.slack} because lastPunch is special"
            if lastPunch.times.length > 0 and not now.isBetween(lastPunch.times[0], lastPunch.times[1])
              user.hound strings.punchin[Math.floor(Math.random() * strings.punchin.length)], Logger
            else if lastPunch.times.block?
              endOfBlock = moment(lastPunch.date).add(lastPunch.times.block, 'hours')
              if not now.isBetween(lastPunch.date, endOfBlock)
                user.hound strings.punchin[Math.floor(Math.random() * strings.punchin.length)], Logger
          else
            Logger.debug "Considering hounding #{user.slack} because it's during their active period with no in punch"
            if timeSinceStart <= 0.5
              user.hound strings.punchin[Math.floor(Math.random() * strings.punchin.length)], Logger
            else if timeSinceEnd <= 0.5
              user.hound strings.punchout[Math.floor(Math.random() * strings.punchout.length)], Logger
        else # Part-timer-only hounding
          if lastPunch and lastPunch.mode is 'in' and timeSinceLastPunch > 4
            user.hound strings.tempout, Logger
      else
        Logger.debug "#{user.slack} is safe from hounding for another
                      #{user.settings.houndFrequency - timeSinceLastPing.toFixed(2)} hours"

module.exports = (robot) ->
  Logger = require('../helpers/logger')(robot)

  hound = (slackuser, channel, forceHound=false, passive=false) ->
    if robot.name is slackuser.name
      Logger.debug "Caught myself, don't hound the hound."
      return
