Advertisement
Tiago_f

Update Check

Feb 2nd, 2024 (edited)
1,098
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 5.18 KB | None | 0 0
  1. menu status,menubar {
  2.   Update-c&heck... :checkver
  3. }
  4. alias sdt {
  5.   if ($did($did).state) { set % $+ $1 1 }
  6.   else { unset % $+ $1 }
  7. }
  8. alias checkver { noop $dialog(checkver,checkver,-4) }
  9. alias new.version {
  10.   did -a checkver 13 mIRC 7.76 has been released! (January 7th 2024)
  11.   did -a checkver 13
  12.   did -a checkver 13 This is a small update that adds features and addresses a number of issues reported by users since
  13.   did -a checkver 13 the last release. It includes improvements, changes and fixes, including:
  14.   did -a checkver 13
  15.   did -a checkver 13 · Updated to Visual Studio 2017 to compile mIRC.
  16.   did -a checkver 13 · Updated OpenSSL library to v3.0.12.
  17.   did -a checkver 13 · Updated CA root certificates cacert.pem file.
  18.   did -a checkver 13 · Fixed switchbar vertical scrollbar buttons not being visible on Windows 11.
  19.   did -a checkver 13 · Added support for larger GUI icons for high resolution monitors.
  20.   did -a checkver 13 · Fixed notify list MONITOR event parsing to handle events without hostnames.
  21.   did -a checkver 13 · Fixed numeric 324 bug when parsing date range.
  22.   did -a checkver 13 · Enabled Control Flow Guard runtime security checks.
  23.   did -a checkver 13 · Fixed /toolbar -p bug that was not freeing memory correctly.
  24.   did -a checkver 13 · Fixed typing notifications bug in parted/kicked channel windows.
  25.   did -a checkver 13 · Added tab completion suffix option to Keys dialog.
  26. }
  27. alias new.beta {
  28.   did -a checkver 13 1.Item 27, changes:
  29.   did -a checkver 13
  30.   did -a checkver 13 Updated the dialog resource parser to handle several more
  31.   did -a checkver 13 contexts when loading/checking/comparing resources. Also now
  32.   did -a checkver 13 takes account of changes that Resource Hacker makes to controls,
  33.   did -a checkver 13 which was preventing mIRC from validating/using them.
  34.   did -a checkver 13 $chr(32)
  35.   did -a checkver 13 Experimented with resizing dialogs/controls in order to handle
  36.   did -a checkver 13 longer translated text. Many of the dialogs and controls are tightly
  37.   did -a checkver 13 sized/fitted. This will require changes to almost all dialogs and
  38.   did -a checkver 13 will take a lot of work.
  39.   did -a checkver 13 $chr(32)
  40.   did -a checkver 13 Signed up with with Crowdin for translations and experimented with
  41.   did -a checkver 13 editing/importing/exporting resources.
  42. }
  43. alias StartVersion {
  44.   did -r $dname 13
  45.   did -a $dname 11 Checking for updates...
  46.   did -h $dname 4,8
  47.   did -b $dname 6
  48.   if (%check.beta) { var %URI = https://forums.mirc.com/ubbthreads.php/topics/225704 }
  49.   else { var %URI = https://www.mirc.com/get.html }
  50.   noop $urlget(%URI,gbi,&CheckVer,processWmIRC)
  51. }
  52. alias ProcessWmIRC {
  53.   if ($dialog(checkver)) {
  54.     var %beta = /The latest beta can be downloaded <a href="https\x3A\x2F\x2Fwww\x2Emirc\x2Ecom\x2Fdownloads\x2Fbeta\x2F([^"]+)"[^>]+>here</a>/i
  55.     var %norm = /The latest version of mIRC is <strong>mIRC ([^<]+)</strong>/i
  56.     var %id = $1 , %BV = $urlget(%id).target, %m
  57.     if ($urlget(%id).state = ok) {
  58.       if ($bfind(%BV,1,%norm,Norm).regex) {
  59.         var %m = $mid($regml(Norm,1),2)
  60.         if (%m != $version) {
  61.           did -e checkver 6
  62.           did -v checkver 4,8
  63.           did -a checkver 11 %m
  64.           new.version
  65.           set %url.get $nofile($urlget(%id).url) $+ get.php
  66.           set %url.news $nofile($urlget(%id).url) $+ news.html
  67.         }
  68.         else {
  69.           did -ra checkver 11 mIRC is up to date.
  70.           did -e checkver 6
  71.         }
  72.       }
  73.       elseif ($bfind(%BV,1,%beta,Beta).regex) {
  74.         var %m = $mid($wd($regml(Beta,1),1,46),9)
  75.         if (%m != $beta) {
  76.           did -e checkver 6
  77.           did -v checkver 4,8
  78.           did -a checkver 11 $+($version,.,%m)
  79.           new.beta
  80.           set %url.get $+(https://www.mirc.com/downloads/beta/,$regml(Beta,1))
  81.           set %url.news $urlget(%id).url
  82.         }
  83.         elseif (%check.beta) { var %URI = https://www.mirc.com/get.html | noop $urlget(%URI,gbi,&CheckVer,processWmIRC) }
  84.       }
  85.     }
  86.     else {
  87.       did -a checkver 11 There was a problem contacting the mIRC website.
  88.       did -e checkver 6
  89.     }
  90.   }
  91. }
  92. dialog checkver {
  93.   title "mIRC Update"
  94.   size -1 -1 515 397
  95.   text "Installed version:", 9, 12 13 90 14, multi return
  96.   text "Newest version:", 10, 12 35 90 14, multi return
  97.   text "", 11, 120 35 300 14, multi return
  98.   text "Changes from new version:", 12, 12 57 150 14, multi return
  99.   list 13, 12 75 490 250, autovs size
  100.   link "What's new in this version?", 4, 370 55 185 14, hide
  101.   text "", 1, 120 13 80 14, multi return
  102.   check "C&heck for new beta versions", 5, 12 372 157 14
  103.   button "Check for &updates", 6, 10 334 107 23
  104.   button "&OK", 7, 427 366 76 23, cancel
  105.   button "&Download now", 8, 396 334 107 23, center hide ok
  106. }
  107. on *:dialog:checkver:*:*:{
  108.   if ($devent == init) {
  109.     did -a $dname 1 $iif($beta,$+($version,.,$beta),$version)
  110.     did -f $dname 9
  111.     if (%check.beta) { did -c $dname 5 }
  112.   }
  113.   elseif ($devent == sclick) {
  114.     if ($did == 4) { url -an %url.news }
  115.     elseif ($did == 5) { sdt check.beta }
  116.     elseif ($did == 6) { StartVersion }
  117.     elseif ($did == 8) { url -an %url.get }
  118.   }
  119.   elseif ($devent == close) { unset %url.get %url.news }
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement