mIRC Home    About    Download    Register    News    Help

Print Thread
#194828 12/02/08 04:29 AM
Joined: Jun 2007
Posts: 10
P
Paros Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Jun 2007
Posts: 10
Hello,

I'm pretty sure some of you can do this in your sleep with both hands tied behind your back smile

In order to connect to a service that gets me on IRC I have to issue a command in mIRC to connect to a server, then a command to pick a virtual host, and then a command to connect to an IRC server.

I've managed to create a popup menu where I right-click and choose each step in sequence, but I would like to make the second step, where I choose the virtual host, an automated random pick from a list of available hosts in a text file.

The second step now in the Popups looks like this:

.choose vhost: /command1 command2 vhost1


I'd like to have something like this:

.choose vhost: /command1 command2 [pick a random vhost from vhosts.txt]

Any easy way of doing this?

Thank you very much for any help or pointers.


Joined: Jun 2007
Posts: 10
P
Paros Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Jun 2007
Posts: 10
I think I'm getting somewhere:

.choose vhost: /command1 command2 $read(hostsfile.txt)

which is supposed to read a random line form the hostsfile.txt (each host ip is on a separate line of course)

I tried an //echo $read(...) and it's returning a random line in the main chat window but it's not working with the popup menu and I'm not sure if the syntax above is the correct one for mIRC. Do I need a variable maybe, like ... vhost=$read(hostfile.txt) ?

Joined: Mar 2006
Posts: 395
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 395
As fair as I know

Code:
.choose vhost:command1 command2 $read(vhosts.txt)
should work

Last edited by The_JD; 12/02/08 12:58 PM.

[02:16] * Titanic has quit IRC (Excess Flood)
Joined: Jun 2007
Posts: 10
P
Paros Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Jun 2007
Posts: 10
Thanks for the reply. It's not working but there's probably something wrong with the server I'm connecting to.


Link Copied to Clipboard