I tested this plugin and liked it but I have comment and suggest:
The comment:
PHP Code:
CheckAccounts( id )
{
new szPassword[ MAX_PASSWORD_LENGTH ];
get_user_info( id, "_pw", szPassword, charsmax( szPassword ) );
if( TrieGetArray( g_tDatabase, g_iPlayer[ id ][ AuthID ], eData, sizeof eData ) || TrieGetArray( g_tDatabase, g_iPlayer[ id ][ Name ], eData, sizeof eData ) || TrieGetArray( g_tDatabase, g_iPlayer[ id ][ IP ], eData, sizeof eData ))
{
if( ( eData[ Player_Password ][ 0 ] && equal( eData[ Player_Password ], szPassword ) ) || !eData[ Player_Password ][ 0 ] )
{
if( eData[ Player_Prefix ][ 0 ] )
{
cm_set_user_prefix( id, eData[ Player_Prefix ] )
}
if( eData[ Player_Flags ][ 0 ] )
{
remove_user_flags( id );
set_user_flags( id, read_flags( eData[ Player_Flags ] ) );
}
if( eData[ Player_VIPFlags ][ 0 ] )
{
g_iPlayer[ id ][ VIP ] |= read_flags( eData[ Player_VIPFlags ] );
}
}
else if( eData[ Player_Password ][ 0 ] && ! equal( eData[ Player_Password ], szPassword ) )
{
server_cmd( "kick #%d ^"You have no entry to this server^"", get_user_userid( id ) );
}
}
}
As you can see I want to create a custom prefix from another file, This native "cm_set_user_prefix" work like replace the old prefix to the new one, So if I don't put anything in the 'Custom Prefix' or 'Admin Prefix' etc section of the 'ChatManager.ini' file, the prefix will not appear but the colorful chat will appear.
PHP Code:
func: UpdateData(id)
//g_ePlayerData[id][PDATA_PREFIX][0] = EOS // Disable this line
The suggest:
I suggest you to add swear filter or anti swearing etc.:
PHP Code:
for( new szSwear[ MAX_FMT_LENGTH ], iPos, i; i < ArraySize( g_aSwearFilter ); i++ )
{
ArrayGetString( g_aSwearFilter, i, szSwear, charsmax( szSwear ) );
if( ( iPos = containi( szArgs, szSwear ) ) != -1 )
{
new iLen = strlen( szSwear )
while( iLen-- )
{
szArgs[ iPos++ ] = '*';
}
}
}
Edit:
Clear data when the client is disconnected, clear the prefix variable only when the client is connected and disconnected or create a custom variable for the prefix native
__________________