mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 17
C
cashed Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Oct 2005
Posts: 17
sorry to post here but could not find anything else about this.

i want to echo a specfic word from a channel on one server and echo it to another channel on another server.say if someone says
!latest it echos only !latest to the other server and nothing
else.

heres code that i found simmillar to what i want But it echos all the text and all i want to echo is the one word when typed.


on *:text:*:#channel: {
if ($network == TheNetworkYouGetTextFrom) {
var %network = TheNetworkYouSendTextTo , %schan = #ChannelToSendTextTo
var %text = $+(<,$nick,>) $1- , %i = 1
while ($scon(%i)) {
if ($scon(%i).network == %network) { scon $scon(%i) msg %schan $(%text,0) | return }
inc %i
}
}
}

Last edited by cashed; 02/11/05 02:19 AM.
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Stop j00r shouting your waking up the baby LOL

assuming the first server your connected too = 1 which is the server you want to type !latest in :P and second server "S Connection 2" is the server you wanna talk

Code:

on 1:TEXT:*:#:{
if ($1 == !latest) {
scon 2 {
msg #channelfromotherserver $2-
}
}
}



but seriously stop shouting your scaring me


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Oct 2005
Posts: 17
C
cashed Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Oct 2005
Posts: 17
heh sorry about that/

well acualy the server is 2 that i want to say it on.

Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
That script would require him having to edit it. Secondary (or more) connections often do not keep the same cid number.

Code:
on *:text:!latest:[color:red]#ChannelThat_!latest_will_be_typed_in[/color]: {
  if ($network == [color:red]TheNetworkYouGetTextFrom[/color]) {
    var %network = [color:red]TheNetworkYouSendTextTo[/color] , %schan = [color:red]#ChannelToSendTextTo[/color]
    var %text = $+(&lt;,$nick,&gt;) $1- , %i = 1
    while ($scon(%i)) {
      if ($scon(%i).network == %network) { scon $scon(%i) [color:blue]msg[/color] %schan $(%text,0) | return }
      inc %i
    }
  }
}


You will have to replace the red text with it's proper network and channels. You can also replace the blue text with "echo" if you wish it to "echo" into the channel, rather than message the channel.

Joined: Oct 2005
Posts: 17
C
cashed Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Oct 2005
Posts: 17
well allmost worked but it did this.


<cashed> var = <cashed> !latest


only wanted !latest to show..

Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
See this line?
Code:
var %text = $+(&lt;,$nick,&gt;) $1- , %i = 1


Change it to this:

Code:
var %text = $1 , %i = 1

Joined: Oct 2005
Posts: 17
C
cashed Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Oct 2005
Posts: 17
heh not it says


var = !latest


sorry man but i do ty for the help

Joined: Oct 2005
Posts: 17
C
cashed Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Oct 2005
Posts: 17
now*

Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
I'm not sure what to tell you, but somewhere you must have goofed up, as this works perfectly for me.

I just tested it, and it worked the way you wanted it to.

From the way it sounds, you must have the "var" lines unseperated. This is the only reason I can think of for it to message the channel with "var = !latest"

Does yours look like this:
Code:
 var %network = network , %schan = #channel var %text = $1 , %i = 1 


It needs to look like this:
Code:
var %network = network , %schan = #channel

var %text = $1 , %i = 1

Last edited by Rand; 02/11/05 05:36 AM.

Link Copied to Clipboard