titlebar.gif (10031 bytes)toolbar.gif (3802 bytes)box.gif (3888 bytes)

'*************************************************************************************************
'* This source code is the work of Chris Miles and is an active part of Xirc and my purpose of
'* posting it is to help out other people developing an IRC client!
'*************************************************************************************************
'* use this code for sending a version request when clicking a item on a popup menu on the  
‘* nickname list , the item on th popmenu is called "versionnick" , "Incoming" is the name of
'* the richtext box , "namelist" is the nicknamelist (a list box)
'* >>>>>>> The code will get the correct name from a name such as "@Chris" <- which means the
'* user is an operator and it will strip it down to "Chris" so it can be sent to the server
'* the same happens if the name is 'voiced' .. it has a "+" in front like "+Chris"
'*******************************************************************************************


Private Sub versionnick_Click()
If Winsock1.state = sckOpen Then
Incoming.SelColor = RGB(0, 0, 238)
AddText ("***** You are not connected to a server yet ******")
Incoming.SelColor = "0"
Else
umark = InStr(NameList.Text, "@"): If umark = 1
Then opnick = Mid(NameList.Text, 2)
vmark = InStr(NameList.Text, "+"): If vmark = 1
Then voicenick = Mid(NameList.Text, 2)
For A = 0 To NameList.ListCount - 1
If NameList.List(A) = "@" & opnick Then
SendData "PRIVMSG " & opnick & " " & Chr$(1) & "VERSION" & Chr$(1)
Incoming.SelColor = RGB(0, 128, 0)
AddText ("Version request sent to " & opnick)
Incoming.SelColor = "0"
Exit Sub
End If
If
NameList.List(A) = "+" & voicenick Then
SendData "PRIVMSG " & voicenick & " " & Chr$(1) & "VERSION" & Chr$(1)
Incoming.SelColor = RGB(0, 128, 0)
AddText ("Version request sent to " & voicenick)
Incoming.SelColor = "0"
Exit Sub
End If
If
NameList.List(A) = NameList.Text Then
SendData "PRIVMSG " & NameList.Text & " " & Chr$(1) & "VERSION" & Chr$(1)
Incoming.SelColor = RGB(0, 128, 0)
AddText ("Version request sent to " & NameList.Text)
Incoming.SelColor = "0"
Exit Sub
End If
Next
A
End If
End Sub

This site is maintained by Chris Miles [email protected] all work is copyright 1999 Chris Miles Visual Software

This site was last updated on
This page was written in HTML and