mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Latest News Jump to new posts
mIRC 7.71 released Khaled 01/10/22 12:17 PM
Dear mIRC User,

mIRC v7.71 has been released today.

This is a small update that adds features and addresses a number of issues reported by users since the last release. It includes improvements, changes and fixes, including:

Changed the way Windows system libraries are loaded to prevent DLL hijacking.
Added tray tip warning on startup if mIRC has been minimized to the system tray but Windows has hidden its icon.
Fixed colons being stripped out of nick, alternative nick, user, emails, /nick, and server list entries.
Fixed /hsave -i intermittent crash bug caused by a data race / race condition across multiple threads.
Changed CTCP PING to not reply to text containing CTCP control codes to mitigate NAT-AGAIN Linux kernel NAT bug (CVE-2022-2663).
Fixed tab key evaluation of identifiers in editboxes that contain multiple CR/LF-delimited lines.
Fixed nested single-line while loop break bug.
Fixed /socklisten -pu with UPnP, IPv6 address, and dual stack not opening an IPv4 UPnP port on the router.
Fixed Aero theme bug where if /window +b was used, a miniature titlebar was being drawn.
Fixed alternative nick bug when left empty in connect dialog.
Updated CA root certificates cacert.pem file.

How to upgrade?
mIRC is distributed in an installer that installs mIRC on your computer for you. Simply download and run the installer from the download page on the mIRC website. Follow the instructions the installer gives to you. When upgrading all your old settings and scripts will stay as they were, if you want that. Read the questions the installer asks with care and nothing can go wrong. You will be chatting with the new mIRC in no time. If you get stuck or if you want to find out more about a certain feature, just click on a Help button or browse the Help file and you should find lots of hints to help you out.

Where to download?
As always, the latest version of mIRC can be downloaded from the download page on the mIRC website.

Registering mIRC
As you know, mIRC can be downloaded freely and evaluated for 30 days. If you find that you enjoy using mIRC, it would be great and much appreciated if you registered your copy. This licenses you to use your copy of mIRC and helps to support our continued work on mIRC. You can find out how to register here.

Full list of Fixes, Changes and Additions.
For a more detailed list of recent changes, please see the whatsnew.txt file. You will need to read through the help file to learn more about these changes and their impact. Some changes are obvious, some need getting used to - please take your time to play with them and see how they work. May we invite you to use these forums for all questions you might have? The forums offer great help with everything related to mIRC!

Thanks for using mIRC, have fun on IRC!
0 93 Read More
Feature Suggestions Jump to new posts
Autoconnect to multiple servers on start eahm 28/09/22 05:24 PM
I know this can be fixed with a single line of code/script but isn't it safe to say it should be a default feature? It would be wonderful to see an "Autoconnect" box on the alt+e+alt+e dialog so when you open mIRC it will connect to 1-2-3-4...N servers/networks.

Thanks Khaled.
0 35 Read More
Scripts & Popups Jump to new posts
$base2 -- working with higher number Wims 22/09/22 03:37 PM
This post is meant to offer a solution to the problem mentioned here

As mIRC does not support 64 bits numbers, it's possible to do math on string.

Code
alias base2 {
  var %a 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ, %i -1, %t 0, %r 
  while ($mid($1,%i,1) >= 0) var %v $v1,%pos $pos(%a,%v) - 1,%pow $pow_($2,$calc((%i + 1) * -1)),%m $multiply_(%pow,%pos),%t $add_(%t,%m),%i %i - 1
  if ($3 == 10) return %t
  while %t >= 1 {
    %i = $mod_(%t,$3) + 1
    %r = $mid(%a,%i,1) $+ %r 
    %t = $divide_(%t,$3)
  }
  return %r
}

alias divide_ {
  var %res, %idx 1, %temp = $mid($1,1,1)
  while (%temp < $2) {
    inc %idx
    %temp = $calc(%temp * 10 + $mid($1,%idx,1));
  }
  while ($mid($1,%idx,1) != $null) {
    %res = %res $+ $int($calc(%temp / $2))
    inc %idx
    %temp = $calc((%temp % $2) * 10 + $mid($1,%idx,1))
  }
  if ($len(%res) == 0) return 0
  return %res
}

alias pow_ {
  if ($2 == 0) return 1
  var %temp $1,%n $2 - 1,%r $1
  while (%n) {
    %r = $multiply_(%r,%temp)
    dec %n
  }
  return %r
}

alias add_ {
  if ($len($2) > $len($1)) tokenize 32 $2 $1
  set -l %result
  set -l %carryover
  set -l %temp
  while ($right($1,15) isnum) {
    %temp = $base($calc($v1 + $right($2,15) + %carryover),10,10,$len($v1))
    %carryover = $mid(%temp,1-,-15)
    %result = $right(%temp,15) $+ %result
    tokenize 32 $mid($1,1-,-15) $mid($2,1-,-15)
  }
  return %result
}

alias mod_ {
  var %res 0,%a 1
  while ($mid($1,%a,1) != $null) {
    %res = $calc(%res * 10 + $v1) % $2
    inc %a
  }
  return %res
}

alias multiply_ {
  if ($len($2) > $len($1)) tokenize 32 $2 $1
  set -l %temp
  set -l %result
  set -l %multiplicand $1
  set -l %multiplier
  set -l %remaining
  set -l %interval
  set -l %padding
  set -l %carryover
  tokenize 1 $2
  while ($1 isnum) {
    %multiplier = $right($1,7)
    %remaining = $mid($1,1-,-7)
    %carryover = 0
    if (%multiplier > 0) {
      tokenize 1 %multiplicand
      while ($right($1,7) isnum) {
        %temp = $base($calc($v1 * %multiplier + %carryover),10,10,$len($v1))
        %carryover = $mid(%temp,1-,-7)
        %interval = $right(%temp,7) $+ %interval
        tokenize 1 $mid($1,1-,-7)
      }
      if (%carryover) %interval = %carryover $+ %interval
      %result = $add_(%result,%interval $+ %padding)
    }
    %padding = %padding $+ $str(0,$len(%multiplier))
    tokenize 1 %remaining
  }
  return %result
}
Credit to Dazuz for the two aliases $add_ and $multiply_, which can add and multiply two integers together, these integers can be of any length.
original $base2 alias by visionz
I created $mod_ $pow_ and $divide_, but these do not work with both integer being of any length, only the first integer can be of any length, which is enough for the purpose of $base.
0 108 Read More
Feature Suggestions Jump to new posts
$read n1 w1 r1 s1 maroon 16/09/22 07:35 PM
Suggesting n1 w1 r1 s1 switch for $read to return the correct string containing leading space(s) while preserving backwards compatibility. Either that, or another switch letter to use with n/w/r/s that preserves leading spaces. This is like the /write -w switch to obtain correct $crlf without affecting existing behavior.

Originally Posted by F1 help
If the n switch is specified then the line read in will not be evaluated and will be treated as plain text.

That identical sentence is in /help for both $read and $readini, and the following command confirms that $readini returns leading + trailing + internal_consecutive spaces when the 'n' switch is used, while it returns the trimmed string $gettok(string,1-,32) when 'n' is not used:

//bset -c &v 1 91 77 93 13 10 97 61 32 32 99 32 32 99 32 32 | bwrite -c test.txt 0 99 &v | bset -t &v 1 $encode($readini(test.txt,n,m,a),m) | noop $decode(&v,bm) | echo -a $bvar(&v,1-)

Quote
with 'n':::: 32 32 99 32 32 99 32 32
without 'n': 99 32 99

However the same thing with $read 'n' switch preserves the internal consecutives and the trailing, but always strips the leading:

//bset -c &v 1 32 32 99 32 32 99 32 32 | bwrite -c test.txt 0 99 &v | bset -t &v 1 $encode($read(test.txt,tn,1),m) | noop $decode(&v,bm) | echo -a $bvar(&v,1-)

Quote
with 'n':::: 99 32 32 99 32 32
without 'n': 99 32 99

... and the following shows that 'nw' and 'nr' also return the same strings with leading spaces chopped but internal_consecutive/trailing preserved:

//bset -c &v 1 32 32 99 32 32 99 32 32 | bwrite -c test.txt 0 99 &v | bset -t &v 1 $encode($read(test.txt,tnw,$chr(32) $+ *),m) | noop $decode(&v,bm) | echo -a $bvar(&v,1-)

//bset -c &v 1 32 32 99 32 32 99 32 32 | bwrite -c test.txt 0 99 &v | bset -t &v 1 $encode($read(test.txt,tnr,.),m) | noop $decode(&v,bm) | echo -a $bvar(&v,1-)

--

The same thing can also be argued for 'ns', where the behavior of 's' is to match a line where 'search string' is followed by a space, where it returns everything except 'search string' and ALL spaces. In the next example, 'ns' is used with a search term that ends with 1 space, and it only matches if the 98 is followed by at least two 32's, but it then returns the string with all 32's following the search term stripped, and should probably return the following string having only the 1st 32 stripped.

//bset -c &v 1 97 32 32 32 98 32 32 32 99 32 32 99 32 32 | bwrite -c test.txt 0 99 &v | bset -t &v 1 $encode($read(test.txt,tns,a $chr(32) b $+ $chr(32)),m) | noop $decode(&v,bm) | echo -a $bvar(&v,1-)

--

I found the same spaces stripping behavior in 6.35, with the exception of a caching bug caused by $read not realizing that the file's content had changed since it had been accessed by $readini.

--

I found this behavior when trying to use $read to re-assemble paragraphs in a text file where there were no blank lines, and the continuation lines of a paragraph were indented like the display you'd see from:

//echo -i5 $str(deadbeef $+ $chr(32),100)

Since the file wasn't exceptionally large, the work-around was to use /filter to send the file content to @hidden, where /filter did output the string containing leading spaces, and $line() returns leading/trailing/consecutive spaces if present.
0 88 Read More
Scripts & Popups Jump to new posts
seen - need com chan, help? CeraVea 05/09/22 02:42 PM
I have a neat script that I stumbled here in the forums and it's working but I'd like to add common channels, if possible.
Script to return which common channel it last saw the user.
For example, I did !seen <nick> in channel #1, and the script would return which last common channel it last saw the nick (in case the user did not join #channel 1, but happened to actually join channel#2 and parted/quitted there, kinda thing, if that makes sense, heh).

Can someone help me with this?

Code
 seen script--

alias seenstart {
  hfree -w seen
  hmake seen 500
  if (!$isfile(Seen.db)) write Seen.db
  hload -b seen Seen.db
}

alias -l seentime return $asctime($gmt,yyyy-mm-dd HH:nn:ss) UTC.

alias -l seenshort if ($len($1) > $2) return $left($1,$2) $+ ... | else return $1

on *:start:seenstart

on *:exit:hsave -b seen Seen.db

on *:join:#:hadd seen $nick $gmt $nick joining # channel at $seentime

on *:part:#:hadd seen $nick $gmt $nick leaving # channel $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime

on *:quit:hadd seen $nick $gmt $nick quitting $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime

on *:kick:#: {
  hadd seen $knick $gmt $knick getting kicked from # channel by $nick $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime
  hadd seen $nick $gmt $nick kicking $knick from # channel $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime
}

on *:nick: {
  hadd seen $nick $gmt $nick changing their name to $newnick at $seentime
  hadd seen $newnick $gmt $nick changing their name to $newnick at $seentime
}

on *:topic:#:hadd seen $nick $gmt $nick changing the topic of # channel to $qt($seenshort($strip($1-),300)) at $seentime

on *:notice:*:#:hadd seen $nick $gmt $nick saying $qt($seenshort($strip($1-),300)) on # at $seentime

ctcp *:*:#:hadd seen $nick $gmt $nick sending $qt($seenshort($strip($1-),300)) CTCP message on # at $seentime

on *:action:*:#:hadd seen $nick $gmt $nick saying $qt($seenshort($strip($1-),300)) on # at $seentime

on *:text:*:#: {
  hadd seen $nick $gmt $nick saying $qt($seenshort($strip($1-),300)) on # at $seentime
  if ($istok(! . @ $ �,$left($1,1),32)) && ($istok(seen s,$mid($1,2-),32)) {
    var %m = .msg #
    if (!$2) %m Error: invalid parameters. Usage: $upper($1) <NAME>
    elseif ($2 == $me) %m I believe I'm right here, although I might be wrong. Maybe I'm just the product of your imagination.
    elseif ($2 == $nick) %m $replacex($gettok(<nick>? Never heard. <44> @.@ |I heard <nick> is somewhere in the mirror<44> go and take look.|<nick probably is on a date!|<nick> is behind you... awooo.,$rand(1,10),124),<nick>,$nick,<44>,$chr(44))
    elseif ($hget(seen,$2)) { tokenize 32 $v1 | %m I last saw $2- $b($duration($calc($gmt -$1)) ago) }
    elseif ($hget(seen,$hfind(seen,$2,1,w).item)) {
      var %n = $2
      tokenize 32 $v1
      %m I last saw $2- $b($duration($calc($gmt -$1)) ago)
      if ($hfind(seen,%n,0,w) > 1) %m There are also $bytes($calc($v1 -1),b) other(s) whose name matches to $qt(%n) $+ : $seenlistnames(%n)
    }
    else %m I don't think I know who $2 is or seen lately. 
  }
}

alias -l seenlistnames {
  var %x = 2,%n
  while ($hfind(seen,$1,%x,w)) {
    var %n = %n $v1
    if (%x >= 10) return $replace(%n,$chr(32),$chr(44) $+ $chr(32)) $+ ...
    inc %x
  }
  return $replace(%n,$chr(32),$chr(44) $+ $chr(32))
}


0 107 Read More