summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-protocol.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-02-09 17:19:14 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-02-09 17:19:14 +0100
commit785066832761966676d5382b047b9e2ef2d1c045 (patch)
treea322394f3385e951a77bdc935addc008fb6387f0 /src/plugins/irc/irc-protocol.c
parentdaee18621e752a1047337acbfd56e3d40d12976f (diff)
downloadweechat-785066832761966676d5382b047b9e2ef2d1c045.zip
Add new option weechat.look.time_format to customize default format for date/time displayed (localized date by default), add function weechat_util_get_time_string in plugin API (patch #6914)
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r--src/plugins/irc/irc-protocol.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 27b98c846..3cad0588b 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -1095,8 +1095,8 @@ irc_protocol_cmd_pong (struct t_irc_server *server, const char *command,
/* calculate lag (time diff with lag check) */
old_lag = server->lag;
gettimeofday (&tv, NULL);
- server->lag = (int) weechat_timeval_diff (&(server->lag_check_time),
- &tv);
+ server->lag = (int) weechat_util_timeval_diff (&(server->lag_check_time),
+ &tv);
if (old_lag != server->lag)
weechat_bar_item_update ("lag");
@@ -2122,7 +2122,7 @@ irc_protocol_cmd_317 (struct t_irc_server *server, const char *command,
IRC_COLOR_CHAT,
NG_("second", "seconds", sec),
IRC_COLOR_CHAT_CHANNEL,
- ctime (&datetime));
+ weechat_util_get_time_string (&datetime));
}
else
{
@@ -2150,7 +2150,7 @@ irc_protocol_cmd_317 (struct t_irc_server *server, const char *command,
IRC_COLOR_CHAT,
NG_("second", "seconds", sec),
IRC_COLOR_CHAT_CHANNEL,
- ctime (&datetime));
+ weechat_util_get_time_string (&datetime));
}
return WEECHAT_RC_OK;
@@ -2422,7 +2422,7 @@ irc_protocol_cmd_329 (struct t_irc_server *server, const char *command,
irc_protocol_tags (command, "irc_numeric"),
_("%sChannel created on %s"),
weechat_prefix ("network"),
- ctime (&datetime));
+ weechat_util_get_time_string (&datetime));
ptr_channel->display_creation_date = 0;
}
}
@@ -2435,7 +2435,7 @@ irc_protocol_cmd_329 (struct t_irc_server *server, const char *command,
IRC_COLOR_CHAT_CHANNEL,
argv[3],
IRC_COLOR_CHAT,
- ctime (&datetime));
+ weechat_util_get_time_string (&datetime));
}
return WEECHAT_RC_OK;
@@ -2587,7 +2587,7 @@ irc_protocol_cmd_333 (struct t_irc_server *server, const char *command,
IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick),
argv[4],
IRC_COLOR_CHAT,
- ctime (&datetime));
+ weechat_util_get_time_string (&datetime));
}
else
{
@@ -2601,7 +2601,7 @@ irc_protocol_cmd_333 (struct t_irc_server *server, const char *command,
IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick),
argv[4],
IRC_COLOR_CHAT,
- ctime (&datetime));
+ weechat_util_get_time_string (&datetime));
}
return WEECHAT_RC_OK;
@@ -2776,7 +2776,7 @@ irc_protocol_cmd_348 (struct t_irc_server *server, const char *command,
irc_protocol_get_address_from_host (argv[5]),
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_CHAT,
- ctime (&datetime));
+ weechat_util_get_time_string (&datetime));
}
else
{
@@ -3279,7 +3279,7 @@ irc_protocol_cmd_367 (struct t_irc_server *server, const char *command,
irc_protocol_get_address_from_host (argv[5]),
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_CHAT,
- ctime (&datetime));
+ weechat_util_get_time_string (&datetime));
}
else
{