Advertisement
swarley

epenis

Dec 22nd, 2011
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.18 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use Win32;
  5. use Win32::OLE;
  6. use Win32::API;
  7.  
  8. my $version="1.0";
  9. Xchat::register("WinCMD", $version, "Some Commands and controls for Windows");
  10.  
  11. Xchat::print("\n\n\00312Command Set Loaded, type /win32 to view a list of commands\003\n");
  12.    
  13. Xchat::hook_command('win32','sub_cmdlist');
  14.  
  15. Xchat::hook_command('winup','sub_uptime');
  16.  
  17. sub sub_cmdlist{
  18.    Xchat::print("Coming Soon");
  19.    return Xchat::EAT_ALL;
  20. }
  21.  
  22. sub sub_uptime{
  23.   my $GetTicks;
  24.   my $ticks;
  25.   my $h;
  26.   my $s;
  27.   my $m;
  28.   my $inch;
  29.   my $cm;
  30.   my $os = Win32::GetOSName;
  31.   my @osv = Win32::GetOSVersion;
  32.  
  33.   $GetTicks = new Win32::API("kernel32", "GetTickCount", '', 'N');
  34.   $ticks = $GetTicks->Call();
  35.   $ticks /= 1000;
  36.  
  37.   $h = int($ticks / 3600);
  38.   $ticks %= 3600;
  39.   $m = int($ticks / 60);
  40.   $ticks %= 60;
  41.   $s = int($ticks);
  42.   $ticks = $GetTicks->Call();
  43.   $inch = sprintf("%.2f", ($ticks / 3600000));
  44.   $cm = sprintf("%.2f", (($ticks * 2.54) / 3600000));
  45.   Xchat::command("say \0036Based on the uptime of my \0035$os $osv[1].$osv[2].$osv[3] \003\0036box, my e-Penis is\0034 $inch\003 \0036inches long or\0034 $cm\003 \0036cm long!\003\0037 ".$h."hrs ".$m."mins ".$s."secs.");
  46.   return Xchat::EAT_ALL;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement