<commit_before>addPlug("Caaz_Utilities", {
  'creator' => 'Caaz',
  'version' => '1',
  'name' => 'Misc utilities',
  'dependencies' => ['Core_Utilities'],
  'modules' => ['HTML::Entities', 'LWP::Simple'],
  'utilities' => {
    'randName' => sub {
      my $url = 'http://www.behindthename.com/random/random.php?';
      if($_[0]) {
        lkDebug('Using Params');
        my @params;
        foreach(keys %{$_[0]}){ push(@params,"$_=$_[0]{$_}"); }
        $url .= join '&', @params;
      }
      else { lkDebug("Using default."); $url .= 'number=1&gender=both&surname=&all=no&usage_eng=1'; }
      lkDebug($url);
      if(get($url) =~ /\<span class=\"heavyhuge\"\>(.+?)\<\/span\>/is) {
        my $capture = $1;
        my @name;
        while($capture =~ /\<a class=\"plain\".+?\>(.+?)\<\/a\>/g) { push(@name, $1); }
        return decode_entities(join " ", @name);
      }
      return 'NONAME';
    },
    'pluralize' => sub {
      # Input: Word, count.
      my $word = $_[0];
      if((!$_[1]) || ($_[1] >= 2)) {
        if($word =~ /y$/) { $word =~ s/y$/ies/; }
        elsif($word =~ /s$/) { return $word; }
        else { $word .= 's'; }
      }
      return $word;
    },
  },
  'code' => {
    'irc' => sub {
      my %irc = %{$_[0]};
      if($irc{msg}[1] =~ /^invite$/i) {
        push(@{$lk{data}{networks}[$lk{tmp}{connection}{fileno($irc{irc})}]{autojoin}}, $irc{msg}[3]);
        lkRaw($irc{irc},"JOIN $irc{msg}[3]");
        &{$utility{'Fancify_say'}}($irc{irc}, $irc{msg}[3], "[Invited by \x04$irc{msg}[0]\x04] This channel is added to >>autojoin. If you ever wish to remove me, simply kick me and I won't be coming back. To see command listing, check out >>help. Command prefix is \x04$lk{data}{prefix}\x04 Better learn regex.");
        #&{$utility{'Fancify_say'}}($irc{irc}, (split /\!|\@/, $irc{msg}[0])[0], "Memo Caaz if you want me in $irc{msg}[3].");
      }
      #Rizon:Caaz!<EMAIL>:KICK:#TheFusion:Caaz:God dammit
      elsif($irc{msg}[1] =~ /^kick$/i) {
        if($irc{msg}[3] =~ /^$lk{data}{networks}[$lk{tmp}{connection}{fileno($irc{irc})}]{nickname}$/i) {
          @{$lk{data}{networks}[$lk{tmp}{connection}{fileno($irc{irc})}]{autojoin}} = grep(!/^$irc{msg}[2]$/i, @{$lk{data}{networks}[$lk{tmp}{connection}{fileno($irc{irc})}]{autojoin}});
        }
      }
    }
  }
});
addPlug("Poll", {
  'name' => "Poll",<commit_msg>THINGS.<commit_after>addPlug("Caaz_Utilities", {
  'creator' => 'Caaz',
  'version' => '1',
  'name' => 'Misc utilities',
  'dependencies' => ['Core_Utilities'],
  'modules' => ['HTML::Entities', 'LWP::Simple'],
  'utilities' => {
    'randName' => sub {
      my $url = 'http://www.behindthename.com/random/random.php?';
      if($_[0]) {
        lkDebug('Using Params');
        my @params;
        foreach(keys %{$_[0]}){ push(@params,"$_=$_[0]{$_}"); }
        $url .= join '&', @params;
      }
      else { lkDebug("Using default."); $url .= 'number=1&gender=both&surname=&all=no&usage_eng=1'; }
      lkDebug($url);
      if(get($url) =~ /\<span class=\"heavyhuge\"\>(.+?)\<\/span\>/is) {
        my $capture = $1;
        my @name;
        while($capture =~ /\<a class=\"plain\".+?\>(.+?)\<\/a\>/g) { push(@name, $1); }
        return decode_entities(join " ", @name);
      }
      return 'NONAME';
    },
    'pluralize' => sub {
      # Input: Word, count.
      my $word = $_[0];
      if((!$_[1]) || ($_[1] >= 2)) {
        if($word =~ /y$/) { $word =~ s/y$/ies/; }
        elsif($word =~ /s$/) { return $word; }
        else { $word .= 's'; }
      }
      return $word;
    },
  },
  'code' => {
    'irc' => sub {
      my %irc = %{$_[0]};
      if($irc{msg}[1] =~ /^invite$/i) {
        push(@{$lk{data}{networks}[$lk{tmp}{connection}{fileno($irc{irc})}]{autojoin}}, $irc{msg}[3]);
        sleep(2);
        lkRaw($irc{irc},"JOIN $irc{msg}[3]");
        &{$utility{'Fancify_say'}}($irc{irc}, $irc{msg}[3], "[Invited by \x04$irc{msg}[0]\x04] This channel is added to >>autojoin. If you ever wish to remove me, simply kick me and I won't be coming back. To see command listing, check out >>help. Command prefix is \x04$lk{data}{prefix}\x04 Better learn regex.");
        #&{$utility{'Fancify_say'}}($irc{irc}, (split /\!|\@/, $irc{msg}[0])[0], "Memo Caaz if you want me in $irc{msg}[3].");
      }
      #Rizon:Caaz!Caaz@I.am.Caazy.you.see:KICK:#TheFusion:Caaz:God dammit
      elsif($irc{msg}[1] =~ /^kick$/i) {
        if($irc{msg}[3] =~ /^$lk{data}{networks}[$lk{tmp}{connection}{fileno($irc{irc})}]{nickname}$/i) {
          @{$lk{data}{networks}[$lk{tmp}{connection}{fileno($irc{irc})}]{autojoin}} = grep(!/^$irc{msg}[2]$/i, @{$lk{data}{networks}[$lk{tmp}{connection}{fileno($irc{irc})}]{autojoin}});
        }
      }
    }
  }
});
addPlug("Poll", {
  'name' => "Poll",
{'fraction_non_alphanumeric': 0.26746632996632996, 'fraction_numerical': 0.013678451178451179, 'mean_word_length': 2.9774058577405857, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1148464', 'n_tokens_mistral': 1968, 'n_tokens_neox': 1843, 'n_words': 308}