There's no need for the f flag either as -c will check the box
I used to use:
alias _load.modes {
if ($active !ischan) return
var %mc = $chan($active).mode
if (m isincs %mc) did -c _options 52
if (N isincs %mc) did -c _options 78
if (I isincs %mc) did -c _options 43
if (R isincs %mc) did -c _options 44
if (L isincs %mc) did -c _options 45
if (f isincs %mc) did -c _options 46
if (G isincs %mc) did -c _options 76
if (C isincs %mc) did -c _options 77
if (n isincs %mc) did -c _options 71
if (t isincs %mc) did -c _options 70
if (Q isincs %mc) did -c _options 81
if (c isincs %mc) did -c _options 73
if (M isincs %mc) did -c _options 82
if (T isincs %mc) did -c _options 79
if (j isincs %mc) did -c _options 60
if (w isincs %mc) did -c _options 61
if (p isincs %mc) did -c _options 80
if (l isincs %mc) did -i _options 84 1 * $gettok(%mc,-1,32)
if (K isincs %mc) did -c _options 72
if (R isincs %mc) did -c _options 74
}
but even then I don't like it, it's too long and messy for such basic code. $iif would work just as well to clean it up as well.