mIRC Home    About    Download    Register    News    Help

Topic Options
#130678 - 20/09/05 10:38 PM howto msg an action to a channel
Er1C Offline
Ameglian cow

Registered: 21/05/05
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!

Top
#130679 - 20/09/05 10:46 PM Re: howto msg an action to a channel
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
$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* }

Top
#130680 - 20/09/05 10:49 PM Re: howto msg an action to a channel
Er1C Offline
Ameglian cow

Registered: 21/05/05
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?

Top
#130681 - 20/09/05 10:54 PM Re: howto msg an action to a channel
FiberOPtics Offline
Hoopy frood

Registered: 05/02/04
Posts: 2019
Loc: Leuven, Belgium
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.

Top
#130682 - 20/09/05 10:55 PM Re: howto msg an action to a channel
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
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* }

Top
#130683 - 20/09/05 10:57 PM Re: howto msg an action to a channel
Er1C Offline
Ameglian cow

Registered: 21/05/05
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?

Top
#130684 - 20/09/05 10:57 PM Re: howto msg an action to a channel
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
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* }

Top
#130685 - 21/09/05 09:01 AM Re: howto msg an action to a channel
hixxy Offline
Hoopy frood

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

Top
#130686 - 21/09/05 10:55 AM Re: howto msg an action to a channel
Er1C Offline
Ameglian cow

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


that works! thnx !!

Top
#130687 - 06/10/05 04:04 AM Re: howto msg an action to a channel
FiberOPtics Offline
Hoopy frood

Registered: 05/02/04
Posts: 2019
Loc: Leuven, Belgium
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.

Top