mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2003
Posts: 23
M
Ameglian cow
OP Offline
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.


Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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"
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
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
Joined: Jun 2003
Posts: 23
M
Ameglian cow
OP Offline
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.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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"

Link Copied to Clipboard