Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4.  
  5. IRC::register("hump", "1.0", "", "");
  6. IRC::add_command_handler("hump", "hump");
  7. Xchat::print("hump.pl loaded.");
  8.  
  9. sub hump {
  10.     my $c;
  11.     my $s = shift;
  12.  
  13.     # Open the file, read the count, and print it.
  14.     open MYFILE, "C:/Program Files (x86)/X-Chat 2/count.txt" or die $!;
  15.     while (<MYFILE>) {
  16.         chomp;
  17.         $c = $_;
  18.         IRC::command("/me humps $s (Count: $c)");
  19.     }
  20.     close (MYFILE);
  21.  
  22.     # Overwrite the new count into the file.
  23.     open MYFILE, ">C:/Program Files (x86)/X-Chat 2/count.txt" or die $!;
  24.     $c += 1;
  25.     print MYFILE "$c\n";
  26.     close (MYFILE);
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top