<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<p>F L H O O K<br />
=============<br />
version: 1.5.5</p>
<p>================================================================================<br />
== INSTALLATION ================================================================<br />
================================================================================<br />
FLHOOK ONLY WORKS WITH FLSERVER 1.1. USING IT WITH 1.0 WILL CRASH FLSERVER!!!</p>
<p>copy the files from "bin" to your freelancer/exe directory and edit the FLHook.ini<br />
in order to suite your needs.<br />
there are 3 different ways to start flhook:<br />
1) open dacomsrv.ini in "...\freelancer\exe" and append FLHook.dll to the <br />
[Libraries] section. flserver will load flhook whenever you start it.<br />
2) execute FLHookStart.exe while flserver.exe is already running. this will<br />
inject FLHook into the running process.<br />
3) execute FLHookStart.exe with "execute ..." as command line. this will start<br />
flserver.exe along with FLHook. the rest of the command line will be passed<br />
on to the server. FLHook console will be shown as soon as the loading-process<br />
has finished<br />
(note: the old patch is not needed anymore, use 1) instead)</p>
<p>================================================================================<br />
== CONFIG ======================================================================<br />
================================================================================<br />
take a look at the comments in FLHook.ini</p>
<p>================================================================================<br />
== ADMIN-COMMANDS ==============================================================<br />
================================================================================<br />
commands can be executed by administrators in several ways:<br />
- using the FLHook console(-> access to all commands)<br />
- ingame by typing .command in the chat(e.g. .getcash Player1)<br />
this will only work when you own the appropriate rights which may be set via<br />
the setadmin command. FLHook will store the rights of each player in his<br />
account-directory in flhookadmin.ini.<br />
- via a socket connection in raw text mode(e.g. with putty)<br />
connect to the port given in the FLHook.ini and enter "PASS password". after<br />
having successfuly logged in you may enter all of the commands you want(as<br />
long as you have the neccessary rights). you may have several socket connections<br />
at the same time. exiting the connection may be done by entering "quit" or simply<br />
by closing it.</p>
<p>- CASH -<br />
all cash functions work no matter if the player is currently logged in or not<br />
getcash <charname><br />
shows current account balance of <charname><br />
setcash <charname> <amount><br />
sets current account balance of <charname> to <amount><br />
setcashsec <charname> <oldmoney> <amount><br />
sets current account balance of <charname> to <amount>, only works when his old account balance is <oldmoney><br />
addcash <charname> <amount><br />
adds <amount> to the current account balance of <charname><br />
addcashsec <charname> <oldmoney> <amount><br />
adds <amount> to the current account balance of <charname>, only works when his old account balance is <oldmoney></p>
<p>- KICK/BAN -<br />
kick <charname> <reason><br />
disconnects <charname>. the user will be displayed <reason>, if it is specified.<br />
ban <charname><br />
bans <charname>'s account<br />
<charname> stays connected if he's currently on the server<br />
unban <charname><br />
unbans <charname>'s account<br />
kickban <charname> <reason><br />
kicks and bans <charname> (2 in 1, same as kick <charname> <reason>, ban <charname>)</p>
<p>- MSG -<br />
msg <charname> <text><br />
private message <text> to <charname> (shown as "Console: <text>")<br />
msgs <systemname> <text><br />
send <text> to all players in <systemname> (shown as "Console: <text>")<br />
<systemname> must be the either the system-id or the shortname (like Li01)<br />
msgu <text><br />
message <text> to the whole universe (shown as "Console: <text>")<br />
fmsg <charname> <xmltext><br />
private message <xmltext> to <charname> (see XMLTEXT section for further details)<br />
fmsgs <systemname> <xmltext><br />
send <xmltext> to all players in <systemname> (see XMLTEXT section for further details)<br />
fmsgu <xmltext><br />
message <xmltext> to the whole universe (see XMLTEXT section for further details)</p>
<p>- BEAM/KILL -<br />
beam <charname> <basename><br />
force <charname> to land on <basename> (player must be in space)<br />
<basename> must be either the shortname(like Li01_01_Base for manhatten) or a shortcut defined in the FLHook.ini<br />
note: see the issues section below<br />
kill <charname><br />
kills <charname></p>
<p>- REPUTATION -<br />
resetrep <charname><br />
sets <charname>'s reputations to the one specified in "mpnewcharacter.fl"<br />
setrep <charname> <repgroup> <value><br />
set <charname>'s reputation for <repgroup> to <value>. <value> sohuld be between -1 and 1.<br />
example:<br />
"setrep playerxy li_n_grp 0.7"<br />
-> set playerxy's reputation for liberty navy to 0.7</p>
<p>- CARGO -<br />
cargo commands only work when the targeted player is ingame<br />
enumcargo <charname><br />
lists <charname>'s cargo, first reply will be the remaining hold size<br />
addcargo <charname> <good> <count> <mission><br />
adds <count> numbers of <good>(shortname like co_gun01_mark02,commodity_silver,etc OR hash) to <charname>'s cargo<br />
if <mission> is set to 1, the cargo is declared as mission cargo<br />
note: see issues<br />
removecargo <charname> <id> <count><br />
removes <count> numbers of <id>(this must be the value from enumcargo's "id=" reply) from <charname></p>
<p>- CHARACTERS -<br />
rename <oldcharname> <newcharname><br />
rename <oldcharname> to <newcharname> (player will be kicked if he's logged in <oldcharname>'s account)<br />
deletechar <charname><br />
delete <charname> (player will be kicked if he's logged in <oldcharname>'s account)<br />
readcharfile <charname><br />
reads <charname>'s userfile(xxx.fl) and prints it(each line will be preceded by "l ")<br />
writecharfile <charname> <data><br />
writes <data> into <charname>'s userfile(xxx.fl). existing charfile will be overwritten. you should<br />
be careful with this one because a corrupted charfile may lead to server crashes and flhook does <br />
not do any syntax checks on <data>.<br />
NOTE: YOU MUST REPLACE LINE-WRAPS WITH \n(TEXT)<br />
example:<br />
writecharfile playerxy [Player]\ndescription = 00300034002f0031003\n\n ... etc.</p>
<p>- SETTINGS -<br />
setadmin <charname> <rights><br />
set <charname> as ingame-admin with <rights> (affects all characters on the account) (see RIGHTS section below)<br />
getadmin <charname><br />
show <charname>'s rights<br />
deladmin <charname><br />
revoke <charname>'s ingame-admin-status<br />
rehash<br />
reload the flhook.ini in order to activate changed settings, this works for everything except the socket-settings<br />
unload<br />
unload flhook(flserver will keep on running flawlessly)<br />
this is very useful since it allows you to install a new flhook version on-the-fly. simply unload, replace the files<br />
and execute FLHookStart.exe<br />
the command will kick players with an active moneyfixlist(don't bother).</p>
<p>- OTHER -<br />
getgroupmembers <charname><br />
returns all players which are in a group with <charname><br />
getbasestatus <basename><br />
returns the hull status of a base. when the base hasn't been created in space yet it returns 0.<br />
getclientid <charname><br />
gets <charname>'s client id<br />
getplayerinfo <charname><br />
get <charname>'s info<br />
xgetplayerinfo <charname><br />
same as getplayerinfo, except that result is shown in a more readable format<br />
getplayers<br />
get player info for all players on the server (players in charselect menu will not be shown)<br />
xgetplayers<br />
same as getplayers, except that result is shown in a more readable format<br />
getplayerids<br />
shows all players on the server with their client-id in a short format(useful when ingame)<br />
getaccountdirname <charname><br />
get account-dirname of <charname><br />
getcharfilename <charname><br />
get char-filename of <charname><br />
savechar <charname><br />
save <charname>'s current info to disk<br />
isloggedin <charname><br />
check if <charname> is logged in on the server<br />
isonserver <charname><br />
check if <charname> is connected(this includes idleness in charselect menu) to the server<br />
NOTE: isonserver will also return true, when another char on the same account is logged in!<br />
serverinfo<br />
shows server load, whether npc spawn is currently enabled or disabled(see ini) and uptime.<br />
the format for the uptime is: days:hours:minutes:seconds<br />
moneyfixlist<br />
show players with active money-fix<br />
help<br />
get a list of all commands<br />
<br />
- MISC INFOS -<br />
you can use client-ids instead of <charname> by appending $ to the cmd.<br />
examples: <br />
getcash$ 12<br />
kickban$ 1<br />
etc.</p>
<p>you can also use "shortcuts" instead of the whole character-name for a currently logged in player by appending<br />
& to the cmd. FLHook traverses all logged in players and checks if their character-name contains<br />
<charname>(case insensitive) and if so, the command will operate on this player. an error will be shown if the <br />
searchstring given in <charname> is ambiguous.<br />
examples (let's assume there are 2 players logged in: "superhax0r" and "..::[]SUPERNERD[]::.."):<br />
"kick& nerd" kicks "..::[]SUPERNERD[]::.." because his nick contains "nerd"<br />
"getcash& super" fails because there are multiple character names containing "super"</p>
<p>all commands return "OK" when successful or "ERR <errortext>" when error occured</p>
<p>================================================================================<br />
== RIGHTS ======================================================================<br />
================================================================================<br />
rights may be seperated by a comma (e.g. setadmin playerxy cash,kickban,msg)<br />
superadmin -> everything<br />
cash -> cash commands<br />
kickban -> kick/ban commands<br />
beam -> beam/kill/resetrep/setrep command<br />
msg -> msg commands<br />
savechar -> savechar command<br />
cargo -> cargo commands<br />
chars -> rename/deletechar/readcharfile/writecharfile<br />
eventmode -> eventmode (only when connected via socket)<br />
all other commands except setadmin/getadmin/deladmin may be executed by all admins</p>
<p>================================================================================<br />
== XMLTEXT =====================================================================<br />
================================================================================</p>
<p>the fmsg* commands allow you to format text in several ways(like in the exe\misctext.dll)<br />
text is enclosed in <TEXT></TEXT> tags while the format can be changed with <TRA .../><br />
nodes-names must be written in capital chars! <br />
be sure to replace the following characters within a text-node:<br />
< -> &#60; <br />
> -> &#62;<br />
& -> &#38;</p>
<p>- <TRA .../> NODE SYNTAX -<br />
the data field of a TRA node consists of an RGB value along with format specifications:<br />
<TRA data="0xBBGGRRFF" mask="-1"/><br />
BB is the blue value<br />
GG is the green value<br />
RR is the red value<br />
FF is the format value<br />
(all in hexadecimal representation)</p>
<p>format flags are:<br />
bin hex dec effect<br />
00000001 1 1 bold<br />
00000010 2 2 italic<br />
00000100 4 4 underline<br />
00001000 8 8 big<br />
00010000 10 16 big&wide<br />
00100000 20 32 very big<br />
01000000 40 64 smoothest?<br />
10000000 80 128 smoother?<br />
10010000 90 144 small<br />
simply add the flags to combine them (e.g. 7 = bold/italic/underline)</p>
<p>examples:<br />
fmsgu <TRA data="0x1919BD01" mask="-1"/><TEXT>A player has died: Player</TEXT><br />
this is similar to the standard die-msg(which is shown in bold)<br />
fmsgu <TRA data="0xFF000003" mask="-1"/><TEXT>Hello</TEXT><TRA data="0x00FF0008" mask="-1"/> <TEXT>World</TEXT><br />
this will show "Hello World" ("Hello" will be blue/bold/italic and "World" green/big)</p>
<p>================================================================================<br />
== EVENTMODE ===================================================================<br />
================================================================================<br />
socket connections may be set to eventmode by entering "eventmode". from then on <br />
you will receive several event-notifications listed below. once activated, <br />
eventmode runs until you close the connection.</p>
<p>- NOTIFICATIONS -<br />
chat from=<player> id=<client-id> type=<type> [to=<recipient> idto=<recipient-client-id>] text=<text><br />
<player>: charname sending the message<br />
<client-id>: client-id of sender<br />
<type>: either universe,system or player<br />
<recipient>/<recipient-client-id>: only sent when type=player<br />
<text>: guess ...</p>
<p>kill victim=<player> type=<type> [by=<killer>]<br />
<player>: charname of the victim<br />
<type>: selfkill,player,npc,suicide<br />
<killer>: charname of the killer</p>
<p>login char=<player> accountdirname=<dirname> id=<client-id> ip=<ip><br />
occurs when player selects a character in the character-select menu</p>
<p>launch char=<player> id=<client-id> base=<basename> system=<systemname><br />
occurs when player undocks from a base/planet</p>
<p>baseenter char=<player> id=<client-id> base=<basename> system=<systemname><br />
occurs when player enters base<br />
<br />
baseexit char=<player> id=<client-id> base=<basename> system=<systemname><br />
occurs when player exits base(includes disconnect/f1)</p>
<p>jumpin char=<player> id=<client-id> system=<systemname><br />
occurs when player jumps in a system<br />
<br />
switchout char=<player> id=<client-id> system=<systemname><br />
occurs when player switches out a system</p>
<p>spawn char=<player> id=<client-id> system=<systemname><br />
occurs when player selects a character and launches in space</p>
<p>connect id=<client-id> ip=<ip><br />
occurs when player connects to the server</p>
<p>disconnect char=<player> id=<client-id><br />
occurs when player disonnects from the server</p>
<p>================================================================================<br />
== USER-COMMANDS ===============================================================<br />
================================================================================<br />
user commands may be entered ingame by every player in chat and can be enabled<br />
or disabled in the ini. enter them ingame to get a description.</p>
<p>/set diemsg xxx<br />
while xxx must be one of the following values:<br />
- all = all deaths will be displayed<br />
- system = only display deaths occuring in the system you are currently in<br />
- self = only display deaths the player is involved in(either as victim or killer)<br />
- none = don't show any death-messages<br />
settings keep saved in flhookuser.ini and affect all characters on the account</p>
<p>/set diemsgsize <small/default><br />
- change the size of the diemsgs</p>
<p>/set chatfont <size> <style><br />
<size>: small, default or big<br />
<style>: default, bold, italic or underline<br />
this let's every user adjust the appearance of the chat-messages</p>
<p>/autobuy <...><br />
let ammo be bought automatically whenever you enter a base. enter the command<br />
ingame to get a description</p>
<p>/ignore <charname> [<flags>]<br />
ignore chat from certain players</p>
<p>/ignoreid <client-id> [<flags>]<br />
ignore by client-id<br />
<br />
/delignore <id> [<id2> <id3> ...]<br />
delete ignore entry<br />
<br />
/ignorelist<br />
display ignore list<br />
<br />
/ids<br />
show client-ids of all players</p>
<p>/id<br />
show own client-id<br />
<br />
/i$ <client-id> and /invite$ <client-id><br />
invite player to group by client-id</p>
<p>================================================================================<br />
== LOGGING =====================================================================<br />
================================================================================<br />
flhook logfiles are created in "My Documents\My Games\Freelancer\Accts\MultiPlayer".</p>
<p>flhook_kicks.log:<br />
idle-/ping-/loss-/corruptedcharfile-/ipban-/hostban-kicks<br />
flhook_cheaters.log:<br />
detected cheating</p>
<p>there is also a flhook.log file in the exe dir. it mainly contains debug data.<br />
so don't care about this one.</p>
<p>================================================================================<br />
== KNOWN ISSUES ================================================================<br />
================================================================================<br />
- crashes/performance:<br />
FLHook is very resistant to server crashes. we've had it running on hhc for<br />
weeks without any major problems. however in case you encounter any crashes<br />
which are obviously related to FLHook please contact me.<br />
- the beam command causes seldom infrequent problems. i haven't figured out the<br />
reason for that yet. in this case the player who is about to be beamed will<br />
be kicked from the server by flhook because the server might crash else.<br />
i've made some improvements here. i hope it works now.<br />
- the sender in the standard chat messages appear a little bit smaller when<br />
"/set chatfont" is enabled<br />
- calculation of the "loss" has been improved but is still problematic. players with<br />
low bandwidth tend to have a very high loss while they're loading, so this may<br />
lead to some problems. i don't recommend using the loss-kick at this moment.</p>
<p>================================================================================<br />
== SOURCE CODE =================================================================<br />
================================================================================<br />
FLHook compiles on both vc7 and vc6<br />
Note:<br />
flserver uses string-class arguments in some of its functions(f. e. <br />
PlayerDB::FindAccountFromCharacterName(...)). when you compile since FLHook with <br />
vc7, which uses a different stl, you can't simply pass strings. that's why<br />
i created the FLHookWString.dll which was compiled with vc6 and just exports<br />
two functions to create/delete flserver compatible strings. if you don't have<br />
vc6 installed then use the FLHookWString.dll from bin and thats it.</p>
<p>if you want the full header files/libs of all of the relevant flserver dlls then <br />
take a look at FLCoreSDK(www.skif.be). it contains everything you need.</p>
<p>please note:<br />
I WILL NOT TEACH YOU HOW TO CODE, I WILL NOT TELL YOU HOW TO REVERSE FLSERVER <br />
AND I WILL NOT REPLY TO "STUPID" QUESTIONS REGARDING THE SOURCE</p>
<p>================================================================================<br />
== CREDITS =====================================================================<br />
================================================================================<br />
programmed & documented by mc_horst<br />
BIG THX to w0dk4 and Niwo for testing and the whole Hamburg City Server adminteam <br />
for the suggestions and feedback</p>
<p>contact: find me on www.freelancerserver.de or #hc-flserver (quakenet)</p>
<p>FLHook uses a slighty modified version of flcodec.c</p>
<p>================================================================================<br />
== CHANGELOG ===================================================================<br />
================================================================================</p>
<p>1.5.5 (official)<br />
=====<br />
- bug: rename bug fixed</p>
<p>1.5.4<br />
====<br />
- bug: /g fixed<br />
- bug: deletechar fixed</p>
<p>1.5.1<br />
=====<br />
- ini: bans added</p>
<p>1.5.0<br />
=====<br />
- cmd: setrep added<br />
- source: LOG_* macros removed<br />
- source: compiles with vc6 now! (thanks to Mischa)<br />
- bugfix: FLHookStart works on Win2k now(thx to Mischa)<br />
- usercmd: /ignoreid, /ids, /id, /i$, /invite$ added</p>
<p>1.4.9<br />
=====<br />
- renamebug fixed: renamed chars are now shown in the account list of flserver<br />
- bugfix: autobuy now checks if player has neccessary rep<br />
- ini: MultiKillMessages added<br />
- usercmd: "/set diemsgsize" added<br />
- cmd: resetrep added<br />
- cmd: getgroupmembers added<br />
- ini: maximum groupsize can be altered</p>
<p>1.4.7<br />
=====<br />
- autobuy fixed<br />
- disconnectrelay fixed<br />
- ChangeCruiseDisruptorBehaviour fixed</p>
<p>1.4.6<br />
=====<br />
- usercmd: /autobuy added<br />
- usercmd: /delignore may be called with multiple ids now</p>
<p>1.4.4<br />
=====<br />
- "reserved slots" added<br />
- ini: DisconnectDelay added<br />
- cmd: getbasestatus added<br />
- eventmode: basedestroy added</p>
<p>1.4.3<br />
=====<br />
- usercmd: /ignore, /ignorelist, /delignore added</p>
<p>1.4.2 (official)<br />
=====<br />
- minor changes</p>
<p>1.4.1<br />
=====<br />
- kill command added<br />
- ini: DeathMsgTextAdminKill added<br />
- bug: security bug fixed(thx to ET90)<br />
- fix: memory leak in getplayers/getplayerinfo fixed</p>
<p>1.4.0<br />
=====<br />
- typos in death msg fixed<br />
- ini: new [Style] settings added<br />
- "connect" event added<br />
- cmd: serverinfo shows uptime<br />
- new commands: xgetplayers/xgetplayerinfo<br />
- ini: AntiF1 added</p>
<p>1.3.9<br />
=====<br />
- bugfix: /s bug fixed<br />
- source-code cleanup<br />
- anti-cheat check("Negative good-count") also when character logs in<br />
- cmd: new feature called "shortcut"(very useful when command targets ingame player)<br />
see bottom of "ADMIN-COMMANDS" section for explanation<br />
- unload automatically kicks players with moneyfixlist<br />
- cmd: serverinfo added<br />
- kickmsg added, you can alter the appearance of the reason in the ini<br />
- you can now enter a reason in the kick/kickban command<br />
- ini restructured (plz take a look at it!)<br />
- ini: UserCmdStyle/AdminCmdStyle added to modify the appearance of ingame command-replies<br />
- new eventmode notifications</p>
<p>1.3.8<br />
=====<br />
- flhook tries to detect corrupted charfiles and kicks player(notification will be added to flhook_kicks.log)<br />
if you have a charfile that still crashes the server then let me know<br />
- ini: DisableNPCSpawns added</p>
<p>1.3.7<br />
=====<br />
- kicks get logged to flhook_kicks.log<br />
- lossdata measuring-intervall set to 4sec<br />
- rename bug fixed</p>
<p>1.3.6<br />
=====<br />
- cmd: rename/deletechar added<br />
- anticheat: "selling more good than possible" detected(notification will be added to flhook_cheaters.log and player will get banned)<br />
- ini: pingkick/losskick added<br />
- cmd: "loss=" in getplayers now shows a reasonable result(it's an average value calculated by LossKickFrame setting)</p>
<p>1.3.5 (official)<br />
=====<br />
- bugfix: deathmsg was shown twice when "/set diemsg" was disabled</p>
<p>1.3.4<br />
=====<br />
- /u universe message bug fixed</p>
<p>1.3.3<br />
=====<br />
- rights: "setting" removed(was equal to superadmin)<br />
- closing the flhook console will unload flhook(no more crashes)<br />
- ini: wport option added for unicode socket connections<br />
- ini: user commands may be enabled/disabled</p>
<p>1.3.2<br />
=====<br />
- cmd: getplayerinfo added<br />
- cmd: getplayers shows ip/loss (not tested yet)<br />
- beam exception leads to player kick(the cmd is save now)<br />
- cruise disruptor behaviour may be changed(see ini)</p>
<p>1.3.0<br />
=====<br />
- IServerImpl now entirely hooked in HkIServerImpl.cpp<br />
- cmd: getplayers shows ping</p>
<p>1.2.9<br />
=====<br />
- usercmd: "/set chatfont" added<br />
- submitchat exception fixed?<br />
- killmsg: death-fuse issue solved<br />
- savechar after trade (to prevent cheating when server crashes)<br />
- anti-baseidle added<br />
- cmd: addcargo/removecargo/enumcargo added<br />
- source-code cleanup<br />
- bug: addcash/getcash now work with clientid as argument</p>
<p>1.2.8<br />
=====<br />
- ingame admin-command replies shown in a new format<br />
- new readme.txt<br />
- cmd: ban/unban changed<br />
- ini changed<br />
- print functions enhanced<br />
- cmd: moneyfixlist added</p>
<p>1.2.7<br />
=====<br />
- bug: getcash bug(player in charmenu) fixed</p>
<p>1.2.6<br />
=====<br />
- bug: /leave bug in msg-cmd fixed <br />
- bug: special-char bug in socket connection fixed <br />
- killmsg: shows "xxx has died" when freighter with death-fuse was destroyed<br />
- cmd: addcash/setcash now work flawlessly without kicks</p>
<p>1.2.5<br />
=====<br />
- xml format docu enhancements (however color="#..." doesnt work correctly)<br />
- eventmode: login shows clientid<br />
- diemsg bug fixed(player with <,> or & in their name had no die-msgs)<br />
- cmd: isloggedin now returns false when player is in charmenu<br />
- cmd: addcash/setcash now kick when player is logged in with a different char from same the account<br />
- socket: bugfix, more than 1 cmd in one tcp packet now allowed (seperated by \n or \r\n)<br />
- improved kill detection(now works with death-fuses?)</p>
<p>1.2.4<br />
=====<br />
- charfile encryption disabled</p>
<p>1.2.3<br />
=====<br />
- die-msg suppress fixed<br />
- cmd: isloggedin added<br />
- cmd: isonserver changed<br />
- usercmd: /set diemsg added</p>
<p>1.2.2<br />
=====<br />
- fmsg added with xml-syntax<br />
- eventmode: login added<br />
- eventmode: chat spams id= and idto=<br />
- try-catch statements added in callbacks<br />
- release-mode-compilation finally works<br />
- readme.txt added</p>
<p></p>
</body>
</html>