mIRC Homepage
Posted By: k1tkra04 multi-server - 01/03/05 05:38 AM
I've been working on this for almost a day now. And i'm afraid that i've been stumped.
Code:
msgx {
  %xs = 1 
  :blah
  while (%xs <= $lines(mp3chans.txt)) { 
    %xme = $read(mp3chans.txt,%xs)
    inc %xs 1
    .privmsg %xme $1-
    .echo -i25 %xme 9[ $+ 11 $+ $timestamp $+ 9] [ $+ 11 $+ %xme $+ /11 $+ $me $+ 9] 11 $1- 
  }
}


As u can see the code above allows me to message specific channel(s) by reading from a txt the channel name. That works perfect. What i'm trying to do, is multi-server message to specific channels that are in the txt file. Now for instance. I may be on #channel1 and #channel2 on one server, but I'm on #channel3 and #channel4 on another. Therefore I can't just have it message every channel that i'm on, because it would send to channels that don't exist.


I hope i've explained what I'm look for help for, if not let me know and I will try to explain further.

Thanks in advance,

arkt1k
Posted By: biggem001 Re: multi-server - 01/03/05 05:54 AM
well wat ya can do is this have it not a txt but an ini like this

[Server1]
#channel1
#channel2
[Server2]
#channel3
#channel4

then have part of ur script to read the ini
var %server watever server u want
var %a = $read(serversandchans.ini,w, * $+ [ $+ %server $+ ] $+ *)
and then have a while down the list till u get to the nexe[server]
Posted By: k1tkra04 Re: multi-server - 01/03/05 06:09 AM
Ok, thanks, but what happens when u get to the next server ? i was thinking of using /scon to do this, but i'm just really really stumped... confused mad
Posted By: k1tkra04 Re: multi-server - 01/03/05 10:25 AM
this seems impossible to do ... frown
Posted By: DaveC Re: multi-server - 01/03/05 01:13 PM
Code:
msgx {
  var %xs = 1 
  var %max = $lines(mp3chans.txt)
  while (%xs <= %max) { 
    %xme = $read(mp3chans.txt,%xs)
    scon -at1 msgx2 %xme $!1-
    inc %xs 1

  }
}
msgx2 {
  if ($chan($1) == $1) {
    .privmsg $1 $2-
    .echo -i25 $1 9[ $+ 11 $+ $timestamp $+ 9] [ $+ 11 $+ $1 $+ /11 $+ $me $+ 9] 11 $2- 
  }
}


Didnt try it but I think its right, what its ment to do is just issue the command /msgx2 channelname $1- to each active server connection , then let the alias check if your on that channel, if so do the deed.
Posted By: FiberOPtics Re: multi-server - 01/03/05 02:11 PM
It won't work, because $1- is strictly local to the alias, and has no meaning when passed in escaped form to the scon/scid commands.

alias test scon -at1 echo -a $!1-

/test this is a test
--> * /echo: insufficient parameters

The way to do it is to set a var like you did with the $read, and escape the var.

Greets
Posted By: MDA Re: multi-server - 08/03/05 10:10 AM
Greetings,

Have you tried or considered simply matching up your text file with your connections and using

Scon 1
Scon 2
Scon 3
Scon 4

Load up your multi server session, toss this into Alias, and give it a test, see how easy it is... /post.test

post.test {
scon 1 ame (*) Hosts 1
scon 2 ame (*) Hosts 2
scon 3 ame (*) Hosts 3
scon 4 ame (*) Hosts 4
}


Regards,
MDA
© mIRC Discussion Forums