That depends on your server. If your server does support gender's you have to ask around to see what event you get that information on. Sometimes it's on the who, raw 352, or names, Raw 333. Sometimes you can only get it by opening a socket to the server.
Ask around the scripters or admin of your server.