in reply to Re^2: Script replaces instead of add
in thread Script replaces instead of add

If I understand you correctly, the problem is now in your delaycmd and listdelay subs. instead of
$server->command("query $nick $delaylist{$nick}");
which sends the whole kaboodle as one message, make it
$server->command("query $nick $_") for @{$delaylist{$nick}};
(in case you changed your delaylist from hash of strings to HoA).

Similiar for listdelays. Something like
foreach (@nicks) { print "--> \cB$_\cB:\n"; print scalar @{ $delaylist{ $_ }} . " message(s)\n"; print "$_\n" for @{ $delaylist{ $_ }}; }

BTW to me, it looks like the part with my %hash = ... and @isect was superfluous from the beginning. you should remove it, because otherwise it will distract you when you have the next change :-)

Replies are listed 'Best First'.
Re^4: Script replaces instead of add
by geekism (Initiate) on Jul 24, 2015 at 09:38 UTC
    This happens to give me the end result i wanted. Thank you. i dont understand what you're speaking about when you mentioned %hash.
      This block in adddelays is superfluous:
      my %hash = map { $_, 1 } @nicks; @nicks = keys %hash; if (keys %delaylist) { my @isect = (); map { $hash{$_} = 1 } keys %delaylist; @isect = grep { $hash{$_} } @nicks; if (@isect) { # removedelays(@isect); } }
      It probably was supposed to remove those messages, which later would be overwritten anyway, so it was superfluous from the very beginning...