i'm writing a plug-in for my server.
i wont that plug in response which my ip addres at the "!xip" comand.
i've do the code for the ip but i don't know where i must put it.
this is the code:
code:
Option Explicit
Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
Initialize = True
End Function
Public Function Uninitialize()
End Function
Public Function GetPublishInfo(ByRef sPluginName As String, ByRef nCommandCount As Long, ByRef nTagCount As Long) As Boolean
sPluginName = "Server Function"
nCommandCount = 1
nTagCount = 0
GetPublishInfo = True
End Function
Public Function GetPublishCommandInfo(ByVal nCommandIdx As Long, ByRef sName As String, ByRef sValue As String, ByRef sHelp As String)
If (nCommandIdx = 1) Then
sName = "Invia l'ip del server"
sValue = "xip"
End If
End Function
Public Function GetPublishTagInfo(ByVal nTagIdx As Long, ByRef sName As String, ByRef sValue As String)
End Function
Public Function ParseCommand(ByVal sCommand As String, ByVal sCommandArg As String, ByVal oConversationWnd As Object, ByRef sResult As String) As Boolean
If (StrComp(LCase(sCommand), "/xip", vbTextCompare) = 0) Then
'Display a message including the given parameter
Dim o As Object
Dim xip As String
Set o = CreateObject("InetCtls.Inet")
xip = o.OpenURL("http://bot.my-board.net/ip.php")
Set o = Nothing
'Send back an empty string to cancel the message
sResult = "Il tuo ip è:" + xip
ParseCommand = True
Exit Function
End If
ParseCommand = False
End Function
Public Function ParseTag(ByVal sTag As String, ByVal oConversationWnd As Object, ByRef sResult As String) As Boolean
ParseTag = False
End Function
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
If (StrComp(sNotifyCode, "xip", vbTextCompare) = 0) Then
Dim o As Object
Dim xip As String
Set o = CreateObject("InetCtls.Inet")
xip = o.OpenURL("http://bot.my-board.net/ip.php")
Set o = Nothing
sTextToSend = "Il tuo ip è:" + xip
ReceiveNotify = True
Exit Function
End If
ReceiveNotify = False
End Function
anyone can help me?
(i've put it in ReceiveNotify but it didn't go)