mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Bug Reports Jump to new posts
Re: Unicode $upper $lower $isupper $islower Protopia 11 hours ago
A couple of years ago I did look into mIRC support for Unicode, and the differences between mIRC's use of UCS-2 (which is a subset of full unicode UTF-16) and full Unicode, and I started to write a utility script which imported a unicode definition file and used that to provide a full range of Unicode identifiers. But I had to stop work on it due to other real-life priorities, and haven't had a chance to go back to it - but it does give me an insight into the difficulties in this area.

To fix this properly would require mIRC to switch its strings from UCS-2 to UTF-16 - and this might have some general backward compatibility issues.

So I imagine that this is a really non-trivial change.

That said, I would be happy to share either my design thoughts for the identifiers I was planning to provide or even the embryonic code I created if Khaled or anyone else is interested.
2 63 Read More
Bug Reports Jump to new posts
Re: /setlayer sets 0 if not using a number. KindOne Yesterday at 07:04 PM
Quote
15.Changed /setlayer to report an error if invalid parameters are
used.


Thank you. smile
3 188 Read More
Bug Reports Jump to new posts
mIRC beta Khaled Yesterday at 06:57 PM
The latest beta can be downloaded here and includes these changes:

Quote
Beta v7.63.649 changes:
1.Item 13, https://forums.mirc.com/ubbthreads.php/topics/267766
The $regml().pos results for UTF-8 characters now point to the
start of the character in the unicode string.
2.Item 14, https://forums.mirc.com/ubbthreads.php/topics/267766
3.Item 15, https://forums.mirc.com/ubbthreads.php/topics/267753
This will now report an error and halt the script if text is
used instead of a number, and if the number is out of range.
4.Item 16, fixed.
5.Item 17, added, uses QueryPerfomanceCounter(). In the past, this
API was unreliable on multiple cores/different versions of
Windows but seems better now. Note that it returns different
results to $ticks, so they cannot be used together.

Beta v7.63.478 changes:
1.Item 9, updated.
Changed the behaviour of the Connect/Options/Ports/Bind feature:
If you enter an adapter name, mIRC will always search for a
matching adapter to find its current IP address. If you enter an
IP address, it will always use that IP address.
2.Item 11, https://forums.mirc.com/ubbthreads.php/topics/267739
Needs testing.
3.Item 12, updated.

Beta v7.63.416 changes:
1.Item 1, https://forums.mirc.com/ubbthreads.php/topics/267596
2.Item 2, https://forums.mirc.com/ubbthreads.php/topics/267574
3.Item 3, https://forums.mirc.com/ubbthreads.php/topics/267624
4.Item 4, https://forums.mirc.com/ubbthreads.php/topics/267637
5.Item 5, extended. Added to end of the LOADINFO structure. DLLs
need to check the version number to determine if it is present.
6.Item 6, https://forums.mirc.com/ubbthreads.php/topics/267642
7.Item 7, fixed.
8.Item 8, fixed.
9.Item 9, https://forums.mirc.com/ubbthreads.php/topics/267723
10.Item 10, changed.

Changes:
1.Fixed /bcopy not copying zero length binary variables.
2.Fixed /timer -h multimedia timer bug that caused imprecise elapsed
time measurement at low millisecond intervals.
3.Fixed $bfind() N parameter not being applied during a .regex search.
4.Fixed $min()/$max() parsing bug.
5.Extended the DLL LOADINFO structure to include a DWORD dBytes
variable that specifies the maximum number of bytes allowed when
writing to the data and parms strings.
6.Fixed /timer halted message not being displayed in some cases.
7.Fixed DDE server not being reset when DDE settings changed in the
Options DDE dialog.
8.Fixed SSL private key error incorrectly being reported as an
SSL certificate error in some contexts.
9.Fixed bind to adapter/IP address bug that prevented it from using
adapters with dynamic IP addresses.
10.Changed $base() to remove limit on floating point precision for
larger bases.
11.Fixed $base() not rounding fractions to current base.
12.Updated LibZip library to v1.7.3.
13.Changed $regml().pos so that if //u is not used for a unicode
string, UTF-8 characters now return the position of the start
of the character in the unicode string.
14.Added $regml().bytepos that returns the UTF-8 byte positions
matched within a string.
15.Changed /setlayer to report an error if invalid parameters are
used.
16.Fixed $bfind().regex issues related to UTF-8 parsing.
17.Added $ticksqpc that returns a high resolution tick count.
1 189,998 Read More
mIRC Help Jump to new posts
Re: mIRC Window always sits on top of others Wims Yesterday at 05:38 PM
Note that there is a on top setting as well in alt + o > display > options > windows... but I tried it and it's working as expected on 7.63: accessing the window's menu of the main mIRC window shows the on top setting, and disabling it there does work, unsetting the checkbox in alt + o as well as making the window not on top.
Make sure the value of $file($mircexe).sig is "ok", try to use the latest version of mIRC.
7 1,938 Read More
Feature Suggestions Jump to new posts
Re: $bvar().hex /bset|/breplace -x hex Wims Yesterday at 04:14 PM
Not bad ideas but they don't belong to this thread about binvar and regex.

To stay on topic, you said:

Quote
While normally $bfind returns the position of the match, the .regex prop makes it return the number of matches instead of a position within the binvar, so your regex pattern must use a capture group and you must use $regml([name,]N).pos to find that position
This is an extremely important point and I've been pointing it out for a long time: mIRC does not provide the fullmatch position (or its value anyway) and it really needs to, because some regex requires you to have a capture in ways that is not compatible with this workaround, so despite ().bytepos's addition in the next beta, it won't fix the problem of getting the correct position for $bfind().regex. So yeah, Khaled, please add the fullmatch result and position to $regml*() identifiers.

Another thing is that $bfind().regex encodes the binary variable's content to utf8.
This is wanted for someone coming from $regex() and having line length limit issue, someone using $regex(data,/\w+/u) wants his data to be utf8 encoded in $bfind(&data,1,/\w+/u).regex
However, this is not wanted for someone who wants to get control over the byte, //bset &v 1 233 | echo -ag $bfind(&v,1,\xa9).regex is currently returning 1 because 233 gets encoded to 195 169, and a9 is 169.

It doesn't make that much sense to do byte based search with $regex etc while mIRC is sending utf8 to pcre and will want to convert back to 16 bits array, and basically, it can be said that /u should have been enforced there.
But now that we have a way to use binary variable, it makes no sense to touch the byte in the binvar when it's their purpose to be left untouched by mIRC.

In any case, for backward compatible reason, we now need a way to make $bfind().regex not encode to utf8, but i'd rather see it changed since it's new, so that it doesn't encode to utf8 by default, and add something to make it encodes the data.
And this is regardless of /u usage, if i want to inspect bytes, i won't use /u, if i do, i'll use /u, but I still want to encode the byte in the binvar myself:
For example, $utfencode could be extended with a property to take the first parameter as a binary variable if it starts with a '&', so that current usage of $utfencode() with something that starts with a & still work.

Edit: the just released beta does not utf8 encode the binvar anymore, but there's still no good way to encode it if we want to.
8 5,817 Read More
Feature Suggestions Jump to new posts
Full Install backups Zmodem 27/09/20 11:24 PM
Signing in after over 4 years of no activity in order to make a suggestion for retaining more than 1 backup, relating to this thread:

  • User selects to backup their existing stuff
  • Setup does a check of backup count
    a.) If !backups, goto the next dialog and skip the rest of this
    b.) If backups >= 1, show another dialog:
    ________________________________________________________________________________________________________________

    There %is/are% currently %x% previously stored backup(s). Would you like to:

    :::: Add a checkbox here which says [ _ ] Clear All Stored mIRC Backups .
    :::::::: If checkbox == &true&, gray-out the Overwrite Last Backup button below

    { Overwrite Last Backup } { Create New Backup }

    c.) If the user selects to overwrite last, or they've selected the checkbox to clear all, intervene with:
    Are you sure that you want to permanently remove %the last/all% previous mIRC backup(s)?
    { Yes } { No }

    ________________________________________________________________________________________________________________



Not sure if this is "too much", lol, but it does extend more options to the user, and solves the previous issue from the older mIRC flavors. Storage capacity concerns are almost a non-existent issue these days as far as mIRC backups go smile Heck, you could even, if you so desired, add a button like "View Previous Backups". But, this might be a little too over the top for an installer lol crazy

Anyways, that's all I got!
0 25 Read More
Bug Reports Jump to new posts
Re: $+ * Break: evaluation error Khaled 27/09/20 06:14 PM
Thanks for your bug report. I am aware of $+'s quirky behaviour in different contexts. I am afraid that it is a very old identifier and it would be impossible to change its code without creating side-effects and backward compatibility issues, especially since the equally old code that handles () and [] bracket parsing is itself complex, so there are no plans to change how it works.
1 58 Read More
Scripts & Popups Jump to new posts
Re: $ial().gecos and $ialchan().gecos not working Khaled 27/09/20 05:20 PM
The reason for this is that /ialfill will not allow you to repeatedly refill the IAL if it is already full, ie. contains addresses of all of the nicknames on the channel.

The IAL is usually filled with nicknames and addresses when you join a channel on networks that support the IRCv3 extended-join token. If a network does not support this, the IAL will not be filled.

No other details are filled, since these are not provided by the network on a join.

If you want to update other properties in the IAL, such as .gecos, and the IAL is already full, you will need to use /ialclear and then /ialfill.

Note that if you do this too often, you may be disconnected by the server, especially on channels with large numbers of users.

Also note that .gecos, .away, and .account can change, so the IAL may not always contain the latest information. Except on networks that support the IRCv3 setname, account-notify, and away-notify events, in which case the client will receive notifications of changes to update the IAL.
1 108 Read More
Feature Suggestions Jump to new posts
$min add'l sort orders maroon 27/09/20 05:05 PM
Suggestion to have an additional .prop's for $min and $max which use the default $sorttok and $sorttokcs orders when they don't use the $3 switch. The current mappings for $min appear to be:

Quote

no .prop = $sorttok 'n' numeric
.text = $sorttok 'a' alphanumeric
.textcs = $sortokcs 'a' alphanumeric
.nick = $sorttok 'c' channel

missing = $sorttok no-switch
missing = $sorttokcs no-switch


Code
alias minmaxsort {
  if ($1- == $null) var -s %list a 0 b \ 1 ! A . ~ 2 @ 11 | else var %list $1-
  echo -a default : $sorttok(  %list,32)
  echo -a alphanum: $sorttok(  %list,32,a) min: $min(%list).text   max: $max(%list).text
  echo -a numeric : $sorttok(  %list,32,n) min: $min(%list)        max: $max(%list)
  echo -a nicklist: $sorttok(  %list,32,c) min: $min(%list).nick   max: $max(%list).nick
  echo -a alnum cs: $sorttokcs(%list,32,a) min: $min(%list).textcs max: $max(%list).textcs
  var -s %list a 0 b \ 1 A  ~ 2 11
  echo -a default :: $sorttok(    %list,32)
  echo -a defaultcs: $sorttokcs(  %list,32)
  echo -a alpha num: $sorttok(    %list,32,a) min: $min(%list).text   max: $max(%list).text
  echo -a alnum cs : $sorttokcs(  %list,32,a) min: $min(%list).textcs max: $max(%list).textcs
  var -s %list a \ A
  echo -a default  : $sorttok(    %list,32)
  echo -a defaultcs: $sorttokcs(  %list,32)
}
0 25 Read More
Feature Suggestions Jump to new posts
Dividing line between blocks in the script editor Epic 27/09/20 06:50 AM
When I write a script and it gets big enough, then in this script it is rather difficult to navigate in order to quickly find the right place in the block and to fix a bug or add new lines of code.

Please create a dividing line in the script editor to make it easier to navigate and visually separate the different blocks of the huge script.
Turning on and off, as well as setting the thickness and color in the $rgb() format of horizontal lines can be placed in the editor options.

The horizontal line should automatically appear under the last curly brace "}" of each individual script block, and of course, when copied, this line should not be part of the text code.
Note: if a block of code (alias or handler) consists of only one line, then the dividing horizontal line can be omitted.

This will make writing the script much more convenient and not have to draw text strips between the blocks:

Code
alias test1 {
  /echo -s test1 1
  /echo -s test1 2
  /echo -s test1 3
}
==================================================
alias test2 {
  /echo -s test2 1
  /echo -s test2 2
  /echo -s test2 3
}


An example of how it might look:

[Linked Image from i.ibb.co]
0 52 Read More
Bug Reports Jump to new posts
Re: $regml().pos $regmlex().pos Khaled 25/09/20 09:55 AM
Okay, I have added a $regml().bytepos property to the next beta. This will be filled for all types of regex matches, since the regex search is byte, not UTF-16, based anyway.
3 201 Read More
Scripts & Popups Jump to new posts
Re: Random Issue maroon 25/09/20 02:10 AM
You can use the 'goto' command to go to a label, which is a text string beginning with a colon. You could do something like:

====
if ( $rand(1,2) ) == 1 goto goodbean
else goto badbean

:badbean
code goes here
goto label123

:goodbean
code goes here
goto label123

:label123
code goes here
==========
obviously, you didn't need the "goto badbean" since that label was on the next line. and same goes for the goto at the end of the goodbean code.

You can simplify your script by keeping your messages either in separate text files, or in a hashtable. hashtable has the advantage of being kept in memory, so you don't need a disk read each time. text file has the advantage of being easy to /play the text file and see a list of all your messages.

Also, the $read command has the random feature built into it, when you don't give it a line number to read. This example uses the 'n' switch because that prevents any word beginning with $ or % from being replaced by how they evaluate. i.e. a line in the text file containing $me would print the literal "$me" instead of using your nick.

var %message $read(goodbean.txt,nt) $+ 1,0Enjoy The Bean

This fills a variable with a random line from the text file. This way you don't need to keep adjusting your script each time you add another message. Notice how I appended the final portion of the 'good bean' message, so you don't need to put that on every line of the text. If you find it harder to put the Ctrl+K symbol into the text file when using something like notepad, you can choose a character that will never be used in any of your messages, and use that in place of the color code. For example, assume the character will be the asterisk, the text file would contain lines like:

Black Pepper *15,1( *4Black*15 *4Pepper*15 )
Garlic *30,1( *4Garlic*30 )

and then you can fetch random lines like this, while changing the asterisk back to the Ctrl+K symbol:

msg %beanch Hands %victem a $replace($read(badbean.txt,nt),*,$chr(3)) $+ 1,0 Ohhh You've Been BeanBoozeled

After you read a random line, if you need to know which line was most recently read from any disk file, the line number is contained in $readn

Something else you should change in your script is that your variables are being created as global variables which continue to be saved in your vars tab of the scripts editor long after your script is used, even though they aren't needing to be saved for later. You can make them be local by either using /set -l or using /var

var %victem $nick
var %beanch #PoulsKitchen


It looks like
set -kl %badcount + 1
is supposed to be a counter for how many times the bad routine has been hit. By using the -l flag, this creates the variable as a local variable which doesn't exist outside the ON TEXT event. What this is doing is defining the variable as the literal string "+ 1". If you want to increment a global variable, you can do it like: /inc %badcount
1 80 Read More
Scripts & Popups Jump to new posts
Re: Help Needed for a Script. *please* Epic 24/09/20 06:53 AM
I read your request and decided to try writing my own script, and this is what I got cool
3 types of protective checks for flooding, installation and automatic removal of the mode on the channel and kick on the bully's nickname.
All control in the alias "af_data". You can enable and disable different types of verification separately, as well as adjust the number of actions and the number of seconds after which need to respond.

Code
#####################################################################
#   AntiFlood v1.0
#   Description: Catching different types of flood on channels
#   Author: Epic
#####################################################################

alias af_data {
  .hadd -m af check-mess true
  .hadd -m af check-rep true
  .hadd -m af check-words true
  .hadd -m af check-mode true
  .hadd -m af check-kick true
  ;---------------------------
  .hadd -m af max-mess 5
  .hadd -m af max-mess-sec 3
  .hadd -m af max-rep 3
  .hadd -m af max-rep-sec 10
  .hadd -m af max-words 200
  .hadd -m af max-words-sec 10
  .hadd -m af mode +m
  .hadd -m af demode -m
  .hadd -m af mode-sec 300
  .hadd -m af reason flood/spam
}
====================================================
alias afcheck {
  var %af_check count- $+ $1 $+ $2
  if ($prop == rep) return $hget(af_rep,%af_check)
  if ($prop == rsec) return $hget(af_rsec,%af_check)
  if ($prop == mes) return $hget(af_mess,%af_check)
  if ($prop == msec) return $hget(af_msec,%af_check)
  if ($prop == words) return $hget(af_words,%af_check)
  if ($prop == wsec) return $hget(af_wsec,%af_check)
}
alias af_count_mes {
  var %af_count count- $+ $1 $+ $2
  if (!$hget(af_msec,%af_count)) .hadd -mz af_msec %af_count $hget(af,max-mess-sec)
  if (!$hget(af_mess,%af_count)) .hadd -mu $+ $hget(af,max-mess-sec) af_mess %af_count 0
  if ($hget(af_msec,%af_count) > 0) .hinc -m af_mess %af_count 1
}
alias af_count_rep {
  var %af_count count- $+ $1 $+ $2
  if (!$hget(af_rsec,%af_count)) || ($3- !isin $hget(af_rep_text,%af_count)) {
    .hadd -mz af_rsec %af_count $hget(af,max-rep-sec)
    .hadd -mu $+ $hget(af,max-rep-sec) af_rep %af_count 0
    .hadd -m af_rep_text %af_count $3-
  }
  else { .hinc -mu $+ $hget(af,max-rep-sec) af_rep %af_count 1 }
}
alias af_count_words {
  var %af_count count- $+ $1 $+ $2
  if (!$hget(af_wsec,%af_count)) .hadd -mz af_wsec %af_count $hget(af,max-words-sec)
  if (!$hget(af_words,%af_count)) .hadd -mu $+ $hget(af,max-words-sec) af_words %af_count 0
  if ($hget(af_wsec,%af_count) > 0) .hinc -m af_words %af_count $numtok($3-,32)
}
====================================================
on *:TEXT:*:#:{
  af_data | var %af_count count- $+ $nick $+ $chan
  if ($hget(af,check-mess) == true) af_count_mes $nick $chan
  if ($hget(af,check-rep) == true) af_count_rep $nick $chan $1-
  if ($hget(af,check-words) == true) af_count_words $nick $chan $strip($1-)

  ;# Debug check script echo
  ;/echo -s 28debug:18 $nick $chan 28 message:53 $hget(af_mess,%af_count) $hget(af_msec,%af_count) 28 repeat:41 $hget(af_rep,%af_count) $hget(af_rsec,%af_count) 28 words:29 $hget(af_words,%af_count) $hget(af_wsec,%af_count)

  if ($afcheck($nick,$chan).mes >= $hget(af,max-mess) && $afcheck($nick,$chan).msec > 0) {
    /echo -a FLOOD $chan $nick :40 $afcheck($nick,$chan).mes messages in40 $hget(af,max-mess-sec) seconds.
    if ($hget(af,check-mode) == true) af_mode_chan $nick $chan
    if ($hget(af_mess,%af_count)) .hdel -sw af_mess count-* | if ($hget(af_msec,%af_count)) .hdel -sw af_msec count-*
  }
  if ($afcheck($nick,$chan).rep >= $hget(af,max-rep) && $afcheck($nick,$chan).rsec > 0) {
    /echo -a FLOOD $chan $nick :40 $afcheck($nick,$chan).rep reps in40 $hget(af,max-rep-sec) seconds.
    if ($hget(af,check-mode) == true) af_mode_chan $nick $chan
    if ($hget(af_rep,%af_count)) .hdel -sw af_rep count-* | if ($hget(af_rsec,%af_count)) .hdel -sw af_rsec count-*
  }
  if ($afcheck($nick,$chan).words >= $hget(af,max-words) && $afcheck($nick,$chan).wsec > 0) {
    /echo -a FLOOD $chan $nick :40 $afcheck($nick,$chan).words words in40 $hget(af,max-words-sec) seconds.
    if ($hget(af,check-mode) == true) af_mode_chan $nick $chan
    if ($hget(af_words,%af_count)) .hdel -sw af_words count-* | if ($hget(af_wsec,%af_count)) .hdel -sw af_wsec count-*
  }
}
====================================================
alias af_mode_chan {
  if ($hget(af,check-kick) == true) /kick $2 $1 $hget(af,reason)
  if (!$timer(AF $+ $2)) {
    /mode $2 $hget(af,mode)
    .timerAF $+ $2 1 $hget(af,mode-sec) /mode $2 $hget(af,demode)
  }
}
====================================================
1 184 Read More
Scripts & Popups Jump to new posts
Re: dll errors when clicking custom toolbar maroon 24/09/20 01:48 AM
You'd need to hope there's someone out there who uses this dll, which I've never heard of. A dll is like a collection of 1-or-more identifiers or commands wrapped up inside an external binary. Hopefully you have some documentation telling you which procedure names are inside the dll, and hopefully the docs tell you the syntax of how to use them.

The procedures inside the dll are similar to alias names inside the dll which can do things a scripted alias can't do by itself, and the procedures need to be called in their exact case-sensitive name. You can call them like a command, as in:

/dll filename.dll procedurename this is the $1- for the procedure
or
//echo -a $dll(filename.dll,procedurename,this is the $1- for the procedure)

We'll have a hard time helping you when your problem is that, not only are you not feeding the $1- to the dll's procedure, you're not even passing the name of the procedure either.

edit: if you have trouble figuring out that dll, perhaps better luck with spopup.dll http://www.xise.nl/mirc/
3 93 Read More