Handle empty input directly in command
parent
eb6316c235
commit
be4283b8ff
|
@ -40,7 +40,7 @@ static void commandQuote(uint id, char *params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void echoMessage(char *cmd, uint id, char *params) {
|
static void echoMessage(char *cmd, uint id, char *params) {
|
||||||
if (!params || !params[0]) return;
|
if (!params) return;
|
||||||
ircFormat("%s %s :%s\r\n", cmd, idNames[id], params);
|
ircFormat("%s %s :%s\r\n", cmd, idNames[id], params);
|
||||||
struct Message msg = {
|
struct Message msg = {
|
||||||
.nick = self.nick,
|
.nick = self.nick,
|
||||||
|
@ -396,6 +396,8 @@ void command(uint id, char *input) {
|
||||||
if (id == Debug && input[0] != '/' && !self.restricted) {
|
if (id == Debug && input[0] != '/' && !self.restricted) {
|
||||||
commandQuote(id, input);
|
commandQuote(id, input);
|
||||||
return;
|
return;
|
||||||
|
} else if (!input[0]) {
|
||||||
|
return;
|
||||||
} else if (commandIsPrivmsg(id, input)) {
|
} else if (commandIsPrivmsg(id, input)) {
|
||||||
commandPrivmsg(id, input);
|
commandPrivmsg(id, input);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue