; http://dev.adiirc.com/boards/5/topics/163 ; outputs same nick random color for the message ; v0.2 by pereba ; Changelog: ; ; v0.2: ; - support for any identifier for message nick/emote config: $pnick,$status,$user. ; - added an experimental basic znc buffer playback support. Please don't complain for my newbish implementation, I'm glad it is working fine. ; ps: only compatible with timestamp enabled in znc options (on by default). ; ; v0.1: ; - initial release. on 1:START: { UserConf } on 1:LOAD: { UserConf } on 1:UNLOAD: { unset %RColor.* } alias -l UserConf { set %RColor.nickConfig $strip($readini(config.ini, Messages, prefixuser),c) set %RColor.actionConfig $strip($readini(config.ini, Messages, prefixemote),c) set %RColor.Enabled 1 set %RColor.Timestamp.Enabled 1 set %RColor.Action.Enabled 1 } if (%Rcolor.enableprefixcolor) { return $replacex($nickFormated,+,$chr(3) $+ 8,%,$chr(3) $+ 4,@,$chr(3) $+ 6),!,$chr(3) $+ 11,&,$chr(3) $+ 13,~,$chr(3) $+ 12) } ;channel on ^*:TEXT:*:#: { if ($nick == ***) && ($1- == Buffer Playback...) { set -e %RColor.znc.playback. [ $+ [ $cid ] $+ . $+ [ $chan ] ] 1 echo $EchoMode # $nickFormated $1- halt } if ($znc.playback == 1) && ($nick != ***) { echo $TheColor -rlmbf # $iif(%RColor.Timestamp.Enabled == 1,$1) $nickFormated $2- } if ($nick == ***) && ($1- == Playback Complete.) { unset %RColor.znc.playback. [ $+ [ $cid ] $+ . $+ [ $chan ] ] echo $EchoMode # $nickFormated $1- halt } if ($znc.playback != 1) { echo $TheColor $EchoMode # $nickFormated $1- } halt } ;action on ^*:ACTION:*:#: { if ($nick == ***) && ($1- == Buffer Playback...) { set -e %RColor.znc.playback. [ $+ [ $cid ] $+ . $+ [ $chan ] ] 1 echo $EchoMode # $nickFormated $1- halt } if ($znc.playback == 1) && ($nick != ***) { if (%RColor.Action.Enabled == 1) { echo $TheColor -rlmbf # $iif(%RColor.Timestamp.Enabled == 1,$1) $actionFormated $2- halt } } if ($nick == ***) && ($1- == Playback Complete.) { unset %RColor.znc.playback. [ $+ [ $cid ] $+ . $+ [ $chan ] ] return } if ($znc.playback != 1) && (%RColor.Action.Enabled == 1) { echo $TheColor $EchoMode # $actionFormated $1- halt } } alias -l TheColor { if ($nick(#,$nick).color > 0) { return $nick(#,$nick).color } } alias -l EchoMode { if (%RColor.Timestamp.Enabled == 1) { return -trlmbf } return -rlmbf } alias actionFormated return $replace(%RColor.actionConfig,$!pnick,$iif($nick == ***,***,$nick($chan,$nick).pnick),$!status,$left($nick(#,$nick,a,r).pnick,1),$!nick,$nick) alias nickFormated return $replace(%RColor.nickConfig,$!pnick,$iif($nick == ***,***,$nick($chan,$nick).pnick),$!status,$left($nick(#,$nick,a,r).pnick,1),$!nick,$nick) alias -l znc.playback { return %RColor.znc.playback. [ $+ [ $cid ] $+ . $+ [ $chan ] ] } menu menubar { - $iif(%RColor.Enabled == 1, $style(1),) 🎨 RColor Messages .$iif(%RColor.Enabled == 1, Disable, Enable) : $iif(%RColor.Enabled == 1, unset %RColor.Enabled, set %RColor.Enabled 1) .$iif(%RColor.Timestamp.Enabled == 1, $style(1),) Use timestamp : $iif(%RColor.Timestamp.Enabled == 1, unset %RColor.Timestamp.Enabled, set %RColor.Timestamp.Enabled 1) .$iif(%RColor.Action.Enabled == 1, $style(1),) Apply for action : $iif(%RColor.Action.Enabled == 1, unset %RColor.Action.Enabled, set %RColor.Action.Enabled 1) - }