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

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")

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,

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

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

588
po/cs.po
View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-04-29 18:22+0200\n"
"POT-Creation-Date: 2008-05-04 17:30+0200\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1421,38 +1421,6 @@ msgstr "barva pro '+' při procházení přezdívek"
msgid "text color for nicklist separator"
msgstr "barva děliče přezdívek"
#, fuzzy
msgid "text color for status info"
msgstr "barva status baru"
#, fuzzy
msgid "background color for status info"
msgstr "pozadí stavového okna"
#, fuzzy
msgid "text color for \"waiting\" status info"
msgstr "barva pro \"waiting\" status dcc"
#, fuzzy
msgid "text color for \"connecting\" status info"
msgstr "barva pro \"connecting\" status dcc"
#, fuzzy
msgid "text color for \"active\" status info"
msgstr "barva pro \"active\" status dcc"
#, fuzzy
msgid "text color for \"done\" status info"
msgstr "barva pro \"done\" status dcc"
#, fuzzy
msgid "text color for \"failed\" status info"
msgstr "barva pro \"failed\" status dcc"
#, fuzzy
msgid "text color for \"aborted\" status info"
msgstr "barva pro \"aborted\" status dcc"
#, fuzzy
msgid "maximum number of lines in history per buffer (0 = unlimited)"
msgstr "maximální počet uživatelských příkazů v historii (0 = nekonečně)"
@ -3144,60 +3112,6 @@ msgstr ""
msgid "send unknown commands to IRC server"
msgstr "poslat neznámý příkaz na IRC server"
#, fuzzy
msgid "automatically accept incoming dcc files (use carefully!)"
msgstr "automaticky akceptovat dcc rozhovor (používejte opatrně!)"
msgid "automatically accept dcc chats (use carefully!)"
msgstr "automaticky akceptovat dcc rozhovor (používejte opatrně!)"
msgid "timeout for dcc request (in seconds)"
msgstr "časový limit pro dcc požadavek (v sekundách)"
#, fuzzy
msgid "block size for dcc packets in bytes"
msgstr "velikost bloku pro dcc pakety"
msgid "does not wait for ACK when sending file"
msgstr "nečekat na ACK při odesílání souboru"
msgid ""
"restricts outgoing dcc to use only ports in the given range (useful for NAT) "
"(syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, empty value "
"means any port)"
msgstr ""
"omezit odchozí dcc pro používaní portů pouze v zadaném rozsahu (užitečné pro "
"NAT) (syntaxe: samostatný port, např. 5000 nebo rozsah portů např. 5000-"
"5015, prázdná hodnota znamená jakýkoliv port)"
msgid ""
"IP or DNS address used for outgoing dcc (if empty, local interface IP is "
"used)"
msgstr ""
"IP nebo DNS adresa použitá pro odchozí dcc (pokud je prázdné použije se "
"lokální IP)"
#, fuzzy
msgid "path for writing incoming files with dcc"
msgstr "cesta pro příchozí dcc soubory"
msgid ""
"path for reading files when sending thru dcc (when no path is specified)"
msgstr ""
"cesta pro čtení souborů při odesílání přes dcc (když není specifikována "
"cesta)"
msgid "convert spaces to underscores when sending files"
msgstr "konvertovat mezery na podtržítka při odesílání souborů"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"přejmenovat příchozí soubory, jestliže již existují (přídat '.1', '.2', ...)"
msgid ""
"automatically resume dcc transfer if connection with remote host is loosed"
msgstr "automaticky obnovit dcc přenos pokud bylo ztraceno spojení s hostem"
msgid "automatically log server messages"
msgstr "automati logovat zprávy server"
@ -3210,187 +3124,6 @@ msgstr "automaticky logovat soukromé rozhovory"
msgid "hide password displayed by nickserv"
msgstr "schovat heslo zobrazené nickservem"
msgid "Waiting"
msgstr "Čekám"
msgid "Connecting"
msgstr "Připojuji"
msgid "Active"
msgstr "Aktivní"
msgid "Done"
msgstr "Provedeno"
msgid "Failed"
msgstr "Selhal"
msgid "Aborted"
msgstr "Zrušeno"
#, c-format
msgid "DCC: file %s%s%s"
msgstr "DCC: soubor %s%s%s"
#, c-format
msgid " (local filename: %s%s%s)"
msgstr " (lokální jmého souboru: %s%s%s)"
msgid " sent to "
msgstr " poslán "
msgid " received from "
msgstr " obdržen od "
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "SELHALO"
#, c-format
msgid "DCC chat closed with %s%s %s(%s%d.%d.%d.%d%s)\n"
msgstr "DCC rozhovor zavřen s %s%s %s(%s%d.%d.%d.%d%s)\n"
#, c-format
msgid ""
"%s can't associate DCC chat with private buffer (maybe private buffer has "
"already DCC CHAT?)\n"
msgstr ""
"%s nemohu přiřadit DCC rozhovor k soukromému bufferu (možná má "
"soukromýbuffer již DCC CHAT?)\n"
#, c-format
msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
msgstr "Připojeno na %s%s %s(%s%d.%d.%d.%d.%s)%s přes DCC rozhovor\n"
#, c-format
msgid "DCC: file %s%s%s resumed at position %u\n"
msgstr "DCC: soubor %s%s%s bude obnoven na pozici %u\n"
#, c-format
msgid ""
"%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found or "
"ended\n"
msgstr ""
"%s nemohu obnovit soubor \"%s\" (port: %d, počáteční pozice: %u): DCC "
"nenalezeno nebo ukončeno\n"
#, c-format
msgid "%s not enough memory for new DCC\n"
msgstr "%s nedostatek paměti pro nové DCC\n"
msgid "DCC chat"
msgstr "DCC rozhovor"
#, c-format
msgid ""
"Incoming DCC file from %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s bytes\n"
msgstr ""
"Příchozí DCC soubor od %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s bytů\n"
#, c-format
msgid ""
"Sending DCC file to %s%s%s: %s%s%s (local filename: %s%s%s), %s%lu%s bytes\n"
msgstr ""
"Posílám DCC soubor k %s%s%s: %s%s%s (lokální jméno souboru: %s%s%s), %s%lu%s "
"bytů\n"
#, c-format
msgid "Incoming DCC chat request from %s%s%s (%s%d.%d.%d.%d%s)\n"
msgstr "Příchozí požadavek DCC rozhovoru od %s%s%s (%s%d.%d.%d.%d%s)\n"
#, c-format
msgid "Sending DCC chat request to %s%s\n"
msgstr "Posílám požadavek DCC rozhovoru na %s%s\n"
#, c-format
msgid ""
"DCC: file %s%s%s (local filename: %s%s%s) will be resumed at position %u\n"
msgstr ""
"DCC: soubor %s%s%s (lokální jméno souboru: %s%s%s) bude obnoven na pozici %"
"u\n"
#, c-format
msgid "%s not enough memory for DCC SEND\n"
msgstr "%s nedostatek pameti pro DCC SEND\n"
#, c-format
msgid "%s cannot access file \"%s\"\n"
msgstr "%s nemohu přistupovat k souboru \"%s\"\n"
#, c-format
msgid "%s could not find address for '%s'. Falling back to local IP.\n"
msgstr "%s nemůžu najíž adresu pro '%s'. Navracím se k lokální IP.\n"
#, c-format
msgid "%s cannot create socket for DCC\n"
msgstr "%s nemohu vytvořit soket pro DCC\n"
#, c-format
msgid "%s cannot find available port for DCC\n"
msgstr "%s nemůžu najít dostupný port pro DCC\n"
#, c-format
msgid "%s cannot send DCC\n"
msgstr "%s neomhu poslat DCC\n"
#, c-format
msgid "%s error sending data to \"%s\" via DCC CHAT\n"
msgstr "%s chyba posílání dat k \"%s\" přes DCC CHAT\n"
#, c-format
msgid "Private %s> %s"
msgstr "Soukromý %s> %s"
#, c-format
msgid "%s DCC: unable to create pipe\n"
msgstr "%s DCC: nemohu vytvořit rouru\n"
#, c-format
msgid "%s DCC: unable to read local file\n"
msgstr "%s DCC: nemohu číst lokální soubor\n"
#, c-format
msgid "%s DCC: unable to send block to receiver\n"
msgstr "%s DCC: nemohu odeslat blok příjemci\n"
#, c-format
msgid "%s DCC: unable to read ACK from receiver\n"
msgstr "%s DCC: nemohu číst ACK od příjemce\n"
#, c-format
msgid "%s DCC: unable to connect to sender\n"
msgstr "%s DCC: nemohu se připojit k odesílateli\n"
#, c-format
msgid "%s DCC: unable to receive block from sender\n"
msgstr "%s DCC: nemohu přijmout blok od odesílatele\n"
#, c-format
msgid "%s DCC: unable to write local file\n"
msgstr "%s DCC: nemohu zapisovat do lokálního souboru\n"
#, c-format
msgid "%s DCC: unable to fork\n"
msgstr "%s DCC: nemohu provést fork\n"
#, c-format
msgid "%s DCC: timeout\n"
msgstr "%s DCC: překročení časového limitu\n"
#, c-format
msgid "%s DCC: unable to create socket for sending file\n"
msgstr "%s DCC: nemohu vytvořit socket pro odesílání souboru\n"
#, c-format
msgid "%s DCC: unable to set 'nonblock' option for socket\n"
msgstr "%s DCC: nemohu nastavit 'neblokovaci' volbu na soket\n"
#, fuzzy, c-format
msgid "Aborting active DCC: \"%s\" from %s"
msgstr "Ruším aktivní DCC: \"%s\" od %s\n"
#, fuzzy
msgid "IRC debug messages"
msgstr "vypsat debug zprávy"
@ -3490,6 +3223,10 @@ msgstr "CTCP %sVERSION%s odpověď od %s%s%s: %s\n"
msgid "%sCTCP %sPING%s reply from %s%s%s: %ld.%ld %s"
msgstr "CTCP %sPING%s odpověď od %s%s%s: %ld.%ld sekund\n"
#, c-format
msgid "Private %s> %s"
msgstr "Soukromý %s> %s"
#, fuzzy, c-format
msgid "%s%s%s %s(%s%s%s)%s has left %s%s %s(%s%s%s)"
msgstr "%s%s %s(%s%s%s)%s opustil %s%s"
@ -4452,6 +4189,317 @@ msgstr ""
msgid "%s%s: wrong arguments for function \"%s\""
msgstr "%s špatné parametry pro příkaz \"%s\"\n"
#, fuzzy
msgid "waiting"
msgstr "Čekám"
#, fuzzy
msgid "connecting"
msgstr "Připojuji"
#, fuzzy
msgid "active"
msgstr "Aktivní"
#, fuzzy
msgid "done"
msgstr "Provedeno"
#, fuzzy
msgid "failed"
msgstr "Selhal"
#, fuzzy
msgid "aborted"
msgstr "Zrušeno"
#, fuzzy, c-format
msgid "%s%s: not enough memory for new xfer"
msgstr "%s nedostatek paměti pro nové DCC\n"
#, fuzzy, c-format
msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)"
msgstr ""
"Příchozí DCC soubor od %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s bytů\n"
#, fuzzy, c-format
msgid ""
"%s: sending file to %s: %s (local filename: %s), %lu bytes (protocol: %s)"
msgstr ""
"Posílám DCC soubor k %s%s%s: %s%s%s (lokální jméno souboru: %s%s%s), %s%lu%s "
"bytů\n"
#, fuzzy, c-format
msgid "%s: incoming chat request from %s (%d.%d.%d.%d)"
msgstr "Příchozí požadavek DCC rozhovoru od %s%s%s (%s%d.%d.%d.%d%s)\n"
#, fuzzy, c-format
msgid "%s: sending chat request to %s"
msgstr "Posílám požadavek DCC rozhovoru na %s%s\n"
#, fuzzy, c-format
msgid "%s: file %s (local filename: %s) will be resumed at position %u"
msgstr ""
"DCC: soubor %s%s%s (lokální jméno souboru: %s%s%s) bude obnoven na pozici %"
"u\n"
#, fuzzy, c-format
msgid "%s: file %s %s %s: %s"
msgstr "DCC: soubor %s%s%s"
#, fuzzy
msgid "sent to"
msgstr " poslán "
#, fuzzy
msgid "received from"
msgstr " obdržen od "
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "SELHALO"
#, fuzzy, c-format
msgid "%s: chat closed with %s (%d.%d.%d.%d)"
msgstr "DCC rozhovor zavřen s %s%s %s(%s%d.%d.%d.%d%s)\n"
#, fuzzy, c-format
msgid "%s%s: missing arguments"
msgstr "%s chybí argument pro volbu \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer type \"%s\""
msgstr "%s neznámá klávesová funkce \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: filename missing for type \"%s\""
msgstr "%s %s, řádek %d: nevalidní volba \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: protocol missing for type \"%s\""
msgstr "%s %s, řádek %d: nevalidní volba \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer protocol \"%s\""
msgstr "%s neznámá klávesová funkce \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: not enough memory"
msgstr "Nedostatek paměti pro nový řádek\n"
#, fuzzy, c-format
msgid "%s%s: cannot access file \"%s\""
msgstr "%s nemohu přistupovat k souboru \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: could not find address for \"%s\", falling back to local IP"
msgstr "%s nemůžu najíž adresu pro '%s'. Navracím se k lokální IP.\n"
#, fuzzy, c-format
msgid "%s%s: cannot create socket for xfer"
msgstr "%s nemohu vytvořit soket\n"
#, fuzzy, c-format
msgid "%s%s: cannot find available port for xfer"
msgstr "%s nemůžu najít dostupný port pro DCC\n"
#, fuzzy, c-format
msgid "%s%s: error creating xfer"
msgstr "%s nedostatek paměti pro infobar zprávu\n"
#, fuzzy, c-format
msgid "%s%s: aborting active xfer: \"%s\" from %s"
msgstr "Ruším aktivní DCC: \"%s\" od %s\n"
#, fuzzy, c-format
msgid "%s: aborting active xfer: \"%s\" from %s"
msgstr "Ruším aktivní DCC: \"%s\" od %s\n"
#, fuzzy
msgid "text color"
msgstr "barva pro text rozhovoru"
#, fuzzy
msgid "background color"
msgstr "pozadí přezdívek"
#, fuzzy
msgid "background color for selected line"
msgstr "barva pro vstupní text"
#, fuzzy
msgid "text color for \"waiting\" status"
msgstr "barva pro \"waiting\" status dcc"
#, fuzzy
msgid "text color for \"connecting\" status"
msgstr "barva pro \"connecting\" status dcc"
#, fuzzy
msgid "text color for \"active\" status"
msgstr "barva pro \"active\" status dcc"
#, fuzzy
msgid "text color for \"done\" status"
msgstr "barva pro \"done\" status dcc"
#, fuzzy
msgid "text color for \"failed\" status"
msgstr "barva pro \"failed\" status dcc"
#, fuzzy
msgid "text color for \"aborted\" status"
msgstr "barva pro \"aborted\" status dcc"
#, fuzzy
msgid "timeout for xfer request (in seconds)"
msgstr "časový limit pro dcc požadavek (v sekundách)"
#, fuzzy
msgid "block size for sending packets, in bytes"
msgstr "velikost bloku pro dcc pakety"
msgid "does not wait for ACK when sending file"
msgstr "nečekat na ACK při odesílání souboru"
#, fuzzy
msgid ""
"restricts outgoing files/chats to use only ports in the given range (useful "
"for NAT) (syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, "
"empty value means any port)"
msgstr ""
"omezit odchozí dcc pro používaní portů pouze v zadaném rozsahu (užitečné pro "
"NAT) (syntaxe: samostatný port, např. 5000 nebo rozsah portů např. 5000-"
"5015, prázdná hodnota znamená jakýkoliv port)"
#, fuzzy
msgid ""
"IP or DNS address used for sending files/chats (if empty, local interface IP "
"is used)"
msgstr ""
"IP nebo DNS adresa použitá pro odchozí dcc (pokud je prázdné použije se "
"lokální IP)"
#, fuzzy
msgid "path for writing incoming files"
msgstr "cesta pro příchozí dcc soubory"
#, fuzzy
msgid "path for reading files when sending (when no path is specified by user)"
msgstr ""
"cesta pro čtení souborů při odesílání přes dcc (když není specifikována "
"cesta)"
msgid "convert spaces to underscores when sending files"
msgstr "konvertovat mezery na podtržítka při odesílání souborů"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"přejmenovat příchozí soubory, jestliže již existují (přídat '.1', '.2', ...)"
#, fuzzy
msgid ""
"automatically resume file transfer if connection with remote host is lost"
msgstr "automaticky obnovit dcc přenos pokud bylo ztraceno spojení s hostem"
#, fuzzy
msgid "automatically accept incoming files (use carefully!)"
msgstr "automaticky akceptovat dcc rozhovor (používejte opatrně!)"
#, fuzzy
msgid "automatically accept chat requests (use carefully!)"
msgstr "automaticky akceptovat dcc rozhovor (používejte opatrně!)"
#, fuzzy, c-format
msgid "%s%s: unable to create pipe"
msgstr "%s DCC: nemohu vytvořit rouru\n"
#, fuzzy, c-format
msgid "%s%s: unable to fork"
msgstr "%s DCC: nemohu provést fork\n"
#, fuzzy, c-format
msgid "%s%s: unable to read local file"
msgstr "%s DCC: nemohu číst lokální soubor\n"
#, fuzzy, c-format
msgid "%s%s: unable to send block to receiver"
msgstr "%s DCC: nemohu odeslat blok příjemci\n"
#, fuzzy, c-format
msgid "%s%s: unable to read ACK from receiver"
msgstr "%s DCC: nemohu číst ACK od příjemce\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect to sender"
msgstr "%s DCC: nemohu se připojit k odesílateli\n"
#, fuzzy, c-format
msgid "%s%s: unable to receive block from sender"
msgstr "%s DCC: nemohu přijmout blok od odesílatele\n"
#, fuzzy, c-format
msgid "%s%s: unable to write local file"
msgstr "%s DCC: nemohu zapisovat do lokálního souboru\n"
#, fuzzy, c-format
msgid "%s%s: error sending data to \"%s\" via xfer chat"
msgstr "%s chyba posílání dat k \"%s\" přes DCC CHAT\n"
#, fuzzy
#~ msgid "text color for status info"
#~ msgstr "barva status baru"
#, fuzzy
#~ msgid "background color for status info"
#~ msgstr "pozadí stavového okna"
#~ msgid " (local filename: %s%s%s)"
#~ msgstr " (lokální jmého souboru: %s%s%s)"
#~ msgid ""
#~ "%s can't associate DCC chat with private buffer (maybe private buffer has "
#~ "already DCC CHAT?)\n"
#~ msgstr ""
#~ "%s nemohu přiřadit DCC rozhovor k soukromému bufferu (možná má "
#~ "soukromýbuffer již DCC CHAT?)\n"
#~ msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
#~ msgstr "Připojeno na %s%s %s(%s%d.%d.%d.%d.%s)%s přes DCC rozhovor\n"
#~ msgid "DCC: file %s%s%s resumed at position %u\n"
#~ msgstr "DCC: soubor %s%s%s bude obnoven na pozici %u\n"
#~ msgid ""
#~ "%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found "
#~ "or ended\n"
#~ msgstr ""
#~ "%s nemohu obnovit soubor \"%s\" (port: %d, počáteční pozice: %u): DCC "
#~ "nenalezeno nebo ukončeno\n"
#~ msgid "DCC chat"
#~ msgstr "DCC rozhovor"
#~ msgid "%s not enough memory for DCC SEND\n"
#~ msgstr "%s nedostatek pameti pro DCC SEND\n"
#~ msgid "%s cannot create socket for DCC\n"
#~ msgstr "%s nemohu vytvořit soket pro DCC\n"
#~ msgid "%s cannot send DCC\n"
#~ msgstr "%s neomhu poslat DCC\n"
#~ msgid "%s DCC: timeout\n"
#~ msgstr "%s DCC: překročení časového limitu\n"
#~ msgid "%s DCC: unable to create socket for sending file\n"
#~ msgstr "%s DCC: nemohu vytvořit socket pro odesílání souboru\n"
#~ msgid "%s DCC: unable to set 'nonblock' option for socket\n"
#~ msgstr "%s DCC: nemohu nastavit 'neblokovaci' volbu na soket\n"
#~ msgid "Internal key functions:\n"
#~ msgstr "Vnitřní klávesové funkce:\n"
@ -4680,10 +4728,6 @@ msgstr "%s špatné parametry pro příkaz \"%s\"\n"
#~ msgid "manage charsets"
#~ msgstr "řídit buffery"
#, fuzzy
#~ msgid "%s%s: value \"%s\" is invalid for option \"%s\""
#~ msgstr "%s %s, řádek %d: nevalidní volba \"%s\"\n"
#, fuzzy
#~ msgid "%s%s: error creating server for reading configuration file"
#~ msgstr "říct serveru, aby znovu načetl svůj konfigurační soubor"

598
po/de.po
View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-04-29 18:22+0200\n"
"POT-Creation-Date: 2008-05-04 17:30+0200\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1415,38 +1415,6 @@ msgstr "Farbe des '+' beim Scrolling von Nicknames"
msgid "text color for nicklist separator"
msgstr "Farbe der Nicknamefenster-Trennlinie"
#, fuzzy
msgid "text color for status info"
msgstr "Farbe der Statuszeile"
#, fuzzy
msgid "background color for status info"
msgstr "Hintergrund des Statusfensters"
#, fuzzy
msgid "text color for \"waiting\" status info"
msgstr "Farbe des DCC-Status 'warten'"
#, fuzzy
msgid "text color for \"connecting\" status info"
msgstr "Farbe des DCC-Status 'verbinden'"
#, fuzzy
msgid "text color for \"active\" status info"
msgstr "Farbe des DCC-Status 'aktiv'"
#, fuzzy
msgid "text color for \"done\" status info"
msgstr "Farbe des DCC-Status 'fertig'"
#, fuzzy
msgid "text color for \"failed\" status info"
msgstr "Farbe des DCC-Status 'fehlgeschlagen'"
#, fuzzy
msgid "text color for \"aborted\" status info"
msgstr "Farbe des DCC-Status 'abgebrochen'"
#, fuzzy
msgid "maximum number of lines in history per buffer (0 = unlimited)"
msgstr "maximale Anzahl an Befehlen im Verlauf (0: kein Limit)"
@ -3124,64 +3092,6 @@ msgstr ""
msgid "send unknown commands to IRC server"
msgstr "sende unbekannte Befehle an den IRC-Server"
#, fuzzy
msgid "automatically accept incoming dcc files (use carefully!)"
msgstr "DCC-CHats automatisch annehmen (Vorsicht!)"
msgid "automatically accept dcc chats (use carefully!)"
msgstr "DCC-CHats automatisch annehmen (Vorsicht!)"
msgid "timeout for dcc request (in seconds)"
msgstr "DCC-Timeout in Sekunden"
#, fuzzy
msgid "block size for dcc packets in bytes"
msgstr "Blockgröße für DCCs"
msgid "does not wait for ACK when sending file"
msgstr "warte beim Veschicken von Dateien nicht auf das ACK-Signal"
msgid ""
"restricts outgoing dcc to use only ports in the given range (useful for NAT) "
"(syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, empty value "
"means any port)"
msgstr ""
"beschränkt ausgehenden DCC auf die ausschließliche Benutzung von Ports in "
"einem vorgegebenen Bereich (hilfreich bei NAT) (Syntax: ein einzelner Port, "
"z.B. 5000, oder eine Port-Bereich, z.B. 5000-5015,wenn kein Bereich "
"angegeben ist, ist jeder Port möglich)"
msgid ""
"IP or DNS address used for outgoing dcc (if empty, local interface IP is "
"used)"
msgstr ""
"IP- oder DNS-Adresse für ausgehenden DCC (wenn kein Wert angegeben wird, "
"wird die IP des lokalen Interfaces benutzt)"
#, fuzzy
msgid "path for writing incoming files with dcc"
msgstr "Pfad für per DCC eingehende Dateien"
msgid ""
"path for reading files when sending thru dcc (when no path is specified)"
msgstr ""
"Pfad, aus dem Dateien standardmäßig gelesen werden, wenn keine explizite "
"Angabe vorliegt"
msgid "convert spaces to underscores when sending files"
msgstr "Leerzeichen in Unterstriche umwandeln beim Veschicken von Dateien"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"eingehende Dateien automatisch umbenennen, falls nötig, um Überschreiben zu "
"vermeiden (durch Hinzufügen von '.1', '.2', ...)"
msgid ""
"automatically resume dcc transfer if connection with remote host is loosed"
msgstr ""
"abgebrochene Übertragungen automatisch fortsetzen, wenn die Verbindung "
"abgebrochen ist"
msgid "automatically log server messages"
msgstr "Automatisches Logging von Servermessages"
@ -3194,188 +3104,6 @@ msgstr "Automatisches Logging von Queries"
msgid "hide password displayed by nickserv"
msgstr "Von NickServ angezeigte Passwörter verstecken"
msgid "Waiting"
msgstr "warten"
msgid "Connecting"
msgstr "verbinden"
msgid "Active"
msgstr "aktiv"
msgid "Done"
msgstr "fertig"
msgid "Failed"
msgstr "fehlg."
msgid "Aborted"
msgstr "abgebr."
#, c-format
msgid "DCC: file %s%s%s"
msgstr "DCC: Datei %s%s%s"
#, c-format
msgid " (local filename: %s%s%s)"
msgstr " (lokaler Dateiname: %s%s%s)"
msgid " sent to "
msgstr " gesendet an "
msgid " received from "
msgstr " empfangen von "
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "FEHLGESCHLAGEN"
#, c-format
msgid "DCC chat closed with %s%s %s(%s%d.%d.%d.%d%s)\n"
msgstr "DCC Chat mit %s%s %s(%s%d.%d.%d.%d%s) geschlossen \n"
#, c-format
msgid ""
"%s can't associate DCC chat with private buffer (maybe private buffer has "
"already DCC CHAT?)\n"
msgstr ""
"%s kann keinen DCC Chat mit privatem Puffer assoziieren (ist er bereits ein "
"DCC CHAT?)\n"
#, c-format
msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
msgstr "DCC Chat mit %s%s %s(%s%d.%d.%d.%d%s)%s aufgebaut\n"
#, c-format
msgid "DCC: file %s%s%s resumed at position %u\n"
msgstr "DCC: Datei %s%s%s wird an Position %u fortgesetzt\n"
#, c-format
msgid ""
"%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found or "
"ended\n"
msgstr ""
"%s kann die Datei \"%s\" nicht fortsetzen (Port: %d, Startposition: %u): DCC "
"nicht gefunden oder bereits fertig\n"
#, c-format
msgid "%s not enough memory for new DCC\n"
msgstr "%s nicht genug Speicher für neuen DCC\n"
msgid "DCC chat"
msgstr "DCC Chat"
#, c-format
msgid ""
"Incoming DCC file from %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s bytes\n"
msgstr ""
"Eingehende DCC-Datei von %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s Bytes\n"
#, c-format
msgid ""
"Sending DCC file to %s%s%s: %s%s%s (local filename: %s%s%s), %s%lu%s bytes\n"
msgstr ""
"Sende DCC-Datei zu %s%s%s: %s%s%s (lokaler Dateiname: %s%s%s), %s%lu%s "
"Bytes\n"
#, c-format
msgid "Incoming DCC chat request from %s%s%s (%s%d.%d.%d.%d%s)\n"
msgstr "Eingehende DCC-Chatanforderung von %s%s%s (%s%d.%d.%d.%d%s)\n"
#, c-format
msgid "Sending DCC chat request to %s%s\n"
msgstr "Sende DCC-Chatanforderung an %s%s\n"
#, c-format
msgid ""
"DCC: file %s%s%s (local filename: %s%s%s) will be resumed at position %u\n"
msgstr ""
"DCC: Datei %s%s%s (lokaler Dateiname: %s%s%s) wird an der Position %u "
"fortgesetzt\n"
#, c-format
msgid "%s not enough memory for DCC SEND\n"
msgstr "%s nicht genug Speicher für DCC SEND\n"
#, c-format
msgid "%s cannot access file \"%s\"\n"
msgstr "%s kann nicht auf die Datei \"%s\" zugreifen\n"
#, c-format
msgid "%s could not find address for '%s'. Falling back to local IP.\n"
msgstr ""
"%s kann die Adresse für '%s' nicht finden. Greife auf lokale IP zurück.\n"
#, c-format
msgid "%s cannot create socket for DCC\n"
msgstr "%s kann keinen Socket für DCC anlegen\n"
#, c-format
msgid "%s cannot find available port for DCC\n"
msgstr "%s kann keinen freien Port für DCC ermitteln\n"
#, c-format
msgid "%s cannot send DCC\n"
msgstr "%s kann keinen DCC senden\n"
#, c-format
msgid "%s error sending data to \"%s\" via DCC CHAT\n"
msgstr "%s Fehler beim Senden von Daten an \"%s\" via DCC CHAT\n"
#, c-format
msgid "Private %s> %s"
msgstr "Privat %s> %s"
#, c-format
msgid "%s DCC: unable to create pipe\n"
msgstr "%s DCC: kann keine Pipe erstellen\n"
#, c-format
msgid "%s DCC: unable to read local file\n"
msgstr "%s DCC: kann lokale Datei nicht lesen\n"
#, c-format
msgid "%s DCC: unable to send block to receiver\n"
msgstr "%s DCC: kann den Block nicht an den Empfänger übertragen\n"
#, c-format
msgid "%s DCC: unable to read ACK from receiver\n"
msgstr "%s DCC: kann kein ACK vom Empfänger empfangen\n"
#, c-format
msgid "%s DCC: unable to connect to sender\n"
msgstr "%s DCC: kann keine Verbindung zum Sender herstellen\n"
#, c-format
msgid "%s DCC: unable to receive block from sender\n"
msgstr "%s DCC: kann Block nicht vom Sender empfangen\n"
#, c-format
msgid "%s DCC: unable to write local file\n"
msgstr "%s DCC: kann lokalen Datei nicht schreiben\n"
#, c-format
msgid "%s DCC: unable to fork\n"
msgstr "%s DCC: kann nicht forken\n"
#, c-format
msgid "%s DCC: timeout\n"
msgstr "%s DCC: Timeout\n"
#, c-format
msgid "%s DCC: unable to create socket for sending file\n"
msgstr "%s DCC: kann keinen Socket für den Dateiversand erstellen\n"
#, c-format
msgid "%s DCC: unable to set 'nonblock' option for socket\n"
msgstr "%s DCC: kann die 'nonblock'-Option für den Socket nicht festlegen\n"
#, fuzzy, c-format
msgid "Aborting active DCC: \"%s\" from %s"
msgstr "Aktiver DCC wird abgebrochen: \"%s\" von %s\n"
#, fuzzy
msgid "IRC debug messages"
msgstr "Debugging-Nachricht ausgeben"
@ -3475,6 +3203,10 @@ msgstr "CTCP %sVERSION%s Antwort von %s%s%s: %s\n"
msgid "%sCTCP %sPING%s reply from %s%s%s: %ld.%ld %s"
msgstr "CTCP %sPING%s Antwort von %s%s%s: %ld.%ld Sekunden\n"
#, c-format
msgid "Private %s> %s"
msgstr "Privat %s> %s"
#, fuzzy, c-format
msgid "%s%s%s %s(%s%s%s)%s has left %s%s %s(%s%s%s)"
msgstr "%s%s %s(%s%s%s)%s verlässt %s%s"
@ -4441,6 +4173,322 @@ msgstr ""
msgid "%s%s: wrong arguments for function \"%s\""
msgstr "%s fehlerhafte Argumente für der \"%s\"-Befehl\n"
#, fuzzy
msgid "waiting"
msgstr "warten"
#, fuzzy
msgid "connecting"
msgstr "verbinden"
#, fuzzy
msgid "active"
msgstr "aktiv"
#, fuzzy
msgid "done"
msgstr "fertig"
#, fuzzy
msgid "failed"
msgstr "fehlg."
#, fuzzy
msgid "aborted"
msgstr "abgebr."
#, fuzzy, c-format
msgid "%s%s: not enough memory for new xfer"
msgstr "%s nicht genug Speicher für neuen DCC\n"
#, fuzzy, c-format
msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)"
msgstr ""
"Eingehende DCC-Datei von %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s Bytes\n"
#, fuzzy, c-format
msgid ""
"%s: sending file to %s: %s (local filename: %s), %lu bytes (protocol: %s)"
msgstr ""
"Sende DCC-Datei zu %s%s%s: %s%s%s (lokaler Dateiname: %s%s%s), %s%lu%s "
"Bytes\n"
#, fuzzy, c-format
msgid "%s: incoming chat request from %s (%d.%d.%d.%d)"
msgstr "Eingehende DCC-Chatanforderung von %s%s%s (%s%d.%d.%d.%d%s)\n"
#, fuzzy, c-format
msgid "%s: sending chat request to %s"
msgstr "Sende DCC-Chatanforderung an %s%s\n"
#, fuzzy, c-format
msgid "%s: file %s (local filename: %s) will be resumed at position %u"
msgstr ""
"DCC: Datei %s%s%s (lokaler Dateiname: %s%s%s) wird an der Position %u "
"fortgesetzt\n"
#, fuzzy, c-format
msgid "%s: file %s %s %s: %s"
msgstr "DCC: Datei %s%s%s"
#, fuzzy
msgid "sent to"
msgstr " gesendet an "
#, fuzzy
msgid "received from"
msgstr " empfangen von "
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "FEHLGESCHLAGEN"
#, fuzzy, c-format
msgid "%s: chat closed with %s (%d.%d.%d.%d)"
msgstr "DCC Chat mit %s%s %s(%s%d.%d.%d.%d%s) geschlossen \n"
#, fuzzy, c-format
msgid "%s%s: missing arguments"
msgstr "%s fehlende Argumente für die \"--dir\"-Option\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer type \"%s\""
msgstr "%s unbekannte Tasten-Funktion \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: filename missing for type \"%s\""
msgstr "%s %s, Zeile %d: ungültige Option \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: protocol missing for type \"%s\""
msgstr "%s %s, Zeile %d: ungültige Option \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer protocol \"%s\""
msgstr "%s unbekannte Tasten-Funktion \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: not enough memory"
msgstr "Nicht genügend Speicher für neue Zeile\n"
#, fuzzy, c-format
msgid "%s%s: cannot access file \"%s\""
msgstr "%s kann nicht auf die Datei \"%s\" zugreifen\n"
#, fuzzy, c-format
msgid "%s%s: could not find address for \"%s\", falling back to local IP"
msgstr ""
"%s kann die Adresse für '%s' nicht finden. Greife auf lokale IP zurück.\n"
#, fuzzy, c-format
msgid "%s%s: cannot create socket for xfer"
msgstr "%s Socket konnte nicht angelegt werden\n"
#, fuzzy, c-format
msgid "%s%s: cannot find available port for xfer"
msgstr "%s kann keinen freien Port für DCC ermitteln\n"
#, fuzzy, c-format
msgid "%s%s: error creating xfer"
msgstr "%s nicht genügend Speicher für Infobar-Nachricht\n"
#, fuzzy, c-format
msgid "%s%s: aborting active xfer: \"%s\" from %s"
msgstr "Aktiver DCC wird abgebrochen: \"%s\" von %s\n"
#, fuzzy, c-format
msgid "%s: aborting active xfer: \"%s\" from %s"
msgstr "Aktiver DCC wird abgebrochen: \"%s\" von %s\n"
#, fuzzy
msgid "text color"
msgstr "Farbe vom Chat-Text"
#, fuzzy
msgid "background color"
msgstr "Hintergrundfarbe der Nicknames"
#, fuzzy
msgid "background color for selected line"
msgstr "Farbe der Eingabezeile"
#, fuzzy
msgid "text color for \"waiting\" status"
msgstr "Farbe des DCC-Status 'warten'"
#, fuzzy
msgid "text color for \"connecting\" status"
msgstr "Farbe des DCC-Status 'verbinden'"
#, fuzzy
msgid "text color for \"active\" status"
msgstr "Farbe des DCC-Status 'aktiv'"
#, fuzzy
msgid "text color for \"done\" status"
msgstr "Farbe des DCC-Status 'fertig'"
#, fuzzy
msgid "text color for \"failed\" status"
msgstr "Farbe des DCC-Status 'fehlgeschlagen'"
#, fuzzy
msgid "text color for \"aborted\" status"
msgstr "Farbe des DCC-Status 'abgebrochen'"
#, fuzzy
msgid "timeout for xfer request (in seconds)"
msgstr "DCC-Timeout in Sekunden"
#, fuzzy
msgid "block size for sending packets, in bytes"
msgstr "Blockgröße für DCCs"
msgid "does not wait for ACK when sending file"
msgstr "warte beim Veschicken von Dateien nicht auf das ACK-Signal"
#, fuzzy
msgid ""
"restricts outgoing files/chats to use only ports in the given range (useful "
"for NAT) (syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, "
"empty value means any port)"
msgstr ""
"beschränkt ausgehenden DCC auf die ausschließliche Benutzung von Ports in "
"einem vorgegebenen Bereich (hilfreich bei NAT) (Syntax: ein einzelner Port, "
"z.B. 5000, oder eine Port-Bereich, z.B. 5000-5015,wenn kein Bereich "
"angegeben ist, ist jeder Port möglich)"
#, fuzzy
msgid ""
"IP or DNS address used for sending files/chats (if empty, local interface IP "
"is used)"
msgstr ""
"IP- oder DNS-Adresse für ausgehenden DCC (wenn kein Wert angegeben wird, "
"wird die IP des lokalen Interfaces benutzt)"
#, fuzzy
msgid "path for writing incoming files"
msgstr "Pfad für per DCC eingehende Dateien"
#, fuzzy
msgid "path for reading files when sending (when no path is specified by user)"
msgstr ""
"Pfad, aus dem Dateien standardmäßig gelesen werden, wenn keine explizite "
"Angabe vorliegt"
msgid "convert spaces to underscores when sending files"
msgstr "Leerzeichen in Unterstriche umwandeln beim Veschicken von Dateien"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"eingehende Dateien automatisch umbenennen, falls nötig, um Überschreiben zu "
"vermeiden (durch Hinzufügen von '.1', '.2', ...)"
#, fuzzy
msgid ""
"automatically resume file transfer if connection with remote host is lost"
msgstr ""
"abgebrochene Übertragungen automatisch fortsetzen, wenn die Verbindung "
"abgebrochen ist"
#, fuzzy
msgid "automatically accept incoming files (use carefully!)"
msgstr "DCC-CHats automatisch annehmen (Vorsicht!)"
#, fuzzy
msgid "automatically accept chat requests (use carefully!)"
msgstr "DCC-CHats automatisch annehmen (Vorsicht!)"
#, fuzzy, c-format
msgid "%s%s: unable to create pipe"
msgstr "%s DCC: kann keine Pipe erstellen\n"
#, fuzzy, c-format
msgid "%s%s: unable to fork"
msgstr "%s DCC: kann nicht forken\n"
#, fuzzy, c-format
msgid "%s%s: unable to read local file"
msgstr "%s DCC: kann lokale Datei nicht lesen\n"
#, fuzzy, c-format
msgid "%s%s: unable to send block to receiver"
msgstr "%s DCC: kann den Block nicht an den Empfänger übertragen\n"
#, fuzzy, c-format
msgid "%s%s: unable to read ACK from receiver"
msgstr "%s DCC: kann kein ACK vom Empfänger empfangen\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect to sender"
msgstr "%s DCC: kann keine Verbindung zum Sender herstellen\n"
#, fuzzy, c-format
msgid "%s%s: unable to receive block from sender"
msgstr "%s DCC: kann Block nicht vom Sender empfangen\n"
#, fuzzy, c-format
msgid "%s%s: unable to write local file"
msgstr "%s DCC: kann lokalen Datei nicht schreiben\n"
#, fuzzy, c-format
msgid "%s%s: error sending data to \"%s\" via xfer chat"
msgstr "%s Fehler beim Senden von Daten an \"%s\" via DCC CHAT\n"
#, fuzzy
#~ msgid "text color for status info"
#~ msgstr "Farbe der Statuszeile"
#, fuzzy
#~ msgid "background color for status info"
#~ msgstr "Hintergrund des Statusfensters"
#~ msgid " (local filename: %s%s%s)"
#~ msgstr " (lokaler Dateiname: %s%s%s)"
#~ msgid ""
#~ "%s can't associate DCC chat with private buffer (maybe private buffer has "
#~ "already DCC CHAT?)\n"
#~ msgstr ""
#~ "%s kann keinen DCC Chat mit privatem Puffer assoziieren (ist er bereits "
#~ "ein DCC CHAT?)\n"
#~ msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
#~ msgstr "DCC Chat mit %s%s %s(%s%d.%d.%d.%d%s)%s aufgebaut\n"
#~ msgid "DCC: file %s%s%s resumed at position %u\n"
#~ msgstr "DCC: Datei %s%s%s wird an Position %u fortgesetzt\n"
#~ msgid ""
#~ "%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found "
#~ "or ended\n"
#~ msgstr ""
#~ "%s kann die Datei \"%s\" nicht fortsetzen (Port: %d, Startposition: %u): "
#~ "DCC nicht gefunden oder bereits fertig\n"
#~ msgid "DCC chat"
#~ msgstr "DCC Chat"
#~ msgid "%s not enough memory for DCC SEND\n"
#~ msgstr "%s nicht genug Speicher für DCC SEND\n"
#~ msgid "%s cannot create socket for DCC\n"
#~ msgstr "%s kann keinen Socket für DCC anlegen\n"
#~ msgid "%s cannot send DCC\n"
#~ msgstr "%s kann keinen DCC senden\n"
#~ msgid "%s DCC: timeout\n"
#~ msgstr "%s DCC: Timeout\n"
#~ msgid "%s DCC: unable to create socket for sending file\n"
#~ msgstr "%s DCC: kann keinen Socket für den Dateiversand erstellen\n"
#~ msgid "%s DCC: unable to set 'nonblock' option for socket\n"
#~ msgstr "%s DCC: kann die 'nonblock'-Option für den Socket nicht festlegen\n"
#~ msgid "Internal key functions:\n"
#~ msgstr "Interne Tastenfunktionen:\n"
@ -4671,10 +4719,6 @@ msgstr "%s fehlerhafte Argumente für der \"%s\"-Befehl\n"
#~ msgid "manage charsets"
#~ msgstr "Puffer verwalten"
#, fuzzy
#~ msgid "%s%s: value \"%s\" is invalid for option \"%s\""
#~ msgstr "%s %s, Zeile %d: ungültige Option \"%s\"\n"
#, fuzzy
#~ msgid "%s%s: error creating server for reading configuration file"
#~ msgstr "den Server dazu bringen, seine Konfigurationsdatei neu zu laden"

607
po/es.po
View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-04-29 18:22+0200\n"
"POT-Creation-Date: 2008-05-04 17:30+0200\n"
"PO-Revision-Date: 2007-09-19 12:09+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1400,38 +1400,6 @@ msgstr "color para '+' al desplazar nicks"
msgid "text color for nicklist separator"
msgstr "color para el separador de alias"
#, fuzzy
msgid "text color for status info"
msgstr "color para la barra de estado"
#, fuzzy
msgid "background color for status info"
msgstr "color de fondo para la ventana de estado"
#, fuzzy
msgid "text color for \"waiting\" status info"
msgstr "color para el estado dcc \"esperando\""
#, fuzzy
msgid "text color for \"connecting\" status info"
msgstr "color para el estado dcc \"conectando\""
#, fuzzy
msgid "text color for \"active\" status info"
msgstr "color para el estado dcc \"activo\""
#, fuzzy
msgid "text color for \"done\" status info"
msgstr "color para el estado dcc \"terminado\""
#, fuzzy
msgid "text color for \"failed\" status info"
msgstr "color para el estado dcc \"fallo\""
#, fuzzy
msgid "text color for \"aborted\" status info"
msgstr "color para el estado dcc \"abortado\""
#, fuzzy
msgid "maximum number of lines in history per buffer (0 = unlimited)"
msgstr ""
@ -3120,67 +3088,6 @@ msgstr ""
msgid "send unknown commands to IRC server"
msgstr "nombre de usuario para el servidor IRC"
#, fuzzy
msgid "automatically accept incoming dcc files (use carefully!)"
msgstr ""
"aceptar automáticamente las peticiones de conversación dcc (¡utilizar con "
"precaución!)"
msgid "automatically accept dcc chats (use carefully!)"
msgstr ""
"aceptar automáticamente las peticiones de conversación dcc (¡utilizar con "
"precaución!)"
msgid "timeout for dcc request (in seconds)"
msgstr "tiempo de espera para la petición dcc (en segundos)"
#, fuzzy
msgid "block size for dcc packets in bytes"
msgstr "tamaño de bloque para los paquetes dcc"
#, fuzzy
msgid "does not wait for ACK when sending file"
msgstr "convertir los espacios a subrayados cuando se envían los ficheros"
msgid ""
"restricts outgoing dcc to use only ports in the given range (useful for NAT) "
"(syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, empty value "
"means any port)"
msgstr ""
"restringe el dcc de salida a utilizar únicamente los puertos del rango "
"especificado (útil para NAT) (sintaxis: un puerto simple, e.g. 5000, o un "
"rango de puertos, e.g. 5000-5015, un valor vacío significa cualquier puerto)"
msgid ""
"IP or DNS address used for outgoing dcc (if empty, local interface IP is "
"used)"
msgstr ""
"dirección IP o DNS usado para dcc de salida (si está vacío, se utiliza la "
"IP de interfaz local)"
#, fuzzy
msgid "path for writing incoming files with dcc"
msgstr "ruta para los ficheros recibidos con dcc"
msgid ""
"path for reading files when sending thru dcc (when no path is specified)"
msgstr ""
"ruta para la lectura de ficheros cuando se envían a través de dcc (cuando "
"no se especifica una ruta)"
msgid "convert spaces to underscores when sending files"
msgstr "convertir los espacios a subrayados cuando se envían los ficheros"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"renombrar los ficheros recibidos si ya existen (añadir '.1', '.2', ...)"
msgid ""
"automatically resume dcc transfer if connection with remote host is loosed"
msgstr ""
"continuar automáticamente la transferencia dcc si se ha perdido la "
"conexión con la máquina remota"
msgid "automatically log server messages"
msgstr "registrar automáticamente los mensajes de servidor"
@ -3193,189 +3100,6 @@ msgstr "registrar automáticamente las conversaciones privadas"
msgid "hide password displayed by nickserv"
msgstr "ocultar contraseña mostrada por nickserv"
msgid "Waiting"
msgstr "Esperando"
msgid "Connecting"
msgstr "Conectando"
msgid "Active"
msgstr "Activo"
msgid "Done"
msgstr "Terminado"
msgid "Failed"
msgstr "Falló"
msgid "Aborted"
msgstr "Abortado"
#, c-format
msgid "DCC: file %s%s%s"
msgstr "DCC: fichero %s%s%s"
#, c-format
msgid " (local filename: %s%s%s)"
msgstr " (nombre de fichero local: %s%s%s)"
msgid " sent to "
msgstr " enviado a "
msgid " received from "
msgstr " recibido de "
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "FALLÓ"
#, c-format
msgid "DCC chat closed with %s%s %s(%s%d.%d.%d.%d%s)\n"
msgstr "Charla DCC cerrada con %s%s %s(%s%d.%d.%d.%d%s)\n"
#, c-format
msgid ""
"%s can't associate DCC chat with private buffer (maybe private buffer has "
"already DCC CHAT?)\n"
msgstr ""
"%s no se puede asociar la conversación DCC con el búfer privado (quizá el "
"búfer privado ya tiene DCC CHAT)\n"
#, c-format
msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
msgstr "Conectado a %s%s %s(%s%d.%d.%d.%d%s)%s a través de una charla DCC\n"
#, c-format
msgid "DCC: file %s%s%s resumed at position %u\n"
msgstr "DCC: archivo %s%s%s reanudado en la posición %u\n"
#, c-format
msgid ""
"%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found or "
"ended\n"
msgstr ""
"%s no puede reanudar el archivo \"%s\" (puerto: %d, posición de inicio: %"
"u): DCC no encontrado o terminado\n"
#, c-format
msgid "%s not enough memory for new DCC\n"
msgstr "%s no hay memoria suficiente para un nuevo DCC\n"
msgid "DCC chat"
msgstr "Charla DCC"
#, c-format
msgid ""
"Incoming DCC file from %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s bytes\n"
msgstr ""
"Archivo DCC entrante desde %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s "
"bytes\n"
#, c-format
msgid ""
"Sending DCC file to %s%s%s: %s%s%s (local filename: %s%s%s), %s%lu%s bytes\n"
msgstr ""
"Enviando archivo DCC a %s%s%s: %s%s%s (nombre de archivo local: %s%s%s), %s%"
"lu%s bytes\n"
#, c-format
msgid "Incoming DCC chat request from %s%s%s (%s%d.%d.%d.%d%s)\n"
msgstr "Petición de charla DCC entrante desde %s%s%s (%s%d.%d.%d.%d%s)\n"
#, c-format
msgid "Sending DCC chat request to %s%s\n"
msgstr "Envío de petición de charla DCC a %s%s\n"
#, c-format
msgid ""
"DCC: file %s%s%s (local filename: %s%s%s) will be resumed at position %u\n"
msgstr ""
"DCC: el archivo %s%s%s (nombre de archivo local: %s%s%s) será reanudado en "
"la posición %u\n"
#, c-format
msgid "%s not enough memory for DCC SEND\n"
msgstr "%s no hay memoria suficiente para el DCC SEND\n"
#, c-format
msgid "%s cannot access file \"%s\"\n"
msgstr "%s no es posible acceder al fichero \"%s\"\n"
#, c-format
msgid "%s could not find address for '%s'. Falling back to local IP.\n"
msgstr ""
"%s no pudo encontrar la dirección para '%s'. Utilizando la IP local.\n"
#, c-format
msgid "%s cannot create socket for DCC\n"
msgstr "%s no es posible crear socket para el DCC\n"
#, c-format
msgid "%s cannot find available port for DCC\n"
msgstr "%s no puede encontrar un puerto disponible para el DCC\n"
#, c-format
msgid "%s cannot send DCC\n"
msgstr "%s no es posible enviar el DCC\n"
#, c-format
msgid "%s error sending data to \"%s\" via DCC CHAT\n"
msgstr "%s error enviando datos al \"%s\" con DCC CHAT\n"
#, c-format
msgid "Private %s> %s"
msgstr "Privado %s> %s"
#, fuzzy, c-format
msgid "%s DCC: unable to create pipe\n"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s DCC: unable to read local file\n"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s DCC: unable to send block to receiver\n"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s DCC: unable to read ACK from receiver\n"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s DCC: unable to connect to sender\n"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s DCC: unable to receive block from sender\n"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s DCC: unable to write local file\n"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s DCC: unable to fork\n"
msgstr "%s no es posible crear el servidor\n"
#, c-format
msgid "%s DCC: timeout\n"
msgstr ""
#, fuzzy, c-format
msgid "%s DCC: unable to create socket for sending file\n"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s DCC: unable to set 'nonblock' option for socket\n"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "Aborting active DCC: \"%s\" from %s"
msgstr "Abandonar el DCC activo: \"%s\" de %s\n"
#, fuzzy
msgid "IRC debug messages"
msgstr "imprime mensajes de depuración"
@ -3475,6 +3199,10 @@ msgstr "CTCP %sVERSION%s respuesta de %s%s%s: %s\n"
msgid "%sCTCP %sPING%s reply from %s%s%s: %ld.%ld %s"
msgstr "CTCP %sPING%s respuesta de %s%s%s: %ld.%ld segundos\n"
#, c-format
msgid "Private %s> %s"
msgstr "Privado %s> %s"
#, fuzzy, c-format
msgid "%s%s%s %s(%s%s%s)%s has left %s%s %s(%s%s%s)"
msgstr "%s%s %s(%s%s%s)%s ha abandonado %s%s"
@ -4449,6 +4177,327 @@ msgstr ""
msgid "%s%s: wrong arguments for function \"%s\""
msgstr "%s argumentos incorrectos para el comando \"%s\"\n"
#, fuzzy
msgid "waiting"
msgstr "Esperando"
#, fuzzy
msgid "connecting"
msgstr "Conectando"
#, fuzzy
msgid "active"
msgstr "Activo"
#, fuzzy
msgid "done"
msgstr "Terminado"
#, fuzzy
msgid "failed"
msgstr "Falló"
#, fuzzy
msgid "aborted"
msgstr "Abortado"
#, fuzzy, c-format
msgid "%s%s: not enough memory for new xfer"
msgstr "%s no hay memoria suficiente para un nuevo DCC\n"
#, fuzzy, c-format
msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)"
msgstr ""
"Archivo DCC entrante desde %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s "
"bytes\n"
#, fuzzy, c-format
msgid ""
"%s: sending file to %s: %s (local filename: %s), %lu bytes (protocol: %s)"
msgstr ""
"Enviando archivo DCC a %s%s%s: %s%s%s (nombre de archivo local: %s%s%s), %s%"
"lu%s bytes\n"
#, fuzzy, c-format
msgid "%s: incoming chat request from %s (%d.%d.%d.%d)"
msgstr "Petición de charla DCC entrante desde %s%s%s (%s%d.%d.%d.%d%s)\n"
#, fuzzy, c-format
msgid "%s: sending chat request to %s"
msgstr "Envío de petición de charla DCC a %s%s\n"
#, fuzzy, c-format
msgid "%s: file %s (local filename: %s) will be resumed at position %u"
msgstr ""
"DCC: el archivo %s%s%s (nombre de archivo local: %s%s%s) será reanudado en "
"la posición %u\n"
#, fuzzy, c-format
msgid "%s: file %s %s %s: %s"
msgstr "DCC: fichero %s%s%s"
#, fuzzy
msgid "sent to"
msgstr " enviado a "
#, fuzzy
msgid "received from"
msgstr " recibido de "
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "FALLÓ"
#, fuzzy, c-format
msgid "%s: chat closed with %s (%d.%d.%d.%d)"
msgstr "Charla DCC cerrada con %s%s %s(%s%d.%d.%d.%d%s)\n"
#, fuzzy, c-format
msgid "%s%s: missing arguments"
msgstr "%s falta un argumento para la opción --dir\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer type \"%s\""
msgstr "%s opción desconocida para el comando \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: filename missing for type \"%s\""
msgstr "%s %s, línea %d: opción \"%s\" inválida\n"
#, fuzzy, c-format
msgid "%s%s: protocol missing for type \"%s\""
msgstr "%s %s, línea %d: opción \"%s\" inválida\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer protocol \"%s\""
msgstr "%s opción desconocida para el comando \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: not enough memory"
msgstr "No hay suficiente memoria para una nueva línea\n"
#, fuzzy, c-format
msgid "%s%s: cannot access file \"%s\""
msgstr "%s no es posible acceder al fichero \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: could not find address for \"%s\", falling back to local IP"
msgstr ""
"%s no pudo encontrar la dirección para '%s'. Utilizando la IP local.\n"
#, fuzzy, c-format
msgid "%s%s: cannot create socket for xfer"
msgstr "%s no ha sido posible crear el socket\n"
#, fuzzy, c-format
msgid "%s%s: cannot find available port for xfer"
msgstr "%s no puede encontrar un puerto disponible para el DCC\n"
#, fuzzy, c-format
msgid "%s%s: error creating xfer"
msgstr ""
"No hay suficiente memoria para el mensaje de la barra de información\n"
#, fuzzy, c-format
msgid "%s%s: aborting active xfer: \"%s\" from %s"
msgstr "Abandonar el DCC activo: \"%s\" de %s\n"
#, fuzzy, c-format
msgid "%s: aborting active xfer: \"%s\" from %s"
msgstr "Abandonar el DCC activo: \"%s\" de %s\n"
#, fuzzy
msgid "text color"
msgstr "color para el texto de conversación"
#, fuzzy
msgid "background color"
msgstr "color de fondo para los nombres de usuario"
#, fuzzy
msgid "background color for selected line"
msgstr "color para el texto de entrada"
#, fuzzy
msgid "text color for \"waiting\" status"
msgstr "color para el estado dcc \"esperando\""
#, fuzzy
msgid "text color for \"connecting\" status"
msgstr "color para el estado dcc \"conectando\""
#, fuzzy
msgid "text color for \"active\" status"
msgstr "color para el estado dcc \"activo\""
#, fuzzy
msgid "text color for \"done\" status"
msgstr "color para el estado dcc \"terminado\""
#, fuzzy
msgid "text color for \"failed\" status"
msgstr "color para el estado dcc \"fallo\""
#, fuzzy
msgid "text color for \"aborted\" status"
msgstr "color para el estado dcc \"abortado\""
#, fuzzy
msgid "timeout for xfer request (in seconds)"
msgstr "tiempo de espera para la petición dcc (en segundos)"
#, fuzzy
msgid "block size for sending packets, in bytes"
msgstr "tamaño de bloque para los paquetes dcc"
#, fuzzy
msgid "does not wait for ACK when sending file"
msgstr "convertir los espacios a subrayados cuando se envían los ficheros"
#, fuzzy
msgid ""
"restricts outgoing files/chats to use only ports in the given range (useful "
"for NAT) (syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, "
"empty value means any port)"
msgstr ""
"restringe el dcc de salida a utilizar únicamente los puertos del rango "
"especificado (útil para NAT) (sintaxis: un puerto simple, e.g. 5000, o un "
"rango de puertos, e.g. 5000-5015, un valor vacío significa cualquier puerto)"
#, fuzzy
msgid ""
"IP or DNS address used for sending files/chats (if empty, local interface IP "
"is used)"
msgstr ""
"dirección IP o DNS usado para dcc de salida (si está vacío, se utiliza la "
"IP de interfaz local)"
#, fuzzy
msgid "path for writing incoming files"
msgstr "ruta para los ficheros recibidos con dcc"
#, fuzzy
msgid "path for reading files when sending (when no path is specified by user)"
msgstr ""
"ruta para la lectura de ficheros cuando se envían a través de dcc (cuando "
"no se especifica una ruta)"
msgid "convert spaces to underscores when sending files"
msgstr "convertir los espacios a subrayados cuando se envían los ficheros"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"renombrar los ficheros recibidos si ya existen (añadir '.1', '.2', ...)"
#, fuzzy
msgid ""
"automatically resume file transfer if connection with remote host is lost"
msgstr ""
"continuar automáticamente la transferencia dcc si se ha perdido la "
"conexión con la máquina remota"
#, fuzzy
msgid "automatically accept incoming files (use carefully!)"
msgstr ""
"aceptar automáticamente las peticiones de conversación dcc (¡utilizar con "
"precaución!)"
#, fuzzy
msgid "automatically accept chat requests (use carefully!)"
msgstr ""
"aceptar automáticamente las peticiones de conversación dcc (¡utilizar con "
"precaución!)"
#, fuzzy, c-format
msgid "%s%s: unable to create pipe"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s%s: unable to fork"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s%s: unable to read local file"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s%s: unable to send block to receiver"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s%s: unable to read ACK from receiver"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect to sender"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s%s: unable to receive block from sender"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s%s: unable to write local file"
msgstr "%s no es posible crear el servidor\n"
#, fuzzy, c-format
msgid "%s%s: error sending data to \"%s\" via xfer chat"
msgstr "%s error enviando datos al \"%s\" con DCC CHAT\n"
#, fuzzy
#~ msgid "text color for status info"
#~ msgstr "color para la barra de estado"
#, fuzzy
#~ msgid "background color for status info"
#~ msgstr "color de fondo para la ventana de estado"
#~ msgid " (local filename: %s%s%s)"
#~ msgstr " (nombre de fichero local: %s%s%s)"
#~ msgid ""
#~ "%s can't associate DCC chat with private buffer (maybe private buffer has "
#~ "already DCC CHAT?)\n"
#~ msgstr ""
#~ "%s no se puede asociar la conversación DCC con el búfer privado (quizá "
#~ "el búfer privado ya tiene DCC CHAT)\n"
#~ msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
#~ msgstr ""
#~ "Conectado a %s%s %s(%s%d.%d.%d.%d%s)%s a través de una charla DCC\n"
#~ msgid "DCC: file %s%s%s resumed at position %u\n"
#~ msgstr "DCC: archivo %s%s%s reanudado en la posición %u\n"
#~ msgid ""
#~ "%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found "
#~ "or ended\n"
#~ msgstr ""
#~ "%s no puede reanudar el archivo \"%s\" (puerto: %d, posición de inicio: %"
#~ "u): DCC no encontrado o terminado\n"
#~ msgid "DCC chat"
#~ msgstr "Charla DCC"
#~ msgid "%s not enough memory for DCC SEND\n"
#~ msgstr "%s no hay memoria suficiente para el DCC SEND\n"
#~ msgid "%s cannot create socket for DCC\n"
#~ msgstr "%s no es posible crear socket para el DCC\n"
#~ msgid "%s cannot send DCC\n"
#~ msgstr "%s no es posible enviar el DCC\n"
#, fuzzy
#~ msgid "%s DCC: unable to create socket for sending file\n"
#~ msgstr "%s no es posible crear el servidor\n"
#, fuzzy
#~ msgid "%s DCC: unable to set 'nonblock' option for socket\n"
#~ msgstr "%s no es posible crear el servidor\n"
#~ msgid "Internal key functions:\n"
#~ msgstr "Funciones de clave internas:\n"
@ -4678,10 +4727,6 @@ msgstr "%s argumentos incorrectos para el comando \"%s\"\n"
#~ msgid "manage charsets"
#~ msgstr "gestionar los búfers"
#, fuzzy
#~ msgid "%s%s: value \"%s\" is invalid for option \"%s\""
#~ msgstr "%s %s, línea %d: opción \"%s\" inválida\n"
#, fuzzy
#~ msgid "%s%s: error creating server for reading configuration file"
#~ msgstr "pedir al servidor que recargue su archivo de configuración"

512
po/fr.po
View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-04-29 18:22+0200\n"
"PO-Revision-Date: 2008-04-29 18:22+0200\n"
"POT-Creation-Date: 2008-05-04 17:30+0200\n"
"PO-Revision-Date: 2008-05-04 17:30+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@ -753,7 +753,9 @@ msgstr "fonctions pour la ligne de commande"
msgid ""
"This command is used by key bindings or plugins, it must NOT be called by "
"user"
msgstr "Cette commande est utilisée par les associations de touches ou les extensions, elle ne doit PAS être appelée par l'utilisateur"
msgstr ""
"Cette commande est utilisée par les associations de touches ou les "
"extensions, elle ne doit PAS être appelée par l'utilisateur"
msgid "bind/unbind keys"
msgstr "associer/libérer des touches"
@ -1353,30 +1355,6 @@ msgstr ""
msgid "text color for nicklist separator"
msgstr "couleur du texte pour le séparateur de la liste des pseudos"
msgid "text color for status info"
msgstr "couleur du texte pour une information de statut"
msgid "background color for status info"
msgstr "couleur du fond pour une information de statut"
msgid "text color for \"waiting\" status info"
msgstr "couleur du texte pour le statut \"en attente\""
msgid "text color for \"connecting\" status info"
msgstr "couleur du texte pour le statut \"connexion\""
msgid "text color for \"active\" status info"
msgstr "couleur du texte pour le statut \"actif\""
msgid "text color for \"done\" status info"
msgstr "couleur du texte pour le statut \"terminé\""
msgid "text color for \"failed\" status info"
msgstr "couleur du texte pour le statut \"échoué\""
msgid "text color for \"aborted\" status info"
msgstr "couleur du texte pour le statut \"interrompu\""
msgid "maximum number of lines in history per buffer (0 = unlimited)"
msgstr "nombre maximum de lignes dans l'historique (0 = sans limite)"
@ -3069,63 +3047,6 @@ msgstr ""
msgid "send unknown commands to IRC server"
msgstr "envoie les commandes inconnues au serveur IRC"
msgid "automatically accept incoming dcc files (use carefully!)"
msgstr ""
"accepte automatiquement les demandes d'envoi de fichiers dcc (à utiliser "
"avec précaution !)"
msgid "automatically accept dcc chats (use carefully!)"
msgstr ""
"accepte automatiquement les demandes de discussion dcc (à utiliser avec "
"précaution !)"
msgid "timeout for dcc request (in seconds)"
msgstr "délai d'attente pour les requêtes dcc (en secondes)"
msgid "block size for dcc packets in bytes"
msgstr "taille de bloc pour les paquets dcc en octets"
msgid "does not wait for ACK when sending file"
msgstr "n'attend pas les accusés de réception lors de l'envoi de fichier"
msgid ""
"restricts outgoing dcc to use only ports in the given range (useful for NAT) "
"(syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, empty value "
"means any port)"
msgstr ""
"restreint le dcc sortant à utiliser des ports dans la plage donnée (pratique "
"pour le NAT) (syntaxe: un port simple, par exemple 5000, une plage de ports, "
"par exemple 5000-5015, si non renseigné tout port peut être utilisé)"
msgid ""
"IP or DNS address used for outgoing dcc (if empty, local interface IP is "
"used)"
msgstr ""
"adresse IP ou DNS utilisée pour le dcc sortant (si non renseigné, "
"l'interface IP locale est utilisée)"
msgid "path for writing incoming files with dcc"
msgstr "chemin où écrire les fichiers reçus par dcc"
msgid ""
"path for reading files when sending thru dcc (when no path is specified)"
msgstr ""
"chemin pour lire les fichiers lorsqu'ils sont envoyés par dcc (quand aucun "
"chemin n'est spécifié)"
msgid "convert spaces to underscores when sending files"
msgstr "convertir les espaces en underscores lors d'envoi de fichiers"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"renommer les fichiers reçus s'ils existent déjà (ajoute '.1', '.2', ...)"
msgid ""
"automatically resume dcc transfer if connection with remote host is loosed"
msgstr ""
"continuer automatiquement les transferts dcc si la connexion avec l'hôte a "
"été perdue"
msgid "automatically log server messages"
msgstr "enregistrer automatiquement les messages du serveur"
@ -3138,187 +3059,6 @@ msgstr "enregistrer automatiquement les conversations privées"
msgid "hide password displayed by nickserv"
msgstr "masquer le mot de passe affiché par nickserv"
msgid "Waiting"
msgstr "Attente"
msgid "Connecting"
msgstr "Connexion"
msgid "Active"
msgstr "Actif"
msgid "Done"
msgstr "Terminé"
msgid "Failed"
msgstr "Echoué"
msgid "Aborted"
msgstr "Interrompu"
#, c-format
msgid "DCC: file %s%s%s"
msgstr "DCC: fichier %s%s%s"
#, c-format
msgid " (local filename: %s%s%s)"
msgstr " (nom local: %s%s%s)"
msgid " sent to "
msgstr " envoyé à "
msgid " received from "
msgstr " reçu de "
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "ECHOUE"
#, c-format
msgid "DCC chat closed with %s%s %s(%s%d.%d.%d.%d%s)\n"
msgstr "Discussion DCC fermée avec %s%s %s(%s%d.%d.%d.%d%s)\n"
#, c-format
msgid ""
"%s can't associate DCC chat with private buffer (maybe private buffer has "
"already DCC CHAT?)\n"
msgstr ""
"%s impossible d'associer la discussion DCC avec un tampon privé (le tampon "
"privé a peut-être déjà un DCC CHAT ?)\n"
#, c-format
msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
msgstr "Connecté à %s%s %s(%s%d.%d.%d.%d%s)%s via une discussion DCC\n"
#, c-format
msgid "DCC: file %s%s%s resumed at position %u\n"
msgstr "DCC: fichier %s%s%s recommencé en position %u\n"
#, c-format
msgid ""
"%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found or "
"ended\n"
msgstr ""
"%s impossible de continuer le fichier \"%s\" (port: %d, position de départ: %"
"u): DCC non trouvé ou terminé\n"
#, c-format
msgid "%s not enough memory for new DCC\n"
msgstr "%s pas assez de mémoire pour un nouveau DCC\n"
msgid "DCC chat"
msgstr "Discussion DCC"
#, c-format
msgid ""
"Incoming DCC file from %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s bytes\n"
msgstr ""
"Réception fichier de %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s octets\n"
#, c-format
msgid ""
"Sending DCC file to %s%s%s: %s%s%s (local filename: %s%s%s), %s%lu%s bytes\n"
msgstr ""
"Envoi fichier DCC à %s%s%s: %s%s%s (nom local: %s%s%s), %s%lu%s octets\n"
#, c-format
msgid "Incoming DCC chat request from %s%s%s (%s%d.%d.%d.%d%s)\n"
msgstr "Demande de discussion DCC reçue de %s%s%s (%s%d.%d.%d.%d%s)\n"
#, c-format
msgid "Sending DCC chat request to %s%s\n"
msgstr "Envoi d'une demande discussion DCC à %s%s\n"
#, c-format
msgid ""
"DCC: file %s%s%s (local filename: %s%s%s) will be resumed at position %u\n"
msgstr ""
"DCC: fichier %s%s%s (nom local: %s%s%s) sera recommencé en position %u\n"
#, c-format
msgid "%s not enough memory for DCC SEND\n"
msgstr "%s pas assez de mémoire pour le DCC SEND\n"
#, c-format
msgid "%s cannot access file \"%s\"\n"
msgstr "%s impossible d'accéder au fichier \"%s\"\n"
#, c-format
msgid "%s could not find address for '%s'. Falling back to local IP.\n"
msgstr ""
"%s impossible de trouver l'adresse pour '%s'. Utilisation de l'adresse IP "
"locale.\n"
#, c-format
msgid "%s cannot create socket for DCC\n"
msgstr "%s impossible de créer la socket pour le DCC\n"
#, c-format
msgid "%s cannot find available port for DCC\n"
msgstr "%s impossible de trouver un port disponible pour le DCC\n"
#, c-format
msgid "%s cannot send DCC\n"
msgstr "%s impossible d'envoyer le DCC\n"
#, c-format
msgid "%s error sending data to \"%s\" via DCC CHAT\n"
msgstr "%s erreur d'envoi de données à \"%s\" via DCC CHAT\n"
#, c-format
msgid "Private %s> %s"
msgstr "Privé %s> %s"
#, c-format
msgid "%s DCC: unable to create pipe\n"
msgstr "%s DCC: impossible de créer le tuyau\n"
#, c-format
msgid "%s DCC: unable to read local file\n"
msgstr "%s DCC: impossible de lire le fichier local\n"
#, c-format
msgid "%s DCC: unable to send block to receiver\n"
msgstr "%s DCC: impossible d'envoyer un bloc au receveur\n"
#, c-format
msgid "%s DCC: unable to read ACK from receiver\n"
msgstr "%s DCC: impossible de lire l'accusé de réception du receveur\n"
#, c-format
msgid "%s DCC: unable to connect to sender\n"
msgstr "%s DCC: impossible de se connecter à l'envoyeur\n"
#, c-format
msgid "%s DCC: unable to receive block from sender\n"
msgstr "%s DCC: impossible de recevoir un bloc de l'envoyeur\n"
#, c-format
msgid "%s DCC: unable to write local file\n"
msgstr "%s DCC: impossible d'écrire dans le fichier local\n"
#, c-format
msgid "%s DCC: unable to fork\n"
msgstr "%s DCC: impossible de créer un processus\n"
#, c-format
msgid "%s DCC: timeout\n"
msgstr "%s DCC: temps dépassé\n"
#, c-format
msgid "%s DCC: unable to create socket for sending file\n"
msgstr "%s DCC: impossible de créer la socket locale pour envoyer le fichier\n"
#, c-format
msgid "%s DCC: unable to set 'nonblock' option for socket\n"
msgstr "%s DCC: impossible d'activer l'option 'nonblock' sur la socket\n"
#, c-format
msgid "Aborting active DCC: \"%s\" from %s"
msgstr "Abandon du DCC actif: \"%s\" de %s"
msgid "IRC debug messages"
msgstr "Messages de debug IRC"
@ -3416,6 +3156,10 @@ msgstr "%sCTCP %sVERSION%s réponse de %s%s%s: %s"
msgid "%sCTCP %sPING%s reply from %s%s%s: %ld.%ld %s"
msgstr "%sCTCP %sPING%s réponse de %s%s%s: %ld.%ld %s"
#, c-format
msgid "Private %s> %s"
msgstr "Privé %s> %s"
#, c-format
msgid "%s%s%s %s(%s%s%s)%s has left %s%s %s(%s%s%s)"
msgstr "%s%s%s %s(%s%s%s)%s a quitté %s%s %s(%s%s%s)"
@ -4402,3 +4146,241 @@ msgstr ""
#, c-format
msgid "%s%s: wrong arguments for function \"%s\""
msgstr "%s%s: paramètres invalides pour la fonction \"%s\""
msgid "waiting"
msgstr "attente"
msgid "connecting"
msgstr "connexion"
msgid "active"
msgstr "actif"
msgid "done"
msgstr "terminé"
msgid "failed"
msgstr "échoué"
msgid "aborted"
msgstr "interrompu"
#, c-format
msgid "%s%s: not enough memory for new xfer"
msgstr "%s%s: pas assez de mémoire pour un nouveau xfer"
#, c-format
msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)"
msgstr ""
"%s: réception fichier de %s (%d.%d.%d.%d): %s, %lu octets (protocole: %s)"
#, c-format
msgid ""
"%s: sending file to %s: %s (local filename: %s), %lu bytes (protocol: %s)"
msgstr "%s: envoi fichier à %s: %s (nom local: %s), %lu octets (protocole: %s)"
#, c-format
msgid "%s: incoming chat request from %s (%d.%d.%d.%d)"
msgstr "%s: demande de discussion reçue de %s (%d.%d.%d.%d)"
#, c-format
msgid "%s: sending chat request to %s"
msgstr "%s: envoi d'une demande de discussion à %s"
#, c-format
msgid "%s: file %s (local filename: %s) will be resumed at position %u"
msgstr "%s: fichier %s (nom local: %s) sera recommencé en position %u"
#, c-format
msgid "%s: file %s %s %s: %s"
msgstr "%s: fichier %s %s %s: %s"
msgid "sent to"
msgstr "envoyé à"
msgid "received from"
msgstr "reçu de"
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "ECHOUE"
#, c-format
msgid "%s: chat closed with %s (%d.%d.%d.%d)"
msgstr "%s: discussion fermée avec %s (%d.%d.%d.%d)"
#, c-format
msgid "%s%s: missing arguments"
msgstr "%s%s: paramètres manquants"
#, c-format
msgid "%s%s: unknown xfer type \"%s\""
msgstr "%s%s: type de xfer inconnu \"%s\""
#, c-format
msgid "%s%s: filename missing for type \"%s\""
msgstr "%s%s: nom de fichier manquant pour le type \"%s\""
#, c-format
msgid "%s%s: protocol missing for type \"%s\""
msgstr "%s%s: protocole manquant pour le type \"%s\""
#, c-format
msgid "%s%s: unknown xfer protocol \"%s\""
msgstr "%s%s: protocole xfer inconnu \"%s\""
#, c-format
msgid "%s%s: not enough memory"
msgstr "%s%s: pas assez de mémoire"
#, c-format
msgid "%s%s: cannot access file \"%s\""
msgstr "%s%s: impossible d'accéder au fichier \"%s\""
#, c-format
msgid "%s%s: could not find address for \"%s\", falling back to local IP"
msgstr ""
"%s%s: impossible de trouver l'adresse pour \"%s\", utilisation de l'adresse "
"IP locale"
#, c-format
msgid "%s%s: cannot create socket for xfer"
msgstr "%s%s: impossible de créer la socket pour le xfer"
#, c-format
msgid "%s%s: cannot find available port for xfer"
msgstr "%s%s: impossible de trouver un port disponible pour le xfer"
#, c-format
msgid "%s%s: error creating xfer"
msgstr "%s%s: erreur de création du xfer"
#, c-format
msgid "%s%s: aborting active xfer: \"%s\" from %s"
msgstr "%s%s: abandon du xfer actif: \"%s\" de %s"
#, c-format
msgid "%s: aborting active xfer: \"%s\" from %s"
msgstr "%s: abandon du xfer actif: \"%s\" de %s"
msgid "text color"
msgstr "couleur du texte"
msgid "background color"
msgstr "couleur du fond"
msgid "background color for selected line"
msgstr "couleur du fond pour la ligne sélectionnée"
msgid "text color for \"waiting\" status"
msgstr "couleur du texte pour le statut \"en attente\""
msgid "text color for \"connecting\" status"
msgstr "couleur du texte pour le statut \"connexion\""
msgid "text color for \"active\" status"
msgstr "couleur du texte pour le statut \"actif\""
msgid "text color for \"done\" status"
msgstr "couleur du texte pour le statut \"terminé\""
msgid "text color for \"failed\" status"
msgstr "couleur du texte pour le statut \"échoué\""
msgid "text color for \"aborted\" status"
msgstr "couleur du texte pour le statut \"interrompu\""
msgid "timeout for xfer request (in seconds)"
msgstr "délai d'attente pour la requête xfer (en secondes)"
msgid "block size for sending packets, in bytes"
msgstr "taille de bloc pour les paquets envoyés, en octets"
msgid "does not wait for ACK when sending file"
msgstr "n'attend pas les accusés de réception lors de l'envoi de fichier"
msgid ""
"restricts outgoing files/chats to use only ports in the given range (useful "
"for NAT) (syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, "
"empty value means any port)"
msgstr ""
"restreint les fichiers/discussions sortants à utiliser des ports dans "
"l'intervalle donné (pratique pour le NAT) (syntaxe: un port simple, par "
"exemple 5000, un intervalle de ports, par exemple 5000-5015, si non "
"renseigné tout port peut être utilisé)"
msgid ""
"IP or DNS address used for sending files/chats (if empty, local interface IP "
"is used)"
msgstr ""
"adresse IP ou DNS utilisée pour envoyer les fichiers/discussions (si non "
"renseigné, l'interface IP locale est utilisée)"
msgid "path for writing incoming files"
msgstr "chemin où écrire les fichiers reçus"
msgid "path for reading files when sending (when no path is specified by user)"
msgstr ""
"chemin pour lire les fichiers envoyés (quand aucun chemin n'est spécifié par "
"l'utilisateur)"
msgid "convert spaces to underscores when sending files"
msgstr "convertir les espaces en underscores lors d'envoi de fichiers"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"renommer les fichiers reçus s'ils existent déjà (ajoute '.1', '.2', ...)"
msgid ""
"automatically resume file transfer if connection with remote host is lost"
msgstr ""
"continuer automatiquement les transferts de fichiers si la connexion avec "
"l'hôte a été perdue"
msgid "automatically accept incoming files (use carefully!)"
msgstr ""
"accepte automatiquement les demandes d'envoi de fichiers (à utiliser avec "
"précaution !)"
msgid "automatically accept chat requests (use carefully!)"
msgstr ""
"accepte automatiquement les demandes de discussion (à utiliser avec "
"précaution !)"
#, c-format
msgid "%s%s: unable to create pipe"
msgstr "%s%s: impossible de créer le tuyau"
#, c-format
msgid "%s%s: unable to fork"
msgstr "%s%s: impossible de créer un processus"
#, c-format
msgid "%s%s: unable to read local file"
msgstr "%s%s: impossible de lire le fichier local"
#, c-format
msgid "%s%s: unable to send block to receiver"
msgstr "%s%s: impossible d'envoyer un bloc au receveur"
#, c-format
msgid "%s%s: unable to read ACK from receiver"
msgstr "%s%s: impossible de lire l'accusé de réception du receveur"
#, c-format
msgid "%s%s: unable to connect to sender"
msgstr "%s%s: impossible de se connecter à l'envoyeur"
#, c-format
msgid "%s%s: unable to receive block from sender"
msgstr "%s%s: impossible de recevoir un bloc de l'envoyeur"
#, c-format
msgid "%s%s: unable to write local file"
msgstr "%s%s: impossible d'écrire dans le fichier local"
#, c-format
msgid "%s%s: error sending data to \"%s\" via xfer chat"
msgstr "%s%s: erreur d'envoi de données à \"%s\" via discussion xfer"

592
po/hu.po
View File

@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-04-29 18:22+0200\n"
"POT-Creation-Date: 2008-05-04 17:30+0200\n"
"PO-Revision-Date: 2007-10-10 18:07+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1422,38 +1422,6 @@ msgstr "a '+' jel színe névlista görgetésekor"
msgid "text color for nicklist separator"
msgstr "névelválasztó színe"
#, fuzzy
msgid "text color for status info"
msgstr "státuszsor színe"
#, fuzzy
msgid "background color for status info"
msgstr "státuszablak háttere"
#, fuzzy
msgid "text color for \"waiting\" status info"
msgstr "\"waiting\" dcc státusz színe"
#, fuzzy
msgid "text color for \"connecting\" status info"
msgstr "\"connecting\" dcc státusz színe"
#, fuzzy
msgid "text color for \"active\" status info"
msgstr "\"active\" dcc státusz színe"
#, fuzzy
msgid "text color for \"done\" status info"
msgstr "\"done\" dcc státusz színe"
#, fuzzy
msgid "text color for \"failed\" status info"
msgstr "\"failed\" dcc státusz színe"
#, fuzzy
msgid "text color for \"aborted\" status info"
msgstr "\"aborted\" dcc státusz színe"
#, fuzzy
msgid "maximum number of lines in history per buffer (0 = unlimited)"
msgstr ""
@ -3145,59 +3113,6 @@ msgstr ""
msgid "send unknown commands to IRC server"
msgstr "ismeretlen parancsok küldése az IRC szervernek"
#, fuzzy
msgid "automatically accept incoming dcc files (use carefully!)"
msgstr "dcc beszélgetések automatikus fogadása (óvatosan használja!)"
msgid "automatically accept dcc chats (use carefully!)"
msgstr "dcc beszélgetések automatikus fogadása (óvatosan használja!)"
msgid "timeout for dcc request (in seconds)"
msgstr "dcc kérések időkorlátja (másodpercben)"
#, fuzzy
msgid "block size for dcc packets in bytes"
msgstr "dcc csomagok blokkmérete"
msgid "does not wait for ACK when sending file"
msgstr "nem vár ACK válaszra fájl küldésekor"
msgid ""
"restricts outgoing dcc to use only ports in the given range (useful for NAT) "
"(syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, empty value "
"means any port)"
msgstr ""
"korlátozza a dcc-t, hogy csak egy bizonyos tartományban lévő portokat "
"használja (NAT esetén hasznos) (szintaxis: egyetlen port, pl. 5000 vagy egy "
"port intervallum, pl. 5000-5015, üresen hagyva tetszőleges port)"
msgid ""
"IP or DNS address used for outgoing dcc (if empty, local interface IP is "
"used)"
msgstr "kimenő dcc forgalom IP/DNS-címe (ha üres, a helyi interfész IP-címe)"
#, fuzzy
msgid "path for writing incoming files with dcc"
msgstr "dcc-n beérkező fájlok helye"
msgid ""
"path for reading files when sending thru dcc (when no path is specified)"
msgstr ""
"dcc-n keresztül küldendő fájlok elérési útvonala (ha nincs külön megadva)"
msgid "convert spaces to underscores when sending files"
msgstr "szóközök alulvonássá alakítása küldéskor"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"fájlok automatikus átnevezése, ha már léteznek ('.1', '.2', ... hozzáadása)"
msgid ""
"automatically resume dcc transfer if connection with remote host is loosed"
msgstr ""
"dcc adatátvitel automatikus felépítése, ha megszakad a kapcsolat a távoli "
"géppel"
msgid "automatically log server messages"
msgstr "szerverüzenetek automatikus naplózása"
@ -3210,190 +3125,6 @@ msgstr "személyes beszélgetése automatikus naplózása"
msgid "hide password displayed by nickserv"
msgstr "a nickserv által mutatott jelszó elrejtése"
msgid "Waiting"
msgstr "Várakozás"
msgid "Connecting"
msgstr "Kapcsolódás"
msgid "Active"
msgstr "Aktív"
msgid "Done"
msgstr "Kész"
msgid "Failed"
msgstr "Sikertelen"
msgid "Aborted"
msgstr "Megszakítva"
#, c-format
msgid "DCC: file %s%s%s"
msgstr "DCC: fájl %s%s%s"
#, c-format
msgid " (local filename: %s%s%s)"
msgstr " (helyi fájlnév: %s%s%s)"
msgid " sent to "
msgstr " fogadó fél: "
msgid " received from "
msgstr " küldő fél: "
msgid "OK"
msgstr "Rendben"
msgid "FAILED"
msgstr "SIKERTELEN"
#, c-format
msgid "DCC chat closed with %s%s %s(%s%d.%d.%d.%d%s)\n"
msgstr "DCC beszélgetés vége: %s%s %s(%s%d.%d.%d.%d%s)\n"
#, c-format
msgid ""
"%s can't associate DCC chat with private buffer (maybe private buffer has "
"already DCC CHAT?)\n"
msgstr ""
"%s nem sikerült a DCC beszégetést a privát pufferhez kapcsolni (talán már "
"lett DCC CHAT hozzárendelve?)\n"
#, c-format
msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
msgstr ""
"Csatlakozás a %s%s %s(%s%d.%d.%d.%d%s)%s partnerhez DCC beszélgetésen "
"keresztül\n"
#, c-format
msgid "DCC: file %s%s%s resumed at position %u\n"
msgstr "DCC: a(z) %s%s%s fájl visszatért a(z) %u pozíción\n"
#, c-format
msgid ""
"%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found or "
"ended\n"
msgstr ""
"%s nem sikerült a(z) \"%s\" fájlra visszatérni (port: %d, indulási pozíció: %"
"u): DCC nem található vagy véget ért\n"
#, c-format
msgid "%s not enough memory for new DCC\n"
msgstr "%s nincs elegendő memória új DCC számára\n"
msgid "DCC chat"
msgstr "DCC beszélgetés"
#, c-format
msgid ""
"Incoming DCC file from %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s bytes\n"
msgstr ""
"Beérkező DCC fájl a következőtől: %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%"
"s bájt\n"
#, c-format
msgid ""
"Sending DCC file to %s%s%s: %s%s%s (local filename: %s%s%s), %s%lu%s bytes\n"
msgstr ""
"DCC fájl küldése a következőnek: %s%s%s: %s%s%s (helyi fájlnév: %s%s%s), %s%"
"lu%s bájt\n"
#, c-format
msgid "Incoming DCC chat request from %s%s%s (%s%d.%d.%d.%d%s)\n"
msgstr "Beérkező DCC beszélgetés a következőtől: %s%s%s (%s%d.%d.%d.%d%s)\n"
#, c-format
msgid "Sending DCC chat request to %s%s\n"
msgstr "DCC beszélgetésre felkérés küldése a következőnek: %s%s\n"
#, c-format
msgid ""
"DCC: file %s%s%s (local filename: %s%s%s) will be resumed at position %u\n"
msgstr ""
"DCC: a %s%s%s fájl (helyi fájlnév: %s%s%s) a(z) %u pozíción fog visszatérni\n"
#, c-format
msgid "%s not enough memory for DCC SEND\n"
msgstr "%s nincs elég memória a DCC SEND parancshoz\n"
#, c-format
msgid "%s cannot access file \"%s\"\n"
msgstr "%s nem sikerült a(z) \"%s\" fájlt elérni\n"
#, c-format
msgid "%s could not find address for '%s'. Falling back to local IP.\n"
msgstr ""
"%s nem sikerült a(z) '%s' címét meghatározni. Helyi IP-cím használata.\n"
#, c-format
msgid "%s cannot create socket for DCC\n"
msgstr "%s DCC csatorna meghatározása sikertelen\n"
#, c-format
msgid "%s cannot find available port for DCC\n"
msgstr "%s nem sikerült elérhető portot találni a DCC-hez\n"
#, c-format
msgid "%s cannot send DCC\n"
msgstr "%s DCC küldése sikertelen\n"
#, c-format
msgid "%s error sending data to \"%s\" via DCC CHAT\n"
msgstr "%s hiba a(z) \"%s\" felé DCC CHAT-tel történő adatküldés közben\n"
#, c-format
msgid "Private %s> %s"
msgstr "Privát %s> %s"
#, c-format
msgid "%s DCC: unable to create pipe\n"
msgstr "%s DCC: nem sikerült a csövet létrehozni\n"
#, c-format
msgid "%s DCC: unable to read local file\n"
msgstr "%s DCC: nem sikerült a helyi fájlt olvasni\n"
#, c-format
msgid "%s DCC: unable to send block to receiver\n"
msgstr "%s DCC: nem sikerült a blokkot a fogadónak eljuttatni\n"
#, c-format
msgid "%s DCC: unable to read ACK from receiver\n"
msgstr "%s DCC: nem érkezett ACK válasz a fogadótól\n"
#, c-format
msgid "%s DCC: unable to connect to sender\n"
msgstr "%s DCC: nem sikerült kapcsolódni a küldőhöz\n"
#, c-format
msgid "%s DCC: unable to receive block from sender\n"
msgstr "%s DCC: nem sikerült fogadni a küldő blokkját\n"
#, c-format
msgid "%s DCC: unable to write local file\n"
msgstr "%s DCC: nem sikerült a helyi fájlt írni\n"
#, c-format
msgid "%s DCC: unable to fork\n"
msgstr "%s DCC: nem sikerült forkolni\n"
#, c-format
msgid "%s DCC: timeout\n"
msgstr "%s DCC: időtúllépés\n"
#, c-format
msgid "%s DCC: unable to create socket for sending file\n"
msgstr "%s DCC: nem sikerült csatornát nyitni a fájlküldéshez\n"
#, c-format
msgid "%s DCC: unable to set 'nonblock' option for socket\n"
msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n"
#, fuzzy, c-format
msgid "Aborting active DCC: \"%s\" from %s"
msgstr "\"%s\" aktív DCC megszakítása a következővel: %s\n"
#, fuzzy
msgid "IRC debug messages"
msgstr "hibakereső üzenetek megjelenítése"
@ -3493,6 +3224,10 @@ msgstr "CTCP %sVERSION%s válasz %s%s%s felhasználótól: %s\n"
msgid "%sCTCP %sPING%s reply from %s%s%s: %ld.%ld %s"
msgstr "CTCP %sPING%s válasz %s%s%s felhasználótól: %ld.%ld másodperc\n"
#, c-format
msgid "Private %s> %s"
msgstr "Privát %s> %s"
#, fuzzy, c-format
msgid "%s%s%s %s(%s%s%s)%s has left %s%s %s(%s%s%s)"
msgstr "%s%s %s(%s%s%s)%s elhagyta a(z) %s%s szobát"
@ -4456,6 +4191,319 @@ msgstr ""
msgid "%s%s: wrong arguments for function \"%s\""
msgstr "%s rossz argumentum a \"%s\" parancsnak\n"
#, fuzzy
msgid "waiting"
msgstr "Várakozás"
#, fuzzy
msgid "connecting"
msgstr "Kapcsolódás"
#, fuzzy
msgid "active"
msgstr "Aktív"
#, fuzzy
msgid "done"
msgstr "Kész"
#, fuzzy
msgid "failed"
msgstr "Sikertelen"
#, fuzzy
msgid "aborted"
msgstr "Megszakítva"
#, fuzzy, c-format
msgid "%s%s: not enough memory for new xfer"
msgstr "%s nincs elegendő memória új DCC számára\n"
#, fuzzy, c-format
msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)"
msgstr ""
"Beérkező DCC fájl a következőtől: %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%"
"s bájt\n"
#, fuzzy, c-format
msgid ""
"%s: sending file to %s: %s (local filename: %s), %lu bytes (protocol: %s)"
msgstr ""
"DCC fájl küldése a következőnek: %s%s%s: %s%s%s (helyi fájlnév: %s%s%s), %s%"
"lu%s bájt\n"
#, fuzzy, c-format
msgid "%s: incoming chat request from %s (%d.%d.%d.%d)"
msgstr "Beérkező DCC beszélgetés a következőtől: %s%s%s (%s%d.%d.%d.%d%s)\n"
#, fuzzy, c-format
msgid "%s: sending chat request to %s"
msgstr "DCC beszélgetésre felkérés küldése a következőnek: %s%s\n"
#, fuzzy, c-format
msgid "%s: file %s (local filename: %s) will be resumed at position %u"
msgstr ""
"DCC: a %s%s%s fájl (helyi fájlnév: %s%s%s) a(z) %u pozíción fog visszatérni\n"
#, fuzzy, c-format
msgid "%s: file %s %s %s: %s"
msgstr "DCC: fájl %s%s%s"
#, fuzzy
msgid "sent to"
msgstr " fogadó fél: "
#, fuzzy
msgid "received from"
msgstr " küldő fél: "
msgid "OK"
msgstr "Rendben"
msgid "FAILED"
msgstr "SIKERTELEN"
#, fuzzy, c-format
msgid "%s: chat closed with %s (%d.%d.%d.%d)"
msgstr "DCC beszélgetés vége: %s%s %s(%s%d.%d.%d.%d%s)\n"
#, fuzzy, c-format
msgid "%s%s: missing arguments"
msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer type \"%s\""
msgstr "%s ismeretlen billentyűparancs \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: filename missing for type \"%s\""
msgstr "%s %s, %d. sor: érvénytelen opció: \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: protocol missing for type \"%s\""
msgstr "%s %s, %d. sor: érvénytelen opció: \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer protocol \"%s\""
msgstr "%s ismeretlen billentyűparancs \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: not enough memory"
msgstr "Nincs elég memória az új sorhoz\n"
#, fuzzy, c-format
msgid "%s%s: cannot access file \"%s\""
msgstr "%s nem sikerült a(z) \"%s\" fájlt elérni\n"
#, fuzzy, c-format
msgid "%s%s: could not find address for \"%s\", falling back to local IP"
msgstr ""
"%s nem sikerült a(z) '%s' címét meghatározni. Helyi IP-cím használata.\n"
#, fuzzy, c-format
msgid "%s%s: cannot create socket for xfer"
msgstr "%s nem sikerült a csatornát létrehozni\n"
#, fuzzy, c-format
msgid "%s%s: cannot find available port for xfer"
msgstr "%s nem sikerült elérhető portot találni a DCC-hez\n"
#, fuzzy, c-format
msgid "%s%s: error creating xfer"
msgstr "%s nincs elég memória az információs pult üzenethez\n"
#, fuzzy, c-format
msgid "%s%s: aborting active xfer: \"%s\" from %s"
msgstr "\"%s\" aktív DCC megszakítása a következővel: %s\n"
#, fuzzy, c-format
msgid "%s: aborting active xfer: \"%s\" from %s"
msgstr "\"%s\" aktív DCC megszakítása a következővel: %s\n"
#, fuzzy
msgid "text color"
msgstr "üzenetek színe"
#, fuzzy
msgid "background color"
msgstr "nevek háttere"
#, fuzzy
msgid "background color for selected line"
msgstr "szövegbeviteli mező színe"
#, fuzzy
msgid "text color for \"waiting\" status"
msgstr "\"waiting\" dcc státusz színe"
#, fuzzy
msgid "text color for \"connecting\" status"
msgstr "\"connecting\" dcc státusz színe"
#, fuzzy
msgid "text color for \"active\" status"
msgstr "\"active\" dcc státusz színe"
#, fuzzy
msgid "text color for \"done\" status"
msgstr "\"done\" dcc státusz színe"
#, fuzzy
msgid "text color for \"failed\" status"
msgstr "\"failed\" dcc státusz színe"
#, fuzzy
msgid "text color for \"aborted\" status"
msgstr "\"aborted\" dcc státusz színe"
#, fuzzy
msgid "timeout for xfer request (in seconds)"
msgstr "dcc kérések időkorlátja (másodpercben)"
#, fuzzy
msgid "block size for sending packets, in bytes"
msgstr "dcc csomagok blokkmérete"
msgid "does not wait for ACK when sending file"
msgstr "nem vár ACK válaszra fájl küldésekor"
#, fuzzy
msgid ""
"restricts outgoing files/chats to use only ports in the given range (useful "
"for NAT) (syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, "
"empty value means any port)"
msgstr ""
"korlátozza a dcc-t, hogy csak egy bizonyos tartományban lévő portokat "
"használja (NAT esetén hasznos) (szintaxis: egyetlen port, pl. 5000 vagy egy "
"port intervallum, pl. 5000-5015, üresen hagyva tetszőleges port)"
#, fuzzy
msgid ""
"IP or DNS address used for sending files/chats (if empty, local interface IP "
"is used)"
msgstr "kimenő dcc forgalom IP/DNS-címe (ha üres, a helyi interfész IP-címe)"
#, fuzzy
msgid "path for writing incoming files"
msgstr "dcc-n beérkező fájlok helye"
#, fuzzy
msgid "path for reading files when sending (when no path is specified by user)"
msgstr ""
"dcc-n keresztül küldendő fájlok elérési útvonala (ha nincs külön megadva)"
msgid "convert spaces to underscores when sending files"
msgstr "szóközök alulvonássá alakítása küldéskor"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"fájlok automatikus átnevezése, ha már léteznek ('.1', '.2', ... hozzáadása)"
#, fuzzy
msgid ""
"automatically resume file transfer if connection with remote host is lost"
msgstr ""
"dcc adatátvitel automatikus felépítése, ha megszakad a kapcsolat a távoli "
"géppel"
#, fuzzy
msgid "automatically accept incoming files (use carefully!)"
msgstr "dcc beszélgetések automatikus fogadása (óvatosan használja!)"
#, fuzzy
msgid "automatically accept chat requests (use carefully!)"
msgstr "dcc beszélgetések automatikus fogadása (óvatosan használja!)"
#, fuzzy, c-format
msgid "%s%s: unable to create pipe"
msgstr "%s DCC: nem sikerült a csövet létrehozni\n"
#, fuzzy, c-format
msgid "%s%s: unable to fork"
msgstr "%s DCC: nem sikerült forkolni\n"
#, fuzzy, c-format
msgid "%s%s: unable to read local file"
msgstr "%s DCC: nem sikerült a helyi fájlt olvasni\n"
#, fuzzy, c-format
msgid "%s%s: unable to send block to receiver"
msgstr "%s DCC: nem sikerült a blokkot a fogadónak eljuttatni\n"
#, fuzzy, c-format
msgid "%s%s: unable to read ACK from receiver"
msgstr "%s DCC: nem érkezett ACK válasz a fogadótól\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect to sender"
msgstr "%s DCC: nem sikerült kapcsolódni a küldőhöz\n"
#, fuzzy, c-format
msgid "%s%s: unable to receive block from sender"
msgstr "%s DCC: nem sikerült fogadni a küldő blokkját\n"
#, fuzzy, c-format
msgid "%s%s: unable to write local file"
msgstr "%s DCC: nem sikerült a helyi fájlt írni\n"
#, fuzzy, c-format
msgid "%s%s: error sending data to \"%s\" via xfer chat"
msgstr "%s hiba a(z) \"%s\" felé DCC CHAT-tel történő adatküldés közben\n"
#, fuzzy
#~ msgid "text color for status info"
#~ msgstr "státuszsor színe"
#, fuzzy
#~ msgid "background color for status info"
#~ msgstr "státuszablak háttere"
#~ msgid " (local filename: %s%s%s)"
#~ msgstr " (helyi fájlnév: %s%s%s)"
#~ msgid ""
#~ "%s can't associate DCC chat with private buffer (maybe private buffer has "
#~ "already DCC CHAT?)\n"
#~ msgstr ""
#~ "%s nem sikerült a DCC beszégetést a privát pufferhez kapcsolni (talán már "
#~ "lett DCC CHAT hozzárendelve?)\n"
#~ msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
#~ msgstr ""
#~ "Csatlakozás a %s%s %s(%s%d.%d.%d.%d%s)%s partnerhez DCC beszélgetésen "
#~ "keresztül\n"
#~ msgid "DCC: file %s%s%s resumed at position %u\n"
#~ msgstr "DCC: a(z) %s%s%s fájl visszatért a(z) %u pozíción\n"
#~ msgid ""
#~ "%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found "
#~ "or ended\n"
#~ msgstr ""
#~ "%s nem sikerült a(z) \"%s\" fájlra visszatérni (port: %d, indulási "
#~ "pozíció: %u): DCC nem található vagy véget ért\n"
#~ msgid "DCC chat"
#~ msgstr "DCC beszélgetés"
#~ msgid "%s not enough memory for DCC SEND\n"
#~ msgstr "%s nincs elég memória a DCC SEND parancshoz\n"
#~ msgid "%s cannot create socket for DCC\n"
#~ msgstr "%s DCC csatorna meghatározása sikertelen\n"
#~ msgid "%s cannot send DCC\n"
#~ msgstr "%s DCC küldése sikertelen\n"
#~ msgid "%s DCC: timeout\n"
#~ msgstr "%s DCC: időtúllépés\n"
#~ msgid "%s DCC: unable to create socket for sending file\n"
#~ msgstr "%s DCC: nem sikerült csatornát nyitni a fájlküldéshez\n"
#~ msgid "%s DCC: unable to set 'nonblock' option for socket\n"
#~ msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n"
#~ msgid "Internal key functions:\n"
#~ msgstr "Belső billentyűfunkciók:\n"
@ -4685,10 +4733,6 @@ msgstr "%s rossz argumentum a \"%s\" parancsnak\n"
#~ msgid "manage charsets"
#~ msgstr "pufferek kezelése"
#, fuzzy
#~ msgid "%s%s: value \"%s\" is invalid for option \"%s\""
#~ msgstr "%s %s, %d. sor: érvénytelen opció: \"%s\"\n"
#, fuzzy
#~ msgid "%s%s: error creating server for reading configuration file"
#~ msgstr "szerver konfigurációs fájljának újraolvastatása"

582
po/ru.po
View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-04-29 18:22+0200\n"
"POT-Creation-Date: 2008-05-04 17:30+0200\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1427,38 +1427,6 @@ msgstr "цвет '+' при прокрутке ников"
msgid "text color for nicklist separator"
msgstr "цвет разделителя ников"
#, fuzzy
msgid "text color for status info"
msgstr "цвет строки состояния"
#, fuzzy
msgid "background color for status info"
msgstr "цвет окна статуса"
#, fuzzy
msgid "text color for \"waiting\" status info"
msgstr "цвет \"ожидания\" в окне DCC"
#, fuzzy
msgid "text color for \"connecting\" status info"
msgstr "цвет \"соединения\" в окне DCC"
#, fuzzy
msgid "text color for \"active\" status info"
msgstr "цвет \"активности\" в окне DCC"
#, fuzzy
msgid "text color for \"done\" status info"
msgstr "цвет \"завершённых\" в окне DCC"
#, fuzzy
msgid "text color for \"failed\" status info"
msgstr "цвет \"неудачных\" в окне DCC"
#, fuzzy
msgid "text color for \"aborted\" status info"
msgstr "цвет \"отменённых\" в окне DCC"
#, fuzzy
msgid "maximum number of lines in history per buffer (0 = unlimited)"
msgstr "максимальное количество команд в истории (0 = не ограничено)"
@ -3141,61 +3109,6 @@ msgstr ""
msgid "send unknown commands to IRC server"
msgstr "отсылать неизвестные команды IRC серверу"
#, fuzzy
msgid "automatically accept incoming dcc files (use carefully!)"
msgstr "автоматически подтверждать dcc-чат (используйте осторожно!)"
msgid "automatically accept dcc chats (use carefully!)"
msgstr "автоматически подтверждать dcc-чат (используйте осторожно!)"
msgid "timeout for dcc request (in seconds)"
msgstr "таймаут запросов dcc-соединений (в секундах)"
#, fuzzy
msgid "block size for dcc packets in bytes"
msgstr "размер блока dcc пакетов"
msgid "does not wait for ACK when sending file"
msgstr "не ожидать ACK при отправке файла"
msgid ""
"restricts outgoing dcc to use only ports in the given range (useful for NAT) "
"(syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, empty value "
"means any port)"
msgstr ""
"привязывает исходящие DCС соединения к определённому интервалу портов "
"(полезно для NAT) (синтаксис: определённый порт, например 5000, или интервал "
"портов, например 5000-5015, пустое значение означает любой порт)"
msgid ""
"IP or DNS address used for outgoing dcc (if empty, local interface IP is "
"used)"
msgstr ""
"IP адрес или домен, используемый для исходящих DCC соединений (пустое "
"значение означает текущий IP адрес)"
#, fuzzy
msgid "path for writing incoming files with dcc"
msgstr "путь для получаемых файлов"
msgid ""
"path for reading files when sending thru dcc (when no path is specified)"
msgstr "путь для поиска отправляемых файлов (если не задан полный путь)"
msgid "convert spaces to underscores when sending files"
msgstr "заменять пробелы знаками подчёркивания при отправке файлов"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"переименовывать получаемые файлы при наличии файла с тем же названием "
"(добавлять '.1', '.2' и т.д.)"
msgid ""
"automatically resume dcc transfer if connection with remote host is loosed"
msgstr ""
"автоматически продолжать DCC передачу если соединение с удалённым хостом "
"было утеряно"
msgid "automatically log server messages"
msgstr "автоматически журналировать сообщения сервера"
@ -3208,183 +3121,6 @@ msgstr "автоматически журналировать приваты"
msgid "hide password displayed by nickserv"
msgstr "скрывать пароль, отображаемый nickserv'ом"
msgid "Waiting"
msgstr "Ожидание"
msgid "Connecting"
msgstr "Подключение"
msgid "Active"
msgstr "Активно"
msgid "Done"
msgstr "Завершено"
msgid "Failed"
msgstr "Неудача"
msgid "Aborted"
msgstr "Отменено"
#, c-format
msgid "DCC: file %s%s%s"
msgstr "DCC: файл %s%s%s"
#, c-format
msgid " (local filename: %s%s%s)"
msgstr " (локальное имя файла: %s%s%s)"
msgid " sent to "
msgstr " отправлен "
msgid " received from "
msgstr " получен от "
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "НЕУДАЧА"
#, c-format
msgid "DCC chat closed with %s%s %s(%s%d.%d.%d.%d%s)\n"
msgstr "DCC-чат закончен с %s%s %s(%s%d.%d.%d.%d%s)\n"
#, c-format
msgid ""
"%s can't associate DCC chat with private buffer (maybe private buffer has "
"already DCC CHAT?)\n"
msgstr ""
"%s не могу ассоциировать DCC-чат с буфером (возможно буфер уже имеет DCC-"
"чат)\n"
#, c-format
msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
msgstr "Соединён с %s%s %s(%s%d.%d.%d.%d%s)%s DCC-чатом\n"
#, c-format
msgid "DCC: file %s%s%s resumed at position %u\n"
msgstr "DCC: файл %s%s%s продолжается с позиции %u\n"
#, c-format
msgid ""
"%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found or "
"ended\n"
msgstr ""
"%s не могу продолжить файл \"%s\" (порт: %d, начальная позиция: %u): DCC не "
"найден или завершён\n"
#, c-format
msgid "%s not enough memory for new DCC\n"
msgstr "%s недостаточно памяти для нового DCC\n"
msgid "DCC chat"
msgstr "DCC чат"
#, c-format
msgid ""
"Incoming DCC file from %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s bytes\n"
msgstr "Входящий файл от %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s байт\n"
#, c-format
msgid ""
"Sending DCC file to %s%s%s: %s%s%s (local filename: %s%s%s), %s%lu%s bytes\n"
msgstr "Отправляю файл %s%s%s: %s%s%s (файл: %s%s%s), %s%lu%s байт\n"
#, c-format
msgid "Incoming DCC chat request from %s%s%s (%s%d.%d.%d.%d%s)\n"
msgstr "Входящий запрос на DCC-чат от %s%s%s (%s%d.%d.%d.%d%s)\n"
#, c-format
msgid "Sending DCC chat request to %s%s\n"
msgstr "Отправляю запрос на DCC-чат %s%s\n"
#, c-format
msgid ""
"DCC: file %s%s%s (local filename: %s%s%s) will be resumed at position %u\n"
msgstr ""
"DCC: файл %s%s%s (локальное имя файла: %s%s%s) будет продолжен с позиции %u\n"
#, c-format
msgid "%s not enough memory for DCC SEND\n"
msgstr "%s недостаточно памяти для отправки файла\n"
#, c-format
msgid "%s cannot access file \"%s\"\n"
msgstr "%s нет доступа к файлу \"%s\"\n"
#, c-format
msgid "%s could not find address for '%s'. Falling back to local IP.\n"
msgstr "%s не могу найти адрес для '%s'. Откатываюсь на локальный IP.\n"
#, c-format
msgid "%s cannot create socket for DCC\n"
msgstr "%s не могу создать сокет для DCC\n"
#, c-format
msgid "%s cannot find available port for DCC\n"
msgstr "%s не могу найти свободный порт для DCC\n"
#, c-format
msgid "%s cannot send DCC\n"
msgstr "%s не могу установить DCC-соединение\n"
#, c-format
msgid "%s error sending data to \"%s\" via DCC CHAT\n"
msgstr "%s ошибка при отправке данных \"%s\" через DCC-чат\n"
#, c-format
msgid "Private %s> %s"
msgstr "Личное %s> %s"
#, c-format
msgid "%s DCC: unable to create pipe\n"
msgstr "%s DCC: не могу создать pipe\n"
#, c-format
msgid "%s DCC: unable to read local file\n"
msgstr "%s DCC: не могу прочитать локальный файл\n"
#, c-format
msgid "%s DCC: unable to send block to receiver\n"
msgstr "%s DCC: не могу отправить блок получателю\n"
#, c-format
msgid "%s DCC: unable to read ACK from receiver\n"
msgstr "%s DCC: не могу прочитать ACK от получателя\n"
#, c-format
msgid "%s DCC: unable to connect to sender\n"
msgstr "%s DCC: не могу соединиться с отправителем\n"
#, c-format
msgid "%s DCC: unable to receive block from sender\n"
msgstr "%s DCC: не могу получить блок от отправителя\n"
#, c-format
msgid "%s DCC: unable to write local file\n"
msgstr "%s DCC: не могу записать локальный файл\n"
#, c-format
msgid "%s DCC: unable to fork\n"
msgstr "%s DCC: не могу forkнуться\n"
#, c-format
msgid "%s DCC: timeout\n"
msgstr "%s DCC: таймаут\n"
#, c-format
msgid "%s DCC: unable to create socket for sending file\n"
msgstr "%s DCC: не могу создать сокет для отправки файла\n"
#, c-format
msgid "%s DCC: unable to set 'nonblock' option for socket\n"
msgstr "%s DCC: не могу установить неблокирующий режим для сокета\n"
#, fuzzy, c-format
msgid "Aborting active DCC: \"%s\" from %s"
msgstr "Отменяю активное DCC-сединение: \"%s\" от %s\n"
#, fuzzy
msgid "IRC debug messages"
msgstr "выводить отладочные сообщения"
@ -3484,6 +3220,10 @@ msgstr "Ответ на CTCP %sVERSION%s от %s%s%s: %s\n"
msgid "%sCTCP %sPING%s reply from %s%s%s: %ld.%ld %s"
msgstr "Ответ на %sPING%s от %s%s%s: %ld.%ld секунд\n"
#, c-format
msgid "Private %s> %s"
msgstr "Личное %s> %s"
#, fuzzy, c-format
msgid "%s%s%s %s(%s%s%s)%s has left %s%s %s(%s%s%s)"
msgstr "%s%s %s(%s%s%s)%s покинул %s%s"
@ -4441,6 +4181,314 @@ msgstr ""
msgid "%s%s: wrong arguments for function \"%s\""
msgstr "%s некорректные аргументы команды \"%s\"\n"
#, fuzzy
msgid "waiting"
msgstr "Ожидание"
#, fuzzy
msgid "connecting"
msgstr "Подключение"
#, fuzzy
msgid "active"
msgstr "Активно"
#, fuzzy
msgid "done"
msgstr "Завершено"
#, fuzzy
msgid "failed"
msgstr "Неудача"
#, fuzzy
msgid "aborted"
msgstr "Отменено"
#, fuzzy, c-format
msgid "%s%s: not enough memory for new xfer"
msgstr "%s недостаточно памяти для нового DCC\n"
#, fuzzy, c-format
msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)"
msgstr "Входящий файл от %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s байт\n"
#, fuzzy, c-format
msgid ""
"%s: sending file to %s: %s (local filename: %s), %lu bytes (protocol: %s)"
msgstr "Отправляю файл %s%s%s: %s%s%s (файл: %s%s%s), %s%lu%s байт\n"
#, fuzzy, c-format
msgid "%s: incoming chat request from %s (%d.%d.%d.%d)"
msgstr "Входящий запрос на DCC-чат от %s%s%s (%s%d.%d.%d.%d%s)\n"
#, fuzzy, c-format
msgid "%s: sending chat request to %s"
msgstr "Отправляю запрос на DCC-чат %s%s\n"
#, fuzzy, c-format
msgid "%s: file %s (local filename: %s) will be resumed at position %u"
msgstr ""
"DCC: файл %s%s%s (локальное имя файла: %s%s%s) будет продолжен с позиции %u\n"
#, fuzzy, c-format
msgid "%s: file %s %s %s: %s"
msgstr "DCC: файл %s%s%s"
#, fuzzy
msgid "sent to"
msgstr " отправлен "
#, fuzzy
msgid "received from"
msgstr " получен от "
msgid "OK"
msgstr "OK"
msgid "FAILED"
msgstr "НЕУДАЧА"
#, fuzzy, c-format
msgid "%s: chat closed with %s (%d.%d.%d.%d)"
msgstr "DCC-чат закончен с %s%s %s(%s%d.%d.%d.%d%s)\n"
#, fuzzy, c-format
msgid "%s%s: missing arguments"
msgstr "%s нет аргумента для параметра \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer type \"%s\""
msgstr "%s неизвестная функция клавиши \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: filename missing for type \"%s\""
msgstr "%s %s, строка %d: некорректный параметр \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: protocol missing for type \"%s\""
msgstr "%s %s, строка %d: некорректный параметр \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unknown xfer protocol \"%s\""
msgstr "%s неизвестная функция клавиши \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: not enough memory"
msgstr "Недостаточно памяти для новой строчки\n"
#, fuzzy, c-format
msgid "%s%s: cannot access file \"%s\""
msgstr "%s нет доступа к файлу \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: could not find address for \"%s\", falling back to local IP"
msgstr "%s не могу найти адрес для '%s'. Откатываюсь на локальный IP.\n"
#, fuzzy, c-format
msgid "%s%s: cannot create socket for xfer"
msgstr "%s невозможно создать сокет\n"
#, fuzzy, c-format
msgid "%s%s: cannot find available port for xfer"
msgstr "%s не могу найти свободный порт для DCC\n"
#, fuzzy, c-format
msgid "%s%s: error creating xfer"
msgstr "%s недостаточно памяти для сообщения в строке информации\n"
#, fuzzy, c-format
msgid "%s%s: aborting active xfer: \"%s\" from %s"
msgstr "Отменяю активное DCC-сединение: \"%s\" от %s\n"
#, fuzzy, c-format
msgid "%s: aborting active xfer: \"%s\" from %s"
msgstr "Отменяю активное DCC-сединение: \"%s\" от %s\n"
#, fuzzy
msgid "text color"
msgstr "цвет чата"
#, fuzzy
msgid "background color"
msgstr "фон ников"
#, fuzzy
msgid "background color for selected line"
msgstr "цвет вводимого текста"
#, fuzzy
msgid "text color for \"waiting\" status"
msgstr "цвет \"ожидания\" в окне DCC"
#, fuzzy
msgid "text color for \"connecting\" status"
msgstr "цвет \"соединения\" в окне DCC"
#, fuzzy
msgid "text color for \"active\" status"
msgstr "цвет \"активности\" в окне DCC"
#, fuzzy
msgid "text color for \"done\" status"
msgstr "цвет \"завершённых\" в окне DCC"
#, fuzzy
msgid "text color for \"failed\" status"
msgstr "цвет \"неудачных\" в окне DCC"
#, fuzzy
msgid "text color for \"aborted\" status"
msgstr "цвет \"отменённых\" в окне DCC"
#, fuzzy
msgid "timeout for xfer request (in seconds)"
msgstr "таймаут запросов dcc-соединений (в секундах)"
#, fuzzy
msgid "block size for sending packets, in bytes"
msgstr "размер блока dcc пакетов"
msgid "does not wait for ACK when sending file"
msgstr "не ожидать ACK при отправке файла"
#, fuzzy
msgid ""
"restricts outgoing files/chats to use only ports in the given range (useful "
"for NAT) (syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, "
"empty value means any port)"
msgstr ""
"привязывает исходящие DCС соединения к определённому интервалу портов "
"(полезно для NAT) (синтаксис: определённый порт, например 5000, или интервал "
"портов, например 5000-5015, пустое значение означает любой порт)"
#, fuzzy
msgid ""
"IP or DNS address used for sending files/chats (if empty, local interface IP "
"is used)"
msgstr ""
"IP адрес или домен, используемый для исходящих DCC соединений (пустое "
"значение означает текущий IP адрес)"
#, fuzzy
msgid "path for writing incoming files"
msgstr "путь для получаемых файлов"
#, fuzzy
msgid "path for reading files when sending (when no path is specified by user)"
msgstr "путь для поиска отправляемых файлов (если не задан полный путь)"
msgid "convert spaces to underscores when sending files"
msgstr "заменять пробелы знаками подчёркивания при отправке файлов"
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
"переименовывать получаемые файлы при наличии файла с тем же названием "
"(добавлять '.1', '.2' и т.д.)"
#, fuzzy
msgid ""
"automatically resume file transfer if connection with remote host is lost"
msgstr ""
"автоматически продолжать DCC передачу если соединение с удалённым хостом "
"было утеряно"
#, fuzzy
msgid "automatically accept incoming files (use carefully!)"
msgstr "автоматически подтверждать dcc-чат (используйте осторожно!)"
#, fuzzy
msgid "automatically accept chat requests (use carefully!)"
msgstr "автоматически подтверждать dcc-чат (используйте осторожно!)"
#, fuzzy, c-format
msgid "%s%s: unable to create pipe"
msgstr "%s DCC: не могу создать pipe\n"
#, fuzzy, c-format
msgid "%s%s: unable to fork"
msgstr "%s DCC: не могу forkнуться\n"
#, fuzzy, c-format
msgid "%s%s: unable to read local file"
msgstr "%s DCC: не могу прочитать локальный файл\n"
#, fuzzy, c-format
msgid "%s%s: unable to send block to receiver"
msgstr "%s DCC: не могу отправить блок получателю\n"
#, fuzzy, c-format
msgid "%s%s: unable to read ACK from receiver"
msgstr "%s DCC: не могу прочитать ACK от получателя\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect to sender"
msgstr "%s DCC: не могу соединиться с отправителем\n"
#, fuzzy, c-format
msgid "%s%s: unable to receive block from sender"
msgstr "%s DCC: не могу получить блок от отправителя\n"
#, fuzzy, c-format
msgid "%s%s: unable to write local file"
msgstr "%s DCC: не могу записать локальный файл\n"
#, fuzzy, c-format
msgid "%s%s: error sending data to \"%s\" via xfer chat"
msgstr "%s ошибка при отправке данных \"%s\" через DCC-чат\n"
#, fuzzy
#~ msgid "text color for status info"
#~ msgstr "цвет строки состояния"
#, fuzzy
#~ msgid "background color for status info"
#~ msgstr "цвет окна статуса"
#~ msgid " (local filename: %s%s%s)"
#~ msgstr " (локальное имя файла: %s%s%s)"
#~ msgid ""
#~ "%s can't associate DCC chat with private buffer (maybe private buffer has "
#~ "already DCC CHAT?)\n"
#~ msgstr ""
#~ "%s не могу ассоциировать DCC-чат с буфером (возможно буфер уже имеет DCC-"
#~ "чат)\n"
#~ msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
#~ msgstr "Соединён с %s%s %s(%s%d.%d.%d.%d%s)%s DCC-чатом\n"
#~ msgid "DCC: file %s%s%s resumed at position %u\n"
#~ msgstr "DCC: файл %s%s%s продолжается с позиции %u\n"
#~ msgid ""
#~ "%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found "
#~ "or ended\n"
#~ msgstr ""
#~ "%s не могу продолжить файл \"%s\" (порт: %d, начальная позиция: %u): DCC "
#~ "не найден или завершён\n"
#~ msgid "DCC chat"
#~ msgstr "DCC чат"
#~ msgid "%s not enough memory for DCC SEND\n"
#~ msgstr "%s недостаточно памяти для отправки файла\n"
#~ msgid "%s cannot create socket for DCC\n"
#~ msgstr "%s не могу создать сокет для DCC\n"
#~ msgid "%s cannot send DCC\n"
#~ msgstr "%s не могу установить DCC-соединение\n"
#~ msgid "%s DCC: timeout\n"
#~ msgstr "%s DCC: таймаут\n"
#~ msgid "%s DCC: unable to create socket for sending file\n"
#~ msgstr "%s DCC: не могу создать сокет для отправки файла\n"
#~ msgid "%s DCC: unable to set 'nonblock' option for socket\n"
#~ msgstr "%s DCC: не могу установить неблокирующий режим для сокета\n"
#~ msgid "Internal key functions:\n"
#~ msgstr "Встроенные функции клавиш:\n"
@ -4670,10 +4718,6 @@ msgstr "%s некорректные аргументы команды \"%s\"\n"
#~ msgid "manage charsets"
#~ msgstr "управление буферами"
#, fuzzy
#~ msgid "%s%s: value \"%s\" is invalid for option \"%s\""
#~ msgstr "%s %s, строка %d: некорректный параметр \"%s\"\n"
#, fuzzy
#~ msgid "%s%s: error creating server for reading configuration file"
#~ msgstr "перезагрузить конфигурационный файл сервера"

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
)

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-04-29 18:22+0200\n"
"POT-Creation-Date: 2008-05-04 17:30+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1150,30 +1150,6 @@ msgstr ""
msgid "text color for nicklist separator"
msgstr ""
msgid "text color for status info"
msgstr ""
msgid "background color for status info"
msgstr ""
msgid "text color for \"waiting\" status info"
msgstr ""
msgid "text color for \"connecting\" status info"
msgstr ""
msgid "text color for \"active\" status info"
msgstr ""
msgid "text color for \"done\" status info"
msgstr ""
msgid "text color for \"failed\" status info"
msgstr ""
msgid "text color for \"aborted\" status info"
msgstr ""
msgid "maximum number of lines in history per buffer (0 = unlimited)"
msgstr ""
@ -2613,49 +2589,6 @@ msgstr ""
msgid "send unknown commands to IRC server"
msgstr ""
msgid "automatically accept incoming dcc files (use carefully!)"
msgstr ""
msgid "automatically accept dcc chats (use carefully!)"
msgstr ""
msgid "timeout for dcc request (in seconds)"
msgstr ""
msgid "block size for dcc packets in bytes"
msgstr ""
msgid "does not wait for ACK when sending file"
msgstr ""
msgid ""
"restricts outgoing dcc to use only ports in the given range (useful for NAT) "
"(syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, empty value "
"means any port)"
msgstr ""
msgid ""
"IP or DNS address used for outgoing dcc (if empty, local interface IP is "
"used)"
msgstr ""
msgid "path for writing incoming files with dcc"
msgstr ""
msgid ""
"path for reading files when sending thru dcc (when no path is specified)"
msgstr ""
msgid "convert spaces to underscores when sending files"
msgstr ""
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
msgid ""
"automatically resume dcc transfer if connection with remote host is loosed"
msgstr ""
msgid "automatically log server messages"
msgstr ""
@ -2668,178 +2601,6 @@ msgstr ""
msgid "hide password displayed by nickserv"
msgstr ""
msgid "Waiting"
msgstr ""
msgid "Connecting"
msgstr ""
msgid "Active"
msgstr ""
msgid "Done"
msgstr ""
msgid "Failed"
msgstr ""
msgid "Aborted"
msgstr ""
#, c-format
msgid "DCC: file %s%s%s"
msgstr ""
#, c-format
msgid " (local filename: %s%s%s)"
msgstr ""
msgid " sent to "
msgstr ""
msgid " received from "
msgstr ""
msgid "OK"
msgstr ""
msgid "FAILED"
msgstr ""
#, c-format
msgid "DCC chat closed with %s%s %s(%s%d.%d.%d.%d%s)\n"
msgstr ""
#, c-format
msgid ""
"%s can't associate DCC chat with private buffer (maybe private buffer has "
"already DCC CHAT?)\n"
msgstr ""
#, c-format
msgid "Connected to %s%s %s(%s%d.%d.%d.%d%s)%s via DCC chat\n"
msgstr ""
#, c-format
msgid "DCC: file %s%s%s resumed at position %u\n"
msgstr ""
#, c-format
msgid ""
"%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found or "
"ended\n"
msgstr ""
#, c-format
msgid "%s not enough memory for new DCC\n"
msgstr ""
msgid "DCC chat"
msgstr ""
#, c-format
msgid ""
"Incoming DCC file from %s%s%s (%s%d.%d.%d.%d%s)%s: %s%s%s, %s%lu%s bytes\n"
msgstr ""
#, c-format
msgid ""
"Sending DCC file to %s%s%s: %s%s%s (local filename: %s%s%s), %s%lu%s bytes\n"
msgstr ""
#, c-format
msgid "Incoming DCC chat request from %s%s%s (%s%d.%d.%d.%d%s)\n"
msgstr ""
#, c-format
msgid "Sending DCC chat request to %s%s\n"
msgstr ""
#, c-format
msgid ""
"DCC: file %s%s%s (local filename: %s%s%s) will be resumed at position %u\n"
msgstr ""
#, c-format
msgid "%s not enough memory for DCC SEND\n"
msgstr ""
#, c-format
msgid "%s cannot access file \"%s\"\n"
msgstr ""
#, c-format
msgid "%s could not find address for '%s'. Falling back to local IP.\n"
msgstr ""
#, c-format
msgid "%s cannot create socket for DCC\n"
msgstr ""
#, c-format
msgid "%s cannot find available port for DCC\n"
msgstr ""
#, c-format
msgid "%s cannot send DCC\n"
msgstr ""
#, c-format
msgid "%s error sending data to \"%s\" via DCC CHAT\n"
msgstr ""
#, c-format
msgid "Private %s> %s"
msgstr ""
#, c-format
msgid "%s DCC: unable to create pipe\n"
msgstr ""
#, c-format
msgid "%s DCC: unable to read local file\n"
msgstr ""
#, c-format
msgid "%s DCC: unable to send block to receiver\n"
msgstr ""
#, c-format
msgid "%s DCC: unable to read ACK from receiver\n"
msgstr ""
#, c-format
msgid "%s DCC: unable to connect to sender\n"
msgstr ""
#, c-format
msgid "%s DCC: unable to receive block from sender\n"
msgstr ""
#, c-format
msgid "%s DCC: unable to write local file\n"
msgstr ""
#, c-format
msgid "%s DCC: unable to fork\n"
msgstr ""
#, c-format
msgid "%s DCC: timeout\n"
msgstr ""
#, c-format
msgid "%s DCC: unable to create socket for sending file\n"
msgstr ""
#, c-format
msgid "%s DCC: unable to set 'nonblock' option for socket\n"
msgstr ""
#, c-format
msgid "Aborting active DCC: \"%s\" from %s"
msgstr ""
msgid "IRC debug messages"
msgstr ""
@ -2937,6 +2698,10 @@ msgstr ""
msgid "%sCTCP %sPING%s reply from %s%s%s: %ld.%ld %s"
msgstr ""
#, c-format
msgid "Private %s> %s"
msgstr ""
#, c-format
msgid "%s%s%s %s(%s%s%s)%s has left %s%s %s(%s%s%s)"
msgstr ""
@ -3871,3 +3636,223 @@ msgstr ""
#, c-format
msgid "%s%s: wrong arguments for function \"%s\""
msgstr ""
msgid "waiting"
msgstr ""
msgid "connecting"
msgstr ""
msgid "active"
msgstr ""
msgid "done"
msgstr ""
msgid "failed"
msgstr ""
msgid "aborted"
msgstr ""
#, c-format
msgid "%s%s: not enough memory for new xfer"
msgstr ""
#, c-format
msgid "%s: incoming file from %s (%d.%d.%d.%d): %s, %lu bytes (protocol: %s)"
msgstr ""
#, c-format
msgid ""
"%s: sending file to %s: %s (local filename: %s), %lu bytes (protocol: %s)"
msgstr ""
#, c-format
msgid "%s: incoming chat request from %s (%d.%d.%d.%d)"
msgstr ""
#, c-format
msgid "%s: sending chat request to %s"
msgstr ""
#, c-format
msgid "%s: file %s (local filename: %s) will be resumed at position %u"
msgstr ""
#, c-format
msgid "%s: file %s %s %s: %s"
msgstr ""
msgid "sent to"
msgstr ""
msgid "received from"
msgstr ""
msgid "OK"
msgstr ""
msgid "FAILED"
msgstr ""
#, c-format
msgid "%s: chat closed with %s (%d.%d.%d.%d)"
msgstr ""
#, c-format
msgid "%s%s: missing arguments"
msgstr ""
#, c-format
msgid "%s%s: unknown xfer type \"%s\""
msgstr ""
#, c-format
msgid "%s%s: filename missing for type \"%s\""
msgstr ""
#, c-format
msgid "%s%s: protocol missing for type \"%s\""
msgstr ""
#, c-format
msgid "%s%s: unknown xfer protocol \"%s\""
msgstr ""
#, c-format
msgid "%s%s: not enough memory"
msgstr ""
#, c-format
msgid "%s%s: cannot access file \"%s\""
msgstr ""
#, c-format
msgid "%s%s: could not find address for \"%s\", falling back to local IP"
msgstr ""
#, c-format
msgid "%s%s: cannot create socket for xfer"
msgstr ""
#, c-format
msgid "%s%s: cannot find available port for xfer"
msgstr ""
#, c-format
msgid "%s%s: error creating xfer"
msgstr ""
#, c-format
msgid "%s%s: aborting active xfer: \"%s\" from %s"
msgstr ""
#, c-format
msgid "%s: aborting active xfer: \"%s\" from %s"
msgstr ""
msgid "text color"
msgstr ""
msgid "background color"
msgstr ""
msgid "background color for selected line"
msgstr ""
msgid "text color for \"waiting\" status"
msgstr ""
msgid "text color for \"connecting\" status"
msgstr ""
msgid "text color for \"active\" status"
msgstr ""
msgid "text color for \"done\" status"
msgstr ""
msgid "text color for \"failed\" status"
msgstr ""
msgid "text color for \"aborted\" status"
msgstr ""
msgid "timeout for xfer request (in seconds)"
msgstr ""
msgid "block size for sending packets, in bytes"
msgstr ""
msgid "does not wait for ACK when sending file"
msgstr ""
msgid ""
"restricts outgoing files/chats to use only ports in the given range (useful "
"for NAT) (syntax: a single port, ie. 5000 or a port range, ie. 5000-5015, "
"empty value means any port)"
msgstr ""
msgid ""
"IP or DNS address used for sending files/chats (if empty, local interface IP "
"is used)"
msgstr ""
msgid "path for writing incoming files"
msgstr ""
msgid "path for reading files when sending (when no path is specified by user)"
msgstr ""
msgid "convert spaces to underscores when sending files"
msgstr ""
msgid "rename incoming files if already exists (add '.1', '.2', ...)"
msgstr ""
msgid ""
"automatically resume file transfer if connection with remote host is lost"
msgstr ""
msgid "automatically accept incoming files (use carefully!)"
msgstr ""
msgid "automatically accept chat requests (use carefully!)"
msgstr ""
#, c-format
msgid "%s%s: unable to create pipe"
msgstr ""
#, c-format
msgid "%s%s: unable to fork"
msgstr ""
#, c-format
msgid "%s%s: unable to read local file"
msgstr ""
#, c-format
msgid "%s%s: unable to send block to receiver"
msgstr ""
#, c-format
msgid "%s%s: unable to read ACK from receiver"
msgstr ""
#, c-format
msgid "%s%s: unable to connect to sender"
msgstr ""
#, c-format
msgid "%s%s: unable to receive block from sender"
msgstr ""
#, c-format
msgid "%s%s: unable to write local file"
msgstr ""
#, c-format
msgid "%s%s: error sending data to \"%s\" via xfer chat"
msgstr ""

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)

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 \

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"),

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;

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,

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;

456
src/core/wee-network.c Normal file
View File

@ -0,0 +1,456 @@
/*
* 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/>.
*/
/* wee-network.c: network functions for WeeChat */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
#include "weechat.h"
#include "wee-network.h"
#include "wee-config.h"
#include "wee-string.h"
/*
* network_convbase64_8x3_to_6x4 : convert 3 bytes of 8 bits in 4 bytes of 6 bits
*/
void
network_convbase64_8x3_to_6x4 (char *from, char *to)
{
unsigned char base64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz0123456789+/";
to[0] = base64_table [ (from[0] & 0xfc) >> 2 ];
to[1] = base64_table [ ((from[0] & 0x03) << 4) + ((from[1] & 0xf0) >> 4) ];
to[2] = base64_table [ ((from[1] & 0x0f) << 2) + ((from[2] & 0xc0) >> 6) ];
to[3] = base64_table [ from[2] & 0x3f ];
}
/*
* network_base64encode: encode a string in base64
*/
void
network_base64encode (char *from, char *to)
{
char *f, *t;
int from_len;
from_len = strlen (from);
f = from;
t = to;
while (from_len >= 3)
{
network_convbase64_8x3_to_6x4 (f, t);
f += 3 * sizeof (*f);
t += 4 * sizeof (*t);
from_len -= 3;
}
if (from_len > 0)
{
char rest[3] = { 0, 0, 0 };
switch (from_len)
{
case 1 :
rest[0] = f[0];
network_convbase64_8x3_to_6x4 (rest, t);
t[2] = t[3] = '=';
break;
case 2 :
rest[0] = f[0];
rest[1] = f[1];
network_convbase64_8x3_to_6x4 (rest, t);
t[3] = '=';
break;
}
t[4] = 0;
}
}
/*
* network_pass_httpproxy: establish connection/authentification to an
* http proxy
* return :
* - 0 if connexion throw proxy was successful
* - 1 if connexion fails
*/
int
network_pass_httpproxy (int sock, char *address, int port)
{
char buffer[256], authbuf[128], authbuf_base64[196];
int n, m;
if (CONFIG_STRING(config_proxy_username)
&& CONFIG_STRING(config_proxy_username)[0])
{
/* authentification */
snprintf (authbuf, sizeof (authbuf), "%s:%s",
CONFIG_STRING(config_proxy_username),
(CONFIG_STRING(config_proxy_password)) ?
CONFIG_STRING(config_proxy_password) : "");
network_base64encode (authbuf, authbuf_base64);
n = snprintf (buffer, sizeof (buffer),
"CONNECT %s:%d HTTP/1.0\r\nProxy-Authorization: Basic %s\r\n\r\n",
address, port, authbuf_base64);
}
else
{
/* no authentification */
n = snprintf (buffer, sizeof (buffer),
"CONNECT %s:%d HTTP/1.0\r\n\r\n", address, port);
}
m = send (sock, buffer, n, 0);
if (n != m)
return 1;
n = recv (sock, buffer, sizeof (buffer), 0);
/* success result must be like: "HTTP/1.0 200 OK" */
if (n < 12)
return 1;
if (memcmp (buffer, "HTTP/", 5) || memcmp (buffer + 9, "200", 3))
return 1;
return 0;
}
/*
* network_resolve: resolve hostname on its IP address
* (works with ipv4 and ipv6)
* return :
* - 0 if resolution was successful
* - 1 if resolution fails
*/
int
network_resolve (char *hostname, char *ip, int *version)
{
char ipbuffer[NI_MAXHOST];
struct addrinfo *res;
if (version != NULL)
*version = 0;
res = NULL;
if (getaddrinfo (hostname, NULL, NULL, &res) != 0)
return 1;
if (!res)
return 1;
if (getnameinfo (res->ai_addr, res->ai_addrlen, ipbuffer, sizeof(ipbuffer),
NULL, 0, NI_NUMERICHOST) != 0)
{
freeaddrinfo (res);
return 1;
}
if ((res->ai_family == AF_INET) && (version != NULL))
*version = 4;
if ((res->ai_family == AF_INET6) && (version != NULL))
*version = 6;
strcpy (ip, ipbuffer);
freeaddrinfo (res);
return 0;
}
/*
* network_pass_socks4proxy: establish connection/authentification thru a
* socks4 proxy
* return :
* - 0 if connexion thru proxy was successful
* - 1 if connexion fails
*/
int
network_pass_socks4proxy (int sock, char *address, int port)
{
/*
* socks4 protocol is explained here:
* http://archive.socks.permeo.com/protocol/socks4.protocol
*
*/
struct s_socks4
{
char version; /* 1 byte */ /* socks version : 4 or 5 */
char method; /* 1 byte */ /* socks method : connect (1) or bind (2) */
unsigned short port; /* 2 bytes */ /* destination port */
unsigned long address; /* 4 bytes */ /* destination address */
char user[64]; /* username (64 characters seems to be enought) */
} socks4;
unsigned char buffer[24];
char ip_addr[NI_MAXHOST];
socks4.version = 4;
socks4.method = 1;
socks4.port = htons (port);
network_resolve (address, ip_addr, NULL);
socks4.address = inet_addr (ip_addr);
strncpy (socks4.user, CONFIG_STRING(config_proxy_username),
sizeof (socks4.user) - 1);
send (sock, (char *) &socks4, 8 + strlen (socks4.user) + 1, 0);
recv (sock, buffer, sizeof (buffer), 0);
if (buffer[0] == 0 && buffer[1] == 90)
return 0;
return 1;
}
/*
* network_pass_socks5proxy: establish connection/authentification thru a
* socks5 proxy
* return :
* - 0 if connexion thru proxy was successful
* - 1 if connexion fails
*/
int
network_pass_socks5proxy (int sock, char *address, int port)
{
/*
* socks5 protocol is explained in RFC 1928
* socks5 authentication with username/pass is explained in RFC 1929
*/
struct s_sock5
{
char version; /* 1 byte */ /* socks version : 4 or 5 */
char nmethods; /* 1 byte */ /* size in byte(s) of field 'method', here 1 byte */
char method; /* 1-255 bytes */ /* socks method : noauth (0), auth(user/pass) (2), ... */
} socks5;
unsigned char buffer[288];
int username_len, password_len, addr_len, addr_buffer_len;
unsigned char *addr_buffer;
socks5.version = 5;
socks5.nmethods = 1;
if (CONFIG_STRING(config_proxy_username)
&& CONFIG_STRING(config_proxy_username)[0])
socks5.method = 2; /* with authentication */
else
socks5.method = 0; /* without authentication */
send (sock, (char *) &socks5, sizeof(socks5), 0);
/* server socks5 must respond with 2 bytes */
if (recv (sock, buffer, 2, 0) != 2)
return 1;
if (CONFIG_STRING(config_proxy_username)
&& CONFIG_STRING(config_proxy_username)[0])
{
/* with authentication */
/* -> socks server must respond with :
* - socks version (buffer[0]) = 5 => socks5
* - socks method (buffer[1]) = 2 => authentication
*/
if (buffer[0] != 5 || buffer[1] != 2)
return 1;
/* authentication as in RFC 1929 */
username_len = strlen (CONFIG_STRING(config_proxy_username));
password_len = strlen (CONFIG_STRING(config_proxy_password));
/* make username/password buffer */
buffer[0] = 1;
buffer[1] = (unsigned char) username_len;
memcpy(buffer + 2, CONFIG_STRING(config_proxy_username), username_len);
buffer[2 + username_len] = (unsigned char) password_len;
memcpy (buffer + 3 + username_len,
CONFIG_STRING(config_proxy_password), password_len);
send (sock, buffer, 3 + username_len + password_len, 0);
/* server socks5 must respond with 2 bytes */
if (recv (sock, buffer, 2, 0) != 2)
return 1;
/* buffer[1] = auth state, must be 0 for success */
if (buffer[1] != 0)
return 1;
}
else
{
/* without authentication */
/* -> socks server must respond with :
* - socks version (buffer[0]) = 5 => socks5
* - socks method (buffer[1]) = 0 => no authentication
*/
if (!(buffer[0] == 5 && buffer[1] == 0))
return 1;
}
/* authentication successful then giving address/port to connect */
addr_len = strlen(address);
addr_buffer_len = 4 + 1 + addr_len + 2;
addr_buffer = malloc (addr_buffer_len * sizeof(*addr_buffer));
if (!addr_buffer)
return 1;
addr_buffer[0] = 5; /* version 5 */
addr_buffer[1] = 1; /* command: 1 for connect */
addr_buffer[2] = 0; /* reserved */
addr_buffer[3] = 3; /* address type : ipv4 (1), domainname (3), ipv6 (4) */
addr_buffer[4] = (unsigned char) addr_len;
memcpy (addr_buffer + 5, address, addr_len); /* server address */
*((unsigned short *) (addr_buffer + 5 + addr_len)) = htons (port); /* server port */
send (sock, addr_buffer, addr_buffer_len, 0);
free (addr_buffer);
/* dialog with proxy server */
if (recv (sock, buffer, 4, 0) != 4)
return 1;
if (!(buffer[0] == 5 && buffer[1] == 0))
return 1;
/* buffer[3] = address type */
switch (buffer[3])
{
case 1:
/* ipv4
* server socks return server bound address and port
* address of 4 bytes and port of 2 bytes (= 6 bytes)
*/
if (recv (sock, buffer, 6, 0) != 6)
return 1;
break;
case 3:
/* domainname
* server socks return server bound address and port
*/
/* reading address length */
if (recv (sock, buffer, 1, 0) != 1)
return 1;
addr_len = buffer[0];
/* reading address + port = addr_len + 2 */
if (recv (sock, buffer, addr_len + 2, 0) != (addr_len + 2))
return 1;
break;
case 4:
/* ipv6
* server socks return server bound address and port
* address of 16 bytes and port of 2 bytes (= 18 bytes)
*/
if (recv (sock, buffer, 18, 0) != 18)
return 1;
break;
default:
return 1;
}
return 0;
}
/*
* network_pass_proxy: establish connection/authentification to a proxy
* return :
* - 0 if connexion throw proxy was successful
* - 1 if connexion fails
*/
int
network_pass_proxy (int sock, char *address, int port)
{
int rc;
rc = 1;
if (CONFIG_BOOLEAN(config_proxy_type))
{
if (string_strcasecmp (CONFIG_STRING(config_proxy_type), "http") == 0)
rc = network_pass_httpproxy (sock, address, port);
if (string_strcasecmp (CONFIG_STRING(config_proxy_type), "socks4") == 0)
rc = network_pass_socks4proxy (sock, address, port);
if (string_strcasecmp (CONFIG_STRING(config_proxy_type), "socks5") == 0)
rc = network_pass_socks5proxy (sock, address, port);
}
return rc;
}
/*
* network_connect_to: connect to a remote host
* return 1 if ok, 0 if failed
*/
int
network_connect_to (int sock, unsigned long address, int port)
{
struct sockaddr_in addr;
struct hostent *hostent;
char *ip4;
int ret;
if (CONFIG_BOOLEAN(config_proxy_type))
{
memset (&addr, 0, sizeof (addr));
addr.sin_addr.s_addr = htonl (address);
ip4 = inet_ntoa(addr.sin_addr);
memset (&addr, 0, sizeof (addr));
addr.sin_port = htons (CONFIG_INTEGER(config_proxy_port));
addr.sin_family = AF_INET;
hostent = gethostbyname (CONFIG_STRING(config_proxy_address));
if (!hostent)
return 0;
memcpy(&(addr.sin_addr),*(hostent->h_addr_list), sizeof(struct in_addr));
ret = connect (sock, (struct sockaddr *) &addr, sizeof (addr));
if ((ret == -1) && (errno != EINPROGRESS))
return 0;
if (network_pass_proxy (sock, ip4, port) == -1)
return 0;
}
else
{
memset (&addr, 0, sizeof (addr));
addr.sin_port = htons (port);
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl (address);
ret = connect (sock, (struct sockaddr *) &addr, sizeof (addr));
if ((ret == -1) && (errno != EINPROGRESS))
return 0;
}
return 1;
}

26
src/core/wee-network.h Normal file
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 */

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})

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));
}
/*

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",

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;

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,
};

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)

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)

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)

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)

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)

View File

@ -33,7 +33,7 @@
#include "irc-server.h"
char *irc_config_server_option_str[IRC_CONFIG_NUM_SERVER_OPTIONS] =
char *irc_config_server_option_string[IRC_CONFIG_NUM_SERVER_OPTIONS] =
{ "autoconnect", "autoreconnect", "autoreconnect_delay", "addresses", "ipv6",
"ssl", "password", "nicks", "username", "realname", "hostname", "command",
"command_delay", "autojoin", "autorejoin", "notify_levels"
@ -47,7 +47,7 @@ struct t_config_file *irc_config_file = NULL;
struct t_config_section *irc_config_section_server_default = NULL;
struct t_config_section *irc_config_section_server = NULL;
/* config, look section */
/* IRC config, look section */
struct t_config_option *irc_config_look_one_server_buffer;
struct t_config_option *irc_config_look_open_near_server;
@ -59,7 +59,7 @@ struct t_config_option *irc_config_look_show_away_once;
struct t_config_option *irc_config_look_notice_as_pv;
struct t_config_option *irc_config_look_highlight;
/* config, network section */
/* IRC config, network section */
struct t_config_option *irc_config_network_default_msg_part;
struct t_config_option *irc_config_network_default_msg_quit;
@ -73,29 +73,14 @@ struct t_config_option *irc_config_network_colors_receive;
struct t_config_option *irc_config_network_colors_send;
struct t_config_option *irc_config_network_send_unknown_commands;
/* config, dcc section */
struct t_config_option *irc_config_dcc_auto_accept_files;
struct t_config_option *irc_config_dcc_auto_accept_chats;
struct t_config_option *irc_config_dcc_timeout;
struct t_config_option *irc_config_dcc_blocksize;
struct t_config_option *irc_config_dcc_fast_send;
struct t_config_option *irc_config_dcc_port_range;
struct t_config_option *irc_config_dcc_own_ip;
struct t_config_option *irc_config_dcc_download_path;
struct t_config_option *irc_config_dcc_upload_path;
struct t_config_option *irc_config_dcc_convert_spaces;
struct t_config_option *irc_config_dcc_auto_rename;
struct t_config_option *irc_config_dcc_auto_resume;
/* config, log section */
/* IRC config, log section */
struct t_config_option *irc_config_log_auto_log_server;
struct t_config_option *irc_config_log_auto_log_channel;
struct t_config_option *irc_config_log_auto_log_private;
struct t_config_option *irc_config_log_hide_nickserv_pwd;
/* config, server section */
/* IRC config, server section */
struct t_config_option *irc_config_server_default[IRC_CONFIG_NUM_SERVER_OPTIONS];
@ -117,7 +102,7 @@ irc_config_search_server_option (char *option_name)
for (i = 0; i < IRC_CONFIG_NUM_SERVER_OPTIONS; i++)
{
if (weechat_strcasecmp (irc_config_server_option_str[i],
if (weechat_strcasecmp (irc_config_server_option_string[i],
option_name) == 0)
return i;
}
@ -757,9 +742,9 @@ irc_config_server_create_option (void *data, struct t_config_file *config_file,
option_name,
value,
&irc_config_server_change_cb,
irc_config_server_option_str[index_option],
irc_config_server_option_string[index_option],
&irc_config_server_delete_cb,
irc_config_server_option_str[index_option]);
irc_config_server_option_string[index_option]);
if (ptr_option)
{
@ -857,10 +842,10 @@ irc_config_server_create_default_options (struct t_config_section *section)
irc_config_file,
section,
i,
irc_config_server_option_str[i],
irc_config_server_option_string[i],
default_value,
&irc_config_server_default_change_cb,
irc_config_server_option_str[i],
irc_config_server_option_string[i],
NULL,
NULL);
}
@ -1013,83 +998,6 @@ irc_config_init ()
N_("send unknown commands to IRC server"),
NULL, 0, 0, "off", NULL, NULL, NULL, NULL, NULL, NULL);
ptr_section = weechat_config_new_section (irc_config_file, "dcc",
0, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (irc_config_file);
return 0;
}
irc_config_dcc_auto_accept_files = weechat_config_new_option (
irc_config_file, ptr_section,
"auto_accept_files", "boolean",
N_("automatically accept incoming dcc files (use carefully!)"),
NULL, 0, 0, "off", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_auto_accept_chats = weechat_config_new_option (
irc_config_file, ptr_section,
"auto_accept_chats", "boolean",
N_("automatically accept dcc chats (use carefully!)"),
NULL, 0, 0, "off", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_timeout = weechat_config_new_option (
irc_config_file, ptr_section,
"timeout", "integer",
N_("timeout for dcc request (in seconds)"),
NULL, 5, INT_MAX, "300", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_blocksize = weechat_config_new_option (
irc_config_file, ptr_section,
"blocksize", "integer",
N_("block size for dcc packets in bytes"),
NULL, IRC_DCC_MIN_BLOCKSIZE, IRC_DCC_MAX_BLOCKSIZE, "65536",
NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_fast_send = weechat_config_new_option (
irc_config_file, ptr_section,
"fast_send", "boolean",
N_("does not wait for ACK when sending file"),
NULL, 0, 0, "on", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_port_range = weechat_config_new_option (
irc_config_file, ptr_section,
"port_range", "string",
N_("restricts outgoing dcc to use only ports in the given range "
"(useful for NAT) (syntax: a single port, ie. 5000 or a port "
"range, ie. 5000-5015, empty value means any port)"),
NULL, 0, 0, "", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_own_ip = weechat_config_new_option (
irc_config_file, ptr_section,
"own_ip", "string",
N_("IP or DNS address used for outgoing dcc "
"(if empty, local interface IP is used)"),
NULL, 0, 0, "", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_download_path = weechat_config_new_option (
irc_config_file, ptr_section,
"download_path", "string",
N_("path for writing incoming files with dcc"),
NULL, 0, 0, "%h/dcc", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_upload_path = weechat_config_new_option (
irc_config_file, ptr_section,
"upload_path", "string",
N_("path for reading files when sending thru dcc (when no path is "
"specified)"),
NULL, 0, 0, "~", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_convert_spaces = weechat_config_new_option (
irc_config_file, ptr_section,
"convert_spaces", "boolean",
N_("convert spaces to underscores when sending files"),
NULL, 0, 0, "on", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_auto_rename = weechat_config_new_option (
irc_config_file, ptr_section,
"auto_rename", "boolean",
N_("rename incoming files if already exists (add '.1', '.2', ...)"),
NULL, 0, 0, "on", NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_dcc_auto_resume = weechat_config_new_option (
irc_config_file, ptr_section,
"auto_resume", "boolean",
N_("automatically resume dcc transfer if connection with remote host "
"is loosed"),
NULL, 0, 0, "on", NULL, NULL, NULL, NULL, NULL, NULL);
ptr_section = weechat_config_new_section (irc_config_file, "log",
0, 0,
NULL, NULL, NULL, NULL,
@ -1162,11 +1070,7 @@ irc_config_init ()
int
irc_config_read ()
{
int rc;
rc = weechat_config_read (irc_config_file);
return rc;
return weechat_config_read (irc_config_file);
}
/*

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;

File diff suppressed because it is too large Load Diff

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);

View File

@ -36,10 +36,6 @@
#include <arpa/inet.h>
#include <netdb.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
#endif
#include "../weechat-plugin.h"
#include "irc.h"
#include "irc-server.h"
@ -2056,386 +2052,6 @@ irc_server_child_read_cb (void *arg_server)
return WEECHAT_RC_OK;
}
/*
* irc_server_convbase64_8x3_to_6x4 : convert 3 bytes of 8 bits in 4 bytes of 6 bits
*/
void
irc_server_convbase64_8x3_to_6x4 (char *from, char *to)
{
unsigned char base64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
to[0] = base64_table [ (from[0] & 0xfc) >> 2 ];
to[1] = base64_table [ ((from[0] & 0x03) << 4) + ((from[1] & 0xf0) >> 4) ];
to[2] = base64_table [ ((from[1] & 0x0f) << 2) + ((from[2] & 0xc0) >> 6) ];
to[3] = base64_table [ from[2] & 0x3f ];
}
/*
* irc_server_base64encode: encode a string in base64
*/
void
irc_server_base64encode (char *from, char *to)
{
char *f, *t;
int from_len;
from_len = strlen(from);
f = from;
t = to;
while (from_len >= 3)
{
irc_server_convbase64_8x3_to_6x4 (f, t);
f += 3 * sizeof (*f);
t += 4 * sizeof (*t);
from_len -= 3;
}
if (from_len > 0)
{
char rest[3] = { 0, 0, 0 };
switch (from_len)
{
case 1 :
rest[0] = f[0];
irc_server_convbase64_8x3_to_6x4 (rest, t);
t[2] = t[3] = '=';
break;
case 2 :
rest[0] = f[0];
rest[1] = f[1];
irc_server_convbase64_8x3_to_6x4 (rest, t);
t[3] = '=';
break;
}
t[4] = 0;
}
}
/*
* irc_server_pass_httpproxy: establish connection/authentification to an
* http proxy
* return :
* - 0 if connexion throw proxy was successful
* - 1 if connexion fails
*/
int
irc_server_pass_httpproxy (int sock, char *address, int port)
{
char buffer[256], authbuf[128], authbuf_base64[196];
char *config_proxy_username, *config_proxy_password;
int n, m;
config_proxy_username = weechat_config_string (
weechat_config_get ("weechat.proxy.username"));
config_proxy_username = weechat_config_string (
weechat_config_get ("weechat.proxy.password"));
if (config_proxy_username && config_proxy_username[0])
{
/* authentification */
snprintf (authbuf, sizeof (authbuf), "%s:%s",
config_proxy_username,
(config_proxy_password) ? config_proxy_password : "");
irc_server_base64encode (authbuf, authbuf_base64);
n = snprintf (buffer, sizeof (buffer),
"CONNECT %s:%d HTTP/1.0\r\nProxy-Authorization: Basic %s\r\n\r\n",
address, port, authbuf_base64);
}
else
{
/* no authentification */
n = snprintf (buffer, sizeof (buffer),
"CONNECT %s:%d HTTP/1.0\r\n\r\n", address, port);
}
m = send (sock, buffer, n, 0);
if (n != m)
return 1;
n = recv (sock, buffer, sizeof (buffer), 0);
/* success result must be like: "HTTP/1.0 200 OK" */
if (n < 12)
return 1;
if (memcmp (buffer, "HTTP/", 5) || memcmp (buffer + 9, "200", 3))
return 1;
return 0;
}
/*
* irc_server_resolve: resolve hostname on its IP address
* (works with ipv4 and ipv6)
* return :
* - 0 if resolution was successful
* - 1 if resolution fails
*/
int
irc_server_resolve (char *hostname, char *ip, int *version)
{
char ipbuffer[NI_MAXHOST];
struct addrinfo *res;
if (version != NULL)
*version = 0;
res = NULL;
if (getaddrinfo (hostname, NULL, NULL, &res) != 0)
return 1;
if (!res)
return 1;
if (getnameinfo (res->ai_addr, res->ai_addrlen, ipbuffer, sizeof(ipbuffer), NULL, 0, NI_NUMERICHOST) != 0)
{
freeaddrinfo (res);
return 1;
}
if ((res->ai_family == AF_INET) && (version != NULL))
*version = 4;
if ((res->ai_family == AF_INET6) && (version != NULL))
*version = 6;
strcpy (ip, ipbuffer);
freeaddrinfo (res);
return 0;
}
/*
* irc_server_pass_socks4proxy: establish connection/authentification thru a
* socks4 proxy
* return :
* - 0 if connexion thru proxy was successful
* - 1 if connexion fails
*/
int
irc_server_pass_socks4proxy (int sock, char *address, int port, char *username)
{
/*
* socks4 protocol is explained here:
* http://archive.socks.permeo.com/protocol/socks4.protocol
*
*/
struct s_socks4
{
char version; /* 1 byte */ /* socks version : 4 or 5 */
char method; /* 1 byte */ /* socks method : connect (1) or bind (2) */
unsigned short port; /* 2 bytes */ /* destination port */
unsigned long address; /* 4 bytes */ /* destination address */
char user[64]; /* username (64 characters seems to be enought) */
} socks4;
unsigned char buffer[24];
char ip_addr[NI_MAXHOST];
socks4.version = 4;
socks4.method = 1;
socks4.port = htons (port);
irc_server_resolve (address, ip_addr, NULL);
socks4.address = inet_addr (ip_addr);
strncpy (socks4.user, username, sizeof (socks4.user) - 1);
send (sock, (char *) &socks4, 8 + strlen (socks4.user) + 1, 0);
recv (sock, buffer, sizeof (buffer), 0);
if (buffer[0] == 0 && buffer[1] == 90)
return 0;
return 1;
}
/*
* irc_server_pass_socks5proxy: establish connection/authentification thru a
* socks5 proxy
* return :
* - 0 if connexion thru proxy was successful
* - 1 if connexion fails
*/
int
irc_server_pass_socks5proxy (int sock, char *address, int port)
{
/*
* socks5 protocol is explained in RFC 1928
* socks5 authentication with username/pass is explained in RFC 1929
*/
struct s_sock5
{
char version; /* 1 byte */ /* socks version : 4 or 5 */
char nmethods; /* 1 byte */ /* size in byte(s) of field 'method', here 1 byte */
char method; /* 1-255 bytes */ /* socks method : noauth (0), auth(user/pass) (2), ... */
} socks5;
unsigned char buffer[288];
int username_len, password_len, addr_len, addr_buffer_len;
unsigned char *addr_buffer;
char *config_proxy_username, *config_proxy_password;
socks5.version = 5;
socks5.nmethods = 1;
config_proxy_username = weechat_config_string (
weechat_config_get ("weechat.proxy.username"));
config_proxy_username = weechat_config_string (
weechat_config_get ("weechat.proxy.password"));
if (config_proxy_username && config_proxy_username[0])
socks5.method = 2; /* with authentication */
else
socks5.method = 0; /* without authentication */
send (sock, (char *) &socks5, sizeof(socks5), 0);
/* server socks5 must respond with 2 bytes */
if (recv (sock, buffer, 2, 0) != 2)
return 1;
if (config_proxy_username && config_proxy_username[0])
{
/* with authentication */
/* -> socks server must respond with :
* - socks version (buffer[0]) = 5 => socks5
* - socks method (buffer[1]) = 2 => authentication
*/
if (buffer[0] != 5 || buffer[1] != 2)
return 1;
/* authentication as in RFC 1929 */
username_len = strlen (config_proxy_username);
password_len = strlen (config_proxy_password);
/* make username/password buffer */
buffer[0] = 1;
buffer[1] = (unsigned char) username_len;
memcpy(buffer + 2, config_proxy_username, username_len);
buffer[2 + username_len] = (unsigned char) password_len;
memcpy (buffer + 3 + username_len, config_proxy_password, password_len);
send (sock, buffer, 3 + username_len + password_len, 0);
/* server socks5 must respond with 2 bytes */
if (recv (sock, buffer, 2, 0) != 2)
return 1;
/* buffer[1] = auth state, must be 0 for success */
if (buffer[1] != 0)
return 1;
}
else
{
/* without authentication */
/* -> socks server must respond with :
* - socks version (buffer[0]) = 5 => socks5
* - socks method (buffer[1]) = 0 => no authentication
*/
if (!(buffer[0] == 5 && buffer[1] == 0))
return 1;
}
/* authentication successful then giving address/port to connect */
addr_len = strlen(address);
addr_buffer_len = 4 + 1 + addr_len + 2;
addr_buffer = malloc (addr_buffer_len * sizeof(*addr_buffer));
if (!addr_buffer)
return 1;
addr_buffer[0] = 5; /* version 5 */
addr_buffer[1] = 1; /* command: 1 for connect */
addr_buffer[2] = 0; /* reserved */
addr_buffer[3] = 3; /* address type : ipv4 (1), domainname (3), ipv6 (4) */
addr_buffer[4] = (unsigned char) addr_len;
memcpy (addr_buffer + 5, address, addr_len); /* server address */
*((unsigned short *) (addr_buffer + 5 + addr_len)) = htons (port); /* server port */
send (sock, addr_buffer, addr_buffer_len, 0);
free (addr_buffer);
/* dialog with proxy server */
if (recv (sock, buffer, 4, 0) != 4)
return 1;
if (!(buffer[0] == 5 && buffer[1] == 0))
return 1;
/* buffer[3] = address type */
switch (buffer[3])
{
case 1:
/* ipv4
* server socks return server bound address and port
* address of 4 bytes and port of 2 bytes (= 6 bytes)
*/
if (recv (sock, buffer, 6, 0) != 6)
return 1;
break;
case 3:
/* domainname
* server socks return server bound address and port
*/
/* reading address length */
if (recv (sock, buffer, 1, 0) != 1)
return 1;
addr_len = buffer[0];
/* reading address + port = addr_len + 2 */
if (recv (sock, buffer, addr_len + 2, 0) != (addr_len + 2))
return 1;
break;
case 4:
/* ipv6
* server socks return server bound address and port
* address of 16 bytes and port of 2 bytes (= 18 bytes)
*/
if (recv (sock, buffer, 18, 0) != 18)
return 1;
break;
default:
return 1;
}
return 0;
}
/*
* irc_server_pass_proxy: establish connection/authentification to a proxy
* return :
* - 0 if connexion throw proxy was successful
* - 1 if connexion fails
*/
int
irc_server_pass_proxy (int sock, char *address, int port, char *username)
{
int rc;
char *config_proxy_type;
config_proxy_type = weechat_config_string (
weechat_config_get ("weechat.proxy.type"));
rc = 1;
if (config_proxy_type)
{
if (weechat_strcasecmp (config_proxy_type, "http") == 0)
rc = irc_server_pass_httpproxy (sock, address, port);
if (weechat_strcasecmp (config_proxy_type, "socks4") == 0)
rc = irc_server_pass_socks4proxy (sock, address, port, username);
if (weechat_strcasecmp (config_proxy_type, "socks5") == 0)
rc = irc_server_pass_socks5proxy (sock, address, port);
}
return rc;
}
/*
* irc_server_child: child process trying to connect to server
*/
@ -2497,10 +2113,9 @@ irc_server_child (struct t_irc_server *server)
return 0;
}
if (irc_server_pass_proxy (server->sock,
server->addresses_array[server->current_address],
server->ports_array[server->current_address],
server->username))
if (weechat_network_pass_proxy (server->sock,
server->addresses_array[server->current_address],
server->ports_array[server->current_address]))
{
write (server->child_write, "4", 1);
freeaddrinfo (res);
@ -3174,6 +2789,76 @@ irc_server_set_default_notify_level (struct t_irc_server *server, int notify)
*/
}
/*
* irc_server_xfer_send_ready_cb: callback called when user send (file or chat)
* to someone and that xfer plugin successfully
* initialized xfer and is ready for sending
* in that case, irc plugin send message to
* remote nick and wait for "accept" reply
*/
int
irc_server_xfer_send_ready_cb (void *data, char *signal, char *type_data,
void *signal_data)
{
struct t_plugin_infolist *infolist;
struct t_irc_server *server, *ptr_server;
char *plugin_id, *type;
/* make C compiler happy */
(void) data;
(void) signal;
(void) type_data;
infolist = (struct t_plugin_infolist *)signal_data;
if (weechat_infolist_next (infolist))
{
plugin_id = weechat_infolist_string (infolist, "plugin_id");
if (plugin_id)
{
if (strncmp (plugin_id, "irc_", 4) == 0)
{
sscanf (plugin_id + 4, "%x", (unsigned int *)&server);
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
if (ptr_server == server)
break;
}
if (ptr_server)
{
type = weechat_infolist_string (infolist, "type");
if (type)
{
if (strcmp (type, "file_send") == 0)
{
irc_server_sendf (server,
"PRIVMSG %s :\01DCC SEND \"%s\" "
"%s %d %s\01\n",
weechat_infolist_string (infolist, "nick"),
weechat_infolist_string (infolist, "filename"),
weechat_infolist_string (infolist, "address"),
weechat_infolist_integer (infolist, "port"),
weechat_infolist_string (infolist, "size"));
}
else if (strcmp (type, "chat_send") == 0)
{
irc_server_sendf (server,
"PRIVMSG %s :\01DCC CHAT chat %s %d\01",
weechat_infolist_string (infolist, "nick"),
weechat_infolist_string (infolist, "address"),
weechat_infolist_integer (infolist, "port"));
}
}
}
}
}
}
return WEECHAT_RC_OK;
}
/*
* irc_server_print_log: print server infos in log (usually for crash dump)
*/

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 */

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 ();

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;

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) \

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)

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)

View File

@ -0,0 +1,117 @@
/*
* 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/>.
*/
/* xfer-buffer.c: display xfer list on xfer buffer */
#include <stdlib.h>
#include <stdio.h>
#include "../weechat-plugin.h"
#include "xfer.h"
#include "xfer-buffer.h"
#include "xfer-config.h"
struct t_gui_buffer *xfer_buffer = NULL;
int xfer_buffer_selected_line = 0;
/*
* xfer_buffer_close_cb: callback called when xfer buffer is closed
*/
int
xfer_buffer_close_cb (void *data, struct t_gui_buffer *buffer)
{
/* make C compiler happy */
(void) data;
(void) buffer;
xfer_buffer = NULL;
return WEECHAT_RC_OK;
}
/*
* xfer_buffer_open: open xfer buffer (to display list of xfer)
*/
void
xfer_buffer_open ()
{
if (!xfer_buffer)
{
xfer_buffer = weechat_buffer_new ("xfer", "xfer",
NULL, NULL,
&xfer_buffer_close_cb, NULL);
/* failed to create buffer ? then exit */
if (!xfer_buffer)
return;
weechat_buffer_set (xfer_buffer, "type", "free");
weechat_buffer_set (xfer_buffer, "title", _("Xfer list"));
}
}
/*
* xfer_buffer_refresh: update a xfer in buffer and update hotlist for xfer buffer
*/
void
xfer_buffer_refresh (char *hotlist)
{
struct t_xfer *ptr_xfer;
char str_color[256];
int line;
if (xfer_buffer)
{
line = 0;
for (ptr_xfer = xfer_list; ptr_xfer; ptr_xfer = ptr_xfer->next_xfer)
{
if (XFER_IS_FILE(ptr_xfer->type))
{
snprintf (str_color, sizeof (str_color),
"%s,%s",
weechat_config_string (xfer_config_color_text),
weechat_config_string (xfer_config_color_text_bg));
weechat_printf_y (xfer_buffer, line * 2,
"%s%s%-20s \"%s\"",
weechat_color(str_color),
(line == xfer_buffer_selected_line) ?
"*** " : " ",
ptr_xfer->nick, ptr_xfer->filename);
weechat_printf_y (xfer_buffer, (line * 2) + 1,
"%s%s%s %s%-15s ",
weechat_color(str_color),
(line == xfer_buffer_selected_line) ?
"*** " : " ",
(XFER_IS_SEND(ptr_xfer->type)) ?
"<<--" : "-->>",
weechat_color(
weechat_config_string (
xfer_config_color_status[ptr_xfer->status])),
_(xfer_status_string[ptr_xfer->status]));
}
line++;
}
weechat_buffer_set (xfer_buffer, "hotlist", hotlist);
}
}

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 */

View File

@ -0,0 +1,161 @@
/*
* 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/>.
*/
/* xfer-chat.c: chat with direct connection to remote host */
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "../weechat-plugin.h"
#include "xfer.h"
#include "xfer-chat.h"
#include "xfer-buffer.h"
/*
* xfer_chat_send: send data to remote host via xfer chat
*/
int
xfer_chat_send (struct t_xfer *xfer, char *buffer, int size_buf)
{
if (!xfer)
return -1;
return send (xfer->sock, buffer, size_buf, 0);
}
/*
* xfer_chat_sendf: send formatted data to remote host via DCC CHAT
*/
void
xfer_chat_sendf (struct t_xfer *xfer, char *format, ...)
{
va_list args;
static char buffer[4096];
int size_buf;
if (!xfer || (xfer->sock < 0))
return;
va_start (args, format);
size_buf = vsnprintf (buffer, sizeof (buffer) - 1, format, args);
va_end (args);
if (size_buf == 0)
return;
buffer[sizeof (buffer) - 1] = '\0';
if ((size_buf < 0) || (size_buf > (int) (sizeof (buffer) - 1)))
size_buf = strlen (buffer);
if (xfer_chat_send (xfer, buffer, strlen (buffer)) <= 0)
{
weechat_printf (NULL,
_("%s%s: error sending data to \"%s\" via xfer chat"),
weechat_prefix ("error"), "xfer", xfer->nick);
xfer_close (xfer, XFER_STATUS_FAILED);
}
}
/*
* xfer_chat_recv: receive data from xfer chat remote host
*/
void
xfer_chat_recv (struct t_xfer *xfer)
{
fd_set read_fd;
static struct timeval timeout;
static char buffer[4096 + 2];
char *buf2, *pos, *ptr_buf, *next_ptr_buf;
int num_read;
FD_ZERO (&read_fd);
FD_SET (xfer->sock, &read_fd);
timeout.tv_sec = 0;
timeout.tv_usec = 0;
/* something to read on socket? */
if (select (FD_SETSIZE, &read_fd, NULL, NULL, &timeout) <= 0)
return;
if (!FD_ISSET (xfer->sock, &read_fd))
return;
/* there's something to read on socket! */
num_read = recv (xfer->sock, buffer, sizeof (buffer) - 2, 0);
if (num_read > 0)
{
buffer[num_read] = '\0';
buf2 = NULL;
ptr_buf = buffer;
if (xfer->unterminated_message)
{
buf2 = malloc (strlen (xfer->unterminated_message) +
strlen (buffer) + 1);
if (buf2)
{
strcpy (buf2, xfer->unterminated_message);
strcat (buf2, buffer);
}
ptr_buf = buf2;
free (xfer->unterminated_message);
xfer->unterminated_message = NULL;
}
while (ptr_buf && ptr_buf[0])
{
next_ptr_buf = NULL;
pos = strstr (ptr_buf, "\n");
if (pos)
{
pos[0] = '\0';
next_ptr_buf = pos + 1;
}
else
{
xfer->unterminated_message = strdup (ptr_buf);
ptr_buf = NULL;
next_ptr_buf = NULL;
}
if (ptr_buf)
{
weechat_printf (xfer->buffer, "%s\t%s", xfer->nick, ptr_buf);
}
ptr_buf = next_ptr_buf;
}
if (buf2)
free (buf2);
}
else
{
xfer_close (xfer, XFER_STATUS_ABORTED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
}
}

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 */

View File

@ -0,0 +1,287 @@
/*
* 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/>.
*/
/* xfer-config.c: xfer configuration options */
#include <stdlib.h>
#include <limits.h>
#include "../weechat-plugin.h"
#include "xfer.h"
#include "xfer-config.h"
struct t_config_file *xfer_config_file = NULL;
/* xfer config, look section */
struct t_config_option *xfer_config_look_auto_open_buffer;
/* xfer config, color section */
struct t_config_option *xfer_config_color_text;
struct t_config_option *xfer_config_color_text_bg;
struct t_config_option *xfer_config_color_selected_bg;
struct t_config_option *xfer_config_color_status[XFER_NUM_STATUS];
/* xfer config, network section */
struct t_config_option *xfer_config_network_timeout;
struct t_config_option *xfer_config_network_blocksize;
struct t_config_option *xfer_config_network_fast_send;
struct t_config_option *xfer_config_network_port_range;
struct t_config_option *xfer_config_network_own_ip;
/* xfer config, file section */
struct t_config_option *xfer_config_file_download_path;
struct t_config_option *xfer_config_file_upload_path;
struct t_config_option *xfer_config_file_convert_spaces;
struct t_config_option *xfer_config_file_auto_rename;
struct t_config_option *xfer_config_file_auto_resume;
struct t_config_option *xfer_config_file_auto_accept_files;
struct t_config_option *xfer_config_file_auto_accept_chats;
/*
* xfer_config_reload: reload xfer configuration file
*/
int
xfer_config_reload (void *data, struct t_config_file *config_file)
{
/* make C compiler happy */
(void) data;
return weechat_config_reload (config_file);
}
/*
* xfer_config_init: init xfer configuration file
* return: 1 if ok, 0 if error
*/
int
xfer_config_init ()
{
struct t_config_section *ptr_section;
xfer_config_file = weechat_config_new (XFER_CONFIG_NAME,
&xfer_config_reload, NULL);
if (!xfer_config_file)
return 0;
ptr_section = weechat_config_new_section (xfer_config_file, "look",
0, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (xfer_config_file);
return 0;
}
xfer_config_look_auto_open_buffer = weechat_config_new_option (
xfer_config_file, ptr_section,
"auto_open_buffer", "boolean",
N_("auto open xfer buffer and switch to it when a new xfer is added "
"to list"),
NULL, 0, 0, "on", NULL, NULL, NULL, NULL, NULL, NULL);
ptr_section = weechat_config_new_section (xfer_config_file, "color",
0, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (xfer_config_file);
return 0;
}
xfer_config_color_text = weechat_config_new_option (
xfer_config_file, ptr_section,
"text", "color",
N_("text color"),
NULL, 0, 0, "default",
NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_color_text_bg = weechat_config_new_option (
xfer_config_file, ptr_section,
"text_bg", "color",
N_("background color"),
NULL, 0, 0, "default",
NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_color_selected_bg = weechat_config_new_option (
xfer_config_file, ptr_section,
"selected_bg", "color",
N_("background color for selected line"),
NULL, 0, 0, "magenta",
NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_color_status[XFER_STATUS_WAITING] = weechat_config_new_option (
xfer_config_file, ptr_section,
"status_waiting", "color",
N_("text color for \"waiting\" status"),
NULL, 0, 0, "lightcyan",
NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_color_status[XFER_STATUS_CONNECTING] = weechat_config_new_option (
xfer_config_file, ptr_section,
"status_connecting", "color",
N_("text color for \"connecting\" status"),
NULL, 0, 0, "yellow",
NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_color_status[XFER_STATUS_ACTIVE] = weechat_config_new_option (
xfer_config_file, ptr_section,
"status_active", "color",
N_("text color for \"active\" status"),
NULL, 0, 0, "lightblue",
NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_color_status[XFER_STATUS_DONE] = weechat_config_new_option (
xfer_config_file, ptr_section,
"status_done", "color",
N_("text color for \"done\" status"),
NULL, 0, 0, "lightgreen",
NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_color_status[XFER_STATUS_FAILED] = weechat_config_new_option (
xfer_config_file, ptr_section,
"status_failed", "color",
N_("text color for \"failed\" status"),
NULL, 0, 0, "lightred",
NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_color_status[XFER_STATUS_ABORTED] = weechat_config_new_option (
xfer_config_file, ptr_section,
"status_aborted", "color",
N_("text color for \"aborted\" status"),
NULL, 0, 0, "lightred",
NULL, NULL, NULL, NULL, NULL, NULL);
ptr_section = weechat_config_new_section (xfer_config_file, "network",
0, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (xfer_config_file);
return 0;
}
xfer_config_network_timeout = weechat_config_new_option (
xfer_config_file, ptr_section,
"timeout", "integer",
N_("timeout for xfer request (in seconds)"),
NULL, 5, INT_MAX, "300", NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_network_blocksize = weechat_config_new_option (
xfer_config_file, ptr_section,
"blocksize", "integer",
N_("block size for sending packets, in bytes"),
NULL, XFER_BLOCKSIZE_MIN, XFER_BLOCKSIZE_MAX, "65536",
NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_network_fast_send = weechat_config_new_option (
xfer_config_file, ptr_section,
"fast_send", "boolean",
N_("does not wait for ACK when sending file"),
NULL, 0, 0, "on", NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_network_port_range = weechat_config_new_option (
xfer_config_file, ptr_section,
"port_range", "string",
N_("restricts outgoing files/chats to use only ports in the given "
"range (useful for NAT) (syntax: a single port, ie. 5000 or a port "
"range, ie. 5000-5015, empty value means any port)"),
NULL, 0, 0, "", NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_network_own_ip = weechat_config_new_option (
xfer_config_file, ptr_section,
"own_ip", "string",
N_("IP or DNS address used for sending files/chats "
"(if empty, local interface IP is used)"),
NULL, 0, 0, "", NULL, NULL, NULL, NULL, NULL, NULL);
ptr_section = weechat_config_new_section (xfer_config_file, "file",
0, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (xfer_config_file);
return 0;
}
xfer_config_file_download_path = weechat_config_new_option (
xfer_config_file, ptr_section,
"download_path", "string",
N_("path for writing incoming files"),
NULL, 0, 0, "%h/xfer", NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_file_upload_path = weechat_config_new_option (
xfer_config_file, ptr_section,
"upload_path", "string",
N_("path for reading files when sending (when no path is "
"specified by user)"),
NULL, 0, 0, "~", NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_file_convert_spaces = weechat_config_new_option (
xfer_config_file, ptr_section,
"convert_spaces", "boolean",
N_("convert spaces to underscores when sending files"),
NULL, 0, 0, "on", NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_file_auto_rename = weechat_config_new_option (
xfer_config_file, ptr_section,
"auto_rename", "boolean",
N_("rename incoming files if already exists (add '.1', '.2', ...)"),
NULL, 0, 0, "on", NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_file_auto_resume = weechat_config_new_option (
xfer_config_file, ptr_section,
"auto_resume", "boolean",
N_("automatically resume file transfer if connection with remote host "
"is lost"),
NULL, 0, 0, "on", NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_file_auto_accept_files = weechat_config_new_option (
xfer_config_file, ptr_section,
"auto_accept_files", "boolean",
N_("automatically accept incoming files (use carefully!)"),
NULL, 0, 0, "off", NULL, NULL, NULL, NULL, NULL, NULL);
xfer_config_file_auto_accept_chats = weechat_config_new_option (
xfer_config_file, ptr_section,
"auto_accept_chats", "boolean",
N_("automatically accept chat requests (use carefully!)"),
NULL, 0, 0, "off", NULL, NULL, NULL, NULL, NULL, NULL);
return 1;
}
/*
* xfer_config_read: read xfer configuration file
* return: 0 = successful
* -1 = configuration file file not found
* -2 = error in configuration file
*/
int
xfer_config_read ()
{
return weechat_config_read (xfer_config_file);
}
/*
* xfer_config_write: write xfer configuration file
* return: 0 if ok
* < 0 if error
*/
int
xfer_config_write ()
{
return weechat_config_write (xfer_config_file);
}

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 */

208
src/plugins/xfer/xfer-dcc.c Normal file
View File

@ -0,0 +1,208 @@
/*
* 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/>.
*/
/* xfer-dcc.c: file transfert via DCC protocol */
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <time.h>
#include <netdb.h>
#include <errno.h>
#include "../weechat-plugin.h"
#include "xfer.h"
#include "xfer-dcc.h"
#include "xfer-network.h"
/*
* xfer_dcc_send_file_child: child process for sending file with DCC protocol
*/
void
xfer_dcc_send_file_child (struct t_xfer *xfer)
{
int num_read, num_sent;
static char buffer[XFER_BLOCKSIZE_MAX];
uint32_t ack;
time_t last_sent, new_time;
last_sent = time (NULL);
while (1)
{
/* read DCC ACK (sent by receiver) */
if (xfer->pos > xfer->ack)
{
/* we should receive ACK for packets sent previously */
while (1)
{
num_read = recv (xfer->sock, (char *) &ack, 4, MSG_PEEK);
if ((num_read < 1) &&
((num_read != -1) || (errno != EAGAIN)))
{
xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
XFER_ERROR_SEND_BLOCK);
return;
}
if (num_read == 4)
{
recv (xfer->sock, (char *) &ack, 4, 0);
xfer->ack = ntohl (ack);
/* DCC send ok? */
if ((xfer->pos >= xfer->size)
&& (xfer->ack >= xfer->size))
{
xfer_network_write_pipe (xfer, XFER_STATUS_DONE,
XFER_NO_ERROR);
return;
}
}
else
break;
}
}
/* send a block to receiver */
if ((xfer->pos < xfer->size) &&
(xfer->fast_send || (xfer->pos <= xfer->ack)))
{
lseek (xfer->file, xfer->pos, SEEK_SET);
num_read = read (xfer->file, buffer, xfer->blocksize);
if (num_read < 1)
{
xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
XFER_ERROR_READ_LOCAL);
return;
}
num_sent = send (xfer->sock, buffer, num_read, 0);
if (num_sent < 0)
{
/* socket is temporarily not available (receiver can't receive
amount of data we sent ?!) */
if (errno == EAGAIN)
usleep (1000);
else
{
xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
XFER_ERROR_SEND_BLOCK);
return;
}
}
if (num_sent > 0)
{
xfer->pos += (unsigned long) num_sent;
new_time = time (NULL);
if (last_sent != new_time)
{
last_sent = new_time;
xfer_network_write_pipe (xfer, XFER_STATUS_ACTIVE,
XFER_NO_ERROR);
}
}
}
else
usleep (1000);
}
}
/*
* xfer_dcc_recv_file_child: child process for receiving file
*/
void
xfer_dcc_recv_file_child (struct t_xfer *xfer)
{
int num_read;
static char buffer[XFER_BLOCKSIZE_MAX];
uint32_t pos;
time_t last_sent, new_time;
/* first connect to sender (blocking) */
if (!weechat_network_connect_to (xfer->sock, xfer->address, xfer->port))
{
xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
XFER_ERROR_CONNECT_SENDER);
return;
}
/* connection is ok, change DCC status (inform parent process) */
xfer_network_write_pipe (xfer, XFER_STATUS_ACTIVE,
XFER_NO_ERROR);
last_sent = time (NULL);
while (1)
{
num_read = recv (xfer->sock, buffer, sizeof (buffer), 0);
if (num_read == -1)
{
/* socket is temporarily not available (sender is not fast ?!) */
if (errno == EAGAIN)
usleep (1000);
else
{
xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
XFER_ERROR_RECV_BLOCK);
return;
}
}
else
{
if (num_read == 0)
{
xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
XFER_ERROR_RECV_BLOCK);
return;
}
if (write (xfer->file, buffer, num_read) == -1)
{
xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
XFER_ERROR_WRITE_LOCAL);
return;
}
xfer->pos += (unsigned long) num_read;
pos = htonl (xfer->pos);
/* we don't check return code, not a problem if an ACK send failed */
send (xfer->sock, (char *) &pos, 4, 0);
/* file received ok? */
if (xfer->pos >= xfer->size)
{
xfer_network_write_pipe (xfer, XFER_STATUS_DONE,
XFER_NO_ERROR);
return;
}
new_time = time (NULL);
if (last_sent != new_time)
{
last_sent = new_time;
xfer_network_write_pipe (xfer, XFER_STATUS_ACTIVE,
XFER_NO_ERROR);
}
}
}
}

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 */

View File

@ -0,0 +1,209 @@
/*
* 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/>.
*/
/* xfer-file.c: file functions for xfer plugin */
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#include <sys/wait.h>
#include "../weechat-plugin.h"
#include "xfer.h"
#include "xfer-file.h"
#include "xfer-buffer.h"
#include "xfer-config.h"
/*
* xfer_file_resume: resume a download
* return 1 if ok, 0 if not resumable
*/
int
xfer_file_resume (struct t_xfer *xfer, char *filename)
{
struct stat st;
if (!weechat_config_boolean (xfer_config_file_auto_resume))
return 0;
if (access (filename, W_OK) == 0)
{
if (stat (filename, &st) != -1)
{
if ((unsigned long) st.st_size < xfer->size)
{
xfer->start_resume = (unsigned long) st.st_size;
xfer->pos = st.st_size;
xfer->last_check_pos = st.st_size;
return 1;
}
}
}
/* not resumable */
return 0;
}
/*
* xfer_file_find_filename: find local filename for a xfer
* if type if file/recv, add a suffix (like .1) if needed
* if download is resumable, set "start_resume" to good value
*/
void
xfer_file_find_filename (struct t_xfer *xfer)
{
char *weechat_home, *dir1, *dir2, *filename2, *dir_separator;
if (!XFER_IS_FILE(xfer->type))
return;
dir1 = weechat_string_replace (weechat_config_string (xfer_config_file_download_path),
"~",
getenv ("HOME"));
if (!dir1)
return;
weechat_home = weechat_info_get ("weechat_dir");
if (!weechat_home)
{
free (dir1);
return;
}
dir2 = weechat_string_replace (dir1, "%h", weechat_home);
if (!dir2)
{
free (dir1);
return;
}
xfer->local_filename = malloc (strlen (dir2) +
strlen (xfer->nick) +
strlen (xfer->filename) + 4);
if (!xfer->local_filename)
return;
strcpy (xfer->local_filename, dir2);
dir_separator = weechat_info_get("dir_separator");
if (dir_separator
&& (xfer->local_filename[strlen (xfer->local_filename) - 1] != dir_separator[0]))
strcat (xfer->local_filename, dir_separator);
strcat (xfer->local_filename, xfer->nick);
strcat (xfer->local_filename, ".");
strcat (xfer->local_filename, xfer->filename);
if (dir1)
free (dir1);
if (dir2 )
free (dir2);
/* file already exists? */
if (access (xfer->local_filename, F_OK) == 0)
{
if (xfer_file_resume (xfer, xfer->local_filename))
return;
/* if auto rename is not set, then abort xfer */
if (!xfer_config_file_auto_rename)
{
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
return;
}
filename2 = malloc (strlen (xfer->local_filename) + 16);
if (!filename2)
{
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
return;
}
xfer->filename_suffix = 0;
do
{
xfer->filename_suffix++;
sprintf (filename2, "%s.%d",
xfer->local_filename,
xfer->filename_suffix);
if (access (filename2, F_OK) == 0)
{
if (xfer_file_resume (xfer, filename2))
break;
}
else
break;
}
while (1);
free (xfer->local_filename);
xfer->local_filename = strdup (filename2);
free (filename2);
}
}
/*
* xfer_file_calculate_speed: calculate xfer speed (for files only)
*/
void
xfer_file_calculate_speed (struct t_xfer *xfer, int ended)
{
time_t local_time, elapsed;
unsigned long bytes_per_sec_total;
local_time = time (NULL);
if (ended || local_time > xfer->last_check_time)
{
if (ended)
{
/* calculate bytes per second (global) */
elapsed = local_time - xfer->start_transfer;
if (elapsed == 0)
elapsed = 1;
xfer->bytes_per_sec = (xfer->pos - xfer->start_resume) / elapsed;
xfer->eta = 0;
}
else
{
/* calculate ETA */
elapsed = local_time - xfer->start_transfer;
if (elapsed == 0)
elapsed = 1;
bytes_per_sec_total = (xfer->pos - xfer->start_resume) / elapsed;
if (bytes_per_sec_total == 0)
bytes_per_sec_total = 1;
xfer->eta = (xfer->size - xfer->pos) / bytes_per_sec_total;
/* calculate bytes per second (since last check time) */
elapsed = local_time - xfer->last_check_time;
if (elapsed == 0)
elapsed = 1;
xfer->bytes_per_sec = (xfer->pos - xfer->last_check_pos) / elapsed;
}
xfer->last_check_time = local_time;
xfer->last_check_pos = xfer->pos;
}
}

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 */

View File

@ -0,0 +1,371 @@
/*
* 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/>.
*/
/* xfer-network.c: network functions for xfer plugin */
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <signal.h>
#include <time.h>
#include "../weechat-plugin.h"
#include "xfer.h"
#include "xfer-network.h"
#include "xfer-buffer.h"
#include "xfer-dcc.h"
#include "xfer-file.h"
/*
* xfer_network_connect: connect to another host
*/
int
xfer_network_connect (struct t_xfer *xfer)
{
if (xfer->type == XFER_TYPE_CHAT_SEND)
xfer->status = XFER_STATUS_WAITING;
else
xfer->status = XFER_STATUS_CONNECTING;
if (xfer->sock < 0)
{
xfer->sock = socket (AF_INET, SOCK_STREAM, 0);
if (xfer->sock < 0)
return 0;
}
/* for chat or file sending, listen to socket for a connection */
if (XFER_IS_SEND(xfer->type))
{
if (fcntl (xfer->sock, F_SETFL, O_NONBLOCK) == -1)
return 0;
if (listen (xfer->sock, 1) == -1)
return 0;
if (fcntl (xfer->sock, F_SETFL, 0) == -1)
return 0;
}
/* for chat receiving, connect to listening host */
if (xfer->type == XFER_TYPE_CHAT_RECV)
{
if (fcntl (xfer->sock, F_SETFL, O_NONBLOCK) == -1)
return 0;
weechat_network_connect_to (xfer->sock, xfer->address, xfer->port);
}
/* for file receiving, connection is made in child process (blocking) */
return 1;
}
/*
* xfer_network_create_pipe: create pipe for communication with child process
* return 1 if ok, 0 if error
*/
int
xfer_network_create_pipe (struct t_xfer *xfer)
{
int child_pipe[2];
if (pipe (child_pipe) < 0)
{
weechat_printf (NULL,
_("%s%s: unable to create pipe"),
weechat_prefix ("error"), "xfer");
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
return 0;
}
xfer->child_read = child_pipe[0];
xfer->child_write = child_pipe[1];
return 1;
}
/*
* xfer_network_write_pipe: write data into pipe
*/
void
xfer_network_write_pipe (struct t_xfer *xfer, int status, int error)
{
char buffer[1 + 1 + 12 + 1]; /* status + error + pos + \0 */
snprintf (buffer, sizeof (buffer), "%c%c%012lu",
status + '0', error + '0', xfer->pos);
write (xfer->child_write, buffer, sizeof (buffer));
}
/*
* xfer_network_child_read_cb: read data from child via pipe
*/
int
xfer_network_child_read_cb (void *arg_xfer)
{
struct t_xfer *xfer;
char bufpipe[1 + 1 + 12 + 1];
int num_read;
char *error;
xfer = (struct t_xfer *)arg_xfer;
num_read = read (xfer->child_read, bufpipe, sizeof (bufpipe));
if (num_read > 0)
{
error = NULL;
xfer->pos = strtol (bufpipe + 2, &error, 10);
xfer->last_activity = time (NULL);
xfer_file_calculate_speed (xfer, 0);
/* read error code */
switch (bufpipe[1] - '0')
{
/* errors for sender */
case XFER_ERROR_READ_LOCAL:
weechat_printf (NULL,
_("%s%s: unable to read local file"),
weechat_prefix ("error"), "xfer");
break;
case XFER_ERROR_SEND_BLOCK:
weechat_printf (NULL,
_("%s%s: unable to send block to receiver"),
weechat_prefix ("error"), "xfer");
break;
case XFER_ERROR_READ_ACK:
weechat_printf (NULL,
_("%s%s: unable to read ACK from receiver"),
weechat_prefix ("error"), "xfer");
break;
/* errors for receiver */
case XFER_ERROR_CONNECT_SENDER:
weechat_printf (NULL,
_("%s%s: unable to connect to sender"),
weechat_prefix ("error"), "xfer");
break;
case XFER_ERROR_RECV_BLOCK:
weechat_printf (NULL,
_("%s%s: unable to receive block from sender"),
weechat_prefix ("error"), "xfer");
break;
case XFER_ERROR_WRITE_LOCAL:
weechat_printf (NULL,
_("%s%s: unable to write local file"),
weechat_prefix ("error"), "xfer");
break;
}
/* read new DCC status */
switch (bufpipe[0] - '0')
{
case XFER_STATUS_ACTIVE:
if (xfer->status == XFER_STATUS_CONNECTING)
{
/* connection was successful by child, init transfert times */
xfer->status = XFER_STATUS_ACTIVE;
xfer->start_transfer = time (NULL);
xfer->last_check_time = time (NULL);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
}
else
xfer_buffer_refresh (WEECHAT_HOTLIST_LOW);
break;
case XFER_STATUS_DONE:
xfer_close (xfer, XFER_STATUS_DONE);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
break;
case XFER_STATUS_FAILED:
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
break;
}
}
return WEECHAT_RC_OK;
}
/*
* xfer_network_send_file_fork: fork process for sending file
*/
void
xfer_network_send_file_fork (struct t_xfer *xfer)
{
pid_t pid;
if (!xfer_network_create_pipe (xfer))
return;
xfer->file = open (xfer->local_filename, O_RDONLY | O_NONBLOCK, 0644);
switch (pid = fork ())
{
/* fork failed */
case -1:
weechat_printf (NULL,
_("%s%s: unable to fork"),
weechat_prefix ("error"), "xfer");
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
return;
/* child process */
case 0:
setuid (getuid ());
switch (xfer->protocol)
{
case XFER_NO_PROTOCOL:
_exit (EXIT_SUCCESS);
break;
case XFER_PROTOCOL_DCC:
xfer_dcc_send_file_child (xfer);
break;
case XFER_NUM_PROTOCOLS:
break;
}
_exit (EXIT_SUCCESS);
}
/* parent process */
xfer->child_pid = pid;
xfer->hook_fd = weechat_hook_fd (xfer->child_read,
1, 0, 0,
xfer_network_child_read_cb,
xfer);
}
/*
* xfer_network_recv_file_fork: fork process for receiving file
*/
void
xfer_network_recv_file_fork (struct t_xfer *xfer)
{
pid_t pid;
if (!xfer_network_create_pipe (xfer))
return;
if (xfer->start_resume > 0)
xfer->file = open (xfer->local_filename,
O_APPEND | O_WRONLY | O_NONBLOCK);
else
xfer->file = open (xfer->local_filename,
O_CREAT | O_TRUNC | O_WRONLY | O_NONBLOCK,
0644);
switch (pid = fork ())
{
/* fork failed */
case -1:
weechat_printf (NULL,
_("%s%s: unable to fork"),
weechat_prefix ("error"), "xfer");
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
return;
/* child process */
case 0:
setuid (getuid ());
switch (xfer->protocol)
{
case XFER_NO_PROTOCOL:
_exit (EXIT_SUCCESS);
break;
case XFER_PROTOCOL_DCC:
xfer_dcc_recv_file_child (xfer);
break;
case XFER_NUM_PROTOCOLS:
break;
}
_exit (EXIT_SUCCESS);
}
/* parent process */
xfer->child_pid = pid;
xfer->hook_fd = weechat_hook_fd (xfer->child_read,
1, 0, 0,
xfer_network_child_read_cb,
xfer);
}
/*
* xfer_network_connect_init: connect to sender and init file or chat
*/
void
xfer_network_connect_init (struct t_xfer *xfer)
{
if (!xfer_network_connect (xfer))
{
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
}
else
{
/* for a file: launch child process */
if (XFER_IS_FILE(xfer->type))
{
xfer->status = XFER_STATUS_CONNECTING;
xfer_network_recv_file_fork (xfer);
}
else
{
/* for a chat => associate with buffer */
xfer->status = XFER_STATUS_ACTIVE;
// TODO: create buffer for xfer chat
}
}
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
}
/*
* xfer_network_child_kill: kill child process and close pipe
*/
void
xfer_network_child_kill (struct t_xfer *xfer)
{
/* kill process */
if (xfer->child_pid > 0)
{
kill (xfer->child_pid, SIGKILL);
waitpid (xfer->child_pid, NULL, 0);
xfer->child_pid = 0;
}
/* close pipe used with child */
if (xfer->child_read != -1)
{
close (xfer->child_read);
xfer->child_read = -1;
}
if (xfer->child_write != -1)
{
close (xfer->child_write);
xfer->child_write = -1;
}
}

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 */

1044
src/plugins/xfer/xfer.c Normal file

File diff suppressed because it is too large Load Diff

156
src/plugins/xfer/xfer.h Normal file
View File

@ -0,0 +1,156 @@
/*
* 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_H
#define __WEECHAT_XFER_H 1
#define weechat_plugin weechat_xfer_plugin
/* xfer types */
enum t_xfer_type
{
XFER_TYPE_FILE_RECV = 0,
XFER_TYPE_FILE_SEND,
XFER_TYPE_CHAT_RECV,
XFER_TYPE_CHAT_SEND,
/* number of xfer types */
XFER_NUM_TYPES,
};
/* xfer protocol (for file transfert) */
enum t_xfer_protocol
{
XFER_NO_PROTOCOL = 0,
XFER_PROTOCOL_DCC,
/* number of xfer protocols */
XFER_NUM_PROTOCOLS,
};
/* xfer status */
enum t_xfer_status
{
XFER_STATUS_WAITING = 0, /* waiting for host answer */
XFER_STATUS_CONNECTING, /* connecting to host */
XFER_STATUS_ACTIVE, /* sending/receiving data */
XFER_STATUS_DONE, /* transfer done */
XFER_STATUS_FAILED, /* transfer failed */
XFER_STATUS_ABORTED, /* transfer aborded by user */
/* number of xfer status */
XFER_NUM_STATUS,
};
/* xfer errors */
enum t_xfer_error
{
XFER_NO_ERROR = 0, /* no error to report, all ok! */
XFER_ERROR_READ_LOCAL, /* unable to read local file */
XFER_ERROR_SEND_BLOCK, /* unable to send block to receiver */
XFER_ERROR_READ_ACK, /* unable to read ACK from receiver */
XFER_ERROR_CONNECT_SENDER, /* unable to connect to sender */
XFER_ERROR_RECV_BLOCK, /* unable to recv block from sender */
XFER_ERROR_WRITE_LOCAL, /* unable to write to local file */
/* number of errors */
XFER_NUM_ERRORS,
};
/* xfer blocksize */
#define XFER_BLOCKSIZE_MIN 1024 /* min blocksize when sending file */
#define XFER_BLOCKSIZE_MAX 102400 /* max blocksize when sending file */
/* separator in filenames */
#ifdef _WIN32
#define DIR_SEPARATOR "\\"
#define DIR_SEPARATOR_CHAR '\\'
#else
#define DIR_SEPARATOR "/"
#define DIR_SEPARATOR_CHAR '/'
#endif
/* macros for type/status */
#define XFER_IS_FILE(type) ((type == XFER_TYPE_FILE_RECV) || \
(type == XFER_TYPE_FILE_SEND))
#define XFER_IS_CHAT(type) ((type == XFER_TYPE_CHAT_RECV) || \
(type == XFER_TYPE_CHAT_SEND))
#define XFER_IS_RECV(type) ((type == XFER_TYPE_FILE_RECV) || \
(type == XFER_TYPE_CHAT_RECV))
#define XFER_IS_SEND(type) ((type == XFER_TYPE_FILE_SEND) || \
(type == XFER_TYPE_CHAT_SEND))
#define XFER_HAS_ENDED(status) ((status == XFER_STATUS_DONE) || \
(status == XFER_STATUS_FAILED) || \
(status == XFER_STATUS_ABORTED))
struct t_xfer
{
/* data received by xfer to initiate a transfer */
char *plugin_id; /* plugin identifier */
enum t_xfer_type type; /* xfer type (send/recv file) */
enum t_xfer_protocol protocol; /* xfer protocol (for file transfer) */
char *nick; /* remote nick */
char *filename; /* filename */
unsigned long size; /* file size */
unsigned long address; /* local or remote IP address */
int port; /* remote port */
/* internal data */
enum t_xfer_status status; /* xfer status (waiting, sending,..) */
struct t_gui_buffer *buffer; /* buffer (for chat only) */
int fast_send; /* fast send file: does not wait ACK */
int blocksize; /* block size for sending file */
time_t start_time; /* time when xfer started */
time_t start_transfer; /* time when xfer transfer started */
int sock; /* socket for connection */
pid_t child_pid; /* pid of child process (send/recv) */
int child_read; /* to read into child pipe */
int child_write; /* to write into child pipe */
struct t_hook *hook_fd; /* hook for socket or child pipe */
char *unterminated_message; /* beginning of a message */
int file; /* local file (read or write) */
char *local_filename; /* local filename (with path) */
int filename_suffix; /* suffix (like .1) if renaming file */
unsigned long pos; /* number of bytes received/sent */
unsigned long ack; /* number of bytes received OK */
unsigned long start_resume; /* start of resume (in bytes) */
time_t last_check_time; /* last time we checked bytes snt/rcv*/
unsigned long last_check_pos; /* bytes sent/recv at last check */
time_t last_activity; /* time of last byte received/sent */
unsigned long bytes_per_sec; /* bytes per second */
unsigned long eta; /* estimated time of arrival */
struct t_xfer *prev_xfer; /* link to previous xfer */
struct t_xfer *next_xfer; /* link to next xfer */
};
extern struct t_weechat_plugin *weechat_xfer_plugin;
extern char *xfer_type_string[];
extern char *xfer_protocol_string[];
extern char *xfer_status_string[];
extern struct t_xfer *xfer_list, *last_xfer;
extern int xfer_debug;
extern void xfer_close (struct t_xfer *xfer, enum t_xfer_status status);
extern struct t_xfer *xfer_alloc ();
#endif /* xfer.h */