diff options
author | Curtis McEnroe | 2018-08-07 14:58:32 -0400 |
---|---|---|
committer | Curtis McEnroe | 2018-08-07 14:58:32 -0400 |
commit | 5d2b5cd51e64c3e49a536ef431c97dc1d0b78dfd (patch) | |
tree | 90f841d064bc3bd88fe52e1fc3d79861b007df04 /handle.c | |
parent | 9ccb25a1a5589be4091b684fbde9b83800fe1f6e (diff) |
Populate tab-complete list
Diffstat (limited to 'handle.c')
-rw-r--r-- | handle.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/handle.c b/handle.c index 8073758..015960d 100644 --- a/handle.c +++ b/handle.c @@ -81,6 +81,7 @@ static void handleJoin(char *prefix, char *params) { free(chat.user); chat.user = strdup(user); } + tabTouch(nick); uiFmt( "\3%d%s\3 arrives in \3%d%s\3", color(user), nick, color(chan), chan @@ -91,6 +92,7 @@ static void handlePart(char *prefix, char *params) { char *nick = prift(&prefix); char *user = prift(&prefix); char *chan = shift(¶ms); + tabRemove(nick); if (params) { char *mesg = shift(¶ms); uiFmt( @@ -108,6 +110,7 @@ static void handlePart(char *prefix, char *params) { static void handleQuit(char *prefix, char *params) { char *nick = prift(&prefix); char *user = prift(&prefix); + tabRemove(nick); if (params) { char *mesg = shift(¶ms); char *quot = (mesg[0] == '"') ? "" : "\""; @@ -126,6 +129,7 @@ static void handleKick(char *prefix, char *params) { char *chan = shift(¶ms); char *kick = shift(¶ms); char *mesg = shift(¶ms); + tabRemove(nick); uiFmt( "\3%d%s\3 kicks \3%d%s\3 out of \3%d%s\3, \"%s\"", color(user), nick, color(kick), kick, color(chan), chan, mesg @@ -176,6 +180,7 @@ static void handle352(char *prefix, char *params) { shift(¶ms); shift(¶ms); char *nick = shift(¶ms); + tabTouch(nick); size_t cap = sizeof(who.buf) - who.len; int len = snprintf( &who.buf[who.len], cap, @@ -204,6 +209,7 @@ static void handleNick(char *prefix, char *params) { free(chat.nick); chat.nick = strdup(next); } + tabReplace(prev, next); uiFmt( "\3%d%s\3 is now known as \3%d%s\3", color(user), prev, color(user), next @@ -215,6 +221,7 @@ static void handlePrivmsg(char *prefix, char *params) { char *user = prift(&prefix); shift(¶ms); char *mesg = shift(¶ms); + tabTouch(nick); if (mesg[0] == '\1') { strsep(&mesg, " "); char *action = strsep(&mesg, "\1"); @@ -230,6 +237,7 @@ static void handleNotice(char *prefix, char *params) { char *chan = shift(¶ms); char *mesg = shift(¶ms); if (strcmp(chat.chan, chan)) return; + tabTouch(nick); uiFmt("-\3%d%s\3- %s", color(user), nick, mesg); } |