summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-10-14 08:33:13 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-10-14 08:33:13 +0000
commit8dcb59fd0b19f1d50254d4299b1c7fe9a0399c02 (patch)
tree6ed0b09f74b335476917e102c08405df29723cbc /doc/en
parent9b91c915774e2a9500cef3e694ca526d26d76cb0 (diff)
downloadweechat-8dcb59fd0b19f1d50254d4299b1c7fe9a0399c02.zip
Added date in plugin function get_buffer_data()
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/weechat.en.xml10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/en/weechat.en.xml b/doc/en/weechat.en.xml
index 4f7b88b9f..2901b9bd1 100644
--- a/doc/en/weechat.en.xml
+++ b/doc/en/weechat.en.xml
@@ -4111,6 +4111,11 @@ else
</thead>
<tbody>
<row>
+ <entry>time_t</entry>
+ <entry><literal>date</literal></entry>
+ <entry>date and time</entry>
+ </row>
+ <row>
<entry>char *</entry>
<entry><literal>nick</literal></entry>
<entry>nick</entry>
@@ -4142,13 +4147,16 @@ else
Example:
<screen>
t_plugin_buffer_line *buffer_line, *ptr_line;
+char text_time[256];
buffer_line = plugin->get_buffer_data (plugin);
if (buffer_line)
{
for (ptr_line = buffer_line; ptr_line; ptr_line = ptr_line->next_line)
{
- plugin->print (plugin, NULL, NULL, "nick: %s, data: %s", ptr_line->nick, ptr_line->data);
+ strftime (text_time, sizeof (text_time), "%x %X", localtime (&amp;(ptr_line->date)));
+ plugin->print (plugin, NULL, NULL, "date: %s, nick: %s, data: %s",
+ text_time, ptr_line->nick, ptr_line->data);
}
plugin->free_buffer_data (plugin, buffer_line);
}