Skip to content

Commit

Permalink
Merge branch 'master' of github.com:stealthbot/StealthBot
Browse files Browse the repository at this point in the history
  • Loading branch information
nmbook committed Apr 30, 2016
2 parents 75c513d + 00f34b4 commit da42525
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 112 deletions.
9 changes: 0 additions & 9 deletions trunk/clsUserEventObj.cls
Expand Up @@ -21,7 +21,6 @@ Private m_gtc As Long
Private m_ping As Long
Private m_flags As Long
Private m_message As String
Private m_stats As clsUserStats
Private m_clan As String
Private m_game_id As String
Private m_icon_code As String
Expand All @@ -30,12 +29,6 @@ Private m_displayed As Boolean

Private Sub Class_Initialize()
EventTick = GetTickCount()

Set m_stats = New clsUserStats
End Sub

Private Sub Class_Terminate()
Set m_stats = Nothing
End Sub

Public Property Get EventID() As Long
Expand Down Expand Up @@ -101,8 +94,6 @@ End Property

Public Property Let Statstring(ByVal str As String)
m_stat_string = str

m_stats.Statstring = str
End Property

Public Property Get IconCode() As String
Expand Down
25 changes: 6 additions & 19 deletions trunk/clsUserObj.cls
Expand Up @@ -26,7 +26,7 @@ Private m_clan_rank As Integer
Private m_join_date As Date
Private m_last_speak_date As Date
Private m_stats_string As String
Private m_game As String
Private m_Game As String
Private m_total_bans As Long
Private m_total_kicks As Long
Private m_operator_date As Date
Expand Down Expand Up @@ -67,11 +67,7 @@ Public Property Let CharacterName(ByVal str As String)
End Property

Public Property Get Game() As String
Game = m_game
End Property

Public Property Let Game(ByVal str As String)
m_game = str
Game = m_stats.Game
End Property

Public Property Get PendingBan() As Boolean
Expand Down Expand Up @@ -101,11 +97,7 @@ Public Property Let Statstring(ByVal str As String)
End Property

Public Property Get Clan() As String
Clan = m_clan
End Property

Public Property Let Clan(ByVal str As String)
m_clan = str
Clan = m_stats.Clan
End Property

Public Property Get DisplayName() As String
Expand Down Expand Up @@ -232,12 +224,10 @@ Public Sub DisplayQueue()

Select Case (CurrentEvent.EventID)
Case ID_USER
Call Event_UserInChannel(Name, CurrentEvent.Flags, CurrentEvent.Statstring, CurrentEvent.Ping, _
CurrentEvent.GameID, CurrentEvent.Clan, CurrentEvent.Statstring, CurrentEvent.IconCode, j)
Call Event_UserInChannel(Name, CurrentEvent.Flags, CurrentEvent.Statstring, CurrentEvent.Ping, j)

Case ID_JOIN
Call Event_UserJoins(Name, CurrentEvent.Flags, CurrentEvent.Statstring, CurrentEvent.Ping, _
CurrentEvent.GameID, CurrentEvent.Clan, CurrentEvent.Statstring, CurrentEvent.IconCode, j)
Call Event_UserJoins(Name, CurrentEvent.Flags, CurrentEvent.Statstring, CurrentEvent.Ping, j)

Case ID_TALK
Call Event_UserTalk(Name, CurrentEvent.Flags, CurrentEvent.Message, CurrentEvent.Ping, j)
Expand All @@ -246,8 +236,7 @@ Public Sub DisplayQueue()
Call Event_UserEmote(Name, CurrentEvent.Flags, CurrentEvent.Message, j)

Case ID_USERFLAGS
Call Event_FlagsUpdate(Name, CurrentEvent.Statstring, CurrentEvent.Flags, CurrentEvent.Ping, _
CurrentEvent.GameID, j)
Call Event_FlagsUpdate(Name, CurrentEvent.Flags, CurrentEvent.Statstring, CurrentEvent.Ping, j)
End Select
Next j

Expand All @@ -270,9 +259,7 @@ Public Function Clone() As Object
Clone.Name = Name
Clone.Ping = Ping
Clone.Flags = Flags
Clone.Clan = Clan
Clone.CharacterName = CharacterName
Clone.Game = Game
Clone.JoinTime = JoinTime
Clone.LastTalkTime = LastTalkTime
Clone.PassedChannelAuth = PassedChannelAuth
Expand Down
25 changes: 15 additions & 10 deletions trunk/frmChat.frm
Expand Up @@ -4515,6 +4515,11 @@ Private Sub mnuDisableVoidView_Click()
mnuDisableVoidView.Checked = Not (mnuDisableVoidView.Checked)
Config.VoidView = Not CBool(mnuDisableVoidView.Checked)
Call Config.Save

If Config.VoidView And g_Channel.IsSilent Then
tmrSilentChannel(1).Enabled = Config.VoidView
AddQ "/unignore " & GetCurrentUsername
End If
End Sub

Private Sub mnuDisconnect2_Click()
Expand Down Expand Up @@ -5459,38 +5464,38 @@ Private Sub cboSend_KeyDown(KeyCode As Integer, Shift As Integer)
Case KEY_SPACE
With cboSend
If (LenB(LastWhisper) > 0) Then
If (Len(.Text) >= 3) Then
If StrComp(Left$(.Text, 3), "/r ", vbTextCompare) = 0 Then
If (Len(.Text) >= 2) Then
If StrComp(Left$(.Text, 2), "/r", vbTextCompare) = 0 Then
.selStart = 0
.selLength = Len(.Text)
.SelText = _
"/w " & CleanUsername(LastWhisper, True) & " "
"/w " & CleanUsername(LastWhisper, True)
.selStart = Len(.Text)
End If
End If

If (Len(.Text) >= 7) Then
If StrComp(Left$(.Text, 7), "/reply ", vbTextCompare) = 0 Then
If (Len(.Text) >= 6) Then
If StrComp(Left$(.Text, 6), "/reply", vbTextCompare) = 0 Then
.selStart = 0
.selLength = Len(.Text)
.SelText = _
"/w " & CleanUsername(LastWhisper, True) & " "
"/w " & CleanUsername(LastWhisper, True)
.selStart = Len(.Text)
End If
End If
End If

If (LenB(LastWhisperTo) > 0) Then
If (Len(.Text) >= 4) Then
If StrComp(Left$(.Text, 4), "/rw ", vbTextCompare) = 0 Then
If (Len(.Text) >= 3) Then
If StrComp(Left$(.Text, 3), "/rw", vbTextCompare) = 0 Then
.selStart = 0
.selLength = Len(.Text)

If StrComp(LastWhisperTo, "%f%") = 0 Then
.SelText = "/f m "
.SelText = "/f m"
Else
.SelText = _
"/w " & CleanUsername(LastWhisperTo, True) & " "
"/w " & CleanUsername(LastWhisperTo, True)
End If

.selStart = Len(.Text)
Expand Down
26 changes: 6 additions & 20 deletions trunk/modBNCS.bas
Expand Up @@ -524,37 +524,23 @@ On Error GoTo ERROR_HANDLER:
EventID = pBuff.GetDWORD
lFlags = pBuff.GetDWORD
lPing = pBuff.GetDWORD
pBuff.GetDWORD 'IP Address
pBuff.GetDWORD 'Account Number
pBuff.GetDWORD 'Reg Auth
pBuff.GetDWORD 'IP Address
pBuff.GetDWORD 'Account Number
pBuff.GetDWORD 'Reg Auth
sUsername = pBuff.GetString
sText = pBuff.GetString


If (LenB(sText) > 0) Then
Dim cUserStats As New clsUserStats
With cUserStats
.Statstring = sText
sProduct = .Game
sParsed = .ToString
sClanTag = .Clan
End With
Set cUserStats = Nothing
End If

If sProduct = PRODUCT_WAR3 Or sProduct = PRODUCT_W3XP Then
If Len(sText) > 4 Then sW3Icon = StrReverse(Mid$(sText, 6, 4))
End If

Select Case EventID
Case ID_JOIN: Call Event_UserJoins(sUsername, lFlags, sParsed, lPing, sProduct, sClanTag, sText, sW3Icon)
Case ID_JOIN: Call Event_UserJoins(sUsername, lFlags, sText, lPing)
Case ID_LEAVE: Call Event_UserLeaves(sUsername, lFlags)
Case ID_USER: Call Event_UserInChannel(sUsername, lFlags, sParsed, lPing, sProduct, sClanTag, sText, sW3Icon)
Case ID_USER: Call Event_UserInChannel(sUsername, lFlags, sText, lPing)
Case ID_WHISPER: Call Event_WhisperFromUser(sUsername, lFlags, sText, lPing)
Case ID_TALK: Call Event_UserTalk(sUsername, lFlags, sText, lPing)
Case ID_BROADCAST: Call Event_ServerInfo(sUsername, StringFormat("BROADCAST from {0}: {1}", sUsername, sText))
Case ID_CHANNEL: Call Event_JoinedChannel(sText, lFlags)
Case ID_USERFLAGS: Call Event_FlagsUpdate(sUsername, sText, lFlags, lPing, sProduct)
Case ID_USERFLAGS: Call Event_FlagsUpdate(sUsername, lFlags, sText, lPing)
Case ID_WHISPERSENT: Call Event_WhisperToUser(sUsername, lFlags, sText, lPing)
Case ID_CHANNELFULL, ID_CHANNELDOESNOTEXIST, ID_CHANNELRESTRICTED: Call Event_ChannelJoinError(EventID, sText)
Case ID_INFO: Call Event_ServerInfo(sUsername, sText)
Expand Down

1 comment on commit da42525

@Davnit
Copy link
Member

@Davnit Davnit commented on da42525 Apr 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one.

Please sign in to comment.