Skip to content

Commit

Permalink
handleUserInput: add CTCP ACTION alias
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpcpc committed Oct 27, 2020
1 parent 607a335 commit 223d2e5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions kirc.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ static void rawParser(char *string) {
} else {
paramPrintChan(&p);
messageWrap(&p);
//messageWrap((p->message ? p->message : " "), p->offset, p->maxcols, p->nicklen);
}
printf("\x1b[0m\r\n");
}
Expand Down Expand Up @@ -647,10 +646,13 @@ static void handleUserInput(char *usrin) {
}
break;
case '@' : /* send private message to target channel or user */
strtok_r(usrin, " ", &tok);
raw("privmsg %s :%s\r\n", usrin + 1, tok);
printf("\x1b[35mprivmsg %s :%s\x1b[0m\r\n", usrin + 1, tok);
break;
if (usrin[1] == '@') {
raw("privmsg #%s :\001ACTION %s\001\r\n", cdef, usrin + 3);
} else {
strtok_r(usrin, " ", &tok);
raw("privmsg %s :%s\r\n", usrin + 1, tok);
printf("\x1b[35mprivmsg %s :%s\x1b[0m\r\n", usrin + 1, tok);
} break;
default : /* send private message to default channel */
raw("privmsg #%s :%s\r\n", cdef, usrin);
printf("\x1b[35mprivmsg #%s :%s\x1b[0m\r\n", cdef, usrin);
Expand Down

2 comments on commit 223d2e5

@kdkasad
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing is a bit wonky. Some lines uses spaces and others use tabs.

@mcpcpc
Copy link
Owner Author

@mcpcpc mcpcpc commented on 223d2e5 Oct 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing is a bit wonky. Some lines uses spaces and others use tabs.

ah. i need to be careful coding on my mobile. fixed: e6b628f

Please sign in to comment.