|
Need help with script
#264778
11/01/19 03:19 PM
|
Joined: Jan 2019
Posts: 3
zixyx
OP
Self-satisified door
|
OP
Self-satisified door
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 
Last edited by zixyx; 11/01/19 03:20 PM.
|
|
|
Re: Need help with script
[Re: zixyx]
#264781
11/01/19 07:08 PM
|
Joined: Jan 2004
Posts: 1,551
maroon
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 1,551 |
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
|
|
|
Re: Need help with script
[Re: zixyx]
#264782
11/01/19 07:15 PM
|
Joined: Jul 2014
Posts: 222
TECO
Fjord artisan
|
Fjord artisan
Joined: Jul 2014
Posts: 222 |
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
/join [-inxmd] <#channel>
This is a standard IRC command for joining a channel. 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 
TECO irc.PTirc.org (Co-Admin)
|
|
|
Re: Need help with script
[Re: TECO]
#264783
11/01/19 08:23 PM
|
Joined: Jan 2019
Posts: 3
zixyx
OP
Self-satisified door
|
OP
Self-satisified door
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 }
|
|
|
Re: Need help with script
[Re: zixyx]
#264784
11/01/19 09:23 PM
|
Joined: Jan 2004
Posts: 1,551
maroon
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 1,551 |
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)
|
|
|
Re: Need help with script
[Re: maroon]
#264785
11/01/19 11:05 PM
|
Joined: Jan 2019
Posts: 3
zixyx
OP
Self-satisified door
|
OP
Self-satisified door
Joined: Jan 2019
Posts: 3 |
Thanks, it works  I think it is only one server, "serveraddress"-> is address for irc server...
|
|
|
Re: Need help with script
[Re: zixyx]
#264867
19/01/19 02:54 PM
|
Joined: Jul 2006
Posts: 3,745
Wims
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 3,745 |
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_injectionAlso your script has missing { } on the if, here is a fixed version: 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
}
}
}
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
|
|
|
|
|
|