1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 08:45:43 +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
+2 -1
View File
@@ -46,12 +46,13 @@ OPTION(ENABLE_DEMO "Enable Demo plugin")
OPTION(DISABLE_FIFO "Disable FIFO plugin")
OPTION(DISABLE_IRC "Disable IRC plugin")
OPTION(DISABLE_LOGGER "Disable Logger plugin")
OPTION(DISABLE_TRIGGER "Disable Trigger plugin")
OPTION(DISABLE_SCRIPTS "Disable script plugins")
OPTION(DISABLE_PERL "Disable Perl scripting language")
OPTION(DISABLE_PYTHON "Disable Python scripting language")
OPTION(DISABLE_RUBY "Disable Ruby scripting language")
OPTION(DISABLE_LUA "Disable Lua scripting language")
OPTION(DISABLE_TRIGGER "Disable Trigger plugin")
OPTION(DISABLE_XFER "Disable Xfer (file transfert) plugin")
OPTION(DISABLE_DOC "Disable Doc")
OPTION(DISABLE_COMPILE_DEBUG "Disable debug info in object files")
+2 -2
View File
@@ -1,7 +1,7 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2008-04-30
ChangeLog - 2008-05-04
Version 0.2.7 (under dev!):
@@ -22,7 +22,7 @@ Version 0.2.7 (under dev!):
* improved main loop: higher timout in select(), less CPU usage
* added /reload command to reload WeeChat and plugins config files
(signal SIGHUP is catched to reload config files)
* new plugins: IRC, alias, demo, fifo, logger, trigger
* new plugins: IRC, alias, demo, fifo, logger, trigger, xfer
* added hooks: command, timer, file descriptor, print, signal, config,
completion, modifier
* new plugin API with many new functions: hooks, buffer management, bars,
+27 -8
View File
@@ -84,13 +84,15 @@ AC_MSG_RESULT($ac_cv_type_socklen_t)
# Checks for library functions.
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strndup strncasecmp strpbrk strrchr strstr uname regexec])
AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strndup strncasecmp strpbrk strrchr strstr regexec])
# Variables in config.h
AH_VERBATIM([PREFIX], [#undef PREFIX])
AH_VERBATIM([WEECHAT_LIBDIR], [#undef WEECHAT_LIBDIR])
AH_VERBATIM([WEECHAT_SHAREDIR], [#undef WEECHAT_SHAREDIR])
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
AH_VERBATIM([PLUGIN_ALIAS], [#undef PLUGIN_ALIAS])
AH_VERBATIM([PLUGIN_ASPELL], [#undef PLUGIN_ASPELL])
AH_VERBATIM([PLUGIN_CHARSET], [#undef PLUGIN_CHARSET])
@@ -99,13 +101,12 @@ AH_VERBATIM([PLUGIN_DEMO], [#undef PLUGIN_DEMO])
AH_VERBATIM([PLUGIN_FIFO], [#undef PLUGIN_FIFO])
AH_VERBATIM([PLUGIN_IRC], [#undef PLUGIN_IRC])
AH_VERBATIM([PLUGIN_LOGGER], [#undef PLUGIN_LOGGER])
AH_VERBATIM([PLUGIN_TRIGGER], [#undef PLUGIN_TRIGGER])
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
AH_VERBATIM([PLUGIN_RUBY], [#undef PLUGIN_RUBY])
AH_VERBATIM([PLUGIN_LUA], [#undef PLUGIN_LUA])
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
AH_VERBATIM([PLUGIN_TRIGGER], [#undef PLUGIN_TRIGGER])
AH_VERBATIM([PLUGIN_XFER], [#undef PLUGIN_XFER])
# Arguments for ./configure
@@ -128,6 +129,7 @@ AC_ARG_ENABLE(python, [ --disable-python turn off Python script pl
AC_ARG_ENABLE(ruby, [ --disable-ruby turn off Ruby script plugin (default=compiled if found)],enable_ruby=$enableval,enable_ruby=yes)
AC_ARG_ENABLE(lua, [ --disable-lua turn off Lua script plugin (default=compiled if found)],enable_lua=$enableval,enable_lua=yes)
AC_ARG_ENABLE(trigger, [ --disable-trigger turn off Trigger plugin (default=compiled if found)],enable_trigger=$enableval,enable_trigger=yes)
AC_ARG_ENABLE(xfer, [ --disable-xfer turn off Xfer (file transfer) plugin (default=compiled if found)],enable_xfer=$enableval,enable_xfer=yes)
AC_ARG_WITH(lua-inc, [ --with-lua-inc=DIR, lua include files are in DIR (default=autodetect)],lua_inc=$withval,lua_inc='')
AC_ARG_WITH(lua-lib, [ --with-lua-lib=DIR, lua library files are in DIR (default=autodetect)],lua_lib=$withval,lua_lib='')
AC_ARG_WITH(lua-suffix, [ --with-lua-suffix=ARG lua is suffixed with ARG (default=autodetect)],lua_suffix=$withval,lua_suffix='')
@@ -677,6 +679,18 @@ else
not_asked="$not_asked trigger"
fi
# ---------------------------------- xfer --------------------------------------
if test "x$enable_xfer" = "xyes" ; then
XFER_CFLAGS=""
XFER_LFLAGS=""
AC_SUBST(XFER_CFLAGS)
AC_SUBST(XFER_LFLAGS)
AC_DEFINE(PLUGIN_XFER)
else
not_asked="$not_asked xfer"
fi
# ------------------------------------------------------------------------------
# gnutls
# ------------------------------------------------------------------------------
@@ -854,6 +868,9 @@ CFLAGS="$CFLAGS -DWEECHAT_VERSION=\\\"$VERSION\\\""
# output Makefiles
# ------------------------------------------------------------------------------
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
AM_CONDITIONAL(DBLATEX_FOUND, test "$DBLATEX_FOUND" = "yes")
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
@@ -871,9 +888,7 @@ AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
AM_CONDITIONAL(PLUGIN_TRIGGER, test "$enable_trigger" = "yes")
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
AM_CONDITIONAL(DBLATEX_FOUND, test "$DBLATEX_FOUND" = "yes")
AM_CONDITIONAL(PLUGIN_XFER, test "$enable_xfer" = "yes")
AC_OUTPUT([Makefile
doc/Makefile
@@ -896,12 +911,13 @@ AC_OUTPUT([Makefile
src/plugins/fifo/Makefile
src/plugins/irc/Makefile
src/plugins/logger/Makefile
src/plugins/trigger/Makefile
src/plugins/scripts/Makefile
src/plugins/scripts/perl/Makefile
src/plugins/scripts/python/Makefile
src/plugins/scripts/ruby/Makefile
src/plugins/scripts/lua/Makefile
src/plugins/trigger/Makefile
src/plugins/xfer/Makefile
src/gui/Makefile
src/gui/curses/Makefile
src/gui/wxwidgets/Makefile
@@ -974,6 +990,9 @@ fi
if test "x$enable_trigger" = "xyes"; then
listplugins="$listplugins trigger"
fi
if test "x$enable_xfer" = "xyes"; then
listplugins="$listplugins xfer"
fi
listoptional=""
if test "x$enable_gnutls" = "xyes"; then
+16
View File
@@ -18,6 +18,8 @@
./src/core/wee-list.h
./src/core/wee-log.c
./src/core/wee-log.h
./src/core/wee-network.c
./src/core/wee-network.h
./src/core/wee-string.c
./src/core/wee-string.h
./src/core/wee-upgrade.c
@@ -165,3 +167,17 @@
./src/plugins/trigger/trigger-libirc.c
./src/plugins/trigger/trigger-libirc.h
./src/plugins/weechat-plugin.h
./src/plugins/xfer/xfer.c
./src/plugins/xfer/xfer-buffer.c
./src/plugins/xfer/xfer-buffer.h
./src/plugins/xfer/xfer-chat.c
./src/plugins/xfer/xfer-chat.h
./src/plugins/xfer/xfer-config.c
./src/plugins/xfer/xfer-config.h
./src/plugins/xfer/xfer-dcc.c
./src/plugins/xfer/xfer-dcc.h
./src/plugins/xfer/xfer-file.c
./src/plugins/xfer/xfer-file.h
./src/plugins/xfer/xfer.h
./src/plugins/xfer/xfer-network.c
./src/plugins/xfer/xfer-network.h
+316 -272
View File
File diff suppressed because it is too large Load Diff
+321 -277
View File
File diff suppressed because it is too large Load Diff
+326 -281
View File
File diff suppressed because it is too large Load Diff
+247 -265
View File
File diff suppressed because it is too large Load Diff
+318 -274
View File
File diff suppressed because it is too large Load Diff
+313 -269
View File
File diff suppressed because it is too large Load Diff
+16
View File
@@ -19,6 +19,8 @@ SET(WEECHAT_SOURCES
./src/core/wee-list.h
./src/core/wee-log.c
./src/core/wee-log.h
./src/core/wee-network.c
./src/core/wee-network.h
./src/core/wee-string.c
./src/core/wee-string.h
./src/core/wee-upgrade.c
@@ -166,4 +168,18 @@ SET(WEECHAT_SOURCES
./src/plugins/trigger/trigger-libirc.c
./src/plugins/trigger/trigger-libirc.h
./src/plugins/weechat-plugin.h
./src/plugins/xfer/xfer.c
./src/plugins/xfer/xfer-buffer.c
./src/plugins/xfer/xfer-buffer.h
./src/plugins/xfer/xfer-chat.c
./src/plugins/xfer/xfer-chat.h
./src/plugins/xfer/xfer-config.c
./src/plugins/xfer/xfer-config.h
./src/plugins/xfer/xfer-dcc.c
./src/plugins/xfer/xfer-dcc.h
./src/plugins/xfer/xfer-file.c
./src/plugins/xfer/xfer-file.h
./src/plugins/xfer/xfer.h
./src/plugins/xfer/xfer-network.c
./src/plugins/xfer/xfer-network.h
)
+225 -240
View File
File diff suppressed because it is too large Load Diff
+16 -5
View File
@@ -14,11 +14,22 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
SET(LIB_CORE_SRC weechat.c weechat.h wee-backtrace.c wee-backtrace.h
wee-command.c wee-command.h wee-config.c wee-config.h wee-config-file.c
wee-config-file.h wee-debug.c wee-debug.h wee-hook.c wee-hook.h wee-input.c
wee-input.h wee-list.c wee-list.h wee-log.c wee-log.h wee-string.c wee-string.h
wee-upgrade.c wee-upgrade.h wee-utf8.c wee-utf8.h wee-util.c wee-util.h)
SET(LIB_CORE_SRC
weechat.c weechat.h
wee-backtrace.c wee-backtrace.h
wee-command.c wee-command.h
wee-config.c wee-config.h
wee-config-file.c wee-config-file.h
wee-debug.c wee-debug.h
wee-hook.c wee-hook.h
wee-input.c wee-input.h
wee-list.c wee-list.h
wee-log.c wee-log.h
wee-network.c wee-network.h
wee-string.c wee-string.h
wee-upgrade.c wee-upgrade.h
wee-utf8.c wee-utf8.h
wee-util.c wee-util.h)
# Check for flock support
INCLUDE(CheckSymbolExists)
+2
View File
@@ -38,6 +38,8 @@ lib_weechat_core_a_SOURCES = weechat.c \
wee-list.h \
wee-log.c \
wee-log.h \
wee-network.c \
wee-network.h \
wee-upgrade.c \
wee-upgrade.h \
wee-string.c \
+3 -3
View File
@@ -93,12 +93,12 @@ command_bar (void *data, struct t_gui_buffer *buffer,
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
ptr_bar->name,
GUI_COLOR(GUI_COLOR_CHAT),
gui_bar_type_str[CONFIG_INTEGER(ptr_bar->type)],
gui_bar_type_string[CONFIG_INTEGER(ptr_bar->type)],
(CONFIG_STRING(ptr_bar->conditions)
&& CONFIG_STRING(ptr_bar->conditions)[0]) ?
CONFIG_STRING(ptr_bar->conditions) : "-",
gui_bar_position_str[CONFIG_INTEGER(ptr_bar->position)],
gui_bar_filling_str[CONFIG_INTEGER(ptr_bar->filling)],
gui_bar_position_string[CONFIG_INTEGER(ptr_bar->position)],
gui_bar_filling_string[CONFIG_INTEGER(ptr_bar->filling)],
((CONFIG_INTEGER(ptr_bar->position) == GUI_BAR_POSITION_BOTTOM)
|| (CONFIG_INTEGER(ptr_bar->position) == GUI_BAR_POSITION_TOP)) ?
_("height") : _("width"),
+2 -2
View File
@@ -42,7 +42,7 @@
struct t_config_file *config_files = NULL;
struct t_config_file *last_config_file = NULL;
char *config_option_type_str[CONFIG_NUM_OPTION_TYPES] =
char *config_option_type_string[CONFIG_NUM_OPTION_TYPES] =
{ "boolean", "integer", "string", "color" };
char *config_boolean_true[] = { "on", "yes", "y", "true", "t", "1", NULL };
char *config_boolean_false[] = { "off", "no", "n", "false", "f", "0", NULL };
@@ -367,7 +367,7 @@ config_file_new_option (struct t_config_file *config_file,
var_type = -1;
for (i = 0; i < CONFIG_NUM_OPTION_TYPES; i++)
{
if (string_strcasecmp (type, config_option_type_str[i]) == 0)
if (string_strcasecmp (type, config_option_type_string[i]) == 0)
{
var_type = i;
break;
+1 -58
View File
@@ -164,14 +164,6 @@ struct t_config_option *config_color_nicklist_prefix4;
struct t_config_option *config_color_nicklist_prefix5;
struct t_config_option *config_color_nicklist_more;
struct t_config_option *config_color_nicklist_separator;
struct t_config_option *config_color_info;
struct t_config_option *config_color_info_bg;
struct t_config_option *config_color_info_waiting;
struct t_config_option *config_color_info_connecting;
struct t_config_option *config_color_info_active;
struct t_config_option *config_color_info_done;
struct t_config_option *config_color_info_failed;
struct t_config_option *config_color_info_aborted;
/* config, history section */
@@ -1440,56 +1432,7 @@ config_weechat_init ()
N_("text color for nicklist separator"),
NULL, GUI_COLOR_NICKLIST_SEPARATOR, 0, "blue",
NULL, NULL, &config_change_color, NULL, NULL, NULL);
/* status info */
config_color_info = config_file_new_option (
weechat_config_file, ptr_section,
"info", "color",
N_("text color for status info"),
NULL, GUI_COLOR_INFO, 0, "default",
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_info_bg = config_file_new_option (
weechat_config_file, ptr_section,
"info_bg", "color",
N_("background color for status info"),
NULL, -1, 0, "default",
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_info_waiting = config_file_new_option (
weechat_config_file, ptr_section,
"info_waiting", "color",
N_("text color for \"waiting\" status info"),
NULL, GUI_COLOR_INFO_WAITING, 0, "lightcyan",
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_info_connecting = config_file_new_option (
weechat_config_file, ptr_section,
"info_connecting", "color",
N_("text color for \"connecting\" status info"),
NULL, GUI_COLOR_INFO_CONNECTING, 0, "yellow",
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_info_active = config_file_new_option (
weechat_config_file, ptr_section,
"info_active", "color",
N_("text color for \"active\" status info"),
NULL, GUI_COLOR_INFO_ACTIVE, 0, "lightblue",
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_info_done = config_file_new_option (
weechat_config_file, ptr_section,
"info_done", "color",
N_("text color for \"done\" status info"),
NULL, GUI_COLOR_INFO_DONE, 0, "lightgreen",
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_info_failed = config_file_new_option (
weechat_config_file, ptr_section,
"info_failed", "color",
N_("text color for \"failed\" status info"),
NULL, GUI_COLOR_INFO_FAILED, 0, "lightred",
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_info_aborted = config_file_new_option (
weechat_config_file, ptr_section,
"info_aborted", "color",
N_("text color for \"aborted\" status info"),
NULL, GUI_COLOR_INFO_ABORTED, 0, "lightred",
NULL, NULL, &config_change_color, NULL, NULL, NULL);
/* history */
ptr_section = config_file_new_section (weechat_config_file, "history",
0, 0,
-8
View File
@@ -152,14 +152,6 @@ extern struct t_config_option *config_color_nicklist_prefix4;
extern struct t_config_option *config_color_nicklist_prefix5;
extern struct t_config_option *config_color_nicklist_more;
extern struct t_config_option *config_color_nicklist_separator;
extern struct t_config_option *config_color_info;
extern struct t_config_option *config_color_info_bg;
extern struct t_config_option *config_color_info_waiting;
extern struct t_config_option *config_color_info_connecting;
extern struct t_config_option *config_color_info_active;
extern struct t_config_option *config_color_info_done;
extern struct t_config_option *config_color_info_failed;
extern struct t_config_option *config_color_info_aborted;
extern struct t_config_option *config_history_max_lines;
extern struct t_config_option *config_history_max_commands;
File diff suppressed because it is too large Load Diff
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_NETWORK_H
#define __WEECHAT_NETWORK_H 1
extern int network_pass_proxy (int sock, char *address, int port);
extern int network_connect_to (int sock, unsigned long address, int port);
#endif /* wee-network.h */
+17 -6
View File
@@ -18,12 +18,23 @@ IF(NOT DISABLE_NCURSES)
SUBDIRS( curses )
ENDIF(NOT DISABLE_NCURSES)
SET(LIB_GUI_COMMON_SRC gui-bar.c gui-bar.h gui-bar-item.c gui-bar-item.h
gui-buffer.c gui-buffer.h gui-chat.c gui-chat.h gui-color.c gui-color.h
gui-filter.c gui-filter.h gui-completion.c gui-completion.h gui-history.c
gui-history.h gui-hotlist.c gui-hotlist.h gui-infobar.c gui-infobar.h
gui-input.c gui-input.h gui-keyboard.c gui-keyboard.h gui-main.h gui-nicklist.c
gui-nicklist.h gui-status.c gui-status.h gui-window.c gui-window.h)
SET(LIB_GUI_COMMON_SRC
gui-bar.c gui-bar.h
gui-bar-item.c gui-bar-item.h
gui-buffer.c gui-buffer.h
gui-chat.c gui-chat.h
gui-color.c gui-color.h
gui-filter.c gui-filter.h
gui-completion.c gui-completion.h
gui-history.c gui-history.h
gui-hotlist.c gui-hotlist.h
gui-infobar.c gui-infobar.h
gui-input.c gui-input.h
gui-keyboard.c gui-keyboard.h
gui-main.h
gui-nicklist.c gui-nicklist.h
gui-status.c gui-status.h
gui-window.c gui-window.h)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
ADD_LIBRARY(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
-8
View File
@@ -416,14 +416,6 @@ gui_color_init_weechat ()
gui_color[GUI_COLOR_NICKLIST_PREFIX5] = gui_color_build (GUI_COLOR_NICKLIST_PREFIX5, CONFIG_COLOR(config_color_nicklist_prefix5), CONFIG_COLOR(config_color_nicklist_bg));
gui_color[GUI_COLOR_NICKLIST_MORE] = gui_color_build (GUI_COLOR_NICKLIST_MORE, CONFIG_COLOR(config_color_nicklist_more), CONFIG_COLOR(config_color_nicklist_bg));
gui_color[GUI_COLOR_NICKLIST_SEPARATOR] = gui_color_build (GUI_COLOR_NICKLIST_SEPARATOR, CONFIG_COLOR(config_color_nicklist_separator), CONFIG_COLOR(config_color_nicklist_bg));
gui_color[GUI_COLOR_INFO] = gui_color_build (GUI_COLOR_INFO, CONFIG_COLOR(config_color_info), CONFIG_COLOR(config_color_info_bg));
gui_color[GUI_COLOR_INFO_WAITING] = gui_color_build (GUI_COLOR_INFO_WAITING, CONFIG_COLOR(config_color_info_waiting), CONFIG_COLOR(config_color_info_bg));
gui_color[GUI_COLOR_INFO_CONNECTING] = gui_color_build (GUI_COLOR_INFO_CONNECTING, CONFIG_COLOR(config_color_info_connecting), CONFIG_COLOR(config_color_info_bg));
gui_color[GUI_COLOR_INFO_ACTIVE] = gui_color_build (GUI_COLOR_INFO_ACTIVE, CONFIG_COLOR(config_color_info_active), CONFIG_COLOR(config_color_info_bg));
gui_color[GUI_COLOR_INFO_DONE] = gui_color_build (GUI_COLOR_INFO_DONE, CONFIG_COLOR(config_color_info_done), CONFIG_COLOR(config_color_info_bg));
gui_color[GUI_COLOR_INFO_FAILED] = gui_color_build (GUI_COLOR_INFO_FAILED, CONFIG_COLOR(config_color_info_failed), CONFIG_COLOR(config_color_info_bg));
gui_color[GUI_COLOR_INFO_ABORTED] = gui_color_build (GUI_COLOR_INFO_ABORTED, CONFIG_COLOR(config_color_info_aborted), CONFIG_COLOR(config_color_info_bg));
}
/*
+13 -12
View File
@@ -38,14 +38,14 @@
#include "gui-window.h"
char *gui_bar_option_str[GUI_BAR_NUM_OPTIONS] =
char *gui_bar_option_string[GUI_BAR_NUM_OPTIONS] =
{ "priority", "type", "conditions", "position", "filling", "size", "size_max",
"color_fg", "color_bg", "separator", "items" };
char *gui_bar_type_str[GUI_BAR_NUM_TYPES] =
char *gui_bar_type_string[GUI_BAR_NUM_TYPES] =
{ "root", "window" };
char *gui_bar_position_str[GUI_BAR_NUM_POSITIONS] =
char *gui_bar_position_string[GUI_BAR_NUM_POSITIONS] =
{ "bottom", "top", "left", "right" };
char *gui_bar_filling_str[GUI_BAR_NUM_FILLING] =
char *gui_bar_filling_string[GUI_BAR_NUM_FILLING] =
{ "horizontal", "vertical" };
struct t_gui_bar *gui_bars = NULL; /* first bar */
@@ -71,7 +71,7 @@ gui_bar_search_option (char *option_name)
for (i = 0; i < GUI_BAR_NUM_OPTIONS; i++)
{
if (string_strcasecmp (gui_bar_option_str[i], option_name) == 0)
if (string_strcasecmp (gui_bar_option_string[i], option_name) == 0)
return i;
}
@@ -91,7 +91,7 @@ gui_bar_search_type (char *type)
for (i = 0; i < GUI_BAR_NUM_TYPES; i++)
{
if (string_strcasecmp (type, gui_bar_type_str[i]) == 0)
if (string_strcasecmp (type, gui_bar_type_string[i]) == 0)
return i;
}
@@ -111,7 +111,7 @@ gui_bar_search_position (char *position)
for (i = 0; i < GUI_BAR_NUM_POSITIONS; i++)
{
if (string_strcasecmp (position, gui_bar_position_str[i]) == 0)
if (string_strcasecmp (position, gui_bar_position_string[i]) == 0)
return i;
}
@@ -868,12 +868,13 @@ gui_bar_create_option (char *bar_name, int index_option, char *value)
ptr_option = NULL;
length = strlen (bar_name) + 1 + strlen (gui_bar_option_str[index_option]) + 1;
length = strlen (bar_name) + 1 +
strlen (gui_bar_option_string[index_option]) + 1;
option_name = malloc (length);
if (option_name)
{
snprintf (option_name, length, "%s.%s",
bar_name, gui_bar_option_str[index_option]);
bar_name, gui_bar_option_string[index_option]);
switch (index_option)
{
@@ -1538,16 +1539,16 @@ gui_bar_print_log ()
log_printf (" priority . . . . . . . : %d", CONFIG_INTEGER(ptr_bar->priority));
log_printf (" type . . . . . . . . . : %d (%s)",
CONFIG_INTEGER(ptr_bar->type),
gui_bar_type_str[CONFIG_INTEGER(ptr_bar->type)]);
gui_bar_type_string[CONFIG_INTEGER(ptr_bar->type)]);
log_printf (" conditions . . . . . . : '%s'", CONFIG_STRING(ptr_bar->conditions));
log_printf (" conditions_count . . . : %d", ptr_bar->conditions_count);
log_printf (" conditions_array . . . : 0x%x", ptr_bar->conditions_array);
log_printf (" position . . . . . . . : %d (%s)",
CONFIG_INTEGER(ptr_bar->position),
gui_bar_position_str[CONFIG_INTEGER(ptr_bar->position)]);
gui_bar_position_string[CONFIG_INTEGER(ptr_bar->position)]);
log_printf (" filling. . . . . . . . : %d (%s)",
CONFIG_INTEGER(ptr_bar->filling),
gui_bar_filling_str[CONFIG_INTEGER(ptr_bar->filling)]);
gui_bar_filling_string[CONFIG_INTEGER(ptr_bar->filling)]);
log_printf (" size . . . . . . . . . : %d", CONFIG_INTEGER(ptr_bar->size));
log_printf (" size_max . . . . . . . : %d", CONFIG_INTEGER(ptr_bar->size_max));
log_printf (" color_fg . . . . . . . : %d",
+3 -3
View File
@@ -96,9 +96,9 @@ struct t_gui_bar
/* variables */
extern char *gui_bar_type_str[];
extern char *gui_bar_position_str[];
extern char *gui_bar_filling_str[];
extern char *gui_bar_type_string[];
extern char *gui_bar_position_string[];
extern char *gui_bar_filling_string[];
extern struct t_gui_bar *gui_bars;
extern struct t_gui_bar *last_gui_bar;
extern struct t_gui_bar *gui_temp_bars;
-8
View File
@@ -94,14 +94,6 @@ enum t_gui_color_enum
GUI_COLOR_NICKLIST_MORE,
GUI_COLOR_NICKLIST_SEPARATOR,
GUI_COLOR_INFO,
GUI_COLOR_INFO_WAITING,
GUI_COLOR_INFO_CONNECTING,
GUI_COLOR_INFO_ACTIVE,
GUI_COLOR_INFO_DONE,
GUI_COLOR_INFO_FAILED,
GUI_COLOR_INFO_ABORTED,
/* number of colors */
GUI_COLOR_NUM_COLORS,
};
+4
View File
@@ -71,3 +71,7 @@ ENDIF(NOT DISABLE_SCRIPTS AND NOT DISABLE_PERL AND NOT DISABLE_PYTHON AND NOT DI
IF(NOT DISABLE_TRIGGER)
ADD_SUBDIRECTORY( trigger )
ENDIF(NOT DISABLE_TRIGGER)
IF(NOT DISABLE_XFER)
ADD_SUBDIRECTORY( xfer )
ENDIF(NOT DISABLE_XFER)
+5 -1
View File
@@ -80,6 +80,10 @@ if PLUGIN_TRIGGER
trigger_dir = trigger
endif
if PLUGIN_XFER
xfer_dir = xfer
endif
SUBDIRS = . $(alias_dir) $(aspell_dir) $(charset_dir) $(debug_dir) \
$(demo_dir) $(fifo_dir) $(irc_dir) $(logger_dir) $(script_dir) \
$(trigger_dir)
$(trigger_dir) $(xfer_dir)
+15 -6
View File
@@ -14,17 +14,26 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
ADD_LIBRARY(irc MODULE irc.c irc.h irc-buffer.c irc-buffer.h irc-channel.c
irc-channel.h irc-color.c irc-color.h irc-command.c irc-command.h
irc-completion.c irc-completion.h irc-config.c irc-config.h irc-dcc.h
irc-debug.c irc-debug.h irc-display.c irc-display.h irc-input.c irc-input.h
irc-mode.c irc-mode.h irc-nick.c irc-nick.h irc-protocol.c irc-protocol.h
ADD_LIBRARY(irc MODULE
irc.c irc.h
irc-buffer.c irc-buffer.h
irc-channel.c irc-channel.h
irc-color.c irc-color.h
irc-command.c irc-command.h
irc-completion.c irc-completion.h
irc-config.c irc-config.h
irc-dcc.c irc-dcc.h
irc-debug.c irc-debug.h
irc-display.c irc-display.h
irc-input.c irc-input.h
irc-mode.c irc-mode.h
irc-nick.c irc-nick.h
irc-protocol.c irc-protocol.h
irc-server.c irc-server.h)
SET_TARGET_PROPERTIES(irc PROPERTIES PREFIX "")
CHECK_INCLUDE_FILES("regex.h" HAVE_REGEX_H)
CHECK_FUNCTION_EXISTS(regexec HAVE_REGEXEC)
CHECK_FUNCTION_EXISTS(uname HAVE_UNAME)
TARGET_LINK_LIBRARIES(irc)
+2 -3
View File
@@ -34,6 +34,7 @@ irc_la_SOURCES = irc.c \
irc-completion.h \
irc-config.c \
irc-config.h \
irc-dcc.c \
irc-dcc.h \
irc-debug.c \
irc-debug.h \
@@ -50,7 +51,5 @@ irc_la_SOURCES = irc.c \
irc-server.c \
irc-server.h
# irc-dcc.c
irc_la_LDFLAGS = -module
irc_la_LIBADD = $(GNUTLS_LFLAGS)
irc_la_LIBADD = $(IRC_LFLAGS) $(GNUTLS_LFLAGS)
+60 -6
View File
@@ -25,6 +25,9 @@
#include <ctype.h>
#include <sys/time.h>
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "../weechat-plugin.h"
#include "irc.h"
@@ -855,16 +858,29 @@ int
irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
struct sockaddr_in addr;
socklen_t length;
unsigned long address;
struct t_plugin_infolist *infolist;
struct t_plugin_infolist_item *item;
char plugin_id[128], str_address[128];
IRC_GET_SERVER_CHANNEL(buffer);
if (!ptr_server || !ptr_server->is_connected)
return WEECHAT_RC_ERROR;
/* make compiler happy */
/* make C compiler happy */
(void) data;
(void) argv_eol; // to remove!
if (argc > 1)
{
/* use the local interface, from the server socket */
memset (&addr, 0, sizeof (struct sockaddr_in));
length = sizeof (addr);
getsockname (ptr_server->sock, (struct sockaddr *) &addr, &length);
addr.sin_family = AF_INET;
address = ntohl (addr.sin_addr.s_addr);
/* DCC SEND file */
if (weechat_strcasecmp (argv[1], "send") == 0)
{
@@ -872,8 +888,28 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
{
IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "dcc send");
}
//irc_dcc_send_request (ptr_server, IRC_DCC_FILE_SEND,
// argv[2], argv_eol[3]);
infolist = weechat_infolist_new ();
if (infolist)
{
item = weechat_infolist_new_item (infolist);
if (item)
{
snprintf (plugin_id, sizeof (plugin_id),
"irc_%x", (unsigned int)ptr_server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "file_send");
weechat_infolist_new_var_string (item, "protocol", "dcc");
weechat_infolist_new_var_string (item, "nick", argv[2]);
weechat_infolist_new_var_string (item, "filename", argv_eol[3]);
snprintf (str_address, sizeof (str_address),
"%lu", address);
weechat_infolist_new_var_string (item, "address", str_address);
weechat_hook_signal_send ("xfer_add",
WEECHAT_HOOK_SIGNAL_POINTER,
infolist);
}
weechat_infolist_free (infolist);
}
}
/* DCC CHAT */
else if (weechat_strcasecmp (argv[1], "chat") == 0)
@@ -882,8 +918,26 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
{
IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "dcc chat");
}
//irc_dcc_send_request (ptr_server, IRC_DCC_CHAT_SEND,
// argv[2], NULL);
infolist = weechat_infolist_new ();
if (infolist)
{
item = weechat_infolist_new_item (infolist);
if (item)
{
snprintf (plugin_id, sizeof (plugin_id),
"irc_%x", (unsigned int)ptr_server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "chat_send");
weechat_infolist_new_var_string (item, "nick", argv[2]);
snprintf (str_address, sizeof (str_address),
"%lu", address);
weechat_infolist_new_var_string (item, "address", str_address);
weechat_hook_signal_send ("xfer_add",
WEECHAT_HOOK_SIGNAL_POINTER,
infolist);
}
weechat_infolist_free (infolist);
}
}
/* close DCC CHAT */
else if (weechat_strcasecmp (argv[1], "close") == 0)
File diff suppressed because it is too large Load Diff
+1 -14
View File
@@ -57,7 +57,7 @@ enum t_irc_config_server_option
#define IRC_CONFIG_SERVER_DEFAULT_AUTOREJOIN 0
extern char *irc_config_server_option_str[];
extern char *irc_config_server_option_string[];
extern struct t_config_file *irc_config;
extern struct t_config_option *irc_config_look_one_server_buffer;
@@ -82,19 +82,6 @@ extern struct t_config_option *irc_config_network_colors_receive;
extern struct t_config_option *irc_config_network_colors_send;
extern struct t_config_option *irc_config_network_send_unknown_commands;
extern struct t_config_option *irc_config_dcc_auto_accept_files;
extern struct t_config_option *irc_config_dcc_auto_accept_chats;
extern struct t_config_option *irc_config_dcc_timeout;
extern struct t_config_option *irc_config_dcc_blocksize;
extern struct t_config_option *irc_config_dcc_fast_send;
extern struct t_config_option *irc_config_dcc_port_range;
extern struct t_config_option *irc_config_dcc_own_ip;
extern struct t_config_option *irc_config_dcc_download_path;
extern struct t_config_option *irc_config_dcc_upload_path;
extern struct t_config_option *irc_config_dcc_convert_spaces;
extern struct t_config_option *irc_config_dcc_auto_rename;
extern struct t_config_option *irc_config_dcc_auto_resume;
extern struct t_config_option *irc_config_log_auto_log_server;
extern struct t_config_option *irc_config_log_auto_log_channel;
extern struct t_config_option *irc_config_log_auto_log_private;
+13 -1630
View File
File diff suppressed because it is too large Load Diff
+9 -15
View File
@@ -63,20 +63,16 @@ irc_debug_printf (struct t_irc_server *server, int send, int modified,
if (!irc_debug_buffer)
{
/* search for irc debug buffer */
irc_debug_buffer = weechat_buffer_search ("irc", "debug");
irc_debug_buffer = weechat_buffer_new ("irc", "debug",
NULL, NULL,
&irc_debug_buffer_close_cb, NULL);
/* failed to create buffer ? then exit */
if (!irc_debug_buffer)
{
irc_debug_buffer = weechat_buffer_new ("irc", "debug",
NULL, NULL,
&irc_debug_buffer_close_cb, NULL);
/* failed to create buffer ? then exit */
if (!irc_debug_buffer)
return;
weechat_buffer_set (irc_debug_buffer,
"title", _("IRC debug messages"));
}
return;
weechat_buffer_set (irc_debug_buffer,
"title", _("IRC debug messages"));
}
buf = weechat_iconv_to_internal (NULL, message);
@@ -144,8 +140,6 @@ irc_debug_signal_debug_dump_cb (void *data, char *signal, char *type_data,
irc_server_print_log ();
//irc_dcc_print_log ();
weechat_log_printf ("");
weechat_log_printf ("***** End of \"%s\" plugin dump *****",
weechat_plugin->name);
File diff suppressed because it is too large Load Diff
+2
View File
@@ -186,6 +186,8 @@ extern void irc_server_disconnect (struct t_irc_server *server, int reconnect);
extern void irc_server_disconnect_all ();
extern void irc_server_free (struct t_irc_server *server);
extern void irc_server_free_data (struct t_irc_server *server);
extern int irc_server_xfer_send_ready_cb (void *data, char *signal,
char *type_data, void *signal_data);
extern void irc_server_print_log ();
#endif /* irc-server.h */
+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 ();
+11 -1
View File
@@ -38,6 +38,7 @@
#include "../core/wee-hook.h"
#include "../core/wee-list.h"
#include "../core/wee-log.h"
#include "../core/wee-network.h"
#include "../core/wee-string.h"
#include "../core/wee-utf8.h"
#include "../core/wee-util.h"
@@ -396,8 +397,17 @@ plugin_load (char *filename)
new_plugin->command = &plugin_api_command;
new_plugin->info_get = &plugin_api_info_get;
new_plugin->network_pass_proxy = &network_pass_proxy;
new_plugin->network_connect_to = &network_connect_to;
new_plugin->info_get = &plugin_api_info_get;
new_plugin->infolist_new = &plugin_infolist_new;
new_plugin->infolist_new_item = &plugin_infolist_new_item;
new_plugin->infolist_new_var_integer = &plugin_infolist_new_var_integer;
new_plugin->infolist_new_var_string = &plugin_infolist_new_var_string;
new_plugin->infolist_new_var_pointer = &plugin_infolist_new_var_pointer;
new_plugin->infolist_new_var_time = &plugin_infolist_new_var_time;
new_plugin->infolist_get = &plugin_api_infolist_get;
new_plugin->infolist_next = &plugin_api_infolist_next;
new_plugin->infolist_prev = &plugin_api_infolist_prev;
+36
View File
@@ -388,11 +388,29 @@ struct t_weechat_plugin
/* command */
void (*command) (struct t_weechat_plugin *plugin,
struct t_gui_buffer *buffer, char *command);
/* network */
int (*network_pass_proxy) (int sock, char *address, int port);
int (*network_connect_to) (int sock, unsigned long address, int port);
/* infos */
char *(*info_get) (struct t_weechat_plugin *plugin, char *info);
/* infolists */
struct t_plugin_infolist *(*infolist_new) ();
struct t_plugin_infolist_item *(*infolist_new_item) (struct t_plugin_infolist *list);
struct t_plugin_infolist_var *(*infolist_new_var_integer) (struct t_plugin_infolist_item *item,
char *name,
int value);
struct t_plugin_infolist_var *(*infolist_new_var_string) (struct t_plugin_infolist_item *item,
char *name,
char *value);
struct t_plugin_infolist_var *(*infolist_new_var_pointer) (struct t_plugin_infolist_item *item,
char *name,
void *pointer);
struct t_plugin_infolist_var *(*infolist_new_var_time) (struct t_plugin_infolist_item *item,
char *name,
time_t time);
struct t_plugin_infolist *(*infolist_get) (char *name, void *pointer,
char *arguments);
int (*infolist_next) (struct t_plugin_infolist *infolist);
@@ -792,11 +810,29 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
#define weechat_command(__buffer, __command) \
weechat_plugin->command(weechat_plugin, __buffer, __command)
/* network */
#define weechat_network_pass_proxy(__sock, __address, __port) \
weechat_plugin->network_pass_proxy(__sock, __address, __port)
#define weechat_network_connect_to(__sock, __address, __port) \
weechat_plugin->network_connect_to(__sock, __address, __port)
/* infos */
#define weechat_info_get(__name) \
weechat_plugin->info_get(weechat_plugin, __name)
/* infolists */
#define weechat_infolist_new() \
weechat_plugin->infolist_new()
#define weechat_infolist_new_item(__list) \
weechat_plugin->infolist_new_item(__list)
#define weechat_infolist_new_var_integer(__item, __name, __value) \
weechat_plugin->infolist_new_var_integer(__item, __name, __value)
#define weechat_infolist_new_var_string(__item, __name, __value) \
weechat_plugin->infolist_new_var_string(__item, __name, __value)
#define weechat_infolist_new_var_pointer(__item, __name, __pointer) \
weechat_plugin->infolist_new_var_pointer(__item, __name, __pointer)
#define weechat_infolist_new_var_time(__item, __name, __time) \
weechat_plugin->infolist_new_var_time(__item, __name, __time)
#define weechat_infolist_get(__name, __pointer, __arguments) \
weechat_plugin->infolist_get(__name, __pointer, __arguments)
#define weechat_infolist_next(__list) \
+29
View File
@@ -0,0 +1,29 @@
# Copyright (c) 2003-2008 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
ADD_LIBRARY(xfer MODULE
xfer.c xfer.h
xfer-buffer.c xfer-buffer.h
xfer-chat.c xfer-chat.h
xfer-config.c xfer-config.h
xfer-dcc.c xfer-dcc.h
xfer-file.c xfer-file.h
xfer-network.c xfer-network.h)
SET_TARGET_PROPERTIES(xfer PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(xfer)
INSTALL(TARGETS xfer LIBRARY DESTINATION lib/${PROJECT_NAME}/plugins)
+39
View File
@@ -0,0 +1,39 @@
# Copyright (c) 2003-2008 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
libdir = ${weechat_libdir}/plugins
lib_LTLIBRARIES = xfer.la
xfer_la_SOURCES = xfer.c \
xfer.h \
xfer-buffer.c \
xfer-buffer.h \
xfer-chat.c \
xfer-chat.h \
xfer-config.c \
xfer-config.h \
xfer-dcc.c \
xfer-dcc.h \
xfer-file.c \
xfer-file.h \
xfer-network.c \
xfer-network.h
xfer_la_LDFLAGS = -module
xfer_la_LIBADD = $(XFER_LFLAGS)
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_DISPLAY_H
#define __WEECHAT_XFER_DISPLAY_H 1
extern struct t_gui_buffer *xfer_buffer;
extern void xfer_buffer_open ();
extern void xfer_buffer_refresh (char *hotlist);
#endif /* xfer.h */
File diff suppressed because it is too large Load Diff
+24
View File
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_CHAT_H
#define __WEECHAT_XFER_CHAT_H 1
#endif /* xfer-chat.h */
File diff suppressed because it is too large Load Diff
+52
View File
@@ -0,0 +1,52 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_CONFIG_H
#define __WEECHAT_XFER_CONFIG_H 1
#define XFER_CONFIG_NAME "xfer"
extern struct t_config_file *xfer_config;
extern struct t_config_option *xfer_config_look_auto_open_buffer;
extern struct t_config_option *xfer_config_color_text;
extern struct t_config_option *xfer_config_color_text_bg;
extern struct t_config_option *xfer_config_color_selected_bg;
extern struct t_config_option *xfer_config_color_status[];
extern struct t_config_option *xfer_config_network_timeout;
extern struct t_config_option *xfer_config_network_blocksize;
extern struct t_config_option *xfer_config_network_fast_send;
extern struct t_config_option *xfer_config_network_port_range;
extern struct t_config_option *xfer_config_network_own_ip;
extern struct t_config_option *xfer_config_file_download_path;
extern struct t_config_option *xfer_config_file_upload_path;
extern struct t_config_option *xfer_config_file_convert_spaces;
extern struct t_config_option *xfer_config_file_auto_rename;
extern struct t_config_option *xfer_config_file_auto_resume;
extern struct t_config_option *xfer_config_file_auto_accept_files;
extern struct t_config_option *xfer_config_file_auto_accept_chats;
extern int xfer_config_init ();
extern int xfer_config_read ();
extern int xfer_config_write ();
#endif /* xfer-config.h */
File diff suppressed because it is too large Load Diff
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_DCC_H
#define __WEECHAT_XFER_DCC_H 1
extern void xfer_dcc_send_file_child (struct t_xfer *xfer);
extern void xfer_dcc_recv_file_child (struct t_xfer *xfer);
#endif /* xfer-dcc.h */
File diff suppressed because it is too large Load Diff
+27
View File
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_FILE_H
#define __WEECHAT_XFER_FILE_H 1
extern int xfer_file_resume (struct t_xfer *xfer, char *filename);
extern void xfer_file_find_filename (struct t_xfer *xfer);
extern void xfer_file_calculate_speed (struct t_xfer *xfer, int ended);
#endif /* xfer-file.h */
File diff suppressed because it is too large Load Diff
+30
View File
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_NETWORK_H
#define __WEECHAT_XFER_NETWORK_H 1
extern int xfer_network_connect (struct t_xfer *xfer);
extern int xfer_network_create_pipe (struct t_xfer *xfer);
extern void xfer_network_write_pipe (struct t_xfer *xfer, int status,
int error);
extern void xfer_network_connect_init (struct t_xfer *xfer);
extern void xfer_network_child_kill (struct t_xfer *xfer);
#endif /* xfer-network.h */
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff