rendered paste bodyXchat::register("Test","0.1");
Xchat::hook_server("PRIVMSG",\&test_sub);
sub test_sub {
if ($_[0][2] eq "#testing123" && $_[0][3] eq ":!3") {
$chars = "UUDFBLR";
$a = 0
$b = 0
for $i (1 .. 25) {
$rand = int(rand(6)) + 1;
while ($rand == $a || $rand == $b && ((($rand == 1) && ($a = 2)) || (($rand == 2) && ($a = 1)) || (($rand == 3) && ($a = 4)) || (($rand == 4) && ($a = 3)) || (($rand == 5) && ($a = 6)) || (($rand == 6) && ($a = 5)))) {
$rand = int(rand(6)) + 1;
}
$b = $a;
$a = $rand;
$result = $result . substr($chars,$rand,1) . " ";
}
Xchat::command("msg #testing123 $result");
}
return Xchat::EAT_NONE;
}