mIRC Homepage
Posted By: danzigrules chan copy - 21/08/11 02:45 AM
I am trying to copy one channel on a server to another. They use a single | and it is acting like a command. How can I copy/remove it from the lines?

ex: Country update: 11th Field Artillery (#918) [] | M | Acres: 694 (+42) | NW: 77735 (+5706)

Thanks
Posted By: Wims Re: chan copy - 21/08/11 02:53 AM
Could you paste the code you are using ? Without seeing it, we can't really help you
Posted By: Tomao Re: chan copy - 21/08/11 03:39 AM
If you meant by removing the
Quote:
|
Have you tried using
Code:
$remove($1-,|)
Posted By: danzigrules Re: chan copy - 21/08/11 06:59 AM
Code:
on *:text:*country update*:#allianceupdates:{
  $remove($1-,|)
  //scid 1 msg #updates $1-
} 


that doesn't work either.

Thanks
Posted By: danzigrules Re: chan copy - 21/08/11 07:26 AM
got it with:

Code:
on *:text:*country update*:#allianceupdates:{
  //scid 1 msg #updates $replace($1-,|,||) $1-
} 



Thanks
Posted By: Tomao Re: chan copy - 21/08/11 08:16 AM
Of course that didn't work because you don't place an identifier without an executing command to trigger it, unless you call it from an alias.

This is what you should have done:

Code:
scid 1 msg #updates $remove($1-,|)


If you choose to use $replace, you don't need an extra $1- at the end.

just
Code:
scid 1 msg #updates $replace($1-,|,||)
will be enough, or you can replace || with $chr(32) aka a space.

Finally though you don't need // at all.
Posted By: jaytea Re: chan copy - 21/08/11 08:36 AM
what you observed is a symptom of a much greater potential problem. you have essentially given control of your client to anyone who knows what they're doing and is able to trigger that event. i'm not sure what your circumstances are - whether #allianceupdates is moderated or not - but with such a simple solution you owe it to yourself to err on the side of caution:

Code:
on *:text:*country update*:#allianceupdates:{
  scid 1 | msg #updates $1-
}


notice the extra '|' between '1' and 'msg'. problem solved.
© mIRC Discussion Forums