Compare commits
6 Commits
custom_api
...
master
Author | SHA1 | Date |
---|---|---|
jack77213 | b153fadff7 | |
jack77213 | 5bdd19cef0 | |
jack77213 | 35f2bc47e5 | |
jack77213 | e80f4e36ef | |
jack77213 | da3d3f0b31 | |
jack77213 | 654efb8f3a |
6
Makefile
6
Makefile
|
@ -13,17 +13,21 @@ a3tg.pbo: $(ARMASRC)
|
|||
liba3tg.so: $(GOSRC)
|
||||
cd extension && GOARCH=386 CGO_ENABLED=1 go build $(LDFLAGS) -o ../liba3tg.so -buildmode=c-shared .
|
||||
|
||||
liba3tg_x64.so: $(GOSRC)
|
||||
cd extension && GOARCH=amd64 CGO_ENABLED=1 go build $(LDFLAGS) -o ../liba3tg_x64.so -buildmode=c-shared .
|
||||
|
||||
liba3tg.dll: $(GOSRC)
|
||||
cd extension && GOOS=windows GOARCH=386 CC=i686-w64-mingw32-cc CGO_ENABLED=1 go build $(LDFLAGS) -o ../liba3tg.dll -buildmode=c-shared .
|
||||
|
||||
liba3tg_x64.dll: $(GOSRC)
|
||||
cd extension && GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-cc CGO_ENABLED=1 go build $(LDFLAGS) -o ../liba3tg_x64.dll -buildmode=c-shared .
|
||||
|
||||
build: liba3tg.so liba3tg.dll liba3tg_x64.dll a3tg.pbo
|
||||
build: liba3tg.so liba3tg_x64.so liba3tg.dll liba3tg_x64.dll a3tg.pbo
|
||||
|
||||
clean:
|
||||
-rm a3tg.pbo
|
||||
-rm ./liba3tg.so
|
||||
-rm ./liba3tg_x64.so
|
||||
-rm ./liba3tg.dll
|
||||
-rm ./liba3tg_x64.dll
|
||||
-rm ./liba3tg.h
|
||||
|
|
|
@ -14,7 +14,7 @@ if (!isServer) exitWith {};
|
|||
params ["_name", "_function", "_data"];
|
||||
if (_name isEqualTo "a3tg") then
|
||||
{
|
||||
(format ["[TG] %2: %3", _function, _data]) remoteExecCall ["systemChat", -2, true];
|
||||
(format ["[TG] %1: %2", _function, _data]) remoteExecCall ["systemChat", -2, true];
|
||||
};
|
||||
}];
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
params ["_name", "_message"];
|
||||
|
||||
"liba3tg" callExtension ["chat", [_name, _message]];
|
||||
|
||||
if ( !((_message select [0, 1]) isEqualTo "#") ) then {
|
||||
"liba3tg" callExtension ["chat", [_name, _message]];
|
||||
};
|
||||
|
|
|
@ -12,7 +12,11 @@ package main
|
|||
}
|
||||
|
||||
#if __x86_64__
|
||||
static inline unsigned long long min(unsigned long long a, unsigned long long b) { return a < b ? a : b; }
|
||||
#ifdef __MINGW32__
|
||||
static inline unsigned long long min(unsigned long long a, unsigned long long b) { return a < b ? a : b; }
|
||||
#else
|
||||
static inline unsigned long min(unsigned long a, unsigned long b) { return a < b ? a : b; }
|
||||
#endif
|
||||
#else
|
||||
static inline unsigned int min(unsigned int a, unsigned int b) { return a < b ? a : b; }
|
||||
#endif
|
||||
|
@ -87,6 +91,6 @@ func handleArgs(function string, argc C.int, argv []string) {
|
|||
return
|
||||
}
|
||||
|
||||
sendToTelegram(argv[0], argv[1])
|
||||
go sendToTelegram(argv[0], argv[1])
|
||||
//log.Println(argc, argv[0], argv[1])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue