Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
rvictim87 committed Nov 6, 2008
1 parent 81a875b commit 37755fa
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 40 deletions.
5 changes: 4 additions & 1 deletion trunk/clsClanPacketHandler.cls
Expand Up @@ -134,7 +134,10 @@ Public Sub ParseClanPacket(ByVal PacketID As Byte, ByVal Data As String)
RaiseEvent ClanMemberList(ary())


Case SID_REMOVEMEMBER: RaiseEvent RemoveUserReply(inBuf.GetByte)
Case SID_REMOVEMEMBER
inBuf.RemoveDWORD
RaiseEvent RemoveUserReply(inBuf.GetByte)

Case SID_MEMBERLEFT: RaiseEvent MemberLeaves(inBuf.GetNTString)
Case SID_REMOVEDFROMCLAN: RaiseEvent RemovedFromClan(inBuf.DebuffBYTE)

Expand Down
16 changes: 10 additions & 6 deletions trunk/frmChat.frm
Expand Up @@ -2791,7 +2791,7 @@ Private Sub ClanHandler_RemoveUserReply(ByVal result As Byte)
AddChat RTBColors.ErrorMessageText, "[CLAN] You are not authorized to remove that user."

Case 8
AddChat RTBColors.ErrorMessageText, "[CLAN] That user is not in your clan."
AddChat RTBColors.ErrorMessageText, "[CLAN] You are not allowed to remove that user."

Case Else
AddChat RTBColors.InformationText, "[CLAN] 0x78 Response code: 0x" & Hex(result)
Expand All @@ -2810,9 +2810,12 @@ End Sub

Sub Form_Unload(Cancel As Integer)
Dim Key As String, L As Long

'Cancel = 1

'scTimer.Enabled = False
'SControl.Reset

If BotVars.Logging = 0 Then
AddChat RTBColors.ErrorMessageText, "Shutting down..."
End If
Expand Down Expand Up @@ -2841,7 +2844,7 @@ Sub Form_Unload(Cancel As Integer)

Shell_NotifyIcon NIM_DELETE, nid

On Error Resume Next
'On Error Resume Next

SControl.Run "Event_Close"

Expand Down Expand Up @@ -2881,7 +2884,7 @@ Sub Form_Unload(Cancel As Integer)
Call ChatQueue_Terminate

DisableURLDetect
UnhookWindowProc
'UnhookWindowProc
UnhookSendBoxWindowProc

Call SharedScriptSupport.Dispose 'Explicit call the Class_Terminate sub in the ScriptSupportClass to destroy all the forms. - FrOzeN
Expand Down Expand Up @@ -3854,7 +3857,7 @@ Private Sub mnuPopInvite_Click()

If LenB(sPlayer) > 0 Then
If g_Clan.Self.Rank >= 3 Then
InviteToClan (sPlayer)
InviteToClan (reverseUsername(sPlayer))
AddChat RTBColors.InformationText, "[CLAN] Invitation sent to " & GetSelectedUser & ", awaiting reply."
End If
End If
Expand Down Expand Up @@ -4347,8 +4350,9 @@ End Sub

Private Sub mnuTrayExit_click()
If MsgBox("Are you sure you want to quit?", vbYesNo, "StealthBot") = vbYes Then
UnhookWindowProc
'RESTORE FORM
Call NewWindowProc(frmChat.hWnd, 0&, ID_TASKBARICON, WM_LBUTTONDOWN)
'Call NewWindowProc(frmChat.hWnd, 0&, ID_TASKBARICON, WM_LBUTTONDOWN)
'Call Form_Unload(0)
Unload frmChat
End If
Expand Down
24 changes: 12 additions & 12 deletions trunk/frmManageKeys.frm
Expand Up @@ -140,7 +140,7 @@ Private Sub Form_Load()
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
'On Error Resume Next
frmChat.SettingsForm.Show
frmChat.SettingsForm.SetFocus
End Sub
Expand All @@ -154,25 +154,25 @@ Private Sub txtActiveKey_Change()
End Sub

Private Sub Local_WriteCDKeys()
Dim i As Integer
Dim I As Integer

WriteINI "StoredKeys", "Count", lstKeys.ListCount + 1

For i = 0 To NumCDKeysOnOpen
If i <= lstKeys.ListCount Then
If Len(lstKeys.List(i)) > 0 Then
WriteINI "StoredKeys", "Key" & (i + 1), lstKeys.List(i)
For I = 0 To NumCDKeysOnOpen
If I <= lstKeys.ListCount Then
If Len(lstKeys.List(I)) > 0 Then
WriteINI "StoredKeys", "Key" & (I + 1), lstKeys.List(I)
Else
WriteINI "StoredKeys", "Key" & (i + 1), ""
WriteINI "StoredKeys", "Key" & (I + 1), ""
End If
Else
WriteINI "StoredKeys", "Key" & (i + 1), ""
WriteINI "StoredKeys", "Key" & (I + 1), ""
End If
Next i
Next I

If i < lstKeys.ListCount Then
If Len(lstKeys.List(i)) > 0 Then
WriteINI "StoredKeys", "Key" & (i + 1), lstKeys.List(i)
If I < lstKeys.ListCount Then
If Len(lstKeys.List(I)) > 0 Then
WriteINI "StoredKeys", "Key" & (I + 1), lstKeys.List(I)
End If
End If
End Sub
Expand Down
4 changes: 1 addition & 3 deletions trunk/frmScriptUI.frm
@@ -1,5 +1,5 @@
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "msinet.ocx"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "richtx32.ocx"
Begin VB.Form frmScriptUI
Expand Down Expand Up @@ -469,8 +469,6 @@ Private Sub Form_Terminate()
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next

frmChat.SControl.Run GetCallBack(vbNullString, 0, "Unload"), Cancel
frmChat.SControl.ExecuteStatement "Call DestroyForm(" & Chr(&H22) & strPrefix & Chr(&H22) & ", " & Chr(&H22) & strFormName & Chr(&H22) & ")"
End Sub
Expand Down
22 changes: 12 additions & 10 deletions trunk/modScripting.bas
Expand Up @@ -65,6 +65,8 @@ Public Sub LoadPluginSystem(ByRef SC As ScriptControl)
SC.AddObject "scINet", frmChat.INet
SC.AddObject "BotVars", BotVars

'Exit Sub

If Not boolOverride Then

'// Load PluginSystem.dat
Expand All @@ -80,7 +82,7 @@ Public Sub LoadPluginSystem(ByRef SC As ScriptControl)
SC.AddCode strContent
Else

Dim strFilesToLoad() As String, i As Integer
Dim strFilesToLoad() As String, I As Integer
ReDim strFilesToLoad(0)
strFilesToLoad(0) = "script.txt"

Expand All @@ -106,10 +108,10 @@ Public Sub LoadPluginSystem(ByRef SC As ScriptControl)
Close #intFile

'// Load script.txt and any includes
For i = 0 To UBound(strFilesToLoad)
For I = 0 To UBound(strFilesToLoad)
strContent = ""
intFile = FreeFile
Path = GetFilePath(strFilesToLoad(i))
Path = GetFilePath(strFilesToLoad(I))

Open Path For Input As #intFile

Expand All @@ -118,7 +120,7 @@ Public Sub LoadPluginSystem(ByRef SC As ScriptControl)
Line Input #intFile, strLine

If Len(strLine) > 1 Then
If i = 0 Then
If I = 0 Then
If Left$(Trim(LCase(strLine)), 8) = "#include" Then strLine = ""
End If
strContent = strContent & strLine & vbCrLf
Expand All @@ -141,8 +143,8 @@ LoadPluginSystem_Error:
End Sub


Public Sub SetVeto(ByVal b As Boolean)
VetoNextMessage = b
Public Sub SetVeto(ByVal B As Boolean)
VetoNextMessage = B
End Sub


Expand All @@ -153,7 +155,7 @@ End Function


Public Sub ReInitScriptControl(ByRef SC As ScriptControl)
Dim i As Integer
Dim I As Integer
Dim Message As String

On Error GoTo ReInitScriptControl_Error
Expand All @@ -166,15 +168,15 @@ Public Sub ReInitScriptControl(ByRef SC As ScriptControl)
SC.Run "Event_ChannelJoin", g_Channel.Name, g_Channel.Flags

If g_Channel.Users.Count > 0 Then
For i = 1 To g_Channel.Users.Count
For I = 1 To g_Channel.Users.Count
Message = ""

With g_Channel.Users(i)
With g_Channel.Users(I)
ParseStatstring .Statstring, Message, .Clan

SC.Run "Event_UserInChannel", .DisplayName, .Flags, Message, .Ping, .game, False
End With
Next i
Next I
End If
End If

Expand Down
16 changes: 8 additions & 8 deletions trunk/modSubclassing.bas
Expand Up @@ -46,7 +46,7 @@ Public Sub UnhookSendBoxWindowProc()
End If
End Sub

Public Function NewWindowProc(ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Function NewWindowProc(ByVal hWnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
On Error GoTo ERROR_HANDLER

Dim Rezult As Long
Expand All @@ -56,7 +56,7 @@ Public Function NewWindowProc(ByVal hWnd As Long, ByVal Msg As Long, ByVal wPara
Dim sText As String
Dim lLen As Long

If Msg = TASKBARCREATED_MSGID Then
If msg = TASKBARCREATED_MSGID Then
Shell_NotifyIcon NIM_ADD, nid
End If

Expand All @@ -72,14 +72,14 @@ Public Function NewWindowProc(ByVal hWnd As Long, ByVal Msg As Long, ByVal wPara
End Select
End If

If Msg = WM_NOTIFY Then
If msg = WM_NOTIFY Then
CopyMemory uHead, ByVal lParam, Len(uHead)

If (uHead.hWndFrom = hWndRTB) And (uHead.code = EN_LINK) Then
CopyMemory eLink, ByVal lParam, Len(eLink)

With eLink
If .Msg = WM_LBUTTONDBLCLK Then
If .msg = WM_LBUTTONDBLCLK Then
eText.chrg.cpMin = .chrg.cpMin
eText.chrg.cpMax = .chrg.cpMax
eText.lpstrText = Space$(1024)
Expand All @@ -91,13 +91,13 @@ Public Function NewWindowProc(ByVal hWnd As Long, ByVal Msg As Long, ByVal wPara
End If
End With
End If
ElseIf Msg = WM_COMMAND Then
ElseIf msg = WM_COMMAND Then
If lParam = 0 Then
Call ProcessMenu(hWnd, wParam)
End If
End If

NewWindowProc = CallWindowProc(OldWindowProc, hWndSet, Msg, wParam, lParam)
NewWindowProc = CallWindowProc(OldWindowProc, hWndSet, msg, wParam, lParam)

Exit Function

Expand All @@ -107,10 +107,10 @@ ERROR_HANDLER:
Exit Function
End Function

Public Function NewSendBoxWindowProc(ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Function NewSendBoxWindowProc(ByVal hWnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Const WM_ACTIVATE As Long = 6

NewSendBoxWindowProc = CallWindowProc(SendBox_OldWindowProc, SendBox_hWndSet, Msg, wParam, lParam)
NewSendBoxWindowProc = CallWindowProc(SendBox_OldWindowProc, SendBox_hWndSet, msg, wParam, lParam)
End Function

Public Sub SetTransparency()
Expand Down

0 comments on commit 37755fa

Please sign in to comment.