mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 01:26:50 -04:00
Bump up max number of arguments for client commands from 10 to 50
This commit is contained in:
parent
54a223f691
commit
0046c544f4
@ -262,8 +262,8 @@ static struct ChatCommand* Commands_FindMatch(const String* cmdName) {
|
||||
|
||||
static void Commands_PrintDefault(void) {
|
||||
String str; char strBuffer[STRING_SIZE];
|
||||
String name;
|
||||
struct ChatCommand* cmd;
|
||||
String name;
|
||||
|
||||
Chat_AddRaw("&eList of client commands:");
|
||||
String_InitArray(str, strBuffer);
|
||||
@ -288,9 +288,9 @@ static void Commands_Execute(const String* input) {
|
||||
static const String prefix = String_FromConst(COMMANDS_PREFIX);
|
||||
String text = *input;
|
||||
|
||||
int offset, count;
|
||||
String args[10];
|
||||
struct ChatCommand* cmd;
|
||||
int offset, count;
|
||||
String args[50];
|
||||
|
||||
if (String_CaselessStarts(&text, &prefixSpace)) { /* /client command args */
|
||||
offset = prefixSpace.length;
|
||||
|
@ -111,7 +111,6 @@ void Options_Set(const char* keyRaw, const String* value) {
|
||||
}
|
||||
|
||||
void Options_SetString(const String* key, const String* value) {
|
||||
int i;
|
||||
if (!value || !value->length) {
|
||||
if (!EntryList_Remove(&Options, key, '=')) return;
|
||||
} else {
|
||||
|
@ -650,7 +650,7 @@ static void* ExecThread(void* param) {
|
||||
|
||||
void* Thread_Start(Thread_StartFunc func, cc_bool detach) {
|
||||
pthread_t* ptr = (pthread_t*)Mem_Alloc(1, sizeof(pthread_t), "thread");
|
||||
int res = pthread_create(ptr, NULL, ExecThread, func);
|
||||
int res = pthread_create(ptr, NULL, ExecThread, (void*)func);
|
||||
if (res) Logger_Abort2(res, "Creating thread");
|
||||
|
||||
if (detach) Thread_Detach(ptr);
|
||||
|
@ -108,8 +108,8 @@ static int Program_Run(int argc, char** argv) {
|
||||
#ifdef _MSC_VER
|
||||
/* NOTE: Make sure to comment this out before pushing a commit */
|
||||
//String rawArgs = String_FromConst("UnknownShadow200 fffff 127.0.0.1 25565");
|
||||
String rawArgs = String_FromConst("UnknownShadow200");
|
||||
argsCount = String_UNSAFE_Split(&rawArgs, ' ', args, 4);
|
||||
//String rawArgs = String_FromConst("UnknownShadow200");
|
||||
//argsCount = String_UNSAFE_Split(&rawArgs, ' ', args, 4);
|
||||
#endif
|
||||
|
||||
if (argsCount == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user