* code nitpicking * Midnight oil More like 6am oil. Still having issues with actually eating anyone. * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * missed commit * Noms * specific release doesn't work * Tg modernization patch (#115) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * port from cactus did * fix format error * Update preferences.dm unfuck * Revert "port from cactus did" * unfuck * more sprite work * vore * disabled roundstart xenos for now * admin QOL needs callback porting, TBD * Mentor system initial port I'm sure I've missed a fuckton of shit * test merge * Jesus tits did this finally fix compile issues? * Tg modern (#149) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * Tg modernization patch (#115) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * port from cactus did * fix format error * Update preferences.dm unfuck * Revert "port from cactus did" * unfuck * more sprite work * vore * disabled roundstart xenos for now * test merge * Jesus tits did this finally fix compile issues? * Initial test compiles. hooray. * Admin ticket fixes * I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum * who list wip also ahelps are broken again. fuck if I know why * discord bot basics * maybe tickets work now & bot framework done * ahelp callback readd * Mentor system, Tickets, and discord (#151) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * Tg modernization patch (#115) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * port from cactus did * fix format error * Update preferences.dm unfuck * Revert "port from cactus did" * unfuck * more sprite work * vore * disabled roundstart xenos for now * admin QOL needs callback porting, TBD * Mentor system initial port I'm sure I've missed a fuckton of shit * test merge * Jesus tits did this finally fix compile issues? * Initial test compiles. hooray. * Admin ticket fixes * I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum * who list wip also ahelps are broken again. fuck if I know why * discord bot basics * maybe tickets work now & bot framework done * ahelp callback readd * vore tweaks * progress * dirtier fix than a korean hooker in the 60s * The release your hooker will always fake * you could save that hookers number but wouldn't you rather just vore the hooker instead * Save system is literal black magic * great googly moogly it's all gone to shit * We May 2015 save code now * fiddling with digestion code now * fuck if I know anymore. I'm going to bed * OWN UP YOUR OWN DIGESTION * UNREGULATED GUTS ARE NON COMPLIANT AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * BELLIES MUST COMPLY WITH USER OWNERSHIP * Removed debug messages * Unneeded verb additions * file change tweaks * WATCH YOUR SPACING, DRIVER * Changelog and devourment for some mobs. Because I knew people were gunna ask. NO YOU CANNOT EAT THE FUCKING LEGION * Vore code sync (#157) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Escape and Devourable For the normies who play here yet complain about it. * Things that should be committed * unneeded files * Sizeray works now * tweaks and bed time going * IT WORKS mostly Need to get multiple guts and saving working tho * save tweaks * item hotfix * gut examine message * damifino * save system works also ensured some mobs have vore controls, so silicons can't even remotely do vore things. * code nitpicking * Midnight oil More like 6am oil. Still having issues with actually eating anyone. * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * missed commit * Noms * specific release doesn't work * Tg modernization patch (#115) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * port from cactus did * fix format error * Update preferences.dm unfuck * Revert "port from cactus did" * unfuck * more sprite work * vore * disabled roundstart xenos for now * admin QOL needs callback porting, TBD * Mentor system initial port I'm sure I've missed a fuckton of shit * test merge * Jesus tits did this finally fix compile issues? * Initial test compiles. hooray. * Admin ticket fixes * I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum * who list wip also ahelps are broken again. fuck if I know why * discord bot basics * maybe tickets work now & bot framework done * ahelp callback readd * vore tweaks * progress * dirtier fix than a korean hooker in the 60s * The release your hooker will always fake * you could save that hookers number but wouldn't you rather just vore the hooker instead * Save system is literal black magic * great googly moogly it's all gone to shit * We May 2015 save code now * fiddling with digestion code now * fuck if I know anymore. I'm going to bed * OWN UP YOUR OWN DIGESTION * UNREGULATED GUTS ARE NON COMPLIANT AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * BELLIES MUST COMPLY WITH USER OWNERSHIP * Removed debug messages * Unneeded verb additions * file change tweaks * WATCH YOUR SPACING, DRIVER * Changelog and devourment for some mobs. Because I knew people were gunna ask. NO YOU CANNOT EAT THE FUCKING LEGION * title screen change from Crow's PR. * More of Crow's title screen stuff * mode tweaks.... again * gamemode voting in lobby via TalkingCactus disabled ashwalkers as roundstart Verk's species tweak paralax starts disabled by default * LOOC * index sync problem (#158) * digifix * things * furry races.dm * actually deletes species_types * maps * tgui and stuff * Sounds * icon updates * Defines and helpers * global vars and on click * controllers * datums * game folder * fixes invisible flan mobs * some modules * dropbomb verb enhanced * moar * moar * moar * even more again * and finally these for modules * Some compile tweaks * silly dme get updated you scrub * compiles cleanly now * various open PR fixes from TG as of 0800 Texas Standard Time * also fancy cryopods before I forget again * headslug gold core fix * edgy code of the modernization (#164) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Escape and Devourable For the normies who play here yet complain about it. * Things that should be committed * unneeded files * Sizeray works now * tweaks and bed time going * IT WORKS mostly Need to get multiple guts and saving working tho * save tweaks * item hotfix * gut examine message * damifino * save system works also ensured some mobs have vore controls, so silicons can't even remotely do vore things. * code nitpicking * Midnight oil More like 6am oil. Still having issues with actually eating anyone. * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * missed commit * Noms * specific release doesn't work * Tg modernization patch (#115) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * port from cactus did * fix format error * Update preferences.dm unfuck * Revert "port from cactus did" * unfuck * more sprite work * vore * disabled roundstart xenos for now * admin QOL needs callback porting, TBD * Mentor system initial port I'm sure I've missed a fuckton of shit * test merge * Jesus tits did this finally fix compile issues? * Initial test compiles. hooray. * Admin ticket fixes * I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum * who list wip also ahelps are broken again. fuck if I know why * discord bot basics * maybe tickets work now & bot framework done * ahelp callback readd * vore tweaks * progress * Small fixes for dogborgs and sprite accessories: -Ported the hidden snippets of the dogborg code. -Reset module now resets pixel offset and icon directory again. (broke shit when reseting from dogborg) -Medihound belly fixed. -Husky body marking tweaked to not overlap arms in side view. -Added husky ears that are basically wolf ears that use secondary color instead. * dirtier fix than a korean hooker in the 60s * The release your hooker will always fake * you could save that hookers number but wouldn't you rather just vore the hooker instead * Save system is literal black magic * great googly moogly it's all gone to shit * We May 2015 save code now * fiddling with digestion code now * fuck if I know anymore. I'm going to bed * OWN UP YOUR OWN DIGESTION * UNREGULATED GUTS ARE NON COMPLIANT AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * BELLIES MUST COMPLY WITH USER OWNERSHIP * Removed debug messages * Unneeded verb additions * file change tweaks * WATCH YOUR SPACING, DRIVER * Changelog and devourment for some mobs. Because I knew people were gunna ask. NO YOU CANNOT EAT THE FUCKING LEGION * title screen change from Crow's PR. * More of Crow's title screen stuff * mode tweaks.... again * gamemode voting in lobby via TalkingCactus disabled ashwalkers as roundstart Verk's species tweak paralax starts disabled by default * LOOC * index sync problem (#158) * digifix * things * furry races.dm * actually deletes species_types * maps * tgui and stuff * Sounds * icon updates * Defines and helpers * global vars and on click * controllers * datums * game folder * fixes invisible flan mobs * some modules * dropbomb verb enhanced * moar * moar * moar * even more again * and finally these for modules * Some compile tweaks * silly dme get updated you scrub * compiles cleanly now * various open PR fixes from TG as of 0800 Texas Standard Time * also fancy cryopods before I forget again * headslug gold core fix * some species and DNA tweaks * Digest already damn you * suddenly sound and resist works. wtf * Minor tweaks, cryopod noise change * Vore tested working, species working * Merge test onto bleeding edgy (#165) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Escape and Devourable For the normies who play here yet complain about it. * Things that should be committed * unneeded files * Sizeray works now * tweaks and bed time going * IT WORKS mostly Need to get multiple guts and saving working tho * save tweaks * item hotfix * gut examine message * damifino * save system works also ensured some mobs have vore controls, so silicons can't even remotely do vore things. * code nitpicking * Midnight oil More like 6am oil. Still having issues with actually eating anyone. * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * missed commit * Noms * specific release doesn't work * Tg modernization patch (#115) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * port from cactus did * fix format error * Update preferences.dm unfuck * Revert "port from cactus did" * unfuck * more sprite work * vore * disabled roundstart xenos for now * admin QOL needs callback porting, TBD * Mentor system initial port I'm sure I've missed a fuckton of shit * test merge * Jesus tits did this finally fix compile issues? * Initial test compiles. hooray. * Admin ticket fixes * I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum * who list wip also ahelps are broken again. fuck if I know why * discord bot basics * maybe tickets work now & bot framework done * ahelp callback readd * vore tweaks * progress * Small fixes for dogborgs and sprite accessories: -Ported the hidden snippets of the dogborg code. -Reset module now resets pixel offset and icon directory again. (broke shit when reseting from dogborg) -Medihound belly fixed. -Husky body marking tweaked to not overlap arms in side view. -Added husky ears that are basically wolf ears that use secondary color instead. * dirtier fix than a korean hooker in the 60s * The release your hooker will always fake * you could save that hookers number but wouldn't you rather just vore the hooker instead * Save system is literal black magic * great googly moogly it's all gone to shit * We May 2015 save code now * fiddling with digestion code now * fuck if I know anymore. I'm going to bed * OWN UP YOUR OWN DIGESTION * UNREGULATED GUTS ARE NON COMPLIANT AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * BELLIES MUST COMPLY WITH USER OWNERSHIP * Removed debug messages * Unneeded verb additions * file change tweaks * WATCH YOUR SPACING, DRIVER * Changelog and devourment for some mobs. Because I knew people were gunna ask. NO YOU CANNOT EAT THE FUCKING LEGION * title screen change from Crow's PR. * More of Crow's title screen stuff * mode tweaks.... again * gamemode voting in lobby via TalkingCactus disabled ashwalkers as roundstart Verk's species tweak paralax starts disabled by default * LOOC * index sync problem (#158) * digifix * things * furry races.dm * actually deletes species_types * maps * tgui and stuff * Sounds * icon updates * Defines and helpers * global vars and on click * controllers * datums * game folder * fixes invisible flan mobs * some modules * dropbomb verb enhanced * moar * moar * moar * even more again * and finally these for modules * Some compile tweaks * silly dme get updated you scrub * compiles cleanly now * various open PR fixes from TG as of 0800 Texas Standard Time * also fancy cryopods before I forget again * headslug gold core fix * some species and DNA tweaks * Digest already damn you * suddenly sound and resist works. wtf * Minor tweaks, cryopod noise change * Vore tested working, species working * travis map updates * updates * pool's closed due to lag * datum pools are closed too * Initializing new pool's closed * Pool's closed and initializing shit is done * sprite updates * chattering is okay to do now. * bleeblin edgy 1/23 (#166) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Escape and Devourable For the normies who play here yet complain about it. * Things that should be committed * unneeded files * Sizeray works now * tweaks and bed time going * IT WORKS mostly Need to get multiple guts and saving working tho * save tweaks * item hotfix * gut examine message * damifino * save system works also ensured some mobs have vore controls, so silicons can't even remotely do vore things. * code nitpicking * Midnight oil More like 6am oil. Still having issues with actually eating anyone. * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * missed commit * Noms * specific release doesn't work * Tg modernization patch (#115) * sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes * port from cactus did * fix format error * Update preferences.dm unfuck * Revert "port from cactus did" * unfuck * more sprite work * vore * disabled roundstart xenos for now * admin QOL needs callback porting, TBD * Mentor system initial port I'm sure I've missed a fuckton of shit * test merge * Jesus tits did this finally fix compile issues? * Initial test compiles. hooray. * Admin ticket fixes * I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum * who list wip also ahelps are broken again. fuck if I know why * discord bot basics * maybe tickets work now & bot framework done * ahelp callback readd * vore tweaks * progress * Small fixes for dogborgs and sprite accessories: -Ported the hidden snippets of the dogborg code. -Reset module now resets pixel offset and icon directory again. (broke shit when reseting from dogborg) -Medihound belly fixed. -Husky body marking tweaked to not overlap arms in side view. -Added husky ears that are basically wolf ears that use secondary color instead. * dirtier fix than a korean hooker in the 60s * The release your hooker will always fake * you could save that hookers number but wouldn't you rather just vore the hooker instead * Save system is literal black magic * great googly moogly it's all gone to shit * We May 2015 save code now * fiddling with digestion code now * fuck if I know anymore. I'm going to bed * OWN UP YOUR OWN DIGESTION * UNREGULATED GUTS ARE NON COMPLIANT AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * BELLIES MUST COMPLY WITH USER OWNERSHIP * Removed debug messages * Unneeded verb additions * file change tweaks * WATCH YOUR SPACING, DRIVER * Changelog and devourment for some mobs. Because I knew people were gunna ask. NO YOU CANNOT EAT THE FUCKING LEGION * title screen change from Crow's PR. * More of Crow's title screen stuff * mode tweaks.... again * gamemode voting in lobby via TalkingCactus disabled ashwalkers as roundstart Verk's species tweak paralax starts disabled by default * LOOC * index sync problem (#158) * digifix * things * furry races.dm * actually deletes species_types * maps * tgui and stuff * Sounds * icon updates * Defines and helpers * global vars and on click * controllers * datums * game folder * fixes invisible flan mobs * some modules * dropbomb verb enhanced * moar * moar * moar * even more again * and finally these for modules * Some compile tweaks * silly dme get updated you scrub * compiles cleanly now * various open PR fixes from TG as of 0800 Texas Standard Time * also fancy cryopods before I forget again * headslug gold core fix * some species and DNA tweaks * Digest already damn you * suddenly sound and resist works. wtf * Minor tweaks, cryopod noise change * Vore tested working, species working * travis map updates * updates * pool's closed due to lag * datum pools are closed too * Initializing new pool's closed * Pool's closed and initializing shit is done * sprite updates * chattering is okay to do now. * Update .travis.yml * Update .travis.yml * Update .travis.yml * Revert "Modern modern" * Revert "Revert "Modern modern"" * fix it fix it fix it fix it * fixes title screen - thanks crow * Riding code reverted * possible tgui fix? * who the fuck even knows if this is the problem * adds moths and sharks (no colors yet, not greyscaled) adds LOOC back * "fixes" missing items in some machinery. * slight tweaks to abductor spawns borer event enabled (max 1) * Update .travis.yml * fixes shuttle purchase from comms * fixes and QoL * Polymorphing all is dangerous too * re-fixes ahelp ticket system again * metagaming check proving to be spamlicious * Fixes not being able to see devoured mob poses * fix for vehicle buckling * ahelp timer runtime fix (#178) * controller and game updates 1/29 * Defines, helpers, datums 1/29 * world.dm updates * modules/admin tweaks * everything in modules not a mob * modules/mob fixes and such No more PAIs ventcrawling * icons, maps, tools, etc. * compiler fixes * round type vote fixed * hardsuit cargo pack * reduce ion and electric storm chance * perms access for travis * fix helmet to the suit removes CE from crate * changelog * fuck * perms for travis... again * Update tgstation.dme * Update tgstation.dme * Donation race * redpanda * red panda * size play work * Size chemical basics Needs testing/refining * some fixing ports before I just fucking ported it anyway * It's been a fucking week. * commiting moar changes because github * admins.txt lol * icons * defines and such * globalvars and onclick * Controllers * datums * game folder * oh look, HoG is back * modules pt 1 * client things * more modules * everything not mob code * some mob stuff * more mob things * silicon mobs * ayylims and monkeys * human updates * huh * housekeeping is fired. * last minute fixes * more last minute things * human parts double check'd * more paper * Icons are fixed * double check of thermal protection code. (#191)
356 lines
12 KiB
PHP
356 lines
12 KiB
PHP
<?php
|
|
/*
|
|
* Github webhook In-game PR Announcer and Changelog Generator for /tg/Station13
|
|
* Author: MrStonedOne
|
|
* For documentation on the changelog generator see https://tgstation13.org/phpBB/viewtopic.php?f=5&t=5157
|
|
* To hide prs from being announced in game, place a [s] in front of the title
|
|
* All runtime errors are echo'ed to the webhook's logs in github
|
|
*/
|
|
|
|
/**CREDITS:
|
|
* GitHub webhook handler template.
|
|
*
|
|
* @see https://developer.github.com/webhooks/
|
|
* @author Miloslav Hula (https://github.com/milo)
|
|
*/
|
|
|
|
|
|
//CONFIG START (all defaults are random examples, do change them)
|
|
//Use single quotes for config options that are strings.
|
|
|
|
//Github lets you have it sign the message with a secret that you can validate. This prevents people from faking events.
|
|
//This var should match the secret you configured for this webhook on github.
|
|
//This is required as otherwise somebody could trick the script into leaking the api key.
|
|
$hookSecret = '08ajh0qj93209qj90jfq932j32r';
|
|
|
|
//Api key for pushing changelogs.
|
|
$apiKey = '209ab8d879c0f987d06a09b9d879c0f987d06a09b9d8787d0a089c';
|
|
|
|
//servers to announce PRs to.
|
|
$servers = array();
|
|
/*
|
|
$servers[0] = array();
|
|
$servers[0]['address'] = 'game.tgstation13.org';
|
|
$servers[0]['port'] = '1337';
|
|
$servers[0]['comskey'] = '89aj90cq2fm0amc90832mn9rm90';
|
|
$servers[1] = array();
|
|
$servers[1]['address'] = 'game.tgstation13.org';
|
|
$servers[1]['port'] = '2337';
|
|
$servers[1]['comskey'] = '89aj90cq2fm0amc90832mn9rm90';
|
|
*/
|
|
|
|
//CONFIG END
|
|
set_error_handler(function($severity, $message, $file, $line) {
|
|
throw new \ErrorException($message, 0, $severity, $file, $line);
|
|
});
|
|
set_exception_handler(function($e) {
|
|
header('HTTP/1.1 500 Internal Server Error');
|
|
echo "Error on line {$e->getLine()}: " . htmlSpecialChars($e->getMessage());
|
|
die();
|
|
});
|
|
$rawPost = NULL;
|
|
if (!$hookSecret || $hookSecret == '08ajh0qj93209qj90jfq932j32r')
|
|
throw new \Exception("Hook secret is required and can not be default");
|
|
if (!isset($_SERVER['HTTP_X_HUB_SIGNATURE'])) {
|
|
throw new \Exception("HTTP header 'X-Hub-Signature' is missing.");
|
|
} elseif (!extension_loaded('hash')) {
|
|
throw new \Exception("Missing 'hash' extension to check the secret code validity.");
|
|
}
|
|
list($algo, $hash) = explode('=', $_SERVER['HTTP_X_HUB_SIGNATURE'], 2) + array('', '');
|
|
if (!in_array($algo, hash_algos(), TRUE)) {
|
|
throw new \Exception("Hash algorithm '$algo' is not supported.");
|
|
}
|
|
$rawPost = file_get_contents('php://input');
|
|
if ($hash !== hash_hmac($algo, $rawPost, $hookSecret)) {
|
|
throw new \Exception('Hook secret does not match.');
|
|
}
|
|
|
|
$contenttype = null;
|
|
//apache and nginx/fastcgi/phpfpm call this two different things.
|
|
if (!isset($_SERVER['HTTP_CONTENT_TYPE'])) {
|
|
if (!isset($_SERVER['CONTENT_TYPE']))
|
|
throw new \Exception("Missing HTTP 'Content-Type' header.");
|
|
else
|
|
$contenttype = $_SERVER['CONTENT_TYPE'];
|
|
} else {
|
|
$contenttype = $_SERVER['HTTP_CONTENT_TYPE'];
|
|
}
|
|
if (!isset($_SERVER['HTTP_X_GITHUB_EVENT'])) {
|
|
throw new \Exception("Missing HTTP 'X-Github-Event' header.");
|
|
}
|
|
switch ($contenttype) {
|
|
case 'application/json':
|
|
$json = $rawPost ?: file_get_contents('php://input');
|
|
break;
|
|
case 'application/x-www-form-urlencoded':
|
|
$json = $_POST['payload'];
|
|
break;
|
|
default:
|
|
throw new \Exception("Unsupported content type: $contenttype");
|
|
}
|
|
# Payload structure depends on triggered event
|
|
# https://developer.github.com/v3/activity/events/types/
|
|
$payload = json_decode($json, true);
|
|
|
|
switch (strtolower($_SERVER['HTTP_X_GITHUB_EVENT'])) {
|
|
case 'ping':
|
|
echo 'pong';
|
|
break;
|
|
case 'pull_request':
|
|
handle_pr($payload);
|
|
break;
|
|
default:
|
|
header('HTTP/1.0 404 Not Found');
|
|
echo "Event:$_SERVER[HTTP_X_GITHUB_EVENT] Payload:\n";
|
|
print_r($payload); # For debug only. Can be found in GitHub hook log.
|
|
die();
|
|
}
|
|
function handle_pr($payload) {
|
|
$action = 'opened';
|
|
switch ($payload["action"]) {
|
|
case 'opened':
|
|
case 'reopened':
|
|
$action = $payload['action'];
|
|
break;
|
|
case 'closed':
|
|
if (!$payload['pull_request']['merged']) {
|
|
$action = 'closed';
|
|
}
|
|
else {
|
|
$action = 'merged';
|
|
checkchangelog($payload, true);
|
|
}
|
|
break;
|
|
default:
|
|
return;
|
|
}
|
|
|
|
if (strtolower(substr($payload['pull_request']['title'], 0, 3)) == '[s]') {
|
|
echo "PR Announcement Halted; Secret tag detected.\n";
|
|
return;
|
|
}
|
|
|
|
$msg = 'Pull Request '.$action.' by '.htmlSpecialChars($payload['sender']['login']).': <a href="'.$payload['pull_request']['html_url'].'">'.htmlSpecialChars('#'.$payload['pull_request']['number'].' '.$payload['pull_request']['user']['login'].' - '.$payload['pull_request']['title']).'</a>';
|
|
sendtoallservers('?announce='.urlencode($msg));
|
|
|
|
}
|
|
|
|
function checkchangelog($payload, $merge = false) {
|
|
global $apiKey;
|
|
if (!$merge)
|
|
return;
|
|
if (!isset($payload['pull_request']) || !isset($payload['pull_request']['body'])) {
|
|
return;
|
|
}
|
|
if (!isset($payload['pull_request']['user']) || !isset($payload['pull_request']['user']['login'])) {
|
|
return;
|
|
}
|
|
$body = $payload['pull_request']['body'];
|
|
$body = str_replace("\r\n", "\n", $body);
|
|
$body = explode("\n", $body);
|
|
$username = $payload['pull_request']['user']['login'];
|
|
$incltag = false;
|
|
$changelogbody = array();
|
|
$currentchangelogblock = array();
|
|
$foundcltag = false;
|
|
foreach ($body as $line) {
|
|
$line = trim($line);
|
|
if (substr($line,0,4) == ':cl:' || substr($line,0,4) == '🆑') {
|
|
$incltag = true;
|
|
$foundcltag = true;
|
|
$pos = strpos($line, " ");
|
|
if ($pos)
|
|
$username = substr($line, $pos+1);
|
|
continue;
|
|
} else if (substr($line,0,5) == '/:cl:' || substr($line,0,6) == '/ :cl:' || substr($line,0,5) == ':/cl:' || substr($line,0,5) == '/🆑' || substr($line,0,6) == '/ 🆑' ) {
|
|
$incltag = false;
|
|
$changelogbody = array_merge($changelogbody, $currentchangelogblock);
|
|
continue;
|
|
}
|
|
if (!$incltag)
|
|
continue;
|
|
|
|
$firstword = explode(' ', $line)[0];
|
|
$pos = strpos($line, " ");
|
|
$item = '';
|
|
if ($pos) {
|
|
$firstword = trim(substr($line, 0, $pos));
|
|
$item = trim(substr($line, $pos+1));
|
|
} else {
|
|
$firstword = $line;
|
|
}
|
|
|
|
if (!strlen($firstword)) {
|
|
$currentchangelogblock[count($currentchangelogblock)-1]['body'] .= "\n";
|
|
continue;
|
|
}
|
|
//not a prefix line.
|
|
//so we add it to the last changelog entry as a separate line
|
|
if (!strlen($firstword) || $firstword[strlen($firstword)-1] != ':') {
|
|
if (count($currentchangelogblock) <= 0)
|
|
continue;
|
|
$currentchangelogblock[count($currentchangelogblock)-1]['body'] .= "\n".$line;
|
|
continue;
|
|
}
|
|
$cltype = strtolower(substr($firstword, 0, -1));
|
|
switch ($cltype) {
|
|
case 'fix':
|
|
case 'fixes':
|
|
case 'bugfix':
|
|
$currentchangelogblock[] = array('type' => 'bugfix', 'body' => $item);
|
|
break;
|
|
case 'wip':
|
|
$currentchangelogblock[] = array('type' => 'wip', 'body' => $item);
|
|
break;
|
|
case 'rsctweak':
|
|
case 'tweaks':
|
|
case 'tweak':
|
|
$currentchangelogblock[] = array('type' => 'tweak', 'body' => $item);
|
|
break;
|
|
case 'soundadd':
|
|
$currentchangelogblock[] = array('type' => 'soundadd', 'body' => $item);
|
|
break;
|
|
case 'sounddel':
|
|
$currentchangelogblock[] = array('type' => 'sounddel', 'body' => $item);
|
|
break;
|
|
case 'add':
|
|
case 'adds':
|
|
case 'rscadd':
|
|
$currentchangelogblock[] = array('type' => 'rscadd', 'body' => $item);
|
|
break;
|
|
case 'del':
|
|
case 'dels':
|
|
case 'rscdel':
|
|
$currentchangelogblock[] = array('type' => 'rscdel', 'body' => $item);
|
|
break;
|
|
case 'imageadd':
|
|
$currentchangelogblock[] = array('type' => 'imageadd', 'body' => $item);
|
|
break;
|
|
case 'imagedel':
|
|
$currentchangelogblock[] = array('type' => 'imagedel', 'body' => $item);
|
|
break;
|
|
case 'typo':
|
|
case 'spellcheck':
|
|
$currentchangelogblock[] = array('type' => 'spellcheck', 'body' => $item);
|
|
break;
|
|
case 'experimental':
|
|
case 'experiment':
|
|
$currentchangelogblock[] = array('type' => 'experiment', 'body' => $item);
|
|
break;
|
|
case 'tgs':
|
|
$currentchangelogblock[] = array('type' => 'tgs', 'body' => $item);
|
|
break;
|
|
default:
|
|
//we add it to the last changelog entry as a separate line
|
|
if (count($currentchangelogblock) > 0)
|
|
$currentchangelogblock[count($currentchangelogblock)-1]['body'] .= "\n".$line;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (!count($changelogbody))
|
|
return;
|
|
|
|
$file = 'author: "'.trim(str_replace(array("\\", '"'), array("\\\\", "\\\""), $username)).'"'."\n";
|
|
$file .= "delete-after: True\n";
|
|
$file .= "changes: \n";
|
|
foreach ($changelogbody as $changelogitem) {
|
|
$type = $changelogitem['type'];
|
|
$body = trim(str_replace(array("\\", '"'), array("\\\\", "\\\""), $changelogitem['body']));
|
|
$file .= ' - '.$type.': "'.$body.'"';
|
|
$file .= "\n";
|
|
}
|
|
$content = array (
|
|
'branch' => $payload['pull_request']['base']['ref'],
|
|
'message' => 'Automatic changelog generation for PR #'.$payload['pull_request']['number'].' [ci skip]',
|
|
'content' => base64_encode($file)
|
|
);
|
|
$scontext = array('http' => array(
|
|
'method' => 'PUT',
|
|
'header' =>
|
|
"Content-type: application/json\r\n".
|
|
'Authorization: token ' . $apiKey,
|
|
'content' => json_encode($content),
|
|
'ignore_errors' => true,
|
|
'user_agent' => 'tgstation13.org-Github-Automation-Tools'
|
|
));
|
|
$filename = '/html/changelogs/AutoChangeLog-pr-'.$payload['pull_request']['number'].'.yml';
|
|
echo file_get_contents($payload['pull_request']['base']['repo']['url'].'/contents'.$filename, false, stream_context_create($scontext));
|
|
}
|
|
|
|
function sendtoallservers($str) {
|
|
global $servers;
|
|
foreach ($servers as $serverid => $server) {
|
|
if (isset($server['comskey']))
|
|
$rtn = export($server['address'], $server['port'], $str.'&key='.$server['comskey']);
|
|
else
|
|
$rtn = export($server['address'], $server['port'], $str);
|
|
|
|
echo "Server Number $serverid replied: $rtn\n";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function export($addr, $port, $str) {
|
|
global $error;
|
|
// All queries must begin with a question mark (ie "?players")
|
|
if($str{0} != '?') $str = ('?' . $str);
|
|
|
|
/* --- Prepare a packet to send to the server (based on a reverse-engineered packet structure) --- */
|
|
$query = "\x00\x83" . pack('n', strlen($str) + 6) . "\x00\x00\x00\x00\x00" . $str . "\x00";
|
|
|
|
/* --- Create a socket and connect it to the server --- */
|
|
$server = socket_create(AF_INET,SOCK_STREAM,SOL_TCP) or exit("ERROR");
|
|
socket_set_option($server, SOL_SOCKET, SO_SNDTIMEO, array('sec' => 2, 'usec' => 0)); //sets connect and send timeout to 2 seconds
|
|
if(!socket_connect($server,$addr,$port)) {
|
|
$error = true;
|
|
return "ERROR";
|
|
}
|
|
|
|
|
|
/* --- Send bytes to the server. Loop until all bytes have been sent --- */
|
|
$bytestosend = strlen($query);
|
|
$bytessent = 0;
|
|
while ($bytessent < $bytestosend) {
|
|
//echo $bytessent.'<br>';
|
|
$result = socket_write($server,substr($query,$bytessent),$bytestosend-$bytessent);
|
|
//echo 'Sent '.$result.' bytes<br>';
|
|
if ($result===FALSE) die(socket_strerror(socket_last_error()));
|
|
$bytessent += $result;
|
|
}
|
|
|
|
/* --- Idle for a while until recieved bytes from game server --- */
|
|
$result = socket_read($server, 10000, PHP_BINARY_READ);
|
|
socket_close($server); // we don't need this anymore
|
|
|
|
if($result != "") {
|
|
if($result{0} == "\x00" || $result{1} == "\x83") { // make sure it's the right packet format
|
|
|
|
// Actually begin reading the output:
|
|
$sizebytes = unpack('n', $result{2} . $result{3}); // array size of the type identifier and content
|
|
$size = $sizebytes[1] - 1; // size of the string/floating-point (minus the size of the identifier byte)
|
|
|
|
if($result{4} == "\x2a") { // 4-byte big-endian floating-point
|
|
$unpackint = unpack('f', $result{5} . $result{6} . $result{7} . $result{8}); // 4 possible bytes: add them up together, unpack them as a floating-point
|
|
return $unpackint[1];
|
|
}
|
|
else if($result{4} == "\x06") { // ASCII string
|
|
$unpackstr = ""; // result string
|
|
$index = 5; // string index
|
|
|
|
while($size > 0) { // loop through the entire ASCII string
|
|
$size--;
|
|
$unpackstr .= $result{$index}; // add the string position to return string
|
|
$index++;
|
|
}
|
|
return $unpackstr;
|
|
}
|
|
}
|
|
}
|
|
//if we get to this point, something went wrong;
|
|
$error = true;
|
|
return "ERROR";
|
|
}
|
|
?>
|