Changeset 0ef1c92 for irc_commands.c
- Timestamp:
- 2015-09-11T02:31:10Z (9 years ago)
- Branches:
- master
- Children:
- dc96e6e
- Parents:
- 34d16d5
- git-author:
- dequis <dx@…> (27-07-15 05:14:09)
- git-committer:
- dequis <dx@…> (11-09-15 02:31:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_commands.c
r34d16d5 r0ef1c92 28 28 #include "help.h" 29 29 #include "ipc.h" 30 31 static void irc_cmd_cap(irc_t *irc, char **cmd) 32 { 33 if (!(irc->status & USTATUS_LOGGED_IN)) { 34 /* Put registration on hold until CAP END */ 35 irc->status |= USTATUS_CAP_PENDING; 36 } 37 38 if (g_strcasecmp(cmd[1], "LS") == 0) { 39 /* gboolean irc302 = (g_strcmp0(cmd[2], "302") == 0); */ 40 irc_send_cap(irc, "LS", ""); 41 42 } else if (g_strcasecmp(cmd[1], "LIST") == 0) { 43 irc_send_cap(irc, "LIST", ""); 44 45 } else if (g_strcasecmp(cmd[1], "REQ") == 0) { 46 irc_send_cap(irc, "NAK", cmd[2] ? : ""); 47 48 } else if (g_strcasecmp(cmd[1], "END") == 0) { 49 irc->status &= ~USTATUS_CAP_PENDING; 50 irc_check_login(irc); 51 52 } else { 53 irc_send_num(irc, 410, "%s :Invalid CAP command", cmd[1]); 54 } 55 56 } 30 57 31 58 static void irc_cmd_pass(irc_t *irc, char **cmd) … … 685 712 686 713 static const command_t irc_commands[] = { 714 { "cap", 1, irc_cmd_cap, 0 }, 687 715 { "pass", 1, irc_cmd_pass, 0 }, 688 716 { "user", 4, irc_cmd_user, IRC_CMD_PRE_LOGIN },
Note: See TracChangeset
for help on using the changeset viewer.