#!/usr/bin/perl # mokou3.pl - Don Yang (uguu.org) # # 05/11/09 use Text::Wrap; @n = qw{ Reimu Marisa Rumia Cirno Meirin Patchouli Sakuya Remilia Flandre Letty Chen Alice Lily Lunasa Marlin Lyrica Youmu Yuyuko Ran Yukari Wriggle Mystia Keine Tewi Udonge Eirin Kaguya Mokou Suika Aya Medicine Yuka Komachi Shikieiki Shizuha Minoriko Hina Nitori Momizi Sanae Kanako Suwako Iku Tenshi Kisume Yamame Parsee Yugi Satori Rin Utsuho Koishi Sunnymilk Lunachild Starsapphire Koakuma Teruyo }; @r = split /!/, q{absolutely awful!Absolutely awful!bad!Bad!BAD!bad idea!Bad idea!BAD IDEA!don't do it!Don't do it!DON'T DO IT!i disagree!I disagree!i wouldn't do that!I wouldn't do that!it's rubbish!It's rubbish!no!No!NO!no good!No good!rubbish!Rubbish!seems bad to me!Seems bad to me!sucks!Sucks!terrible!Terrible!terrible idea!Terrible idea!total rubbish!Total rubbish!what a waste of time!What a waste of time!wouldn't do that if I were you!Wouldn't do that if I were you!wrong!Wrong!WRONG!wtf?!WTF?}; @u = <>; for($t = time - 3600; $t < time; $t += int(60 + rand 300)) { @i = ( $r[int(rand $#r + 1)] . "\n", "\n", "On " . scalar(localtime $t) . ", " . $n[int(rand $#n + 1)] . " wrote:\n" ); $o = $d = ""; $e = "> "; foreach $l (@u) { if( $l =~ s/^(>* ?)(.*)$/$2/s ) { if( $1 eq $o ) { $d .= $l; } else { push @i, "$_\n" foreach split /[\r\n]+/s, wrap($e, $e, $d); $d = $l; $o = $1; $e = ($o =~ /^\s*$/ ? "> " : ">$o"); } } } push @i, "$_\n" foreach split /[\r\n]+/s, wrap($e, $e, $d); push @i, "\n"; @u = @i; } print foreach @u;