mIRC Home    About    Download    Register    News    Help

Topic Options
#198334 - 26/04/08 12:36 PM rename a command inside mirc to work with ircd.
Mouse_103 Offline
Ameglian cow

Registered: 25/06/03
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.


Top
#198336 - 26/04/08 01:23 PM Re: rename a command inside mirc to work with ircd [Re: Mouse_103]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: 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?

Top
#198337 - 26/04/08 01:27 PM Re: rename a command inside mirc to work with ircd [Re: RusselB]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, 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

Top
#198348 - 26/04/08 07:58 PM Re: rename a command inside mirc to work with ircd. [Re: Mouse_103]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: 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"

Top
#198349 - 26/04/08 08:14 PM Re: rename a command inside mirc to work with ircd. [Re: Mouse_103]
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
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

Top
#198404 - 27/04/08 11:08 PM Re: rename a command inside mirc to work with ircd [Re: qwerty]
Mouse_103 Offline
Ameglian cow

Registered: 25/06/03
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.

Top
#198405 - 28/04/08 02:11 AM Re: rename a command inside mirc to work with ircd [Re: Mouse_103]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: 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"

Top