mIRC Home    About    Download    Register    News    Help

Print Thread
#247579 13/08/14 06:03 PM
Joined: Aug 2014
Posts: 5
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Aug 2014
Posts: 5
I created a very simple script to copy topic changes from one channel on one network to another channel on a separate network, but I'm having issues when the original topic contains this character: |

Here is the script in question:

on username:TOPIC:#originalchannel: {
/scon 1 /topic #newchannel $1-
/scon 1 /msg #newchannel $1-
}

This should work just fine but that character "|" makes it try it as though everything after that is a new command...

* Freebird changes topic to 'Welcome! | Main Website Link | Discussion Boards Link | '

changes the topic in the secondary channel to be 'Welcome!' and gives two errors in the Status of the other network.

TLDR: how do I stop | from meaning its a separate command?

Thanks for any help anyone can provide!

Comatica

Joined: Jan 2004
Posts: 1,359
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,359
Code:
on username:TOPIC:#originalchannel: {
  scon 1
  topic #newchannel $1-
  msg #newchannel $1-
}


You should not pass unknown input to the scon command, it's evaluated and can be used to gain control of your system.

http://en.wikichip.org/wiki/MSL_Injection_-_mIRC

Joined: Aug 2014
Posts: 5
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Aug 2014
Posts: 5
Originally Posted By: Loki12583
Code:
on username:TOPIC:#originalchannel: {
  scon 1
  topic #newchannel $1-
  msg #newchannel $1-
}


You should not pass unknown input to the scon command, it's evaluated and can be used to gain control of your system.

http://en.wikichip.org/wiki/MSL_Injection_-_mIRC


I am asking how any commands or identifiers can be removed. I am just looking to mimic the topic from one channel to another that crosses servers automatically.

Joined: Jan 2004
Posts: 1,359
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,359
Originally Posted By: Comatica
I am asking how any commands or identifiers can be removed. I am just looking to mimic the topic from one channel to another that crosses servers automatically.


That's what I gave you. You quoted it.

Joined: Aug 2014
Posts: 5
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Aug 2014
Posts: 5
Originally Posted By: Loki12583
Originally Posted By: Comatica
I am asking how any commands or identifiers can be removed. I am just looking to mimic the topic from one channel to another that crosses servers automatically.


That's what I gave you. You quoted it.


I am so sorry, I did not even notice the difference in code. Thank you for your help I do appreciate it smile


Link Copied to Clipboard