mIRC Homepage

rename a command inside mirc to work with ircd.

Posted By: Mouse_103

rename a command inside mirc to work with ircd. - 26/04/08 11:36 AM

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.

Posted By: RusselB

Re: rename a command inside mirc to work with ircd - 26/04/08 12:23 PM

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?
Posted By: Riamus2

Re: rename a command inside mirc to work with ircd - 26/04/08 12:27 PM

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
Posted By: argv0

Re: rename a command inside mirc to work with ircd. - 26/04/08 06:58 PM

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.

Posted By: qwerty

Re: rename a command inside mirc to work with ircd. - 26/04/08 07:14 PM

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.
Posted By: Mouse_103

Re: rename a command inside mirc to work with ircd - 27/04/08 10:08 PM

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.
Posted By: argv0

Re: rename a command inside mirc to work with ircd - 28/04/08 01:11 AM

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.
© 2019 mIRC Discussion Forums