Advertisement
westor

Away Titlebar for Koragg v1.0

Feb 16th, 2020
963
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.50 KB | None | 0 0
  1. menu status {
  2.   $iif(!$away,$style(2)) Away in Titlebar
  3.   .$iif(!%titlebar_ [ $+ [ $network ] $+ ] _autoset,$style(0),$style(3)) Show: { set -e %titlebar_ $+ $network $+ _autoset 1 | .timer[CHECK_TITLEBAR_ $+ $network $+ _AWAYTIME] 0 1 check_titlebar_awaytime $network }
  4.   .$iif(%titlebar_ [ $+ [ $network ] $+ ] _autoset,$style(0),$style(3)) Hide: { unset %titlebar_ $+ $network $+ _autoset | .timer[CHECK_TITLEBAR_ $+ $network $+ _AWAYTIME] off | check_titlebar_awaytime $network }
  5. }
  6.  
  7. alias away {
  8.   if ($1 == $null) && (%titlebar_ [ $+ [ $network ] $+ ] _autoset) { unset %titlebar_ $+ $network $+ _autoset | .timer[CHECK_TITLEBAR_ $+ $network $+ _AWAYTIME] off | check_titlebar_awaytime $network }
  9.  
  10.   !away $1-
  11. }
  12.  
  13. alias check_titlebar_awaytime {
  14.   if (%titlebar_ [ $+ [ $1 ] $+ ] _autoset) {
  15.     titlebar - You are currently away on $1 network. - (Reason: $awaymsg $+ ) - (AwayTime: $duration($awaytime) $+ ) .
  16.  
  17.     if ($timer([CHECK_TITLEBAR_ $+ $1 $+ _AWAYTIME]).pause) { .timer[CHECK_TITLEBAR_ $+ $1 $+ _AWAYTIME] -r }
  18.   }
  19.   else { titlebar $version }
  20. }
  21.  
  22. ON *:DISCONNECT: {
  23.   if (%titlebar_ [ $+ [ $network ] $+ ] _autoset) {
  24.     unset %titlebar_ $+ $network $+ _autoset
  25.  
  26.     .timer[CHECK_TITLEBAR_ $+ $network $+ _AWAYTIME] off
  27.  
  28.     check_titlebar_awaytime $network
  29.   }
  30. }
  31.  
  32. ON *:ACTIVE:*: {
  33.   var %w = $scid($lactivecid).network
  34.   var %n = [CHECK_TITLEBAR_ $+ %w $+ _AWAYTIME]
  35.  
  36.   if ($network !== %w) {
  37.     if ($timer(%n)) { .timer $+ %n -p }
  38.   }
  39.  
  40.   check_titlebar_awaytime $network
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement