1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 06:46:38 +02:00

Added new plugin "xfer" (used by irc plugin for DCC file and chat) (warning: initial commit, not working yet)

This commit is contained in:
Sebastien Helleu
2008-05-04 20:24:20 +02:00
parent ff526c3168
commit e7a16efa0c
55 changed files with 5721 additions and 4206 deletions
+3 -33
View File
@@ -22,10 +22,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
#endif
#include "../weechat-plugin.h"
#include "irc.h"
#include "irc-command.h"
@@ -55,31 +51,6 @@ gnutls_certificate_credentials gnutls_xcred; /* gnutls client credentials */
#endif
/*
* irc_create_directories: create directories for IRC plugin
*/
void
irc_create_directories ()
{
char *weechat_dir, *dir1, *dir2;
/* create DCC download directory */
weechat_dir = weechat_info_get ("weechat_dir");
if (weechat_dir)
{
dir1 = weechat_string_replace (weechat_config_string (irc_config_dcc_download_path),
"~", getenv ("HOME"));
dir2 = weechat_string_replace (dir1, "%h", weechat_dir);
if (dir2)
(void) weechat_mkdir (dir2, 0700);
if (dir1)
free (dir1);
if (dir2)
free (dir2);
}
}
/*
* irc_signal_quit_cb: callback for "quit" signal
*/
@@ -128,14 +99,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
if (irc_config_read () < 0)
return WEECHAT_RC_ERROR;
irc_create_directories ();
irc_command_init ();
/* hook some signals */
irc_debug_init ();
weechat_hook_signal ("quit", &irc_signal_quit_cb, NULL);
weechat_hook_signal ("xfer_send_ready", &irc_server_xfer_send_ready_cb, NULL);
/* hook completions */
irc_completion_init ();