mIRC Home    About    Download    Register    News    Help

Print Thread
#233513 21/08/11 02:45 AM
Joined: Dec 2006
Posts: 46
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Dec 2006
Posts: 46
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

danzigrules #233514 21/08/11 02:53 AM
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Could you paste the code you are using ? Without seeing it, we can't really help you


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
danzigrules #233515 21/08/11 03:39 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
If you meant by removing the
Quote:
|
Have you tried using
Code:
$remove($1-,|)

Tomao #233516 21/08/11 06:59 AM
Joined: Dec 2006
Posts: 46
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Dec 2006
Posts: 46
Code:
on *:text:*country update*:#allianceupdates:{
  $remove($1-,|)
  //scid 1 msg #updates $1-
} 


that doesn't work either.

Thanks

danzigrules #233517 21/08/11 07:26 AM
Joined: Dec 2006
Posts: 46
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Dec 2006
Posts: 46
got it with:

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



Thanks

danzigrules #233518 21/08/11 08:16 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
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.

danzigrules #233519 21/08/11 08:36 AM
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
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.


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Link Copied to Clipboard