implement callback for channel join messages
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
723626a71c
commit
5b41eb77e3
|
@ -128,10 +128,10 @@ _callback_user_part(Express_Network *net EINA_UNUSED, const char *event EINA_UNU
|
|||
}
|
||||
|
||||
void
|
||||
_callback_user_join(Express_Network *net EINA_UNUSED, const char *event EINA_UNUSED, const char *source, const char **params EINA_UNUSED, unsigned int count EINA_UNUSED, void *data EINA_UNUSED)
|
||||
_callback_user_join(Express_Network *net, const char *event EINA_UNUSED, const char *source, const char **params EINA_UNUSED, unsigned int count EINA_UNUSED, void *data EINA_UNUSED)
|
||||
{
|
||||
/* Channel *chl = NULL; */
|
||||
/* char buff[PATH_MAX]; */
|
||||
Channel *chl = NULL;
|
||||
char buff[PATH_MAX];
|
||||
|
||||
DBG("User Join %s", params[0]);
|
||||
DBG("\tCount: %d", count);
|
||||
|
@ -139,13 +139,12 @@ _callback_user_join(Express_Network *net EINA_UNUSED, const char *event EINA_UNU
|
|||
DBG("\tMessage:");
|
||||
DBG("\t%s", params[1]);
|
||||
|
||||
/* FIXME: For some reason, JOIN messages are not stripping out the
|
||||
* /r/n at the end of params[0].
|
||||
*
|
||||
* This needs investigating in the network code */
|
||||
/* skip user join messages for our own nick */
|
||||
if (!strcmp(source, express_network_nickname_get(net))) return;
|
||||
|
||||
/* if (!(chl = _window_channel_find(params[0]))) return; */
|
||||
/* find the channel */
|
||||
if (!(chl = _window_channel_find(params[0]))) return;
|
||||
|
||||
/* snprintf(buff, sizeof(buff), "User %s has joined %s", source, params[0]); */
|
||||
/* _channel_text_append(chl, NULL, buff); */
|
||||
snprintf(buff, sizeof(buff), "User %s has joined %s", source, params[0]);
|
||||
_channel_text_append(chl, NULL, buff);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue