# # flash.irc - gets your attention when something happens... # # blue green red @FLASH_COLORS = array(getMappedColor(12), getMappedColor(3), getMappedColor(4)); $FLASH_CURRENT = -1; # no flash is currently happening on public { if ($me isin $1-) { flashTab(1); } } on msg { flashTab(1); } on signon { flashTab(0); } on kick { if ($1 eq $me) { flashTab(2); } } sub flashTab { if (getSessionId() != getActiveSessionId() && $TAB_COLOR == $null && $FLASH_CURRENT <= $1) { $TAB_COLOR = getSessionColor(); $FLASH_CURRENT = $1; $X = 0; sub tabtemp { if (($X % 2) == 0) { setSessionColor(@FLASH_COLORS[$FLASH_CURRENT]); } else { setSessionColor($TAB_COLOR); } $X++; if (getSessionId() == getActiveSessionId()) { stopTimer($TAB_TIMER); setSessionColor($TAB_COLOR); $FLASH_CURRENT = -1; $TAB_COLOR = $null; } } $TAB_TIMER = addTimer(&tabtemp, 500); } }