$sock(name).port works for that...
Code:
on *:SOCKLISTEN:pokemons:{
  sockaccept pokemon
  echo -a $sock(pokemon).port
}