mIRC Homepage
Posted By: eger repeating text from more channels to new one - 27/04/04 12:52 PM
heya
i would like a script that would automaticly post (repeat) some text from few channels to a new channel
example we have 3 chan #chan1 #chan2 #chan3 and #targetchan
when a person on #chan1 would say" "trigger word" and some text after it" it would say it on #targetchan on #chan1 it was just said "trigger word" and some text after it"

hope i did not complicate it too much
tnx smile
Hi!

If you check the mIRC's help and search for on TEXT, you'll find everything you need:

Code:
/set %channel #chan1,#chan2,#chan3
/set %target #targetchan
/set %trigger trigger word *
; the "*" is needed

; and in the remote section :
on *:TEXT:%trigger:%channel:{
  /msg %target $nick has said $1- on channel $chan
}

thanks works nice but i have spoted a problem
some text has colors or is bold and its not included
how would i solve that ?
Code:
/set %channel #chan1,#chan2,#chan3
/set %target #targetchan
/set %trigger trigger word *
; the "*" is needed
; and in the remote section:
on *:TEXT:*:%channel:{
  if ( %trigger !iswm $strip($1-) ) { return }
  /msg %target $nick has said $1- on channel $chan
}


try that
Why is the * needed? smile

Thanks, Zyzzy.
Needed where?
Code:
/set %trigger trigger word [color:red]*[/color]


There smile
replace "trigger word" with the word that is to trigger it.. "*" means "anything" that matches after it. It's a wildcard.

trigger: hello *
hits: hello out there, hello all

trigger: howdy (without the *)
hit: howdy
NON hits: howdy (with a space or ANYTHING else after the word "howdy")

it's necessary for it to work properly.
smile
iswm = is wild match
Oh, i see... *duh*

Thanks! laugh

Zyzzy.
no "duh" to it. I learn stuff here that I look back at it and smack myself saying, "duh! - I should have known that!"

smile

It's no biggie.
laugh
© mIRC Discussion Forums