Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- use Win32;
- use Win32::OLE;
- use Win32::API;
- my $version="1.0";
- Xchat::register("WinCMD", $version, "Some Commands and controls for Windows");
- Xchat::print("\n\n\00312Command Set Loaded, type /win32 to view a list of commands\003\n");
- Xchat::hook_command('win32','sub_cmdlist');
- Xchat::hook_command('winup','sub_uptime');
- sub sub_cmdlist{
- Xchat::print("Coming Soon");
- return Xchat::EAT_ALL;
- }
- sub sub_uptime{
- my $GetTicks;
- my $ticks;
- my $h;
- my $s;
- my $m;
- my $inch;
- my $cm;
- my $os = Win32::GetOSName;
- my @osv = Win32::GetOSVersion;
- $GetTicks = new Win32::API("kernel32", "GetTickCount", '', 'N');
- $ticks = $GetTicks->Call();
- $ticks /= 1000;
- $h = int($ticks / 3600);
- $ticks %= 3600;
- $m = int($ticks / 60);
- $ticks %= 60;
- $s = int($ticks);
- $ticks = $GetTicks->Call();
- $inch = sprintf("%.2f", ($ticks / 3600000));
- $cm = sprintf("%.2f", (($ticks * 2.54) / 3600000));
- 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.");
- return Xchat::EAT_ALL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement