Move if switch out of for loop in GChat
Merge pull request #56 from alama/fixup-build-packets-once

Move if switch out of for loop in GChat