Index: trunk/tools/wmib/Infobot.cs |
— | — | @@ -351,10 +351,12 @@ |
352 | 352 | { |
353 | 353 | Regex value = new Regex(search_key, RegexOptions.Compiled); |
354 | 354 | string results = ""; |
| 355 | + int count = 0; |
355 | 356 | foreach (item data in text) |
356 | 357 | { |
357 | 358 | if (data.key == search_key || value.Match(data.text).Success) |
358 | 359 | { |
| 360 | + count++; |
359 | 361 | results = results + data.key + ", "; |
360 | 362 | } |
361 | 363 | } |
— | — | @@ -364,7 +366,7 @@ |
365 | 367 | } |
366 | 368 | else |
367 | 369 | { |
368 | | - irc.SlowQueue.DeliverMessage("Results: " + results, Channel); |
| 370 | + irc.SlowQueue.DeliverMessage("Results (found " + count.ToString() + "): " + results, Channel); |
369 | 371 | } |
370 | 372 | running = false; |
371 | 373 | } |
— | — | @@ -421,12 +423,14 @@ |
422 | 424 | return; |
423 | 425 | } |
424 | 426 | key = key.Substring(8); |
| 427 | + int count = 0; |
425 | 428 | string results = ""; |
426 | 429 | foreach (item data in text) |
427 | 430 | { |
428 | 431 | if (data.key == key || data.text.Contains(key)) |
429 | 432 | { |
430 | 433 | results = results + data.key + ", "; |
| 434 | + count++; |
431 | 435 | } |
432 | 436 | } |
433 | 437 | if (results == "") |
— | — | @@ -435,7 +439,7 @@ |
436 | 440 | } |
437 | 441 | else |
438 | 442 | { |
439 | | - irc.SlowQueue.DeliverMessage("Results: " + results, Chan.name); |
| 443 | + irc.SlowQueue.DeliverMessage("Results (found " + count.ToString() + "): " + results, Chan.name); |
440 | 444 | } |
441 | 445 | } |
442 | 446 | |