changeset 33:a077996a8136

Update copyright
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 08 Jan 2014 12:33:06 -0500
parents eeb2013a82b6
children c2e67df94367
files teh-lol.pl
diffstat 1 files changed, 7 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/teh-lol.pl
+++ b/teh-lol.pl
@@ -1,4 +1,4 @@
-#Copyright © 2009 - 2013 Jordi Gutiérrez Hermoso <jordigh@octave.org>
+#Copyright © 2009 - 2014 Jordi Gutiérrez Hermoso <jordigh@octave.org>
 #
 #teh-lol.pl is free software: you can redistribute it and/or modify
 #it under the terms of the GNU General Public License as published by
@@ -38,26 +38,16 @@
   return Xchat::EAT_NONE;
 }
 
-my @no_lol_list = populate_list_from_file("no.lol");
-
-# Some chatters just lol way too often, we can catch them early.
-my @inb4_list = populate_list_from_file("inb4.lol");
-
-sub populate_list_from_file{
-  my ($file) = @_;
+my @no_lol_list;
 
-  my @word_list;
-  if (open FILE, $ENV{"HOME"}."/.xchat2/$file") {
-    while (<FILE>) {
-      chomp;
-      push @word_list, $_;
-    }
-    close(FILE);
+if (open FILE, $ENV{"HOME"}."/.xchat2/no-lol") {
+  while (<FILE>) {
+    chomp;
+    push @no_lol_list, $_;
   }
-  return @word_list;
+  close(FILE);
 }
 
-
 sub check_lol {
   my @xchat_args = @{$_[0]};
   my $chatter = $xchat_args[0];
@@ -69,8 +59,6 @@
   ## Chatter name without possible colour codes
   $chatter = Xchat::strip_code($chatter);
 
-
-
   ## Match stuff like "lol", "loool" and "lololol". Also mimic
   ## punctuation.
 
@@ -144,13 +132,6 @@
     }
     $timestamp{$chan} = time;
   }
-  else {
-    ## Some chatters just deserve to be mimicked frequently and early
-    if (grep(/$chatter/, @inb4_list)){
-      Xchat::command("say inb4 lol");
-      return Xchat::EAT_NONE;
-    }
-  }
   return Xchat::EAT_NONE;
 }