Handle /names and /who

master
Curtis McEnroe 2018-08-04 14:33:57 -04:00
parent 96888b6c32
commit 6e4f98d6eb
No known key found for this signature in database
GPG Key ID: CEA2F97ADCFCD77C
1 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,11 @@ static void inputNick(wchar_t *params) {
} }
} }
static void inputWho(wchar_t *params) {
(void)params;
clientFmt("WHO %s\r\n", chat.chan);
}
static void inputQuit(wchar_t *params) { static void inputQuit(wchar_t *params) {
if (params) { if (params) {
clientFmt("QUIT :%ls\r\n", params); clientFmt("QUIT :%ls\r\n", params);
@ -77,8 +82,10 @@ static const struct {
Handler handler; Handler handler;
} COMMANDS[] = { } COMMANDS[] = {
{ L"me", inputMe }, { L"me", inputMe },
{ L"names", inputWho },
{ L"nick", inputNick }, { L"nick", inputNick },
{ L"quit", inputQuit }, { L"quit", inputQuit },
{ L"who", inputWho },
}; };
static const size_t COMMANDS_LEN = sizeof(COMMANDS) / sizeof(COMMANDS[0]); static const size_t COMMANDS_LEN = sizeof(COMMANDS) / sizeof(COMMANDS[0]);