Originally Posted By: pball
It now checks if any cheers were counted before replying. If you add multiple keywords there will be a separate reply for each one, that can be fixed.

Code:
on *:text:*:#: {
  set -l %keywords test
  set -l %num 1
  while ($gettok(%keywords,%num,32)) {
    set -l %kw $v1
    noop $regex($1-,/ $+ %kw $+ (\d+) $+ /iSg)
    set -l %num2 1
    while ($regml(%num2)) {
      set -l $+(%,%kw) $calc($($+(%,%kw),2) + $v1)
      inc %num2
    }
    if ($($+(%,%kw),2) > 0) {
      msg $chan thanks for the $($+(%,%kw),2) cheers!
      writeini -n Cheers.ini $+(#,-,$date) %kw $calc($readini(Cheers.ini,$+(#,-,$date),%kw) + $($+(%,%kw),2))
    }
    inc %num
  }
}


If the single reply per keyword could be fixed, that would be great. Makes everything more simple. It does work good though!

Last edited by KevinSlice; 23/05/17 04:27 PM.