weechat::register("loop", "nils_2", "0.1", "GPL3", "loop", "", "");
weechat::hook_command("loop", "", "", "", "", "loop", "");
weechat::hook_command("loop2", "", "", "", "", "loop2", "");

sub loop
{
    my $monitor_liste = "";
    for (my $i = 1; $i < 50; $i++)
    {
        $monitor_liste = $monitor_liste . "nick" . $i .",";
    }
    chop($monitor_liste);
    weechat::print("",$monitor_liste);
    weechat::command("","/monitor + ".$monitor_liste);
    $monitor_liste = "";
    for (my $i = 50; $i < 100; $i++)
    {
        $monitor_liste = $monitor_liste . "nick" . $i .",";
    }
    chop($monitor_liste);
    weechat::print("",$monitor_liste);
    weechat::command("","/monitor + ".$monitor_liste);
}
sub loop2
{
    for (my $i = 1; $i < 100; $i++)
    {
        weechat::command("","/notify add nick".$i);
        weechat::command("","/wait 10ms");
    }
}