equal
deleted
inserted
replaced
53 struct irc_conn_callbacks callbacks; |
53 struct irc_conn_callbacks callbacks; |
54 |
54 |
55 /** Opaque argument for callbacks */ |
55 /** Opaque argument for callbacks */ |
56 void *cb_arg; |
56 void *cb_arg; |
57 |
57 |
|
58 /** @group flags @{ */ |
58 /** Registration request sent */ |
59 /** Registration request sent */ |
59 bool registering; |
60 bool registering; |
60 |
61 |
61 /* Registered (as in, we have a working nickname)? */ |
62 /** Registered (as in, we have a working nickname)? */ |
62 bool registered; |
63 bool registered; |
|
64 |
|
65 // @} |
|
66 |
|
67 /** Our current real nickname */ |
|
68 char *nickname; |
63 |
69 |
64 /* Command handlers */ |
70 /** Command handlers */ |
65 STAILQ_HEAD(irc_conn_handlers, irc_cmd_chain) handlers; |
71 irc_cmd_handlers_t handlers; |
66 }; |
72 }; |
67 |
73 |
68 /** |
74 /** |
69 * Create a new irc_conn using the given sock_stream, which should be connected to an IRC server. |
75 * Create a new irc_conn using the given sock_stream, which should be connected to an IRC server. |
70 * |
76 * |
96 * XXX: rename to not conflict with irc_conn_register() |
102 * XXX: rename to not conflict with irc_conn_register() |
97 * |
103 * |
98 * @param chain the array of irc_cmd_handler structs, terminated with a NULL entry |
104 * @param chain the array of irc_cmd_handler structs, terminated with a NULL entry |
99 * @param arg the context argument to use for the callbacks |
105 * @param arg the context argument to use for the callbacks |
100 */ |
106 */ |
101 err_t irc_conn_register_handler_chain (struct irc_conn *conn, struct irc_cmd_handler *handlers, void *arg); |
107 err_t irc_conn_add_cmd_handlers (struct irc_conn *conn, struct irc_cmd_handler *handlers, void *arg); |
102 |
108 |
103 /** |
109 /** |
104 * Register with the IRC server using the given registration info (initial nickname etc.) |
110 * Register with the IRC server using the given registration info (initial nickname etc.) |
105 * |
111 * |
106 * This sends the NICK/USER command sequence. |
112 * This sends the NICK/USER command sequence. |