Shoutbox

[Help] Intercept Emoticons on receive - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Help] Intercept Emoticons on receive (/showthread.php?tid=61881)

[Help] Intercept Emoticons on receive by ramik on 06-28-2006 at 11:55 AM

I have the idea of making a new plugin that when it receives a message check if it contains specific emoticons that are annoying (such as those that replace normal characters), and send only the pure text-only character.

i debugged with OnEvent_ChatWndReceiveMessage, and the message is only a simple message with the textcode of the emoticon, is there a way to check better for emoticons?


RE: [Help] Intercept Emoticons on receive by Mr. Bougo on 06-28-2006 at 12:21 PM

Hum, most people use #something# or ::something:: or :something or (something) for their emoticons, but some other people (really annoying people) set emoticons for "lol" "hi" or a, b, c, d, e etc... u.u


So you can try with a regexp to find those # and ::'s and filter them


RE: [Help] Intercept Emoticons on receive by ramik on 06-28-2006 at 12:48 PM

ok for the ones with some special chars, but i want to filter the most stupid ones, changing hi or a b c ...


RE: [Help] Intercept Emoticons on receive by Mr. Bougo on 06-28-2006 at 02:59 PM

Hem, i don't think it's possible... But i can be wrong, heh, let's wait for the next answer to this thread :p


RE: [Help] Intercept Emoticons on receive by RaceProUK on 06-28-2006 at 03:40 PM

You'd have to filter them on a case-by-case basis.


RE: [Help] Intercept Emoticons on receive by upsfeup on 06-28-2006 at 03:44 PM

The problem is that the script engine don't have access to the smilyes.. it only shows the text!


RE: [Help] Intercept Emoticons on receive by RaceProUK on 06-28-2006 at 03:51 PM

Then you'll need something more powerful and low-level than scripts.


RE: [Help] Intercept Emoticons on receive by ramik on 06-28-2006 at 03:55 PM

@RaceProUK:
Do you mean with DLL's or even lower-level ?


RE: [Help] Intercept Emoticons on receive by RaceProUK on 06-29-2006 at 12:00 AM

It'd have to be a DLL, as otherwise you can't get the code injected into Messenger.

Edit: In a DLL you can go all the way to assembler, and you can't really get much more low level than that.


RE: RE: [Help] Intercept Emoticons on receive by mathieumg on 06-29-2006 at 03:44 AM

quote:
Originally posted by RaceProUK
and you can't really get much more low level than that.


binary? (H)
RE: [Help] Intercept Emoticons on receive by ramik on 06-29-2006 at 07:15 AM

so with dll's i can intercept the coming stream as it is?

what API should I use, the one for MsgPlus 3.6?

I tried a couple of times to make dll's with FreePascal, will it be ok for such dll's?


RE: [Help] Intercept Emoticons on receive by rob_botch on 06-29-2006 at 08:49 AM

You could try the MsgPlus.RemoveFormatCodes object. That might work, but when you put it back into the message window, WLM might replace the text again. You would also have to be careful to replace the emoticons that you want...


RE: [Help] Intercept Emoticons on receive by RaceProUK on 06-29-2006 at 03:13 PM

quote:
Originally posted by rob_botch
MsgPlus.RemoveFormatCodes
The name suggests it only removes Plus! codes, not emoticons.
RE: [Help] Intercept Emoticons on receive by deAd on 06-29-2006 at 06:12 PM

It only does remove the formatting codes. [c] [b] etc.


RE: RE: RE: [Help] Intercept Emoticons on receive by Mushroom_Man on 06-29-2006 at 07:53 PM

quote:
Originally posted by mathieumg
binary? (H)


Nah, then all you'd get is a binary representation of assembler :P
RE: [Help] Intercept Emoticons on receive by RaceProUK on 06-29-2006 at 09:24 PM

quote:
Originally posted by ramik
so with dll's i can intercept the coming stream as it is?

what API should I use, the one for MsgPlus 3.6?

I tried a couple of times to make dll's with FreePascal, will it be ok for such dll's?
The 3.6 API doesn't exist in Live, and if FeeePascal can make Windows DLLs, then that should be fine.

Thing is, due to the low-level nature of what you want to do, you can't just use a pre-existing API. In fact, in order to get the data in the first place, you'll need remote code injection and API hooking.