mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
Hi everyone, can anyone please help me make mirc auto connect to multiple servers when it starts? Over 10 servers frown

And then I need to perform various commands, the problem is the timing, there has to be some waiting time before each command, for example:

/nickserv identify "password"
/msg "nickname" enter #channel", #"channel", #"channel"
/join #"channel", #"channel", #"channel"...

The problem here is that I need mirc to wait between each command. The server only allows me to send a message to the invite bot after I identify my nickname. And I also need to wait for the bot to allow me to enter before I /join

Hope I was clear about what I need

Thanks for reading this and for the help.

Last edited by I_Love_Mirc; 27/04/09 08:44 AM.
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
A quick search on the forum gave me this


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
Thanks. I still need mirc to identify my nicname, WAIT, send message to invite bot, WAIT, join channels

lot's of stuff, in lot's of servers eheh

Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
How do I make mirc wait in the perform on connect option?

/nickserv identify "password"
*WAITING TIME*
/msg "nickname" enter #channel", #"channel", #"channel"
*WAITING TIME*
/join #"channel", #"channel", #"channel"...

Thanks!

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
You can use timers (/help /timer) if you want to wait a specified amount of time, but it's usually better to use remote events (such as on NOTICE and on INVITE) to decide when to perform actions.

Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
Hi collective, thanks for the reply.

I use mirc "perform on connect options"

one of the server has:

/nickserv identify
/msg drone enter #...
/join #...

So what do I need to add in mirc "perform on connect"? Sorry I don't know anything about scripts and programming.

Just need mirc to wait a little before sending the next command, thanks!

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
/nickserv identify
/.timer 1 5 /msg drone enter #...
/.timer 1 10 /join #...

Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
Thanks again collective

/.timer with the "."?

And what's the "1", "5" and "10" please?

Thanks

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
The . hides the default output of the /timer command which informs you when a timer starts and ends. The numbers are explained in the help file entry I pointed you to earlier: 1 is the number of repetitions (how many times the command should be executed) and 5 and 10 are delays in seconds.

Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
Thank you! smile

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
I do all of this manually. I dont use mirc features. Here is an idea I developed to connect to many different servers on start.

Basically I set a variable with a value of the server's name IM connecting to. Then it connects. No server will connect unless the variable is the server name. Instead. it sets a short timer to perform the connect alias for that specific server. It will keep doing this until the variable is unset meaning it is clear to connect to a server.

I didnt do this for the flood as much as for the validity of data per connection.

Lets say I have 3 servers.

1. server1
2. server2
3. server3

On start I send a signal that tells all servers to connect.

In the connect alias for each server it then checks for a variable. If it doesn't exist it sets it to be the server name. Now, any of the other connections wont connect until this one is finished. Once I am successfully connected to the server, it will unset the variable.

Now server2 or server3 is checking every second or two to see if the variable is unset. Once it is they will connect to their server the same way as above.

As for auth and such, I just have a regular event with a network or server halt. No worries about flooding out. It will only get its information from its server (or network) and auth with the info you provided.

Here is the basic idea. And for the mirc forum hater, I dont care if you think your code or style is better and you think mine is crap. Get a life. smile

Code:
on *:start:{
;on start, if master autoconnrct is on 
;send signal to all networks to connect.

if ($hget(master,autoconnect)) .timerac_ 1 1 .signal ac connect

}


;each network has this in their own file.

on *:signal:ac:{
;if 1 is connect and network is in auto connect list...
  if ($1 = connect) && (network_id isin $hget(master,ac)) {
;if variable doesnt exist, name it after the network_id.
    if (!%con_c) { set -u5 %nXs_c network_id }
    net_c
  }

alias net_c {
  if (%con_c) && (%con_c != network_id) { .timernXs_c_net_id 1 1 /net_c $1- | return }
  else { set -u5 %nXs_c network_id }
  
;;This is where i set up my auth info and connect to the server.

}


Now you can use a raw event or the on connect event to unset the variable. All mirc needs to know is that THAT server has concluded the process of connecting so the next one can begin. While server2 is connecting you will be receiving information from any other server that is connected which is why you will need to use network halts to direct information.

Good luck!

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
/me mutters "exceptionally useful for the OP, regarding the fact he's obviously using the /timer command his very first time..." whistle

Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
Originally Posted By: Collective
The . hides the default output of the /timer command which informs you when a timer starts and ends. The numbers are explained in the help file entry I pointed you to earlier: 1 is the number of repetitions (how many times the command should be executed) and 5 and 10 are delays in seconds.


Sorry the timer doesn't work when i connect to the other servers, I get:

* /timer: timer 1 not active

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
I think your timer is missing one or more requred parameters. The required parameters for a valid timer are:
Code:
timer <repetitions> <interval/delay> <command>

Example:
Code:
/timer 1 3 echo -a hi
That's a valid timer: it executes once, after 3 seconds. On execution, it will echo the word "hi" to the active window.

And these will all produce the error message you get - because at least one parameter is missing:
Code:
/timer 1 3 
/timer 1 
/timer echo -a hi
/timer 1 echo -a hi

If you have problems in finding the error, show us your current code. smile

Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
As I said, I don't know anything about programming or mirc scrips, I was just using this in the servers perform on connect

Originally Posted By: Collective
/nickserv identify
/.timer 1 5 /msg drone enter #...
/.timer 1 10 /join #...


it doesn't work in the other servers, do I need diffrent timmers?


thanks

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You can have a perform apply to all networks / a specific network / ... Did you set up different performs for the different networks (maybe with different nick passwords etc)? What in detail is (or is not) happening after you connect?
I rarley use 'perform', but, testing simulateneous connects to different networks, I'm not able to reproduce a problem related to timer,. They all worked like expected.
For further debugging you could prefix all your commands with "echo -s". Instead of executing the command, mIRC will thereby display the command in the respective status window, so you'll be able to see which command would be fired where and when.
Example:
Code:
ECHO -s DEBUG: nickserv identify
.timer 1 5 ECHO -s DEBUG: msg drone enter #...
.timer 1 10 ECHO -s DEBUG: join #...

Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
Hi Horstl thanks for your help

As I said, the timmers aren't working! Mirc doesn't stop before sending the next command

And I get this in the status window: "* /timer: timer 1 not active"

For example:

[08:32] -NickServ- This nickname is registered and protected. If it is your
-
[08:32] -NickServ- nick, type /msg NickServ IDENTIFY password. Otherwise,
-
[08:32] -NickServ- please choose a different nick.
-
[08:32] -NickServ- If you do not change within one minute, I will change your nick.
-
* /timer: timer 1 not active
-
[08:32] -> *NICKNAME* invite
-
* /timer: timer 1 not active
-
You must identify to a registered nick to private message NICKNAME
-
You need a registered nick to join that channel.
-
[08:32] * services.NETWORK.net sets mode: +r
-
[08:32] -NickServ- Password accepted - you are now recognized.

This what I have in Perform and connect:

/nickserv identify PASSWORD
/.timer 1 5
/msg NICKNAME invite
/.timer 1 5
/join #CHANNEL

Why isn't it working? Thanks again!

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
It isn't working because you added newlines that shouldn't be there.

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
nickserv identify PASSWORD
.timer 1 5 msg NICKNAME invite
.timer 1 5 join #CHANNEL

Replace NICKNAME and #CHANNEL with the one's that should be there, just just copy and paste the lines.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Feb 2009
Posts: 23
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Feb 2009
Posts: 23
Thanks!


Link Copied to Clipboard