mIRC Home    About    Download    Register    News    Help

Print Thread
Modify $1 etc in Remote Scripts #72219 21/02/04 03:10 AM
Joined: Feb 2004
Posts: 5
C
Cronus Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Feb 2004
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

Re: Modify $1 etc in Remote Scripts #72220 21/02/04 03:14 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
alias test {
tokenize 32 i hope this is what you wanted
echo -s $1-
}

/test


New username: hixxy
Re: Modify $1 etc in Remote Scripts #72221 21/02/04 04:08 AM
Joined: Dec 2002
Posts: 349
S
Skip Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 349
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.

Re: Modify $1 etc in Remote Scripts #72222 21/02/04 07:35 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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?

Re: Modify $1 etc in Remote Scripts #72223 21/02/04 07:37 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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.

Re: Modify $1 etc in Remote Scripts #72224 21/02/04 08:13 AM
Joined: Dec 2002
Posts: 349
S
Skip Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 349
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

Re: Modify $1 etc in Remote Scripts #72225 21/02/04 02:59 PM
Joined: Feb 2004
Posts: 5
C
Cronus Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Feb 2004
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

Last edited by Cronus; 21/02/04 03:10 PM.
Re: Modify $1 etc in Remote Scripts #72226 22/02/04 12:55 PM
Joined: Feb 2004
Posts: 201
J
Jae Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2004
Posts: 201
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

Re: Modify $1 etc in Remote Scripts #72227 22/02/04 05:28 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
he needs the defualt action to use his new $1-, that he cant do he can only block the defualt action.

Re: Modify $1 etc in Remote Scripts #72228 22/02/04 05:30 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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.