mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -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) {
|
static void Commands_PrintDefault(void) {
|
||||||
String str; char strBuffer[STRING_SIZE];
|
String str; char strBuffer[STRING_SIZE];
|
||||||
String name;
|
|
||||||
struct ChatCommand* cmd;
|
struct ChatCommand* cmd;
|
||||||
|
String name;
|
||||||
|
|
||||||
Chat_AddRaw("&eList of client commands:");
|
Chat_AddRaw("&eList of client commands:");
|
||||||
String_InitArray(str, strBuffer);
|
String_InitArray(str, strBuffer);
|
||||||
@ -288,9 +288,9 @@ static void Commands_Execute(const String* input) {
|
|||||||
static const String prefix = String_FromConst(COMMANDS_PREFIX);
|
static const String prefix = String_FromConst(COMMANDS_PREFIX);
|
||||||
String text = *input;
|
String text = *input;
|
||||||
|
|
||||||
int offset, count;
|
|
||||||
String args[10];
|
|
||||||
struct ChatCommand* cmd;
|
struct ChatCommand* cmd;
|
||||||
|
int offset, count;
|
||||||
|
String args[50];
|
||||||
|
|
||||||
if (String_CaselessStarts(&text, &prefixSpace)) { /* /client command args */
|
if (String_CaselessStarts(&text, &prefixSpace)) { /* /client command args */
|
||||||
offset = prefixSpace.length;
|
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) {
|
void Options_SetString(const String* key, const String* value) {
|
||||||
int i;
|
|
||||||
if (!value || !value->length) {
|
if (!value || !value->length) {
|
||||||
if (!EntryList_Remove(&Options, key, '=')) return;
|
if (!EntryList_Remove(&Options, key, '=')) return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -650,7 +650,7 @@ static void* ExecThread(void* param) {
|
|||||||
|
|
||||||
void* Thread_Start(Thread_StartFunc func, cc_bool detach) {
|
void* Thread_Start(Thread_StartFunc func, cc_bool detach) {
|
||||||
pthread_t* ptr = (pthread_t*)Mem_Alloc(1, sizeof(pthread_t), "thread");
|
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 (res) Logger_Abort2(res, "Creating thread");
|
||||||
|
|
||||||
if (detach) Thread_Detach(ptr);
|
if (detach) Thread_Detach(ptr);
|
||||||
|
@ -108,8 +108,8 @@ static int Program_Run(int argc, char** argv) {
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
/* NOTE: Make sure to comment this out before pushing a commit */
|
/* 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 fffff 127.0.0.1 25565");
|
||||||
String rawArgs = String_FromConst("UnknownShadow200");
|
//String rawArgs = String_FromConst("UnknownShadow200");
|
||||||
argsCount = String_UNSAFE_Split(&rawArgs, ' ', args, 4);
|
//argsCount = String_UNSAFE_Split(&rawArgs, ' ', args, 4);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (argsCount == 0) {
|
if (argsCount == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user