View difference between Paste ID: CZ9KENpC and 9B6C3gsa
SHOW: | | - or go back to the newest paste.
1
#!/usr/bin/perl
2
# Kud-chan
3
# Test Mode ATM
4
 
5
use strict;
6
use warnings;
7
 
8
use Xchat qw( :all );
9
 
10-
register( "Kud-chan", "0.0.01", "Wafuu~!", "" );
10+
register( "Kud-chan", "0.0.03", "Wafuu~!", "" );
11
 
12
hook_print('You Join',\&wafuu_on_join);
13
hook_print('Your Nick Changing',\&wafuu_on_nick);
14
hook_print('Channel Action Hilight',\&no_grope);
15
 
16
Xchat::prnt("Kud-chan\'s script loaded!");
17-
sub wafuu_on_join { &delaycommand("say Wafuu~!") if ($_[0][0] eq "Kud-chan"); return EAT_NONE; }
17+
 
18-
sub wafuu_on_nick { &delaycommand("say Wafuu~!") if ($_[0][1] eq "Kud-chan"); return EAT_NONE; }
18+
sub wafuu_on_join { &wafuu if ($_[0][0] eq "Kud-chan"); }
19
sub wafuu_on_nick { &wafuu if ($_[0][1] eq "Kud-chan"); }
20
sub no_grope { &pls_dont if (get_info('nick') eq "Kud-chan" && $_[0][1] =~ m/^gropes Kud-chan/i) }
21
 
22
sub wafuu {
23
 my @now = localtime;
24
 my $ToD = $now[2];
25
 
26
 &delaycommand("say Wafuu~!");
27
 
28
 # This be ugly
29
  if ($ToD >= 6 && $ToD < 12) { # Morning
30
     &delaycommand("say Guudou morning nanodesu~!");
31
   } elsif ($ToD >= 12 && $ToD < 18) { # Afternoon
32
      &delaycommand("say Guudou afternoon nanodesu~!");
33
     } else { # Evening
34
        &delaycommand("say Guudou evening nanodesu~!");
35
       }
36
 
37
 return EAT_NONE;
38
}
39
40
sub pls_dont {
41
 &delaycommand("say Riki-kun's hands only nanodesu~!"); # Change this line to whatever feels right
42
 return EAT_NONE;
43
}
44
 
45
# Blatant copypasta
46
sub delaycommand {
47
  my $command = $_[0];
48
    hook_timer( 0,
49
         sub {
50
           command($command);
51
           return REMOVE;
52
          }
53
      );
54
  return EAT_NONE;
55
}