Isolate bot code from g_local.h