Shoutbox

Ignore ReceiveNotify() - 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)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Ignore ReceiveNotify() (/showthread.php?tid=14684)

Ignore ReceiveNotify() by wipey on 08-20-2003 at 01:24 AM

mentions this in the plugin sample....but how is it done?????!


RE: Ignore ReceiveNotify() by Predatory Kangaroo on 08-20-2003 at 04:16 AM

To ignore a RecieveNotify, all you should need to do is return false immediately after entering the function.


RE: Ignore ReceiveNotify() by wipey on 08-20-2003 at 11:25 AM

false in the parsecommand?


RE: Ignore ReceiveNotify() by Whacko on 08-20-2003 at 12:26 PM

no
return false in ReceiveNotify()


RE: Ignore ReceiveNotify() by wipey on 08-20-2003 at 12:50 PM

example:(?


RE: Ignore ReceiveNotify() by Predatory Kangaroo on 08-20-2003 at 12:56 PM

Example in C++:
MPPLUGIN_RETURN_BOOL ReceiveNotify(/*[in]*/  const char* sNotifyCode,
                                   /*[in]*/  const char* sText,
                                   /*[in]*/  PLUGIN_PARAM* pParam,
                                   /*[out]*/ char* sTextToSend)
{
    return FALSE;
}

Example in VB:
Public Function ReceiveNotify(ByVal sNotifyCode As String, ByVal sText As String, ByVal sContactName As String, ByVal oConversationWnd As Object, ByRef sTextToSend As String) As Boolean
    ReceiveNotify = False
End Function


RE: Ignore ReceiveNotify() by wipey on 08-20-2003 at 03:28 PM

wont that just mean I'll receive no notifys at all, eg wont be able to play my custom sounds or anything???!


RE: Ignore ReceiveNotify() by Predatory Kangaroo on 08-21-2003 at 05:17 AM

Well, that's what you said you wanted to do :S
This will ignore ReceiveNotify() by doing the absolute minimal amount of processing when the event is triggered.
If that's what you meant, then try to explain some more :)


RE: Ignore ReceiveNotify() by wipey on 08-21-2003 at 10:53 AM

I want to make it ignore the next receivenotify, after a command is usd so I don't show the reply to  a command too


RE: Ignore ReceiveNotify() by wipey on 08-21-2003 at 06:53 PM

for example:

i've defined what's send wen I send a command and what happens when someone sends it to me (I receive it), but when I send a commmand how do I stop myself from both sending and receiving the command:s


RE: Ignore ReceiveNotify() by zigomar10 on 08-22-2003 at 07:04 AM

ok, example in VB: first u have to define a variable in the general declarations. for example:

code:
Dim ignore as integer

then u do the following in the parsecommand:
code:
ElseIf (StrComp(LCase(sCommand), "/xpingvb", vbTextCompare) = 0)
Then
sResult = Chr(nCCNotify) + "ping." 'The notify code must be 5 characters long
sResult = sResult + "Ping?"
ignore = 1       
ParseCommand = True
Exit Function
End If

and, finally in the recieve notify:
code:
If (StrComp(sNotifyCode, "ping.", vbTextCompare) = 0) Then
If ignore = 1 Then
ignore = 0

Else       
sTextToSend = "Pong!"
End If
ReceiveNotify = True
Exit Function
End If

;)
RE: Ignore ReceiveNotify() by wipey on 08-22-2003 at 01:15 PM

aah cool I tried thhat but I didnt think about the general declarations:$ thanx for finally clearin this up:D


RE: Ignore ReceiveNotify() by wipey on 08-22-2003 at 10:35 PM

where's the general declarations?


RE: Ignore ReceiveNotify() by zigomar10 on 08-23-2003 at 06:25 AM

there seems to be no General declarations because when you click under it to type, the line is before it (look at the screenshot).


RE: Ignore ReceiveNotify() by zigomar10 on 08-23-2003 at 06:27 AM

...but now when you finish typing 'Dim ignore as Integer' and you press enter, the line jumps down after it (look at the screenshot)  ;):P.


RE: Ignore ReceiveNotify() by wipey on 08-23-2003 at 03:05 PM

YAY! you are a god:D thanx alot:)