Fix socket_last_error argument.
Remove sendNickname method to duplicate the function of sendPresence. Both did the same.