mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 31
J
jh20001 Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2003
Posts: 31
If you made a script to message a channel once every hour or so, but you are sitting in the same channel on 3 different networks....is there a way to make sure it only messages the channel on a specific network? Something like

/msg #channel(network) your message?

I am guessing this is not possible buy figured I would ask just in case.

Thanks!


OH! AND PS!: Is there a way for a automated script to only /msg a nick if that nick is online? like if ($nick isonline) { /msg...


Last edited by jh20001; 21/10/08 05:32 PM.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
By default, a timer is executed only on the network (that is, the server connection) it's been started at. If you type /timer (without any parameter) you'll see a list of all currently running timers:
* timer <N / name of timer> [<repetitions>] <delay> delay <timer command> (<network>)
If you want a timer to be executed on all connections instead, or another connection than the "current" conection (the connection you're starting the timer at), have a look at the /scon and /scid commands.

The "only if that nick is online" thing is more difficult. Your script needs to call a /who <nick> or /ison <nick(s)> first, and parse the respective raw reply of the server. Maybe mIRCS notify list feature will help you: if the nick had been added to the notify list, you can use the $notify(<nick>).ison identifier directly, without the need for a "separate" check via /who or /ison.

Last edited by Horstl; 21/10/08 06:50 PM.
Joined: Jan 2003
Posts: 31
J
jh20001 Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2003
Posts: 31
Thanks. The 1st thing I guess I will just stick to putting the network specific timers into the perform section.

As for the second question, what I did was (since I need this for a temp project)...I set the "on dns" event to activate a specific alias if the nick is solved, and to activate a different alias if the nick cannot be resolved. So if the nick is online...it will be resolved. :o)

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Code:
var %net = $scon(0)
while (%net) {
  scon %net
  .timerscon $+ %net 1 360 /msg #channel Message
  dec %net
}


This is the basic idea. Set connection as active connection, then do the commands you need for that connection.


Link Copied to Clipboard