diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-02-02 15:39:04 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-02-02 15:39:04 +0100 |
commit | 69b53c8f3db9e52f4bbc0bb2ce02c19568e9e695 (patch) | |
tree | 27d2e7fa71fcea2a068b804e150a1f6f471c8b45 /src/plugins/irc | |
parent | fbc1c2a9b1a3045d0ee85f0b6041c18dc00ae9e3 (diff) | |
download | weechat-69b53c8f3db9e52f4bbc0bb2ce02c19568e9e695.zip |
Add IRC command /map
Diffstat (limited to 'src/plugins/irc')
-rw-r--r-- | src/plugins/irc/irc-command.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 74e9df915..10e81d173 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -1977,6 +1977,29 @@ irc_command_lusers (void *data, struct t_gui_buffer *buffer, int argc, } /* + * irc_command_map: show a graphical map of the IRC network + */ + +int +irc_command_map (void *data, struct t_gui_buffer *buffer, int argc, + char **argv, char **argv_eol) +{ + IRC_GET_SERVER(buffer); + IRC_COMMAND_CHECK_SERVER("map", 1); + + /* make C compiler happy */ + (void) data; + (void) argv; + + if (argc > 1) + irc_server_sendf (ptr_server, 0, "MAP %s", argv_eol[1]); + else + irc_server_sendf (ptr_server, 0, "MAP"); + + return WEECHAT_RC_OK; +} + +/* * irc_command_me: send a ctcp action to the current channel */ @@ -4166,6 +4189,11 @@ irc_command_init () N_(" mask: servers matching the mask only\n" "target: server for forwarding request"), NULL, &irc_command_lusers, NULL); + weechat_hook_command ("map", + N_("show a graphical map of the IRC network"), + "", + "", + NULL, &irc_command_map, NULL); weechat_hook_command ("me", N_("send a CTCP action to the current channel"), N_("message"), |