Raised This Month: $ Target: $400
 0% 

Invalid Character in Name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 12-24-2007 , 17:47   Re: Invalid Character in Name
Reply With Quote #2

To start with...
Code:
new const bad_names[][] = {"`","~"};
-->
Code:
new const bad_names[] = {'`','~'};

Then...
Code:
public checkname(id){     new name[32];     get_user_name(id, name, 31);     new uid = get_user_userid(id);     new len = strlen(name);         if ( is_user_admin(id) )         return PLUGIN_CONTINUE;         for ( new i = 0 ; i < sizeof bad_names - 1 ; i++ ) {         for ( new j = 0 ; j < len ; j++ ) {             if ( name[j] == bad_names[i] ) {                 kickuser(uid);                 return PLUGIN_CONTINUE;             }         }     }     return PLUGIN_CONTINUE; }

Last edited by [ --<-@ ] Black Rose; 12-24-2007 at 17:51.
[ --<-@ ] Black Rose is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode