Skip to content

Commit

Permalink
Hotfix logica de reconocimiento parrafo
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioFinale committed Feb 18, 2018
1 parent 97fd7c3 commit 5d2b5dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 7 additions & 5 deletions Bot.vb
Expand Up @@ -595,17 +595,19 @@ Namespace WikiBot
Dim signpattern As String = "([0-9]{2}):([0-9]{2}) ([0-9]{2}|[0-9]) ([Z-z]{3}) [0-9]{4} \(UTC\)"
Dim matchc As MatchCollection = Regex.Matches(lastparagraph, signpattern)

If matchc.Count = 0 Then
If matchc.Count = 0 And Not (((lastparagraph(0) = ";"c) Or (lastparagraph(0) = ":"c) Or (lastparagraph(0) = "*"c) Or (lastparagraph(0) = "#"c))) Then
Dim mlines As MatchCollection = Regex.Matches(text, ".+\n")
For i As Integer = mlines.Count - 1 To 0 Step -1

If i = (mlines.Count - 1) Then
If Regex.Match(mlines(i).Value, signpattern).Success Then
lastparagraph = mlines(i).Value
Exit For
If Not (mlines(i).Value(0) = ";"c) Or (mlines(i).Value(0) = ":"c) Or (mlines(i).Value(0) = "*"c) Or (mlines(i).Value(0) = "#"c) Then
If Regex.Match(mlines(i).Value, signpattern).Success Then
lastparagraph = mlines(i).Value
Exit For
End If
End If
Else
If Not (mlines(i).Value(0) = ";"c) Or (mlines(i).Value(0) = ":"c) Then
If Not (mlines(i).Value(0) = ";"c) Or (mlines(i).Value(0) = ":"c) Or (mlines(i).Value(0) = "*"c) Or (mlines(i).Value(0) = "#"c) Then
If Regex.Match(mlines(i).Value, signpattern).Success Then
lastparagraph = mlines(i).Value
Exit For
Expand Down
1 change: 0 additions & 1 deletion MainModule.vb
Expand Up @@ -39,7 +39,6 @@ Module MainModule
ArchiveAllTask.Run()



Do
Dim command As String = Console.ReadLine()
If Not String.IsNullOrWhiteSpace(command) Then
Expand Down

0 comments on commit 5d2b5dc

Please sign in to comment.