changeset 11:22a51e8c0a69

Update copyright date. Remove CVS ID.
author darius@inchoate.localdomain
date Fri, 29 Feb 2008 21:05:14 +1030
parents 0e18c714b69d
children ae9e833e4447
files findplayer.pl scrape-gm.py
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/findplayer.pl	Fri Feb 29 19:19:14 2008 +1030
+++ b/findplayer.pl	Fri Feb 29 21:05:14 2008 +1030
@@ -51,7 +51,7 @@
   my ($target, $text) = split(/ :/, $data, 2);
 
   #print CLIENTCRAP "target = \"$target\"";
-  if (lc($target) ne "#teabf" && lc($target) ne "#tea") {
+  if (lc($target) ne "#teabf" && lc($target) ne "#tea" && lc($target) ne "darius") {
     return;
   }
   #print CLIENTCRAP "target = \"$target\"";
@@ -76,9 +76,13 @@
     }
     $server->command("msg $target Looking for \"$string\" on game-monitor.com...");
     open (SCR, "-|", "/home/doconnor/bin/scrape-gm.py", $string);
+    my $i = 0;
     while (<SCR>) {
       chomp;
       $server->command("msg $target $_");
+      $i++;
+      if ($i > Irssi::settings_get_int('fp_maxlen')) {
+	$server->command("msg $target Too many results, truncating");
     }
     close SCR;
   }
@@ -86,6 +90,7 @@
 
 Irssi::signal_add("event privmsg", "event_privmsg");
 Irssi::settings_add_int('misc', 'fp_mininter', 10);
+Irssi::settings_add_int('misc', 'fp_maxlen', 10);
 
 print CLIENTCRAP "findplayer loaded";
 1;
--- a/scrape-gm.py	Fri Feb 29 19:19:14 2008 +1030
+++ b/scrape-gm.py	Fri Feb 29 21:05:14 2008 +1030
@@ -5,10 +5,9 @@
 #
 # Prints out matched player names agreated by server
 #
-# $Id: scrape-gm.py,v 1.3 2007/11/18 08:54:07 darius Exp $
 ############################################################################
 #
-# Copyright (C) 2007 Daniel O'Connor. All rights reserved.
+# Copyright (C) 2008 Daniel O'Connor. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions