void Core::setNospam(uint32_t nospam) { uint8_t *nspm = reinterpret_cast<uint8_t*>(&nospam); std::reverse(nspm, nspm + 4); tox_self_set_nospam(tox, nospam); emit idSet(getSelfId().toString()); }
void cmd_nospam(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE]) { uint32_t nospam = rand(); /* should be random enough */ tox_self_set_nospam(m, nospam); line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Your Tox ID has been changed to:"); cmd_myid(window, self, m, 0, NULL); line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Any services that relied on your old ID will need to be updated manually."); }
void Core::setNospam(uint32_t nospam) { uint8_t *nspm = reinterpret_cast<uint8_t*>(&nospam); std::reverse(nspm, nspm + 4); tox_self_set_nospam(tox, nospam); }
/** * @brief Sets the NoSpam value to prevent friend request spam * @param nospam an arbitrary which becomes part of the Tox ID */ void Core::setNospam(uint32_t nospam) { tox_self_set_nospam(tox, nospam); emit idSet(getSelfId()); }