mIRC Homepage
Posted By: DJSi How do I echo from one channel to another? - 06/01/04 05:30 PM
Hello,

I need to be able to echo certain commands from one channel to another. How can I do this?

Thanks in advance.
What do you mean by commands? Be specific please.
depends on what commands.. but an example:
Code:
on 1:OP:*: { echo $active $nick got op from $opnick in $chan }

$active is the channel that you have active.. change that to #channel if you only want it to be echoed to 1 channel.. $chan is the channel where the op took place..
Posted By: DJSi Re: How do I echo from one channel to another? - 06/01/04 11:04 PM
Sorry, let me explain a bit better smile

Let's say there is a chat going on in channel #a:

<jon>hello
<bob>hello
<jon>hows it going?
<bob>good
<jon> nice to hear from you

I want to echo everything jon says to channel #b:

<bot>hello
<bot>hows it going?
<bot> nice to hear from you

Or echo only certain things that Jon says, maybe with additional text in channel #b.

Thanks for the replys smile
Posted By: DJSi Re: How do I echo from one channel to another? - 06/01/04 11:06 PM
sparta, where would I put that to use that script? in scripts?
Posted By: DaveC Re: How do I echo from one channel to another? - 07/01/04 04:12 AM
Code:
 
on *:text:*:#a: {
  var %text = $1-
  tokenize 32 $strip($1-)
  if ($nick == jon) {
    ;msg #b %text | halt
    ;^ remarked out as you want only selected statments (see below)
    if (hello* iswm $1-) { msg #b %text | halt }
    if (how* iswm $1-) { msg #b %text | halt }
    if (*bowlingball* iswm $1-) { msg #b %text | halt }
  }
}
 

i store the original text in %text as it might have colors in it, then strip the colors and tokenize it into $1- as this also removes multiple spaces, this makes ISWM matching real easy.
Posted By: DJSi Re: How do I echo from one channel to another? - 07/01/04 11:14 AM
Thanks for this smile

I will try it out. I take it I should put it in the scripts box in Mirc?
Quote:

DaveC:
i store the original text in %text as it might have colors in it, then strip the colors and tokenize it into $1- as this also removes multiple spaces, this makes ISWM matching real easy.



Actually the spaces are stripped already in the %text variable as $1- strips them.
Press ALT + R in mirc, then paste it there
Posted By: DJSi Re: How do I echo from one channel to another? - 07/01/04 11:28 PM
Great!
Thanks for the help guys smile
Posted By: DJSi Re: How do I echo from one channel to another? - 07/01/04 11:48 PM
It does work perfectly, however I have discovered one little thing about it actually.

It doesn't echo across networks. I have multiple networks open in Mirc, if I wanted to echo from channel #a on efnet to channel #b on linknet, how could I do this?

Thanks so much smile
Posted By: DaveC Re: How do I echo from one channel to another? - 09/01/04 10:05 PM
no there not thats the whole reason i said it.

If you have one space colored blue and follwoing that one space colored red, the strip well remove the colors and leave two spaces, if however you happen to be striping colors from the mirc control panel options (options/irc/messages) then the colors have been prestriped and the two spaces wont be there only one, this is exactly what happened to me, i prestrip colors and one day i turned them on, and one of my matching scripts stop working. the resulting text now had 2 spaces not one in it
Posted By: DJSi Re: How do I echo from one channel to another? - 14/01/04 03:38 PM
Hi Dave,
Could you help changing the script so that echo's from a channel on one network to a channel on another network please?

Thanks laugh
Posted By: DJSi Re: How do I echo from one channel to another? - 03/02/04 03:09 PM
Can anyone help please?
© mIRC Discussion Forums