/* playdough nick completion by shade (thanks) */

alias _nickcomp fe (%$0% ?$0? %$0 ?$0 $0% $0? $0) patt {
    @ function_return = pattern($patt $onchannel($C)) ? word(0 $pattern($patt $onchannel($C))) : function_return
}

on ^input "%: *" if (nick_comp) {
    @ :compleat = _nickcomp($before(: $*))
    sendline ${compleat ? [$compleat$nick_comp_character $1-] : [$*]}
}
