mIRC Home    About    Download    Register    News    Help

Print Thread
#113085 01/03/05 05:38 AM
Joined: Feb 2005
Posts: 34
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Feb 2005
Posts: 34
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

#113086 01/03/05 05:54 AM
Joined: Jun 2004
Posts: 87
B
Babel fish
Offline
Babel fish
B
Joined: Jun 2004
Posts: 87
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]

#113087 01/03/05 06:09 AM
Joined: Feb 2005
Posts: 34
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Feb 2005
Posts: 34
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

#113088 01/03/05 10:25 AM
Joined: Feb 2005
Posts: 34
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Feb 2005
Posts: 34
this seems impossible to do ... frown

#113089 01/03/05 01:13 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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.

#113090 01/03/05 02:11 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.
#113091 08/03/05 10:10 AM
Joined: Dec 2002
Posts: 99
M
MDA Offline
Babel fish
Offline
Babel fish
M
Joined: Dec 2002
Posts: 99
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


Link Copied to Clipboard