mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS 5 hours ago
Thank you so much maroon for your time and action. it helps to understand and clear my views. I have resolve the problem which triggering the ban. I had same variable for On nick and on join which causing the ban most of the time smirk. I sent you an private msg long back to get idea of you got some time you can give me a little suggestion

14 334 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick maroon Yesterday at 10:08 PM
Again, which gets to my specific question - I asked you to give me 1 nick that it matches when it shouldn't, but instead you gave me 6 nicks which do match the regex pattern, and which should match.

When I test with the nick foobar, it doesn't match.

So again, give me 1 nick that should not match, but which does match.

//var %wnick = foobar , %p1 = /[A-Za-z0-9].+(_){4,10}.+[A-Za-z0-9]/ , %p2 = /^[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_).+/ , %p3 = /[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z].+/ | if $regex(%wnick,%p1) || $regex(%wnick,%p2) || $regex(%wnick,%p3) { echo -a .gline $nick +5d reason } | else echo -a did not match
14 334 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS Yesterday at 10:04 PM
Dear manroon,

Problem is it also ban ordinary nick if I have all 3 regex pattern indicating
if $regex(%wnick,%p1) || $regex(%wnick,%p2) || $regex(%wnick,%p3) { .gline $nick +5d reason }

however if i just reduce the %p3 and have the script like
if $regex(%wnick,%p1) || $regex(%wnick,%p2) { .gline $nick +5d reason }
it works fine match with regex %p1 & %p2 patterns. What's wrong with my regex pattern %p3 whenever I add it my scripts start banning any nicks that join.
14 334 Read More
Scripts & Popups Jump to new posts
Re: The bot does not kick change nick in idle. Help me SLiprockS Yesterday at 09:56 PM
Hi Kendy,

I tried to code it with my little knowledge. Hope this is surve the purpose. Please test it and let me know.

#idlekicker on
on *@!:JOIN:#help: if !$timer($nick) { $+(.timer,$nick) 1 120 KickIdler $chan $nick }
on *:TEXT:*:#help: $+(.timer,$nick) 1 120 KickIdler $chan $nick
on 1:NICK: {
if ($nick isop $chan) { return }
var %nick = $newnick, %cn = $comchan(%nick,0)
while (%cn) {
if (*#help* iswm $comchan(%nick,%cn)) { $+(.timer,%nick) 1 120 KickIdler #help %nick }
dec %cn
alias KickIdler { if ($me isop $1) && ($2 isreg $1) { ban -ku120 $1-2 2 Don't hang your nick here. Come back after 2 minutes if you really need help! Thank you }

#idlekicker end

1 77 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick maroon Yesterday at 09:38 PM
I can confirm that each of these 6 examples does match at least 1 of your 3 regex patterns.
If there are any of these 6 examples which should not match at least 1 of these 3 regex patterns, please indicate which nick, and describe why the nick should not match any of the 3 patterns.
14 334 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS Yesterday at 08:46 PM


on @*:join:#channel: {
if ($nick isop $chan) || ($nick isvoice $chan) { return }
var %wnick = $nick , %p1 = /[A-Za-z0-9].+(_){4,10}.+[A-Za-z0-9]/ , %p2 = /^[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_).+/ , %p3 = /[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z].+/
if $regex(%wnick,%p1) || $regex(%wnick,%p2) || $regex(%wnick,%p3) { .gline $nick +5d reason }
14 334 Read More
Feature Suggestions Jump to new posts
Re: Temporarily alter a user's channel mode FroggieDaFrog Yesterday at 06:49 PM
I messed up the example slightly, and since I can't edit the OP, here is a fixed simplified version

;; received event:
;;   @user-channel-flags=ov :User!ident@addr PRIVMSG #chan :!command

on ^*:TEXT:*:#chan:{
  if (o isincs $msgtags(user-channel-flags).key) {
    spoofmode +o

on *:TEXT:!command:#chan:{
  if ($nick isop #chan) {
    ;; this would be valid
1 26 Read More
Scripts & Popups Jump to new posts
Re: Detect new file or folder maroon Yesterday at 06:27 PM
You've got 2 echoes going on, you're sending the count of matching folders to @new but the echo of the individual matches are going to the status window. If you want both to go to @new, then you need to send both echoes there. If you only want the matches going there, then do something like

//noop $finddir(%fdpath,*,0,1,echo @NEW New Directory(s) Detected : $1-)

Note that the depth of 0 you used behaves like depth of 1, so you're not seeing subdirs unless you either change depth to something big like 99 or just drop that 4th parm. Also note that if you're trying to copy/move folders or filenames someone creates having doublespaces would require special handling, such as addressing them using $shortfn.
2 34 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick maroon Yesterday at 05:56 PM
What's an example of something I can set %wnick to, which causes the ban when it should not do so?
14 334 Read More
Scripts & Popups Jump to new posts
Re: Detect new file or folder SLiprockS Yesterday at 05:07 PM
Hi, you can try this out which may serve your purpose

alias FDD {
var %FDpath C:\Users\colt\Dropbox
/window @NEW | echo @NEW New Directory(s) Detected : $finddir(%FDpath,*.*,0,)
/window @NEW | echo @NEW New File(s) Detected : $findfile(%FDpath,*,0,1)

2 34 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS Yesterday at 04:44 PM
Hi Maroon.

Sorry that you didn't got my point what actually i'm looking for. I don't want 3 literal strings only. What I wanted to do is matching by regex as you can see in my code i have added P1 P2 P3 each of the regex is for different type of nick patterns. In the code it was working for variable p1 & p2 (example is below). Whenever i'm adding p3 it starting to trigger for all the nicks. I want it like i will add more variables like p4, p5.


if $regex(%wnick,%p1) || $regex(%wnick,%p2) { .gline $nick +5d reason } working fine
if $regex(%wnick,%p1) || $regex(%wnick,%p2) || $regex(%wnick,%p3) { .gline $nick +5d reason } starting to trigger for all why is that

Appreciate if you can help me to let know in which way I can add like more regex pattern in my code.

14 334 Read More
Scripts & Popups Jump to new posts
Detect new file or folder colt45 Yesterday at 03:19 PM
Hi, I'm hoping to write something that alert me for any new files/folders uploaded by someone onto my dropbox.

I plan to run this timer every 5 mins on mIRC startup

alias FDD {
var %FDpath C:\Users\colt\Dropbox
  echo @NEW New Directory(s) Detected : $finddir(%FDpath,*.*,0,0,echo $1-)
  echo @NEW New File(s) Detected : $findfile(%FDpath,*.*,0,0,echo $1-)
The result isn't how I was hoping for, all I see the output was
but what I see in @NEW
New Directory(s) Detected : 1
New File(s) Detected : 3
How can I get this to display them into @NEW window? So that it would show like this ...
New Directory Detected : C:\Users\colt\Dropbox\Test
New File(s) Detected : C:\Users\colt\Dropbox\test1.txt
New File(s) Detected : C:\Users\colt\Dropbox\test2.txt
New File(s) Detected : C:\Users\colt\Dropbox\test3.txt

Hope someone can help me,

2 34 Read More
Feature Suggestions Jump to new posts
Temporarily alter a user's channel mode FroggieDaFrog 03/07/20 03:49 PM
I'm on a server that does not send user-state events (JOIN, PART, MODE, NAMES list) as a result of the host catering to a web/browser interface. Instead, they send user-state related information as an ircv3 message-tag with each relevant event. As such scripters are not able to supply backwards compatibility for older scripts without manually altering those scripts.

So to alleviate that, I'd like to see a way to altar/spoof a user's channel modes for the duration that the event is being processed:

/spoofmode <+|-modes>

Event must originate from a user
Event must target a channel
Event must be prefixed with ^

;; received event:
;;   @user-channel-flags=ov :User!ident@addr PRIVMSG #chan :I'm an op and voiced

on ^*:TEXT:*:#chan:{
  ;; could also be done together
  ;; /spoofmode $chan $nick +ov

  if (o isincs $msgtags(user-channel-flags).key) {
    spoofmode +o
  if (v isincs $msgtags(user-channel-flags).key) {
    spoofmode +v
  ;; user is now considered as being op'ed and voiced for scripting purposes

  ;; remove voice for demo purposes
  spoofmode -v


on *:TEXT:!command:#chan:{
  if ($nick isop #chan) {
    ;; this would be valid

As an aside, modes can be spoofed with parseline but the modes are forgotten as soon as the line is processed as there is no persistent nicklist for the server.
1 26 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick maroon 03/07/20 09:29 AM
I still have no idea what you want. If you want to match 3 literal strings, then don't need to use regex, just use a strings compare. If you are wanting to match a variety of similar nicks, then what's the general rule that would let 1 regex match many different nicks.
14 334 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS 03/07/20 07:51 AM
Hi Maroon,

Thank you for the pattern that will also work but i want make it through regex so that i can match with specific nick patterns. Is it possible to match it with regex ?

Thanks in advance.
14 334 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick maroon 02/07/20 09:59 PM
I'm not clear what you mean by 'like' these examples. It sounds like you're not wanting to match specific strings, so can you also include a description of what you're trying to match? My example was matching alphanumeric strings separated by at 4-10 underscores.

If you're wanting to match strings tokenized by _ or | into at least 3 different tokens, you could do something like:

var %a $numtok($nick,$asc(_)) + $numtok($nick,$asc(|))
if (%a >= 3) do stuff
14 334 Read More
Feature Suggestions Jump to new posts
Re: rline and dline for channel/query/status windows FroggieDaFrog 02/07/20 09:22 PM
I'm going to bump this as well.

The reason is that I've encountered 2 IRC servers that use message tags to give a message a unique id, and then later on that id is used to reference the line when a state changes.

Examples of this:
The two servers sends an edit event for when a message gets edited. It would be nice to be able to edit the referenced line instead of displaying a new message showing the edits

One of the servers sends a delete event when an op or user deletes a message. Though clients aren't required to remove the message, it would be nice if scripters could remove those lines as they desire.

;; Received message
@msg-uid=123abcXYZ :User!Ident@Address PRIVMSG #example :txet

;; Message was edited
@target-uid=123abcXYZ :User!Ident@Address PRIVMSG_EDIT :text

;; Message was deleted
@target-uid=123abcXYZ :Op!Ident@Address PRIVMSG_DELETE :reason

2 1,383 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS 02/07/20 06:44 PM
Hi Maroon,

Now i would like to add some more nick pattern however, i'm adding it with variables it start triggering for all. Nick Pattern are like



on @*:join:#channel: {
if ($nick isop $chan) || ($nick isvoice $chan) { return }
var %wnick = $nick , %p1 = /[A-Za-z0-9].+(_){4,10}.+[A-Za-z0-9]/ , %p2 = /^[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_).+/ , %p3 = /[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z].+/
if $regex(%wnick,%p1) || $regex(%wnick,%p2) || $regex(%wnick,%p3) { .gline $nick +5d reason }
14 334 Read More
Bug Reports Jump to new posts
Re: mIRC beta Khaled 02/07/20 03:48 PM
The latest beta is v7.61.1161 and can be downloaded from here. It includes the following changes:

Beta v7.61.1161 changes:
1.Item 30, added.

This feature has been implemented in such a way that it should not
affect scripts or other features. Sounds, including /splay, continue
to play and trigger events but are muted. Tips are processed but hidden.
Flashing taskbar window icons are processed but not flashed. The Tray
icon state is updated but remains static. This feature also prevents
new non-custom windows, such as status/channel/query windows, from
opening on the desktop by minimizing them. While do not disturb is
enabled, the /vol -u switch is pre-empted. If the mute state is
disabled externally, it is re-enabled. The do not disturb option is
persistent and is saved to the ini file.

Other than the above, this feature will not prevent scripts from
running and performing actions.

Note that this feature uses per-application muting for sounds, so it
will only work on Windows Vista onwards.

2.Item 31, added.
3.Item 32, https://forums.mirc.com/ubbthreads.php/topics/267401
As this has the potential to break backwards compatibility, it will
be reverted if it causes any issues.

Beta v7.61.1001 changes:
1.Item 26, fixed.
2.Item 27, fixed.
3.Item 28, added.
4.Item 29, added.

Beta v7.61.961 changes:
1.Item 22, https://forums.mirc.com/ubbthreads.php/topics/266950
2.Item 23, added.
3.Item 24, added.
4.Item 25, optimized.

Beta v7.61.817 changes:
1.Item 15, https://forums.mirc.com/ubbthreads.php/topics/267210
2.Item 17, https://forums.mirc.com/ubbthreads.php/topics/267228
3.Item 18, https://forums.mirc.com/ubbthreads.php/topics/267230
4.Item 19, fixed.
5.Item 20, fixed.
6.Item 21, added. This fix only applies when permonitorv2 is set in
the manifest, which it is not currently. It works by hiding the
caption whenever an MDI window is maximized. Unfortunately, there are
still display glitches which seem to be core Windows 10 MDI bugs.

Beta v7.61.439 changes:
1.Item 13, https://forums.mirc.com/ubbthreads.php/topics/267157
2.Item 15, added. Needs testing to ensure $comval() is working as
before and with new feature.
3.Removed support for "Open in new browser" and "Activate new window"
from Catcher dialog as these methods are no longer recognized by
modern web browsers.
4.Item 16, https://forums.mirc.com/ubbthreads.php/topics/267175

Beta v7.61.367 changes:
1.Item 11, https://forums.mirc.com/ubbthreads.php/topics/266927
2.Item 10, updated.
3.Item 12, added.
4.Item 13, changed.
5.Item 14, updated.
6.Item 3, https://forums.mirc.com/ubbthreads.php/topics/267074
Decreased frequency of polling.

Beta v7.61.159 changes:
1.Item 1, https://forums.mirc.com/ubbthreads.php/topics/245917
Required significant changes to code.
2.Item 2, https://forums.mirc.com/ubbthreads.php/topics/266935
3.Item 3, https://forums.mirc.com/ubbthreads.php/topics/266791
Experimental. Required significant changes to code. Uses undocumented
Windows APIs. Only works on Windows 7 onwards. If any part of the
method fails, defaults to global Control+Break.
4.Item 4, updated.
5.Item 5, updated.
6.Item 6, https://forums.mirc.com/ubbthreads.php/topics/266960
7.Item 7, https://forums.mirc.com/ubbthreads.php/topics/266966
8.Item 8 and 9, https://forums.mirc.com/ubbthreads.php/topics/266720
Required important changes to the regex and these identifiers,
so need testing to ensure changes are working correctly and are
backward compatible.
9.Item 10, updated.

1.Changed how on KEYUP/KEYDOWN are processed. This affects the values
returned in $keyval and $keychar for combined key presses.
2.Reverted change to $cnick() so that it returns default values for
non-existent nicks.
3.Changed how Control+Break key is handled so that it only works when
mIRC is the active application.
4.Updated PCRE regex library to v8.44.
5.Updated LibZip library to v1.6.1.
6.Added $width() and $height() sixth $true/$false parameter to enable
custom window-specific measurement.
7.Added support for irc hotlinks that uses the non-standard plus sign
prefixed port number format, such as +6697.
8.Extended $bfind() to support regex searches using:

$bfind(&binvar, N, M, [name]).regex

Where M is a regular expression when .regex is used. The name
parameter is the $regml() name.

9.Extended $regml()/$regmlex() to save result to a &binvar using:

$regml([name], n, [&binvar])
$regmlex([name], m, n, [&binvar])

When saving to a &binvar, returns length of saved text.

10.Updated OpenSSL library to v1.1.1f.
11.Changed [ssl] certificate warning item name in mirc.ini to ensure
one-time reset to a new default value.
12.Added CAP support for setname. This is automatically enabled if
available and will cause the server to send the setname event to the
client when users change their full name. Events are not shown but
are triggered as RAW events.
13.Changed IRCv3 CAP support of draft/label and draft/labeled-response
to label and labeled-response. ACK replies from the server are not
shown but are triggered as RAW events.
14.Updated colors dialog, control+K dialog, and /color command to
support color indexes 16 to 98.
15.Added $comval() .result property to support &binvar as a fourth
parameter, same as $com(), to store one dimensional array results. If
array is BSTR, it is stored using null bytes as separators.
16.Added on CHAR event that returns translated keyboard presses. Uses
the same format as on KEYDOWN/KEYUP.
17.Fixed tray tip display bug with different DPI settings.
18.Fixed /hmake not allowing maximum prime value for table size during a
hash table rename.
19.Fixed display of channel name in numeric 477 on some networks.
20.Fixed script editor rich editbox bug that may have caused font to be
set incorrectly.
21.Added workaround for maximized MDI window caption bug in Windows 10
on monitors with some DPI/resolution combinations.
22.Fixed custom window treebar folder not staying open in some contexts.
23.Added $min()/$max() identifiers that return minimum/maximum of a
list of values. Defaults to numbers. Properties: .text, .textcs,
and .nick. If a single parameter is used, it is treated as a space-
delimited list of values. If two or more parameters are used, each is
treated as a separate value.
24.Added check for numeric 696 on ircds that report errors when mode
requests include more modes than parameters.
25.Optimized processing of long strings in /commands, token identifiers,
$calc(), $eval(), and identifier parameters.
26.Fixed "Mark As Read" menu item in treebar, switchbar, toolbar and
MDI popup menus not resetting flash/hilight correctly.
27.Fixed CAP logon/authentication messages not being displayed if
remotes are disabled.
28.Added highlight dialog item that allows you to specify the channels
and/or nicks to which the highlight applies.
29.Added $highlight().chans property.
30.Added a "Do Not Disturb" option to the Tools menu that allows you
to temporarily disable all visible/audible notifications such as
sounds, tips, flashing window icons, tray icon animations, and more.
31.Added /donotdisturb [on|off] command and $donotdisturb identifier.
32.Fixed /if parsing not detecting some invalid bracket combinations.
1 185,758 Read More
mIRC Help Jump to new posts
Re: $read syntax problem maroon 30/06/20 03:38 PM
So is it working or not? You didn't give an example of something that isn't working. Assuming the folder you mentioned is the same folder where $mircini shows your mirc.ini is located, then the path isn't even needed at all. You can put the filename into %variable3 then confirm whether $isfile(%variable3) is $true or $false. You can also check the value of $readn to see if it's non-zero, because * $+ $null $+ * will match a blank line or even a line containing only spaces, and both will cause echo to fail.
There are another couple cases where the match would fail to return the right thing.
4. when your search string and the file string don't have a substring match due to extra spaces. If the file has 2 spaces between "the" and "house" but your search text only has 1 space, then no match.
5. There is no switch for a case-sensitive match, so if it's matching NICK when you want only a case-sensitive match with Nick, you'd need to use the regex switch r which defaults to case-sensitive, but that uses different syntax than wildcard.
3 49 Read More
mIRC Help Jump to new posts
Re: $read syntax problem BaronSamedi 30/06/20 03:22 PM
1. I simplified the location of the text file for the purposes of the question. Its actually:


The file does exist, and if I change the %variable2 in the $read command to something specific eg......"the house is red" it finds the "the house is red" without an issue.
I tested and echo the %variable1 prior to the $read and it is legitimate and not null.
I have tried the ntw switch as I had found the wikichip page using google , prior to your reply, and tried it just in case. The first line of the txt document isnot numeric though.
3 49 Read More
mIRC Help Jump to new posts
Re: $read syntax problem maroon 30/06/20 03:08 PM
Still the same, perhaps
will jog your memory of what you're doing wrong. Things i see from your example
1. For a long time, Windows has blocked creating files in root of c: drive, so this fails if file doesn't exist. If file is in $mircdir it doesn't need the path. If it's in a subfolder of that, the path can be relative.
2. if %variable is null, then your search is for ** which matches the 1st line
3. ALWAYS use the nt switches unless you have a specific reason not to. Without the 'n' it evaluates words beginning with percent or dollar. Without the 't', if the 1st line is a number, that makes $read think that number is a replacement for $lines(filename) and can cause it to ignore the tail end of the file.
3 49 Read More
mIRC Help Jump to new posts
$read syntax problem BaronSamedi 30/06/20 02:00 PM
I am having trouble with this line :

/set %Variable1 $READ(C:\document.txt,w,* $+ %variable2 $+ *)

where I am trying to search document.txt for the first occurrence of the text %variable2 which will likely be part of a longer line. The %variable1 being set to the whole of that line.

I'm sure this used to work, but for some reason now doesn't. Has the syntax changed since I first wrote the line six or seven years ago?
3 49 Read More
General Discussion Jump to new posts
Re: mIRC In Dark Mode ? KindOne 29/06/20 03:23 PM
You can create your own dark mode in the color dialog.

View -> Colors...

You can create a new scheme or modify one of the existing ones.
1 69 Read More
General Discussion Jump to new posts
mIRC In Dark Mode ? Fahad_Mehar 29/06/20 01:55 PM
Hello ! Good Day

I was hoping somebody ask about the Dark Theme of mIRC... Can we have the dark theme for mIRC ? in upcoming or later updates in mIRC ?

1 69 Read More
Page 1 of 60 1 2 3 59 60