mIRC Home    About    Download    Register    News    Help

Print Thread
How do I echo from one channel to another? #66821 06/01/04 05:30 PM
Joined: Jan 2003
Posts: 46
D
DJSi Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2003
Posts: 46
Hello,

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

Thanks in advance.

Re: How do I echo from one channel to another? #66822 06/01/04 05:46 PM
Joined: Jan 2004
Posts: 26
M
module Offline
Ameglian cow
Offline
Ameglian cow
M
Joined: Jan 2004
Posts: 26
What do you mean by commands? Be specific please.


It's not in the GUI, it's in the source.
Re: How do I echo from one channel to another? #66823 06/01/04 06:55 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: How do I echo from one channel to another? #66824 06/01/04 11:04 PM
Joined: Jan 2003
Posts: 46
D
DJSi Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2003
Posts: 46
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

Re: How do I echo from one channel to another? #66825 06/01/04 11:06 PM
Joined: Jan 2003
Posts: 46
D
DJSi Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2003
Posts: 46
sparta, where would I put that to use that script? in scripts?

Re: How do I echo from one channel to another? #66826 07/01/04 04:12 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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.

Re: How do I echo from one channel to another? #66827 07/01/04 11:14 AM
Joined: Jan 2003
Posts: 46
D
DJSi Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2003
Posts: 46
Thanks for this smile

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

Re: How do I echo from one channel to another? #66828 07/01/04 01:08 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
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.


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: How do I echo from one channel to another? #66829 07/01/04 05:09 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Press ALT + R in mirc, then paste it there


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: How do I echo from one channel to another? #66830 07/01/04 11:28 PM
Joined: Jan 2003
Posts: 46
D
DJSi Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2003
Posts: 46
Great!
Thanks for the help guys smile

Re: How do I echo from one channel to another? #66831 07/01/04 11:48 PM
Joined: Jan 2003
Posts: 46
D
DJSi Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2003
Posts: 46
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

Re: How do I echo from one channel to another? #66832 09/01/04 10:05 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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

Re: How do I echo from one channel to another? #66833 14/01/04 03:38 PM
Joined: Jan 2003
Posts: 46
D
DJSi Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2003
Posts: 46
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

Re: How do I echo from one channel to another? #66834 03/02/04 03:09 PM
Joined: Jan 2003
Posts: 46
D
DJSi Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2003
Posts: 46
Can anyone help please?