mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
mIRC Help Jump to new posts
Re: mIRC Twitch bot gifting subs bot maroon Yesterday at 07:45 PM
Remove those lines from the other event, and put these lines in a brand new remote scriptfile
in the remote tab of the alt+R script editor you can use the file/new to do that.
Then put these lines in that file:

  if (!$window(@usernotice)) window -z @usernotice
  echo 3 $time @usernotice nick $nick chan $chan tags: $msgtags
  echo 4 $time @usernotice nick mesg: $1-
  beep 1

The beep is just to make a sound when something goes to the window, and you can remove that
Once you have some lines in the window, you can either copy them by highlighting with the mouse, or the @usernotice window will have a "buffer" menu choice in the upper left corner of the window, from where you can either save-as to disk, or copy to clipboard
6 217 Read More
General Discussion Jump to new posts
Re: SSL expiring mx5 30/01/23 02:34 PM
Thank You smile
2 121 Read More
Scripts & Popups Jump to new posts
Re: A script for a timestamp maroon 30/01/23 09:09 AM
Well after reading your latest post, I went back to the original, and there's no way I could've possible read the 1st post to be close to what you're wanting in the 2nd one.

I didn't run this script or change my clock to test it, but it should work.

What this alias does is check the current time that it's running, then sets %day to the 3-letter code for the day of the week, Sun thru Sat, and sets %now to be the current HourMinutes. It then creates %next as whichever is the next closest future time of the day between these 2 times, so obviously the variable contains a time between 950 and 1149 then the next nearest time will be 11:50, but otherwise it would be 09:50.

If the alias runs at 9:50am on Sun or Fri, the echo is where you can put your 'do stuff'.
And likewise, if it runs at 11:50am on Mon or Thu, there's another echo for that stuff.

But regardless of whether it matches any of those day/time combos, it then launches the timer again trying to execute at the next time window.

The syntax for timer lets you either set it to run at a specific hours:minutes within the next 24 hours, or to run at a specific number of seconds in the future. It's a lot simpler here to let it execute on each day of the week, but only do things on the correct days.

I have no idea what you mean by putting the script on the name, or doing a checkup. So that's probably in the place for the 'do stuff'. Depending on what you want to do those 4 days, it might be needed to split the Sun Fri trigger into 2 sections.

alias DJtime {
  var %now $asctime($ctime,HHnn) , %day $asctime($ctime,ddd)
  var %next 09:50
  if (%now isnum 0950-1149) var %next 11:50

  if ( (%now == 0950) && ( $istok(Sun Fri,%day,32) )) {
    echo -s do stuff at 950am on Sun or Fri

    goto next

  if ( (%now == 1150) && ( $istok(Mon Thu,%day,32) )) {
    echo -s do stuff at 1150am on Mon Thu

    goto next

  .timerDJtime -o %next 1 0 DJtime
3 126 Read More
Bug Reports Jump to new posts
Re: Icon dialog control Khaled 29/01/23 03:24 PM
Thanks for your bug report. The custom dialog code does not handle spaces at all in this case. The only reason that format is working for you is that some of the Windows image APIs parse spaces. I have extended the icon code to remove extra spaces before calling the APIs. As far as I can tell, this shouldn't break backward compatibility but will need testing.

As for the disabled/hidden icon on startup, this also applies to hotlinks. These have always worked this way and there are no plans to change this behaviour.
1 77 Read More
Feature Suggestions Jump to new posts
Re: if condition, literal spaces and timer evaluations maroon 28/01/23 05:25 PM
//var -s %a $unsafe(a)
* Set %a to $unsafe(YQ==).undo

//var -s %a $unsafe(%null)
* Set %a to

It looks like $unsafe is an alias that behaves like

alias makesafe {
  if (.prop == undo) returnex $decode($1,m)
  var %string $encode($1,m)
  return $ $+ makesafe( $+ %string $+ ).undo

The handler for .undo obviously has no trouble when the input string is blank, but if there is a problem inside the code where it doesn't like creating the .undo string to be blank, assuming .undo is being handed to the subroutine handling $decode, can simply make the string be a single base64 symbol, which $decode would return as the empty string. So the final return could be preceded by:

  if (%string == $null) var %string A

So the solution is to have $unsafe($null) return either $unsafe().undo or $unsafe(A).undo
1 87 Read More
Scripts & Popups Jump to new posts
Re: how to stop auto reply on second time Talon 28/01/23 04:03 PM
Since this is throw-away data, there's no sense in having a special database for it, like hash/ini/text/global vars...

The simplest solution would be to take advantage of /ialmark. I assume for the lifespan a user remains within your ial you only wish to respond ONCE to a specific trigger, like hello. If it is indeed intended to only allow a response every 10 minutes like maroons example, uncomment the last line.

This also circumvents the issue about disk-writes maroon mentioned with using variables. This also addresses an unforseen problem with maroons hash-table example as it does not follow nick changes and would re-trigger if they consistantly change nicknames to ones not logged into the database. By using IAL, this is managed automatically for us!

ON *:TEXT:*Hello*:#:{
  if (!$ialmark($nick,$+($chan,.greeted))) {
    .ialmark -n $nick $+($chan,.greeted) 1
    .timer 1 $rand(2,5) msg $unsafe($chan $nick $+ $chr(44) Hi dude!)

    ;== Uncomment below to make it trigger only once per nick within 600ms...
    ;$+(.timer,$chan,.,$nick) 1 600 .ialmark -rn $nick $+($chan,.greeted)

Remember that an IAL entry persists as long as there are common rooms between you and the user. If you want this to re-trigger again if they rejoin from a part/kick and say "hello", you'd want to unset that mark on part/kick as well (in-case they're in more than one common channel, if not, it's un-necessary as it'll naturally get expunged)

You do not have to worry about a part/kick event to unset the mark if you've uncommented that timer (allowing it to always trigger as long as it hasn't been triggered previously by the same user within 10 mins)
4 521 Read More
Bug Reports Jump to new posts
mIRC 7.72 hangs w/Remote Desktop Kufat 27/01/23 05:52 PM
I'm running Windows 10 21H1.

Since upgrading my installation of mIRC from 7.6x (don't recall the exact version, sorry) to 7.72, I've experienced hangs when connecting to my PC via Remote Desktop. When the hang occurs, mIRC is completely unresponsive and doesn't answer server pings, etc. The hangs seem to occur randomly, although thus far I haven't seen one when mIRC has had focus. I don't know if they're limited to Remote Desktop, as I don't currently have physical access to the machine.

Task Manager shows ~25% CPU usage when this happens, which corresponds to using all of one core on my machine.

I generated a core dump and can provide it privately, if that'd be helpful.
0 62 Read More
Feature Suggestions Jump to new posts
"ON MIRCTEXT" EVENT maroon 26/01/23 10:16 PM
Suggesting some kind of "ON MIRCTEXT" EVENT to handle window messages generated by the client itself, which would allow a script to monitor them for content, so they could ^HALT them or take action based on their content.

There are some settings in mIRC where there's not an identifier call to find the value, but the setting can be found in mirc.ini [options], but those aren't officially documented for new scriptors to find them, and in some cases would force the script to issue a /saveini to make sure the $readini value is correct. But there are other things where you can't peek at disk to see the setting.

This would be easier and more accurate than trying to inspect the status window from the bottom-up looking for content without actually being able to confirm that this was a message created by the client instead of created by something else like /echo /loadbuf /filter.

I'm seeing this as a 'catch all' event to handle all the text that's not something that can be handled by intercepting 'raw' or other events. If it's not something generated by 'raw' or some other event where the info can be obtained, it would trigger this instead.

Depending on what happens when you use a silencing dot for commands like /.dcc passive, a script can see the setting for something without the message being displayed, if the event handler has some kind of $shown identifier returning $true or $false, to indicate whether the text can actually be seen.

One use case for this would be for situations like the problem I encountered related to this thread


I was helping fix someone else's script, where they were using /play to send significant amount of text to channel, but when the /play stop command was issued, it kept sending output to channel because several lines were queued in the flood que. I didn't want to just clear the que too, because there's no way for the script to know how many of the lines in the que were for this script vs other text. Also, as far as I know, other than looking at the output from the /flood command, there's no other way to find how many lines are in the flood buffer. So instead I used the /flood command to send the message to the status window, from where I could use

$gettok($line(status window,$line(status window,0)),-6-,32)

to get the content of the last line in the status window, to show a message to channel telling how many lines were pending in the que. It worked fine for me, but not for the person I was helping, and it took a while to figure out there was different behavior because they didn't have the line separator deleted, so the last line of their status window was a "-" instead of being the message I was looking for.

Other use for this would be things like detecting the reconnect 'retry #N' message text showing to screen, so a script could take action based on what was (or was not) happening.

Possibly the most common use for this would be - if the midnight "Session Time:" were also echoed to the status windows - this would be an easy way for scripts to be triggered every midnight without the complications of trying to do this with a timer, where there would also be the risk that something could ruin it with /timer* off. If the decision were that the Session Time message would be shown only to the status window, it would be easy for a script to use this event to hook that Client Message and echo it to the open channels and queries.

This would be for 'real' client messages, so something showing up because of reloading a logfile shouldn't count. It also is for client messages, and not for the expected output for commands. So all lines of /filter output should not trigger it, but the error message for /filter -sw @mirc * should.

Since this is a grab-bag event, it would be up to the script to have an appropriate text match for the thing they're looking for, but I can't think of any cases where 2 unrelated things would return the same text string.
0 30 Read More
Feature Suggestions Jump to new posts
Disco/Reco/DayChange for Query Window maroon 26/01/23 09:22 PM
In a #channel window, when you have the 'keep open' setting enabled, you get timestamped "* Disconnected" and "* Rejoined" messages that let you see which window(s) of time could potentially have messages you missed. But this would also be useful for query window too, where currently you can't look at the query window to see if you had disconnected after it opened, without scripting it.

Similarly, for both Query and #channel windows, it would be useful for the "Session Time:" line sent to the logfile is also sent to the #channel Query windows too. As things are now, in low volume channels it can be hard to figure out which day a message was made in without including the day as part of the timestamp, or by slowly paging through the history to see how many times the clock circled. And when you have a Query window opened 3 days ago, it's hard to tell whether a message was made today or 2 days ago, without opening the logfile to look for the midnight message.

I'm ambiguous whether it's needed to include a 'noon message' for those whose timestamps use 'hh' instead of 'HH', or just go ahead and have a twice daily 'session time' message for everyone.
0 29 Read More
Feature Suggestions Jump to new posts
Serverlist mods maroon 26/01/23 09:21 PM
1. For the options hiding behind the hamburger icon, underline the key-letters to indicate the presence of the undocumented hotkeys for Add Edit.

2. Add another item behind the hamburger icon to 'clone' the visible serverlist entry. This makes it easier to add multiple server addresses for the same network GROUP without needing to manually fill in each blank, or using notepad to add the new item.

For example, I was given an o-line at a network that was valid only at 1 of the servers, so if I connected using the round-robin address, it was a dice-roll whether I would be oper. But if that 1 server was down, then I couldn't connect at all.

So, the solution was to add the individual server to the GROUP while retaining the round-robin item as a fallback for when the 1 server fails.

However, in order to add the new server address to the GROUP, I had to ADD the new item, then input every field, including editing the port from the 6667 default, as well inputting the non-global client certificate, and the password or other login-method settings. I ended up editing servers.ini in notepad in order to have a modified clone of the round-robin entry without risk of making a typo.

To avoid confusion between editing a clone vs editing the only copy, there probably should not be a hotkey for this choice, and the titlebar should say something like 'clone server' instead of 'add server'. And the new item wouldn't actually be added to the serverlist until <enter>.
0 29 Read More
Bug Reports Jump to new posts
Re: /debug with local alias Khaled 26/01/23 11:23 AM
Thanks, the /debug command has been extended to work with local aliases. As far as I can tell, there shouldn't be any backward compatibility issues with this. This change will be in the next version.
1 98 Read More
Scripts & Popups Jump to new posts
Re: resize windows maroon 25/01/23 06:14 PM
This creates a custom window
//window @resize 100 200 300 400

This resizes it to be taller, 500 instead of 400

//window @resize 100 200 300 500

This instead resizes it to be slightly wider, width 350 instead of 300

//window @resize 100 200 300 400 | //window @resize 100 200 350 400

If you are wanting the script to change the size of the main mirc window itself, that is not possible. The
/help /showmirc
command can do some things to the main window, but not changing its size
11 548 Read More
mIRC Help Jump to new posts
Re: Window Desktop automatically stayed checked mark maroon 24/01/23 02:27 PM
Not clear whether you're saying this is happening to all channels or that you just join the 1 channel.

Options/display/options - Windows
... has a list of things that open as a desktop window, and a checkmark in there would cause all channels to open on the desktop

Also, if you use /help /join
... and choose the 2nd item, it shows the syntax for /join has an optional -d switch for making that be a desktop window
/join -d #OpenedOnDesktop
1 135 Read More
Bug Reports Jump to new posts
Re: $modinv GPF in .doubles mode Khaled 24/01/23 02:17 PM
Right. It looks like the Visual C++ compiler is wrongly optimizing away a variable check in the release version. So far, I have not been able to get it to work correctly when optimization is enabled. I will either have to disable optimization for this function or tweak the code to see if I can find a solution. I will also need to re-evaluate the fix in $modinv, since it uses the exact same check there. This change should be in the next beta.
5 426 Read More
Bug Reports Jump to new posts
Re: $urlget fails on win7 and below Wims 23/01/23 06:42 PM
There is little an application can do to get around this with older versions of Windows, other than implementing features without using Windows APIs.
Well it's not great to have $urlget behaving differently than normal socket when it comes to things we, as scripters, have no control over, here SSL and ciphers.
Is it not possible to force a different cipher list with the wininet api?

When it comes to http and non persistent connection (btw Connection: keep-alive is sent as header which does not make sense), $urlget is now a must, but this issue changes the game.

It's possible to script $urlget with normal socket but that defeats the purpose of it and it's much slower, is there no plan to get rid of the windows api?
7 563 Read More
Bug Reports Jump to new posts
mIRC beta Khaled 23/01/23 07:21 AM
The latest beta can be downloaded here and includes the following changes:

Beta v7.72.171 changes:
1.Item 5, https://forums.mirc.com/ubbthreads.php/topics/271220
2.Item 6, updated.

Beta v7.72.135 changes:
1.Item 1, https://forums.mirc.com/ubbthreads.php/topics/271098
2.Item 2, https://forums.mirc.com/ubbthreads.php/topics/271105
3.Item 3, https://forums.mirc.com/ubbthreads.php/topics/271117
4.Item 4, https://forums.mirc.com/ubbthreads.php/topics/271154

1.Fixed $bvar() gpf bug with negative ranges.
2.Changed bitwise identifiers in bigfloat mode so that, by default,
they work in the same way as in non-bigfloat mode, for backward
compatibility. To make them handle larger values, you can now
specify a bit size parameter.
3.Fixed channels list not showing non-text prefixed channel names.
4.Changed how the keep channels open settings in IRC options work
so that they apply in different numeric events as well.
5.Fixed $modinv() /$powmod() gpf bug relating to large values.
6.Updated CA root certificates cacert.pem file.
1 358,336 Read More
Feature Suggestions Jump to new posts
Re: /window -F to move to front of switchbar Epic 21/01/23 10:47 AM
The command for the switch with this latin letter "/window -F @name" for fullscreen has already been requested in another post: #Post270612.
This looks more logical and intuitive, and it seems that this command has not yet been implemented.

Therefore, I would suggest another variant - is to add the number "2" to an existing switch: "/window -z2 @name".

Example command syntax:

    "/window -z[N] <@custom/#channel/private>"

Example for switch -z[N] where:

    "/window -z0 #channel" - restore original position window.
    "/window -z1 #channel" - place window at end of switchbar.
    "/window -z2 #channel" - place window at start of switchbar.

Then this could be used as a sort of custom sorting of open windows.

Note: This description is not on the official help documentation page: https://www.mirc.com/help/html/index.html?custom_windows.html.
1 307 Read More
Bug Reports Jump to new posts
Re: .bf mode scifi notation maroon 19/01/23 11:13 PM
Just to be clear, I was referring to 'd' support for the existing identifiers when they handle the notation. For reasons I describe in my other post, I don't think it's a good idea for the new integer-only identifiers to try to support the approximation of this notation, since the approximations of 1.23e2 style of fractions can contain whatever rounding error comes from the source, which wouldn't be from mIRC because I'm not aware of mIRC itself creating this notation
2 302 Read More
Feature Suggestions Jump to new posts
math identifier handling missing/text parameters maroon 19/01/23 11:06 PM

Originally Posted by Khaled
If you come across an identifier that you think should be using a different default value, let me know. However, if the behavior has been in place for a long time, it normally cannot be changed since that would affect backward compatibility.

So I guess that, if something has been around the block long enough, the default can't change, and the only solutions are to leave it as-is, or make the alternate behavior available only from a switch, or change only if the behavior is considered a bug.

  • $totp TIMESTEP

    One example is something I mentioned previously, where the TIMESTEP parm in $totp does the same thing that $xor and many other identifiers do, and evaluate text the same as if zero were used, so $and(123,text) is same as $and(123,0).

    Much of the time, text in numeric parameters results either from a typo when putting the %variable name in, or by mis-counting the parameters and putting a valid parameter in the wrong spot, such as $totp(key,sha1)

    However the TIMESTEP parameter seems to be a case that, even if it's valid to see text as the number zero, that is still invalid input.

    The TIMESTEP is a floor divisor for the TIME value, so zero and negatives are invalid floor divisors for a result that is supposed to be an integer [0,2^64-1], so that should be an invalid parameter rather than silently changing the input into the default of 30.

    So this example shows that TEXT and $null are returning the same result as if 30 were used.

    //var %timestepvar 60 , %time 123456789 | echo -a $totp(key,%time,sha1,6,%timestepvar) vs $totp(key,%time,sha1,6,timestepvar) same as $totp(key,%time,sha1,6,30) same as $totp(key,%time,sha1,6,0) same as $totp(key,%time,sha1,6,-1) same as $totp(key,%time,sha1,6,$null)

    Another aspect of the default behavior of TIMESTEP seems to be the exception to the general behavior that if a parameter is present, where normally that parm being $null is considered an error or causes the return value to be $null. i.e. there are exceptions like $tip where a $null parameter can be followed by a not-null parameter, but generally when an optional parameter is present but is blank, the identifier returns blank or an error, like with $sha1(abc,$null)

    But if I want to change the timestep from 30 to 60 without changing any of the other defaults, it doesn't let me do $totp(key,,,,60), but makes me list the 3 defaults in order to change the timestep. But if I do $totp(key,$ctime,sha1,6,) it lets me do that and treats $null as the default 30.

    Summary: it seems that a timestep 'value' that evaluates to zero should either return $null or generate an 'invalid parameter' error, because a (TIME // zero) is not a legit value. i.e. the default is correct, but should be used only when the parameter is not used, not when the parameter is not within the valid range of positives.
  • Interpreting text as zero for the newer math identifiers

    Most of the time, having text in a parameter is a typo from forgetting the % of a variable name or some other kind of error, and returning a value as if zero were used is not going to be useful behavior, and can make it hard to track down an error.

    I kept getting results that shouldn't be possible, until finally figuring out that a typo was causing $gcd to see one of the 3 parameters as text, making it return the wrong answer as if the parameter were zero.

    //var %a 25 , %b 35 , %c 29 | echo -a $gcd(%a,%b,%c) and $lcm(%a,%b,%c) vs $gcd(%a,%b,c) and $lcm(%a,%b,c)

    result: 1 and 1575 vs 5 and 0

    Summary: it seems more helpful for the newbies if it's an error/blank return if a parameter is not numeric:


    depends if you think the other long-in-the-tooth math identifiers should also interpret text as zero


    Also, since these new identifiers are valid only for integers, the current behavior of stripping fractions to make floats be integer is fine, but should not be handling scifi notation by translating it into integer, because this notation by definition has a limited precision, and 1e99 in the input is not necessarily going to be exactly 1 followed by 99 zeroes, and same goes for 1.123457e99.

    //echo -a %.bf $powmod(3,1e3,65539) should be error not same as $powmod(3,1000,65539)

    If there is the intent to have the input interpreted as scifi when it's present, then those edge cases can simply use the behavior of $int to handle situations where the input should interpret the notation, $powmod(3,$int(1e99),65539)


Missing parameters related to encryption keys:

  • $hotp and $totp

    /help $totp says 'The key is required'
    /help $hotp says 'The key is required'

    But they have never required that.

    //echo -a $totp() same as $totp($null) same as $totp($null,$ctime)

    $hotp allows a missing key, but only when the COUNT parameter is present since it treats that as required, but doesn't require the key be present:

    //echo -a $hotp($null,123) same as $hotp(,123)


    The purpose of $hotp and $totp is to prove that you know the key without actually sending the key itself. By having the output be a 6-digit number, it boils the key strength down to $log2(10^6) = 20 bits, and there's no usefulness or use-case for allowing the 'required' key be null length
  • $hmac This is restatement of the feature suggested I made for $hmac hex/binary keys

    HMAC is the only case I can think of where it's legit to have a crypto key be null length, due to people using HMAC as a keyless hash substitute for $sha256 or $sha512 that can be vulnerable to the length-extension attack in certain situations. Plus, HMAC is defined so that short keys are padded to full length, so a null key just gets more padding than other not-so-short keys do.

    However, when HMAC does use a key, it's almost always shown as hex, and the RFC test vectors can't be matched without being able to have the key be non-UTF8. The existing handling of the key defaulting as text can't be changed without a switch that makes it be seen as hex.
  • Restatement of suggestion Blowfish 'k' switch for $encode/$decode hex keys

    Likewise for Blowfish, the official test vectors all use hex keys and IV's, with virtually all of them being binary strings other than UTF8 text. The existing default has been there too long to enable hex keys without an optional switch for the Parm3/Parm4 to be seen as hex

    The default behavior of allowing the Parm3 key to be $null is also not desirable for encryption ciphers. Even though $encode(message,mc,$null) changes the output each time due to mixing a random salt with no-key-used, it ends up being no more secure than if using ROT13.

    When the Parm3 key is $null, $encode is treating it as if the input were a hex key of all 0x00 null bytes, which isn't the same thing. The design for Blowfish states that the key input is repeated until it's 72 bytes. There's 2 ways of doing this.
    for (key72=$null ; length(key72) < 72 ;) { key72 = $left( key72 $+ input,72) }
    for (i = 0;i < 72;i++) { key72[i] = input[ i % length(input)] }
    However a null key is invalid in both scenarios, either an infinite loop trying to repeat length 0 until it reaches length 72, or a divide by zero error when trying to use the Nth byte of a zero length key.

    So, currently the user cannot depend on an error message to prevent the encryption being done with a missing key, and needs to explicitly add an extra check against the %key variable being blank, or halt the script like $$+(%key)
0 29 Read More
Bug Reports Jump to new posts
Re: Login Method failure delays Perform from happening Khaled 19/01/23 06:03 PM
Thanks for your bug report. I have not been able to reproduce this issue here. Can you provide a step by step method that reproduces this that I can test out in a clean install of mIRC?

As Wims mentioned, the way /nickserv was designed means that it reports success or failure using language, as opposed to an identifiable numeric or named event. This means that /nickserv on different IRC networks can use a different combinations of words, and even a different language, to report success or failure. So there is no reliable/consistent way for an IRC client to test for this.

In your case, you have said that you are seeing numeric 402. Is this specifically related to nickserv? The only explanation I can get for this numeric is "No such server" and "Used to indicate the server name given currently doesn't exist". Can you post the raw numeric 402 you are seeing?
2 326 Read More
Feature Suggestions Jump to new posts
Sockmarking via /sockaccept and /sockopen Jigsy 19/01/23 03:14 AM
One thing I'd like to see is a -m flag for both /sockaccept and /sockopen which allows the socket to be marked, rather than having to do /sockmark in post.
0 107 Read More
Developers Jump to new posts
Re: Spotify now-playing for mIRC turbosmurfen 18/01/23 02:16 AM
I want to thanks everyone that have helped me and also have tested Spoton from beta stage and upon latest version of Spoton. I have put my time on other things than learning me C++. And I want to say that I no longer is going to update Spoton. If someone else want to update Spoton or use it's code, feel free to do that.
23 8,391 Read More
Feature Suggestions Jump to new posts
/color expand deVilbaT 13/01/23 03:54 PM
Expand /color command or new alias for changing colors in mIRC Options/Display: Event, Highlight, Message would make it more convenient to create custom Theme. It would also be nice if it would be possible to read these three colors e.g. with $color. I know it is possible manually from mirc.ini but after all that is not the point.

0 97 Read More
Feature Suggestions Jump to new posts
Re: /echo -p to interpret newline, same as editbox -r Epic 13/01/23 02:26 PM
I support this idea.
1 401 Read More
Bug Reports Jump to new posts
Re: math identifiers accept missing parm Khaled 12/01/23 10:18 PM
Yes, I agree there are defaults for many identifiers where the default for a not-used parameter makes since, like $sha1() assuming the string is text when the 2nd parm isn't given. But with a uniform return string across these bitwise identifiers, that's making the default setting different. Like $xor and $or defaulting to zero for the missing parm, and $and defaulting to -1 for it.
If you come across an identifier that you think should be using a different default value, let me know. However, if the behaviour has been in place for a long time, it normally cannot be changed since that would affect backward compatibility.

The 1 thing that can be used for this is - there are some scripts that need to strip text from the end of a number, and they use $abs or $int or $calc to do it. However $abs and $int evaluate $int(1d2stuff) as 100 in scifi notations, while $calc does not. However $calc doesn't strip off the fraction. However $xor(1d2stuff) $xor(1.2345stuff) is stripping off the fraction as well as not interpreting text as scifi notation.
This sounds like a different issue to your original post. The way numbers are parsed in commands, identifiers, and other features varies depending on the context and on the API or CRT function call being used. Some of these, for historical reasons, do parse scientific notation, others do not. Some of them will allow floating point values, others will not. And so on. If you think an identifier or feature should behave differently, suggest it. That said, unless there is a really good reason, I will rarely change the way a scripting feature has behaved for decades, as that would break backward compatibility.
3 419 Read More
Page 1 of 2 1 2