mIRC /hcopy

By Arigateaux on Feb 09, 2017

Needed a way to move one item over from a different table so I created this. Pretty self-explanatory.

; /hcopy <from_table> <to_table> [<item>]
alias hcopy {
  var %table_from = $$1
  var %table_to = $$2
  var %item = $3

  if (%item) {
    if (!$hget(%table_from)) echo -ag %table_from must exist in order to do that.
    else if (!$hget(%table_to)) echo -ag %table_to must exist in order to do that.
    else if (!$hget(%table_from, %item)) echo -ag %item must exist in order to do that.
    else {
      var %item_from = $hget(%table_from, %item)
      hadd %table_to %item %item_from
    }
  }
  else {
    if (!$hget(%table_to)) hmake $2 $hget(%table_to).size
    hsave %table_from %table_from $+ .hsh
    hload %table_to %table_from $+ .hsh
  }
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.