-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscripting.h
executable file
·40 lines (28 loc) · 1.05 KB
/
scripting.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <Python.h>
#include <pystate.h>
// scripts that are loaded that should be checked periodically for control variables, etc
typedef struct _as_scripts {
struct _as_scripts *next;
int id;
// type of script? python, etc...
int type;
AS_context *ctx;
PyThreadState *python_thread;
PyObject *pModule;
PyThreadState *mainThreadState;
PyThreadState *myThreadState;
PyThreadState *tempState;
PyInterpreterState *mainInterpreterState;
// did this script have a script_perform() function whenever it was loaded into memory?
int perform;
pthread_mutex_t lock_mutex;
} AS_scripts;
int Scripting_Perform(AS_context *ctx);
int Scripting_Init(AS_context *ctx);
AS_scripts *Scripting_New(AS_context *ctx);
AS_scripts *Scripting_FindFunction(AS_context *, char *);
int Scripting_ThreadPost(AS_context *ctx, AS_scripts *sptr);
int Scripting_ThreadPre(AS_context *ctx, AS_scripts *sptr);
PyObject *PyAttackDetails(AS_attacks *aptr);
#define FROM_CLIENT 1
#define FROM_SERVER 0