summaryrefslogtreecommitdiff
path: root/src/plugins/demo/demo.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-08-19 23:22:52 +0200
committerSebastien Helleu <flashcode@flashtux.org>2008-08-19 23:22:52 +0200
commitb76d7e4a5cac659b08ae992b74af5f26b67dc205 (patch)
tree0edd58880852c7f70cc4ff4f8faf79473c09c164 /src/plugins/demo/demo.c
parentff1983533b9288f4d310e7eac6fb976bd119a48d (diff)
downloadweechat-b76d7e4a5cac659b08ae992b74af5f26b67dc205.zip
Reintroduce /upgrade command, working only with core and IRC plugin today
Command will be improved in near future and other plugins like xfer will be modified to manage upgrade process.
Diffstat (limited to 'src/plugins/demo/demo.c')
-rw-r--r--src/plugins/demo/demo.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c
index cf7ea2dc3..c4660bf9c 100644
--- a/src/plugins/demo/demo.c
+++ b/src/plugins/demo/demo.c
@@ -203,11 +203,12 @@ demo_buffer_set_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
*/
void
-demo_infolist_print (struct t_plugin_infolist *infolist, const char *item_name)
+demo_infolist_print (struct t_infolist *infolist, const char *item_name)
{
char *fields, **argv;
- int i, j, argc;
- time_t date;
+ void *pointer;
+ int i, j, argc, size;
+ time_t time;
i = 1;
while (weechat_infolist_next (infolist))
@@ -241,11 +242,20 @@ demo_infolist_print (struct t_plugin_infolist *infolist, const char *item_name)
weechat_infolist_pointer (infolist,
argv[j] + 2));
break;
+ case 'b':
+ pointer = weechat_infolist_buffer (infolist,
+ argv[j] + 2,
+ &size);
+ weechat_printf (NULL, " %s: %X (size: %d)",
+ argv[j] + 2,
+ pointer,
+ size);
+ break;
case 't':
- date = weechat_infolist_time (infolist, argv[j] + 2);
+ time = weechat_infolist_time (infolist, argv[j] + 2);
weechat_printf (NULL, " %s: (%ld) %s",
argv[j] + 2,
- date, ctime (&date));
+ time, ctime (&time));
break;
}
}
@@ -265,7 +275,7 @@ int
demo_infolist_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
- struct t_plugin_infolist *infolist;
+ struct t_infolist *infolist;
/* make C compiler happy */
(void) data;