mIRC Home    About    Download    Register    News    Help

Print Thread
#264778 11/01/19 03:19 PM
Joined: Jan 2019
Posts: 3
Z
zixyx Offline OP
Self-satisified door
OP Offline
Self-satisified door
Z
Joined: Jan 2019
Posts: 3
Hello, I have a script (not my) for automatic connection to server channels from text file... but they all of them are opening on maximized windows and I want to have them opening in minimized mode, The same options is in >tools>add favorites and there is option minimize on join but this option is only for specific channels, I searched in settings if there is some way to open channels only in minimized mode but couldn't find nothing frown

Last edited by zixyx; 11/01/19 03:20 PM.
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
If your script uses the /join command or the /server command's -j switch, /join offers the -n switch and /server's -j can be replaced with -jn.

type: /help /join
or
/help /server

Joined: Jul 2014
Posts: 332
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 332
Originally Posted By: zixyx
Hello, I have a script (not my) for automatic connection to server channels from text file... but they all of them are opening on maximized windows and I want to have them opening in minimized mode, The same options is in >tools>add favorites and there is option minimize on join but this option is only for specific channels, I searched in settings if there is some way to open channels only in minimized mode but couldn't find nothing frown

Code:
/join [-inxmd] <#channel>

This is a standard IRC command for joining a channel.
Quote:
The -i switch makes you join the channel to which you were last invited.

The -n and -x switches set the minimize/maximize state for new channel windows.

The -m and -d switches set the mdi/desktop state for new channel windows.

I hope I have been able to help wink


TECO
irc.PTirc.org (Co-Admin)
Joined: Jan 2019
Posts: 3
Z
zixyx Offline OP
Self-satisified door
OP Offline
Self-satisified door
Z
Joined: Jan 2019
Posts: 3
The script doesnt have /join command, it starts with
ON *:CONNECT: {
IF ($server == serveraddress)
VAR %x = 1
WHILE ($read(autojoin.txt, t,%x) != $null) {
VAR %chan $chr(35) $+ $read(autojoin.txt, t, %x)
.TIMER -m 1 $calc(%x * 333) JOIN %chan
INC %x
}

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
of course it has it. Your script is doing it 3 times per second. You can insert the -n between JOIN %chan

If your network has multiple servers, you might want to change ($server == serveraddress) and replace it with ($network == networkstring)

Joined: Jan 2019
Posts: 3
Z
zixyx Offline OP
Self-satisified door
OP Offline
Self-satisified door
Z
Joined: Jan 2019
Posts: 3
Thanks, it works smile

I think it is only one server, "serveraddress"-> is address for irc server...

Joined: Jul 2006
Posts: 4,187
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,187
Hello, your script contains an exploit, you can be exploited, do not run this script, you need to use the 'n' switch on $read(), and you need to use $unsafe() on %chan, you can read more about injection here https://en.wikichip.org/wiki/mirc/msl_injection

Also your script has missing { } on the if, here is a fixed version:

Code:
on *:connect:{
  if ($server == serveraddress) {
    var %x 1
    while ($read(autojoin.txt, nt ,%x) != $null) {
      var %chan $chr(35) $+ $v1
      .timerautojoin -m 1 $calc(%x * 333) JOIN $unsafe(%chan)
      inc %x
    }
  }
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard