Fixed amb1219 - Proper tokenising of sm_addban
authorMatt Woodrow <pred@alliedmods.net>
Sun Dec 02 01:59:19 2007 +0000 (2007-12-02)
changeset 1736c40db9557030
parent 1735 d6966e3316e9
child 1737 c8b591736ce0
Fixed amb1219 - Proper tokenising of sm_addban
plugins/basebans.sp
     1.1 --- a/plugins/basebans.sp	Sun Dec 02 01:51:48 2007 +0000
     1.2 +++ b/plugins/basebans.sp	Sun Dec 02 01:59:19 2007 +0000
     1.3 @@ -209,7 +209,6 @@
     1.4  	}
     1.5  
     1.6  	decl String:arg_string[256];
     1.7 -	new String:reason[128];
     1.8  	new String:time[50];
     1.9  	new String:authid[50];
    1.10  
    1.11 @@ -228,9 +227,12 @@
    1.12  	/* Get steamid */
    1.13  	if ((len = BreakString(arg_string[total_len], authid, sizeof(authid))) != -1)
    1.14  	{
    1.15 -		/* Get reason */
    1.16  		total_len += len;
    1.17 -		BreakString(arg_string[total_len], reason, sizeof(reason));
    1.18 +	}
    1.19 +	else
    1.20 +	{
    1.21 +		total_len = 0;
    1.22 +		arg_string[0] = '\0';
    1.23  	}
    1.24  
    1.25  	/* Verify steamid */
    1.26 @@ -248,11 +250,11 @@
    1.27  			  client, 
    1.28  			  minutes, 
    1.29  			  authid, 
    1.30 -			  reason);
    1.31 +			  arg_string[total_len]);
    1.32  	BanIdentity(authid, 
    1.33  				minutes, 
    1.34  				BANFLAG_AUTHID, 
    1.35 -				reason, 
    1.36 +				arg_string[total_len], 
    1.37  				"sm_addban", 
    1.38  				client);
    1.39