Skip to content

Commit

Permalink
Resolve Issue #9: Filter repetitive messages
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbennett committed Sep 26, 2015
1 parent 014c031 commit e2ae40c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Binary file modified .BNRBot.rbuistate
Binary file not shown.
6 changes: 6 additions & 0 deletions Modules/Packets.rbbas
Original file line number Diff line number Diff line change
Expand Up @@ -1247,11 +1247,14 @@ Protected Module Packets
// If bTmp = True then they are talking at most 0.4 seconds after entering.

If dTmp <> Nil Then
If Sock.Config.SpamPrevention = True And Text = dTmp.Value("LastMessage") Then bTmp = True
dTmp.Value("LastMessageTime") = Microseconds()
dTmp.Value("LastMessageType") = EventID
dTmp.Value("LastMessage") = Text
End If

// If bTmp = True now then they may also be repeating their message.

If BitAnd(Flags, &H20) <= 0 And bTmp = False Then
If BitAnd(Flags, &H09) > 0 Then
colorA = Colors.Teal
Expand Down Expand Up @@ -1375,11 +1378,14 @@ Protected Module Packets
// If bTmp = True then they are talking at most 0.4 seconds after entering.

If dTmp <> Nil Then
If Sock.Config.SpamPrevention = True And Text = dTmp.Value("LastMessage") Then bTmp = True
dTmp.Value("LastMessageTime") = Microseconds()
dTmp.Value("LastMessageType") = EventID
dTmp.Value("LastMessage") = Text
End If

// If bTmp = True now then they may also be repeating their message.

If BitAnd(Flags, &H20) <= 0 And bTmp = False Then
If BitAnd(Flags, &H09) > 0 Then
colorA = Colors.Teal
Expand Down

0 comments on commit e2ae40c

Please sign in to comment.