Your if-statement will be true as long as the first word of your input is not literally "/*". To use the *-char as a wildcard, use for example the "iswm" operator.
Also note that "on input" will cover only your own messages - you need some "on text" event to cover the messages of other users.

Example for your /timer approach:
Code:
; text send by yourself
; "ison" prevents counting of messages sent while disconnected
on *:input:#xyz: {
  if (/* !iswm $1) && ($me ison #xyz) {
    inc %pdeactivity
    .timer 1 10800 dec %pdeactivity
  }
}

; text send by other users
on *:text:*:#xyz: {
  if ($1 == !activity) { msg # I recorded %pdeactivity messages on # in the last 3 hrs. }
  else { 
    inc %pdeactivity
    .timer 1 10800 dec %pdeactivity
  }
}

; timers started without the -o switch and while connected will stop on disconnect.
; you therefore should "reset" the variable on disconnect [or use the -o switch]
on *:disconnect: { set %pdeactivity 0 }


Here's an alternative approach, setting hash table items (a random number to create unique items) which unset after 3hrs. It allows you to use the script for multiple networks / multiple channels as the hash tables are named dynamically.
Code:
on *:input:#: {
  if (/* !iswm $1) && ($me ison #) { hadd -mu10800 $+(activity,$cid,#) $+($ticks,$rand(1,999)) }
}
on *:text:!activity:#: { msg # I recorded $hget($+(activity,$cid,#),0).item messages on # in the last 3 hrs. }

on *:text:*:#: { hadd -mu10800 $+(activity,$cid,#) $+($ticks,$rand(1,999)) }



Last edited by Horstl; 22/08/09 10:54 PM.