Jump to content
coders-irc_Bot

(mIRC) Recent Activity Menu

Recommended Posts

  • Administrators
Posted

Handy menus that display recent activity in mIRC and take you there with a click!
More features to come . . .

 

; Recent Menu by Raccoon Jan 2015

MENU Status,Channel,Query,Menubar,@* {
  -
  $menuspeedtest
  Recently
  .Opened
  ..$submenu($recent_menu($1,opened))
  .Viewed
  ..$submenu($recent_menu($1,viewed))
  .Typed
  ..$submenu($recent_menu($1,typed))
  .Spoken
  ..$submenu($recent_menu($1,spoken))
  .Highlighted
  ..$submenu($recent_menu($1,highlighted))
  $menuspeedtest
}

ALIAS -l menuspeedtest {
  if (!%_menuspeedtest) set -u2 %_menuspeedtest $ticks
  if ($mouse.key & 4) return $calc(($ticks - %_menuspeedtest) /1000) sec
}

ALIAS -l recent_menu { ; by Raccoon 2015
  if ($1 == begin) set -u %_menu_recent $hget(recent,$2)
  if ($1 isnum 1-35) {
    var %a = $gettok(%_menu_recent,$1,32), %wid = $gettok(%a,1,58), %ticks = $gettok(%a,2,58)
    var %win = $window(%wid), %dur = $dur($calc(($ticks - %ticks)/1000),2)
    var %net = $iif(!$window(%wid).anysc,$scid($window(%wid).cid).network $(|))
    if (%win) return %net %win $+ $chr(9) $+ %dur $+ : window -a %wid
    ;if (%a) return --- (window closed) --- $+ $chr(9) $+ %dur $+ : noop
    if (%a) return :
  }
  if ($1 isnum) && (!%_menu_recent.done) { set -u %_menu_recent.done $true | return - }
  if ($1 == end) return Clear: hdel recent $2
}
ALIAS -l dur { return $regsubex($gettok($duration($1),1- $+ $2,32),/(\d+\w)\D*/g,\t) } ; by Raccoon

On *:ACTIVE:*:  recent_add viewed $activewid
On *:INPUT:*:   recent_add typed $activewid
On *:OPEN:*:    recent_add opened $window($target).wid
On me:*:JOIN:*: recent_add opened $chan($chan).wid
ALIAS -l recent_add { ; by Raccoon 2015
  var %a = $hget(recent,$$1), %wid = @ $+ $$2
  var %a = %wid $+ : $+ $ticks $regsubex(%a,/ %wid :\d+/xg,)
  if ($len(%a) > 4000) var %a = $deltok(%a,-1,32)
  hadd -m recent $1 %a
}

On *:TEXT:*:*:   recent_spoke $1-
On *:ACTION:*:*: recent_spoke $1-
On *:NOTICE:*:#: recent_spoke $1-
ALIAS -l recent_spoke { ; by Raccoon 2015
  if ($1- !isnum) && ($highlight($1-)) recent_add highlighted $window($target).wid
  recent_add spoken $window($target).wid
}

 

irc(menu).png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...