We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13e56b1 commit 9c8bfb7Copy full SHA for 9c8bfb7
tool/tool.go
@@ -374,16 +374,18 @@ func createTopList() error {
374
continue
375
}
376
377
- endofdate := bytes.Index(line, []byte("UTC] ")) + 5
378
- if len(line) <= endofdate {
+ endofdate := bytes.Index(line, []byte("UTC] "))
+ if len(line) <= endofdate || endofdate < 6 {
379
380
381
+ endofdate += 5
382
endofnick := bytes.Index(line[endofdate:], []byte(":"))
383
+ if endofnick == -1 {
384
+ continue
385
+ }
386
387
nick := line[endofdate : endofnick+endofdate]
- if err != nil {
- fmt.Println(err)
- }
388
+
389
390
if _, ok := toplist[string(nick)]; !ok {
391
toplist[string(nick)] = &user{
0 commit comments