use / as prefix for commands - irc - IRC client based on c9x.me/irc client
(HTM) git clone git://git.codemadness.org/irc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 976e3a6bc42916575e0ff2ff758c2544bd264ea8
(DIR) parent 8bc46324826d19a8fcf0f09a2721f8edd1ef560b
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 26 May 2017 13:00:57 +0200
use / as prefix for commands
Diffstat:
M irc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/irc.c b/irc.c
@@ -499,7 +499,7 @@ uparse(char *m)
{
char *p = m;
- if (!p[0] || (p[1] != ' ' && p[1] != 0)) {
+ if (p[0] != '/') {
pmsg:
if (ch == 0)
return;
@@ -510,7 +510,7 @@ uparse(char *m)
sndf("PRIVMSG %s :%s", chl[ch].name, m);
return;
}
- switch (*p) {
+ switch (*(++p)) {
case 'j': /* Join channels. */
p += 1 + (p[1] == ' ');
p = strtok(p, " ");
@@ -551,8 +551,6 @@ uparse(char *m)
case 'q': /* Quit. */
quit = 1;
return;
- default: /* Send on current channel. */
- goto pmsg;
}
}