mIRC Home    About    Download    Register    News    Help

Topic Options
#72219 - 21/02/04 03:10 AM Modify $1 etc in Remote Scripts
Cronus Offline
Nutrimatic drinks dispenser

Registered: 21/02/04
Posts: 5
Hi, I've been writing a script but i've hit a wall, i need to modify the message that will be sent by DCC SEND so i can modify the IP address mirc expects to be connected to by to receive, i figured i could hook onto the CTCP reply but then i need to change the message itself, since it can be outputted as $1- i was hoping there was a way to change the contents of $1- if not then i think there should be in the next version

Top
#72220 - 21/02/04 03:14 AM Re: Modify $1 etc in Remote Scripts
tidy_trax Offline
Hoopy frood

Registered: 02/11/03
Posts: 2327
Code:
alias test {
tokenize 32 i hope this is what you wanted
echo -s $1-
}

/test
_________________________
New username: hixxy

Top
#72221 - 21/02/04 04:08 AM Re: Modify $1 etc in Remote Scripts
Skip Offline
Fjord artisan

Registered: 09/12/02
Posts: 349
Loc: Darwin, Australia
This would be a nice feature (it's been suggested before, usually to allow 'encryption' scripts to modify an on *:text as it comes in so other scripts can play with the 'real' text too), or on a larger scale as a /parse command (which wouldn't *modify* the information coming from the irc server but instead allow the user/script to 'fake' messages coming from the server). Khaled has said he has no intention to add /parse as it could lead to some major desyncs between client and server.

I like your suggestion because it could perhaps be applied to certain events only, and would hopefully not be allowed to confuse mIRC (and ultimately the user) to such an extent a /parse command could.

A 'scripted' solution to this is to create a 'middle-man' with sockets and hide/modify/resend information from there.

Top
#72222 - 21/02/04 07:35 AM Re: Modify $1 etc in Remote Scripts
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
you want to change the IP address of a DCC SEND of a file to you?

You can make a work around that well do that, but changing the IP, would cause you to attempt to open a connection to the wrong IP, i dont really see a purpose to it.

Is that what your trying to do?

Top
#72223 - 21/02/04 07:37 AM Re: Modify $1 etc in Remote Scripts
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
Quote:
A 'scripted' solution to this is to create a 'middle-man' with sockets and hide/modify/resend information from there


were you meaning this as a general side step to not being able to rephase the $1- etc or specificly for dcc sends? If its for all things I would be interested in it, as i have run into the "i need to modify the original event contents" problem several times.

Currently im stuck with workarounds, and they only work for some events for obvious reasons.

Top
#72224 - 21/02/04 08:13 AM Re: Modify $1 etc in Remote Scripts
Skip Offline
Fjord artisan

Registered: 09/12/02
Posts: 349
Loc: Darwin, Australia
If you were to create the socket layer you would essentialy be able to handle any event -- limited only by your patience and sanity. smile

Top
#72225 - 21/02/04 02:59 PM Re: Modify $1 etc in Remote Scripts
Cronus Offline
Nutrimatic drinks dispenser

Registered: 21/02/04
Posts: 5
aha, yes!! thank you very much, i must have completely gone past that when i was trawling through the help files.

cheers laugh

...
...

oh well, it seems /tokenize is local to the function it's being executed it doesn't change what mirc sees when it processes it frown


Edited by Cronus (21/02/04 03:10 PM)

Top
#72226 - 22/02/04 12:55 PM Re: Modify $1 etc in Remote Scripts
Jae Offline
Fjord artisan

Registered: 06/02/04
Posts: 201
Loc: Melbourne, Australia
u can always put the tokenize statement at the top of each section of code. or make an alias to run through and process it accordingly. none the less. cheers smile

Top
#72227 - 22/02/04 05:28 PM Re: Modify $1 etc in Remote Scripts
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
he needs the defualt action to use his new $1-, that he cant do he can only block the defualt action.

Top
#72228 - 22/02/04 05:30 PM Re: Modify $1 etc in Remote Scripts
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
if you want to do this, intercept the dcc send, and send one to your self with the new data inserted into it., while halting the original from being processed.

Top