add callbacks for channel names and private messages
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
ae8efe5b28
commit
3938af1641
|
@ -117,6 +117,26 @@ _callback_channel_topic_time(Express_Network *net EINA_UNUSED, const char *event
|
|||
_channel_text_append(chl, NULL, buff);
|
||||
}
|
||||
|
||||
void
|
||||
_callback_channel_names(Express_Network *net EINA_UNUSED, const char *event EINA_UNUSED, const char *source EINA_UNUSED, const char **params, unsigned int count EINA_UNUSED, void *data EINA_UNUSED)
|
||||
{
|
||||
/* Channel *chl = NULL; */
|
||||
/* char buff[PATH_MAX]; */
|
||||
|
||||
DBG("Channel Names: %s", params[0]);
|
||||
DBG("\tCount: %d", count);
|
||||
DBG("\tUser: %s", source);
|
||||
DBG("\tMessage:");
|
||||
DBG("\t%s", params[1]); // trash (@ or =)
|
||||
DBG("\t%s", params[2]); // channel name
|
||||
DBG("\t%s", params[3]); // names
|
||||
|
||||
/* if (!(chl = _window_channel_find(params[2]))) return; */
|
||||
/* snprintf(buff, sizeof(buff), "Topic for %s set by %s at %s\r\n", */
|
||||
/* params[1], params[2], strtime); */
|
||||
/* _channel_text_append(chl, NULL, buff); */
|
||||
}
|
||||
|
||||
void
|
||||
_callback_user_quit(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)
|
||||
{
|
||||
|
@ -148,7 +168,7 @@ _callback_user_part(Express_Network *net EINA_UNUSED, const char *event EINA_UNU
|
|||
|
||||
if (!(chl = _window_channel_find(params[0]))) return;
|
||||
|
||||
snprintf(buff, sizeof(buff), "User %s has left %s: %s",
|
||||
snprintf(buff, sizeof(buff), "User %s has left %s: %s\r\n",
|
||||
source, params[0], params[1]);
|
||||
_channel_text_append(chl, NULL, buff);
|
||||
}
|
||||
|
@ -171,6 +191,19 @@ _callback_user_join(Express_Network *net, const char *event EINA_UNUSED, const c
|
|||
/* find the channel */
|
||||
if (!(chl = _window_channel_find(params[0]))) return;
|
||||
|
||||
snprintf(buff, sizeof(buff), "User %s has joined %s", source, params[0]);
|
||||
snprintf(buff, sizeof(buff), "User %s has joined %s\r\n",
|
||||
source, params[0]);
|
||||
_channel_text_append(chl, NULL, buff);
|
||||
}
|
||||
|
||||
void
|
||||
_callback_user_private(Express_Network *net, const char *event, const char *source, const char **params, unsigned int count, void *data)
|
||||
{
|
||||
DBG("User Private %s", params[0]);
|
||||
DBG("\tCount: %d", count);
|
||||
DBG("\tUser: %s", source);
|
||||
DBG("\tMessage:");
|
||||
DBG("\t%s", params[1]);
|
||||
DBG("\t%s", params[2]);
|
||||
DBG("\t%s", params[3]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue