Quite concisely written and to the point. Doesn't seem to be any improvements I can think of. I've never used cmd_target() so it seems that having get_user_userid() afterward is redundant, but like I said I've never used it before - it might return something else - if it works, it works.
And M249, you can use the [small] tag for the real coding tag ;)