Find all our projects in development below.
All source code is GNU General Public License (GPL)
Browsing MainMod.bas (969 B)
Attribute VB_Name = "MainMod"
Private Const WM_CUT = &H300
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const KEY_F5 = 116
Public Const RegAppRoot = "Software\Player Search\Quake 3 Arena\"
Public ExecutablePath As String
Function StripQ3Colors(ByVal PlayerName As String) As String
Dim i As Long
Dim TmpChr As String
i = InStr(PlayerName, "^")
Do While i <> 0
TmpChr = Mid(PlayerName, i + 1, 1)
If TmpChr <> "^" Then
PlayerName = Left(PlayerName, i - 1) + Mid(PlayerName, i + 2)
i = InStr(i, PlayerName, "^")
Else
i = InStr(i + 1, PlayerName, "^")
End If
If i = Len(PlayerName) Then Exit Do
Loop
StripQ3Colors = PlayerName
End Function
Public Sub ClipboardCut(hWnd As Long)
SendMessage hWnd, WM_CUT, 0&, 0&
End Sub