mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2005
Posts: 25
E
Er1C Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: May 2005
Posts: 25
Hi!

I've got a working script that echos some lines from a channel on one server to a channel on another server.

The line in the script that defines the output channel is

scon 2 msg #ECHOHERECHANNEL % $+ text

but i need to make the output not only the text but it needs to be the following:

/bs say #ECHOHERECHANNEL text

how do i add this to that script line? i tried some stuff but the script doesn't seem to like /bs say.

thanks for the help!

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
$scid = the command for server channel to other server channel

so therefore a simple command put right into the chat box is

/scid 2 /msg #channelhere texthere

or to action

/scid 2 /describe #channelhere loves to script.

scid represents the servers thats open so for example if you have three servers in order server 1 = scid 1 so if you want to do a simple test see how many servers your connected too do this //echo -a $scid(0)

by doing echo -a $scid(0) it will echo back how many servers your connected too so again if server 2 is the server you want to chat on type /scid 2 /msg #channelhere texthere

its the same way as saying say #channel blahblah


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: May 2005
Posts: 25
E
Er1C Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: May 2005
Posts: 25
Hmmm I do not follow you completely.

This is the full script now (which works perfectly)

on $*:text:/\[(New|Old)\]/iS:#SOURCECHANNEL:{
var %text = $strip($1-)
scon 2 msg #ECHOHERE % $+ text
}

This script makes it look like my nickname just says it into #ECHOHERE. What I want is, that botservice says it.

I can make the bot say something with this command in #ECHOHERE:

/bs say #ECHOHERE hello my name is a bot

So how do I put this in my script?

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Note that when helping other people, one should be very careful to not give out dangerous code as is the case with your post. The scon/scid/timer commands etc. are very dangerous for exploits due to double evaluation of passed contents.

In your example:

scid 2 msg #channel <text>

is potentially very dangerous if one would be using this code to relay text from one server to another. If a person would type "| exit" without the quotes, your mIRC would exit. Mind that this is even quite an innocent command, one could easily format your hard drive...

To avoid this problem of double evaluation is very simple:

scid 2 | msg #channel <text>

or

scid 2
msg #channel <text>

or

var %text = <text>
scid 2 msg #channel % $+ text

etc. etc.


Gone.
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
have you tryed

on $*:text:/\[(New|Old)\]/iS:#SOURCECHANNEL:{
var %text = $strip($1-)
scon 2 /bs #ECHOHERE msghere
}

??

if that dont work show me the alias for /bs


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: May 2005
Posts: 25
E
Er1C Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: May 2005
Posts: 25
Quote:
Hmmm I do not follow you completely.

This is the full script now (which works perfectly)

on $*:text:/\[(New|Old)\]/iS:#SOURCECHANNEL:{
var %text = $strip($1-)
scon 2 msg #ECHOHERE % $+ text
}

This script makes it look like my nickname just says it into #ECHOHERE. What I want is, that botservice says it.

I can make the bot say something with this command in #ECHOHERE:

/bs say #ECHOHERE hello my name is a bot

So how do I put this in my script?


(i'll quote myself to make it more clear, sorry hehe)

FiberOPtics, is the script I use a bit safe then? And how can I modify it to make it do what I want?

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
I c.. well i just posted something in the forums a few moments ago to help with protection like that.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on $*:text:/\[(New|Old)\]/iS:#SOURCECHANNEL:{
  var %text = $strip($1-)
  scon 2 bs say #ECHOHERE % $+ text
}

Joined: May 2005
Posts: 25
E
Er1C Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: May 2005
Posts: 25
Quote:
Code:
on $*:text:/\[(New|Old)\]/iS:#SOURCECHANNEL:{
  var %text = $strip($1-)
  scon 2 bs say #ECHOHERE % $+ text
}


that works! thnx !!

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Quote:
If a person would type "| exit" without the quotes, your mIRC would exit. Mind that this is even quite an innocent command, one could easily format your hard drive...


Just for accuracy, it wouldn't exit if you typed | exit, but if you are a little smart you will easily know where exactly you need to place the | exit, though I don't want to give too many hints.

Just know that the given code was a real threat to anybody's system who loads that remote in that state.


Gone.

Link Copied to Clipboard