Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # Kud-chan
- # Test Mode ATM
- use strict;
- use warnings;
- use Xchat qw( :all );
- register( "Kud-chan", "0.0.03", "Wafuu~!", "" );
- hook_print('You Join',\&wafuu_on_join);
- hook_print('Your Nick Changing',\&wafuu_on_nick);
- hook_print('Channel Action Hilight',\&no_grope);
- Xchat::prnt("Kud-chan\'s script loaded!");
- sub wafuu_on_join { &wafuu if ($_[0][0] eq "Kud-chan"); }
- sub wafuu_on_nick { &wafuu if ($_[0][1] eq "Kud-chan"); }
- sub no_grope { &pls_dont if (get_info('nick') eq "Kud-chan" && $_[0][1] =~ m/^gropes Kud-chan/i) }
- sub wafuu {
- my @now = localtime;
- my $ToD = $now[2];
- &delaycommand("say Wafuu~!");
- # This be ugly
- if ($ToD >= 6 && $ToD < 12) { # Morning
- &delaycommand("say Guudou morning nanodesu~!");
- } elsif ($ToD >= 12 && $ToD < 18) { # Afternoon
- &delaycommand("say Guudou afternoon nanodesu~!");
- } else { # Evening
- &delaycommand("say Guudou evening nanodesu~!");
- }
- return EAT_NONE;
- }
- sub pls_dont {
- &delaycommand("say Riki-kun's hands only nanodesu~!"); # Change this line to whatever feels right
- return EAT_NONE;
- }
- # Blatant copypasta
- sub delaycommand {
- my $command = $_[0];
- hook_timer( 0,
- sub {
- command($command);
- return REMOVE;
- }
- );
- return EAT_NONE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement