Originally Posted By: starbucks_mafia
Even if custom operators were possible they would still need a prefix to distinguish them from ordinary text, otherwise you could end up with horrible problems like:
if (hello moo [color:red]newoperator %blah) ...[/color]
becoming
if (hello [color:red]moo newoperator %blah) ...[/color]
if a new script introduced a moo operator.

So with that in mind, is:
$iif($nick [color:red]$~isowner $chan)[/color]
(assuming $~ as the operator prefix) really much cleaner than
$iif($isowner($nick, $chan))

There are some uses to having custom operators, I just don't think saving a couple of commas is one of them.

Note 1: As RusselB mentioned, mIRC already has an undocumented operator isowner which works as expected on most networks that support it.

Note 2: If you call an alias in an event then all special identifiers (such as $nick and $chan) will be available to the alias too. So if you're really worried about commas you could write a custom identifier like this:
Code:
alias isowner {
  var %chan = $iif($2,$2,$chan), %nick = $iif($1,$1,$nick)
  return $iif($nick(%chan, %nick).pnick == ~, $true, $false)
}


and call it as:
Code:
if ($isowner) ...

inside events.

Well...
What you said above wont work in $nick(#,$nick).pnick if they were +q in a network that only supports ohv, or @%+.
Second, this is off topic but i wanted to know how you make an alias that can use the extra paramaters outside of the parenthases, eg: $eaten(%food).percent
smile Other words, i LOVE mIRC, and as sOON as I can muster up $20 ill buy it.
EDIT:{
Sorry about the large quote, im too lazy to look for stuff cuz im not usually a forum-eer

Last edited by iStink; 20/08/07 05:00 AM.