(mIRC) Recent Activity Menu

By raccoon on Jan 24, 2015

Click Like
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,@* {

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


Sign in to comment.
raccoon   -  Jan 24, 2015

@Hawkee : Edits prohibit <.img> amd <.br> tags without a closing <./img> or <./br> tags (there's no such thing as <./img> or <./br>). Tags without closing tags will break all following ```code blocks.

Also, could you add a means of uploading images that doesn't require creating a comment thread?

Also, there's a bug with editing comments if one doesn't click the black "More" button first, and sometimes there is no "More" button if the comment is short. The "Save Changes" button is invisible below the fold.

Hawkee  -  Jan 24, 2015

@raccoon Do you mean you are using <.img> and <.br> tags in your post? You're meant to use Markdown. Images use the following format, http://daringfireball.net/projects/markdown/syntax#img You have no need to use a br as paragraphs will automatically be converted to p blocks.

I've been considering adding an image upload to the page editor, but I just haven't had a chance to implement it. In the mean time images can be uploaded anywhere such as imgur first then embedded using Markdown.

Thank you about the comment editing. That is indeed a bug.

EDIT: I just tweaked the CSS to make the p blocks more visible in threads and comments. They have a lot more of a margin in the page content itself for readability.

raccoon  -  Jan 24, 2015

I was just copying the <.img> <.br> tags as visible in older snippets that you converted to the new format. Figured i'd be consistent. That isn't to say that HTML is illegal in Markdown, because it isn't.

Hawkee  -  Jan 24, 2015

I'll have a look because you are allowed to use those tags, but they aren't the preferred method.

raccoon  -  Jan 24, 2015

I also notice on occasion after several edits to a script that 3 or 4 non-printable unicode characters appear at the very end of my page in Markdown view.

Also, I'm not all together clear on the purpose of the Preview mode, and think it's slightly dangerous that edits made in Preview mode are not saved and simply vanish. Editing shouldn't be made possible if that's the case in Preview.

raccoon  -  Jan 24, 2015

And this thread doesn't appear under my Notices when I click the bell icon. I still see the Scakk thread. Scrolling down, this thread isn't displayed at all.

Hawkee  -  Jan 24, 2015

@raccoon I'll have to check into the unicode characters. Good catch on preview mode, I hadn't thought of that. I'll have to disable the editor during that mode. The purpose of preview mode is to see what the page will look like with parsed Markdown.

Hawkee  -  Jan 24, 2015

Yes, I believe that is another bug. Notices pertaining to threads made on pages sometimes don't show up as notices. That's on my bug fix list.

Hawkee  -  Jan 24, 2015

Thank you for all your feedback, it's very helpful. I noticed you didn't offer any descriptive text concerning this page. You should at least offer an intro describing what it does.

raccoon  -  Jan 24, 2015

I dunno. The title and graphic seem to speak for itself. You're welcome to give it a try if you use mIRC :) Speaking of, did you get the password reset email I sent to lure you back onto Freenode? :P

Hawkee  -  Jan 24, 2015

The graphic doesn't show up on the page directory, only the first paragraph. I've been on OS X for the past 10 years, so it's a little troublesome to start up mIRC. I did get the password reset and was wondering what that was about. I just haven't had much need for IRC lately with StackOverflow being able to answer all my development questions.

raccoon  -  Jan 26, 2015

Also, I don't use <.br> tags because I want <.p> tags to be more visible. I use them because I want less visibility between line breaks. Your implementation of Markdown is broken because it doesn't respect natural line breaks as <.br>, which is the correct behavior. Your expanding of <.p> exacerbates the issue.

This is a line

This is another line.

These three lines should be vertically touching. I am using <.br>

This is a line
This is another line.
I didn't use <.br> between any of these lines, only natural line breaks, and they are not being respected.

Hawkee  -  Jan 26, 2015

I'm not sure I follow you. This is how GitHub implements it. What would you like to accomplish?

Hawkee  -  Jan 26, 2015

I see what you mean. By default Parsedown removes single line breaks. There is an option called "setBreaksEnabled" which I've just enabled. We'll give it a try and see how well it works.

raccoon  -  Jan 26, 2015

Natural break line one.
Natural break line two.
I did not use BRs. here.

BR break line one.

BR break line two.

I did use BRs here.

On observation of my previous comment, and I'm betting will happen here as well, is that BR broken lines will have twice breakage. Not sure if you can condense or ignore line-ending BRs that people have already used in old and very old posts, so they don't become twice the BRs. If that makes any sense?

Yes, I do like the natural break behavior. I think it's a primary syntax of Markdown that people expect. Does GitHub do it differently?

Hawkee  -  Jan 26, 2015

You don't need to use actual <.br> tags as that would be redundant. Markdown prefers that you don't break individual lines and to instead use blockquotes or lists for that sort of thing. That is why it's not supported out of the box. You can end a line with two spaces to get a single line break traditionally though. GitHub doesn't support single line breaks on project readme's, but it does support them on comments.

There really shouldn't be many <.br> tags used on the site as we never required them. A newline was always sufficient.

raccoon  -  Jan 27, 2015

However, THIS thread appears under Notices now. The other one still does not.

raccoon  -  Jan 27, 2015


Sign in to comment

raccoon   -  Jan 24, 2015

Images for Recent Activity Menu

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.