Project

General

Profile

[Deprecated] [Script] Avoid Consecutive Timestamp v0.1.3

Added by Mr. BS almost 5 years ago

This script will avoid timestamp to consecutive message from same user.

Screenshot

Observations

- Not applied to your own messages, I have no plan to implement it (On Input event) due classic MSL issue that removes consecutive spaces.
- Not sure how it will behave when you are talking with two or people at same time in query/pm.

Changelog

  • v0.1.3
    - Added a simple white list separated by space to not remove timestamp, in current example ***, which is the ZNC buffer playback "nick".
    - Fix, in some networks was returning double prefix, ie. @+nick.
  • v0.1.2
    - Initial Public Release.
; http://dev.adiirc.com/boards/5/topics/183
; Avoid Consecutive Timestamp
; v0.1.3 by pereba

on 1:LOAD:prefix
on 1:START:prefix
on 1:UNLOAD:unset %ACT.*

alias -l prefix { set %ACT.prefix $readini(config.ini, Messages, PrefixUser) }

;nick whitelist separated by space
alias -l whitelist { return *** }

;channel messages
on ^*:TEXT:*:#:{
  if ($nick == %ACT.last. [ $+ [ # ] ] ) && (!$istok($whitelist,$nick,32)) {
    echo -rlmbf # $str($chr(160),$len($timestamp)) $&
    $replace(%ACT.prefix,$!pnick,$left($nick(#,$nick,a,r).pnick,1) $+ $nick,$!status,$left($nick(#,$nick,a,r).pnick,1),$!nick,$nick) $1-
    halt
  }
  set %ACT.last. $+ # $nick
}

;pm/query
on ^*:TEXT:*:?:{
  if ($nick == %ACT.lastpm) {
    echo -rlmbf $nick $str($chr(160),$len($timestamp)) $replace(%ACT.prefix,$!pnick,$nick,$!status, ,$!nick,$nick) $1-
    halt
  }
  set %ACT.lastpm $nick
}

on &*:INPUT:#: {
  set %ACT.last $me
}

on &*:INPUT:?: {
  set %ACT.lastpm $me
}