mIRC Homepage

howto msg an action to a channel

Posted By: Er1C

howto msg an action to a channel - 20/09/05 09:38 PM

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!
Posted By: Lpfix5

Re: howto msg an action to a channel - 20/09/05 09:46 PM

$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
Posted By: Er1C

Re: howto msg an action to a channel - 20/09/05 09:49 PM

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?
Posted By: FiberOPtics

Re: howto msg an action to a channel - 20/09/05 09:54 PM

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.
Posted By: Lpfix5

Re: howto msg an action to a channel - 20/09/05 09:55 PM

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
Posted By: Er1C

Re: howto msg an action to a channel - 20/09/05 09:57 PM

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?
Posted By: Lpfix5

Re: howto msg an action to a channel - 20/09/05 09:57 PM

I c.. well i just posted something in the forums a few moments ago to help with protection like that.
Posted By: hixxy

Re: howto msg an action to a channel - 21/09/05 08:01 AM

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

Re: howto msg an action to a channel - 21/09/05 09:55 AM

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


that works! thnx !!
Posted By: FiberOPtics

Re: howto msg an action to a channel - 06/10/05 03:04 AM

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.
© 2019 mIRC Discussion Forums