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: Command silencing propagation inconsistency Khaled 27/03/24 04:40 PM
Thanks for your bug report and the test script. Variables are parsed in a different way, and at a different point, in the script parser than command prefixes. This behaviour has been in place for as long as I can remember. Changing where and how command prefixes and/or variables are parsed after all these years would introduce side-effects and/or break existing scripts. As you have found, the solution is to specify the prefixes at the start of the command line.
4 495 Read More
Bug Reports Jump to new posts
Command silencing propagation inconsistency Iire 27/03/24 11:32 AM
Normally, if a command that is silenced with the . prefix receives an identifier-type alias as a parameter, the silencing effect of the command will be propagated to any applicable line of code within the alias as well. However, if the command is dynamically-coded (e.g., as a variable), this silencing-effect propagation will not occur if the . prefix is prewritten into the dynamically-coded command's value1 (even though the command itself will be silenced as expected2), and the prefix will have to be manually affixed to the dynamically-coded command to achieve this behavior instead2:

Code
alias -l testqpfx {
  !inc -u0 %tnum
  
  !var %exp = $iif( $show == $1 , $true , $false )
  !echo -ag  Test %tnum - $2 $iif( $1 , verbose , silenced ) evaluation $3 
  !echo -agq  This should $iif( !%exp , not ) appear, ($show expected to be $1) 
  !return  Test %tnum - 98, $+ $iif( %exp , 44[ PASS ] , 52[ FAIL ] ) $+ 
}

alias runqpfxtests {
  !echo -ag $testqpfx( $true , Hard-coded )
  !linesep
  
  !.echo -ag $testqpfx( $false , Hard-coded )
  !linesep
  

  !var %dcsA = !echo -ag, %dcsB = !.echo -ag , %dcsC = !.echo -agq , %dcsD = echo -ag
  
  %dcsA $testqpfx( $true , Dynamically-coded )
  !linesep
  
  %dcsB $testqpfx( $false , Dynamically-coded , with command as / $+ %dcsB  )
  !linesep
  
  %dcsC $testqpfx( $false , Dynamically-coded , with command as / $+ %dcsC )
  !linesep
  
  !.%dcsD $testqpfx( $false , Dynamically-coded , with hard-coded command prefixes )
  !linesep
}

/runqpfxtests - Tested on v7.76 and beta v7.76.2477

  1. as demonstrated by %dcsB / Test 4 of the example script
  2. as demonstrated by %dcsC / Test 5 of the example script
  3. as demonstrated by %dcsD / Test 6 of the example script
4 495 Read More
Scripts & Popups Jump to new posts
Simple multizone timezone clock Maiko 26/03/24 04:20 PM
Hello .

I am trying to make a simple multi-zone time zone clock , that will display in a channel when requested with a !time command given in a channel .

Example : Bot The time here is 07:00:00
Bot The time ahead of here is 8:00:00

I have got one line to work ,but not the other .

on *:TEXT:!time:#:{
timer 1 1 msg $chan The Time here is $time(hh:nn:ss T)
timer 1 2 msg $chan The Time ahead of here is ( $calc ( $time + 60 ) )(hh:nn:ss T )
}




I am gonna to guess that it isn't that simple as just adding 60 , as in 60 minutes , to the $time .


I have tired to look for other timezone topic but not having alot of luck with their coding in the posts .

Thank you in advance .
3 511 Read More
mIRC Help Jump to new posts
Re: Repeating timers Wims 26/03/24 12:53 PM
All the behaviors you describe are correct I believe.
A timer is always associated with a status window, connected or not, -o only means that the timer won't stop if you were connected when starting it, when disconnecting from that associated status window.
If you don't use -i, the timer is associated with the current status window but the timer will stop if you close that status window, even if you used -o.
If you used -i, the timer is associated with the current status window AND the timer is reassociated to the new current status window when you close the status window associated to it, aka the timer is never stopped because you closed a status window. The help file is not very clear about this, but people want to generally use -io with their timer, the -i is often overlooked.

Once the timer trigger for the first timer at 00:01, it's as though you were using /timer -o 0 86400 echo -s .. at 00:01 manually, just an infinite timer triggering every 86400 seconds.
It won't reuse the 00:01 hours:minute parameter you specified the first time, because think about /timer -o 00:01 10 10 echo -s .., it wouldn't make sense to use a repetition and second parameter with a time parameter then.
Actually I'm not sure what you're confused with here as you can determine the next trigger time easily, it's just 24h from when it triggers which is always at 00:01.
If you wanted to echo midnight at midnight you would use 00:00, why using 00:01?

What do you mean as it's not triggering when it should?
1 277 Read More
mIRC Help Jump to new posts
Repeating timers Protopia 26/03/24 09:48 AM
I have an issue with a repeating timer apparently not triggering (and an offline timer apparently becoming online).

I set a timer with .timerMidnight -o 0:01 0 86400 echo -s It's MIDNIGHT!!!!

I can get a list of timers with /timers or get details of a specific timer with /timerMidnight and get:

* Immediately: * Timer midnight 00:01 86400s delay echo -s It's MIDNIGHT!!!! (Libera.Chat)
* A day later: * Timer midnight 86400s delay echo -s It's MIDNIGHT!!!! (Libera.chat)

So here are the issues:

1. I used the `-o` so it should be an offline timer, not associated with a connection, yet it says it is associated with a connection.
2. Once it has triggered for the first time I cannot determine the next trigger time.
3. Sometimes it is not triggering when it should.
1 277 Read More
Bug Reports Jump to new posts
Re: Check for Updates KindOne 25/03/24 07:05 PM
I had not thought about the filename in shortcuts, scripts, etc.. No idea how I managed to forget about that.
13 1,619 Read More
Bug Reports Jump to new posts
Re: Check for Updates Khaled 25/03/24 02:32 PM
Quote
hat if we use version numbers in the filename? Could it be possible to match the new version version number?
The reason that the updater uses the name of the executable is that changing the name could break the user's existing setup, eg. shortcuts, scripts, etc. that depend on that executable's name. There is no easy way to know what would or would not be broken, so the updater just uses the name of the executable that initiated the update.
13 1,619 Read More
Scripts & Popups Jump to new posts
Re: Timer Fernet 25/03/24 01:47 PM
Originally Posted by Epic
If you want the script to send messages not through the service bot, but directly through the mIRC bot, then change 2 lines in the code with the commands "bs say" to "msg".

After the change, the code script will look like this:
Code
on *:TEXT:*:#channel:{
  if ($nick == ServiceBot) { return }
  if ($nick isop $chan && $1 === !ON) { bot_stop | bot_start $chan }
  elseif ($nick isop $chan && $1 === !OFF) { bot_stop }
  else { bot_stop | .timerBOTSTART 1 1800 bot_start $unsafe($chan) }
}
alias -l bot_start {
  msg $1 Va beh...nessuno parla allora parlo io...
  rand_msg $1 | .timerRANDMSG 0 60 rand_msg $unsafe($1)
}
alias -l bot_stop { .timerBOTSTART off | .timerRANDMSG off }
alias -l rand_msg {
  var %colors 2,3,4,5,6,7,8,9,10,11,12,13
  var %rc $gettok(%colors,$rand(1,$numtok(%colors,44)),44)
  msg $1 $+(,%rc,$read(addons\miefrasibot\frasibot.txt,nt),)
}

I have a .txt file with some messages (those are simply curiosity from the world), and set 1800 as timer (30 minutes). In spite I have more than 1000 "curiosity" , I noticed there're ripetitions, the same messages may come out 4 times ! And of course there're not repeat messages in .txt file.
How to avoid it?
Thanks
23 2,244 Read More
Bug Reports Jump to new posts
Re: Check for Updates KindOne 24/03/24 07:19 PM
Quote
3) Since some users rename their mirc.exe files, the updater uses the name of the executable that initiated the update, ie. if you renamed mirc.exe to mirc9.exe, the updater will update mirc9.exe.

What if we use version numbers in the filename? Could it be possible to match the new version version number?

I append version numbers for releases and betas. "mirc-7.76.exe" / "mirc-7.76.2477.exe".
13 1,619 Read More
Scripts & Popups Jump to new posts
Re: how to check each nick in $1- is in channel Wims 23/03/24 09:07 PM
The code you have does that already though.
6 818 Read More
Scripts & Popups Jump to new posts
Re: how to check each nick in $1- is in channel Simo 23/03/24 07:36 PM
perhaps i wasnt clear in the initial request, the idea is to voice a list of users provided in $1- or similar (not entire channel no massvoice of entire channel)

like /mvoice nick nick nick nick nick nick nick nick

and if any of the nicks isnt in the channel to send an echo (with all the nicks that arent in the channel) and send the rest of the nicks to be voiced with $modespl

thanks.
6 818 Read More
Scripts & Popups Jump to new posts
Re: how to check each nick in $1- is in channel Wims 23/03/24 06:19 PM
1) Why do you care if it uses 1 or 2 while loops?
2) The code will not prevent any voice to occur if a single nickname is not on the channel, which is how you asked about it originallly
3) Even if the logic you want is to simply filter nickname not being on the channel first and only then do mass voices this code is not correct.
4) It's not correct but in a way that makes it works 100% of the time still, you got lucky, %max should be set to $numtok(%nickstring,32) after reseting %x to 1

It's possible to filter the nickname using $* which will do the while loop for you.
6 818 Read More
Scripts & Popups Jump to new posts
Re: how to check each nick in $1- is in channel Simo 23/03/24 02:21 PM
someone on IRC provided this alias with 2 while loops would it be possible to use 1 loop ?

Code



alias mvoice {
  var %xTemp $1-  , %nicks = %xTemp,   %newnicks,  %x = 0,  %numnicks = $numtok(%xTemp,32),   %inc = $modespl,  %max = %numnicks,  %nickstring  
  while (%x < $numtok(%xTemp,32)) {
    inc %x
    var %nick = $gettok(%xTemp,%x,32)
    if (%nick ison #) {
      if (%x != 1) %nickstring = %nickstring $+ $
      %nickstring = %nickstring $+ %nick
    }
  }
  %nickstring = $replace(%nickstring,$,$chr(32))
  %x = 1
  while (%x < %max) {
    %end = $calc(%x + %inc)
    if (%end > %max) %end = %max
    %currentnicks = $gettok(%nickstring, %x - %end, 32)
    %vs = + $+ $str(v,$numtok(%currentnicks,32))
    mode # %vs %currentnicks
    inc %x %inc
    inc %x
  }
}

6 818 Read More
Feature Suggestions Jump to new posts
Re: Editable Language Files for mIRC Khaled 22/03/24 07:07 PM
I have released a new beta that adds support for language DLLs. See beta.txt Item 27 for details.

I had to make a fair number of tricky implementation decisions in this beta; how to parse resources at a low-level, how the languages are presented to the user in the Display/Options dialog listbox, how the language DLL is created and initialized, filename format/language code parsing, resource DLL validity pre-checking, version info resource re-writing, and so on. I experimented with several different approaches - there is a lot going on under the hood.

To make life a little easier for translators, I added support for /langdll -m and /langdll -d. The /langdll -d resource compare method actually takes account of minor changes that Resource Hacker/Risoh Editor make to an updated DLL.

One change I am looking at for the next beta is allowing mIRC to change language DLLs without needing to restart. After looking through the code, I think this might actually be possible.

Outstanding issues: the dialogs will need resizing/controls repositioned/sized to accommodate longer strings. At this point, I am not sure what the best approach to this would be - leave it to individual translators - or perform a full revamp of all dialogs in such a way that the longest possible strings are accommodated.

One other thing to note: I plan on not changing any of the id values for resources from this point onwards. In the past, this was something I did for various reasons. From now on, all resource ids should remain fixed. The most that can happen is that a resource will be updated, added, or removed. v7.76 will be the resource baseline from this point onwards.

As this is the first beta with language DLL support, it will likely have bugs. If you have any questions, or come across an issue, please let me know.
4 922 Read More
mIRC Help Jump to new posts
Seperator Line Editbox d0ORk 20/03/24 06:46 AM
Hi there, how can I change the color of this seperation line?
Thanks in advance.
0 134 Read More
Scripts & Popups Jump to new posts
Re: Is there a weather script? mro_000 19/03/24 12:26 AM
no, in today's age google isnt really your friend for finding a working weather script.

i use https://github.com/acvxqs/PnPAddons422

there's a weather module. need to register with openweathermap.org
2 644 Read More
Feature Suggestions Jump to new posts
Re: Missing docs Wims 15/03/24 10:57 PM
You can use if ($nick($chan,nick,!)) { and if ($nick($chan,nick,~)) { to test if a nick has such prefix mode.

mIRC has support for (at least) owner mode from unrealircd (+q mode), if that's your case (but you could try otherwise) you can use the isowner operator.
However there's no support for 'admin' (+a mode), so you would have to use $nick() there.
1 269 Read More
Feature Suggestions Jump to new posts
Missing docs VectorOne 15/03/24 08:52 PM
From help file:

ison nickname v1 is on channel v2

isop nickname v1 is an op on channel v2
+o
ishop nickname v1 is a halfop on channel v2
+h
isvoice nickname v1 has a voice on channel v2
+v
isreg nickname v1 is a normal nick on channel v2
normal nick

what about ! and ~ users? how are they identified in msl? I'm try to check if the user is ! or ~ but there is nothing in docs to explain these two levels.
I am trying to auto voice users who are not managed by nickserv(typically known users set to ! or ~) in a channel of +m (moderated). Unknown/new users are set to +v after 5 minutes in the channel.
sample:
if ($1 isreg $2) && ($1 !isvoice $2) && ($1 !isop $2) && ($1 !ishop $2) {
.timer $+ $2 $+ . $+ $1 1 300 /mode $2 +v $1
}


Assistance is appreciated.
1 269 Read More
Scripts & Popups Jump to new posts
Re: how to check each nick in $1- is in channel Simo 15/03/24 08:09 PM
thanks for your reply Masoud i tried your suggestion

but only this gets executed :


Quote
if $numtok(%nicks,32) == $modespl {



if any remaining nicks in %nicks dont get voiced

the remaining in :


Quote
if (%nicks) {

dont trigger
6 818 Read More
Scripts & Popups Jump to new posts
Re: how to check each nick in $1- is in channel Masoud 14/03/24 09:48 PM
Don't use '=' for comparison, always use '=='. (In this case you don't need to, because you're doing a loop)

I think the problem is the loop on the third line, while (%a = %b) {
Change it to while (%a <= %b) { and that I think would solve the problem.
6 818 Read More
Scripts & Popups Jump to new posts
how to check each nick in $1- is in channel Simo 14/03/24 01:58 PM
greetingz , im strugling to find each nick in $1- and see if they are all actually in channel before proceeding adding them to be voiced with $modespl
here is what i work with so far (got it from here from a post and edited it somewhat)

Code


kjjsdklsddk {
  var %chan = #  , %a = 1,  %nicks = $1-,%b = $numtok(%nicks,32) 
  while (%a = %b) {
    if ($gettok(%nicks,%a,32) ison %chan) { set %nicks $addtok(%nicks,$gettok(%nicks,%a,32),32) }
    if $numtok(%nicks,32) == $modespl {
      .mode %chan + $+ $str(v,$numtok(%nicks,32)) %nicks
      unset %mode.nicks
    }
    inc %a
  }
  if %nicks {
    .mode %chan + $+ $str(v,$numtok(%nicks,32)) %nicks
    unset %nicks
  }
}



thanks in advance.
6 818 Read More
Feature Suggestions Jump to new posts
Re: Editable Language Files for mIRC Khaled 13/03/24 05:38 PM
I have just released a beta with changes related to preparing mIRC for translation. Translating mIRC into different languages has been discussed more recently here and here. See my post in the last thread where it describes the last set of changes and potential issues.

I mention in the latest beta that:

Quote
A translator will need to be aware of a string's context,
format, and word order and the need to keep it as close as possible
to the original.

This actually applies to a very small subset of strings. Most strings can just be translated as required. However, with code spanning several decades, and across several hundred thousand lines, it is possible that some code will be looking for a specific format, word order, and/or spacing. This is something that we can only find out at a later time once a translation is completed.

To handle different languages, I have had to make changes to how certain types of strings are handled in an attempt to maintain script/ini/backward compatibility. For example:

In the Colors dialog, the color names are used by scripts, so they need to remain in English for internal use. But they also have translatable resource versions that are displayed in the GUI.

In the Windows/Order dialog, window descriptions in the listbox are stored as-is in the mirc.ini file, so must remain in English for backward compatibility and consistency across different languages. However, there are translatable resource versions of these strings which are converted to/from the English language versions in the GUI.

For window names, such as "Status Window", "Notify List", "Chat nick (address)", and so on, for internal use, these need to remain in English using that word order/spacing format. The latest beta separates these internal window name strings from window titlebar strings, so that the titlebar names are now translatable.

And so on.

My aim with the recent beta was to make as few changes to code logic as possible - to maintain backward compatibility - to move strings to resources where necessary - and to make the trickier internal/visible GUI/window strings translatable.

At some point, commands/identifiers will likely need to be extended and/or added to enable scripts to display/parse information using the chosen language.

I am currently performing tests on resource files/dlls, so mIRC is now pretty close to being translatable :-)
4 922 Read More
Scripts & Popups Jump to new posts
Re: How to run a script? Epic 13/03/24 10:53 AM
Originally Posted by azirino
How to run a script in mirc? Whenever I try to give /load "filepath" it returns with the following message "/load insufficient parameters"

For example: /load -rs file_script.mrc

You can find out more about this in the help documentation: https://en.wikichip.org/wiki/mirc/commands/load
1 306 Read More
Scripts & Popups Jump to new posts
How to run a script? azirino 12/03/24 11:47 PM
How to run a script in mirc? Whenever I try to give /load "filepath" it returns with the following message "/load insufficient parameters"

; Substitua "Hi" pela mensagem que você deseja enviar
var %message = Sua mensagem aqui

; Loop através da lista de usuários no canal
; $nick(elite-chat,N) retorna o N-ésimo nick na lista de usuários no canal
var %i = 1
while ($nick(#canal,%i)) {
; Obtém o nome do usuário atual
var %user = $nick(#canal,%i)

; Envia a mensagem para o usuário atual
msg %user %message

; Incrementa o contador para passar para o próximo usuário
inc %i
}
1 306 Read More
Feature Suggestions Jump to new posts
Re: Error messages could display timestamp mruno 12/03/24 02:42 PM
I agree as this would assist in script troubleshooting.
1 496 Read More
Page 3 of 31 1 2 3 4 5 30 31