equal
deleted
inserted
replaced
8 |
8 |
9 const char* irc_chan_name (struct irc_chan *chan) |
9 const char* irc_chan_name (struct irc_chan *chan) |
10 { |
10 { |
11 return chan->info.channel; |
11 return chan->info.channel; |
12 } |
12 } |
|
13 |
|
14 /** |
|
15 * Invoke the named irc_chan_callbacks field with the given args |
|
16 */ |
|
17 #define IRC_CHAN_INVOKE_CALLBACK(chan, _cb_name_, ...) \ |
|
18 do { \ |
|
19 struct chain_head *head; \ |
|
20 \ |
|
21 CHAIN_FOREACH(&(chan)->callbacks, head) { \ |
|
22 const struct irc_chan_callbacks *callbacks = head->chain; \ |
|
23 \ |
|
24 if (callbacks->_cb_name_) \ |
|
25 callbacks->_cb_name_((chan), ## __VA_ARGS__, head->arg); \ |
|
26 } \ |
|
27 } while (0); |
13 |
28 |
14 /** |
29 /** |
15 * Add or update a nickname to the irc_chan.users list. |
30 * Add or update a nickname to the irc_chan.users list. |
16 * |
31 * |
17 * If the given nickname already exists in our users list, this does nothing. Otherwise, an irc_user is aquired using |
32 * If the given nickname already exists in our users list, this does nothing. Otherwise, an irc_user is aquired using |