/* This source code is protected under the GNU General Public License (GPL), found at http://www.gnu.org/licenses/gpl.html */ #include #define minPrpSze 0x0090 #define maxPrpSze 0x0820 AnyType initializeServerPlugin( PluginID pluginID, int argc, char *argv[ ] ) { FormattedLogMessage( NULL, "Standard Props", "v2.0 (2004-2006) by Paul Taylor (Janus) " ); return ( AnyType ) pluginID; } ClientMsg * handleMessage( ServerState *state, AnyType pluginDat, ClientMsg *msg ) { if ( msg->eventType == MSG_ASSETREGI ) if ( ( ( AssetBlockPtr ) &msg->msg )->blockSize < minPrpSze || ( ( AssetBlockPtr ) &msg->msg )->blockSize > maxPrpSze || ( ( AssetBlockPtr ) &msg->msg )->blockOffset < 0 || ( ( AssetBlockPtr ) &msg->msg )->blockNbr ) { UserMessage( state->currentUser, "The prop you tried using (%ld), is not within size limits of this server.", ( ( AssetBlockPtr ) &msg->msg )->spec.id ); ChangeUserProp( state->currentUser, 0, NULL ); sendMsgUserProp( toUser( state->currentUser ), state->currentUser, 0, NULL ); return NULL; } return msg; }