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

Compare commits

...

57 Commits

Author SHA1 Message Date
Sebastien Helleu a7d037d384 Version 0.3.0-rc3 2009-08-11 15:58:18 +02:00
Sebastien Helleu 4b0b0869a4 Add file UPGRADE_0.3, update NEWS 2009-08-10 18:11:02 +02:00
Sebastien Helleu 17a66da648 Update polish translations (thanks to soltys) 2009-08-09 22:55:47 +02:00
Sebastien Helleu 1691b3060c Fix typo: explicitely -> explicitly 2009-08-09 12:19:47 +02:00
Sebastien Helleu 14966acaf2 Remove obsolete option weechat.color.input_nick 2009-08-09 12:16:30 +02:00
Sebastien Helleu 508398f7c5 Add missing files for cmake in packages built by autotools 2009-08-09 10:01:54 +02:00
Sebastien Helleu 36b870f32a Add missing file po/CMakeLists.txt in packages built by autotools 2009-08-09 09:20:40 +02:00
Sebastien Helleu 9508953b8e Fix typo: mispelled -> misspelled 2009-08-06 21:35:12 +02:00
Sebastien Helleu 859f6db87b Fix bug when comparing chars and ignoring case (with some locales) (bug #27190)
There was a problem with some locales like turkish, where upper "i" is "İ".
All IRC commands with "I" inside (JOIN, PRIVMSG, ..) failed with turkish
locale.
2009-08-06 15:08:11 +02:00
Sebastien Helleu acef147775 Fix progress bar display for large xfer/dcc files (more than 2 Gb) 2009-08-05 13:10:09 +02:00
Sebastien Helleu 7d0e5edc9a Fix typo in french FAQ 2009-08-03 16:21:37 +02:00
Sebastien Helleu 9038aef953 Fix charset decoding bug for some IRC messages where both nick and channel are given after command name 2009-08-01 17:46:24 +02:00
Sebastien Helleu 7d25b62665 Fix hotlist bug after /buffer unmerge (bug #27133) 2009-07-29 10:38:45 +02:00
Sebastien Helleu ffdba5b248 Remove check of Tcl_CreateNamespace in cmake build (not used any more) (bug #27119) 2009-07-28 14:16:53 +02:00
Sebastien Helleu b7b4a7093e Set level "message" for IRC notices with channel target 2009-07-28 09:59:54 +02:00
Sebastien Helleu 7e94691333 Allow no argument for command /join when /part was issued on current channel 2009-07-27 13:57:43 +02:00
Sebastien Helleu 3562143b51 Add missing include of stdarg.h 2009-07-24 16:38:04 +02:00
Sebastien Helleu 5563924363 Fix compilation on OpenBSD: rename variables stdout/stderr (patch #6874 from zepard) 2009-07-24 15:14:44 +02:00
Sebastien Helleu 5139fdcf2a Add new option weechat.look.search_text_not_found_alert 2009-07-22 18:07:22 +02:00
Sebastien Helleu 232804f293 Fix and improve replacement of IRC password by stars (patch #6872 from zepard) 2009-07-20 10:18:33 +02:00
Sebastien Helleu 57064f4b1c Allow cursor to be displayed in a root bar 2009-07-14 08:20:40 +02:00
Sebastien Helleu 9839d030a1 Add info about script commands when trying to load a script with /plugin 2009-07-10 23:44:21 +02:00
Sebastien Helleu c9e6b1bb83 Add note about special chars that must be escaped in /help filter 2009-07-09 22:27:39 +02:00
Sebastien Helleu a854e28c3d Remove obsolete option weechat.color.nicklist_separator 2009-07-09 21:25:03 +02:00
Sebastien Helleu 87e9c6476b Open channel/pv near server when no channel/pv is opened (with option irc.look.open_*_near_server) 2009-07-06 20:03:19 +02:00
Sebastien Helleu 00ca4f0d36 Complete command and arguments even if command line starts with double '/' 2009-07-06 10:06:47 +02:00
Sebastien Helleu 05deb6356a Add optional nick in arguments for infolist "irc_nick" (format: "server,#channel,nick") 2009-07-05 11:42:53 +02:00
Sebastien Helleu 12a5b5f82b Add tag "away_info" for lines with info about away in irc plugin 2009-07-04 19:17:18 +02:00
Sebastien Helleu c7ec4233a0 Add note about merged server buffers in quick start guide 2009-07-04 08:54:40 +02:00
Sebastien Helleu 9000bac5b5 Add note about script weeget.py in quick start guide 2009-07-03 18:19:39 +02:00
Sebastien Helleu be4c009dcd Version 0.3.0-rc2 2009-07-03 15:45:25 +02:00
Sebastien Helleu d7f3e59c3e Fix bug when moving group of merged buffers to number 1 2009-07-03 15:30:49 +02:00
Sebastien Helleu 49aa853b00 When IRC nick change is received, do not rename private buffer if it already exists with new nick 2009-06-29 12:31:50 +02:00
Sebastien Helleu 8b45c9b8f0 Fix typos in docs 2009-06-28 20:47:13 +02:00
Sebastien Helleu 2f7a5a4147 Rename function string_explode to string_split 2009-06-28 19:49:32 +02:00
Sebastien Helleu 4a89b4ae59 Add french translation of Scripting Guide 2009-06-28 12:00:16 +02:00
Sebastien Helleu 26919fe58b Add french translation of Plugin API Reference 2009-06-28 00:47:37 +02:00
Sebastien Helleu 23f111329e Strip hostnames in IRC message 353 when uhnames protocol is enabled 2009-06-27 15:07:31 +02:00
Sebastien Helleu e06609c7cd Change default order of items in input bar: move input_paste before input_text 2009-06-27 08:55:40 +02:00
Sebastien Helleu 9fad3f128e Add options irc.look.open_channel/pv_near_server 2009-06-25 10:45:30 +02:00
Sebastien Helleu 42cd890bfb Consider private message as highlight when comparing message level to buffer notify value 2009-06-24 15:35:24 +02:00
Sebastien Helleu 4d60c48f5f Switch to irc raw buffer if it is aleady opened, with /server raw or alt-j + alt-r 2009-06-24 15:04:43 +02:00
Sebastien Helleu 89b7a826c5 Fix display of description when it is NULL (with /help option) 2009-06-23 18:40:49 +02:00
Sebastien Helleu 1b47fdcc4e Add modifier "bar_condition_xxx", used to display/hide bars on some windows with custom condition 2009-06-23 17:15:45 +02:00
Sebastien Helleu cdc5ac77c1 Fix typos in Plugin API reference 2009-06-23 17:03:34 +02:00
Sebastien Helleu 8d87086917 Add new option irc.color.item_channel_modes 2009-06-23 10:08:27 +02:00
Sebastien Helleu 16e741f063 Fix bug with pointer to last read line in merged buffers (can lead to crash) 2009-06-22 11:46:29 +02:00
Sebastien Helleu 9b7ac77a0d Disable layout saving by default 2009-06-21 22:30:50 +02:00
Sebastien Helleu fdcbc8e585 Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/weechat 2009-06-21 14:10:57 +02:00
Sebastien Helleu 76b883f05f Fix bug after /upgrade on buffers with free content (bug #26020) 2009-06-21 14:10:41 +02:00
Sebastien Helleu 679e477abb Fix some memory leaks in command hook (completion templates), buffer closing, partial completion 2009-06-21 12:45:50 +02:00
Sebastien Helleu b698a9ce4a Move partial completion structure to completion structure (it is now specific to buffer) (bug #25556) 2009-06-21 12:19:57 +02:00
Sebastien Helleu d4b572c753 Fix scroll Y in bars (bug #26008) 2009-06-21 11:02:57 +02:00
Sebastien Helleu 271d6a131f Fix problems with /set of some bar options 2009-06-21 00:24:04 +02:00
Sebastien Helleu 911e29cf65 Add missing refresh of bar when changing size with command /set 2009-06-20 23:13:21 +02:00
Sebastien Helleu 95c03734cc Fix minor display bug with read marker (line or dotted line)
Bug is happening when read marker is line or dotted line and that last char
of line is an horizontal line. When new line is added in buffer after read
marker, then last char of read marker line is repeated on next line.
2009-06-20 13:12:03 +02:00
Sebastien Helleu f5b2b2291f Fix command to create irc server in quickstart guide 2009-06-18 22:06:05 +02:00
95 changed files with 11010 additions and 2038 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ ENDIF(PREFIX)
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "3")
SET(VERSION_PATCH "0-rc1")
SET(VERSION_PATCH "0-rc3")
SET(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
SET(PKG_STRING "${PROJECT_NAME} ${VERSION}")
SET(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME})
+4 -1
View File
@@ -38,9 +38,12 @@ EXTRA_DIST = CMakeLists.txt \
cmake/FindSourcehighlight.cmake \
cmake/FindTCL.cmake \
cmake/makedist.sh.in \
po/CMakeLists.txt \
po/srcfiles.cmake \
weechat.spec \
weechat_icon_32.png \
weechat.pc.in
weechat.pc.in \
UPGRADE_0.3
ACLOCAL_AMFLAGS = -I m4
+6
View File
@@ -1,6 +1,12 @@
WeeChat News
============
FlashCode, 2009-08-10::
WeeChat 0.3.0 will bring major changes, especially for configuration files
and plugin API.
+
For more information about this version, please read file UPGRADE_0.3.
FlashCode, 2009-06-13::
WeeChat 0.2.6.3 released.
+
+83
View File
@@ -0,0 +1,83 @@
WeeChat Upgrade to 0.3.x
========================
FlashCode <flashcode@flashtux.org>
v0.3.0, 2009-08-09
This document lists major changes introduced in version 0.3.0 and not compatible
with versions 0.2.x.
Upgrade to version 0.3.x
------------------------
It is *NOT POSSIBLE* to use command `/upgrade` from a version 0.2.x to 0.3.x.
You have to quit your old WeeChat, then run new version.
Of course, command `/upgrade` is working fine once you'll be with 0.3.x to
upgrade to another 0.3.x (unless this command is broken again, please look
at release notes (file 'NEWS') for version you're currently installing).
Configuration files
-------------------
Changes with previous versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New configuration files (`*.conf`) are not compatible with old files (`*.rc`).
Name of options is similar to old versions, but there is now one configuration
file by plugin, and one file for WeeChat core.
There is *no automatic conversion* for your old options to new configuration files,
so you'll have to setup again your IRC servers and all other options.
In WeeChat, option names are now with format: `plugin.section.option` (for
WeeChat core, `plugin` is `weechat`).
Examples:
* WeeChat options: `weechat.xxx.yyy`
* IRC options: `irc.xxx.yyy`
You should read quickstart guide to be familiar with basic commands and syntax
(some commands like `/server` have changed): http://weechat.flashtux.org/doc.php
List of configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Old configuration files:
** weechat.rc
** plugins.rc
* New configuration files are now (with default plugins):
** weechat.conf
** alias.conf
** aspell.conf
** charset.conf
** irc.conf
** jabber.conf
** logger.conf
** plugins.conf
** relay.conf
** xfer.conf
Plugin API
----------
Plugin API has been rewritten and is not compatible with previous versions.
Accordingly, scripts and plugins must have been designed for version 0.3.x to
be loaded into WeeChat.
There is no migration script today to convert old script to new API.
Therefore, if you plan to use old script, you'll have to wait for new version
or you can convert script yourself and send us new version ;)
You can download scripts for new API on plugins page:
http://weechat.flashtux.org/plugins.php
More information about new API is available on wiki:
http://wiki.flashtux.org/wiki/WeeChat_0.3.0
and http://wiki.flashtux.org/wiki/WeeChat_0.3.0_API
+2 -2
View File
@@ -18,10 +18,10 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.56)
AC_INIT(WeeChat, 0.3.0-rc1, flashcode@flashtux.org)
AC_INIT(WeeChat, 0.3.0-rc3, flashcode@flashtux.org)
AC_CONFIG_SRCDIR([src/core/weechat.c])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([weechat], [0.3.0-rc1])
AM_INIT_AUTOMAKE([weechat], [0.3.0-rc3])
# Checks for programs
AC_PROG_CC
+3 -3
View File
@@ -17,7 +17,7 @@
# user's guide
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt
${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt
@@ -29,7 +29,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html DESTINATION share
# plugin API reference
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt
${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt
@@ -41,7 +41,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html DESTINATION
# scripting guide
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt
COMMENT "Building weechat_scripting.en.html"
+3 -3
View File
@@ -35,15 +35,15 @@ all-local: weechat_user.en.html \
# user's guide
weechat_user.en.html: weechat_user.en.txt $(wildcard autogen/user/*.txt)
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_user.en.html weechat_user.en.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_user.en.html weechat_user.en.txt
# plugin API reference
weechat_plugin_api.en.html: weechat_plugin_api.en.txt $(wildcard autogen/plugin_api/*.txt)
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_plugin_api.en.html weechat_plugin_api.en.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_plugin_api.en.html weechat_plugin_api.en.txt
# scripting guide
weechat_scripting.en.html: weechat_scripting.en.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_scripting.en.html weechat_scripting.en.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_scripting.en.html weechat_scripting.en.txt
# FAQ
weechat_faq.en.html: weechat_faq.en.txt
+2 -2
View File
@@ -4,7 +4,7 @@
** values: any string (default value: "ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic")
* *aspell.check.default_dict*
** description: default dictionary (or comma separated list of dictionaries) to use when buffer has no dictionary defined (leave blank to disable aspell on buffers for which you didn't explicitely enabled it)
** description: default dictionary (or comma separated list of dictionaries) to use when buffer has no dictionary defined (leave blank to disable aspell on buffers for which you didn't explicitly enabled it)
** type: string
** values: any string (default value: "")
@@ -24,7 +24,7 @@
** values: 0 .. 2147483647 (default value: 2)
* *aspell.look.color*
** description: color used for mispelled words
** description: color used for misspelled words
** type: color
** values: a color name (default value: lightred)
+1 -1
View File
@@ -170,7 +170,7 @@
nickname: nickname
........................................
&bull; *`/join`* `channel[,channel] [key[,key]]`::
&bull; *`/join`* `[channel[,channel] [key[,key]]]`::
........................................
join a channel
+12 -2
View File
@@ -8,6 +8,11 @@
** type: color
** values: a color name (default value: yellow)
* *irc.color.item_channel_modes*
** description: color for channel modes, near channel name
** type: color
** values: a color name (default value: default)
* *irc.color.message_join*
** description: color for text in join messages
** type: color
@@ -83,8 +88,13 @@
** type: integer
** values: auto, never, always (default value: auto)
* *irc.look.open_near_server*
** description: open new channels/privates near server
* *irc.look.open_channel_near_server*
** description: open new channels near server
** type: boolean
** values: on, off (default value: off)
* *irc.look.open_pv_near_server*
** description: open new privates near server
** type: boolean
** values: on, off (default value: off)
+1 -1
View File
@@ -120,7 +120,7 @@
-all: delete all filters
plugin.buffer: plugin and buffer where filter is active ("*" for all buffers)
tags: comma separated list of tags, for example: "irc_join,irc_part,irc_quit"
regex: regular expression to search in line (use \t to separate prefix from message)
regex: regular expression to search in line (use \t to separate prefix from message, special chars like '|' must be escaped: '\|')
The default key alt+'=' toggles filtering on/off.
+6 -11
View File
@@ -193,11 +193,6 @@
** type: color
** values: a color name (default value: lightgreen)
* *weechat.color.input_nick*
** description: text color for nick name in input line
** type: color
** values: a color name (default value: lightcyan)
* *weechat.color.input_text_not_found*
** description: text color for unsucessful text search in input line
** type: color
@@ -243,11 +238,6 @@
** type: color
** values: a color name (default value: brown)
* *weechat.color.nicklist_separator*
** description: text color for nicklist separator
** type: color
** values: a color name (default value: blue)
* *weechat.color.separator*
** description: background color for window separators (when split)
** type: color
@@ -516,7 +506,7 @@
* *weechat.look.save_layout_on_exit*
** description: save layout on exit (buffers, windows, or both)
** type: integer
** values: none, buffers, windows, all (default value: all)
** values: none, buffers, windows, all (default value: none)
* *weechat.look.scroll_amount*
** description: how many lines to scroll by with scroll_up and scroll_down
@@ -528,6 +518,11 @@
** type: integer
** values: 1 .. 100 (default value: 100)
* *weechat.look.search_text_not_found_alert*
** description: alert user when text sought is not found in buffer
** type: boolean
** values: on, off (default value: on)
* *weechat.look.set_title*
** description: set title for window (terminal for Curses GUI) with name and version
** type: boolean
File diff suppressed because it is too large Load Diff
+24 -10
View File
@@ -4,7 +4,7 @@ FlashCode <flashcode@flashtux.org>
[[start]]
Start weechat
Start WeeChat
-------------
A recommended terminal emulator for X (but not mandatory) is rxvt-unicode
@@ -29,7 +29,7 @@ WeeChat immediately uses the new value (you *never* need to restart WeeChat
after changes to configuration).
You can use `/set` option with partial name and wildcard "*" at the beginning
or end to display all options containg letters.
or end to display all options containing letters.
For example:
`/set`::
@@ -71,7 +71,7 @@ Create an IRC server
You can add an IRC server with `/server` command, for example:
/server add oftc irc.oftc.org 6667
/server add oftc irc.oftc.org/6667
As usual, help is available if you're lost: `/help server`
@@ -80,7 +80,7 @@ As usual, help is available if you're lost: `/help server`
Set custom IRC server options
-----------------------------
WeeChat uses default values for all servers ("fallbacks"), if you
WeeChat uses default values for all servers ("fall backs"), if you
don't specify a specific value for a server option.
These default options are "irc.server_default.*".
@@ -106,7 +106,7 @@ with nickserv:
/set irc.server.oftc.command "/msg nickserv identify xxxxxx"
Note: many commmands can be separated by ';' (semi-colon)
Note: many commands can be separated by ';' (semi-colon)
To auto-join some channels when connecting to server:
@@ -129,9 +129,18 @@ Connect to IRC server and auto-join channels
/connect oftc
Note: this command can be used to create and connect to a new server
without using `/server` command (should I repeat you can see help for
this command with `/help connect` ? ;)
[NOTE]
This command can be used to create and connect to a new server without using
`/server` command (should I repeat you can see help for this command with
`/help connect` ?).
By default, server buffers are merged with WeeChat 'core' buffer. To switch
between 'core' buffer and server buffers, you can use ctrl-X.
It is possible to disable auto merge of server buffers to have independent
server buffers:
/set irc.look.server_buffer independent
[[join_part_irc_channels]]
@@ -210,7 +219,8 @@ Plugins/scripts
On some distros like Debian, plugins are available via a separate package
(like weechat-plugins).
Plugins are automatically loaded when found.
Plugins are automatically loaded when found (please look at the WeeChat
documentation to load/unload plugins or scripts).
Some plugins let you use scripts in WeeChat (in many languages like Perl,
Python, Ruby, Lua and Tcl). These plugins must be loaded with the `/plugin`
@@ -219,7 +229,11 @@ command and they provide commands like `/perl`, used to load scripts.
Many external plugins/scripts (from contributors) are available for
WeeChat: http://weechat.flashtux.org/plugins.php
Please look at the WeeChat documentation to load/unload plugins or scripts.
Easiest way to install scripts is to use script 'weeget.py':
. download and copy 'weeget.py' to ~/.weechat/python/autoload/
. load script: `/python autoload`
. scripts list: `/weeget list` (for help: `/help weeget`)
[[more_doc]]
+6 -6
View File
@@ -41,7 +41,7 @@ Some things are specific to languages:
keyword)
** functions are called with `weechat.xxx(arg1, arg2, ...)`
* ruby:
** you have to define 'weechat_init' and call register inside
** you have to define 'weechat_init' and call 'register' inside
** functions are called with `Weechat.xxx(arg1, arg2, ...)`
* tcl:
** functions are called with `weechat::xxx arg1 arg2 ...`
@@ -53,7 +53,7 @@ Register
All WeeChat scripts must "register" themselves to WeeChat, and this must be
first WeeChat function called in script.
Prorotype:
Prototype:
[source,python]
----------------------------------------
@@ -75,7 +75,7 @@ Arguments:
Script example
~~~~~~~~~~~~~~
Exemple of script, for each language:
Example of script, for each language:
* perl:
@@ -396,7 +396,7 @@ For example, to print data on core buffer (WeeChat main buffer), you can do:
[source,python]
----------------------------------------
weechat.prnt("", "hey!")
weechat.prnt("", "hi!")
----------------------------------------
[WARNING]
@@ -417,10 +417,10 @@ For example:
[source,python]
----------------------------------------
weechat.hook_timer(1000, 0, 1, "my_timer_cb", "my data!")
weechat.hook_timer(1000, 0, 1, "my_timer_cb", "my data")
def my_timer_cb(data, remaining_calls):
# this will display: "my data!"
# this will display: "my data"
weechat.prnt("", data)
return weechat.WEECHAT_RC_OK
----------------------------------------
+7 -7
View File
@@ -44,7 +44,7 @@ Pre-requisites
In order to install WeeChat, you need:
* a running GNU/Linux system (with compiler tools for source
package), or compatible OS (see above)
package), or compatible OS
* 'root' privileges (to install WeeChat in a system directory)
* ncurses library
@@ -150,7 +150,7 @@ Running WeeChat
Command line arguments:
-a, --no-connect::
Disable auto-connect to servers at startup
Disable auto-connect to servers when WeeChat is starting
-d, --dir 'path'::
Set path as home for WeeChat (used for configuration files, logs, user
@@ -733,7 +733,7 @@ include::autogen/user/weechat_commands.txt[]
Plugins
-------
To learn more about plugin or script development (thru API), please read
To learn more about plugin or script development (through API), please read
'WeeChat Plugin API Reference' or 'WeeChat Scripting Guide'.
[[plugins_in_weechat]]
@@ -826,8 +826,8 @@ There is default charset for decode/encode, and specific charsets for buffers
This plugin is optional, but recommended: if it's not loaded, WeeChat
can only read/write UTF-8 data.
Charset plugin should be autoloaded by WeeChat at startup. To be sure plugin
is loaded, try:
Charset plugin should be autoloaded by WeeChat. To be sure plugin is loaded,
try:
----------------------------------------
/charset
@@ -917,8 +917,8 @@ Fifo plugin
You can remote control WeeChat, by sending commands or text to a FIFO pipe (if
option "plugins.var.fifo.fifo" is enabled, it is by default).
The FIFO pipe is located in '~/.weechat/' and is called 'weechat_fifo_xxxxx'
(where 'xxxxx' is the process ID (PID) of running WeeChat).
The FIFO pipe is located in '~/.weechat/' and is called 'weechat_fifo_xxxx'
(where 'xxxx' is the process ID (PID) of running WeeChat).
Syntax for the FIFO pipe commands/text is one of following:
+23 -23
View File
@@ -17,7 +17,7 @@
# user's guide
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt
${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt
@@ -27,32 +27,32 @@ ADD_CUSTOM_TARGET(doc-user-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_us
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html DESTINATION share/doc/${PROJECT_NAME})
# plugin API reference
#ADD_CUSTOM_COMMAND(
# OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html
# COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt
# DEPENDS
# ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt
# ${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt
# COMMENT "Building weechat_plugin_api.fr.html"
#)
#ADD_CUSTOM_TARGET(doc-plugin-api-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html)
#INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html DESTINATION share/doc/${PROJECT_NAME})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt
${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt
COMMENT "Building weechat_plugin_api.fr.html"
)
ADD_CUSTOM_TARGET(doc-plugin-api-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html DESTINATION share/doc/${PROJECT_NAME})
# scripting guide
#ADD_CUSTOM_COMMAND(
# OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html
# COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt
# DEPENDS
# ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt
# COMMENT "Building weechat_scripting.fr.html"
#)
#ADD_CUSTOM_TARGET(doc-scripting-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html)
#INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html DESTINATION share/doc/${PROJECT_NAME})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt
COMMENT "Building weechat_scripting.fr.html"
)
ADD_CUSTOM_TARGET(doc-scripting-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html DESTINATION share/doc/${PROJECT_NAME})
# FAQ
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt
COMMENT "Building weechat_faq.fr.html"
@@ -63,7 +63,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html DESTINATION share/
# quickstart
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt
COMMENT "Building weechat_quickstart.fr.html"
@@ -74,7 +74,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html DESTINATION
# tester's guide
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt
COMMENT "Building weechat_tester.fr.html"
+10 -6
View File
@@ -18,6 +18,8 @@ docdir = $(datadir)/doc/$(PACKAGE)
EXTRA_DIST = CMakeLists.txt \
weechat_user.fr.txt \
weechat_plugin_api.fr.txt \
weechat_scripting.fr.txt \
weechat_faq.fr.txt \
weechat_quickstart.fr.txt \
weechat_tester.fr.txt \
@@ -25,33 +27,35 @@ EXTRA_DIST = CMakeLists.txt \
$(wildcard autogen/plugin_api/*.txt)
all-local: weechat_user.fr.html \
weechat_plugin_api.fr.html \
weechat_scripting.fr.html \
weechat_faq.fr.html \
weechat_quickstart.fr.html \
weechat_tester.fr.html
# user's guide
weechat_user.fr.html: weechat_user.fr.txt $(wildcard autogen/user/*.txt)
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_user.fr.html weechat_user.fr.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_user.fr.html weechat_user.fr.txt
# plugin API reference
weechat_plugin_api.fr.html: weechat_plugin_api.fr.txt $(wildcard autogen/plugin_api/*.txt)
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_plugin_api.fr.html weechat_plugin_api.fr.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_plugin_api.fr.html weechat_plugin_api.fr.txt
# scripting guide
weechat_scripting.fr.html: weechat_scripting.fr.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_scripting.fr.html weechat_scripting.fr.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_scripting.fr.html weechat_scripting.fr.txt
# FAQ
weechat_faq.fr.html: weechat_faq.fr.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_faq.fr.html weechat_faq.fr.txt
$(ASCIIDOC) -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_faq.fr.html weechat_faq.fr.txt
# quickstart
weechat_quickstart.fr.html: weechat_quickstart.fr.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_quickstart.fr.html weechat_quickstart.fr.txt
$(ASCIIDOC) -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_quickstart.fr.html weechat_quickstart.fr.txt
# tester's guide
weechat_tester.fr.html: weechat_tester.fr.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_tester.fr.html weechat_tester.fr.txt
$(ASCIIDOC) -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_tester.fr.html weechat_tester.fr.txt
# install docs
+1 -1
View File
@@ -170,7 +170,7 @@
pseudo: pseudo
........................................
&bull; *`/join`* `canal[,canal] [clé[,clé]]`::
&bull; *`/join`* `[canal[,canal] [clé[,clé]]]`::
........................................
joindre un canal
+12 -2
View File
@@ -8,6 +8,11 @@
** type: couleur
** valeurs: un nom de couleur (valeur par défaut: yellow)
* *irc.color.item_channel_modes*
** description: couleur pour les modes du canal, à côté du nom du canal
** type: couleur
** valeurs: un nom de couleur (valeur par défaut: default)
* *irc.color.message_join*
** description: couleur pour le texte dans les messages join
** type: couleur
@@ -83,8 +88,13 @@
** type: entier
** valeurs: auto, never, always (valeur par défaut: auto)
* *irc.look.open_near_server*
** description: ouvrir les nouveaux canaux/privés près du serveur
* *irc.look.open_channel_near_server*
** description: ouvrir les nouveaux canaux près du serveur
** type: booléen
** valeurs: on, off (valeur par défaut: off)
* *irc.look.open_pv_near_server*
** description: ouvrir les nouveaux privés près du serveur
** type: booléen
** valeurs: on, off (valeur par défaut: off)
+1 -1
View File
@@ -120,7 +120,7 @@
-all: supprime tous les filtres
extension.tampon: extension et tampon où le filtre est actif ("*" pour tous les tampons)
tags: liste de tags, séparés par des virgules, par exemple: "irc_join,irc_part,irc_quit"
regex: expressoin régulière à rechercher dans la ligne (utiliser \t pour séparer le préfixe du message)
regex: expressoin régulière à rechercher dans la ligne (utiliser \t pour séparer le préfixe du message, les caractères spéciaux comme '|' doivent être échappés: '\|')
La touche par défaut alt+'=' active/désactive le filtrage.
+7 -12
View File
@@ -193,11 +193,6 @@
** type: couleur
** valeurs: un nom de couleur (valeur par défaut: lightgreen)
* *weechat.color.input_nick*
** description: couleur du texte pour le pseudo dans la ligne de saisie
** type: couleur
** valeurs: un nom de couleur (valeur par défaut: lightcyan)
* *weechat.color.input_text_not_found*
** description: couleur du texte pour la recherche infructueuse de texte dans la ligne de saisie
** type: couleur
@@ -243,11 +238,6 @@
** type: couleur
** valeurs: un nom de couleur (valeur par défaut: brown)
* *weechat.color.nicklist_separator*
** description: couleur du texte pour le séparateur de la liste des pseudos
** type: couleur
** valeurs: un nom de couleur (valeur par défaut: blue)
* *weechat.color.separator*
** description: couleur du fond pour les séparateurs de fenêtres (quand divisé)
** type: couleur
@@ -319,7 +309,7 @@
** valeurs: toute chaîne (valeur par défaut: "[]-^")
* *weechat.completion.partial_completion_alert*
** description: alterte de l'utilisateur lorsqu'une complétion partielle survient
** description: alterte l'utilisateur lorsqu'une complétion partielle survient
** type: booléen
** valeurs: on, off (valeur par défaut: on)
@@ -516,7 +506,7 @@
* *weechat.look.save_layout_on_exit*
** description: sauve la disposition en quittant (tampons, fenêtres, ou les deux)
** type: entier
** valeurs: none, buffers, windows, all (valeur par défaut: all)
** valeurs: none, buffers, windows, all (valeur par défaut: none)
* *weechat.look.scroll_amount*
** description: nombre de lignes pour le défilement avec scroll_up et scroll_down
@@ -528,6 +518,11 @@
** type: entier
** valeurs: 1 .. 100 (valeur par défaut: 100)
* *weechat.look.search_text_not_found_alert*
** description: alterte l'utilisateur lorsque le texte cherché n'est pas trouvé dans le tampon
** type: booléen
** valeurs: on, off (valeur par défaut: on)
* *weechat.look.set_title*
** description: définit le titre de la fenêtre (terminal pour l'interface Curses) avec le nom et la version
** type: booléen
+1 -1
View File
@@ -120,7 +120,7 @@ Pour les versions > = 0.2.3 :
** vérifiez que votre terminal est compatible UTF-8
(un terminal conseillé pour l'UTF-8 est rxvt-unicode)
** si vous utilisez screen, vérifiez qu'il est lancé en mode UTF-8
("`defutf8 on`" dans ~/.screnrc ou `screen -U` pour lancer screen)
("`defutf8 on`" dans ~/.screenrc ou `screen -U` pour lancer screen)
[NOTE]
La locale UTF-8 est recommandée pour WeeChat. Si vous utilisez ISO ou une autre
File diff suppressed because it is too large Load Diff
+24 -8
View File
@@ -4,7 +4,7 @@ FlashCode <flashcode@flashtux.org>
[[start]]
Démarrer weechat
Démarrer WeeChat
----------------
Un émulateur de terminal recommandé pour X (mais pas obligatoire) est
@@ -75,7 +75,7 @@ Créer un serveur IRC
Vous pouvez ajouter un serveur IRC par la commande `/server`, par exemple :
/server add oftc irc.oftc.org 6667
/server add oftc irc.oftc.org/6667
Comme d'habitude, de l'aide est disponible si vous êtes perdus :
`/help server`
@@ -136,9 +136,19 @@ Se connecter au serveur IRC et rejoindre les canaux
/connect oftc
Note : cette commande peut aussi être utilisée pour créer et se connecter
au serveur sans utiliser la commande `/server` (devrais-je répéter que vous
pouvez voir l'aide pour cette commande avec `/help connect` ? ;)
[NOTE]
Cette commande peut aussi être utilisée pour créer et se connecter au serveur
sans utiliser la commande `/server` (devrais-je répéter que vous pouvez voir
l'aide pour cette commande avec `/help connect` ?).
Par défaut, les tampons des serveurs sont mélangés avec le tampon 'core'
WeeChat. Pour basculer entre le tampon 'core' et les tampons des serveurs, il
faut utiliser la touche ctrl-X.
Il est possible de désactiver le mélange des tampons serveurs pour avoir un
tampon distinct par serveur :
/set irc.look.server_buffer independent
[[join_part_irc_channels]]
@@ -220,7 +230,9 @@ Extensions/scripts
Sur certaines distributions comme Debian, les extensions sont disponibles
via un paquet séparé (par exemple weechat-plugins).
Les extensions sont automatiquement chargées lorsqu'elles sont trouvées.
Les extensions sont automatiquement chargées lorsqu'elles sont trouvées
(merci de regarder la documentation WeeChat pour charger/décharger des
extensions ou des scripts).
Des extensions permettent d'utiliser des scripts dans WeeChat (dans
différent langages comme Perl, Python, Ruby, Lua et Tcl). Ces extensions
@@ -230,8 +242,12 @@ commandes telles que `/perl`, utilisées pour charger les scripts.
Plusieurs extensions/scripts (de contributeurs) sont disponibles pour
WeeChat : http://weechat.flashtux.org/plugins.php
Merci de regarder la documentation WeeChat pour charger/décharger des
extensions ou des scripts.
La manière la plus simple pour installer des scripts consiste à utiliser le
script 'weeget.py' :
. téléchargez et copiez 'weeget.py' dans ~/.weechat/python/autoload/
. chargez le script : `/python autoload`
. liste des scripts : `/weeget list` (pour l'aide: `/help weeget`)
[[more_doc]]
+435
View File
@@ -0,0 +1,435 @@
WeeChat Guide pour Scripts
==========================
FlashCode <flashcode@flashtux.org>
Ce manuel documente le client de messagerie instantanée WeeChat, il fait
partie de WeeChat.
La dernière version de ce document peut être téléchargée sur cette page :
http://weechat.flashtux.org/doc.php
[[introduction]]
Introduction
------------
WeeChat (Wee Enhanced Environment for Chat) est un client de discussion libre,
rapide et léger, conçu pour différents systèmes d'exploitation.
Ce manuel documente la façon d'écrire des scripts pour WeeChat, en utilisant
l'un des cinq langages de script supportés : perl, python, ruby, lua ou tcl.
[NOTE]
La majorité des exemples de cette documentation sont écrits en Python, mais
l'API est la même pour les autres langages.
[[scripts_in_weechat]]
Scripts dans WeeChat
--------------------
[[languages_specifities]]
Spécificités des langages
~~~~~~~~~~~~~~~~~~~~~~~~~
Quelques choses sont spécifiques aux langages :
* perl :
** les fonctions sont appelées par `weechat::xxx(arg1, arg2, ...);`
* python :
** vous devez utiliser `import weechat`
** les fonctions `print*` se nomment `prnt*` en python (car 'print' est un mot
clé réservé)
** les fonctions sont appelées par `weechat.xxx(arg1, arg2, ...)`
* ruby :
** vous devez définir 'weechat_init' et appeler 'register' dedans
** les fonctions sont appelées par `Weechat.xxx(arg1, arg2, ...)`
* tcl :
** les fonctions sont appelées par `weechat::xxx arg1 arg2 ...`
[[register]]
Register
~~~~~~~~
Tous les scripts WeeChat doivent s'enregistrer ("register") auprès de WeeChat,
et cela doit être la première fonction WeeChat appelée dans le script.
Prototype :
[source,python]
----------------------------------------
weechat.register(name, author, version, license, description, shutdown_function, charset)
----------------------------------------
Paramètres :
* 'name' : chaîne, nom interne du script
* 'author' : chaîne, nom de l'auteur
* 'version' : chaîne, version du script
* 'license' : chaîne, licence du script
* 'description' : chaîne, description courte du script
* 'shutdown_function' : chaîne, nom de la fonction appelée lorsque le script
est déchargé
* 'charset' : chaîne, jeu de caractères du script (optionnel, si votre script
est UTF-8, vous pouvez utiliser une valeur vide ici, car UTF-8 est le jeu de
caractères par défaut)
[[script_example]]
Exemple de script
~~~~~~~~~~~~~~~~~
Exemple de script, pour chaque langage :
* perl :
[source,perl]
----------------------------------------
weechat::register("test_perl", "FlashCode", "1.0", "GPL3", "Script de test", "", "");
weechat::print("", "Bonjour, du script perl !");
----------------------------------------
* python :
[source,python]
----------------------------------------
import weechat
weechat.register("test_python", "FlashCode", "1.0", "GPL3", "Script de test", "", "")
weechat.prnt("", "Bonjour, du script python !")
----------------------------------------
* ruby :
[source,ruby]
----------------------------------------
def weechat_init
Weechat.register("test_ruby", "FlashCode", "1.0", "GPL3", "Script de test", "", "")
Weechat.print("", "Bonjour, du script ruby !")
return Weechat::WEECHAT_RC_OK
end
----------------------------------------
* lua :
[source,lua]
----------------------------------------
weechat.register("test_lua", "FlashCode", "1.0", "GPL3", "Script de test", "", "")
weechat.print("", "Bonjour, du script lua !")
----------------------------------------
* tcl :
// [source,tcl]
----------------------------------------
weechat::register "test_tcl" "FlashCode" "1.0" "GPL3" "Script de test" "" ""
weechat::print "" "Bonjour, du script tcl !"
----------------------------------------
[[load_script]]
Chargement du script
~~~~~~~~~~~~~~~~~~~~
Vous devez utiliser la commande, dépendant du langage :
----------------------------------------
/perl load perl/script.pl
/python load python/script.py
/ruby load ruby/script.rb
/lua load lua/script.lua
/tcl load tcl/script.tcl
----------------------------------------
Vous pouvez faire un lien dans le répertoire 'langage/autoload' pour charger
automatiquement le script quand WeeChat démarre.
Par exemple en perl :
----------------------------------------
$ cd ~/.weechat/perl/autoload
$ ln -s ../script.pl
----------------------------------------
[[script_api]]
API script
----------
L'API script est quasiment identique à l'API C.
Vous pouvez consulter la 'Référence API Extension WeeChat' pour le détail de
chaque fonction de l'API : prototype, paramètres, valeurs de retour, exemples.
Il est important de bien faire la différence entre une 'extension' et un
'script' : une 'extension' est un fichier binaire compilé et chargé avec la
commande `/plugin`, tandis qu'un 'script' est un fichier texte chargé par une
extension comme 'perl' par la commande `perl`.
Quand votre script 'test.py' appelle une fonction de l'API WeeChat, le chemin
est le suivant :
........................................
(API script) (API C)
\/ \/
test.py -------> extension python (python.so) -------> WeeChat core
........................................
Quand WeeChat appelle un "callback" dans votre script 'test.py', le chemin
est inversé :
........................................
(API C) (API script)
\/ \/
WeeChat core -------> extension plugin (python.so) -------> test.py
........................................
Fonctions
~~~~~~~~~
Liste des fonctions de l'API script :
* général :
** 'register'
* extensions :
** 'plugin_get_name'
* chaînes :
** 'charset_set'
** 'iconv_to_internal'
** 'iconv_from_internal'
** 'gettext'
** 'ngettext'
** 'string_remove_color'
* répertoires :
** 'mkdir_home'
** 'mkdir'
** 'mkdir_parents'
* listes triées :
** 'list_new'
** 'list_add'
** 'list_search'
** 'list_casesearch'
** 'list_get'
** 'list_set'
** 'list_next'
** 'list_prev'
** 'list_string'
** 'list_size'
** 'list_remove'
** 'list_remove_all'
** 'list_free'
* fichiers de configuration :
** 'config_new'
** 'config_new_section'
** 'config_search_section'
** 'config_new_option'
** 'config_search_option'
** 'config_string_to_boolean'
** 'config_option_reset'
** 'config_option_set'
** 'config_option_set_null'
** 'config_option_unset'
** 'config_option_rename'
** 'config_option_is_null'
** 'config_option_default_is_null'
** 'config_boolean'
** 'config_boolean_default'
** 'config_integer'
** 'config_integer_default'
** 'config_string'
** 'config_string_default'
** 'config_color'
** 'config_color_default'
** 'config_write_option'
** 'config_write_line'
** 'config_write'
** 'config_read'
** 'config_reload'
** 'config_option_free'
** 'config_section_free_options'
** 'config_section_free'
** 'config_free'
** 'config_get'
** 'config_get_plugin'
** 'config_is_set_plugin'
** 'config_set_plugin'
** 'config_unset_plugin'
* affichage :
** 'prefix'
** 'color'
** 'print' (pour python : 'prnt')
** 'print_date_tags' (pour python : 'prnt_date_tags')
** 'print_y' (pour python : 'prnt_y')
** 'log_print'
* hooks :
** 'hook_command'
** 'hook_command_run'
** 'hook_timer'
** 'hook_fd'
** 'hook_process'
** 'hook_connect'
** 'hook_print'
** 'hook_signal'
** 'hook_signal_send'
** 'hook_config'
** 'hook_completion'
** 'hook_completion_list_add'
** 'hook_modifier'
** 'hook_modifier_exec'
** 'hook_info'
** 'hook_infolist'
** 'unhook'
** 'unhook_all'
* tampons :
** 'buffer_new'
** 'buffer_search'
** 'current_buffer'
** 'buffer_clear'
** 'buffer_close'
** 'buffer_get_integer'
** 'buffer_get_string'
** 'buffer_get_pointer'
** 'buffer_set'
* fenêtres :
** 'current_window'
** 'window_get_integer'
** 'window_get_string'
** 'window_get_pointer'
** 'window_set_title'
* liste des pseudos :
** 'nicklist_add_group'
** 'nicklist_search_group'
** 'nicklist_add_nick'
** 'nicklist_search_nick'
** 'nicklist_remove_group'
** 'nicklist_remove_nick'
** 'nicklist_remove_all'
* barres :
** 'bar_item_search'
** 'bar_item_new'
** 'bar_item_update'
** 'bar_item_remove'
** 'bar_search'
** 'bar_new'
** 'bar_set'
** 'bar_update'
** 'bar_remove'
* commandes :
** 'command'
* infos :
** 'info_get'
* infolists :
** 'infolist_new'
** 'infolist_new_var_integer'
** 'infolist_new_var_string'
** 'infolist_new_var_pointer'
** 'infolist_new_var_time'
** 'infolist_get'
** 'infolist_next'
** 'infolist_prev'
** 'infolist_fields'
** 'infolist_integer'
** 'infolist_string'
** 'infolist_pointer'
** 'infolist_time'
** 'infolist_free'
* mise à jour :
** 'upgrade_new'
** 'upgrade_write_object'
** 'upgrade_read'
** 'upgrade_close'
Constantes
~~~~~~~~~~
Liste des constantes de l'API script :
* 'WEECHAT_RC_OK'
* 'WEECHAT_RC_OK_EAT'
* 'WEECHAT_RC_ERROR'
* 'WEECHAT_CONFIG_READ_OK'
* 'WEECHAT_CONFIG_READ_MEMORY_ERROR'
* 'WEECHAT_CONFIG_READ_FILE_NOT_FOUND'
* 'WEECHAT_CONFIG_WRITE_OK'
* 'WEECHAT_CONFIG_WRITE_ERROR'
* 'WEECHAT_CONFIG_WRITE_MEMORY_ERROR'
* 'WEECHAT_CONFIG_OPTION_SET_OK_CHANGED'
* 'WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE'
* 'WEECHAT_CONFIG_OPTION_SET_ERROR'
* 'WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND'
* 'WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET'
* 'WEECHAT_CONFIG_OPTION_UNSET_OK_RESET'
* 'WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED'
* 'WEECHAT_CONFIG_OPTION_UNSET_ERROR'
* 'WEECHAT_LIST_POS_SORT'
* 'WEECHAT_LIST_POS_BEGINNING'
* 'WEECHAT_LIST_POS_END'
* 'WEECHAT_HOTLIST_LOW'
* 'WEECHAT_HOTLIST_MESSAGE'
* 'WEECHAT_HOTLIST_PRIVATE'
* 'WEECHAT_HOTLIST_HIGHLIGHT'
* 'WEECHAT_HOOK_PROCESS_RUNNING'
* 'WEECHAT_HOOK_PROCESS_ERROR'
* 'WEECHAT_HOOK_CONNECT_OK'
* 'WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND'
* 'WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND'
* 'WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED'
* 'WEECHAT_HOOK_CONNECT_PROXY_ERROR'
* 'WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR'
* 'WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR'
* 'WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR'
* 'WEECHAT_HOOK_CONNECT_MEMORY_ERROR'
* 'WEECHAT_HOOK_SIGNAL_STRING'
* 'WEECHAT_HOOK_SIGNAL_INT'
* 'WEECHAT_HOOK_SIGNAL_POINTER'
Différences avec l'API C
~~~~~~~~~~~~~~~~~~~~~~~~
Pointeurs
^^^^^^^^^
Comme vous le savez probablement, il n'y a pas vraiment de "pointeurs" dans les
scripts. Donc quand les fonctions de l'API retournent un pointeur, il est
converti en chaîne pour le script.
Par exemple, si une fonction retourne le pointeur 0x1234ab56, le script recevra
la chaîne "0x1234ab56".
Et quand une fonction de l'API attend un pointeur dans ses paramètres, le
script doit envoyer cette valeur sous forme de chaîne. L'extension C la
convertira en pointeur réel avant d'appeler la fonction de l'API C.
Une chaîne vide ou "0x0" sont autorisées, cela signifie le pointeur NULL en C.
Par exemple, pour afficher un message sur le tampon core (tampon principal
WeeChat), vous pouvez faire :
[source,python]
----------------------------------------
weechat.prnt("", "bonjour !")
----------------------------------------
[WARNING]
Dans beaucoup de fonctions, pour des raisons de vitesse, WeeChat ne vérifie pas
si votre pointeur est correct ou pas. Il est de votre responsabilité de
vérifier que vous donnez un pointeur valide, sinon vous pourriez voir un joli
rapport de crash ;)
Callbacks
^^^^^^^^^
Tous les "callbacks" WeeChat doivent retourner WEECHAT_RC_OK ou
WEECHAT_RC_ERROR (l'exception est le callback du "modifier", qui retourne une
chaîne de caractères).
Les "callbacks" C utilisent un paramètre "data", qui est un pointeur. Dans
l'API script, ce "data" est une chaîne de caractères avec n'importe quelle
valeur (ce n'est pas un pointeur).
Par exemple :
[source,python]
----------------------------------------
weechat.hook_timer(1000, 0, 1, "mon_timer_cb", "mes données")
def mon_timer_cb(data, remaining_calls):
# cela affichera : "mes données"
weechat.prnt("", data)
return weechat.WEECHAT_RC_OK
----------------------------------------
+3 -3
View File
@@ -74,7 +74,7 @@ $ git clone git://git.sv.gnu.org/weechat.git
$ cd weechat
--------------------------------------------
NOTE: Plus tard, vous pourrez utiliser la command "`git pull`" dans ce répertoire
NOTE: Plus tard, vous pourrez utiliser la commande "`git pull`" dans ce répertoire
pour obtenir juste les deltas avec la version d'aujourd'hui.
Sinon vous pouvez installer le paquet 'devel' :
@@ -95,7 +95,7 @@ $ make
$ make install
--------------------------------------------------------------
Si vous n'avez pas cmake, il est toujours possible d'utiliser les autools :
Si vous n'avez pas cmake, il est toujours possible d'utiliser les autotools :
-----------------------------------------------------------------
$ ./autogen.sh # (seulement si vous avez cloné la base git)
@@ -104,7 +104,7 @@ $ make
$ make install
-----------------------------------------------------------------
[[install_binary_pcakcge]]
[[install_binary_package]]
Obtenir un paquet binaire
~~~~~~~~~~~~~~~~~~~~~~~~~
+31 -31
View File
@@ -45,7 +45,7 @@ Pré-requis
Pour installer WeeChat, vous devez avoir :
* un système GNU/Linux (avec le compilateur et les outils associés pour le
paquet des sources), ou un système compatible (voir ci-dessus)
paquet des sources), ou un système compatible
* droits "root" (pour installer WeeChat dans un répertoire système)
* la bibliothèque ncurses
@@ -55,15 +55,15 @@ Installation
------------
[[binary_packages]]
Binary packages
~~~~~~~~~~~~~~~
Paquets binaires
~~~~~~~~~~~~~~~~
Les paquets binaires sont disponibles pour beaucoup de distributions, dont :
* Debian (ou toute distribution compatible Debian) : `apt-get install weechat`
* Mandriva/RedHat (ou toute distribution compatible avec les RPM) :
`rpm -i /path/to/weechat-x.y.z-1.i386.rpm`
* Gentoo: `emerge weechat`
* Gentoo : `emerge weechat`
Des paquets additionnels peuvent être utiles également, comme weechat-plugins.
@@ -123,7 +123,7 @@ $ make install
Sources Git
~~~~~~~~~~~
Attention: les sources GIT sont réservés aux utilisateurs avancés : il se peut
Attention : les sources GIT sont réservés aux utilisateurs avancés : il se peut
que WeeChat ne compile pas et qu'il soit très instable. Vous êtes prévenus !
Pour récupérer les sources GIT, tapez cette commande :
@@ -176,7 +176,7 @@ Paramètres de ligne de commande :
Afficher la version de WeeChat
plugin:option::
Option pour l'extension (voir la doc de chaque extension)
Option pour l'extension (voir la documentation de chaque extension)
Pour lancer WeeChat, tapez cette commande :
@@ -251,7 +251,7 @@ La barre 'status' contient les objets (items) suivants par défaut :
nombre de tampons ouverts
| buffer_plugin | `[irc/freenode]` |
extension du tampon courant (l'extension irc peut affiche le nom du serveur
extension du tampon courant (l'extension irc peut afficher le nom du serveur
IRC auquel est rattaché ce tampon)
| buffer_number | `3` |
@@ -264,7 +264,7 @@ La barre 'status' contient les objets (items) suivants par défaut :
nombre de pseudos dans la liste des pseudos
| buffer_filter | `*` |
indicateur de filtrage: `*` signifie que des lignes sont filtrées (cachées),
indicateur de filtrage : `*` signifie que des lignes sont filtrées (cachées),
une valeur vide signifie que toutes les lignes sont affichées
| lag | `[Lag: 2.5]` |
@@ -409,13 +409,13 @@ Touches pour la ligne de commande
`/input clipboard_paste`
| Tab |
Compléter la commande ou le pseudo (Tab de nouveau: trouver la complétion
Compléter la commande ou le pseudo (Tab de nouveau : trouver la complétion
suivante) +
`/input complete_next`
| Shift + Tab |
Sans complétion, effectue une complétion partielle. Avec une complétion en
cours, complète avec la complétion précécente +
cours, complète avec la complétion précédente +
`/input complete_previous`
| Tout caractère |
@@ -424,16 +424,16 @@ Touches pour la ligne de commande
| Enter +
Ctrl + J +
Ctrl + M |
Exécuter la commande ou envoyer le message (en mode recherche: arrêter la
Exécuter la commande ou envoyer le message (en mode recherche : arrêter la
recherche) +
`/input return`
| Flèche haut |
Rappeler la commande précédente (en mode recherche: chercher plus haut) +
Rappeler la commande précédente (en mode recherche : chercher plus haut) +
`/input history_previous`
| Flèche bas |
Rappeler la commande suivante (en mode recherche: chercher plus bas) +
Rappeler la commande suivante (en mode recherche : chercher plus bas) +
`/input history_next`
| Ctrl + flèche haut |
@@ -595,7 +595,7 @@ Touches pour les tampons / fenêtres
`/window right`
| Alt + Z |
Zoom sur la fenêtre courante (Alt + Z de nouveau: restaurer l'état initial
Zoom sur la fenêtre courante (Alt + Z de nouveau : restaurer l'état initial
des fenêtres, avant le zoom) +
`/window zoom`
@@ -685,7 +685,7 @@ suit et éventuellement une valeur) :
Le même code (sans le numéro pour ^Cc) peut être utilisé pour stopper
l'attribut défini.
Les codes couleur pour ^Cc sont:
Les codes couleur pour ^Cc sont :
[width="20%",cols="^1m,2"]
|========================================
@@ -765,11 +765,11 @@ chargée par WeeChat.
Sous GNU/Linux, ce fichier a une extension ".so", et ".dll" sous Windows.
Les extensions trouvées sont automatiquement chargées par WeeChat lorsqu'il
démarre, et il est posisble de charger et décharger des extensions pendant que
démarre, et il est possible de charger et décharger des extensions pendant que
WeeChat tourne.
Il est important de bien faire la différence entre une 'extension' et un
'script': une 'extension' est un fichier binaire compilé et chargé avec la
'script' : une 'extension' est un fichier binaire compilé et chargé avec la
commande `/plugin`, tandis qu'un 'script' est un fichier texte chargé par une
extension comme 'perl' par la commande `perl`.
@@ -793,7 +793,7 @@ Les extensions par défaut sont :
| Extension | Description
| alias | Définir des alias pour les commandes
| aspell | Vérification orthographique de la ligne de commande
| charset | Eécodage/encodage avec jeu de caractère sur les tampons
| charset | Encodage/encodage avec jeu de caractère sur les tampons
| demo | Extension de démonstration (non compilée par défaut)
| fifo | Tube FIFO pour envoyer des commandes à distance vers WeeChat
| irc | Discussion avec le protocole IRC
@@ -822,7 +822,7 @@ include::autogen/user/alias_commands.txt[]
Extension Aspell
~~~~~~~~~~~~~~~~
L'extension Aspell permet de vérifier l'orghographe de la ligne de commande.
L'extension Aspell permet de vérifier l'orthographe de la ligne de commande.
Il est possible d'utiliser plusieurs langages par tampon.
Options (aspell.conf)
@@ -928,14 +928,14 @@ Pour modifier le jeu de caractères d'un canal IRC (ou d'une conversation
privée), utilisez la même commande que pour le serveur, mais sur le tampon du
canal (ou du privé).
Pour voir tous les jeux de carcatères utilisés, utilisez la commande uivante :
Pour voir tous les jeux de caractères utilisés, utilisez la commande suivante :
----------------------------------------
/set charset.*
----------------------------------------
Troubleshooting
^^^^^^^^^^^^^^^
En cas de problème
^^^^^^^^^^^^^^^^^^
Pour tout problème avec les jeux de caractères, merci de consulter la
'FAQ WeeChat'.
@@ -949,15 +949,15 @@ texte dans un tube FIFO (si l'option 'plugins.var.fifo.fifo' est activée,
elle l'est par défaut).
Le tube FIFO est dans le répertoire '~/.weechat/' et s'appelle
'weechat_fifo_xxxxx' (où 'xxxxx' est l'ID du processus (PID) du WeeChat qui
'weechat_fifo_xxxx' (où 'xxxx' est l'ID du processus (PID) du WeeChat qui
tourne).
La syntaxe pour envoyer des commandes ou du texte dans le tube FIFO est une
des suivantes :
........................................
plugin.buffer *text or command here
*text or command here
plugin.buffer *texte ou commande ici
*texte ou commande ici
........................................
Quelques exemples :
@@ -1074,10 +1074,10 @@ signifie "enregistrer tous les messages".
Les extensions utilisent différent niveaux pour les messages affichés.
L'extension IRC utilise les niveaux suivants :
* niveau 1: message d'un utilisateur (sur un canal ou en privé)
* niveau 2: changement de pseudo (vous ou quelqu'un d'autre)
* niveau 3: tout message du serveur (sauf join/part/quit)
* niveau 4: message join/part/quit du serveur
* niveau 1 : message d'un utilisateur (sur un canal ou en privé)
* niveau 2 : changement de pseudo (vous ou quelqu'un d'autre)
* niveau 3 : tout message du serveur (sauf join/part/quit)
* niveau 4 : message join/part/quit du serveur
Donc si vous affectez le niveau 3 pour un canal IRC, WeeChat enregistrera
tous les messages sauf les join/part/quit.
@@ -1111,7 +1111,7 @@ Quelques exemples :
Masques de noms de fichiers
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Il est posible de définir un masque de nom de fichier pour chaque tampon, et
Il est possible de définir un masque de nom de fichier pour chaque tampon, et
d'utiliser les variables locales du tampon pour construire le nom de fichier.
Pour voir les variables du tampon courant :
@@ -1146,7 +1146,7 @@ Vous obtiendrez les fichiers suivants :
Extensions Scripts
~~~~~~~~~~~~~~~~~~
WeeChat fournit 5 extensions pour scripts: Perl, Python, Ruby, Lua and Tcl.
WeeChat fournit 5 extensions pour scripts : Perl, Python, Ruby, Lua and Tcl.
Ces extensions peuvent charger, exécuter et décharger des scripts pour ces
langages.
+33 -22
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-08-09 12:17+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -907,7 +907,7 @@ msgid ""
" tags: comma separated list of tags, for example: \"irc_join,"
"irc_part,irc_quit\"\n"
" regex: regular expression to search in line (use \\t to separate "
"prefix from message)\n"
"prefix from message, special chars like '|' must be escaped: '\\|')\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -1463,6 +1463,9 @@ msgstr ""
"procenta obrazovky, o které posunout, při posunutí o stránku nahoru nebo "
"dolů (například 100 znamená jedna stránka, 50 půl stránky)"
msgid "alert user when text sought is not found in buffer"
msgstr ""
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr "nastaví titulek okna (terminálu pro Cruses GUI) s jménem a verzí"
@@ -1655,10 +1658,6 @@ msgstr "barva okna s novými daty (ne zprávami) (status bar)"
msgid "text color for buffer with new data (status bar)"
msgstr "barva okna s novými daty (status bar)"
#, fuzzy
msgid "text color for nick name in input line"
msgstr "barva přezdívek"
#, fuzzy
msgid "text color for unsucessful text search in input line"
msgstr "barva děličů v infobaru"
@@ -1699,10 +1698,6 @@ msgstr "barva přezdívky"
msgid "text color for '+' when scrolling nicks in nicklist"
msgstr "barva pro '+' při procházení přezdívek"
#, fuzzy
msgid "text color for nicklist separator"
msgstr "barva děliče přezdívek"
msgid ""
"default completion template (please see documentation for template codes and "
"values)"
@@ -2364,7 +2359,7 @@ msgstr ""
msgid "%s%s: error creating aspell dictionary \"%s\" => \"%s\""
msgstr "%s nedostatek paměti pro infobar zprávu\n"
msgid "color used for mispelled words"
msgid "color used for misspelled words"
msgstr ""
msgid ""
@@ -2375,7 +2370,7 @@ msgstr ""
msgid ""
"default dictionary (or comma separated list of dictionaries) to use when "
"buffer has no dictionary defined (leave blank to disable aspell on buffers "
"for which you didn't explicitely enabled it)"
"for which you didn't explicitly enabled it)"
msgstr ""
msgid "check words during text search in buffer"
@@ -3030,7 +3025,8 @@ msgstr "přezdívka: přezdívka"
msgid "join a channel"
msgstr "připojit se ke kanálu"
msgid "channel[,channel] [key[,key]]"
#, fuzzy
msgid "[channel[,channel] [key[,key]]]"
msgstr "kanál[,kanál] [klíč[,klíč]]"
msgid ""
@@ -3766,7 +3762,12 @@ msgstr "získat lokální čas ze serveru"
msgid "merge server buffers"
msgstr "řídit buffery"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "otevřít nový kanál/soukromý rozhovor poblíž serveru"
#, fuzzy
msgid "open new privates near server"
msgstr "otevřít nový kanál/soukromý rozhovor poblíž serveru"
msgid "text to display before nick in chat window"
@@ -3848,6 +3849,10 @@ msgstr "barva přezdívek"
msgid "color for away item"
msgstr "barva přezdívek, které jsou pryč"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "barva kanálu v akcích"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -4686,6 +4691,12 @@ msgstr ""
msgid "%sError: unable to load plugin \"%s\": %s"
msgstr "%s nemůžu načist plugin \"%s\": %s\n"
#, c-format
msgid ""
"%sIf you're trying to load a script and not a C plugin, try command to load "
"scripts (/perl, /python, ...)"
msgstr ""
#, fuzzy, c-format
msgid "%sError: symbol \"%s\" not found in plugin \"%s\", failed to load"
msgstr ""
@@ -5519,6 +5530,14 @@ msgstr "%s DCC: nemohu nastavit 'neblokovaci' volbu na soket\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s chybí argument pro volbu \"%s\"\n"
#, fuzzy
#~ msgid "text color for nick name in input line"
#~ msgstr "barva přezdívek"
#, fuzzy
#~ msgid "text color for nicklist separator"
#~ msgstr "barva děliče přezdívek"
#, fuzzy
#~ msgid "servers"
#~ msgstr "server"
@@ -5697,10 +5716,6 @@ msgstr "%s chybí argument pro volbu \"%s\"\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "pužít stejný buffer pro všechny servery"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr "otevřít nový kanál/soukromý rozhovor poblíž serveru"
#~ msgid "smart completion for nicks (completes with last speakers first)"
#~ msgstr "chytré doplňování přezdívek (doplňovat posledně mluvící jako první)"
@@ -6217,10 +6232,6 @@ msgstr "%s chybí argument pro volbu \"%s\"\n"
#~ msgid "text color for server name in input line"
#~ msgstr "barva pro jeméno serveru"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "barva kanálu v akcích"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "barva děličů v infobaru"
+33 -23
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-08-09 12:17+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -943,7 +943,7 @@ msgid ""
" tags: comma separated list of tags, for example: \"irc_join,"
"irc_part,irc_quit\"\n"
" regex: regular expression to search in line (use \\t to separate "
"prefix from message)\n"
"prefix from message, special chars like '|' must be escaped: '\\|')\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -1485,6 +1485,9 @@ msgid ""
"100 means one page, 50 half-page)"
msgstr ""
msgid "alert user when text sought is not found in buffer"
msgstr ""
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
"Fenstertitel setzen (oder Terminaltitel im Curses-GUI) mit Name und Version"
@@ -1680,10 +1683,6 @@ msgstr ""
msgid "text color for buffer with new data (status bar)"
msgstr "Farbe eines Fensters mit neuen Daten in der Statuszeile"
#, fuzzy
msgid "text color for nick name in input line"
msgstr "Farbe von Nicknames"
#, fuzzy
msgid "text color for unsucessful text search in input line"
msgstr "Farbe der Infobar-Trennzeichen"
@@ -1724,10 +1723,6 @@ msgstr "Farbe von Nicknames"
msgid "text color for '+' when scrolling nicks in nicklist"
msgstr "Farbe des '+' beim Scrolling von Nicknames"
#, fuzzy
msgid "text color for nicklist separator"
msgstr "Farbe der Nicknamefenster-Trennlinie"
msgid ""
"default completion template (please see documentation for template codes and "
"values)"
@@ -2373,7 +2368,7 @@ msgstr ""
msgid "%s%s: error creating aspell dictionary \"%s\" => \"%s\""
msgstr "%s nicht genügend Speicher für Infobar-Nachricht\n"
msgid "color used for mispelled words"
msgid "color used for misspelled words"
msgstr ""
msgid ""
@@ -2384,7 +2379,7 @@ msgstr ""
msgid ""
"default dictionary (or comma separated list of dictionaries) to use when "
"buffer has no dictionary defined (leave blank to disable aspell on buffers "
"for which you didn't explicitely enabled it)"
"for which you didn't explicitly enabled it)"
msgstr ""
msgid "check words during text search in buffer"
@@ -3029,7 +3024,8 @@ msgstr "Nickname: Nickname"
msgid "join a channel"
msgstr "einen Channel betreten"
msgid "channel[,channel] [key[,key]]"
#, fuzzy
msgid "[channel[,channel] [key[,key]]]"
msgstr "Channel[,Channel] [Passwort[,Passwort]]"
msgid ""
@@ -3743,7 +3739,12 @@ msgstr "Ortszeit des Servers abfragen"
msgid "merge server buffers"
msgstr "Puffer verwalten"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "öffne neue Channels oder private Nachrichten neben dem Server-Puffer"
#, fuzzy
msgid "open new privates near server"
msgstr "öffne neue Channels oder private Nachrichten neben dem Server-Puffer"
msgid "text to display before nick in chat window"
@@ -3826,6 +3827,10 @@ msgstr "Farbe von Nicknames"
msgid "color for away item"
msgstr "Farbe von abwesenden Nicknames"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "Farbe der Channelnamen in ACTIONs"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -4660,6 +4665,12 @@ msgstr "Liste der /ignore-Regeln:\n"
msgid "%sError: unable to load plugin \"%s\": %s"
msgstr "%s kann Plugin \"%s\" nicht laden: %s\n"
#, c-format
msgid ""
"%sIf you're trying to load a script and not a C plugin, try command to load "
"scripts (/perl, /python, ...)"
msgstr ""
#, fuzzy, c-format
msgid "%sError: symbol \"%s\" not found in plugin \"%s\", failed to load"
msgstr ""
@@ -5483,6 +5494,14 @@ msgstr "%s DCC: kann die 'nonblock'-Option für den Socket nicht festlegen\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s fehlende Argumente für die \"--dir\"-Option\n"
#, fuzzy
#~ msgid "text color for nick name in input line"
#~ msgstr "Farbe von Nicknames"
#, fuzzy
#~ msgid "text color for nicklist separator"
#~ msgstr "Farbe der Nicknamefenster-Trennlinie"
#, fuzzy
#~ msgid "servers"
#~ msgstr "Server"
@@ -5636,11 +5655,6 @@ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "benutze den gleichen Puffer für alle Server"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr ""
#~ "öffne neue Channels oder private Nachrichten neben dem Server-Puffer"
#~ msgid "smart completion for nicks (completes with last speakers first)"
#~ msgstr ""
#~ "Intelligente vervollständigung der Nicknamen (vervollständigt zuerst mit "
@@ -6108,10 +6122,6 @@ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n"
#~ msgid "text color for server name in input line"
#~ msgstr "Farbe des Servernamens"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "Farbe der Channelnamen in ACTIONs"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "Farbe der Infobar-Trennzeichen"
+33 -22
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-08-09 12:17+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -939,7 +939,7 @@ msgid ""
" tags: comma separated list of tags, for example: \"irc_join,"
"irc_part,irc_quit\"\n"
" regex: regular expression to search in line (use \\t to separate "
"prefix from message)\n"
"prefix from message, special chars like '|' must be escaped: '\\|')\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -1466,6 +1466,9 @@ msgid ""
"100 means one page, 50 half-page)"
msgstr ""
msgid "alert user when text sought is not found in buffer"
msgstr ""
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
"define el título de la ventana (el terminal para la interfaz Curses) con el "
@@ -1661,10 +1664,6 @@ msgstr ""
msgid "text color for buffer with new data (status bar)"
msgstr "color para una ventana con nuevos datos (barra de estado)"
#, fuzzy
msgid "text color for nick name in input line"
msgstr "color para los nombres de usuario"
#, fuzzy
msgid "text color for unsucessful text search in input line"
msgstr "color para los delimitadores de la barra de información"
@@ -1705,10 +1704,6 @@ msgstr "color para el nombre de usuario"
msgid "text color for '+' when scrolling nicks in nicklist"
msgstr "color para '+' al desplazar nicks"
#, fuzzy
msgid "text color for nicklist separator"
msgstr "color para el separador de alias"
msgid ""
"default completion template (please see documentation for template codes and "
"values)"
@@ -2347,7 +2342,7 @@ msgid "%s%s: error creating aspell dictionary \"%s\" => \"%s\""
msgstr ""
"No hay suficiente memoria para el mensaje de la barra de información\n"
msgid "color used for mispelled words"
msgid "color used for misspelled words"
msgstr ""
msgid ""
@@ -2358,7 +2353,7 @@ msgstr ""
msgid ""
"default dictionary (or comma separated list of dictionaries) to use when "
"buffer has no dictionary defined (leave blank to disable aspell on buffers "
"for which you didn't explicitely enabled it)"
"for which you didn't explicitly enabled it)"
msgstr ""
msgid "check words during text search in buffer"
@@ -3007,7 +3002,8 @@ msgstr "usuario: usuario"
msgid "join a channel"
msgstr "unirse a un canal"
msgid "channel[,channel] [key[,key]]"
#, fuzzy
msgid "[channel[,channel] [key[,key]]]"
msgstr "canal[,canal] [clave[,clave]]"
msgid ""
@@ -3732,7 +3728,12 @@ msgstr "pedir la hora local del servidor"
msgid "merge server buffers"
msgstr "gestionar los búfers"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "abrir nuevos canales/privados cerca del servidor"
#, fuzzy
msgid "open new privates near server"
msgstr "abrir nuevos canales/privados cerca del servidor"
msgid "text to display before nick in chat window"
@@ -3812,6 +3813,10 @@ msgstr "color para los nombres de usuario"
msgid "color for away item"
msgstr "color para los usuarios ausentes"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "color para los nombres de canal en las acciones"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -4653,6 +4658,12 @@ msgstr "Lista de ignores:\n"
msgid "%sError: unable to load plugin \"%s\": %s"
msgstr "%s no ha sido posible cargar el plugin \"%s\": %s\n"
#, c-format
msgid ""
"%sIf you're trying to load a script and not a C plugin, try command to load "
"scripts (/perl, /python, ...)"
msgstr ""
#, fuzzy, c-format
msgid "%sError: symbol \"%s\" not found in plugin \"%s\", failed to load"
msgstr ""
@@ -5480,6 +5491,14 @@ msgstr "%s no es posible crear el servidor\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s falta un argumento para la opción --dir\n"
#, fuzzy
#~ msgid "text color for nick name in input line"
#~ msgstr "color para los nombres de usuario"
#, fuzzy
#~ msgid "text color for nicklist separator"
#~ msgstr "color para el separador de alias"
#, fuzzy
#~ msgid "servers"
#~ msgstr "servidor"
@@ -5629,10 +5648,6 @@ msgstr "%s falta un argumento para la opción --dir\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "usar el mismo búfer para todos los servidores"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr "abrir nuevos canales/privados cerca del servidor"
#, fuzzy
#~ msgid ""
#~ "default part message (leaving MUC) ('%v' will be replaced by WeeChat "
@@ -6087,10 +6102,6 @@ msgstr "%s falta un argumento para la opción --dir\n"
#~ msgid "text color for server name in input line"
#~ msgstr "color para el nombre del servidor"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "color para los nombres de canal en las acciones"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "color para los delimitadores de la barra de información"
+37 -17
View File
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"PO-Revision-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-08-09 12:17+0200\n"
"PO-Revision-Date: 2009-08-09 12:17+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -977,7 +977,7 @@ msgid ""
" tags: comma separated list of tags, for example: \"irc_join,"
"irc_part,irc_quit\"\n"
" regex: regular expression to search in line (use \\t to separate "
"prefix from message)\n"
"prefix from message, special chars like '|' must be escaped: '\\|')\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -1006,7 +1006,8 @@ msgstr ""
" tags: liste de tags, séparés par des virgules, par exemple: "
"\"irc_join,irc_part,irc_quit\"\n"
" regex: expressoin régulière à rechercher dans la ligne (utiliser "
"\\t pour séparer le préfixe du message)\n"
"\\t pour séparer le préfixe du message, les caractères spéciaux comme '|' "
"doivent être échappés: '\\|')\n"
"\n"
"La touche par défaut alt+'=' active/désactive le filtrage.\n"
"\n"
@@ -1647,6 +1648,11 @@ msgstr ""
"pourcentage de l'écran à faire défiler lors du défilement avec page "
"précédente ou suivante (par exemple 100 signifie une page, 50 une demi-page)"
msgid "alert user when text sought is not found in buffer"
msgstr ""
"alterte l'utilisateur lorsque le texte cherché n'est pas trouvé dans le "
"tampon"
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
"définit le titre de la fenêtre (terminal pour l'interface Curses) avec le "
@@ -1807,9 +1813,6 @@ msgid "text color for buffer with new data (status bar)"
msgstr ""
"couleur du texte pour un tampon avec des nouvelles données (barre de statut)"
msgid "text color for nick name in input line"
msgstr "couleur du texte pour le pseudo dans la ligne de saisie"
msgid "text color for unsucessful text search in input line"
msgstr ""
"couleur du texte pour la recherche infructueuse de texte dans la ligne de "
@@ -1844,9 +1847,6 @@ msgstr ""
"couleur du texte pour les '+' lors du défilement des pseudos dans la liste "
"des pseudos"
msgid "text color for nicklist separator"
msgstr "couleur du texte pour le séparateur de la liste des pseudos"
msgid ""
"default completion template (please see documentation for template codes and "
"values)"
@@ -1870,7 +1870,7 @@ msgid "chars ignored for nick completion"
msgstr "caractères à ignorer pour la complétion des pseudos"
msgid "alert user when a partial completion occurs"
msgstr "alterte de l'utilisateur lorsqu'une complétion partielle survient"
msgstr "alterte l'utilisateur lorsqu'une complétion partielle survient"
msgid ""
"partially complete command names (stop when many commands found begin with "
@@ -2493,7 +2493,7 @@ msgstr ""
msgid "%s%s: error creating aspell dictionary \"%s\" => \"%s\""
msgstr "%s%s: erreur en création du dictionnaire aspell \"%s\" => \"%s\""
msgid "color used for mispelled words"
msgid "color used for misspelled words"
msgstr "couleur utilisée pour les mots mal orthographiés"
msgid ""
@@ -2507,7 +2507,7 @@ msgstr ""
msgid ""
"default dictionary (or comma separated list of dictionaries) to use when "
"buffer has no dictionary defined (leave blank to disable aspell on buffers "
"for which you didn't explicitely enabled it)"
"for which you didn't explicitly enabled it)"
msgstr ""
"dictionnaire par défaut (ou liste de dictionnaires séparés par une virgule) "
"à utiliser quand le tampon courant n'a pas de dictionnaire défini (laissez "
@@ -3188,8 +3188,8 @@ msgstr "pseudo: pseudo"
msgid "join a channel"
msgstr "joindre un canal"
msgid "channel[,channel] [key[,key]]"
msgstr "canal[,canal] [clé[,clé]]"
msgid "[channel[,channel] [key[,key]]]"
msgstr "[canal[,canal] [clé[,clé]]]"
msgid ""
"channel: channel name to join\n"
@@ -3904,8 +3904,11 @@ msgstr "utiliser la couleur du pseudo dans les messages du serveur"
msgid "merge server buffers"
msgstr "mélange des tampons de serveur"
msgid "open new channels/privates near server"
msgstr "ouvrir les nouveaux canaux/privés près du serveur"
msgid "open new channels near server"
msgstr "ouvrir les nouveaux canaux près du serveur"
msgid "open new privates near server"
msgstr "ouvrir les nouveaux privés près du serveur"
msgid "text to display before nick in chat window"
msgstr "texte à afficher avant le pseudo dans la fenêtre de discussion"
@@ -3994,6 +3997,9 @@ msgstr "couleur du pseudo dans la barre de saisie"
msgid "color for away item"
msgstr "couleur pour l'objet away"
msgid "color for channel modes, near channel name"
msgstr "couleur pour les modes du canal, à côté du nom du canal"
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
@@ -4858,6 +4864,14 @@ msgstr "liste des fenêtres"
msgid "%sError: unable to load plugin \"%s\": %s"
msgstr "%sErreur: impossible de charger l'extension \"%s\": %s"
#, c-format
msgid ""
"%sIf you're trying to load a script and not a C plugin, try command to load "
"scripts (/perl, /python, ...)"
msgstr ""
"%sSi vous essayez de charger un script et non une extension C, essayez la "
"commande pour charger les scripts (/perl, /python, ...)"
#, c-format
msgid "%sError: symbol \"%s\" not found in plugin \"%s\", failed to load"
msgstr ""
@@ -5677,3 +5691,9 @@ msgstr "%s%s: impossible de positionner l'option \"nonblock\" pour la socket"
#, c-format
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s%s: délai d'attente dépassé pour \"%s\" avec %s"
#~ msgid "text color for nick name in input line"
#~ msgstr "couleur du texte pour le pseudo dans la ligne de saisie"
#~ msgid "text color for nicklist separator"
#~ msgstr "couleur du texte pour le séparateur de la liste des pseudos"
+33 -22
View File
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-08-09 12:17+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -959,7 +959,7 @@ msgid ""
" tags: comma separated list of tags, for example: \"irc_join,"
"irc_part,irc_quit\"\n"
" regex: regular expression to search in line (use \\t to separate "
"prefix from message)\n"
"prefix from message, special chars like '|' must be escaped: '\\|')\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -1495,6 +1495,9 @@ msgid ""
"100 means one page, 50 half-page)"
msgstr ""
msgid "alert user when text sought is not found in buffer"
msgstr ""
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
"ablak címsorának beállítása (Curses GUI esetén a terminálé) a program nevére "
@@ -1689,10 +1692,6 @@ msgstr "új adatot tartalmazó ablak színe (nem üzenetek) (státuszsor)"
msgid "text color for buffer with new data (status bar)"
msgstr "új adatot tartalmazó ablak színe (státuszsor)"
#, fuzzy
msgid "text color for nick name in input line"
msgstr "nevek színe"
#, fuzzy
msgid "text color for unsucessful text search in input line"
msgstr "információs pult határolóinak színe"
@@ -1733,10 +1732,6 @@ msgstr "név színe"
msgid "text color for '+' when scrolling nicks in nicklist"
msgstr "a '+' jel színe névlista görgetésekor"
#, fuzzy
msgid "text color for nicklist separator"
msgstr "névelválasztó színe"
msgid ""
"default completion template (please see documentation for template codes and "
"values)"
@@ -2383,7 +2378,7 @@ msgstr ""
msgid "%s%s: error creating aspell dictionary \"%s\" => \"%s\""
msgstr "%s nincs elég memória az információs pult üzenethez\n"
msgid "color used for mispelled words"
msgid "color used for misspelled words"
msgstr ""
msgid ""
@@ -2394,7 +2389,7 @@ msgstr ""
msgid ""
"default dictionary (or comma separated list of dictionaries) to use when "
"buffer has no dictionary defined (leave blank to disable aspell on buffers "
"for which you didn't explicitely enabled it)"
"for which you didn't explicitly enabled it)"
msgstr ""
msgid "check words during text search in buffer"
@@ -3043,7 +3038,8 @@ msgstr "név: név"
msgid "join a channel"
msgstr "belépés egy szobába"
msgid "channel[,channel] [key[,key]]"
#, fuzzy
msgid "[channel[,channel] [key[,key]]]"
msgstr "szoba[,szoba] [kulcs[,kulcs]]"
msgid ""
@@ -3781,7 +3777,12 @@ msgstr "helyi idő lekérdezése a szerverről"
msgid "merge server buffers"
msgstr "pufferek kezelése"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "az új szobák/privát beszélgetések a szerverhez közel nyíljanak"
#, fuzzy
msgid "open new privates near server"
msgstr "az új szobák/privát beszélgetések a szerverhez közel nyíljanak"
msgid "text to display before nick in chat window"
@@ -3861,6 +3862,10 @@ msgstr "nevek színe"
msgid "color for away item"
msgstr "távollevő felhasználók nevének színe"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "szobanevek színe az eseményekben"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -4692,6 +4697,12 @@ msgstr "Mellőzések listája:\n"
msgid "%sError: unable to load plugin \"%s\": %s"
msgstr "%s nem sikerült a modult betölteni \"%s\": %s\n"
#, c-format
msgid ""
"%sIf you're trying to load a script and not a C plugin, try command to load "
"scripts (/perl, /python, ...)"
msgstr ""
#, fuzzy, c-format
msgid "%sError: symbol \"%s\" not found in plugin \"%s\", failed to load"
msgstr ""
@@ -5509,6 +5520,14 @@ msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#, fuzzy
#~ msgid "text color for nick name in input line"
#~ msgstr "nevek színe"
#, fuzzy
#~ msgid "text color for nicklist separator"
#~ msgstr "névelválasztó színe"
#, fuzzy
#~ msgid "servers"
#~ msgstr "szerver"
@@ -5687,10 +5706,6 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "ugyanazon puffer használata minden szerverhez"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr "az új szobák/privát beszélgetések a szerverhez közel nyíljanak"
#~ msgid "smart completion for nicks (completes with last speakers first)"
#~ msgstr "okos névkiegészítés (először az utolsó partnerre egészít ki)"
@@ -6153,10 +6168,6 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#~ msgid "text color for server name in input line"
#~ msgstr "szerver nevének színe"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "szobanevek színe az eseményekben"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "információs pult határolóinak színe"
+1734 -948
View File
File diff suppressed because it is too large Load Diff
+33 -22
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-08-09 12:17+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -954,7 +954,7 @@ msgid ""
" tags: comma separated list of tags, for example: \"irc_join,"
"irc_part,irc_quit\"\n"
" regex: regular expression to search in line (use \\t to separate "
"prefix from message)\n"
"prefix from message, special chars like '|' must be escaped: '\\|')\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -1498,6 +1498,9 @@ msgid ""
"100 means one page, 50 half-page)"
msgstr ""
msgid "alert user when text sought is not found in buffer"
msgstr ""
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
"устанавливать заголовок окна (терминала при интерфейсе Curses) с именем и "
@@ -1692,10 +1695,6 @@ msgstr "цвет окна с новыми данными (но не сообще
msgid "text color for buffer with new data (status bar)"
msgstr "цвет окна с новыми данными (в строке состояния)"
#, fuzzy
msgid "text color for nick name in input line"
msgstr "цвет ников"
#, fuzzy
msgid "text color for unsucessful text search in input line"
msgstr "цвет разделителей информационной панели"
@@ -1736,10 +1735,6 @@ msgstr "цвет ника"
msgid "text color for '+' when scrolling nicks in nicklist"
msgstr "цвет '+' при прокрутке ников"
#, fuzzy
msgid "text color for nicklist separator"
msgstr "цвет разделителя ников"
msgid ""
"default completion template (please see documentation for template codes and "
"values)"
@@ -2386,7 +2381,7 @@ msgstr ""
msgid "%s%s: error creating aspell dictionary \"%s\" => \"%s\""
msgstr "%s недостаточно памяти для сообщения в строке информации\n"
msgid "color used for mispelled words"
msgid "color used for misspelled words"
msgstr ""
msgid ""
@@ -2397,7 +2392,7 @@ msgstr ""
msgid ""
"default dictionary (or comma separated list of dictionaries) to use when "
"buffer has no dictionary defined (leave blank to disable aspell on buffers "
"for which you didn't explicitely enabled it)"
"for which you didn't explicitly enabled it)"
msgstr ""
msgid "check words during text search in buffer"
@@ -3045,7 +3040,8 @@ msgstr "ник: ник"
msgid "join a channel"
msgstr "зайти на канал"
msgid "channel[,channel] [key[,key]]"
#, fuzzy
msgid "[channel[,channel] [key[,key]]]"
msgstr "канал[,канал] [ключ[,ключ]]"
msgid ""
@@ -3773,7 +3769,12 @@ msgstr "запросить местное время сервера"
msgid "merge server buffers"
msgstr "управление буферами"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "открывать новые каналы/приваты рядом с сервером"
#, fuzzy
msgid "open new privates near server"
msgstr "открывать новые каналы/приваты рядом с сервером"
msgid "text to display before nick in chat window"
@@ -3853,6 +3854,10 @@ msgstr "цвет ников"
msgid "color for away item"
msgstr "цвет отошедших ников"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "цвет имён при действиях"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -4677,6 +4682,12 @@ msgstr "Список игнорирования:\n"
msgid "%sError: unable to load plugin \"%s\": %s"
msgstr "%s не могу загрузить plugin \"%s\": %s\n"
#, c-format
msgid ""
"%sIf you're trying to load a script and not a C plugin, try command to load "
"scripts (/perl, /python, ...)"
msgstr ""
#, fuzzy, c-format
msgid "%sError: symbol \"%s\" not found in plugin \"%s\", failed to load"
msgstr ""
@@ -5488,6 +5499,14 @@ msgstr "%s DCC: не могу установить неблокирующий р
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s нет аргумента для параметра \"%s\"\n"
#, fuzzy
#~ msgid "text color for nick name in input line"
#~ msgstr "цвет ников"
#, fuzzy
#~ msgid "text color for nicklist separator"
#~ msgstr "цвет разделителя ников"
#, fuzzy
#~ msgid "servers"
#~ msgstr "сервер"
@@ -5661,10 +5680,6 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "один буфер для всех серверов"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr "открывать новые каналы/приваты рядом с сервером"
#~ msgid "smart completion for nicks (completes with last speakers first)"
#~ msgstr "умное дополнение ников (начинает перебор с последних собеседников)"
@@ -6123,10 +6138,6 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
#~ msgid "text color for server name in input line"
#~ msgstr "цвет названия сервера"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "цвет имён при действиях"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "цвет разделителей информационной панели"
+21 -12
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: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-08-09 12:17+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"
@@ -832,7 +832,7 @@ msgid ""
" tags: comma separated list of tags, for example: \"irc_join,"
"irc_part,irc_quit\"\n"
" regex: regular expression to search in line (use \\t to separate "
"prefix from message)\n"
"prefix from message, special chars like '|' must be escaped: '\\|')\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -1283,6 +1283,9 @@ msgid ""
"100 means one page, 50 half-page)"
msgstr ""
msgid "alert user when text sought is not found in buffer"
msgstr ""
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
@@ -1429,9 +1432,6 @@ msgstr ""
msgid "text color for buffer with new data (status bar)"
msgstr ""
msgid "text color for nick name in input line"
msgstr ""
msgid "text color for unsucessful text search in input line"
msgstr ""
@@ -1462,9 +1462,6 @@ msgstr ""
msgid "text color for '+' when scrolling nicks in nicklist"
msgstr ""
msgid "text color for nicklist separator"
msgstr ""
msgid ""
"default completion template (please see documentation for template codes and "
"values)"
@@ -2035,7 +2032,7 @@ msgstr ""
msgid "%s%s: error creating aspell dictionary \"%s\" => \"%s\""
msgstr ""
msgid "color used for mispelled words"
msgid "color used for misspelled words"
msgstr ""
msgid ""
@@ -2046,7 +2043,7 @@ msgstr ""
msgid ""
"default dictionary (or comma separated list of dictionaries) to use when "
"buffer has no dictionary defined (leave blank to disable aspell on buffers "
"for which you didn't explicitely enabled it)"
"for which you didn't explicitly enabled it)"
msgstr ""
msgid "check words during text search in buffer"
@@ -2642,7 +2639,7 @@ msgstr ""
msgid "join a channel"
msgstr ""
msgid "channel[,channel] [key[,key]]"
msgid "[channel[,channel] [key[,key]]]"
msgstr ""
msgid ""
@@ -3210,7 +3207,10 @@ msgstr ""
msgid "merge server buffers"
msgstr ""
msgid "open new channels/privates near server"
msgid "open new channels near server"
msgstr ""
msgid "open new privates near server"
msgstr ""
msgid "text to display before nick in chat window"
@@ -3283,6 +3283,9 @@ msgstr ""
msgid "color for away item"
msgstr ""
msgid "color for channel modes, near channel name"
msgstr ""
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
@@ -4050,6 +4053,12 @@ msgstr ""
msgid "%sError: unable to load plugin \"%s\": %s"
msgstr ""
#, c-format
msgid ""
"%sIf you're trying to load a script and not a C plugin, try command to load "
"scripts (/perl, /python, ...)"
msgstr ""
#, c-format
msgid "%sError: symbol \"%s\" not found in plugin \"%s\", failed to load"
msgstr ""
+3 -2
View File
@@ -1490,7 +1490,7 @@ command_help (void *data, struct t_gui_buffer *buffer,
GUI_COLOR(GUI_COLOR_CHAT));
gui_chat_printf (NULL, " %s: %s",
_("description"),
_(ptr_option->description));
(ptr_option->description) ? _(ptr_option->description) : "");
switch (ptr_option->type)
{
case CONFIG_OPTION_TYPE_BOOLEAN:
@@ -4075,7 +4075,8 @@ command_init ()
" tags: comma separated list of tags, for "
"example: \"irc_join,irc_part,irc_quit\"\n"
" regex: regular expression to search in "
"line (use \\t to separate prefix from message)\n\n"
"line (use \\t to separate prefix from message, special "
"chars like '|' must be escaped: '\\|')\n\n"
"The default key alt+'=' toggles filtering on/off.\n\n"
"Examples:\n"
" use IRC smart filter for join/part/quit messages:\n"
+6 -6
View File
@@ -453,9 +453,9 @@ config_file_new_option (struct t_config_file *config_file,
case CONFIG_OPTION_TYPE_INTEGER:
if (string_values && string_values[0])
{
new_option->string_values = string_explode (string_values,
"|", 0, 0,
&argc);
new_option->string_values = string_split (string_values,
"|", 0, 0,
&argc);
if (!new_option->string_values)
goto error;
}
@@ -2291,7 +2291,7 @@ config_file_option_free_data (struct t_config_option *option)
if (option->description)
free (option->description);
if (option->string_values)
string_free_exploded (option->string_values);
string_free_split (option->string_values);
if (option->default_value)
free (option->default_value);
if (option->value)
@@ -2557,8 +2557,8 @@ config_file_add_to_infolist (struct t_infolist *infolist,
free (option_full_name);
return 0;
}
string_values = string_build_with_exploded ((const char **)ptr_option->string_values,
"|");
string_values = string_build_with_split_string ((const char **)ptr_option->string_values,
"|");
if (!infolist_new_var_string (ptr_item,
"string_values",
string_values))
+15 -23
View File
@@ -99,6 +99,7 @@ struct t_config_option *config_look_save_config_on_exit;
struct t_config_option *config_look_save_layout_on_exit;
struct t_config_option *config_look_scroll_amount;
struct t_config_option *config_look_scroll_page_percent;
struct t_config_option *config_look_search_text_not_found_alert;
struct t_config_option *config_look_set_title;
/* config, colors section */
@@ -137,7 +138,6 @@ struct t_config_option *config_color_status_data_private;
struct t_config_option *config_color_status_data_highlight;
struct t_config_option *config_color_status_data_other;
struct t_config_option *config_color_status_more;
struct t_config_option *config_color_input_nick;
struct t_config_option *config_color_input_text_not_found;
struct t_config_option *config_color_input_actions;
struct t_config_option *config_color_nicklist_group;
@@ -148,7 +148,6 @@ struct t_config_option *config_color_nicklist_prefix3;
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;
/* config, completion section */
@@ -760,7 +759,7 @@ config_weechat_layout_read_cb (void *data, struct t_config_file *config_file,
{
if (string_strcasecmp (option_name, "buffer") == 0)
{
argv = string_explode (value, ";", 0, 0, &argc);
argv = string_split (value, ";", 0, 0, &argc);
if (argv)
{
if (argc >= 3)
@@ -774,12 +773,12 @@ config_weechat_layout_read_cb (void *data, struct t_config_file *config_file,
argv[0], argv[1], number1);
}
}
string_free_exploded (argv);
string_free_split (argv);
}
}
else if (string_strcasecmp (option_name, "window") == 0)
{
argv = string_explode (value, ";", 0, 0, &argc);
argv = string_split (value, ";", 0, 0, &argc);
if (argv)
{
if (argc >= 6)
@@ -808,7 +807,7 @@ config_weechat_layout_read_cb (void *data, struct t_config_file *config_file,
argv[5] : NULL);
}
}
string_free_exploded (argv);
string_free_split (argv);
}
}
}
@@ -1035,17 +1034,17 @@ config_weechat_filter_read_cb (void *data,
if (option_name && value && value[0])
{
argv = string_explode (value, ";", 0, 0, &argc);
argv_eol = string_explode (value, ";", 1, 0, NULL);
argv = string_split (value, ";", 0, 0, &argc);
argv_eol = string_split (value, ";", 1, 0, NULL);
if (argv && argv_eol && (argc >= 4))
{
gui_filter_new ((string_strcasecmp (argv[0], "on") == 0) ? 1 : 0,
option_name, argv[1], argv[2], argv_eol[3]);
}
if (argv)
string_free_exploded (argv);
string_free_split (argv);
if (argv_eol)
string_free_exploded (argv_eol);
string_free_split (argv_eol);
}
return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
@@ -1397,7 +1396,7 @@ config_weechat_init_options ()
weechat_config_file, ptr_section,
"save_layout_on_exit", "integer",
N_("save layout on exit (buffers, windows, or both)"),
"none|buffers|windows|all", 0, 0, "all", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
"none|buffers|windows|all", 0, 0, "none", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_scroll_amount = config_file_new_option (
weechat_config_file, ptr_section,
"scroll_amount", "integer",
@@ -1410,6 +1409,11 @@ config_weechat_init_options ()
N_("percent of screen to scroll when scrolling one page up or down "
"(for example 100 means one page, 50 half-page)"),
NULL, 1, 100, "100", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_search_text_not_found_alert = config_file_new_option (
weechat_config_file, ptr_section,
"search_text_not_found_alert", "boolean",
N_("alert user when text sought is not found in buffer"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_set_title = config_file_new_option (
weechat_config_file, ptr_section,
"set_title", "boolean",
@@ -1717,12 +1721,6 @@ config_weechat_init_options ()
NULL, -1, 0, "yellow", NULL, 0,
NULL, NULL, &config_change_color, NULL, NULL, NULL);
/* input window */
config_color_input_nick = config_file_new_option (
weechat_config_file, ptr_section,
"input_nick", "color",
N_("text color for nick name in input line"),
NULL, -1, 0, "lightcyan", NULL, 0,
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_input_text_not_found = config_file_new_option (
weechat_config_file, ptr_section,
"input_text_not_found", "color",
@@ -1784,12 +1782,6 @@ config_weechat_init_options ()
N_("text color for '+' when scrolling nicks in nicklist"),
NULL, -1, 0, "lightmagenta", NULL, 0,
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_nicklist_separator = config_file_new_option (
weechat_config_file, ptr_section,
"nicklist_separator", "color",
N_("text color for nicklist separator"),
NULL, -1, 0, "blue", NULL, 0,
NULL, NULL, &config_change_color, NULL, NULL, NULL);
/* completion */
ptr_section = config_file_new_section (weechat_config_file, "completion",
+1 -2
View File
@@ -114,6 +114,7 @@ extern struct t_config_option *config_look_save_config_on_exit;
extern struct t_config_option *config_look_save_layout_on_exit;
extern struct t_config_option *config_look_scroll_amount;
extern struct t_config_option *config_look_scroll_page_percent;
extern struct t_config_option *config_look_search_text_not_found_alert;
extern struct t_config_option *config_look_set_title;
extern struct t_config_option *config_color_separator;
@@ -150,7 +151,6 @@ extern struct t_config_option *config_color_status_data_private;
extern struct t_config_option *config_color_status_data_highlight;
extern struct t_config_option *config_color_status_data_other;
extern struct t_config_option *config_color_status_more;
extern struct t_config_option *config_color_input_nick;
extern struct t_config_option *config_color_input_text_not_found;
extern struct t_config_option *config_color_input_actions;
extern struct t_config_option *config_color_nicklist_group;
@@ -161,7 +161,6 @@ extern struct t_config_option *config_color_nicklist_prefix3;
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_completion_default_template;
extern struct t_config_option *config_completion_nick_add_space;
+32 -17
View File
@@ -426,9 +426,9 @@ hook_command_build_completion (struct t_hook_command *hook_command)
hook_command->cplt_templates_static[i] = strdup (hook_command->cplt_templates[i]);
/* build arguments for each template */
hook_command->cplt_template_args[i] = string_explode (hook_command->cplt_templates[i],
" ", 0, 0,
&(hook_command->cplt_template_num_args[i]));
hook_command->cplt_template_args[i] = string_split (hook_command->cplt_templates[i],
" ", 0, 0,
&(hook_command->cplt_template_num_args[i]));
if (hook_command->cplt_template_num_args[i] > hook_command->cplt_template_num_args_concat)
hook_command->cplt_template_num_args_concat = hook_command->cplt_template_num_args[i];
}
@@ -464,8 +464,8 @@ hook_command_build_completion (struct t_hook_command *hook_command)
{
if (i < hook_command->cplt_template_num_args[j])
{
items = string_explode (hook_command->cplt_template_args[j][i],
"|", 0, 0, &num_items);
items = string_split (hook_command->cplt_template_args[j][i],
"|", 0, 0, &num_items);
for (k = 0; k < num_items; k++)
{
if (!weelist_search (list, items[k]))
@@ -478,11 +478,12 @@ hook_command_build_completion (struct t_hook_command *hook_command)
NULL);
}
}
string_free_exploded (items);
string_free_split (items);
}
}
}
}
weelist_free (list);
}
}
@@ -583,13 +584,13 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
rc = -1;
argv = string_explode (string, " ", 0, 0, &argc);
argv = string_split (string, " ", 0, 0, &argc);
if (argc == 0)
{
string_free_exploded (argv);
string_free_split (argv);
return -1;
}
argv_eol = string_explode (string, " ", 1, 0, NULL);
argv_eol = string_split (string, " ", 1, 0, NULL);
hook_exec_start ();
@@ -659,8 +660,8 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
}
}
string_free_exploded (argv);
string_free_exploded (argv_eol);
string_free_split (argv);
string_free_split (argv_eol);
hook_exec_end ();
@@ -1230,7 +1231,7 @@ hook_process_child (struct t_hook *hook_process)
void
hook_process_child_read (struct t_hook *hook_process, int fd,
int stdout, struct t_hook **hook_fd)
int out, struct t_hook **hook_fd)
{
char buffer[4096];
int num_read;
@@ -1243,8 +1244,8 @@ hook_process_child_read (struct t_hook *hook_process, int fd,
(hook_process->callback_data,
HOOK_PROCESS(hook_process, command),
WEECHAT_HOOK_PROCESS_RUNNING,
(stdout) ? buffer : NULL,
(stdout) ? NULL : buffer);
(out) ? buffer : NULL,
(out) ? NULL : buffer);
}
else if (num_read == 0)
{
@@ -1515,8 +1516,8 @@ hook_print (struct t_weechat_plugin *plugin, struct t_gui_buffer *buffer,
new_hook_print->buffer = buffer;
if (tags)
{
new_hook_print->tags_array = string_explode (tags, ",", 0, 0,
&new_hook_print->tags_count);
new_hook_print->tags_array = string_split (tags, ",", 0, 0,
&new_hook_print->tags_count);
}
else
{
@@ -2172,12 +2173,26 @@ unhook (struct t_hook *hook)
free (HOOK_COMMAND(hook, cplt_templates)[i]);
if (HOOK_COMMAND(hook, cplt_templates_static)[i])
free (HOOK_COMMAND(hook, cplt_templates_static)[i]);
string_free_exploded (HOOK_COMMAND(hook, cplt_template_args)[i]);
string_free_split (HOOK_COMMAND(hook, cplt_template_args)[i]);
}
free (HOOK_COMMAND(hook, cplt_templates));
}
if (HOOK_COMMAND(hook, cplt_templates_static))
free (HOOK_COMMAND(hook, cplt_templates_static));
if (HOOK_COMMAND(hook, cplt_template_num_args))
free (HOOK_COMMAND(hook, cplt_template_num_args));
if (HOOK_COMMAND(hook, cplt_template_args))
free (HOOK_COMMAND(hook, cplt_template_args));
if (HOOK_COMMAND(hook, cplt_template_args_concat))
{
for (i = 0;
i < HOOK_COMMAND(hook, cplt_template_num_args_concat);
i++)
{
free (HOOK_COMMAND(hook, cplt_template_args_concat[i]));
}
free (HOOK_COMMAND(hook, cplt_template_args_concat));
}
break;
case HOOK_TYPE_COMMAND_RUN:
if (HOOK_COMMAND_RUN(hook, command))
+2 -2
View File
@@ -160,8 +160,8 @@ struct t_hook_fd
/* hook process */
typedef int (t_hook_callback_process)(void *data, const char *command,
int return_code, const char *stdout,
const char *stderr);
int return_code, const char *out,
const char *err);
struct t_hook_process
{
+31 -29
View File
@@ -727,23 +727,23 @@ string_mask_to_regex (const char *mask)
}
/*
* string_explode: explode a string according to separators
* examples:
* string_explode ("abc de fghi", " ", 0, 0, NULL)
* ==> array[0] = "abc"
* array[1] = "de"
* array[2] = "fghi"
* array[3] = NULL
* string_explode ("abc de fghi", " ", 1, 0, NULL)
* ==> array[0] = "abc de fghi"
* array[1] = "de fghi"
* array[2] = "fghi"
* array[3] = NULL
* string_split: split a string according to separators
* examples:
* string_split ("abc de fghi", " ", 0, 0, NULL)
* ==> array[0] = "abc"
* array[1] = "de"
* array[2] = "fghi"
* array[3] = NULL
* string_split ("abc de fghi", " ", 1, 0, NULL)
* ==> array[0] = "abc de fghi"
* array[1] = "de fghi"
* array[2] = "fghi"
* array[3] = NULL
*/
char **
string_explode (const char *string, const char *separators, int keep_eol,
int num_items_max, int *num_items)
string_split (const char *string, const char *separators, int keep_eol,
int num_items_max, int *num_items)
{
int i, j, n_items;
char *string2, **array;
@@ -867,42 +867,44 @@ string_explode (const char *string, const char *separators, int keep_eol,
}
/*
* string_free_exploded: free an exploded string
* string_free_split: free a split string
*/
void
string_free_exploded (char **exploded_string)
string_free_split (char **split_string)
{
int i;
if (exploded_string)
if (split_string)
{
for (i = 0; exploded_string[i]; i++)
free (exploded_string[i]);
free (exploded_string);
for (i = 0; split_string[i]; i++)
free (split_string[i]);
free (split_string);
}
}
/*
* string_build_with_exploded: build a string with exploded string
* note: returned value has to be free() after use
* string_build_with_split_string: build a string with a split string
* note: returned value has to be free() after
* use
*/
char *
string_build_with_exploded (const char **exploded_string, const char *separator)
string_build_with_split_string (const char **split_string,
const char *separator)
{
int i, length, length_separator;
char *result;
if (!exploded_string)
if (!split_string)
return NULL;
length = 0;
length_separator = (separator) ? strlen (separator) : 0;
for (i = 0; exploded_string[i]; i++)
for (i = 0; split_string[i]; i++)
{
length += strlen (exploded_string[i]) + length_separator;
length += strlen (split_string[i]) + length_separator;
}
result = malloc (length + 1);
@@ -910,10 +912,10 @@ string_build_with_exploded (const char **exploded_string, const char *separator)
{
result[0] = '\0';
for (i = 0; exploded_string[i]; i++)
for (i = 0; split_string[i]; i++)
{
strcat (result, exploded_string[i]);
if (separator && exploded_string[i + 1])
strcat (result, split_string[i]);
if (separator && split_string[i + 1])
strcat (result, separator);
}
}
+5 -5
View File
@@ -42,11 +42,11 @@ extern char *string_convert_hex_chars (const char *string);
extern int string_has_highlight (const char *string,
const char *highlight_words);
extern char *string_mask_to_regex (const char *mask);
extern char **string_explode (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
extern void string_free_exploded (char **exploded_string);
extern char *string_build_with_exploded (const char **exploded_string,
const char *separator);
extern char **string_split (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
extern void string_free_split (char **split_string);
extern char *string_build_with_split_string (const char **split_string,
const char *separator);
extern char **string_split_command (const char *command, char separator);
extern void string_free_split_command (char **split_command);
extern char *string_iconv (int from_utf8, const char *from_code,
+2 -2
View File
@@ -263,7 +263,7 @@ upgrade_file_write_object (struct t_upgrade_file *upgrade_file, int object_id,
fields = infolist_fields (infolist);
if (fields)
{
argv = string_explode (fields, ",", 0, 0, &argc);
argv = string_split (fields, ",", 0, 0, &argc);
if (argv && (argc > 0))
{
for (i = 0; i < argc; i++)
@@ -372,7 +372,7 @@ upgrade_file_write_object (struct t_upgrade_file *upgrade_file, int object_id,
}
}
if (argv)
string_free_exploded (argv);
string_free_split (argv);
}
/* write object end */
+24 -11
View File
@@ -458,19 +458,32 @@ upgrade_weechat_read_cb (void *data,
/* add line to current buffer */
if (upgrade_current_buffer)
{
new_line = gui_line_add (
upgrade_current_buffer,
infolist_time (infolist, "date"),
infolist_time (infolist, "date_printed"),
infolist_string (infolist, "tags"),
infolist_string (infolist, "prefix"),
infolist_string (infolist, "message"));
if (new_line)
switch (upgrade_current_buffer->type)
{
new_line->data->highlight = infolist_integer (infolist, "highlight");
case GUI_BUFFER_TYPE_FORMATTED:
new_line = gui_line_add (
upgrade_current_buffer,
infolist_time (infolist, "date"),
infolist_time (infolist, "date_printed"),
infolist_string (infolist, "tags"),
infolist_string (infolist, "prefix"),
infolist_string (infolist, "message"));
if (new_line)
{
new_line->data->highlight = infolist_integer (infolist, "highlight");
if (infolist_integer (infolist, "last_read_line"))
upgrade_current_buffer->lines->last_read_line = new_line;
}
break;
case GUI_BUFFER_TYPE_FREE:
gui_line_add_y (
upgrade_current_buffer,
infolist_integer (infolist, "y"),
infolist_string (infolist, "message"));
break;
case GUI_BUFFER_NUM_TYPES:
break;
}
if (infolist_integer (infolist, "last_read_line"))
upgrade_current_buffer->lines->last_read_line = new_line;
}
break;
case UPGRADE_WEECHAT_TYPE_NICKLIST:
+8 -6
View File
@@ -457,10 +457,12 @@ utf8_charcasecmp (const char *string1, const char *string2)
return (string1) ? 1 : ((string2) ? -1 : 0);
wchar1 = utf8_wide_char (string1);
wchar1 = towlower (wchar1);
if ((wchar1 >= 'A') && (wchar1 <= 'Z'))
wchar1 += ('a' - 'A');
wchar2 = utf8_wide_char (string2);
wchar2 = towlower (wchar2);
if ((wchar2 >= 'A') && (wchar2 <= 'Z'))
wchar2 += ('a' - 'A');
return (wchar1 < wchar2) ? -1 : ((wchar1 == wchar2) ? 0 : 1);
}
@@ -562,17 +564,17 @@ utf8_pos (const char *string, int real_pos)
*/
char *
utf8_strndup (const char *string, int max_chars)
utf8_strndup (const char *string, int length)
{
const char *end;
if (!string || (max_chars < 0))
if (!string || (length < 0))
return NULL;
if (max_chars == 0)
if (length == 0)
return strdup ("");
end = utf8_add_offset (string, max_chars);
end = utf8_add_offset (string, length);
if (!end || (end == string))
return strdup (string);
+1 -1
View File
@@ -50,6 +50,6 @@ extern int utf8_char_size_screen (const char *string);
extern char *utf8_add_offset (const char *string, int offset);
extern int utf8_real_pos (const char *string, int pos);
extern int utf8_pos (const char *string, int real_pos);
extern char *utf8_strndup (const char *string, int max_chars);
extern char *utf8_strndup (const char *string, int length);
#endif /* wee-utf8.h */
+4 -4
View File
@@ -430,7 +430,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
content = gui_bar_window_content_get_with_filling (bar_window, window);
if (content)
{
items = string_explode (content, "\n", 0, 0, &items_count);
items = string_split (content, "\n", 0, 0, &items_count);
if (items_count == 0)
{
if (CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_SIZE]) == 0)
@@ -495,7 +495,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
y = 0;
some_data_not_displayed = 0;
if ((bar_window->scroll_y > 0)
&& (bar_window->scroll_y >= items_count))
&& (bar_window->scroll_y > items_count - bar_window->height))
{
bar_window->scroll_y = items_count - bar_window->height;
if (bar_window->scroll_y < 0)
@@ -594,7 +594,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
}
}
if (items)
string_free_exploded (items);
string_free_split (items);
free (content);
}
else
@@ -607,7 +607,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
/* move cursor if it was asked in an item content (input_text does that
to move cursor in user input text) */
if (window && (gui_current_window == window)
if ((!window || (gui_current_window == window))
&& (bar_window->cursor_x >= 0) && (bar_window->cursor_y >= 0))
{
move (bar_window->cursor_y, bar_window->cursor_x);
+5 -4
View File
@@ -128,7 +128,7 @@ gui_chat_display_new_line (struct t_gui_window *window, int num_lines, int count
void
gui_chat_display_horizontal_line (struct t_gui_window *window, int simulate)
{
int i;
int i, n;
if (!simulate)
{
@@ -140,15 +140,16 @@ gui_chat_display_horizontal_line (struct t_gui_window *window, int simulate)
mvwhline (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, window->win_chat_cursor_x,
ACS_HLINE,
window->win_chat_width);
window->win_chat_width - 1);
break;
case CONFIG_LOOK_READ_MARKER_DOTTED_LINE:
wmove (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, window->win_chat_cursor_x);
wclrtoeol (GUI_WINDOW_OBJECTS(window)->win_chat);
for (i = 0; i < window->win_chat_width; i++)
n = (window->win_chat_width % 2);
for (i = 0; i < window->win_chat_width - 1; i++)
{
if (i % 2 != 0)
if (i % 2 == n)
mvwhline (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, i,
ACS_HLINE, 1);
+1
View File
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <libgen.h>
#include <sys/ioctl.h>
+11 -5
View File
@@ -1044,11 +1044,17 @@ gui_bar_item_default_completion (void *data, struct t_gui_bar_item *item,
/* make C compiler happy */
(void) data;
(void) item;
(void) window;
if (!window)
window = gui_current_window;
if (!window->buffer->completion
|| !window->buffer->completion->partial_completion_list)
return NULL;
length = 1;
for (ptr_item = gui_completion_partial_list; ptr_item;
ptr_item = ptr_item->next_item)
for (ptr_item = window->buffer->completion->partial_completion_list;
ptr_item; ptr_item = ptr_item->next_item)
{
length += strlen (ptr_item->word) + 32;
}
@@ -1057,8 +1063,8 @@ gui_bar_item_default_completion (void *data, struct t_gui_bar_item *item,
if (buf)
{
buf[0] = '\0';
for (ptr_item = gui_completion_partial_list; ptr_item;
ptr_item = ptr_item->next_item)
for (ptr_item = window->buffer->completion->partial_completion_list;
ptr_item; ptr_item = ptr_item->next_item)
{
strcat (buf, GUI_COLOR_CUSTOM_BAR_FG);
strcat (buf, ptr_item->word);
+3 -3
View File
@@ -546,8 +546,8 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
i, sub);
if (ptr_content && ptr_content[0])
{
split_items[i][sub] = string_explode (ptr_content,
"\n", 0, 0, NULL);
split_items[i][sub] = string_split (ptr_content,
"\n", 0, 0, NULL);
for (j = 0; split_items[i][sub][j]; j++)
{
total_items++;
@@ -665,7 +665,7 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
for (sub = 0; sub < bar_window->items_subcount[i]; sub++)
{
if (split_items[i][sub])
string_free_exploded (split_items[i][sub]);
string_free_split (split_items[i][sub]);
}
free (split_items[i]);
}
+65 -146
View File
@@ -29,6 +29,7 @@
#include "../core/weechat.h"
#include "../core/wee-config.h"
#include "../core/wee-hook.h"
#include "../core/wee-infolist.h"
#include "../core/wee-log.h"
#include "../core/wee-string.h"
@@ -406,8 +407,10 @@ int
gui_bar_check_conditions_for_window (struct t_gui_bar *bar,
struct t_gui_window *window)
{
int i;
int i, rc;
char str_modifier[256], str_window[128], *str_displayed;
/* check bar conditions */
for (i = 0; i < bar->conditions_count; i++)
{
if (string_strcasecmp (bar->conditions_array[i], "active") == 0)
@@ -427,7 +430,26 @@ gui_bar_check_conditions_for_window (struct t_gui_bar *bar,
}
}
return 1;
/* call a modifier that will tell us if bar is displayed or not,
for example it can be used to display nicklist on some buffers
only, using a script that implements this modifier and return "1"
to display bar, "0" to hide it */
snprintf (str_modifier, sizeof (str_modifier),
"bar_condition_%s", bar->name);
snprintf (str_window, sizeof (str_window),
"0x%lx", (long unsigned int)(window));
str_displayed = hook_modifier_exec (NULL,
str_modifier,
str_window,
"");
if (str_displayed && strcmp (str_displayed, "0") == 0)
rc = 0;
else
rc = 1;
if (str_displayed)
free (str_displayed);
return rc;
}
/*
@@ -659,7 +681,7 @@ gui_bar_free_items_array (struct t_gui_bar *bar)
for (i = 0; i < bar->items_count; i++)
{
if (bar->items_array[i])
string_free_exploded (bar->items_array[i]);
string_free_split (bar->items_array[i]);
}
if (bar->items_array)
{
@@ -688,7 +710,7 @@ gui_bar_set_items_array (struct t_gui_bar *bar, const char *items)
if (items && items[0])
{
tmp_array = string_explode (items, ",", 0, 0, &count);
tmp_array = string_split (items, ",", 0, 0, &count);
if (count > 0)
{
bar->items_count = count;
@@ -696,11 +718,11 @@ gui_bar_set_items_array (struct t_gui_bar *bar, const char *items)
bar->items_array = malloc (count * sizeof (*bar->items_array));
for (i = 0; i < count; i++)
{
bar->items_array[i] = string_explode (tmp_array[i], "+", 0, 0,
&(bar->items_subcount[i]));
bar->items_array[i] = string_split (tmp_array[i], "+", 0, 0,
&(bar->items_subcount[i]));
}
}
string_free_exploded (tmp_array);
string_free_split (tmp_array);
}
}
@@ -834,14 +856,14 @@ gui_bar_config_change_conditions (void *data, struct t_config_option *option)
if (ptr_bar)
{
if (ptr_bar->conditions_array)
string_free_exploded (ptr_bar->conditions_array);
string_free_split (ptr_bar->conditions_array);
if (CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_CONDITIONS])
&& CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_CONDITIONS])[0])
{
ptr_bar->conditions_array = string_explode (CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_CONDITIONS]),
",", 0, 0,
&ptr_bar->conditions_count);
ptr_bar->conditions_array = string_split (CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_CONDITIONS]),
",", 0, 0,
&ptr_bar->conditions_count);
}
else
{
@@ -970,9 +992,10 @@ gui_bar_config_change_size (void *data, struct t_config_option *option)
(void) data;
ptr_bar = gui_bar_search_with_option_name (option->name);
if (ptr_bar)
if (ptr_bar && !CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]))
{
gui_bar_apply_current_size (ptr_bar);
gui_bar_refresh (ptr_bar);
}
}
@@ -983,11 +1006,26 @@ gui_bar_config_change_size (void *data, struct t_config_option *option)
void
gui_bar_config_change_size_max (void *data, struct t_config_option *option)
{
struct t_gui_bar *ptr_bar;
char value[32];
/* make C compiler happy */
(void) data;
(void) option;
gui_window_ask_refresh (1);
ptr_bar = gui_bar_search_with_option_name (option->name);
if (ptr_bar && !CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]))
{
if ((CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SIZE_MAX]) > 0)
&& (CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SIZE]) >
CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SIZE_MAX])))
{
snprintf (value, sizeof (value), "%d",
CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SIZE_MAX]));
config_file_option_set (ptr_bar->options[GUI_BAR_OPTION_SIZE], value, 1);
}
gui_window_ask_refresh (1);
}
}
/*
@@ -1103,123 +1141,6 @@ gui_bar_set_name (struct t_gui_bar *bar, const char *name)
}
}
/*
* gui_bar_set_priority: set priority for a bar
*/
void
gui_bar_set_priority (struct t_gui_bar *bar, const char *priority)
{
long number;
char *error;
error = NULL;
number = strtol (priority, &error, 10);
if (error && !error[0])
{
if (number < 0)
number = 0;
/* bar number is already ok? */
if (number == CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_PRIORITY]))
return;
config_file_option_set (bar->options[GUI_BAR_OPTION_PRIORITY], priority, 1);
}
}
/*
* gui_bar_set_position: set position for a bar
*/
void
gui_bar_set_position (struct t_gui_bar *bar, const char *position)
{
int position_value;
if (!position || !position[0])
return;
position_value = gui_bar_search_position (position);
if ((position_value >= 0)
&& (CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_POSITION]) != position_value))
{
config_file_option_set (bar->options[GUI_BAR_OPTION_POSITION], position, 1);
}
}
/*
* gui_bar_set_size: set size for a bar
*/
void
gui_bar_set_size (struct t_gui_bar *bar, const char *size)
{
long number;
char *error, value[32];
int new_size;
error = NULL;
number = strtol (((size[0] == '+') || (size[0] == '-')) ?
size + 1 : size,
&error,
10);
if (error && !error[0])
{
new_size = number;
if (size[0] == '+')
new_size = CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]) + new_size;
else if (value[0] == '-')
new_size = CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]) - new_size;
if ((size[0] == '-') && (new_size < 1))
return;
if (new_size < 0)
return;
/* check if new size is ok if it's more than before */
if ((new_size != 0) &&
((CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]) == 0)
|| (new_size > CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]))))
{
if (!gui_bar_check_size_add (bar,
new_size - CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE])))
return;
}
snprintf (value, sizeof (value), "%d", new_size);
config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE], value, 1);
gui_bar_apply_current_size (bar);
}
}
/*
* gui_bar_set_size_max: set max size for a bar
*/
void
gui_bar_set_size_max (struct t_gui_bar *bar, const char *size)
{
long number;
char *error, value[32];
error = NULL;
number = strtol (size, &error, 10);
if (error && !error[0])
{
if (number < 0)
return;
snprintf (value, sizeof (value), "%ld", number);
config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE_MAX], value, 1);
if ((number > 0) &&
((CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]) == 0)
|| (number < CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]))))
gui_bar_set_size (bar, value);
}
}
/*
* gui_bar_set: set a property for a bar
* return: 1 if ok, 0 if error
@@ -1243,7 +1164,7 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value)
}
else if (string_strcasecmp (property, "priority") == 0)
{
gui_bar_set_priority (bar, value);
config_file_option_set (bar->options[GUI_BAR_OPTION_PRIORITY], value, 1);
return 1;
}
else if (string_strcasecmp (property, "conditions") == 0)
@@ -1253,7 +1174,7 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value)
}
else if (string_strcasecmp (property, "position") == 0)
{
gui_bar_set_position (bar, value);
config_file_option_set (bar->options[GUI_BAR_OPTION_POSITION], value, 1);
return 1;
}
else if (string_strcasecmp (property, "filling_top_bottom") == 0)
@@ -1268,14 +1189,12 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value)
}
else if (string_strcasecmp (property, "size") == 0)
{
gui_bar_set_size (bar, value);
gui_bar_refresh (bar);
config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE], value, 1);
return 1;
}
else if (string_strcasecmp (property, "size_max") == 0)
{
gui_bar_set_size_max (bar, value);
gui_bar_refresh (bar);
config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE_MAX], value, 1);
return 1;
}
else if (string_strcasecmp (property, "color_fg") == 0)
@@ -1604,9 +1523,9 @@ gui_bar_new_with_options (const char *name,
new_bar->options[GUI_BAR_OPTION_CONDITIONS] = conditions;
if (CONFIG_STRING(conditions) && CONFIG_STRING(conditions)[0])
{
new_bar->conditions_array = string_explode (CONFIG_STRING(conditions),
",", 0, 0,
&new_bar->conditions_count);
new_bar->conditions_array = string_split (CONFIG_STRING(conditions),
",", 0, 0,
&new_bar->conditions_count);
}
else
{
@@ -1875,23 +1794,23 @@ gui_bar_create_default_input ()
{
/* create input bar */
length = 1 /* "[" */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_PASTE])
+ 3 /* "],[" */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_PROMPT])
+ 3 /* "]+(" */
+ 4 /* "away" */
+ 3 /* "),[" */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_SEARCH])
+ 3 /* "],[" */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_PASTE])
+ 2 /* "]," */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_TEXT])
+ 1 /* \0 */;
buf = malloc (length);
if (buf)
{
snprintf (buf, length, "[%s],[%s]+(away),[%s],%s",
gui_bar_item_names[GUI_BAR_ITEM_INPUT_PASTE],
snprintf (buf, length, "[%s]+(away),[%s],[%s],%s",
gui_bar_item_names[GUI_BAR_ITEM_INPUT_PROMPT],
gui_bar_item_names[GUI_BAR_ITEM_INPUT_SEARCH],
gui_bar_item_names[GUI_BAR_ITEM_INPUT_PASTE],
gui_bar_item_names[GUI_BAR_ITEM_INPUT_TEXT]);
if (gui_bar_new (GUI_BAR_DEFAULT_NAME_INPUT,
"0", /* hidden */
@@ -2246,7 +2165,7 @@ gui_bar_free (struct t_gui_bar *bar)
config_file_option_free (bar->options[i]);
}
if (bar->conditions_array)
string_free_exploded (bar->conditions_array);
string_free_split (bar->conditions_array);
gui_bar_free_items_array (bar);
free (bar);
+2 -2
View File
@@ -85,10 +85,10 @@ struct t_gui_bar
/* internal vars */
int conditions_count; /* number of conditions */
char **conditions_array; /* exploded bar conditions */
char **conditions_array; /* bar conditions (after split) */
int items_count; /* number of bar items */
int *items_subcount; /* number of sub items */
char ***items_array; /* exploded bar items */
char ***items_array; /* bar items (after split) */
struct t_gui_bar_window *bar_window; /* pointer to bar window */
/* (for type root only) */
int bar_refresh_needed; /* refresh for bar is needed? */
+54 -13
View File
@@ -872,16 +872,16 @@ gui_buffer_set_highlight_tags (struct t_gui_buffer *buffer,
if (buffer->highlight_tags)
free (buffer->highlight_tags);
if (buffer->highlight_tags_array)
string_free_exploded (buffer->highlight_tags_array);
string_free_split (buffer->highlight_tags_array);
if (new_highlight_tags)
{
buffer->highlight_tags = strdup (new_highlight_tags);
if (buffer->highlight_tags)
{
buffer->highlight_tags_array = string_explode (new_highlight_tags,
",", 0, 0,
&buffer->highlight_tags_count);
buffer->highlight_tags_array = string_split (new_highlight_tags,
",", 0, 0,
&buffer->highlight_tags_count);
}
}
else
@@ -981,6 +981,13 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property,
if (error && !error[0])
buffer->print_hooks_enabled = (number) ? 1 : 0;
}
else if (string_strcasecmp (property, "number") == 0)
{
error = NULL;
number = strtol (value, &error, 10);
if (error && !error[0] && (number >= 1))
gui_buffer_move_to_number (buffer, number);
}
else if (string_strcasecmp (property, "name") == 0)
{
gui_buffer_set_name (buffer, value);
@@ -1115,6 +1122,30 @@ gui_buffer_set_pointer (struct t_gui_buffer *buffer, const char *property,
}
}
/*
* gui_buffer_compute_num_displayed: compute "num_displayed" for all buffers
*/
void
gui_buffer_compute_num_displayed ()
{
struct t_gui_buffer *ptr_buffer;
struct t_gui_window *ptr_window;
for (ptr_buffer = gui_buffers; ptr_buffer;
ptr_buffer = ptr_buffer->next_buffer)
{
ptr_buffer->num_displayed = 0;
}
for (ptr_window = gui_windows; ptr_window;
ptr_window = ptr_window->next_window)
{
if (ptr_window->buffer)
ptr_window->buffer->num_displayed++;
}
}
/*
* gui_buffer_add_value_num_displayed: add value to "num_displayed" variable
* for a buffer (value can be negative)
@@ -1442,7 +1473,7 @@ gui_buffer_close (struct t_gui_buffer *buffer)
{
(void)(buffer->close_callback) (buffer->close_callback_data, buffer);
}
/* first unmerge buffer if it is merged to at least one other buffer */
if (gui_buffer_count_merged_buffers (buffer->number) > 1)
gui_buffer_unmerge (buffer, -1);
@@ -1515,6 +1546,10 @@ gui_buffer_close (struct t_gui_buffer *buffer)
/* free all lines */
gui_line_free_all (buffer);
if (buffer->own_lines)
free (buffer->own_lines);
if (buffer->mixed_lines)
free (buffer->mixed_lines);
/* free some data */
if (buffer->title)
@@ -1537,7 +1572,7 @@ gui_buffer_close (struct t_gui_buffer *buffer)
if (buffer->highlight_tags)
free (buffer->highlight_tags);
if (buffer->highlight_tags_array)
string_free_exploded (buffer->highlight_tags_array);
string_free_split (buffer->highlight_tags_array);
gui_keyboard_free_all (&buffer->keys, &buffer->last_key);
gui_buffer_local_var_remove_all (buffer);
@@ -1712,10 +1747,10 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
if (ptr_buffer == ptr_last_buffer)
break;
}
gui_buffers->prev_buffer = buffer;
buffer->prev_buffer = NULL;
buffer->next_buffer = gui_buffers;
gui_buffers = buffer;
gui_buffers->prev_buffer = ptr_last_buffer;
ptr_first_buffer->prev_buffer = NULL;
ptr_last_buffer->next_buffer = gui_buffers;
gui_buffers = ptr_first_buffer;
}
else
{
@@ -1723,7 +1758,7 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
for (ptr_buffer_pos = gui_buffers; ptr_buffer_pos;
ptr_buffer_pos = ptr_buffer_pos->next_buffer)
{
if (ptr_buffer_pos->number == number)
if (ptr_buffer_pos->number >= number)
break;
}
if (ptr_buffer_pos)
@@ -1828,6 +1863,8 @@ gui_buffer_merge (struct t_gui_buffer *buffer,
ptr_buffer->number--;
}
gui_buffer_compute_num_displayed ();
gui_window_ask_refresh (1);
hook_signal_send ("buffer_merged",
@@ -1938,6 +1975,8 @@ gui_buffer_unmerge (struct t_gui_buffer *buffer, int number)
ptr_buffer->number++;
}
gui_buffer_compute_num_displayed ();
gui_window_ask_refresh (1);
hook_signal_send ("buffer_unmerged",
@@ -2277,7 +2316,8 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer)
message_without_colors : "(null)");
if (message_without_colors)
free (message_without_colors);
tags = string_build_with_exploded ((const char **)ptr_line->data->tags_array, ",");
tags = string_build_with_split_string ((const char **)ptr_line->data->tags_array,
",");
log_printf (" tags: %s", (tags) ? tags : "(none)");
if (tags)
free (tags);
@@ -2439,7 +2479,8 @@ gui_buffer_print_log ()
while (ptr_line)
{
num--;
tags = string_build_with_exploded ((const char **)ptr_line->data->tags_array, ",");
tags = string_build_with_split_string ((const char **)ptr_line->data->tags_array,
",");
log_printf (" line N-%05d: y:%d, str_time:'%s', tags:'%s', "
"displayed:%d, highlight:%d, refresh_needed:%d, prefix:'%s'",
num, ptr_line->data->y, ptr_line->data->str_time,
+1 -1
View File
@@ -605,7 +605,7 @@ gui_chat_printf_y (struct t_gui_buffer *buffer, int y, const char *message, ...)
{
if (gui_init_ok)
{
for (ptr_line = buffer->lines->first_line; ptr_line;
for (ptr_line = buffer->own_lines->first_line; ptr_line;
ptr_line = ptr_line->next_line)
{
if (ptr_line->data->y >= y)
+117 -80
View File
@@ -49,10 +49,6 @@
#include "gui-nicklist.h"
struct t_gui_completion_partial *gui_completion_partial_list = NULL;
struct t_gui_completion_partial *last_gui_completion_partial = NULL;
/*
* gui_completion_buffer_init: init completion for a buffer
*/
@@ -80,6 +76,75 @@ gui_completion_buffer_init (struct t_gui_completion *completion,
completion->position_replace = 0;
completion->diff_size = 0;
completion->diff_length = 0;
completion->partial_completion_list = NULL;
completion->last_partial_completion = NULL;
}
/*
* gui_completion_partial_list_add: add an item to partial completions list
*/
struct t_gui_completion_partial *
gui_completion_partial_list_add (struct t_gui_completion *completion,
const char *word, int count)
{
struct t_gui_completion_partial *new_item;
new_item = malloc (sizeof (*new_item));
if (new_item)
{
new_item->word = strdup (word);
new_item->count = count;
new_item->prev_item = completion->last_partial_completion;
if (completion->partial_completion_list)
(completion->last_partial_completion)->next_item = new_item;
else
completion->partial_completion_list = new_item;
completion->last_partial_completion = new_item;
new_item->next_item = NULL;
}
return new_item;
}
/*
* gui_completion_partial_free: remove an item from partial completions list
*/
void
gui_completion_partial_list_free (struct t_gui_completion *completion,
struct t_gui_completion_partial *item)
{
/* remove partial completion item from list */
if (item->prev_item)
(item->prev_item)->next_item = item->next_item;
if (item->next_item)
(item->next_item)->prev_item = item->prev_item;
if (completion->partial_completion_list == item)
completion->partial_completion_list = item->next_item;
if (completion->last_partial_completion == item)
completion->last_partial_completion = item->prev_item;
/* free data */
if (item->word)
free (item->word);
free (item);
}
/*
* gui_completion_partial_free: remove partial completions list
*/
void
gui_completion_partial_list_free_all (struct t_gui_completion *completion)
{
while (completion->partial_completion_list)
{
gui_completion_partial_list_free (completion,
completion->partial_completion_list);
}
}
/*
@@ -110,6 +175,8 @@ gui_completion_free_data (struct t_gui_completion *completion)
if (completion->word_found)
free (completion->word_found);
completion->word_found = NULL;
gui_completion_partial_list_free_all (completion);
}
/*
@@ -123,68 +190,6 @@ gui_completion_free (struct t_gui_completion *completion)
free (completion);
}
/*
* gui_completion_partial_list_add: add an item to partial completions list
*/
struct t_gui_completion_partial *
gui_completion_partial_list_add (const char *word, int count)
{
struct t_gui_completion_partial *new_item;
new_item = malloc (sizeof (*new_item));
if (new_item)
{
new_item->word = strdup (word);
new_item->count = count;
new_item->prev_item = last_gui_completion_partial;
if (gui_completion_partial_list)
last_gui_completion_partial->next_item = new_item;
else
gui_completion_partial_list = new_item;
last_gui_completion_partial = new_item;
new_item->next_item = NULL;
}
return new_item;
}
/*
* gui_completion_partial_free: remove an item from partial completions list
*/
void
gui_completion_partial_list_free (struct t_gui_completion_partial *item)
{
/* remove partial completion item from list */
if (item->prev_item)
(item->prev_item)->next_item = item->next_item;
if (item->next_item)
(item->next_item)->prev_item = item->prev_item;
if (gui_completion_partial_list == item)
gui_completion_partial_list = item->next_item;
if (last_gui_completion_partial == item)
last_gui_completion_partial = item->prev_item;
/* free data */
if (item->word)
free (item->word);
free (item);
}
/*
* gui_completion_partial_free: remove partial completions list
*/
void
gui_completion_partial_list_free_all ()
{
while (gui_completion_partial_list)
{
gui_completion_partial_list_free (gui_completion_partial_list);
}
}
/*
* gui_completion_stop: stop completion (for example after 1 arg of command
* with 1 arg)
@@ -198,7 +203,7 @@ gui_completion_stop (struct t_gui_completion *completion,
completion->position = -1;
if (remove_partial_completion_list)
{
gui_completion_partial_list_free_all ();
gui_completion_partial_list_free_all (completion);
hook_signal_send ("partial_completion",
WEECHAT_HOOK_SIGNAL_STRING, NULL);
}
@@ -1531,7 +1536,7 @@ gui_completion_find_context (struct t_gui_completion *completion,
/* look for context */
gui_completion_free_data (completion);
gui_completion_buffer_init (completion, completion->buffer);
command = ((data[0] == '/') && (data[1] != '/')) ? 1 : 0;
command = (data[0] == '/') ? 1 : 0;
command_arg = 0;
i = 0;
while (i < pos)
@@ -1540,7 +1545,10 @@ gui_completion_find_context (struct t_gui_completion *completion,
{
command_arg++;
i++;
while ((i < pos) && (data[i] == ' ')) i++;
while ((i < pos) && (data[i] == ' '))
{
i++;
}
if (!completion->args)
completion->args = strdup (data + i);
}
@@ -1577,23 +1585,33 @@ gui_completion_find_context (struct t_gui_completion *completion,
{
i--;
while ((i >= 0) && (data[i] != ' '))
{
i--;
}
pos_start = i + 1;
}
}
else
{
while ((i >= 0) && (data[i] != ' '))
{
i--;
}
pos_start = i + 1;
}
i = pos;
while ((i < size) && (data[i] != ' '))
{
i++;
}
pos_end = i - 1;
if (completion->context == GUI_COMPLETION_COMMAND)
{
pos_start++;
if (data[pos_start] == '/')
pos_start++;
}
completion->base_word_pos = pos_start;
@@ -1602,7 +1620,9 @@ gui_completion_find_context (struct t_gui_completion *completion,
completion->position_replace = pos_start;
completion->base_word = malloc (pos_end - pos_start + 2);
for (i = pos_start; i <= pos_end; i++)
{
completion->base_word[i - pos_start] = data[i];
}
completion->base_word[pos_end - pos_start + 1] = '\0';
}
}
@@ -1615,19 +1635,27 @@ gui_completion_find_context (struct t_gui_completion *completion,
{
pos_start = 0;
while ((pos_start < size) && (data[pos_start] != '/'))
{
pos_start++;
}
if (data[pos_start] == '/')
{
pos_start++;
if (data[pos_start] == '/')
pos_start++;
pos_end = pos_start;
while ((pos_end < size) && (data[pos_end] != ' '))
{
pos_end++;
}
if (data[pos_end] == ' ')
pos_end--;
completion->base_command = malloc (pos_end - pos_start + 2);
for (i = pos_start; i <= pos_end; i++)
{
completion->base_command[i - pos_start] = data[i];
}
completion->base_command[pos_end - pos_start + 1] = '\0';
gui_completion_build_list (completion);
}
@@ -1699,10 +1727,10 @@ gui_completion_partial_build_list (struct t_gui_completion *completion,
{
int char_size, items_count;
char utf_char[16], *word;
struct t_weelist *weelist_temp, *weelist_words;
struct t_weelist *weelist_temp;
struct t_weelist_item *ptr_item, *next_item;
gui_completion_partial_list_free_all ();
gui_completion_partial_list_free_all (completion);
if (!completion->completion_list || !completion->completion_list->items)
return;
@@ -1711,13 +1739,6 @@ gui_completion_partial_build_list (struct t_gui_completion *completion,
if (!weelist_temp)
return;
weelist_words = weelist_new ();
if (!weelist_words)
{
weelist_free (weelist_temp);
return;
}
for (ptr_item = completion->completion_list->items; ptr_item;
ptr_item = ptr_item->next_item)
{
@@ -1754,7 +1775,8 @@ gui_completion_partial_build_list (struct t_gui_completion *completion,
}
if (word)
{
gui_completion_partial_list_add (word,
gui_completion_partial_list_add (completion,
word,
CONFIG_BOOLEAN(config_completion_partial_completion_count) ?
items_count : -1);
free (word);
@@ -1900,7 +1922,7 @@ gui_completion_complete (struct t_gui_completion *completion)
return;
}
gui_completion_partial_list_free_all ();
gui_completion_partial_list_free_all (completion);
return;
}
@@ -2057,6 +2079,8 @@ gui_completion_search (struct t_gui_completion *completion, int direction,
void
gui_completion_print_log (struct t_gui_completion *completion)
{
struct t_gui_completion_partial *ptr_item;
log_printf ("[completion (addr:0x%lx)]", completion);
log_printf (" buffer. . . . . . . . . : 0x%lx", completion->buffer);
log_printf (" context . . . . . . . . : %d", completion->context);
@@ -2081,6 +2105,19 @@ gui_completion_print_log (struct t_gui_completion *completion)
weelist_print_log (completion->completion_list,
"completion list element");
}
if (completion->partial_completion_list)
{
log_printf ("");
for (ptr_item = completion->partial_completion_list;
ptr_item; ptr_item = ptr_item->next_item)
{
log_printf ("[partial completion item (addr:0x%lx)]", ptr_item);
log_printf (" word. . . . . . . . . . : '%s'", ptr_item->word);
log_printf (" count . . . . . . . . . : %d", ptr_item->count);
log_printf (" prev_item . . . . . . . : 0x%lx", ptr_item->prev_item);
log_printf (" next_item . . . . . . . : 0x%lx", ptr_item->next_item);
}
}
}
/*
+11 -9
View File
@@ -25,6 +25,14 @@
#define GUI_COMPLETION_COMMAND_ARG 2
#define GUI_COMPLETION_AUTO 3
struct t_gui_completion_partial
{
char *word; /* (partial) word matching completion */
int count; /* number of matching items with this word */
struct t_gui_completion_partial *prev_item;
struct t_gui_completion_partial *next_item;
};
struct t_gui_completion
{
/* completion context */
@@ -49,18 +57,12 @@ struct t_gui_completion
int position_replace; /* position where word has to be replaced */
int diff_size; /* size difference (< 0 = char(s) deleted) */
int diff_length; /* length difference (<= diff_size) */
};
struct t_gui_completion_partial
{
char *word; /* (partial) word matching completion */
int count; /* number of matching items with this word */
struct t_gui_completion_partial *prev_item;
struct t_gui_completion_partial *next_item;
/* partial completion */
struct t_gui_completion_partial *partial_completion_list;
struct t_gui_completion_partial *last_partial_completion;
};
extern struct t_gui_completion_partial *gui_completion_partial_list;
/* completion functions */
extern void gui_completion_buffer_init (struct t_gui_completion *completion,
+3 -3
View File
@@ -373,8 +373,8 @@ gui_filter_new (int enabled, const char *name, const char *buffer_name,
if (tags)
{
new_filter->tags = (tags) ? strdup (tags) : NULL;
new_filter->tags_array = string_explode (tags, ",", 0, 0,
&new_filter->tags_count);
new_filter->tags_array = string_split (tags, ",", 0, 0,
&new_filter->tags_count);
}
else
{
@@ -443,7 +443,7 @@ gui_filter_free (struct t_gui_filter *filter)
if (filter->tags)
free (filter->tags);
if (filter->tags_array)
string_free_exploded (filter->tags_array);
string_free_split (filter->tags_array);
if (filter->regex)
free (filter->regex);
if (filter->regex_prefix)
+1 -1
View File
@@ -135,8 +135,8 @@ gui_hotlist_check_buffer_notify (struct t_gui_buffer *buffer, int priority)
case GUI_HOTLIST_LOW:
return (buffer->notify >= 3);
case GUI_HOTLIST_MESSAGE:
case GUI_HOTLIST_PRIVATE:
return (buffer->notify >= 2);
case GUI_HOTLIST_PRIVATE:
case GUI_HOTLIST_HIGHLIGHT:
return (buffer->notify >= 1);
}
+27 -19
View File
@@ -459,7 +459,8 @@ gui_line_add_to_list (struct t_gui_lines *lines,
*/
void
gui_line_remove_from_list (struct t_gui_lines *lines,
gui_line_remove_from_list (struct t_gui_buffer *buffer,
struct t_gui_lines *lines,
struct t_gui_line *line,
int free_data)
{
@@ -468,13 +469,21 @@ gui_line_remove_from_list (struct t_gui_lines *lines,
update_prefix_max_length =
(line->data->prefix_length == lines->prefix_max_length);
/* move read marker if it was on line we are removing */
if (lines->last_read_line == line)
{
lines->last_read_line = lines->last_read_line->prev_line;
lines->first_line_not_read = (lines->last_read_line) ? 0 : 1;
gui_buffer_ask_chat_refresh (buffer, 1);
}
/* free data */
if (free_data)
{
if (line->data->str_time)
free (line->data->str_time);
if (line->data->tags_array)
string_free_exploded (line->data->tags_array);
string_free_split (line->data->tags_array);
if (line->data->prefix)
free (line->data->prefix);
if (line->data->message)
@@ -537,7 +546,8 @@ gui_line_mixed_free_buffer (struct t_gui_buffer *buffer)
if (ptr_line->data->buffer == buffer)
{
gui_line_remove_from_list (buffer->mixed_lines,
gui_line_remove_from_list (buffer,
buffer->mixed_lines,
ptr_line,
0);
}
@@ -558,7 +568,8 @@ gui_line_mixed_free_all (struct t_gui_buffer *buffer)
{
while (buffer->mixed_lines->first_line)
{
gui_line_remove_from_list (buffer->mixed_lines,
gui_line_remove_from_list (buffer,
buffer->mixed_lines,
buffer->mixed_lines->first_line,
0);
}
@@ -566,7 +577,7 @@ gui_line_mixed_free_all (struct t_gui_buffer *buffer)
}
/*
* gui_line_free: delete a formatted line from a buffer
* gui_line_free: delete a line from a buffer
*/
void
@@ -583,7 +594,10 @@ gui_line_free (struct t_gui_buffer *buffer, struct t_gui_line *line)
{
if (ptr_line->data == line->data)
{
gui_line_remove_from_list (buffer->mixed_lines, ptr_line, 0);
gui_line_remove_from_list (buffer,
buffer->mixed_lines,
ptr_line,
0);
break;
}
}
@@ -600,16 +614,8 @@ gui_line_free (struct t_gui_buffer *buffer, struct t_gui_line *line)
}
}
/* move read marker if it was on line we are removing */
if (buffer->own_lines->last_read_line == line)
{
buffer->own_lines->last_read_line = buffer->own_lines->last_read_line->prev_line;
buffer->own_lines->first_line_not_read = (buffer->own_lines->last_read_line) ? 0 : 1;
gui_buffer_ask_chat_refresh (buffer, 1);
}
/* remove line from lines list */
gui_line_remove_from_list (buffer->own_lines, line, 1);
gui_line_remove_from_list (buffer, buffer->own_lines, line, 1);
}
/*
@@ -686,8 +692,8 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
NULL : gui_chat_get_time_string (date);
if (tags)
{
new_line->data->tags_array = string_explode (tags, ",", 0, 0,
&new_line->data->tags_count);
new_line->data->tags_array = string_split (tags, ",", 0, 0,
&new_line->data->tags_count);
}
else
{
@@ -996,6 +1002,8 @@ gui_line_add_to_infolist (struct t_infolist *infolist,
if (!ptr_item)
return 0;
if (!infolist_new_var_integer (ptr_item, "y", line->data->y))
return 0;
if (!infolist_new_var_time (ptr_item, "date", line->data->date))
return 0;
if (!infolist_new_var_time (ptr_item, "date_printed", line->data->date_printed))
@@ -1059,8 +1067,8 @@ gui_lines_print_log (struct t_gui_lines *lines)
log_printf (" first_line . . . . . : 0x%lx", lines->first_line);
log_printf (" last_line. . . . . . : 0x%lx", lines->last_line);
log_printf (" last_read_line . . . : 0x%lx", lines->last_read_line);
log_printf (" lines_count. . . . . . : %d", lines->lines_count);
log_printf (" first_line_not_read. . : %d", lines->first_line_not_read);
log_printf (" lines_count. . . . . : %d", lines->lines_count);
log_printf (" first_line_not_read. : %d", lines->first_line_not_read);
log_printf (" lines_hidden . . . . : %d", lines->lines_hidden);
log_printf (" buffer_max_length. . : %d", lines->buffer_max_length);
log_printf (" prefix_max_length. . : %d", lines->prefix_max_length);
+7
View File
@@ -889,7 +889,14 @@ gui_window_search_restart (struct t_gui_window *window)
if (gui_window_search_text (window))
window->buffer->text_search_found = 1;
else
{
if (CONFIG_BOOLEAN(config_look_search_text_not_found_alert)
&& window->buffer->input_buffer && window->buffer->input_buffer[0])
{
printf ("\a");
}
gui_buffer_ask_chat_refresh (window->buffer, 2);
}
}
/*
+3
View File
@@ -13,3 +13,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
EXTRA_DIST = gui-qt.c \
gui-qt.h
+2 -2
View File
@@ -127,7 +127,7 @@ alias_replace_args (const char *alias_args, const char *user_args)
const char *start, *pos;
int argc, length_res, args_count;
argv = weechat_string_explode (user_args, " ", 0, 0, &argc);
argv = weechat_string_split (user_args, " ", 0, 0, &argc);
res = NULL;
length_res = 0;
@@ -206,7 +206,7 @@ alias_replace_args (const char *alias_args, const char *user_args)
}
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
return res;
}
+7 -7
View File
@@ -67,7 +67,7 @@ weechat_aspell_config_change_commands (void *data,
if (weechat_aspell_commands_to_check)
{
weechat_string_free_exploded (weechat_aspell_commands_to_check);
weechat_string_free_split (weechat_aspell_commands_to_check);
weechat_aspell_commands_to_check = NULL;
weechat_aspell_count_commands_to_check = 0;
}
@@ -81,9 +81,9 @@ weechat_aspell_config_change_commands (void *data,
value = weechat_config_string (option);
if (value && value[0])
{
weechat_aspell_commands_to_check = weechat_string_explode (value,
",", 0, 0,
&weechat_aspell_count_commands_to_check);
weechat_aspell_commands_to_check = weechat_string_split (value,
",", 0, 0,
&weechat_aspell_count_commands_to_check);
if (weechat_aspell_count_commands_to_check > 0)
{
weechat_aspell_length_commands_to_check = malloc (weechat_aspell_count_commands_to_check *
@@ -273,7 +273,7 @@ weechat_aspell_config_init ()
weechat_aspell_config_look_color = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"color", "color",
N_("color used for mispelled words"),
N_("color used for misspelled words"),
NULL, 0, 0, "lightred", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
/* check */
@@ -302,7 +302,7 @@ weechat_aspell_config_init ()
"default_dict", "string",
N_("default dictionary (or comma separated list of dictionaries) to "
"use when buffer has no dictionary defined (leave blank to disable "
"aspell on buffers for which you didn't explicitely enabled it)"),
"aspell on buffers for which you didn't explicitly enabled it)"),
NULL, 0, 0, "", NULL, 0,
NULL, NULL, &weechat_aspell_config_change_default_dict, NULL, NULL, NULL);
weechat_aspell_config_check_during_search = weechat_config_new_option (
@@ -381,7 +381,7 @@ weechat_aspell_config_free ()
weechat_config_free (weechat_aspell_config_file);
if (weechat_aspell_commands_to_check)
weechat_string_free_exploded (weechat_aspell_commands_to_check);
weechat_string_free_split (weechat_aspell_commands_to_check);
if (weechat_aspell_length_commands_to_check)
free (weechat_aspell_length_commands_to_check);
}
+2 -2
View File
@@ -80,7 +80,7 @@ weechat_aspell_speller_check_dictionaries (const char *dict_list)
if (dict_list)
{
argv = weechat_string_explode (dict_list, ",", 0, 0, &argc);
argv = weechat_string_split (dict_list, ",", 0, 0, &argc);
if (argv)
{
for (i = 0; i < argc; i++)
@@ -93,7 +93,7 @@ weechat_aspell_speller_check_dictionaries (const char *dict_list)
ASPELL_PLUGIN_NAME, argv[i]);
}
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
}
}
+6 -6
View File
@@ -281,7 +281,7 @@ weechat_aspell_spellers_already_ok (const char *dict_list)
rc = 0;
argv = weechat_string_explode (dict_list, ",", 0, 0, &argc);
argv = weechat_string_split (dict_list, ",", 0, 0, &argc);
if (argv)
{
ptr_speller = weechat_aspell_spellers;
@@ -294,7 +294,7 @@ weechat_aspell_spellers_already_ok (const char *dict_list)
}
ptr_speller = ptr_speller->next_speller;
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
return rc;
@@ -319,14 +319,14 @@ weechat_aspell_create_spellers (struct t_gui_buffer *buffer)
weechat_aspell_speller_free_all ();
if (dict_list)
{
argv = weechat_string_explode (dict_list, ",", 0, 0, &argc);
argv = weechat_string_split (dict_list, ",", 0, 0, &argc);
if (argv)
{
for (i = 0; i < argc; i++)
{
weechat_aspell_speller_new (argv[i]);
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
}
}
@@ -608,7 +608,7 @@ weechat_aspell_string_is_simili_number (const char *word)
/*
* weechat_aspell_check_word: spell check a word
* return 1 if word is ok, 0 if word is mispelled
* return 1 if word is ok, 0 if word is misspelled
*/
int
@@ -814,7 +814,7 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
strcpy (result + index_result, ptr_string);
index_result += length_word;
/* add normal color (after mispelled word) */
/* add normal color (after misspelled word) */
if (!word_ok)
{
strcpy (result + index_result, color_normal);
+2 -2
View File
@@ -193,7 +193,7 @@ demo_infolist_print (struct t_infolist *infolist, const char *item_name)
fields = weechat_infolist_fields (infolist);
if (fields)
{
argv = weechat_string_explode (fields, ",", 0, 0, &argc);
argv = weechat_string_split (fields, ",", 0, 0, &argc);
if (argv && (argc > 0))
{
for (j = 0; j < argc; j++)
@@ -237,7 +237,7 @@ demo_infolist_print (struct t_infolist *infolist, const char *item_name)
}
}
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
i++;
}
+1 -1
View File
@@ -233,7 +233,7 @@ irc_bar_item_buffer_name (void *data, struct t_gui_bar_item *item,
snprintf (modes, sizeof (modes),
"%s(%s%s%s)",
IRC_COLOR_BAR_DELIM,
IRC_COLOR_STATUS_NAME,
IRC_COLOR_ITEM_CHANNEL_MODES,
channel->modes,
IRC_COLOR_BAR_DELIM);
}
+81
View File
@@ -60,6 +60,80 @@ irc_channel_valid (struct t_irc_server *server, struct t_irc_channel *channel)
return 0;
}
/*
* irc_channel_move_near_server: move new channel/pv buffer near server
*/
void
irc_channel_move_near_server (struct t_irc_server *server, int channel_type,
struct t_gui_buffer *buffer)
{
int number, number_channel, number_last_channel, number_last_private;
int number_found;
char str_number[32];
struct t_irc_channel *ptr_channel;
number = weechat_buffer_get_integer (buffer, "number");
number_last_channel = 0;
number_last_private = 0;
number_found = 0;
if (server->channels)
{
/* search last channel/pv number for server */
for (ptr_channel = server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
{
if (ptr_channel->buffer)
{
number_channel = weechat_buffer_get_integer (ptr_channel->buffer,
"number");
switch (ptr_channel->type)
{
case IRC_CHANNEL_TYPE_CHANNEL:
if (number_channel > number_last_channel)
number_last_channel = number_channel;
break;
case IRC_CHANNEL_TYPE_PRIVATE:
if (number_channel > number_last_private)
number_last_private = number_channel;
break;
}
}
}
/* use last channel/pv number + 1 */
switch (channel_type)
{
case IRC_CHANNEL_TYPE_CHANNEL:
if (number_last_channel > 0)
number_found = number_last_channel + 1;
break;
case IRC_CHANNEL_TYPE_PRIVATE:
if (number_last_private > 0)
number_found = number_last_private + 1;
else if (number_last_channel > 0)
number_found = number_last_channel + 1;
break;
}
}
else
{
if (weechat_config_integer (irc_config_look_server_buffer) ==
IRC_CONFIG_LOOK_SERVER_BUFFER_INDEPENDENT)
{
number_found = weechat_buffer_get_integer (server->buffer, "number") + 1;
}
}
/* switch to number found */
if ((number_found >= 1) && (number_found != number))
{
snprintf (str_number, sizeof (str_number), "%d", number_found);
weechat_buffer_set (buffer, "number", str_number);
}
}
/*
* irc_channel_new: allocate a new channel for a server and add it to channels
* list
@@ -100,6 +174,13 @@ irc_channel_new (struct t_irc_server *server, int channel_type,
free (new_channel);
return NULL;
}
if (((channel_type == IRC_CHANNEL_TYPE_CHANNEL)
&& weechat_config_boolean (irc_config_look_open_channel_near_server))
|| ((channel_type == IRC_CHANNEL_TYPE_PRIVATE)
&& weechat_config_boolean (irc_config_look_open_pv_near_server)))
{
irc_channel_move_near_server (server, channel_type, new_buffer);
}
buffer_created = 1;
}
+17 -9
View File
@@ -768,8 +768,8 @@ irc_command_cycle (void *data, struct t_gui_buffer *buffer, int argc,
{
channel_name = argv[1];
pos_args = argv_eol[2];
channels = weechat_string_explode (channel_name, ",", 0, 0,
&num_channels);
channels = weechat_string_split (channel_name, ",", 0, 0,
&num_channels);
if (channels)
{
for (i = 0; i < num_channels; i++)
@@ -780,7 +780,7 @@ irc_command_cycle (void *data, struct t_gui_buffer *buffer, int argc,
(ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL))
ptr_channel->cycle = 1;
}
weechat_string_free_exploded (channels);
weechat_string_free_split (channels);
}
}
else
@@ -1545,7 +1545,7 @@ int
irc_command_join (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
IRC_GET_SERVER(buffer);
IRC_GET_SERVER_CHANNEL(buffer);
IRC_COMMAND_CHECK_SERVER("join", 1);
/* make C compiler happy */
@@ -1556,7 +1556,15 @@ irc_command_join (void *data, struct t_gui_buffer *buffer, int argc,
irc_command_join_server (ptr_server, argv_eol[1]);
else
{
IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "join");
if (ptr_channel && (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
&& !ptr_channel->nicks)
{
irc_command_join_server (ptr_server, ptr_channel->name);
}
else
{
IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "join");
}
}
return WEECHAT_RC_OK;
@@ -2003,8 +2011,8 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc,
IRC_COMMAND_CHECK_SERVER("msg", 1);
targets = weechat_string_explode (argv[arg_target], ",", 0, 0,
&num_targets);
targets = weechat_string_split (argv[arg_target], ",", 0, 0,
&num_targets);
if (targets)
{
for (i = 0; i < num_targets; i++)
@@ -2118,7 +2126,7 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc,
}
}
}
weechat_string_free_exploded (targets);
weechat_string_free_split (targets);
}
return WEECHAT_RC_OK;
@@ -3822,7 +3830,7 @@ irc_command_init ()
"%(nicks)|%*", &irc_command_ison, NULL);
weechat_hook_command ("join",
N_("join a channel"),
N_("channel[,channel] [key[,key]]"),
N_("[channel[,channel] [key[,key]]]"),
N_("channel: channel name to join\n"
" key: key to join the channel"),
"%(irc_channels)", &irc_command_join, NULL);
+37 -8
View File
@@ -44,7 +44,8 @@ struct t_config_section *irc_config_section_server = NULL;
struct t_config_option *irc_config_look_color_nicks_in_server_messages;
struct t_config_option *irc_config_look_server_buffer;
struct t_config_option *irc_config_look_open_near_server;
struct t_config_option *irc_config_look_open_channel_near_server;
struct t_config_option *irc_config_look_open_pv_near_server;
struct t_config_option *irc_config_look_nick_prefix;
struct t_config_option *irc_config_look_nick_suffix;
struct t_config_option *irc_config_look_nick_completion_smart;
@@ -69,6 +70,7 @@ struct t_config_option *irc_config_color_message_quit;
struct t_config_option *irc_config_color_notice;
struct t_config_option *irc_config_color_input_nick;
struct t_config_option *irc_config_color_item_away;
struct t_config_option *irc_config_color_item_channel_modes;
/* IRC config, network section */
@@ -336,6 +338,22 @@ irc_config_change_color_item_away (void *data,
weechat_bar_item_update ("away");
}
/*
* irc_config_change_color_item_channel_modes: called when the color of channel
* modes is changed
*/
void
irc_config_change_color_item_channel_modes (void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) data;
(void) option;
weechat_bar_item_update ("buffer_name");
}
/*
* irc_config_change_network_away_check: called when away check is changed
*/
@@ -556,16 +574,16 @@ irc_config_ignore_read (void *data,
{
if (value && value[0])
{
argv = weechat_string_explode (value, ";", 0, 0, &argc);
argv_eol = weechat_string_explode (value, ";", 1, 0, NULL);
argv = weechat_string_split (value, ";", 0, 0, &argc);
argv_eol = weechat_string_split (value, ";", 1, 0, NULL);
if (argv && argv_eol && (argc >= 3))
{
irc_ignore_new (argv_eol[2], argv[0], argv[1]);
}
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
if (argv_eol)
weechat_string_free_exploded (argv_eol);
weechat_string_free_split (argv_eol);
}
}
@@ -1099,10 +1117,15 @@ irc_config_init ()
"merge_with_core|merge_without_core|independent", 0, 0, "merge_with_core",
NULL, 0, NULL, NULL,
&irc_config_change_look_server_buffer, NULL, NULL, NULL);
irc_config_look_open_near_server = weechat_config_new_option (
irc_config_look_open_channel_near_server = weechat_config_new_option (
irc_config_file, ptr_section,
"open_near_server", "boolean",
N_("open new channels/privates near server"),
"open_channel_near_server", "boolean",
N_("open new channels near server"),
NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_open_pv_near_server = weechat_config_new_option (
irc_config_file, ptr_section,
"open_pv_near_server", "boolean",
N_("open new privates near server"),
NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_nick_prefix = weechat_config_new_option (
irc_config_file, ptr_section,
@@ -1241,6 +1264,12 @@ irc_config_init ()
N_("color for away item"),
NULL, -1, 0, "yellow", NULL, 0, NULL, NULL,
&irc_config_change_color_item_away, NULL, NULL, NULL);
irc_config_color_item_channel_modes = weechat_config_new_option (
irc_config_file, ptr_section,
"item_channel_modes", "color",
N_("color for channel modes, near channel name"),
NULL, -1, 0, "default", NULL, 0, NULL, NULL,
&irc_config_change_color_item_channel_modes, NULL, NULL, NULL);
/* network */
ptr_section = weechat_config_new_section (irc_config_file, "network",
+3 -1
View File
@@ -62,7 +62,8 @@ extern struct t_config_section *irc_config_section_server;
extern struct t_config_option *irc_config_look_color_nicks_in_server_messages;
extern struct t_config_option *irc_config_look_server_buffer;
extern struct t_config_option *irc_config_look_open_near_server;
extern struct t_config_option *irc_config_look_open_channel_near_server;
extern struct t_config_option *irc_config_look_open_pv_near_server;
extern struct t_config_option *irc_config_look_nick_prefix;
extern struct t_config_option *irc_config_look_nick_suffix;
extern struct t_config_option *irc_config_look_nick_completion_smart;
@@ -85,6 +86,7 @@ extern struct t_config_option *irc_config_color_message_quit;
extern struct t_config_option *irc_config_color_notice;
extern struct t_config_option *irc_config_color_input_nick;
extern struct t_config_option *irc_config_color_item_away;
extern struct t_config_option *irc_config_color_item_channel_modes;
extern struct t_config_option *irc_config_network_default_msg_part;
extern struct t_config_option *irc_config_network_default_msg_quit;
+58 -22
View File
@@ -40,10 +40,11 @@
void
irc_display_hide_password (char *string, int look_for_nickserv)
{
char *pos_nickserv, *pos, *pos_pwd;
char *pos_nickserv, *pos, *pos_pwd, *pos_space;
int char_size;
pos = string;
while (1)
while (pos)
{
if (look_for_nickserv)
{
@@ -52,9 +53,23 @@ irc_display_hide_password (char *string, int look_for_nickserv)
return;
pos = pos_nickserv + 9;
while (pos[0] == ' ')
{
pos++;
if ((strncmp (pos, "identify ", 9) == 0)
|| (strncmp (pos, "register ", 9) == 0))
}
if (strncmp (pos, "identify ", 9) == 0)
{
pos_pwd = pos + 9;
pos_space = strchr (pos_pwd, ' ');
if (pos_space)
{
pos_pwd = pos_space + 1;
while (pos_pwd[0] == ' ')
{
pos_pwd++;
}
}
}
else if (strncmp (pos, "register ", 9) == 0)
pos_pwd = pos + 9;
else
pos_pwd = NULL;
@@ -62,24 +77,43 @@ irc_display_hide_password (char *string, int look_for_nickserv)
else
{
pos_pwd = strstr (pos, "identify ");
if (!pos_pwd)
if (pos_pwd)
{
pos_pwd += 9;
pos_space = strchr (pos_pwd, ' ');
if (pos_space)
{
pos_pwd = pos_space + 1;
while (pos_pwd[0] == ' ')
{
pos_pwd++;
}
}
}
else
{
pos_pwd = strstr (pos, "register ");
if (pos_pwd)
pos_pwd += 9;
}
if (!pos_pwd)
return;
pos_pwd += 9;
}
if (pos_pwd)
{
while (pos_pwd[0] == ' ')
pos_pwd++;
while (pos_pwd[0] && (pos_pwd[0] != ';') && (pos_pwd[0] != ' ')
&& (pos_pwd[0] != '"'))
{
pos_pwd[0] = '*';
pos_pwd++;
}
while (pos_pwd && pos_pwd[0] && (pos_pwd[0] != ' '))
{
char_size = weechat_utf8_char_size (pos_pwd);
if (char_size > 0)
memset (pos_pwd, '*', char_size);
pos_pwd = weechat_utf8_next_char (pos_pwd);
}
pos = pos_pwd;
}
}
@@ -90,7 +124,8 @@ irc_display_hide_password (char *string, int look_for_nickserv)
*/
void
irc_display_away (struct t_irc_server *server, const char *string1, const char *string2)
irc_display_away (struct t_irc_server *server, const char *string1,
const char *string2)
{
struct t_irc_channel *ptr_channel;
@@ -99,15 +134,16 @@ irc_display_away (struct t_irc_server *server, const char *string1, const char *
{
if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
{
weechat_printf (ptr_channel->buffer,
"%s[%s%s%s %s: %s%s]",
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_CHAT_NICK,
server->nick,
IRC_COLOR_CHAT,
string1,
string2,
IRC_COLOR_CHAT_DELIMITERS);
weechat_printf_tags (ptr_channel->buffer,
"away_info",
"%s[%s%s%s %s: %s%s]",
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_CHAT_NICK,
server->nick,
IRC_COLOR_CHAT,
string1,
string2,
IRC_COLOR_CHAT_DELIMITERS);
}
}
}
+47 -32
View File
@@ -183,7 +183,8 @@ irc_info_get_infolist_cb (void *data, const char *infolist_name,
struct t_irc_channel *ptr_channel;
struct t_irc_nick *ptr_nick;
struct t_irc_ignore *ptr_ignore;
char *pos_comma, *server_name;
char **argv;
int argc;
/* make C compiler happy */
(void) data;
@@ -277,53 +278,67 @@ irc_info_get_infolist_cb (void *data, const char *infolist_name,
{
ptr_server = NULL;
ptr_channel = NULL;
pos_comma = strchr (arguments, ',');
if (pos_comma)
argv = weechat_string_split (arguments, ",", 0, 0, &argc);
if (argv)
{
server_name = weechat_strndup (arguments, pos_comma - arguments);
if (server_name)
if (argc >= 2)
{
ptr_server = irc_server_search (server_name);
if (ptr_server)
ptr_server = irc_server_search (argv[0]);
if (!ptr_server)
{
ptr_channel = irc_channel_search (ptr_server,
pos_comma + 1);
weechat_string_free_split (argv);
return NULL;
}
free (server_name);
}
}
if (ptr_server && ptr_channel)
{
if (pointer && !irc_nick_valid (ptr_channel, pointer))
return NULL;
ptr_infolist = weechat_infolist_new ();
if (ptr_infolist)
{
if (pointer)
ptr_channel = irc_channel_search (ptr_server, argv[1]);
if (!ptr_channel)
{
/* build list with only one nick */
if (!irc_nick_add_to_infolist (ptr_infolist, pointer))
weechat_string_free_split (argv);
return NULL;
}
if (!pointer && (argc >= 3))
{
pointer = irc_nick_search (ptr_channel, argv[2]);
if (!pointer)
{
weechat_infolist_free (ptr_infolist);
weechat_string_free_split (argv);
return NULL;
}
return ptr_infolist;
}
else
}
weechat_string_free_split (argv);
if (ptr_server && ptr_channel)
{
if (pointer && !irc_nick_valid (ptr_channel, pointer))
return NULL;
ptr_infolist = weechat_infolist_new ();
if (ptr_infolist)
{
/* build list with all nicks of channel */
for (ptr_nick = ptr_channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
if (pointer)
{
if (!irc_nick_add_to_infolist (ptr_infolist,
ptr_nick))
/* build list with only one nick */
if (!irc_nick_add_to_infolist (ptr_infolist, pointer))
{
weechat_infolist_free (ptr_infolist);
return NULL;
}
return ptr_infolist;
}
else
{
/* build list with all nicks of channel */
for (ptr_nick = ptr_channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
if (!irc_nick_add_to_infolist (ptr_infolist,
ptr_nick))
{
weechat_infolist_free (ptr_infolist);
return NULL;
}
}
return ptr_infolist;
}
return ptr_infolist;
}
}
}
+2 -2
View File
@@ -78,7 +78,7 @@ irc_mode_channel_set (struct t_irc_server *server,
pos_args++;
while (pos_args[0] == ' ')
pos_args++;
argv = weechat_string_explode (pos_args, " ", 0, 0, &argc);
argv = weechat_string_split (pos_args, " ", 0, 0, &argc);
}
else
{
@@ -212,7 +212,7 @@ irc_mode_channel_set (struct t_irc_server *server,
if (str_modes)
free (str_modes);
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
weechat_bar_item_update ("buffer_name");
+26 -16
View File
@@ -653,7 +653,8 @@ irc_protocol_cmd_nick (struct t_irc_server *server, const char *command,
{
case IRC_CHANNEL_TYPE_PRIVATE:
/* rename private window if this is with "old nick" */
if (weechat_strcasecmp (ptr_channel->name, nick) == 0)
if ((weechat_strcasecmp (ptr_channel->name, nick) == 0)
&& !irc_channel_search (server, new_nick))
{
free (ptr_channel->name);
ptr_channel->name = strdup (new_nick);
@@ -833,7 +834,7 @@ irc_protocol_cmd_notice (struct t_irc_server *server, const char *command,
ptr_channel = irc_channel_search (server, pos_target);
ptr_nick = irc_nick_search (ptr_channel, nick);
weechat_printf_tags ((ptr_channel) ? ptr_channel->buffer : server->buffer,
irc_protocol_tags (command, NULL),
irc_protocol_tags (command, "notify_message"),
"%s%sNotice%s(%s%s%s)%s: %s",
weechat_prefix ("network"),
IRC_COLOR_NOTICE,
@@ -3753,7 +3754,7 @@ int
irc_protocol_cmd_353 (struct t_irc_server *server, const char *command,
int argc, char **argv, char **argv_eol)
{
char *pos_channel, *pos_nick;
char *pos_channel, *pos_nick, *pos_host, *nick;
const char *color;
int args, i, prefix_found;
int is_chanowner, is_chanadmin, is_chanadmin2, is_op, is_halfop;
@@ -3841,19 +3842,28 @@ irc_protocol_cmd_353 (struct t_irc_server *server, const char *command,
}
if (ptr_channel && ptr_channel->nicks)
{
if (!irc_nick_new (server, ptr_channel, pos_nick,
is_chanowner, is_chanadmin, is_chanadmin2,
is_op, is_halfop, has_voice, is_chanuser, 0))
pos_host = strchr (pos_nick, '!');
if (pos_host)
nick = weechat_strndup (pos_nick, pos_host - pos_nick);
else
nick = strdup (pos_nick);
if (nick)
{
weechat_printf (server->buffer,
_("%s%s: cannot create nick \"%s\" "
"for channel \"%s\""),
weechat_prefix ("error"),
IRC_PLUGIN_NAME, pos_nick, ptr_channel->name);
if (!irc_nick_new (server, ptr_channel, nick,
is_chanowner, is_chanadmin, is_chanadmin2,
is_op, is_halfop, has_voice, is_chanuser, 0))
{
weechat_printf (server->buffer,
_("%s%s: cannot create nick \"%s\" "
"for channel \"%s\""),
weechat_prefix ("error"),
IRC_PLUGIN_NAME, nick, ptr_channel->name);
}
free (nick);
}
}
}
if (!ptr_channel)
{
weechat_printf_tags (server->buffer,
@@ -4523,8 +4533,8 @@ irc_protocol_recv_command (struct t_irc_server *server, const char *entire_line,
}
else
dup_entire_line = NULL;
argv = weechat_string_explode (dup_entire_line, " ", 0, 0, &argc);
argv_eol = weechat_string_explode (dup_entire_line, " ", 1, 0, NULL);
argv = weechat_string_split (dup_entire_line, " ", 0, 0, &argc);
argv_eol = weechat_string_split (dup_entire_line, " ", 1, 0, NULL);
return_code = (int) (cmd_recv_func) (server, cmd_name,
argc, argv, argv_eol);
@@ -4547,8 +4557,8 @@ irc_protocol_recv_command (struct t_irc_server *server, const char *entire_line,
if (dup_entire_line)
free (dup_entire_line);
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
if (argv_eol)
weechat_string_free_exploded (argv_eol);
weechat_string_free_split (argv_eol);
}
}
+5
View File
@@ -102,6 +102,11 @@ irc_raw_open (int switch_to_buffer)
}
}
}
else
{
if (switch_to_buffer)
weechat_buffer_set (irc_raw_buffer, "display", "1");
}
}
/*
+42 -31
View File
@@ -159,7 +159,7 @@ irc_server_set_addresses (struct t_irc_server *server, const char *addresses)
server->addresses_count = 0;
if (server->addresses_array)
{
weechat_string_free_exploded (server->addresses_array);
weechat_string_free_split (server->addresses_array);
server->addresses_array = NULL;
}
if (server->ports_array)
@@ -171,9 +171,9 @@ irc_server_set_addresses (struct t_irc_server *server, const char *addresses)
/* set new addresses/ports */
if (addresses && addresses[0])
{
server->addresses_array = weechat_string_explode (addresses,
",", 0, 0,
&server->addresses_count);
server->addresses_array = weechat_string_split (addresses,
",", 0, 0,
&server->addresses_count);
server->ports_array = malloc (server->addresses_count * sizeof (server->ports_array[0]));
for (i = 0; i < server->addresses_count; i++)
{
@@ -206,14 +206,14 @@ irc_server_set_nicks (struct t_irc_server *server, const char *nicks)
server->nicks_count = 0;
if (server->nicks_array)
{
weechat_string_free_exploded (server->nicks_array);
weechat_string_free_split (server->nicks_array);
server->nicks_array = NULL;
}
/* set new nicks */
server->nicks_array = weechat_string_explode ((nicks) ? nicks : IRC_SERVER_DEFAULT_NICKS,
",", 0, 0,
&server->nicks_count);
server->nicks_array = weechat_string_split ((nicks) ? nicks : IRC_SERVER_DEFAULT_NICKS,
",", 0, 0,
&server->nicks_count);
}
/*
@@ -611,13 +611,13 @@ irc_server_free_data (struct t_irc_server *server)
if (server->name)
free (server->name);
if (server->addresses_array)
weechat_string_free_exploded (server->addresses_array);
weechat_string_free_split (server->addresses_array);
if (server->ports_array)
free (server->ports_array);
if (server->current_ip)
free (server->current_ip);
if (server->nicks_array)
weechat_string_free_exploded (server->nicks_array);
weechat_string_free_split (server->nicks_array);
if (server->unterminated_message)
free (server->unterminated_message);
if (server->nick)
@@ -965,7 +965,10 @@ irc_server_parse_message (const char *message, char **nick, char **host,
*channel = NULL;
if (arguments)
*arguments = NULL;
/* we'll use this message as example:
:FlashCode!n=FlashCod@host.com PRIVMSG #channel :hello!
*/
if (message[0] == ':')
{
pos2 = strchr (message, '!');
@@ -991,7 +994,8 @@ irc_server_parse_message (const char *message, char **nick, char **host,
}
else
pos = message;
/* pos is pointer on PRIVMSG #channel :hello! */
if (pos && pos[0])
{
while (pos[0] == ' ')
@@ -1001,6 +1005,7 @@ irc_server_parse_message (const char *message, char **nick, char **host,
pos2 = strchr (pos, ' ');
if (pos2)
{
/* pos2 is pointer on #channel :hello! */
if (command)
*command = weechat_strndup (pos, pos2 - pos);
pos2++;
@@ -1028,13 +1033,10 @@ irc_server_parse_message (const char *message, char **nick, char **host,
pos3 = strchr (pos2, ' ');
if (nick && !*nick)
{
if (nick)
{
if (pos3)
*nick = weechat_strndup (pos2, pos3 - pos2);
else
*nick = strdup (pos2);
}
if (pos3)
*nick = weechat_strndup (pos2, pos3 - pos2);
else
*nick = strdup (pos2);
}
if (pos3)
{
@@ -1230,14 +1232,14 @@ irc_server_sendf (struct t_irc_server *server, int queue_msg,
vsnprintf (buffer, sizeof (buffer) - 1, format, args);
va_end (args);
items = weechat_string_explode (buffer, "\n", 0, 0, &items_count);
items = weechat_string_split (buffer, "\n", 0, 0, &items_count);
for (i = 0; i < items_count; i++)
{
if (!irc_server_send_one_msg (server, queue_msg, items[i]))
break;
}
if (items)
weechat_string_free_exploded (items);
weechat_string_free_split (items);
}
/*
@@ -1334,7 +1336,7 @@ irc_server_msgq_add_unterminated (struct t_irc_server *server, const char *strin
}
/*
* irc_server_msgq_add_buffer: explode received buffer, creating queued messages
* irc_server_msgq_add_buffer: split received buffer, creating queued messages
*/
void
@@ -1382,7 +1384,7 @@ irc_server_msgq_flush ()
char *ptr_data, *new_msg, *ptr_msg, *pos;
char *nick, *host, *command, *channel;
char *msg_decoded, *msg_decoded_without_color;
char str_modifier[64], modifier_data[256], *ptr_chan_nick;
char str_modifier[64], modifier_data[256];
while (irc_recv_msgq)
{
@@ -1437,22 +1439,31 @@ irc_server_msgq_flush ()
NULL);
/* convert charset for message */
ptr_chan_nick = (channel) ? channel : nick;
if (ptr_chan_nick
&& (!nick || !host || (strcmp (nick, host) != 0)))
if (channel)
{
snprintf (modifier_data, sizeof (modifier_data),
"%s.%s.%s",
weechat_plugin->name,
irc_recv_msgq->server->name,
ptr_chan_nick);
channel);
}
else
{
snprintf (modifier_data, sizeof (modifier_data),
"%s.%s",
weechat_plugin->name,
irc_recv_msgq->server->name);
if (nick && (!host || (strcmp (nick, host) != 0)))
{
snprintf (modifier_data, sizeof (modifier_data),
"%s.%s.%s",
weechat_plugin->name,
irc_recv_msgq->server->name,
nick);
}
else
{
snprintf (modifier_data, sizeof (modifier_data),
"%s.%s",
weechat_plugin->name,
irc_recv_msgq->server->name);
}
}
msg_decoded = weechat_hook_modifier_exec ("charset_decode",
modifier_data,
+2 -2
View File
@@ -102,7 +102,7 @@ struct t_irc_server
int reloading_from_config; /* 1 if reloading from config file */
int reloaded_from_config; /* 1 if reloaded from config file */
int addresses_count; /* number of addresses */
char **addresses_array; /* exploded addresses */
char **addresses_array; /* addresses (after split) */
int *ports_array; /* ports for addresses */
int index_current_address; /* current address index in array */
char *current_ip; /* current IP address */
@@ -116,7 +116,7 @@ struct t_irc_server
#endif
char *unterminated_message; /* beginning of a message in input buf */
int nicks_count; /* number of nicknames */
char **nicks_array; /* exploded nicknames */
char **nicks_array; /* nicknames (after split) */
char *nick; /* current nickname */
char *nick_modes; /* nick modes */
char *prefix; /* nick prefix allowed (from msg 005) */
+1
View File
@@ -65,6 +65,7 @@
#define IRC_COLOR_NOTICE weechat_color(weechat_config_string(irc_config_color_notice))
#define IRC_COLOR_INPUT_NICK weechat_color(weechat_config_string(irc_config_color_input_nick))
#define IRC_COLOR_ITEM_AWAY weechat_color(weechat_config_string(irc_config_color_item_away))
#define IRC_COLOR_ITEM_CHANNEL_MODES weechat_color(weechat_config_string(irc_config_color_item_channel_modes))
#define IRC_COLOR_NICK_IN_SERVER_MESSAGE(nick) \
((nick && weechat_config_boolean(irc_config_look_color_nicks_in_server_messages)) ? \
nick->color : IRC_COLOR_CHAT_NICK)
+8 -3
View File
@@ -187,6 +187,11 @@ plugin_load (const char *filename)
_("%sError: unable to load plugin \"%s\": %s"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
full_name, dlerror());
gui_chat_printf (NULL,
_("%sIf you're trying to load a script and not a C "
"plugin, try command to load scripts (/perl, "
"/python, ...)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
free (full_name);
return NULL;
}
@@ -372,9 +377,9 @@ plugin_load (const char *filename)
new_plugin->string_strip = &string_strip;
new_plugin->string_has_highlight = &string_has_highlight;
new_plugin->string_mask_to_regex = &string_mask_to_regex;
new_plugin->string_explode = &string_explode;
new_plugin->string_free_exploded = &string_free_exploded;
new_plugin->string_build_with_exploded = &string_build_with_exploded;
new_plugin->string_split = &string_split;
new_plugin->string_free_split = &string_free_split;
new_plugin->string_build_with_split_string = &string_build_with_split_string;
new_plugin->string_split_command = &string_split_command;
new_plugin->string_free_split_command = &string_free_split_command;
new_plugin->string_format_size = &string_format_size;
+2 -2
View File
@@ -152,7 +152,7 @@ relay_client_send_infolist (struct t_relay_client *client,
fields = weechat_infolist_fields (infolist);
if (fields)
{
argv = weechat_string_explode (fields, ",", 0, 0, &argc);
argv = weechat_string_split (fields, ",", 0, 0, &argc);
if (argv && (argc > 0))
{
for (i = 0; i < argc; i++)
@@ -193,7 +193,7 @@ relay_client_send_infolist (struct t_relay_client *client,
}
}
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
}
}
+4 -4
View File
@@ -3432,7 +3432,7 @@ weechat_lua_api_hook_fd (lua_State *L)
int
weechat_lua_api_hook_process_cb (void *data,
const char *command, int return_code,
const char *stdout, const char *stderr)
const char *out, const char *err)
{
struct t_script_callback *script_callback;
char *lua_argv[6], str_rc[32], empty_arg[1] = { '\0' };
@@ -3447,8 +3447,8 @@ weechat_lua_api_hook_process_cb (void *data,
lua_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
lua_argv[1] = (command) ? (char *)command : empty_arg;
lua_argv[2] = str_rc;
lua_argv[3] = (stdout) ? (char *)stdout : empty_arg;
lua_argv[4] = (stderr) ? (char *)stderr : empty_arg;
lua_argv[3] = (out) ? (char *)out : empty_arg;
lua_argv[4] = (err) ? (char *)err : empty_arg;
lua_argv[5] = NULL;
rc = (int *) weechat_lua_exec (script_callback->script,
@@ -3651,7 +3651,7 @@ weechat_lua_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
lua_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
lua_argv[1] = script_ptr2str (buffer);
lua_argv[2] = timebuffer;
lua_argv[3] = weechat_string_build_with_exploded (tags, ",");
lua_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!lua_argv[3])
lua_argv[3] = strdup ("");
lua_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
+4 -4
View File
@@ -2886,7 +2886,7 @@ static XS (XS_weechat_api_hook_fd)
int
weechat_perl_api_hook_process_cb (void *data,
const char *command, int return_code,
const char *stdout, const char *stderr)
const char *out, const char *err)
{
struct t_script_callback *script_callback;
char *perl_argv[6], str_rc[32], empty_arg[1] = { '\0' };
@@ -2901,8 +2901,8 @@ weechat_perl_api_hook_process_cb (void *data,
perl_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
perl_argv[1] = (command) ? (char *)command : empty_arg;
perl_argv[2] = str_rc;
perl_argv[3] = (stdout) ? (char *)stdout : empty_arg;
perl_argv[4] = (stderr) ? (char *)stderr : empty_arg;
perl_argv[3] = (out) ? (char *)out : empty_arg;
perl_argv[4] = (err) ? (char *)err : empty_arg;
perl_argv[5] = NULL;
rc = (int *) weechat_perl_exec (script_callback->script,
@@ -3080,7 +3080,7 @@ weechat_perl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
perl_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
perl_argv[1] = script_ptr2str (buffer);
perl_argv[2] = timebuffer;
perl_argv[3] = weechat_string_build_with_exploded (tags, ",");
perl_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!perl_argv[3])
perl_argv[3] = strdup ("");
perl_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
@@ -3050,7 +3050,7 @@ weechat_python_api_hook_fd (PyObject *self, PyObject *args)
int
weechat_python_api_hook_process_cb (void *data,
const char *command, int return_code,
const char *stdout, const char *stderr)
const char *out, const char *err)
{
struct t_script_callback *script_callback;
char *python_argv[6], str_rc[32], empty_arg[1] = { '\0' };
@@ -3065,8 +3065,8 @@ weechat_python_api_hook_process_cb (void *data,
python_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
python_argv[1] = (command) ? (char *)command : empty_arg;
python_argv[2] = str_rc;
python_argv[3] = (stdout) ? (char *)stdout : empty_arg;
python_argv[4] = (stderr) ? (char *)stderr : empty_arg;
python_argv[3] = (out) ? (char *)out : empty_arg;
python_argv[4] = (err) ? (char *)err : empty_arg;
python_argv[5] = NULL;
rc = (int *) weechat_python_exec (script_callback->script,
@@ -3253,7 +3253,7 @@ weechat_python_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
python_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
python_argv[1] = script_ptr2str (buffer);
python_argv[2] = timebuffer;
python_argv[3] = weechat_string_build_with_exploded (tags, ",");
python_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!python_argv[3])
python_argv[3] = strdup ("");
python_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
+4 -4
View File
@@ -3524,7 +3524,7 @@ weechat_ruby_api_hook_fd (VALUE class, VALUE fd, VALUE read, VALUE write,
int
weechat_ruby_api_hook_process_cb (void *data,
const char *command, int return_code,
const char *stdout, const char *stderr)
const char *out, const char *err)
{
struct t_script_callback *script_callback;
char *ruby_argv[6], str_rc[32], empty_arg[1] = { '\0' };
@@ -3539,8 +3539,8 @@ weechat_ruby_api_hook_process_cb (void *data,
ruby_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
ruby_argv[1] = (command) ? (char *)command : empty_arg;
ruby_argv[2] = str_rc;
ruby_argv[3] = (stdout) ? (char *)stdout : empty_arg;
ruby_argv[4] = (stderr) ? (char *)stderr : empty_arg;
ruby_argv[3] = (out) ? (char *)out : empty_arg;
ruby_argv[4] = (err) ? (char *)err : empty_arg;
ruby_argv[5] = NULL;
rc = (int *) weechat_ruby_exec (script_callback->script,
@@ -3760,7 +3760,7 @@ weechat_ruby_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
ruby_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
ruby_argv[1] = script_ptr2str (buffer);
ruby_argv[2] = timebuffer;
ruby_argv[3] = weechat_string_build_with_exploded (tags, ",");
ruby_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!ruby_argv[3])
ruby_argv[3] = strdup ("");
ruby_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
+2 -2
View File
@@ -887,8 +887,8 @@ script_api_hook_process (struct t_weechat_plugin *weechat_plugin,
int (*callback)(void *data,
const char *command,
int return_code,
const char *stdout,
const char *stderr),
const char *out,
const char *err),
const char *function,
const char *data)
{
+2 -2
View File
@@ -158,8 +158,8 @@ extern struct t_hook *script_api_hook_process (struct t_weechat_plugin *weechat_
int (*callback)(void *data,
const char *command,
int return_code,
const char *stdout,
const char *stderr),
const char *out,
const char *err),
const char *function,
const char *data);
extern struct t_hook *script_api_hook_connect (struct t_weechat_plugin *weechat_plugin,
+4 -4
View File
@@ -922,7 +922,7 @@ script_action_install (struct t_weechat_plugin *weechat_plugin,
if (*list)
{
argv = weechat_string_explode (*list, ",", 0, 0, &argc);
argv = weechat_string_split (*list, ",", 0, 0, &argc);
if (argv)
{
for (i = 0; i < argc; i++)
@@ -995,7 +995,7 @@ script_action_install (struct t_weechat_plugin *weechat_plugin,
free (name);
}
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
free (*list);
*list = NULL;
@@ -1021,7 +1021,7 @@ script_action_remove (struct t_weechat_plugin *weechat_plugin,
if (*list)
{
argv = weechat_string_explode (*list, ",", 0, 0, &argc);
argv = weechat_string_split (*list, ",", 0, 0, &argc);
if (argv)
{
for (i = 0; i < argc; i++)
@@ -1034,7 +1034,7 @@ script_action_remove (struct t_weechat_plugin *weechat_plugin,
/* remove script file(s) */
script_remove_file (weechat_plugin, argv[i], 1);
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
free (*list);
*list = NULL;
-1
View File
@@ -22,7 +22,6 @@ SET_TARGET_PROPERTIES(tcl PROPERTIES PREFIX "")
IF(TCL_FOUND)
SET(CMAKE_REQUIRED_INCLUDES "${TCL_INCLUDE_PATH}")
SET(CMAKE_REQUIRED_LIBRARIES "${TCL_LIBRARY}")
CHECK_SYMBOL_EXISTS(Tcl_CreateNamespace tcl.h HAVE_TCL_CREATE_NS)
INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH})
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${TCL_LFLAGS}")
+4 -4
View File
@@ -3284,7 +3284,7 @@ weechat_tcl_api_hook_fd (ClientData clientData, Tcl_Interp *interp,
int
weechat_tcl_api_hook_process_cb (void *data,
const char *command, int return_code,
const char *stdout, const char *stderr)
const char *out, const char *err)
{
struct t_script_callback *script_callback;
char *tcl_argv[6], str_rc[32], empty_arg[1] = { '\0' };
@@ -3299,8 +3299,8 @@ weechat_tcl_api_hook_process_cb (void *data,
tcl_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
tcl_argv[1] = (command) ? (char *)command : empty_arg;
tcl_argv[2] = str_rc;
tcl_argv[3] = (stdout) ? (char *)stdout : empty_arg;
tcl_argv[4] = (stderr) ? (char *)stderr : empty_arg;
tcl_argv[3] = (out) ? (char *)out : empty_arg;
tcl_argv[4] = (err) ? (char *)err : empty_arg;
tcl_argv[5] = NULL;
rc = (int *) weechat_tcl_exec (script_callback->script,
@@ -3498,7 +3498,7 @@ weechat_tcl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
tcl_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
tcl_argv[1] = script_ptr2str (buffer);
tcl_argv[2] = timebuffer;
tcl_argv[3] = weechat_string_build_with_exploded (tags, ",");
tcl_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!tcl_argv[3])
tcl_argv[3] = strdup ("");
tcl_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
+20 -18
View File
@@ -160,11 +160,11 @@ struct t_weechat_plugin
int (*string_has_highlight) (const char *string,
const char *highlight_words);
char *(*string_mask_to_regex) (const char *mask);
char **(*string_explode) (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
void (*string_free_exploded) (char **exploded_string);
char *(*string_build_with_exploded) (const char **exploded_string,
const char *separator);
char **(*string_split) (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
void (*string_free_split) (char **split_string);
char *(*string_build_with_split_string) (const char **split_string,
const char *separator);
char **(*string_split_command) (const char *command, char separator);
void (*string_free_split_command) (char **split_command);
char *(*string_format_size) (unsigned long size);
@@ -187,7 +187,7 @@ struct t_weechat_plugin
char *(*utf8_add_offset) (const char *string, int offset);
int (*utf8_real_pos) (const char *string, int pos);
int (*utf8_pos) (const char *string, int real_pos);
char *(*utf8_strndup) (const char *string, int max_chars);
char *(*utf8_strndup) (const char *string, int length);
/* directories */
int (*mkdir_home) (const char *directory, int mode);
@@ -385,8 +385,8 @@ struct t_weechat_plugin
int (*callback)(void *data,
const char *command,
int return_code,
const char *stdout,
const char *stderr),
const char *out,
const char *err),
void *callback_data);
struct t_hook *(*hook_connect) (struct t_weechat_plugin *plugin,
const char *proxy,
@@ -691,16 +691,16 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->string_has_highlight(__string, __highlight_words)
#define weechat_string_mask_to_regex(__mask) \
weechat_plugin->string_mask_to_regex(__mask)
#define weechat_string_explode(__string, __separator, __eol, __max, \
__num_items) \
weechat_plugin->string_explode(__string, __separator, __eol, \
__max, __num_items)
#define weechat_string_free_exploded(__exploded_string) \
weechat_plugin->string_free_exploded(__exploded_string)
#define weechat_string_build_with_exploded(__exploded_string, \
__separator) \
weechat_plugin->string_build_with_exploded(__exploded_string, \
__separator)
#define weechat_string_split(__string, __separator, __eol, __max, \
__num_items) \
weechat_plugin->string_split(__string, __separator, __eol, \
__max, __num_items)
#define weechat_string_free_split(__split_string) \
weechat_plugin->string_free_split(__split_string)
#define weechat_string_build_with_split_string(__split_string, \
__separator) \
weechat_plugin->string_build_with_split_string(__split_string, \
__separator)
#define weechat_string_split_command(__command, __separator) \
weechat_plugin->string_split_command(__command, __separator)
#define weechat_string_free_split_command(__split_command) \
@@ -743,6 +743,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->utf8_real_pos(__string, __pos)
#define weechat_utf8_pos(__string, __real_pos) \
weechat_plugin->utf8_pos(__string, __real_pos)
#define weechat_utf8_strndup(__string, __length) \
weechat_plugin->utf8_strndup(__string, __length)
/* directories */
#define weechat_mkdir_home(__directory, __mode) \
+1 -1
View File
@@ -101,7 +101,7 @@ xfer_network_child_read_cb (void *arg_xfer, int fd)
if (num_read > 0)
{
error = NULL;
xfer->pos = strtol (bufpipe + 2, &error, 10);
xfer->pos = (unsigned long)(strtoll (bufpipe + 2, &error, 10));
xfer->last_activity = time (NULL);
xfer_file_calculate_speed (xfer, 0);