- Portals
- The Current Year
- ED in the News
- Admins
- Help ED Rebuild
- Archive
- ED Bookmarklet
- Donate Bitcoin
Contact an admin on Discord or EDF if you want an account. Also fuck bots.
User:Meepsheep/ed irc.pl
From Encyclopedia Dramatica
Jump to navigationJump to search
#!/usr/bin/perl
use strict;
use warnings;
use Net::Twitter::Lite;
my $msg = 'LOLDONGS';
my $file = 'ta.txt';
open ACCOUNTS, $file or die "Could not open $file: $!\n";
my @accounts = <ACCOUNTS>;
my $lines = scalar(@accounts);
close ACCOUNTS;
for(my $i = 0 ;$i < $lines; $i++) {
fork(); {
if(my $pid = fork){ }
elsif(defined $pid) {
while (1) {
open ACCOUNTS, $file or die "Could not open $file: $!\n";
my @accounts = <ACCOUNTS>;
my $account = $accounts[rand @accounts];
chomp($account);
close ACCOUNTS;
my($poop1, $poop2, $poop3, $poop4) = split(/:/, $account);
my $numb = int(rand(999));
my $nt = Net::Twitter::Lite->new(
consumer_key => $poop1,
consumer_secret => $poop2,
access_token => $poop3,
access_token_secret => $poop4,
);
$nt->update('@ED_IRC '.$msg.' '.$numb);
}
}
}
}