A generalized Hirota equation in 2+1 dimensions