mIRC Home    About    Download    Register    News    Help

Print Thread
rename a command inside mirc to work with ircd. #198334
26/04/08 11:36 AM
26/04/08 11:36 AM
Joined: Jun 2003
Posts: 23
M
Mouse_103 Offline OP
Ameglian cow
Mouse_103  Offline OP
Ameglian cow
M

Joined: Jun 2003
Posts: 23
I want to rename some of irc command inside my mirc.exe.
for example:
rename /PRIVMSG to /PM inside mirc for ircd with /PM function only and do not have /privmsg function.

I need to make /PRIVMSG send as /PM to ircd server.
also send /JOIN as /J and mirc will understand.

is there way to rename commands via hooking or injection?

The mirc script alias is not the answer.
I know how to make mirc dlls and mirc scripting basically.


Re: rename a command inside mirc to work with ircd [Re: Mouse_103] #198336
26/04/08 12:23 PM
26/04/08 12:23 PM
Joined: Aug 2004
Posts: 7,252
Ontario, Canada
R
RusselB Offline
Planetary brain
RusselB  Offline
Planetary brain
R

Joined: Aug 2004
Posts: 7,252
Ontario, Canada
I don't know about the first item, but mIRC already understands /join and only understands /j as /join due to an alias that comes in mIRC.

You state that mIRC's scripting option to allow aliases isn't the answer.. mind telling/explaining why?

Re: rename a command inside mirc to work with ircd [Re: RusselB] #198337
26/04/08 12:27 PM
26/04/08 12:27 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Planetary brain
Riamus2  Offline
Planetary brain

Joined: Oct 2004
Posts: 8,327
MA, USA
Sounds like his network doesn't accept JOIN or PRIVMSG commands. I *think* this is what QUOTE is for, but I've never tried altering what's sent to the server, so I don't really know.

Personally, I'd just use a better network if this is the case. smile


Invision Support
#Invision on irc.irchighway.net
Re: rename a command inside mirc to work with ircd. [Re: Mouse_103] #198348
26/04/08 06:58 PM
26/04/08 06:58 PM
Joined: Oct 2003
Posts: 3,918
Montreal, QC, Canada
A
argv0 Offline
Planetary brain
argv0  Offline
Planetary brain
A

Joined: Oct 2003
Posts: 3,918
Montreal, QC, Canada
If the server does not understand PRIVMSG it's barely an IRC server, but I'll bite:

You can write a script that acts as a proxy and set your /firewall settings to 127.0.0.1 before connecting.. that would be easier than hooking anything with a dll. Using that method you could rewrite any message passing through the proxy with a simple $replace, or what have you.

Alternatively, you can just write aliases to send the commands you need to the server, with on INPUT events to remap the message. This *is* possible in script...

Code:
alias privmsg { raw $iif(!$show,-q) PM $1 : $+ $2- }
on *:INPUT:*:echo $target $+(<,$me,>) $1- | .privmsg $target $1-


You can do similar things for other output functions, but not for input.. again, mIRC is designed to understand the IRC protocol which is defined strictly with PRIVMSG as the command.. there's no reason to have support for any other command, that wouldn't be IRC. Inform the admins that they completely disregarded the IRC protocol ( http://www.faqs.org/rfcs/rfc1459.html ) and that just about every client will be affected by this. If their change was intentional to keep certain clients out, well, then we won't help you break their rules.

The dll solution in this case would require extensive reverse engineering of the exe which is really far to involved for anyone here to cover or even recommend trying.



- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: rename a command inside mirc to work with ircd. [Re: Mouse_103] #198349
26/04/08 07:14 PM
26/04/08 07:14 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
qwerty  Offline
Hoopy frood
Q

Joined: Jan 2003
Posts: 2,523
You can use Saturn's io.dll for this sort of things. It's version-dependent but Saturn promptly updates it with each new version of mirc.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: rename a command inside mirc to work with ircd [Re: qwerty] #198404
27/04/08 10:08 PM
27/04/08 10:08 PM
Joined: Jun 2003
Posts: 23
M
Mouse_103 Offline OP
Ameglian cow
Mouse_103  Offline OP
Ameglian cow
M

Joined: Jun 2003
Posts: 23
I looked into readme.txt
I need a good example for io.dll for /PM and /J

Thanks

Originally Posted By: qwerty
You can use Saturn's io.dll for this sort of things. It's version-dependent but Saturn promptly updates it with each new version of mirc.

Re: rename a command inside mirc to work with ircd [Re: Mouse_103] #198405
28/04/08 01:11 AM
28/04/08 01:11 AM
Joined: Oct 2003
Posts: 3,918
Montreal, QC, Canada
A
argv0 Offline
Planetary brain
argv0  Offline
Planetary brain
A

Joined: Oct 2003
Posts: 3,918
Montreal, QC, Canada
The only person that supports Saturn's io.dll is Saturn himself. His documentation is rather extensive though, it should cover everything you need if you spend the time to actually look through it. From what I've seen, there are plenty of examples in the docs that are very similar to what you want to do, so you can look at those.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"