The sNotifycode
HAS to be 5 characters long it describes the functions in great detail in another module.
Also you cannot have a plugin respond to a (!XIP) tag it can only respond to a /xip command.
You need to read the documentation provided in a module on the receivenotify.
code:
' //////////////////////////////////////////////////////////////////////
' //
' // Purpose: Allow special actions when a plugin text is received
' //
' // Definition:
' // This function is called everytime Messenger Plus! detects a
' // plugin text ID in a message received from a user. This ID is
' // generally placed at the beginning of a text by a plugin
' // command to perform an action on the destination computers.
' // This can be used, for example, to play a sound. See the
' // control characters section for more information.
' //
' // Parameters:
' // * sNotifyCode: this 5 character string is the notify code that
' // was sent next to the plugin ID control character. Use it to
' // identify what action to perform.
' // * sText: the rest of the received message. You can use it to
' // get more information about the action you want to perform.
' // However, you MUST NOT use this parameter to determine if an
' // action is supported by your plugin. Use sNotifyCode instead.
' // * pParam: additional information sent by Messenger Plus!. For
' // more information, read the documentation of the PLUGIN_PARAM
' // structure. iConversationWnd and sContactName are used.
' // * sTextToSend: this parameter is optional. You can use it if
' // you want to ask Messenger Plus! to send a new message after
' // this one has been displayed. This WON'T modify the message
' // associated with the notify code, this will simply send a new
' // one. Important: the size of this buffer is 2048 characters
' // and it is YOUR responsability to verify that you don't write
' // more characters to avoid memory faults. In any case, no more
' // than 1100 characters will be sent on the network.
' // * return value: if you recognized the notify code return TRUE,
' // else, return FALSE.
' //
' // Important: keep in mind that several plugins can be installed
' // and that a lot of text is received. If you don't support the
' // notify code passed in parameter, you must return as fast as
' // possible and without doing anything else.
' //
' //////////////////////////////////////////////////////////////////////
This will respond to the (!XIP) tag.
You can actually change this around somewhat.
code:
Public xip As String
Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
Initialize = True
Dim o As Object
Set o = CreateObject("InetCtls.Inet")
xip = o.OpenURL("http://bot.my-board.net/ip.php")
Set o = Nothing
End Function
Public Function ParseTag(ByVal sTag As String, ByVal oConversationWnd As Object, ByRef sResult As String) As Boolean
ParseTag = False
If InStr(1,LCase(sTag), "xip) Then
sResult = "Il tuo ip è:" + xip
End If
End Function