Topic: help please,for change /clearstats [username] for /clearstats [OK]
this is code
static int _handle_clearstatsadmin_command(t_connection * c, char const *text)
{
t_account * account;
t_account * accfrom;
char const *accname;
unsigned int i,j;
char const * arg1;
char *tagfrom=0;
char *tagto=0;
t_channel const * channel;
t_connection * kuc;
arg1=text = skip_command(text);
accname = arg1;
if (arg1[0] =='\0')
{
message_send_text(c,message_type_info,c,"usage: /clearstatsadmin <username>");
}
if (!(account = accountlist_find_account(accname)))
{
message_send_text(c,message_type_error,c,"Invalid user.");
return 0;
}
_reset_scw2_stats(account,CLIENTTAG_BROODWARS_UINT,c);
account_set_numattr(account,"BNET\\acct\\durtime",0);
sprintf(msgtemp,"Clear Stats By Admin '%s'",arg1);
message_send_text(c,message_type_error,c,msgtemp);
eventlog(eventlog_level_fatal,__FUNCTION__,"[Command] %s : %s",account_get_name(conn_get_account(c)),text);
return 0;
}
thanks for your help and time