mIRC Homepage
Posted By: cashed !!!!!!!!!HELP PLEASE!!!!!!!!!!!!!!!!! - 02/11/05 02:14 AM
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
}
}
}
Posted By: Lpfix5 Re: !!!!!!!!!HELP PLEASE!!!!!!!!!!!!!!!!! - 02/11/05 03:30 AM
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
Posted By: cashed Re: !!!!!!!!!HELP PLEASE!!!!!!!!!!!!!!!!! - 02/11/05 04:31 AM
heh sorry about that/

well acualy the server is 2 that i want to say it on.
Posted By: Rand Re: !!!!!!!!!HELP PLEASE!!!!!!!!!!!!!!!!! - 02/11/05 05:02 AM
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.
Posted By: cashed Re: !!!!!!!!!HELP PLEASE!!!!!!!!!!!!!!!!! - 02/11/05 05:14 AM
well allmost worked but it did this.


<cashed> var = <cashed> !latest


only wanted !latest to show..
Posted By: Rand Re: !!!!!!!!!HELP PLEASE!!!!!!!!!!!!!!!!! - 02/11/05 05:17 AM
See this line?
Code:
var %text = $+(&lt;,$nick,&gt;) $1- , %i = 1


Change it to this:

Code:
var %text = $1 , %i = 1
Posted By: cashed Re: !!!!!!!!!HELP PLEASE!!!!!!!!!!!!!!!!! - 02/11/05 05:22 AM
heh not it says


var = !latest


sorry man but i do ty for the help
Posted By: cashed Re: !!!!!!!!!HELP PLEASE!!!!!!!!!!!!!!!!! - 02/11/05 05:24 AM
now*
Posted By: Rand Re: !!!!!!!!!HELP PLEASE!!!!!!!!!!!!!!!!! - 02/11/05 05:35 AM
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
© mIRC Discussion Forums