mIRC Homepage
Posted By: Cronus Modify $1 etc in Remote Scripts - 21/02/04 03:10 AM
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
Posted By: tidy_trax Re: Modify $1 etc in Remote Scripts - 21/02/04 03:14 AM
Code:
alias test {
tokenize 32 i hope this is what you wanted
echo -s $1-
}

/test
Posted By: Skip Re: Modify $1 etc in Remote Scripts - 21/02/04 04:08 AM
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.
Posted By: DaveC Re: Modify $1 etc in Remote Scripts - 21/02/04 07:35 AM
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?
Posted By: DaveC Re: Modify $1 etc in Remote Scripts - 21/02/04 07:37 AM
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.
Posted By: Skip Re: Modify $1 etc in Remote Scripts - 21/02/04 08:13 AM
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
Posted By: Cronus Re: Modify $1 etc in Remote Scripts - 21/02/04 02:59 PM
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
Posted By: Jae Re: Modify $1 etc in Remote Scripts - 22/02/04 12:55 PM
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
Posted By: DaveC Re: Modify $1 etc in Remote Scripts - 22/02/04 05:28 PM
he needs the defualt action to use his new $1-, that he cant do he can only block the defualt action.
Posted By: DaveC Re: Modify $1 etc in Remote Scripts - 22/02/04 05:30 PM
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.
© mIRC Discussion Forums