Just deleted about 400 bot accounts and a bunch of spam. To mitigate this in the future, we've enabled reCaptcha on signup. Let me know if someone got caught in the crossfire.

test_change_name.cpp 662 Bytes
Newer Older
Canvas123's avatar
Canvas123 committed
1
2
3
4
5
6
7
8
9
#include "byondgate.h"
#include <stdint.h>
#include <stdio.h>

extern "C" DLL_EXPORT char *test(int argc, char *argv[]) {

  unsigned int name_str_id, repl_str_id, type, id, get_type, get_id;
  type = decode_ref_string(argv[0], &id);

Canvas123's avatar
Canvas123 committed
10
11
  char *buf = new char[100];
  name_str_id = resolve_const_string("name");
Canvas123's avatar
Canvas123 committed
12
13
14
15
16
17
18
19
20
21
  repl_str_id = resolve_const_string("TEST NAME");

  get_type = GetVariableFrom(type, id, name_str_id, &get_id);

  snprintf(buf, sizeof(buf) * 100, "%#x %#x [%#04x %#08x] [%#04x %#08x]",
           name_str_id, repl_str_id, type, id, get_type, get_id);
  SetVariableTo(type, id, name_str_id, 0x06, repl_str_id);

  return buf;
}