|
Re: Scripts detect chat? [message #178767 is a reply to message #178752] |
Fri, 11 November 2005 06:08 |
dead6re
Messages: 602 Registered: September 2003
Karma: 0
|
Colonel |
|
|
The scripts.dll cannot detect any messages from the RenFDS. So you have to search the logs.
Unless im wrong, you can't. Sorry.
Let all your wishes be granted except one, so you will still have something to strieve for.
|
|
|
Re: Scripts detect chat? [message #178843 is a reply to message #178752] |
Fri, 11 November 2005 16:21 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
You're wrong. Use the chathooks, i think it says how to use them in bhs.txt or console.txt.
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
|
Re: Scripts detect chat? [message #178906 is a reply to message #178752] |
Sat, 12 November 2005 03:10 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
Quote: | There is also a hook that lets custom scripts.dll mods (e.g. server-side mods) get access to all f2/f3 chat that passes through the server.
You create a function of the form
void Chat_Hook(int PlayerID,int Type,const char *Message)
Then you pass the function to AddChatHook (defined in engine.h)
If the chathook is called Chat_Hook, put the line AddChatHook(Chat_Hook); somewhere in your code. (e.g. somewhere that is called on startup)
Then, the function gets called everytime f2/f3 chat passes through the server.
PlayerID is the player ID of the player that sent the chat.
Type is 1 for team mesasge and 0 for everyone message.
Message is the message itself. If you need to save the message data for later use, copy the string, dont save the pointer passed into your chat
hook function, copy the data somewhere else.
You can only have one chat hook function registered at any one time. Also, if you want to have no chat hook at all registered, pass NULL to AddChatHook.
This works on the server regardless of if clients have bhs.dll
|
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
|