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: Need help Darkmnm 4 hours ago
Thank you Wims. I greatly appreciate the changed code.
6 51 Read More
Scripts & Popups Jump to new posts
Re: Need help with viewer list random user (Twitch) Blas Yesterday at 08:23 PM
I wrote the $randuser script. It's designed to select a random active user in chat, as I prefer to not have lurkers being called out in chat randomly as that is a huge no-no on Twitch. It also relies on other variables that are created from other scripts that I designed (%streamer, %mychan, etc). It looks like you tried to dissect the randuser script and to maroon's point, you made several errors trying to do so. If you don't care if the user has been active or not, than JohnEricNO's one line suggestion sounds like a perfect solution for your needs. Otherwise, it's probably going to take a bit more effort and work on your part to only have your script select active users. smile

I did take some time and had a look back at the last edit of the randuser script, and it shouldn't be too difficult to have your bot only select active users. The default is 900 seconds (15 minutes), which means that a user had to have said something or done an action in the last 15 minutes to be eligible to be chosen randomly. Just /set %activetime to whatever you want the time to be (in seconds), and /set %mychan to your channel name (or just manually edit your channel name in). You can then use something like:

ON *:TEXT:!slap:#troyl: MSG $chan $nick slaps $randuser $+ .

Added lines in the original code to make the randuser script (hopefully) work now without anything else:

ON *:LOAD: {
  IF (!%activetime) SET %activetime 900
  IF (!$hget(activeusers)) HMAKE activeusers
  IF (!%commonbots) SET %commonbots moobot nightbot revlobot vivbot xanbot wizebot streamelements

ON *:CONNECT: IF (($server == tmi.twitch.tv) && (!$hget(activeusers))) HMAKE activeusers

alias randuser {
  VAR %x = 1
  WHILE ($hget(activeusers, %x).item != $null) {
    VAR %nick $v1
    IF (!$1) { IF ((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) VAR %activelist %activelist %nick }
    ELSEIF ($1 == other) { IF (((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) && (%nick != $nick)) VAR %activelist %activelist %nick }
    ELSEIF ($1 == notme) { IF (((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) && (%nick != %streamer)) VAR %activelist %activelist %nick }
    ELSEIF ($1 == othernotme) { IF (((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) && (%nick != %streamer) && (%nick != $nick)) VAR %activelist %activelist %nick }
    ELSEIF ($1 == list) { IF ((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) VAR %activelist %activelist %nick }
    INC %x
  IF ($1 == list) RETURN %activelist
  ELSE {
    VAR %randuser $gettok(%activelist, $rand(1, $numtok(%activelist, 32)), 32)
    IF (%randuser != $null) RETURN %randuser
    ELSE RETURN $nick

ON *:TEXT:*:%mychan:IF (($nick != twitchnotify) && ($nick != $me) && (!$istok(%commonbots,$nick,32))) activeusers
ON *:ACTION:*:%mychan:IF (($nick != twitchnotify) && ($nick != $me) && (!$istok(%commonbots,$nick,32))) activeusers

alias activeusers HADD -mz activeusers $nick %activetime
3 69 Read More
Developers Jump to new posts
Re: medit.dll 0.2.1 in 2019? Deep3D Yesterday at 10:30 AM
1 86 Read More
mIRC Help Jump to new posts
Multiple instances of mIrc goblin58 Yesterday at 08:03 AM
I’ve read that multiple instances of mirc is easy enough to do with the -i command line option. I’d like two run to instances but share the one scripts folder. Would this be an issue? Some of the scripts need to be common between the two instances and I would prefer to only maintain one copy.

Also, is there some documentation on mirc.ini?
0 19 Read More
Scripts & Popups Jump to new posts
Re: Fix needed for raw output goblin58 Yesterday at 07:56 AM
You can specify the maximum count in the whowas command, eg. /whowas goblin58 10
1 38 Read More
mIRC Help Jump to new posts
Re: How to kill or recover a "lost" session ashburry 14/09/19 10:47 AM
Chances are, if you just wait a while the connection will be dropped.

What is the /whois information of yourself and the zombie? Are they the same? Maybe just wait a while and it will go off line. Also you could try closing your mirc and reopening it.

Another possibility is that maybe someone noticed you changed your nick and quickly moved in and registered the nick. You could try multiple ircopers and csops to explain that it was your nick first.
1 29 Read More
Bug Reports Jump to new posts
Re: $url problems in 7.57 Khaled 13/09/19 06:15 PM
It might be a good idea to accept that $url was based on not so reliable method, to keep it working more or less, and to extend it to support a parameter, a classname or the name of the executable, if khaled can work from that, without looking at millions of classes, that would be reliable and would allow support for any browser, which the current method doesn't provide.

Unfortunately, the class/executable name is the least of our worries.

For example, the issue reported in this thread is due to Chrome changing its accessibility format, not the class/executable name.

Every browser uses a different accessibility format.

The only possibly reliable method would be for $url to search through every accessibility item for a URL-like match, instead of trying to perform some intelligent filtering like it does now. But this would be even slower than it is now. And it would get slower the more websites you have open.

I have also just found out that when Microsoft Edge is minimized, it no longer provides the URL via an accessibility search. Other browsers continue to provide the URL when minimized. So $url will always fail if Edge is being used and is minimized.

On a positive note, I found an API that allows mIRC to detect if Microsoft Edge is running as a background application, so that $url can skip looking through it.
11 256 Read More
Bug Reports Jump to new posts
custom windows ashburry 13/09/19 11:01 AM
Custom windows opened on desktop and hidden cannot be restored.

/window -d @win
/window -h @win
/window -r @win

Window will not restore back in to view on mIRC 7.55
0 24 Read More
Bug Reports Jump to new posts
Re: $emailaddr Tiago 13/09/19 12:07 AM
Originally Posted by Khaled
Do you have the "Use ID from email address" enabled in the Identd dialog? If so, identd is sending your userid as "." to the server when replying to its identd request. That is likely what the server is rejecting.

Yes. I had this option active. I already disabled it and now it works even with period in the email field. Thank you!
6 52 Read More
Bug Reports Jump to new posts
Re: Bug in $+() or expected behavior? Protopia 12/09/19 01:25 PM
Alternatively use $chr(40) for "(" and $chr(41) for ")" i.e.
//var %foo = bar | echo -a $+(test,123,$chr(40),%foo,$chr(41),xyzzy,$chr(40),plugh,$chr(41))
> test123(bar)xyzzy(plugh)

Or to make it even more readable use an alias identifier $lbr for $chr(40) and $rbr for $chr(41).
2 50 Read More
Bug Reports Jump to new posts
Re: mIRC beta Khaled 11/09/19 11:13 AM
The latest beta is mIRC v7.57.1701 and can be downloaded here. It includes the following changes:

Beta v7.57.1701 changes:
1.Item 18, fixed.
2.Item 20, fixed.
3.Item 21, fixed. Note that this change may mean that $url no longer
works with older browsers.
4.Item 22, https://forums.mirc.com/ubbthreads.php/topics/266007
5.Item 23, https://forums.mirc.com/ubbthreads.php/topics/266011
This means that features that previously required &binvar names
of two letters or more in length now allow just &.
6.Item 16 and 19. Re-ran CppCheck. The main issue with static code
analyzers is the large number of false positives. Each warning needed
to be checked to determine whether there really was an issue. In most
cases, there was not. Issues were found relating to portability,
optimizations, dereferences, pointer arithmetic, sprintf() parameters,
32bit/64bit variables, and so on. Changes were made to 140+ files.

Also installed Visual Studio 2019. For now, it is only being used for
testing purposes, not for compiling the beta or release version. Required
a number of code changes to make mIRC compile.

Beta v7.57.965 changes:
1.Item 11, another partial rewrite of the code used by /run, /exit -nr,
/url, etc. Note that /run may or may not report an error if a file
cannot be run, depending on the version of Windows. Also, /url now
uses a simpler method of opening the default browser.
2.Item 17, https://forums.mirc.com/ubbthreads.php/topics/265915

Beta v7.57.669 changes:
1.Item 11, https://forums.mirc.com/ubbthreads.php/topics/265834
Partial rewrite of code that affects /run, /url, /exit -nr, opening
DCC Files received folder, etc. The /exit -nr command needs to call
ShellExecute() synchronously, the opposite of other commands which
were fixed for https://forums.mirc.com/ubbthreads.php/topics/265736
2.Item 12, added.
3.Item 13, fixed.
4.Item 14, fixed.
5.Item 15, fixed.
6.Item 16, performed CppCheck on the source code.

Several issues were fixed, though most were mitigated in other ways so
were unlikely to cause issues, and others required specific, unlikely
contexts to be triggered.

A large number of 32/64bit portability issues identified which will
need to be changed over time for 64bit version.

Beta v7.57.528 changes:
1.Item 1, https://forums.mirc.com/ubbthreads.php/topics/265799
2.Item 2, changed.
3.Item 3, https://forums.mirc.com/ubbthreads.php/topics/265806
4.Item 4, https://forums.mirc.com/ubbthreads.php/topics/265805
5.Item 5, https://forums.mirc.com/ubbthreads.php/topics/263520
6.Item 6, https://forums.mirc.com/ubbthreads.php/topics/265812
7.Item 7, optimized.
8.Item 8, fixed.
9.Item 9, added. A large amount of DPI-related code has been added,
including detecting DPIs on different monitors for different windows
and on different versions of Windows, detecting DPI changes for top
level windows, scaling/resetting fonts to match DPI changes, changes
to dialog tabs to handle different size fonts, and so on.

However, most of the code is currently disabled as more work is
needed. mIRC uses a number of DPI APIs, some of which are only
available in the latest update to Windows 10.

10.Item 10, fixed. If files are present, such as with a new install,
they are used. If no files are present, the internal defaults point
to $mircdir. This is partly necessary for backwards compatibility
but the method has been improved.

1.Fixed $+ not correctly reporting string too long errors.
2.Changed installer setting to make it DPI aware.
3.Changed $findfile() to preserve multiple spaces inside a wildcard
4.Fixed /reload interacting incorrectly with Script Editor when a new,
unedited file is created.
5.Fixed $parms returning incorrect values in some contexts.
6.Fixed DCC trust user list bug that prevented autoget from working
correctly for trusted users.
7.Optimized SendMessage() processing to use less memory.
8.Fixed SendMessage() gpf bug where recursive calls result in a stack
9.Updated several features to be DPI aware.
10.Fixed incorrect default location for alias, popup, and remote
scripts when no files are present.
11.Fixed /exit -nr not restarting mIRC.
12.Added /run -a switch to request running as administrator.
13.Fixed script editor bug that was wrapping excessively long lines,
resulting in script errors, instead of truncating them.
14.Fixed SendMesage() handling of negative indexes.
15.Fixed richedit control handling bug that may have caused some
editbox-related code to behave incorrectly if the richedit control
failed to load.
16.Fixed a number of issues identfied by CppCheck relating to range
checking, memory initializations, optimizations, portability, and
pointer dereferences.
17.Fixed script #group parsing bug for invalid group definitions.
18.Fixed $decode() gpf buf.
19.Updated more routines to use 32/64-bit compatible types as step in
preparing for a 64bit version of mIRC.
20.Fixed text file writing bug that could have caused the UTF-8 BOM to
be set incorrectly.
21.Fixed $url not working with newer versions of Chrome.
22.Changed /msg to no longer check for channel/nick prefixes due to some
networks using identical prefixes for both.
23.Changed all &binvar supporting features to allow single character &
as a binvar name for consistency.
24.Fixed $findfile() not freeing handles in some contexts. This also
affected other features that retrieve file lists.
25.Fixed /ignore/protect/aop/avoice gpf bugs.
26.Fixed 64bit time calculations in several features.
27.Fixed memory HDC allocation error check in line marker.
28.Fixed $did().csel potential gpf bug when freeing memory.
29.Changed compiler settings to disable string pooling and enable whole
program optimization.
1 169,348 Read More
Bug Reports Jump to new posts
Re: /msg - bug Raccoon 09/09/19 10:31 PM
Originally Posted by rockcavera
I tested the previous versions, the error starts in version 7.53. That is, version 7.52 was the last one that the command worked on.

rockavera: Indeed. That's the version where all the messaging commands had a major overhaul and unification internally.

29/11/2018 - mIRC v7.53
20.Added /privmsg command.
21.Added support for CPRIVMSG and CNOTICE. If listed in numeric 005,
   PRIVMSG and NOTICE will be automatically upgraded for most
   outgoing messages if you are an op/voice on a channel and message
   a user on the same channel.
22.Added support for numeric 005 STATUSMSG=@+ and WALLVOICES and added
  commands /vmsg, /vnotice, and /wallvoices. If server does not support
  STATUSMSG, WALLCHOPS, or WALLVOICES, mIRC uses own method to send to
  multiple targets.
23.Changed line splitting method for long messages when:
   1) Sending message through editbox of a channel/query window.
   2) Using commands /ame /amsg /describe /me /msg /omsg /privmsg /qme
   /qmsg /query /sound /vmsg /wallchops.

   Note: when line splitting, the /sound command switches to an ACTION
   message for the second line onwards.

   Note: line splitting is not performed on NOTICEs, so is not applied
   to /notice /onotice /vnotice /wallvoices.

24.Changed multiple target handling in PRIVMSG and NOTICE so that if
   TARGMAX or MAXTARGETS are not specified in numeric 005, mIRC assumes
   the maximum is one target per message.
7 147 Read More
Scripts & Popups Jump to new posts
List of mIRC Commands; If Aliased used Internally Raccoon 09/09/19 06:49 PM
Dear Khaled,

I am looking for a list of mIRC Commands that, if Aliased, mIRC will internally call the custom Alias as it goes about its business.


If a user scripts an alias for the command /join, which is an mIRC Command (not just an IRC Command), then mIRC will trigger that Alias whenever it wants to perform [any? most?] JOIN routines.
IE, whenever mIRC joins a channel due to Favorites or /server -j, it will call out to our new /join alias.

This effectively creates a "hook" in which the user can augment some of mIRC's internal behaviors.

Can we get an exhaustive list of these commands?

0 68 Read More