mirror of
https://github.com/weechat/weechat.git
synced 2026-06-13 22:54:47 +02:00
Compare commits
241 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d486a0223d | |||
| 707749957a | |||
| f950700a34 | |||
| ee4d039c42 | |||
| 70a970f8ed | |||
| 50a62179d4 | |||
| b01bc3eb21 | |||
| d44762aa43 | |||
| c056a03871 | |||
| 61ee836891 | |||
| 33c9ee86af | |||
| 8c5e618c88 | |||
| c0255add37 | |||
| 1946b4cacc | |||
| 9d69720b26 | |||
| 68fd773730 | |||
| dd0b1701e3 | |||
| 72d9c51ab0 | |||
| 5218a359af | |||
| 88a6c491a2 | |||
| edb21c362a | |||
| f523d2b0a5 | |||
| e05be4e2b3 | |||
| 12fcca4c31 | |||
| 882b72cd0c | |||
| ebae0cb7d5 | |||
| 7f1335c6f0 | |||
| b0490eb249 | |||
| c4710cb22b | |||
| ca814fdb3f | |||
| 54b74ed1e1 | |||
| 73d9515f5c | |||
| 57282055c3 | |||
| 7863d4cece | |||
| 76afa6d2b5 | |||
| 5245ee6b14 | |||
| 69bd50d74c | |||
| fb8bae3c78 | |||
| 0c0e511079 | |||
| 07d9deaf95 | |||
| 4908e196ad | |||
| dc92ee389c | |||
| 30c3fa9d98 | |||
| 0c8867c9e3 | |||
| 57ceaba3d1 | |||
| aed84560f8 | |||
| 1108ef217f | |||
| f827677ba9 | |||
| 8011a2534f | |||
| e4de086728 | |||
| 7c6c2e8e84 | |||
| 3da3c0c96e | |||
| c1c9dd2da8 | |||
| ec78674d4e | |||
| c246d44762 | |||
| 09ddfcd860 | |||
| 028d38b44e | |||
| f68a2cbfcd | |||
| 3c10d2205e | |||
| 362866fdf2 | |||
| d150376c54 | |||
| 9d3e31e165 | |||
| efd511dea4 | |||
| 0904d9afaf | |||
| 2da039222d | |||
| 271bd21802 | |||
| bd0b7957a3 | |||
| bd2ab776fe | |||
| 2c3fad454c | |||
| b1a99c5e6f | |||
| 3b48025071 | |||
| feec343ffb | |||
| ddc10d0164 | |||
| 5bf2c326f2 | |||
| 241f70f869 | |||
| 9d5ef17bd6 | |||
| 825a9cfdf6 | |||
| fc2693c8e1 | |||
| 0bbe747f78 | |||
| feedeb25f6 | |||
| f1a39ce7d7 | |||
| 585681e5a0 | |||
| cd3599e6db | |||
| bbe20b9b30 | |||
| 00c4e36357 | |||
| d3d4bcaf2b | |||
| 8cdad47de8 | |||
| a8017fe06c | |||
| 4297b55bf2 | |||
| 83db899ce7 | |||
| 894cda91c9 | |||
| 47ce432199 | |||
| c9625e1f58 | |||
| d604e222ea | |||
| fb34430076 | |||
| 636dd48a7b | |||
| c1c7fbc156 | |||
| 3799b83107 | |||
| b80c53e87d | |||
| 299d37a342 | |||
| 6971faba65 | |||
| dfea9b208c | |||
| 263f15cf2e | |||
| 36f0aab4d4 | |||
| 1f77a51ddc | |||
| c96eea0f54 | |||
| 87fa5c8b52 | |||
| 6f83c33ed9 | |||
| 23ff266816 | |||
| 8affe52ee4 | |||
| 162565466e | |||
| a2384b3514 | |||
| 219621b8cc | |||
| a3d7bcf804 | |||
| 8978b9c4b9 | |||
| b605e52d0f | |||
| c554ed2da5 | |||
| dde12565e7 | |||
| 34e220df56 | |||
| 537e1781a6 | |||
| d66bfc2458 | |||
| fb3fd5b0eb | |||
| c0762e3b13 | |||
| 4519707904 | |||
| 30e194e41f | |||
| 5e4f45e2a2 | |||
| e339e9020d | |||
| 5332d2ba27 | |||
| 058c026e10 | |||
| dd79c6b8bf | |||
| e867f2dd35 | |||
| ba468f2234 | |||
| 6c67b97fb7 | |||
| 9f5d99f57e | |||
| c79becdc85 | |||
| 7405588a6e | |||
| 4061f0641d | |||
| 5787acad2c | |||
| 5e29f17620 | |||
| 4950d462d0 | |||
| 20b567c3df | |||
| d395846fb7 | |||
| bee62989f6 | |||
| 7579529d94 | |||
| a8fc49bd79 | |||
| d617f1d154 | |||
| 82b3f86c43 | |||
| 812ab4129f | |||
| d6925c982e | |||
| c3e9858d55 | |||
| 7290f0f1ab | |||
| 0093bf0849 | |||
| 3bf3f22928 | |||
| 880e10b6d6 | |||
| 054abdff85 | |||
| 860e9a08f3 | |||
| 148e74d2c3 | |||
| f5fadd9c12 | |||
| 0abe6f0322 | |||
| c74cf01b63 | |||
| eb2e8891cb | |||
| 97a3d47650 | |||
| 4ed02bbdcf | |||
| 63244d9a30 | |||
| fcc885eff0 | |||
| 7feb775299 | |||
| 8da229fd9d | |||
| 398e056029 | |||
| f30fb21175 | |||
| a89ca83306 | |||
| 0e785fe106 | |||
| 3e6e347d13 | |||
| 8d014d66da | |||
| f07c42fff3 | |||
| e0c6451b91 | |||
| 29e879326d | |||
| e995453b9a | |||
| bad4bd0bef | |||
| 0872e77872 | |||
| 41b7aa0f93 | |||
| a4bf839a30 | |||
| 1ff61b1745 | |||
| 2d5e1474e3 | |||
| 57477f9da9 | |||
| 64bcd25692 | |||
| cd3f62d37e | |||
| 17989f8d71 | |||
| b498062fde | |||
| 2096354ea8 | |||
| 1daa5061a9 | |||
| 926932a20f | |||
| 6323e55ab4 | |||
| 0b6a91837c | |||
| c988f0c473 | |||
| 7f0e0b5eea | |||
| 25bfda26e9 | |||
| a584ef4261 | |||
| 00935961e8 | |||
| e12a2c985c | |||
| 9a81c27e7d | |||
| 0f0f7511d2 | |||
| aa149dcfbc | |||
| 4d64128ef2 | |||
| 7d5ea81f93 | |||
| 063744ef7d | |||
| cfd2f57dd1 | |||
| 8d60035951 | |||
| ff2fdc14b7 | |||
| 8c6fa998f8 | |||
| 600fe4deb3 | |||
| 7b9ef6b56e | |||
| 00dd81761f | |||
| 85db677423 | |||
| 70ebdc9808 | |||
| f8e31fa38f | |||
| 018b440004 | |||
| f1fdc469c4 | |||
| 47db86b66a | |||
| 2ca6c6a3f1 | |||
| 158d2c9934 | |||
| 7758f02992 | |||
| fef85af5cc | |||
| 3fb1affd95 | |||
| f5731322da | |||
| 1dc994e5f6 | |||
| 429167f032 | |||
| aba6e1257d | |||
| 6d01968259 | |||
| fddd0416b9 | |||
| 8e436c58cd | |||
| 4713f94602 | |||
| ef43b3e013 | |||
| 0e113ded09 | |||
| cd75488d0d | |||
| dc80d87b0e | |||
| 0213633fb8 | |||
| fa833455ae | |||
| 749fae7a75 | |||
| e99915e427 | |||
| 22d0d47d2d | |||
| 0af26a3fb5 |
@@ -0,0 +1,72 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
PROJECT(weechat)
|
||||
|
||||
SET(CMAKE_VERBOSE_MAKEFILE OFF)
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||
SET(CMAKE_SKIP_RPATH ON)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W")
|
||||
IF(PREFIX)
|
||||
SET(CMAKE_INSTALL_PREFIX ${PREFIX} CACHE PATH "Install path prefix" FORCE)
|
||||
ENDIF(PREFIX)
|
||||
|
||||
SET(VERSION 0.2.6.3)
|
||||
SET(PKG_STRING "${PROJECT_NAME} ${VERSION}")
|
||||
SET(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/weechat)
|
||||
SET(SHAREDIR ${CMAKE_INSTALL_PREFIX}/share/weechat)
|
||||
SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
|
||||
STRING(REPLACE "\";\"" "\ " PKG_STRING ${PKG_STRING})
|
||||
|
||||
OPTION(DISABLE_NCURSES "Disable Ncurses interface")
|
||||
OPTION(ENABLE_GTK "Enable GTK interface")
|
||||
OPTION(DISABLE_NLS "Disable Native Language Support")
|
||||
OPTION(DISABLE_GNUTLS "Disable SSLv3/TLS connection support")
|
||||
OPTION(DISABLE_PLUGINS "Disable Plugins support")
|
||||
OPTION(DISABLE_PERL "Disable Perl scripting language")
|
||||
OPTION(DISABLE_PYTHON "Disable Python scripting language")
|
||||
OPTION(DISABLE_RUBY "Disable Ruby scripting language")
|
||||
OPTION(DISABLE_LUA "Disable Lua scripting language")
|
||||
OPTION(DISABLE_ASPELL "Disable Aspell plugin")
|
||||
OPTION(DISABLE_CHARSET "Disable Charset plugin")
|
||||
OPTION(DISABLE_DOC "Disable Doc")
|
||||
|
||||
ADD_SUBDIRECTORY( po )
|
||||
ADD_SUBDIRECTORY( src )
|
||||
IF(NOT DISABLE_DOC)
|
||||
ADD_SUBDIRECTORY( doc )
|
||||
ENDIF(NOT DISABLE_DOC)
|
||||
|
||||
CONFIGURE_FILE(config.h.cmake config.h @ONLY)
|
||||
|
||||
CONFIGURE_FILE(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/makedist.sh.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/makedist.sh" IMMEDIATE
|
||||
@ONLY)
|
||||
|
||||
CONFIGURE_FILE(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
ADD_CUSTOM_TARGET(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
ADD_CUSTOM_TARGET(dist
|
||||
"${CMAKE_BINARY_DIR}/makedist.sh"
|
||||
DEPENDS doc
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
@@ -1,285 +1,626 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
0. Definitions.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
1. Source Code.
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
14. Revised Versions of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
NO WARRANTY
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
@@ -304,37 +645,30 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
@@ -1,9 +1,147 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2007-01-10
|
||||
ChangeLog - 2009-06-13
|
||||
|
||||
|
||||
Version 0.2.6.3 (2009-06-13):
|
||||
* fix gnutls detection (use pkg-config instead of libgnutls-config)
|
||||
(bug #26790)
|
||||
|
||||
Version 0.2.6.2 (2009-04-18):
|
||||
* fix bug with charset decoding (for example with iso2022jp)
|
||||
|
||||
Version 0.2.6.1 (2009-03-14):
|
||||
* fix crash with some special chars in IRC messages (bug #25862)
|
||||
|
||||
Version 0.2.6 (2007-09-06):
|
||||
* fixed bug with log of plugin messages (option log_plugin_msg)
|
||||
* added new option "deloutq" to /server command to delete all servers
|
||||
messages out queues (task #7221)
|
||||
* fixed display bug with some special chars in messages (some words were
|
||||
truncated on screen) (bug #20944)
|
||||
* fixed UTF-8 bug with color encoding/decoding
|
||||
* fixed crash when searching text in buffer with ctrl-R (bug #20938)
|
||||
* added string length limit for setup file options
|
||||
* fixed bug with flock() when home is on NFS filesystem (bug #20913)
|
||||
* added option to align text of messages (except first lines) (task #7246)
|
||||
* fixed user modes in nicklist when ban and nick mode are received in the
|
||||
same MODE message (bug #20870)
|
||||
* fixed IRC message 333: silently ignore message if error when parsing it
|
||||
* fixed server option "command_delay": does not freeze WeeChat any more
|
||||
* added paste detection, new options look_paste_max_lines and
|
||||
col_input_actions (task #5442)
|
||||
* fixed bug with highlight and UTF-8 chars around word (bug #20753)
|
||||
* added swedish quickstart guide
|
||||
* added support of channel mode +u (channel user) (bug #20717)
|
||||
* improved /connect command to connect to a host by creating a temporary
|
||||
server, added option to /server to create temporary server (task #7095)
|
||||
* added "copy", "rename" and "keep" options to /server command
|
||||
* allow clear of multiple selected buffers with /clear (patch #6112)
|
||||
* added key for setting unread marker on all buffers (default:
|
||||
ctrl-S + ctrl-U) (task 7180)
|
||||
* fixed nick prefix display on servers that doesn't support all prefixes
|
||||
(bug #20025)
|
||||
* fixed terminal encoding detection when NLS is disabled (bug #20646)
|
||||
* fixed crash when sending data to channel or pv on disconnected server
|
||||
(bug #20524)
|
||||
* improved command /server ant its output
|
||||
* added 3 default new keys: ctrl-B (left), ctrl-F (right), ctrl-D (delete)
|
||||
* added "buffer_move" event handler to plugins API (task #6708)
|
||||
* added key function "jump_previous_buffer" to jump to buffer previously
|
||||
displayed (new key: alt-J + alt-P) (task #7085)
|
||||
* added "%*" to completion template, to repeat last completion
|
||||
* added "-nojoin" option for /connect and /reconnect commands (task #7074)
|
||||
* fixed bugs with IRC color in messages, now color codes are inserted in
|
||||
command line with ^Cc,^Cb,.. instead of %C,%B,.. (bug #20222, task #7060)
|
||||
* fixed bug with smart nick completion (last speakers first) when a nick
|
||||
is changed
|
||||
* fixed charset bug with channel names in status bar (bug #20400)
|
||||
* added "scroll" option to /buffer command
|
||||
* down key now saves input to history and clears input line (task #7049)
|
||||
* fixed log file when channel name contains "/" (bug #20072)
|
||||
* command /away allowed when not connected to server (internally stored
|
||||
and AWAY command is sent when connecting to server) (task #7003)
|
||||
* added argument for /upgrade command (path to binary)
|
||||
* fixed bug with /topic when channel not open and topic not defined
|
||||
(bug #20141)
|
||||
* added hotlist sort with new option "look_hotlist_sort" (task #5870)
|
||||
|
||||
Version 0.2.5 (2007-06-07):
|
||||
* fixed QUOTE command: now allowed when socket is ok (even if IRC
|
||||
connection to server is not ok) (bug #20113)
|
||||
* added missing IRC commands (327, 378, 379) (bug #20091)
|
||||
* fixed hotlist when exiting search mode: current buffer is removed from
|
||||
hotlist
|
||||
* added "%M" for completion with nicks of current server (nicks on open
|
||||
channels) (task #6931)
|
||||
* improved key bindings: now possible to bind a key on many commands,
|
||||
separated by semicolon (task #5444)
|
||||
* improved IRC long message split: use word boundary (task #6685)
|
||||
* removed ":" for unknown IRC commands before arguments (bug #19929)
|
||||
* fixed "%C" completion: now completes with all channels of all servers
|
||||
* fixed bug with "/buffer query_name", added server and channel completion
|
||||
for /buffer command (bug #19928)
|
||||
* added cmake for weechat compile (patch #5943)
|
||||
* fixed IRC mode parsing when receiving modes with arguments (bug #19902)
|
||||
* fixed crash with IRC JOIN malformed message (bug #19891)
|
||||
* fixed bug with nick prefixes on some IRC servers (bug #19854)
|
||||
* improved setup file save: now writes temporary file, then rename it
|
||||
(task #6847)
|
||||
* fixed bug with $nick/$channel/$server variables in commands
|
||||
* forget current nick when user manually disconnects from server
|
||||
* fixed nick display in input window
|
||||
* fixed bug with erroneous nickname when connecting to server (bug #19812)
|
||||
* fixed display bugs in IRC error messages
|
||||
* added protocol priority for gnutls (patch #5915)
|
||||
* added channel admin mode '!' for some IRC servers
|
||||
* fixed bug with iso2022jp locale (bug #18719)
|
||||
* fixed string format bug when displaying string thru plugin script API
|
||||
* added /reconnect command (task #5448)
|
||||
* added "-all" option for /connect and /disconnect commands (task #6232)
|
||||
* improved nick completion: completion with last speakers first and self
|
||||
nick at the end; added option look_nick_completion_smart, enabled by
|
||||
default (task #5896)
|
||||
* fixed nick completion in command arguments (bug #19590)
|
||||
* fixed possible crash with nick completion when a nick leaves channel
|
||||
(bug #19589)
|
||||
* added color for input text not found in buffer history
|
||||
* fixed USER message when connecting to IRC server (patch #5835)
|
||||
|
||||
Version 0.2.4 (2007-03-29):
|
||||
* fixed color bug with IRC messages displayed by plugins (bug #19442)
|
||||
* fixed topic charset, now using channel charset if defined (bug #19386)
|
||||
* renamed log file for DCC chat (now <server>.dcc.<nick>.weechatlog)
|
||||
* fixed crash when closing a pv if a DCC chat is open on same nick
|
||||
(bug #19147)
|
||||
* fixed bug with channel topic after reconnection (not erased) (bug #19384)
|
||||
* added current buffer in hotlist when scrolling up in buffer (task #6664)
|
||||
* fixed bug with explode_string / free_exploded_string when max_items > 0
|
||||
* added new key (ctrl-R) for interactive and incremental search in buffer
|
||||
history (task #6628)
|
||||
* fixed /topic completion when no topic set on current channel (bug #19322)
|
||||
* improved password hiding, code cleanup (bug #19229)
|
||||
* added new return code in plugin API to force highlight (for message
|
||||
handlers only)
|
||||
* fixed bug with server buffer when "look_one_server_buffer" is ON and
|
||||
server buffer is moved to any number > 1 (bug #19219)
|
||||
* fixed /help command: displays plugin help for redefined commands
|
||||
(bug #19166)
|
||||
* prefix '/' disabled in commands (patch #5769)
|
||||
* fixed completion of redefined commands removed by plugins (bug #19176)
|
||||
* fixed memory leaks in perl and python plugins (bug #19163)
|
||||
* added "call" option to /key command, added new key function "insert" to
|
||||
insert text on command line (task #6468)
|
||||
* fixed permissions on "dcc" and "logs" directories (bug #18978)
|
||||
* added event handler to plugin API
|
||||
* added scots quickstart guide
|
||||
* added numeric argument for /clear command (buffer number) (patch #5372)
|
||||
* fixed crash when /away command is issued with no server connection
|
||||
(bug #18839)
|
||||
* fixed crash when closing a buffer opened on many windows
|
||||
* fixed freeze with SSL server when disconnecting after connection loss
|
||||
(bug #18735)
|
||||
|
||||
Version 0.2.3 (2007-01-10):
|
||||
* fixed display bugs with nicklist at top/bottom when look_nicklist_separator
|
||||
is OFF (bug #18737)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2007-01-06
|
||||
WeeChat FAQ, 2007-09-06
|
||||
=======================
|
||||
|
||||
Intended audience:
|
||||
@@ -87,10 +87,20 @@ A: A window is used when you split screen vertically or horizontally.
|
||||
================================================================================
|
||||
Q: I don't see some chars with accents, what can I do?
|
||||
|
||||
A: You have to setup charset used for decoding (ISO and UTF), encoding, and
|
||||
internal WeeChat charset.
|
||||
Internal charset should be empty value, except if WeeChat failed to
|
||||
detect your locale.
|
||||
A: For versions < 0.2.3, please upgrade to last stable version.
|
||||
For versions >= 0.2.3 :
|
||||
- check that weechat-curses is linked to libncursesw (warning: needed
|
||||
on most distributions but not all) :
|
||||
ldd /path/to/weechat-curses
|
||||
- check that "Charset" plugin is loaded with /plugin command
|
||||
(if it is not, then you probably need "weechat-plugins" package)
|
||||
- check charset line (on server buffer), you should see ISO-XXXXXX or
|
||||
UTF-8 for terminal charset. If you see ANSI_X3.4-1968 or other values,
|
||||
probably your locale is wrong.
|
||||
- setup global decode value, for example:
|
||||
/setp charset.global.decode = ISO-8859-15
|
||||
- if you are using UTF-8 locale, check that your terminal is UTF-8
|
||||
ready. Terminal recommended for UTF-8 is rxvt-unicode.
|
||||
|
||||
|
||||
2.5
|
||||
@@ -173,6 +183,26 @@ A: Yes, you have to use python script shell.py (available on WeeChat
|
||||
users, you can issue: /shell setenv LANG=en_US)
|
||||
|
||||
|
||||
2.12
|
||||
================================================================================
|
||||
Q: With Curses GUI, how can I copy/paste text without pasting nicklist ?
|
||||
|
||||
A: You can use a terminal with rectangular selection (like rxvt-unicode,
|
||||
konsole, ...).
|
||||
Other solution is to move nicklist to top or bottom, for example:
|
||||
/set look_nicklist_position = top
|
||||
|
||||
|
||||
2.13
|
||||
================================================================================
|
||||
Q: How to be warned when someone highlights me on a channel ?
|
||||
|
||||
A: You can use sound.pl script (available on scripts page), and then
|
||||
setup a system command (to play sound, display message, ..) with this
|
||||
command :
|
||||
/setp perl.sound.cmd_highlight = "/usr/bin/command arguments..."
|
||||
|
||||
|
||||
3.1
|
||||
================================================================================
|
||||
Q: How should I report bugs?
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2007-01-06
|
||||
WeeChat FAQ, 2007-09-06
|
||||
=======================
|
||||
|
||||
Public concerné :
|
||||
@@ -94,10 +94,22 @@ R: Une fen
|
||||
================================================================================
|
||||
Q: Je ne vois pas bien certains accents dans WeeChat, que faire ?
|
||||
|
||||
R: Il faut configurer le charset utilisé pour le décodage (ISO et UTF),
|
||||
l'encodage ainsi que le charset interne à WeeChat.
|
||||
Le charset interne à WeeChat doit être une valeur vide, sauf si WeeChat
|
||||
n'arrive pas à déterminer votre locale.
|
||||
R: Pour les versions < 0.2.3, merci d'installer la dernière version stable.
|
||||
Pour les versions >= 0.2.3 :
|
||||
- vérifiez que weechat-curses est lié avec libncursesw (attention:
|
||||
nécessaire sur beaucoup de distributions, mais pas toutes) :
|
||||
ldd /chemin/vers/weechat-curses
|
||||
- vérifiez que l'extension "Charset" est chargée avec la commande
|
||||
/plugin (s'il ne l'est pas, vous devez peut-être installer le
|
||||
paquet "weechat-plugins")
|
||||
- vérifiez la ligne charset (sur le tampon serveur), vous devriez voir
|
||||
ISO-XXXXXX ou UTF-8 pour le charset du terminal. Si vous voyez
|
||||
ANSI_X3.4-1968 ou d'autres valeurs, votre locale est probablement
|
||||
erronée.
|
||||
- affectez la valeur pour le décodage global, par exemple :
|
||||
/setp charset.global.decode = ISO-8859-15
|
||||
- si vous utilisez la locale UTF-8, vérifiez que votre terminal est
|
||||
compatible UTF-8. Un terminal conseillé pour l'UTF-8 est rxvt-unicode.
|
||||
|
||||
|
||||
2.5
|
||||
@@ -181,6 +193,28 @@ R: Oui, il faut utiliser le script python shell.py (disponible sur le site
|
||||
/shell setenv LANG=en_US)
|
||||
|
||||
|
||||
2.12
|
||||
================================================================================
|
||||
Q: Avec l'interface Curses, comment puis-je copier/coller du texte sans
|
||||
coller la liste des pseudos ?
|
||||
|
||||
R: Vous pouvez utiliser un terminal qui propose la sélection rectangulaire
|
||||
(comme rxvt-unicode, konsole, etc...).
|
||||
Une autre solution est de déplacer la liste des pseudos en haut ou en
|
||||
bas, par exemple :
|
||||
/set look_nicklist_position = top
|
||||
|
||||
|
||||
2.13
|
||||
================================================================================
|
||||
Q: Comment être averti lorsque quelqu'un prononce mon pseudo sur un canal ?
|
||||
|
||||
R: Vous pouvez utiliser le script sound.pl (disponible sur la page des
|
||||
scripts), puis configurer une commande système (jouant un son, affichant
|
||||
un message à l'écran, etc...) comme ceci :
|
||||
/setp perl.sound.cmd_highlight = "/usr/bin/commande parametres..."
|
||||
|
||||
|
||||
3.1
|
||||
================================================================================
|
||||
Q: Comment dois-je reporter les bugs ?
|
||||
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,8 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
SUBDIRS = po doc intl src
|
||||
|
||||
@@ -1,6 +1,37 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
* FlashCode, 2009-06-13
|
||||
|
||||
WeeChat 0.2.6.3 released.
|
||||
|
||||
This version fixes gnutls detection.
|
||||
|
||||
* FlashCode, 2009-04-18
|
||||
|
||||
WeeChat 0.2.6.2 released.
|
||||
|
||||
This version fixes a bug with charset decoding (like iso2022jp).
|
||||
|
||||
* FlashCode, 2009-03-14
|
||||
|
||||
WeeChat 0.2.6.1 released.
|
||||
|
||||
This version fixes a major bug: crash with some special chars in IRC
|
||||
messages.
|
||||
|
||||
* FlashCode, 2007-09-06
|
||||
|
||||
WeeChat 0.2.6 released.
|
||||
|
||||
* FlashCode, 2007-06-07
|
||||
|
||||
WeeChat 0.2.5 released.
|
||||
|
||||
* FlashCode, 2007-03-29
|
||||
|
||||
WeeChat 0.2.4 released.
|
||||
|
||||
* FlashCode, 2007-01-10
|
||||
|
||||
WeeChat 0.2.3 released.
|
||||
|
||||
@@ -29,7 +29,7 @@ WeeChat is distributed under GPL licence (see COPYING file for complete license)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
@@ -38,8 +38,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
---
|
||||
|
||||
+16
@@ -1,4 +1,20 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
###
|
||||
### common stuff
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find Aspell
|
||||
# This module finds if libaspell is installed and determines where
|
||||
# the include files and libraries are.
|
||||
#
|
||||
# This code sets the following variables:
|
||||
#
|
||||
# ASPELL_INCLUDE_PATH = path to where aspell.h can be found
|
||||
# ASPELL_LIBRARY = path to where libaspell.so* can be found
|
||||
|
||||
IF (ASPELL_FOUND)
|
||||
# Already in cache, be silent
|
||||
SET(ASPELL_FIND_QUIETLY TRUE)
|
||||
ENDIF (ASPELL_FOUND)
|
||||
|
||||
FIND_PATH(ASPELL_INCLUDE_PATH
|
||||
NAMES aspell.h
|
||||
PATHS /usr/include /usr/local/include /usr/pkg/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ASPELL_LIBRARY
|
||||
NAMES aspell aspell-15
|
||||
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
|
||||
)
|
||||
|
||||
IF (ASPELL_INCLUDE_PATH AND ASPELL_LIBRARY)
|
||||
SET(ASPELL_FOUND TRUE)
|
||||
ENDIF (ASPELL_INCLUDE_PATH AND ASPELL_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
ASPELL_INCLUDE_PATH
|
||||
ASPELL_LIBRARY
|
||||
)
|
||||
@@ -0,0 +1,67 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find Gettext
|
||||
# This module finds if gettext is installed and determines where
|
||||
# the include files and libraries are.
|
||||
#
|
||||
# This code sets the following variables:
|
||||
#
|
||||
# GETTEXT_FOUND = is gettext usable on system?
|
||||
|
||||
IF(GETTEXT_FOUND)
|
||||
# Already in cache, be silent
|
||||
SET(GETTEXT_FIND_QUIETLY TRUE)
|
||||
ENDIF(GETTEXT_FOUND)
|
||||
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckLibraryExists)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
|
||||
FIND_PATH(LIBINTL_INCLUDE
|
||||
NAMES libintl.h
|
||||
PATH /usr/local/include /usr/pkg/include /usr/include
|
||||
)
|
||||
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${LIBINTL_INCLUDE})
|
||||
|
||||
CHECK_INCLUDE_FILES(libintl.h HAVE_LIBINTL_H)
|
||||
|
||||
IF(HAVE_LIBINTL_H)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(dgettext LIBC_HAS_DGETTEXT)
|
||||
IF(LIBC_HAS_DGETTEXT)
|
||||
SET(GETTEXT_FOUND TRUE)
|
||||
ELSE(LIBC_HAS_DGETTEXT)
|
||||
FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
IF(LIBINTL_LIBRARY)
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "iconv")
|
||||
CHECK_LIBRARY_EXISTS(${LIBINTL_LIBRARY} "libintl_dgettext" "" LIBINTL_HAS_DGETTEXT)
|
||||
ELSE(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
CHECK_LIBRARY_EXISTS(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
|
||||
IF(LIBINTL_HAS_DGETTEXT)
|
||||
SET(GETTEXT_FOUND TRUE)
|
||||
ENDIF(LIBINTL_HAS_DGETTEXT)
|
||||
ENDIF(LIBINTL_LIBRARY)
|
||||
ENDIF(LIBC_HAS_DGETTEXT)
|
||||
ENDIF(HAVE_LIBINTL_H)
|
||||
@@ -0,0 +1,71 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find GnuTLS
|
||||
# This module finds if libgnutls is installed and determines where
|
||||
# the include files and libraries are.
|
||||
#
|
||||
# This code sets the following variables:
|
||||
#
|
||||
# GNUTLS_INCLUDE_PATH = path to where <gnutls/gnutls.h> can be found
|
||||
# GNUTLS_LIBRARY = path to where libgnutls.so* can be found
|
||||
# GNUTLS_CFLAGS = cflags to use to compile
|
||||
# GNUTLS_LDFLAGS = ldflags to use to compile
|
||||
|
||||
IF(GNUTLS_INCLUDE_PATH AND GNUTLS_LIBRARY)
|
||||
# Already in cache, be silent
|
||||
set(GNUTLS_FIND_QUIETLY TRUE)
|
||||
ENDIF(GNUTLS_INCLUDE_PATH AND GNUTLS_LIBRARY)
|
||||
|
||||
FIND_PROGRAM(PKG_CONFIG_EXECUTABLE NAMES pkg-config)
|
||||
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=prefix gnutls
|
||||
OUTPUT_VARIABLE GNUTLS_PREFIX
|
||||
)
|
||||
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --cflags gnutls
|
||||
OUTPUT_VARIABLE GNUTLS_CFLAGS
|
||||
)
|
||||
STRING(REGEX REPLACE "[\r\n]" "" GNUTLS_CFLAGS "${GNUTLS_FLAGS}")
|
||||
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --libs gnutls
|
||||
OUTPUT_VARIABLE GNUTLS_LDFLAGS
|
||||
)
|
||||
STRING(REGEX REPLACE "[\r\n]" "" GNUTLS_LDFLAGS "${GNUTLS_LDFLAGS}")
|
||||
|
||||
SET(GNUTLS_POSSIBLE_INCLUDE_PATH "${GNUTLS_PREFIX}/include")
|
||||
SET(GNUTLS_POSSIBLE_LIB_DIR "${GNUTLS_PREFIX}/lib")
|
||||
|
||||
FIND_PATH(GNUTLS_INCLUDE_PATH
|
||||
NAMES gnutls/gnutls.h
|
||||
PATHS GNUTLS_POSSIBLE_INCLUDE_PATH
|
||||
)
|
||||
|
||||
FIND_LIBRARY(GNUTLS_LIBRARY
|
||||
NAMES gnutls
|
||||
PATHS GNUTLS_POSSIBLE_LIB_DIR
|
||||
)
|
||||
|
||||
IF (GNUTLS_INCLUDE_PATH AND GNUTLS_LIBRARY)
|
||||
SET(GNUTLS_FOUND TRUE)
|
||||
ENDIF (GNUTLS_INCLUDE_PATH AND GNUTLS_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
GNUTLS_INCLUDE_PATH
|
||||
GNUTLS_LIBRARY
|
||||
GNUTLS_CFLAGS
|
||||
GNUTLS_LDFLAGS
|
||||
)
|
||||
@@ -0,0 +1,79 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find Iconv
|
||||
# This module finds if libiconv is installed and determines where
|
||||
# the include files and libraries are.
|
||||
#
|
||||
# This code sets the following variables:
|
||||
#
|
||||
# ICONV_INCLUDE_PATH = path to where <iconv.h> can be found
|
||||
# ICONV_LIBRARY = path to where libiconv.so* can be found (on non glibc based systems)
|
||||
#
|
||||
# ICONV_FOUND = is iconv usable on system?
|
||||
|
||||
IF(ICONV_FOUND)
|
||||
# Already in cache, be silent
|
||||
set(ICONV_FIND_QUIETLY TRUE)
|
||||
ENDIF(ICONV_FOUND)
|
||||
|
||||
FIND_PATH(ICONV_INCLUDE_PATH
|
||||
NAMES iconv.h
|
||||
PATHS /usr/include /usr/local/include /usr/pkg/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ICONV_LIBRARY
|
||||
NAMES iconv
|
||||
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
|
||||
)
|
||||
|
||||
IF(ICONV_INCLUDE_PATH)
|
||||
IF(ICONV_LIBRARY)
|
||||
STRING(REGEX REPLACE "/[^/]*$" "" ICONV_LIB_PATH "${ICONV_LIBRARY}")
|
||||
CHECK_LIBRARY_EXISTS(iconv libiconv_open ${ICONV_LIB_PATH} ICONV_FOUND)
|
||||
IF(NOT ICONV_FOUND)
|
||||
CHECK_LIBRARY_EXISTS(iconv iconv_open ${ICONV_LIB_PATH} ICONV_FOUND)
|
||||
ENDIF(NOT ICONV_FOUND)
|
||||
ELSE(ICONV_LIBRARY)
|
||||
CHECK_FUNCTION_EXISTS(iconv_open ICONV_FOUND)
|
||||
ENDIF(ICONV_LIBRARY)
|
||||
ENDIF(ICONV_INCLUDE_PATH)
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
IF(ICONV_LIBRARY)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_PATH})
|
||||
ENDIF(ICONV_LIBRARY)
|
||||
|
||||
SET(CMAKE_REQUIRED_FLAGS -Werror)
|
||||
check_c_source_compiles("
|
||||
#include <iconv.h>
|
||||
int main(){
|
||||
iconv_t conv = 0;
|
||||
const char* in = 0;
|
||||
size_t ilen = 0;
|
||||
char* out = 0;
|
||||
size_t olen = 0;
|
||||
iconv(conv, &in, &ilen, &out, &olen);
|
||||
return 0;
|
||||
}
|
||||
" ICONV_2ARG_IS_CONST)
|
||||
MARK_AS_ADVANCED(
|
||||
ICONV_INCLUDE_PATH
|
||||
ICONV_LIBRARY
|
||||
ICONV_FOUND
|
||||
)
|
||||
@@ -0,0 +1,81 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find Lua
|
||||
# This module finds if liblua is installed and determines where
|
||||
# the include files and libraries are.
|
||||
#
|
||||
# This code sets the following variables:
|
||||
#
|
||||
# LUA_INCLUDE_PATH = path to where <lua.h> can be found
|
||||
# LUA_LIBRARY = path to where liblua.so* (and liblualib.so* for lua <can be found (on non glibc based systems)
|
||||
#
|
||||
# LUA_FOUND = is liblua usable on system?
|
||||
|
||||
IF(LUA_FOUND)
|
||||
# Already in cache, be silent
|
||||
SET(LUA_FIND_QUIETLY TRUE)
|
||||
ENDIF(LUA_FOUND)
|
||||
|
||||
FIND_PATH(
|
||||
LUA51_INCLUDE_PATH lua.h
|
||||
PATHS /usr/include /usr/local/include /usr/pkg/include
|
||||
PATH_SUFFIXES lua51 lua5.1 lua-5.1
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
LUA51_LIBRARY NAMES lua51 lua5.1 lua-5.1 lua
|
||||
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
|
||||
)
|
||||
|
||||
IF(LUA51_INCLUDE_PATH AND LUA51_LIBRARY)
|
||||
SET(LUA_INCLUDE_PATH "${LUA51_INCLUDE_PATH}")
|
||||
SET(LUA_LIBRARY "${LUA51_LIBRARY}")
|
||||
SET(LUA_VERSION "5.1")
|
||||
SET(LUA_FOUND TRUE)
|
||||
ELSE(LUA51_INCLUDE_PATH AND LUA51_LIBRARY)
|
||||
FIND_PATH(
|
||||
LUA50_INCLUDE_PATH lua.h
|
||||
PATHS /usr/include /usr/local/include /usr/pkg/include
|
||||
PATH_SUFFIXES lua50 lua5.0 lua-5.0 lua
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
LUA50_LIBRARY NAMES lua50 lua5.0 lua-5.0 lua
|
||||
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
LUALIB50_LIBRARY NAMES lualib50 lualib5.0 lualib-5.0 lualib
|
||||
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
|
||||
)
|
||||
|
||||
IF(LUA50_INCLUDE_PATH AND LUA50_LIBRARY AND LUALIB50_LIBRARY)
|
||||
SET(LUA_INCLUDE_PATH "${LUA50_INCLUDE_PATH}")
|
||||
SET(LUA_LIBRARY "${LUA50_LIBRARY}")
|
||||
SET(LUALIB_LIBRARY "${LUALIB50_LIBRARY}")
|
||||
SET(LUA_VERSION "5.0")
|
||||
SET(LUA_FOUND TRUE)
|
||||
ENDIF(LUA50_INCLUDE_PATH AND LUA50_LIBRARY AND LUALIB50_LIBRARY)
|
||||
ENDIF(LUA51_INCLUDE_PATH AND LUA51_LIBRARY)
|
||||
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LUA_INCLUDE_PATH
|
||||
LUA_LIBRARY
|
||||
LUALIB_LIBRARY
|
||||
# LUA_VERSION
|
||||
)
|
||||
@@ -0,0 +1,38 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
IF(NCURSES_FOUND)
|
||||
SET(NCURSES_FIND_QUIETLY TRUE)
|
||||
ENDIF(NCURSES_FOUND)
|
||||
|
||||
FIND_PATH(NCURSES_INCLUDE_PATH
|
||||
NAMES ncurses.h curses.h
|
||||
PATHS /usr/include /usr/local/include /usr/pkg/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(NCURSES_LIBRARY
|
||||
NAMES ncursesw ncurses
|
||||
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
|
||||
)
|
||||
|
||||
IF (NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY)
|
||||
SET(NCURSES_FOUND TRUE)
|
||||
ENDIF(NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
NCURSES_INCLUDE_PATH
|
||||
NCURSES_LIBRARY
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find Perl libraries
|
||||
# This module finds if Perl is installed and determines where the include files
|
||||
# and libraries are. It also determines what the name of the library is. This
|
||||
# code sets the following variables:
|
||||
#
|
||||
# PERL_EXECUTABLE = full path to the perl binary
|
||||
# PERL_INCLUDE_PATH = path to where perl.h can be found
|
||||
# PERL_LIBRARY = path to where libperl.so* can be found
|
||||
# PERL_CFLAGS = perl compiler options for compiling
|
||||
# PERL_LFLAGS = perl compiler options for linking
|
||||
|
||||
IF(PERL_FOUND)
|
||||
# Already in cache, be silent
|
||||
SET(PERL_FIND_QUIETLY TRUE)
|
||||
ENDIF(PERL_FOUND)
|
||||
|
||||
FIND_PROGRAM(PERL_EXECUTABLE
|
||||
NAMES perl perl5
|
||||
PATHS /usr/bin /usr/local/bin /usr/pkg/bin
|
||||
)
|
||||
|
||||
IF(PERL_EXECUTABLE)
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \"\$Config{archlibexp}/CORE\""
|
||||
OUTPUT_VARIABLE PERL_INTERNAL_DIR
|
||||
)
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ccopts
|
||||
OUTPUT_VARIABLE PERL_CFLAGS
|
||||
)
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ldopts
|
||||
OUTPUT_VARIABLE PERL_LFLAGS
|
||||
)
|
||||
|
||||
# remove the new lines from the output by replacing them with empty strings
|
||||
STRING(REPLACE "\n" "" PERL_INTERNAL_DIR "${PERL_INTERNAL_DIR}")
|
||||
STRING(REPLACE "\n" "" PERL_CFLAGS "${PERL_CFLAGS}")
|
||||
STRING(REPLACE "\n" "" PERL_LFLAGS "${PERL_LFLAGS}")
|
||||
|
||||
FIND_PATH(PERL_INCLUDE_PATH
|
||||
NAMES perl.h
|
||||
PATHS ${PERL_INTERNAL_DIR}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(PERL_LIBRARY
|
||||
NAMES perl
|
||||
PATHS /usr/lib /usr/local/lib /usr/pkg/lib ${PERL_INTERNAL_DIR}
|
||||
)
|
||||
|
||||
IF(PERL_LIBRARY AND PERL_INCLUDE_PATH)
|
||||
SET(PERL_FOUND TRUE)
|
||||
ENDIF(PERL_LIBRARY AND PERL_INCLUDE_PATH)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
PERL_EXECUTABLE
|
||||
PERL_INCLUDE_PATH
|
||||
PERL_LIBRARY
|
||||
PERL_CFLAGS
|
||||
PERL_LFLAGS
|
||||
)
|
||||
ENDIF(PERL_EXECUTABLE)
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find Python
|
||||
# This module finds if Python is installed and determines where the include files
|
||||
# and libraries are. It also determines what the name of the library is. This
|
||||
# code sets the following variables:
|
||||
#
|
||||
# PYTHON_EXECUTABLE = full path to the python binary
|
||||
# PYTHON_INCLUDE_PATH = path to where python.h can be found
|
||||
# PYTHON_LIBRARY = path to where libpython.so* can be found
|
||||
# PYTHON_LFLAGS = python compiler options for linking
|
||||
|
||||
IF(PYTHON_FOUND)
|
||||
# Already in cache, be silent
|
||||
SET(PYTHON_FIND_QUIETLY TRUE)
|
||||
ENDIF(PYTHON_FOUND)
|
||||
|
||||
FIND_PROGRAM(PYTHON_EXECUTABLE
|
||||
NAMES python python2.5 python2.4 python2.3 python2.2
|
||||
PATHS /usr/bin /usr/local/bin /usr/pkg/bin
|
||||
)
|
||||
|
||||
IF(PYTHON_EXECUTABLE)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print get_config_var('CONFINCLUDEPY')"
|
||||
OUTPUT_VARIABLE PYTHON_INC_DIR
|
||||
)
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print get_config_var('LIBPL')"
|
||||
OUTPUT_VARIABLE PYTHON_POSSIBLE_LIB_PATH
|
||||
)
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print get_config_var('LINKFORSHARED')"
|
||||
OUTPUT_VARIABLE PYTHON_LFLAGS
|
||||
)
|
||||
|
||||
# remove the new lines from the output by replacing them with empty strings
|
||||
STRING(REPLACE "\n" "" PYTHON_INC_DIR "${PYTHON_INC_DIR}")
|
||||
STRING(REPLACE "\n" "" PYTHON_POSSIBLE_LIB_PATH "${PYTHON_POSSIBLE_LIB_PATH}")
|
||||
STRING(REPLACE "\n" "" PYTHON_LFLAGS "${PYTHON_LFLAGS}")
|
||||
|
||||
FIND_PATH(PYTHON_INCLUDE_PATH
|
||||
NAMES Python.h
|
||||
PATHS ${PYTHON_INC_DIR}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(PYTHON_LIBRARY
|
||||
NAMES python python2.5 python2.4 python2.3 python2.2
|
||||
PATHS ${PYTHON_POSSIBLE_LIB_PATH}
|
||||
)
|
||||
|
||||
IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_PATH)
|
||||
SET(PYTHON_FOUND TRUE)
|
||||
ENDIF(PYTHON_LIBRARY AND PYTHON_INCLUDE_PATH)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
PYTHON_EXECUTABLE
|
||||
PYTHON_INCLUDE_PATH
|
||||
PYTHON_LIBRARY
|
||||
PYTHON_LFLAGS
|
||||
)
|
||||
|
||||
ENDIF(PYTHON_EXECUTABLE)
|
||||
@@ -0,0 +1,77 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find Ruby
|
||||
# This module finds if Ruby is installed and determines where the include files
|
||||
# and libraries are. It also determines what the name of the library is. This
|
||||
# code sets the following variables:
|
||||
#
|
||||
# RUBY_EXECUTABLE = full path to the ruby binary
|
||||
# RUBY_INCLUDE_PATH = path to where ruby.h can be found
|
||||
# RUBY_LIBRARY = path to where libruby.so* can be found
|
||||
|
||||
IF(RUBY_FOUND)
|
||||
# Already in cache, be silent
|
||||
SET(RUBY_FIND_QUIETLY TRUE)
|
||||
ENDIF(RUBY_FOUND)
|
||||
|
||||
FIND_PROGRAM(RUBY_EXECUTABLE
|
||||
NAMES ruby ruby1.9 ruby19 ruby1.8 ruby18 ruby1.6 ruby16
|
||||
PATHS /usr/bin /usr/local/bin /usr/pkg/bin
|
||||
)
|
||||
|
||||
IF(RUBY_EXECUTABLE)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['archdir']"
|
||||
OUTPUT_VARIABLE RUBY_ARCH_DIR
|
||||
)
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['libdir']"
|
||||
OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH
|
||||
)
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['rubylibdir']"
|
||||
OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH
|
||||
)
|
||||
|
||||
# remove the new lines from the output by replacing them with empty strings
|
||||
STRING(REPLACE "\n" "" RUBY_ARCH_DIR "${RUBY_ARCH_DIR}")
|
||||
STRING(REPLACE "\n" "" RUBY_POSSIBLE_LIB_PATH "${RUBY_POSSIBLE_LIB_PATH}")
|
||||
STRING(REPLACE "\n" "" RUBY_RUBY_LIB_PATH "${RUBY_RUBY_LIB_PATH}")
|
||||
|
||||
FIND_PATH(RUBY_INCLUDE_PATH
|
||||
NAMES ruby.h
|
||||
PATHS ${RUBY_ARCH_DIR}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(RUBY_LIBRARY
|
||||
NAMES ruby ruby1.6 ruby16 ruby1.8 ruby18 ruby1.9 ruby19
|
||||
PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH}
|
||||
)
|
||||
|
||||
IF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
|
||||
SET(RUBY_FOUND TRUE)
|
||||
ENDIF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
RUBY_EXECUTABLE
|
||||
RUBY_LIBRARY
|
||||
RUBY_INCLUDE_PATH
|
||||
)
|
||||
|
||||
ENDIF(RUBY_EXECUTABLE)
|
||||
@@ -0,0 +1,21 @@
|
||||
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
STRING(REGEX REPLACE "\n" ";" files "${files}")
|
||||
FOREACH(file ${files})
|
||||
MESSAGE(STATUS "Uninstalling \"${file}\"")
|
||||
IF(NOT EXISTS "${file}")
|
||||
MESSAGE(FATAL_ERROR "File \"${file}\" does not exists.")
|
||||
ENDIF(NOT EXISTS "${file}")
|
||||
EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VARIABLE rm_retval)
|
||||
IF("${rm_retval}" GREATER 0)
|
||||
MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
|
||||
ENDIF("${rm_retval}" GREATER 0)
|
||||
ENDFOREACH(file)
|
||||
|
||||
|
||||
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
VERSION=@VERSION@
|
||||
SRCROOT=@CMAKE_SOURCE_DIR@
|
||||
BUILDDIR=@CMAKE_BINARY_DIR@
|
||||
PROJECT=@PROJECT_NAME@
|
||||
TAG=release-$(echo $VERSION | sed -e 's/\./-/g')
|
||||
|
||||
EXCLUDE="@DIST_EXCLUDE@"
|
||||
EXPORT_DIR="${PROJECT}-${VERSION}"
|
||||
|
||||
if [ -z $CVSROOT ]; then
|
||||
echo "The CVSROOT variable must be set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Exporting source tree"
|
||||
if [ $(echo $VERSION | grep cvs) ]; then
|
||||
cvs export -r HEAD -d $PROJECT-$VERSION $PROJECT
|
||||
else
|
||||
cvs export -r $TAG -d $PROJECT-$VERSION $PROJECT
|
||||
fi
|
||||
|
||||
echo "Removing not needed stuff"
|
||||
for i in $EXCLUDE ; do
|
||||
echo " $i"
|
||||
rm -rf $EXPORT_DIR/$i
|
||||
done
|
||||
|
||||
echo "Generating archive"
|
||||
tar cjf ${BUILDDIR}/${PROJECT}-${VERSION}.tar.bz2 ${EXPORT_DIR}
|
||||
|
||||
echo "Cleaning up"
|
||||
rm -rf ${EXPORT_DIR}
|
||||
@@ -0,0 +1,29 @@
|
||||
#cmakedefine HAVE_ARPA_INET_H
|
||||
#cmakedefine HAVE_LIBINTL_H
|
||||
#cmakedefine HAVE_LIMITS_H
|
||||
#cmakedefine HAVE_LOCALE_H
|
||||
#cmakedefine HAVE_NETDB_H
|
||||
#cmakedefine HAVE_NETINET_IN_H
|
||||
#cmakedefine HAVE_STDLIB_H
|
||||
#cmakedefine HAVE_STRING_H
|
||||
#cmakedefine HAVE_SYS_SOCKET_H
|
||||
#cmakedefine HAVE_SYS_TIME_H
|
||||
#cmakedefine HAVE_SYS_TYPES_H
|
||||
#cmakedefine HAVE_UNISTD_H
|
||||
#cmakedefine HAVE_PWD_H
|
||||
#cmakedefine HAVE_ERRNO_H
|
||||
#cmakedefine HAVE_REGEX_H
|
||||
#cmakedefine HAVE_WCHAR_H
|
||||
#cmakedefine HAVE_SYS_FILE_H
|
||||
#cmakedefine HAVE_FLOCK
|
||||
#cmakedefine HAVE_LANGINFO_CODESET
|
||||
#cmakedefine HAVE_STRNDUP
|
||||
#cmakedefine ICONV_2ARG_IS_CONST 1
|
||||
#define PACKAGE_VERSION "@VERSION@"
|
||||
#define PACKAGE "@PROJECT_NAME@"
|
||||
#define PACKAGE_NAME "@PROJECT_NAME@"
|
||||
#define PACKAGE_STRING "@PKG_STRING@"
|
||||
#define WEECHAT_LIBDIR "@LIBDIR@"
|
||||
#define WEECHAT_SHAREDIR "@SHAREDIR@"
|
||||
#define LOCALEDIR "@LOCALEDIR@"
|
||||
#define _GNU_SOURCE 1
|
||||
+23
-14
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,18 +11,17 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(WeeChat, 0.2.3, flashcode@flashtux.org)
|
||||
AC_INIT(WeeChat, 0.2.6.3, flashcode@flashtux.org)
|
||||
AC_CONFIG_SRCDIR([src/common/weechat.c])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([weechat], [0.2.3])
|
||||
AM_INIT_AUTOMAKE([weechat], [0.2.6.3])
|
||||
|
||||
# Checks for programs
|
||||
AC_PROG_CC
|
||||
@@ -601,20 +600,28 @@ fi
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if test "x$enable_gnutls" = "xyes" ; then
|
||||
found_gnutls="no"
|
||||
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[
|
||||
AC_CHECK_HEADER(gnutls/gnutls.h,ac_found_gnutls_header="yes",ac_found_gnutls_header="no")
|
||||
AC_CHECK_LIB(gnutls,gnutls_global_init,ac_found_gnutls_lib="yes",ac_found_gnutls_lib="no")
|
||||
|
||||
AC_MSG_CHECKING(for gnutls headers and librairies)
|
||||
if test "x$ac_found_gnutls_header" = "xno" -o "x$ac_found_gnutls_lib" = "xno" ; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN([
|
||||
*** libgnutls was not found. You may want to get it from ftp://ftp.gnutls.org/pub/gnutls/
|
||||
*** WeeChat will be built without GnuTLS support.]]))
|
||||
if test "x$found_gnutls" = "xyes" ; then
|
||||
GNUTLS_CFLAGS=`libgnutls-config --cflags`
|
||||
GNUTLS_LFLAGS=`libgnutls-config --libs`
|
||||
*** WeeChat will be built without GnuTLS support.])
|
||||
enable_gnutls="no"
|
||||
not_found="$not_found gnutls"
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
GNUTLS_CFLAGS=`pkg-config gnutls --cflags`
|
||||
GNUTLS_LFLAGS=`pkg-config gnutls --libs`
|
||||
AC_SUBST(GNUTLS_CFLAGS)
|
||||
AC_SUBST(GNUTLS_LFLAGS)
|
||||
AC_DEFINE(HAVE_GNUTLS)
|
||||
else
|
||||
enable_gnutls="no"
|
||||
not_found="$not_found gnutls"
|
||||
CFLAGS="$CFLAGS -DHAVE_GNUTLS"
|
||||
fi
|
||||
else
|
||||
not_asked="$not_asked gnutls"
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -795,6 +802,8 @@ AC_OUTPUT([Makefile
|
||||
doc/ru/Makefile
|
||||
doc/pl/Makefile
|
||||
doc/cs/Makefile
|
||||
doc/sco/Makefile
|
||||
doc/sv/Makefile
|
||||
src/Makefile
|
||||
src/common/Makefile
|
||||
src/irc/Makefile
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
SET(DOC_LANGS
|
||||
cs
|
||||
de
|
||||
en
|
||||
fr
|
||||
pl
|
||||
ru
|
||||
sco
|
||||
sv
|
||||
)
|
||||
|
||||
FIND_PROGRAM(
|
||||
COPY cp
|
||||
PATHS /bin /usr/bin /usr/local/bin /usr/pkg/bin
|
||||
)
|
||||
|
||||
FIND_PROGRAM(
|
||||
XSLTPROC xsltproc
|
||||
PATHS /bin /usr/bin /usr/local/bin /usr/pkg/bin
|
||||
)
|
||||
|
||||
FIND_PROGRAM(
|
||||
DBLATEX dblatex
|
||||
PATHS /bin /usr/bin /usr/local/bin /usr/pkg/bin
|
||||
)
|
||||
|
||||
FIND_FILE(DOC_XSL_PREFIX chunk.xsl PATHS
|
||||
/usr/share/xml/docbook/stylesheet/nwalsh/
|
||||
/usr/share/xml/docbook/xsl-stylesheets-1.69/
|
||||
PATH_SUFFIXES html
|
||||
DOC "Path to nwalsh xsl stylesheet"
|
||||
)
|
||||
STRING(REPLACE "/html/chunk.xsl" "" DOC_XSL_PREFIX "${DOC_XSL_PREFIX}")
|
||||
|
||||
IF(XSLTPROC AND DOC_XSL_PREFIX AND COPY)
|
||||
SET(BUILD_HTML TRUE)
|
||||
ENDIF(XSLTPROC AND DOC_XSL_PREFIX AND COPY)
|
||||
|
||||
IF(DBLATEX AND COPY)
|
||||
SET(BUILD_PDF TRUE)
|
||||
ENDIF(DBLATEX AND COPY)
|
||||
|
||||
IF(BUILD_HTML)
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html.xsl.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/weechat-html.xsl
|
||||
@ONLY
|
||||
)
|
||||
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html-one.xsl.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/weechat-html-one.xsl
|
||||
@ONLY
|
||||
)
|
||||
ENDIF(BUILD_HTML)
|
||||
|
||||
|
||||
IF(BUILD_HTML OR BUILD_PDF)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND date "+%F %T"
|
||||
OUTPUT_VARIABLE DOC_DATE
|
||||
)
|
||||
STRING(REPLACE "\n" "" DOC_DATE "${DOC_DATE}")
|
||||
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/date.xml
|
||||
@ONLY
|
||||
)
|
||||
|
||||
FOREACH(dlang ${DOC_LANGS})
|
||||
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml)
|
||||
|
||||
IF(BUILD_HTML)
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang})
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build)
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang})
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}/index.html ${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang}/weechat.${dlang}.html
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/irc_commands.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/key_functions.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_commands.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_BINARY_DIR}/date.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/weechat-doc.css" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/weechat-doc.css" "${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang}"
|
||||
COMMAND ${XSLTPROC} ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}/ ${CMAKE_CURRENT_BINARY_DIR}/weechat-html.xsl ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build/weechat.${dlang}.xml
|
||||
COMMAND ${XSLTPROC} ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang}/weechat.${dlang}.html ${CMAKE_CURRENT_BINARY_DIR}/weechat-html-one.xsl ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build/weechat.${dlang}.xml
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/irc_commands.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/key_functions.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_commands.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html-one.xsl.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html.xsl.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/weechat-doc.css
|
||||
COMMENT "Building html doc (${dlang})"
|
||||
)
|
||||
ADD_CUSTOM_TARGET(doc-html-${dlang} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}/index.html)
|
||||
ADD_CUSTOM_TARGET(doc-html-one-${dlang} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang}/weechat.${dlang}.html)
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang} DESTINATION share/doc/${PROJECT_NAME}/html)
|
||||
|
||||
ENDIF(BUILD_HTML)
|
||||
|
||||
IF(BUILD_PDF)
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang})
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}/weechat.${dlang}.pdf
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/irc_commands.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/key_functions.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_commands.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
|
||||
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_BINARY_DIR}/date.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
|
||||
COMMAND ${DBLATEX} ARGS -c ${CMAKE_CURRENT_SOURCE_DIR}/dblatex.conf -o ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}/weechat.${dlang}.pdf ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build/weechat.${dlang}.xml
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/irc_commands.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/key_functions.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_commands.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html-one.xsl.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
|
||||
COMMENT "Building pdf doc (${dlang})"
|
||||
)
|
||||
ADD_CUSTOM_TARGET(doc-pdf-${dlang} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}/weechat.${dlang}.pdf)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}/weechat.${dlang}.pdf DESTINATION share/doc/${PROJECT_NAME})
|
||||
|
||||
ENDIF(BUILD_PDF)
|
||||
|
||||
ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml)
|
||||
|
||||
ENDFOREACH(dlang ${DOC_LANGS})
|
||||
|
||||
ENDIF(BUILD_HTML OR BUILD_PDF)
|
||||
|
||||
FOREACH(dlang ${DOC_LANGS})
|
||||
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_quickstart.${dlang}.txt)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_quickstart.${dlang}.txt DESTINATION share/doc/${PROJECT_NAME})
|
||||
ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_quickstart.${dlang}.txt)
|
||||
ENDFOREACH(dlang ${DOC_LANGS})
|
||||
|
||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1 DESTINATION share/man/man1)
|
||||
+3
-4
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,11 +11,10 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
SUBDIRS = . en fr de ru pl cs
|
||||
SUBDIRS = . en fr de ru pl cs sco sv
|
||||
|
||||
man_MANS = weechat-curses.1
|
||||
|
||||
|
||||
+2
-3
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -13,8 +13,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,8 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
LANGCODE = cs
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<pubdate>@DOC_DATE@</pubdate>
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,8 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
LANGCODE = de
|
||||
|
||||
+56
-7
@@ -108,7 +108,7 @@
|
||||
<entry>Ganzzahl</entry>
|
||||
<entry>zwischen 0 und 100</entry>
|
||||
<entry>0</entry>
|
||||
<entry>Maximale Größe der Nicklist (Breite oder Höhe, je nach look_nicklist_position (0: kein Maximum); Wenn min == max > 0, ist die Größe fest.</entry>
|
||||
<entry>Max size for nicklist (width or height, depending on look_nicklist_position (0 = no max size; if min = max and > 0, then size is fixed))</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nicklist_separator</option></entry>
|
||||
@@ -180,6 +180,13 @@
|
||||
<entry>20</entry>
|
||||
<entry>Maximale Größe zum Ausrichten von Nicknamen und anderen Nachrichten (sollte >= look_align_size sein)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_align_text_offset</option></entry>
|
||||
<entry>Ganzzahl</entry>
|
||||
<entry>zwischen -1 und 64</entry>
|
||||
<entry>-1</entry>
|
||||
<entry>Offset for aligning lines of messages (except first lines), default is -1 (align after nick), a null or positive value is offset after beginning of line</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_completor</option></entry>
|
||||
<entry>Zeichenfolge</entry>
|
||||
@@ -194,6 +201,13 @@
|
||||
<entry>'[]-^'</entry>
|
||||
<entry>Zeichen, die bei der Nickvervollständigung ignoriert werden</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_completion_smart</option></entry>
|
||||
<entry>Boolean</entry>
|
||||
<entry>eine beliebige Zeichenfolge</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Intelligente vervollständigung der Nicknamen (vervollständigt zuerst mit dem letzten Nick, der einen angesprochen hat)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_complete_first</option></entry>
|
||||
<entry>Boolean</entry>
|
||||
@@ -250,10 +264,17 @@
|
||||
<entry>0</entry>
|
||||
<entry>Maximale Länge der Namen in der Hotlist (0: kein Limit)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_hotlist_sort</option></entry>
|
||||
<entry>Zeichenfolge</entry>
|
||||
<entry>'group_time_asc', 'group_time_desc', 'group_number_asc', 'group_number_desc', 'number_asc', 'number_desc'</entry>
|
||||
<entry>'group_time_asc'</entry>
|
||||
<entry>Hotlist sort type (group_time_asc (default), group_time_desc, group_number_asc, group_number_desc, number_asc, number_desc)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_day_change</option></entry>
|
||||
<entry>Boolean</entry>
|
||||
<entry>zwischen 0 und 32</entry>
|
||||
<entry>'group_time_asc', 'group_time_desc', 'group_number_asc', 'group_number_desc', 'number_asc', 'number_desc'</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Spezielle Nachricht anzeigen, wenn ein neuer Tag beginnt</entry>
|
||||
</row>
|
||||
@@ -278,10 +299,17 @@
|
||||
<entry>'[%n(%m)] '</entry>
|
||||
<entry>Format der Eingabezeile ('%c' wird durch den Channel- oder Servernamen ersetzt, '%n' durch den Nicknamen und '%m' durch die Nick-Modi)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_paste_max_lines</option></entry>
|
||||
<entry>Ganzzahl</entry>
|
||||
<entry>zwischen 0 und 2147483647</entry>
|
||||
<entry>3</entry>
|
||||
<entry>Max number of lines for paste without asking user (0 = disable this feature)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_real_white</option></entry>
|
||||
<entry>Boolean</entry>
|
||||
<entry>eine beliebige Zeichenfolge</entry>
|
||||
<entry>zwischen 0 und 2147483647</entry>
|
||||
<entry>'off'</entry>
|
||||
<entry>Wenn gesetzt, benutze echtes Weiß, als Voreinstellung jedoch für Terminals mit weißem Hintergrund deaktiviert (solltest du niemals einen weißen Hintergrund benutzen, solltest du diese Option aktivieren um ein echtes Weiß anstelle der voreingestellten Terminal Vordergrundfarbe zu bekommen)</entry>
|
||||
</row>
|
||||
@@ -304,7 +332,7 @@
|
||||
<entry>Farbe</entry>
|
||||
<entry>Curses- oder Gtk-Farben</entry>
|
||||
<entry>'lightmagenta'</entry>
|
||||
<entry>Color for '+' when scrolling topic</entry>
|
||||
<entry>Farbe des '+' beim Scrolling des Topics</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_title_bg</option></entry>
|
||||
@@ -551,6 +579,20 @@
|
||||
<entry>'cyan'</entry>
|
||||
<entry>Farbe des Trennzeichens in der Eingabezeile</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_input_text_not_found</option></entry>
|
||||
<entry>Farbe</entry>
|
||||
<entry>Curses- oder Gtk-Farben</entry>
|
||||
<entry>'red'</entry>
|
||||
<entry>Farbe für den Text nicht gefunden</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_input_actions</option></entry>
|
||||
<entry>Farbe</entry>
|
||||
<entry>Curses- oder Gtk-Farben</entry>
|
||||
<entry>'lightgreen'</entry>
|
||||
<entry>Color for actions in input window</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_input_bg</option></entry>
|
||||
<entry>Farbe</entry>
|
||||
@@ -607,6 +649,13 @@
|
||||
<entry>'yellow'</entry>
|
||||
<entry>Farbe des Voice-Symbols</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_nick_user</option></entry>
|
||||
<entry>Farbe</entry>
|
||||
<entry>Curses- oder Gtk-Farben</entry>
|
||||
<entry>'blue'</entry>
|
||||
<entry>Color for user symbol</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_nick_more</option></entry>
|
||||
<entry>Farbe</entry>
|
||||
@@ -906,7 +955,7 @@
|
||||
<entry>Ganzzahl</entry>
|
||||
<entry>zwischen 0 und 5</entry>
|
||||
<entry>2</entry>
|
||||
<entry>Anti-flood: # seconds between two user messages (0 = no anti-flood)</entry>
|
||||
<entry>Anti-flood: # Sekunden zwischen zwei Benutzernachrichten (0 = kein anti-flood)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>irc_fifo_pipe</option></entry>
|
||||
@@ -934,7 +983,7 @@
|
||||
<entry>Boolean</entry>
|
||||
<entry>eine beliebige Zeichenfolge</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Erlaube Benutzern, spezielle Codes zu versenden (%B=fett, %Cxx,yy=Farbe, %U=unterstrichen, %R=reverse/umgekehrt)</entry>
|
||||
<entry>Allow user to send colors with special codes (^Cb=bold, ^Ccxx=color, ^Ccxx,yy=color+background, ^Cu=underline, ^Cr=reverse)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>irc_send_unknown_commands</option></entry>
|
||||
@@ -1212,7 +1261,7 @@
|
||||
<row>
|
||||
<entry><option>server_command_delay</option></entry>
|
||||
<entry>Ganzzahl</entry>
|
||||
<entry>zwischen 0 und 5</entry>
|
||||
<entry>zwischen 0 und 3600</entry>
|
||||
<entry>0</entry>
|
||||
<entry>Wartezeit in Sekunden nach Ausführung des Befehls, um z.B. eine Authentifizierung zu ermöglichen</entry>
|
||||
</row>
|
||||
|
||||
@@ -119,11 +119,11 @@
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>scroll_topic_left</literal></entry>
|
||||
<entry>scroll left topic</entry>
|
||||
<entry>Topic nach links scrollen</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>scroll_topic_right</literal></entry>
|
||||
<entry>scroll right topic</entry>
|
||||
<entry>Topic nach rechts scrollen</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>nick_beginning</literal></entry>
|
||||
@@ -157,6 +157,10 @@
|
||||
<entry><literal>jump_last_buffer</literal></entry>
|
||||
<entry>zum letzten Puffer springen</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>jump_previous_buffer</literal></entry>
|
||||
<entry>jump to previous buffer</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>jump_server</literal></entry>
|
||||
<entry>zum Serverpuffer springen</entry>
|
||||
@@ -181,6 +185,10 @@
|
||||
<entry><literal>scroll_unread</literal></entry>
|
||||
<entry>scrolle zur ersten, ungelesenen Zeile im Puffer</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>set_unread</literal></entry>
|
||||
<entry>set unread marker on all buffers</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>hotlist_clear</literal></entry>
|
||||
<entry>Hotlist leeren</entry>
|
||||
@@ -197,3 +205,11 @@
|
||||
<entry><literal>grab_key</literal></entry>
|
||||
<entry>Tastencode ermitteln und einfügen</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>insert</literal></entry>
|
||||
<entry>füge eine Zeichenkette in der Befehlszeile ein</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>search_text</literal></entry>
|
||||
<entry>suche Text im Pufferverlauf</entry>
|
||||
</row>
|
||||
|
||||
+722
-101
File diff suppressed because it is too large
Load Diff
+84
-38
@@ -15,21 +15,35 @@ Argumente: Argumente f
|
||||
|
||||
</programlisting>
|
||||
<command>wird durch alle Argumente ersetzt.</command>
|
||||
<programlisting>
|
||||
<programlisting>Die Variablen $nick, $channel and $server werden durch den aktuellen Nick/Channel oder Server ersetzt.
|
||||
|
||||
</programlisting>
|
||||
<command>buffer [Aktion [Argumente] | Nummer | [[Server] [Channel]]]</command>
|
||||
<programlisting>
|
||||
Puffer verwalten
|
||||
|
||||
Aktion: Pufferaktion:
|
||||
move: Puffer in der Liste bewegen (kann auch relativ sein, wie -1)
|
||||
close: Puffer schließen (eine Part-Message kann optional angegeben werden)
|
||||
list: alle offenen Puffer auflisten (Standardaktion)
|
||||
notify: Notify-Level für Puffer festlegen (0=nie, 1=bei hervorgehobenen Nachrichten, 2=1+persönliche Nachricht, 3=2+join/part)
|
||||
(wenn der Befehl in einem Server Puffer ausgeführt wird, setzt er den Default-Notify-Level für den ganzen Server)
|
||||
Server
|
||||
Channel: gehe zum Puffer mit Servernamen oder Channelnamen
|
||||
Nummer: gehe zu Puffer mit dieser Nummer
|
||||
action: action to do:
|
||||
move: move buffer in the list (may be relative, for example -1)
|
||||
close: close buffer (optional arg is part message, for a channel)
|
||||
list: list open buffers (no parameter implies this list)
|
||||
notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, 3=2+join/part)
|
||||
(when executed on server buffer, this sets default notify level for whole server)
|
||||
scroll: scroll in history (may be relative, and may end by a letter: s=sec, m=min, h=hour, d=day, M=month, y=year); if there is only letter, then scroll to beginning of this item
|
||||
|
||||
number: jump to buffer by number
|
||||
server,
|
||||
channel: jump to buffer by server and/or channel name
|
||||
|
||||
Examples:
|
||||
move buffer: /buffer move 5
|
||||
close buffer: /buffer close this is part msg
|
||||
set notify: /buffer notify 2
|
||||
scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /buffer scroll -24h
|
||||
scroll to beginning
|
||||
of this day: /buffer scroll d
|
||||
scroll 15 min down: /buffer scroll +15m
|
||||
scroll 20 msgs up: /buffer scroll -20
|
||||
jump to #weechat: /buffer #weechat
|
||||
|
||||
</programlisting>
|
||||
<command>builtin Befehl</command>
|
||||
@@ -40,25 +54,33 @@ Befehl: auszuf
|
||||
|
||||
|
||||
</programlisting>
|
||||
<command>clear [-all]</command>
|
||||
<command>clear [-all | number [number ...]]</command>
|
||||
<programlisting>
|
||||
Fenster leeren
|
||||
|
||||
-all: alle Fenster leeren
|
||||
-all: lösche alle Puffer
|
||||
Nummer: lösche den Puffer mit der angegebenen Nummer
|
||||
|
||||
</programlisting>
|
||||
<command>connect [Servername]</command>
|
||||
<command>connect [-all [-nojoin] | servername [servername ...] [-nojoin] | hostname [-port port] [-ipv6] [-ssl]]</command>
|
||||
<programlisting>
|
||||
mit einem Server verbinden
|
||||
mit Server verbinden
|
||||
|
||||
Servername: Zielserver
|
||||
-all: connect to all servers
|
||||
servername: internal server name to connect
|
||||
-nojoin: do not join any channel (even if autojoin is enabled on server)
|
||||
hostname: hostname to connect, creating temporary server
|
||||
port: port for server (integer, default is 6667)
|
||||
ipv6: use IPv6 protocol
|
||||
ssl: use SSL protocol
|
||||
|
||||
</programlisting>
|
||||
<command>disconnect [Servername]</command>
|
||||
<command>disconnect [-all | Servername [Servername ...]]</command>
|
||||
<programlisting>
|
||||
Serververbindung trennen
|
||||
Serververbindung(en) trennen
|
||||
|
||||
Servername: Name des zu trennenden Servers
|
||||
-all: Trenne von allen Servern
|
||||
servername: Servername, von dem getrennt werden soll
|
||||
|
||||
</programlisting>
|
||||
<command>dcc Aktion [Nickname [Datei]]</command>
|
||||
@@ -70,12 +92,13 @@ Nickname: Empf
|
||||
Datei: zu versendende (lokal vorliegende) Datei
|
||||
|
||||
</programlisting>
|
||||
<command>debug dump | windows</command>
|
||||
<command>debug dump | buffer | windows</command>
|
||||
<programlisting>
|
||||
Debugging-Nachricht ausgeben
|
||||
|
||||
dump: Speicherabbild im WeeChat-Logfile ablegen (wie nach einem Programmabsturz)
|
||||
windows: zeigt Fensterdaten an
|
||||
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
|
||||
buffer: dump buffer content with hexadecimal values in log file
|
||||
windows: display windows tree
|
||||
|
||||
</programlisting>
|
||||
<command>help [Befehl]</command>
|
||||
@@ -108,13 +131,14 @@ Bei jedem Argument steht '*' f
|
||||
Ohne Argumente listet /ignore alle definierten /ignore-Regeln auf.
|
||||
|
||||
</programlisting>
|
||||
<command>key [Taste [Funktion/Befehl]] [unbind Taste] [functions] [reset -yes]</command>
|
||||
<command>key [Taste [Funktion/Befehl]] [unbind Taste] [functions] [call Funktion ["Argumente"]] [reset -yes] </command>
|
||||
<programlisting>
|
||||
belegen/freigeben von Tasten
|
||||
|
||||
Taste: diese Taste mit einer internen Funktion oder einem Befehl, beginnend mit "/", belegen
|
||||
Taste: diese Taste anzeigen oder mit einer internen Funktion oder einem Befehl, beginnend mit "/", belegen
|
||||
unbind: Tastenbelegung aufheben
|
||||
functions: interne Funktionen für Tastenbelegungen auflisten
|
||||
call: rufe eine Funktion über ihren Namen auf (mit optionalen Argumenten)
|
||||
reset: Standardbelegung wiederherstellen und entferne ALLE eigenen Belegungen (Vorsicht!)
|
||||
|
||||
</programlisting>
|
||||
@@ -132,21 +156,13 @@ autoload: lade automatisch alle Plugins im System- oder Benutzerverzeichnis
|
||||
Ohne Argument, listet /plugin alle geladenen Plugins auf.
|
||||
|
||||
</programlisting>
|
||||
<command>server [Servername] | [Servername Hostname Port [-auto | -noauto] [-ipv6] [-ssl] [-pwd Passwort] [-nicks Nick1 Nick2 Nick3] [-username Benutzername] [-realname Name] [-command Befehl] [-autojoin Channel[,Channel]] ] | [del Servername]</command>
|
||||
<command>reconnect [-all [-nojoin] | servername [servername ...] [-nojoin]]</command>
|
||||
<programlisting>
|
||||
Auflisten, Hinzufügen oder Entfernen von Servern
|
||||
mit einem Server oder mehreren Servern neu verbinden
|
||||
|
||||
Servername: anzuzeigender Servername
|
||||
Hostname: Name oder IP-Adresse des Servers
|
||||
Port: Port des Servers
|
||||
ipv6: IPv6 benutzen
|
||||
ssl: SSL benutzen
|
||||
Passwort: Serverpasswort
|
||||
Nick1: erster Nickname
|
||||
Nick2: zweiter Nickname
|
||||
Nick3: dritter Nicname
|
||||
Benutzername: Benutzername
|
||||
Realname: voller Name des Benutzers
|
||||
-all: reconnect to all servers
|
||||
servername: server name to reconnect
|
||||
-nojoin: do not join any channel (even if autojoin is enabled on server)
|
||||
|
||||
</programlisting>
|
||||
<command>save [Datei]</command>
|
||||
@@ -155,6 +171,34 @@ Konfiguration abspeichern
|
||||
|
||||
Datei: Name der zu speichernden Konfigurationsdatei
|
||||
|
||||
</programlisting>
|
||||
<command>server [list [servername]] | [listfull [servername]] | [add servername hostname [-port port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1 nick2 nick3] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [copy servername newservername] | [rename servername newservername] | [keep servername] | [del servername]</command>
|
||||
<programlisting>
|
||||
Auflisten, Hinzufügen oder Entfernen von Servern
|
||||
|
||||
list: list servers (no parameter implies this list)
|
||||
listfull: list servers with detailed info for each server
|
||||
add: create a new server
|
||||
servername: server name, for internal and display use
|
||||
hostname: name or IP address of server
|
||||
port: port for server (integer, default is 6667)
|
||||
temp: create temporary server (not saved in config file)
|
||||
auto: automatically connect to server when WeeChat starts
|
||||
noauto: do not connect to server when WeeChat starts (default)
|
||||
ipv6: use IPv6 protocol
|
||||
ssl: use SSL protocol
|
||||
password: password for server
|
||||
nick1: first nick for server
|
||||
nick2: alternate nick for server
|
||||
nick3: second alternate nick for server
|
||||
username: user name
|
||||
realname: real name of user
|
||||
copy: duplicate a server
|
||||
rename: rename a server
|
||||
keep: keep server in config file (for temporary servers only)
|
||||
del: delete a server
|
||||
deloutq: delete messages out queue for all servers (all messages WeeChat is currently sending)
|
||||
|
||||
</programlisting>
|
||||
<command>set [Option [ = Wert]]</command>
|
||||
<programlisting>
|
||||
@@ -198,11 +242,13 @@ Bei jedem Argument steht '*' f
|
||||
Ohne Argumente listet /unignore alle definierten /ignore-Regeln auf.
|
||||
|
||||
</programlisting>
|
||||
<command>upgrade</command>
|
||||
<command>upgrade [path_to_binary]</command>
|
||||
<programlisting>
|
||||
aktualisiert WeeChat ohne die Verbindung zum Server zu trennen
|
||||
|
||||
Dieser Befehl wird auf dem Weechat-Binary ausgeführt, daher sollte dieses kompiliert oder mit einem Paketmanager installiert sein, bevor der Befehl ausgeführt wird.
|
||||
path_to_binary: path to WeeChat binary (default is current binary)
|
||||
|
||||
This command run again a WeeChat binary, so it should have been compiled or installed with a package manager before running this command.
|
||||
|
||||
</programlisting>
|
||||
<command>uptime [-o]</command>
|
||||
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,8 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
LANGCODE = en
|
||||
|
||||
+54
-5
@@ -108,7 +108,7 @@
|
||||
<entry>integer</entry>
|
||||
<entry>between 0 and 100</entry>
|
||||
<entry>0</entry>
|
||||
<entry>Max size for nicklist (width or height, depending on look_nicklist_position (0 = no max size; if min == max and > 0, then size is fixed))</entry>
|
||||
<entry>Max size for nicklist (width or height, depending on look_nicklist_position (0 = no max size; if min = max and > 0, then size is fixed))</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nicklist_separator</option></entry>
|
||||
@@ -180,6 +180,13 @@
|
||||
<entry>20</entry>
|
||||
<entry>Max size for aligning nick and other messages (should be >= to look_align_size)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_align_text_offset</option></entry>
|
||||
<entry>integer</entry>
|
||||
<entry>between -1 and 64</entry>
|
||||
<entry>-1</entry>
|
||||
<entry>Offset for aligning lines of messages (except first lines), default is -1 (align after nick), a null or positive value is offset after beginning of line</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_completor</option></entry>
|
||||
<entry>string</entry>
|
||||
@@ -194,6 +201,13 @@
|
||||
<entry>'[]-^'</entry>
|
||||
<entry>Chars ignored for nick completion</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_completion_smart</option></entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>'on' or 'off'</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Smart completion for nicks (completes with last speakers first)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_complete_first</option></entry>
|
||||
<entry>boolean</entry>
|
||||
@@ -250,6 +264,13 @@
|
||||
<entry>0</entry>
|
||||
<entry>Max length of names in hotlist (0 = no limit)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_hotlist_sort</option></entry>
|
||||
<entry>string</entry>
|
||||
<entry>'group_time_asc', 'group_time_desc', 'group_number_asc', 'group_number_desc', 'number_asc', 'number_desc'</entry>
|
||||
<entry>'group_time_asc'</entry>
|
||||
<entry>Hotlist sort type (group_time_asc (default), group_time_desc, group_number_asc, group_number_desc, number_asc, number_desc)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_day_change</option></entry>
|
||||
<entry>boolean</entry>
|
||||
@@ -266,8 +287,8 @@
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_read_marker</option></entry>
|
||||
<entry>string</entry>
|
||||
<entry>any string</entry>
|
||||
<entry>char</entry>
|
||||
<entry>any char</entry>
|
||||
<entry>' '</entry>
|
||||
<entry>Use a marker on servers/channels to show first unread line</entry>
|
||||
</row>
|
||||
@@ -278,6 +299,13 @@
|
||||
<entry>'[%n(%m)] '</entry>
|
||||
<entry>Format for input prompt ('%c' is replaced by channel or server, '%n' by nick and '%m' by nick modes)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_paste_max_lines</option></entry>
|
||||
<entry>integer</entry>
|
||||
<entry>between 0 and 2147483647</entry>
|
||||
<entry>3</entry>
|
||||
<entry>Max number of lines for paste without asking user (0 = disable this feature)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_real_white</option></entry>
|
||||
<entry>boolean</entry>
|
||||
@@ -551,6 +579,20 @@
|
||||
<entry>'cyan'</entry>
|
||||
<entry>Color for input text (delimiters)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_input_text_not_found</option></entry>
|
||||
<entry>color</entry>
|
||||
<entry>Curses or Gtk color</entry>
|
||||
<entry>'red'</entry>
|
||||
<entry>Color for text not found</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_input_actions</option></entry>
|
||||
<entry>color</entry>
|
||||
<entry>Curses or Gtk color</entry>
|
||||
<entry>'lightgreen'</entry>
|
||||
<entry>Color for actions in input window</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_input_bg</option></entry>
|
||||
<entry>color</entry>
|
||||
@@ -607,6 +649,13 @@
|
||||
<entry>'yellow'</entry>
|
||||
<entry>Color for voice symbol</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_nick_user</option></entry>
|
||||
<entry>color</entry>
|
||||
<entry>Curses or Gtk color</entry>
|
||||
<entry>'blue'</entry>
|
||||
<entry>Color for user symbol</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_nick_more</option></entry>
|
||||
<entry>color</entry>
|
||||
@@ -934,7 +983,7 @@
|
||||
<entry>boolean</entry>
|
||||
<entry>'on' or 'off'</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Allow user to send colors with special codes (%B=bold, %Cxx,yy=color, %U=underline, %R=reverse)</entry>
|
||||
<entry>Allow user to send colors with special codes (^Cb=bold, ^Ccxx=color, ^Ccxx,yy=color+background, ^Cu=underline, ^Cr=reverse)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>irc_send_unknown_commands</option></entry>
|
||||
@@ -1212,7 +1261,7 @@
|
||||
<row>
|
||||
<entry><option>server_command_delay</option></entry>
|
||||
<entry>integer</entry>
|
||||
<entry>between 0 and 5</entry>
|
||||
<entry>between 0 and 3600</entry>
|
||||
<entry>0</entry>
|
||||
<entry>Delay (in seconds) after command was executed (example: give some time for authentication)</entry>
|
||||
</row>
|
||||
|
||||
@@ -157,6 +157,10 @@
|
||||
<entry><literal>jump_last_buffer</literal></entry>
|
||||
<entry>jump to last buffer</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>jump_previous_buffer</literal></entry>
|
||||
<entry>jump to previous buffer</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>jump_server</literal></entry>
|
||||
<entry>jump to server buffer</entry>
|
||||
@@ -181,6 +185,10 @@
|
||||
<entry><literal>scroll_unread</literal></entry>
|
||||
<entry>scroll to first unread line in buffer</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>set_unread</literal></entry>
|
||||
<entry>set unread marker on all buffers</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>hotlist_clear</literal></entry>
|
||||
<entry>clear hotlist</entry>
|
||||
@@ -197,3 +205,11 @@
|
||||
<entry><literal>grab_key</literal></entry>
|
||||
<entry>grab a key</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>insert</literal></entry>
|
||||
<entry>insert a string in command line</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>search_text</literal></entry>
|
||||
<entry>search text in buffer history</entry>
|
||||
</row>
|
||||
|
||||
+642
-34
@@ -8,7 +8,7 @@ Copyright (c) 2003-2007 by FlashCode <flashcode@flashtux.org>
|
||||
|
||||
This manual is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This manual is distributed in the hope that it will be useful,
|
||||
@@ -17,8 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
|
||||
@@ -36,7 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
<bookinfo>
|
||||
|
||||
<title>WeeChat 0.2.3 - User guide</title>
|
||||
<title>WeeChat 0.2.6 - User guide</title>
|
||||
<subtitle>Fast, light and extensible IRC client</subtitle>
|
||||
|
||||
<author>
|
||||
@@ -48,7 +47,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
&date.xml;
|
||||
|
||||
<copyright>
|
||||
<year>2006</year>
|
||||
<year>2007</year>
|
||||
<holder>Sébastien Helleu</holder>
|
||||
</copyright>
|
||||
|
||||
@@ -56,7 +55,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
<para>
|
||||
This manual is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
</para>
|
||||
<para>
|
||||
@@ -67,9 +66,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</para>
|
||||
<para>
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</para>
|
||||
</legalnotice>
|
||||
|
||||
@@ -461,13 +458,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Left arrow</entry>
|
||||
<entry>Left arrow / Ctrl + B</entry>
|
||||
<entry>
|
||||
Go to previous char in command line
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Right arrow</entry>
|
||||
<entry>Right arrow / Ctrl + F</entry>
|
||||
<entry>
|
||||
Go to next char in command line
|
||||
</entry>
|
||||
@@ -490,6 +487,36 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Go to the beginning of command line
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C then B</entry>
|
||||
<entry>
|
||||
Insert code for bold text.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C then C</entry>
|
||||
<entry>
|
||||
Insert code for colored text.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C then O</entry>
|
||||
<entry>
|
||||
Insert code for color reset.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C then R</entry>
|
||||
<entry>
|
||||
Insert code for reverse color.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C then U</entry>
|
||||
<entry>
|
||||
Insert code for underlined text.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>End / Ctrl + E</entry>
|
||||
<entry>
|
||||
@@ -508,6 +535,19 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Redraw whole window
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + R</entry>
|
||||
<entry>
|
||||
Search for text in buffer history
|
||||
(two times: search exact text)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + S then Ctrl + U</entry>
|
||||
<entry>
|
||||
Set unread marker on all buffers
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + T</entry>
|
||||
<entry>
|
||||
@@ -539,7 +579,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Delete</entry>
|
||||
<entry>Delete / Ctrl + D</entry>
|
||||
<entry>
|
||||
Delete next char in command line
|
||||
</entry>
|
||||
@@ -561,12 +601,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
<entry>Enter / Ctrl + J / Ctrl + M</entry>
|
||||
<entry>
|
||||
Execute command or send message
|
||||
(in search mode: stop search)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Up arrow / Down arrow</entry>
|
||||
<entry>
|
||||
Call again last commands/messages
|
||||
Call again last commands/messages (in search mode: search
|
||||
up/down)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -686,6 +728,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Switch to last buffer
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Alt + J then Alt + P</entry>
|
||||
<entry>
|
||||
Switch to buffer previously displayed
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Alt + J then Alt + R</entry>
|
||||
<entry>
|
||||
@@ -798,7 +846,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
<para>
|
||||
If option for sending IRC colors ("<literal>irc_colors_send</literal>")
|
||||
is enabled, you can use color codes and attributes, as follow:
|
||||
is enabled, you can use color codes and attributes, as follow (press
|
||||
Ctrl-C then following letter, with optional value):
|
||||
<informaltable colsep="0" frame="none">
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
@@ -809,20 +858,20 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>%B</entry>
|
||||
<entry>^Cb</entry>
|
||||
<entry>
|
||||
bold text
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%Cxx</entry>
|
||||
<entry>^Ccxx</entry>
|
||||
<entry>
|
||||
text color "<literal>xx</literal>"
|
||||
(see colors table below)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%Cxx,yy</entry>
|
||||
<entry>^Ccxx,yy</entry>
|
||||
<entry>
|
||||
text color "<literal>xx</literal>"
|
||||
and background "<literal>yy</literal>"
|
||||
@@ -830,38 +879,32 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%O</entry>
|
||||
<entry>^Co</entry>
|
||||
<entry>
|
||||
disable color and attributes
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%R</entry>
|
||||
<entry>^Cr</entry>
|
||||
<entry>
|
||||
reverse video (revert text color with background)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%U</entry>
|
||||
<entry>^Cu</entry>
|
||||
<entry>
|
||||
underlined text
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%%</entry>
|
||||
<entry>
|
||||
display one "<literal>%</literal>"
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
Note: the same code (without number for %C) may be used to stop the
|
||||
Note: the same code (without number for ^Cc) may be used to stop the
|
||||
attribute.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Color codes for %C are:
|
||||
Color codes for ^Cc are:
|
||||
<informaltable colsep="0" frame="none">
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
@@ -944,7 +987,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Example: display of "<literal>hello everybody!</literal>" with
|
||||
"<literal>hello</literal>" in light blue bold, and
|
||||
"<literal>everybody</literal>" in light red underlined:
|
||||
<screen><userinput>%C12%Bhello%B%C04%U everybody%U%C!</userinput></screen>
|
||||
<screen><userinput>^Cc12^Cbhello^Cb^Cc04^Cu everybody^Cu^Cc!</userinput></screen>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
@@ -1164,7 +1207,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
<screen>
|
||||
#!/bin/sh
|
||||
if [ $# -eq 1 ]; then
|
||||
for fifo in $(/bin/ls ~/.weechat/weechat_fifo_* 2>/dev/null); do
|
||||
for fifo in ~/.weechat/weechat_fifo_*
|
||||
do
|
||||
echo -e "$1" >$fifo
|
||||
done
|
||||
fi
|
||||
@@ -1736,6 +1780,62 @@ plugin->exec_on_files (plugin, "/tmp", &callback);
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
To display colored text, there are following codes:
|
||||
<informaltable colsep="0" frame="none">
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Code</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>0x02</entry>
|
||||
<entry>
|
||||
bold text
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x03 + "xx"</entry>
|
||||
<entry>
|
||||
text color "<literal>xx</literal>"
|
||||
(see <xref linkend="secAPI_get_irc_color" /> for colors)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x03 + "xx,yy"</entry>
|
||||
<entry>
|
||||
text color "<literal>xx</literal>"
|
||||
and background "<literal>yy</literal>"
|
||||
(see <xref linkend="secAPI_get_irc_color" /> for colors)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x0F</entry>
|
||||
<entry>
|
||||
disable color and attributes
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x12</entry>
|
||||
<entry>
|
||||
reverse video (revert text color with background)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x1F</entry>
|
||||
<entry>
|
||||
underlined text
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
Note: the same code (without number for 0x03) may be used to stop
|
||||
the attribute.
|
||||
</para>
|
||||
<para>
|
||||
Return value: none.
|
||||
</para>
|
||||
@@ -1745,6 +1845,10 @@ plugin->exec_on_files (plugin, "/tmp", &callback);
|
||||
plugin->print (plugin, NULL, NULL, "hello");
|
||||
plugin->print (plugin, NULL, "#weechat", "hello");
|
||||
plugin->print (plugin, "freenode", "#weechat", "hello");
|
||||
plugin->print (plugin, NULL, NULL,
|
||||
"test: \x02 bold \x0F\x03%02d blue \x03%02d green",
|
||||
plugin->get_irc_color (plugin, "blue"),
|
||||
plugin->get_irc_color (plugin, "green"));
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
@@ -1777,6 +1881,9 @@ plugin->print (plugin, "freenode", "#weechat", "hello");
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
To display colored text, see <xref linkend="secAPI_print" />.
|
||||
</para>
|
||||
<para>
|
||||
Return value: none.
|
||||
</para>
|
||||
@@ -2060,6 +2167,13 @@ plugin->log (plugin, "freenode", "#weechat", "test");
|
||||
will not be sent to WeeChat neither other plugins
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal>: function
|
||||
successfully completed and make "highlight" on received
|
||||
message
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
@@ -2154,6 +2268,14 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
|
||||
<entry><literal>%-</literal></entry>
|
||||
<entry>no completion for argument</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%*</literal></entry>
|
||||
<entry>
|
||||
repeat last completion for all following arguments
|
||||
(this code has to be at the end of completion
|
||||
template, preceded by "|")
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%a</literal></entry>
|
||||
<entry>alias</entry>
|
||||
@@ -2170,7 +2292,7 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%C</literal></entry>
|
||||
<entry>channels of current server</entry>
|
||||
<entry>all channels (including queries)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%f</literal></entry>
|
||||
@@ -2196,6 +2318,12 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
|
||||
<entry><literal>%m</literal></entry>
|
||||
<entry>nick on current server</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%M</literal></entry>
|
||||
<entry>
|
||||
nicks on current server (on all open channels)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%n</literal></entry>
|
||||
<entry>nicks of current channel</entry>
|
||||
@@ -2538,6 +2666,136 @@ keyb_handler = plugin->keyboard_handler_add (plugin, &my_keyb);
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secAPI_event_handler_add">
|
||||
<title>event_handler_add</title>
|
||||
|
||||
<para>
|
||||
Prototype:
|
||||
<command>
|
||||
t_plugin_handler *event_handler_add (t_weechat_plugin
|
||||
*plugin, char *event, t_plugin_handler_func *function,
|
||||
char *handler_args, void *handler_pointer)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Add an event handler, called when an event happens.
|
||||
</para>
|
||||
<para>
|
||||
Arguments:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>plugin</option>: pointer to plugin structure
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>event</option> : event (see table below)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>function</option>: function called
|
||||
</para>
|
||||
<para>
|
||||
It uses following prototype:
|
||||
<command>
|
||||
int my_function (t_weechat_plugin *plugin,
|
||||
int argc, char **argv,
|
||||
char *handler_args, void *handler_pointer)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Arguments depend on event (see table below).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>handler_args</option>: arguments given to function
|
||||
when called
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>handler_pointer</option>: pointer given to function
|
||||
when called
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
List of events:
|
||||
<informaltable colsep="0" frame="none">
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Event</entry>
|
||||
<entry>Description</entry>
|
||||
<entry>Arguments</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal>buffer_open</literal></entry>
|
||||
<entry>a buffer was open</entry>
|
||||
<entry>
|
||||
argc = 1, argv = { buffer number }
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>buffer_close</literal></entry>
|
||||
<entry>a buffer was closed</entry>
|
||||
<entry>
|
||||
argc = 1, argv = { buffer number }
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>buffer_move</literal></entry>
|
||||
<entry>a buffer was moved</entry>
|
||||
<entry>
|
||||
argc = 2, argv = { new buffer number, old number }
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
<para>
|
||||
Return value: pointer to new event handler.
|
||||
</para>
|
||||
<para>
|
||||
Note: function called has to return one of following values:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_KO</literal>: function failed
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_OK</literal>: function successfully
|
||||
completed
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Example:
|
||||
<screen>
|
||||
int my_event (t_weechat_plugin *plugin, int argc, char **argv,
|
||||
char *handler_args, void *handler_pointer)
|
||||
{
|
||||
plugin->print (plugin, NULL, NULL, "my_event");
|
||||
return PLUGIN_RC_OK;
|
||||
}
|
||||
...
|
||||
t_plugin_handler *event_handler;
|
||||
event_handler = plugin->event_handler_add (plugin, "buffer_open",
|
||||
&my_event);
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secAPI_handler_remove">
|
||||
<title>handler_remove</title>
|
||||
|
||||
@@ -2917,6 +3175,12 @@ plugin->exec_command (plugin, "freenode", "#weechat", "hello");
|
||||
<entry><literal>server</literal></entry>
|
||||
<entry>name of server</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>type</literal></entry>
|
||||
<entry>
|
||||
buffer type: 0=standard, 1=DCC, 2=raw IRC data
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>away</literal></entry>
|
||||
<entry>"away" flag</entry>
|
||||
@@ -4305,7 +4569,7 @@ else
|
||||
<row>
|
||||
<entry>int</entry>
|
||||
<entry><literal>type</literal></entry>
|
||||
<entry>buffer type: 0=standard, 1=dcc, 2=raw IRC data</entry>
|
||||
<entry>buffer type: 0=standard, 1=DCC, 2=raw IRC data</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>int</entry>
|
||||
@@ -4646,6 +4910,114 @@ void weechat_plugin_end (t_weechat_plugin *plugin)
|
||||
|
||||
</section>
|
||||
|
||||
<section id="secCharset">
|
||||
<title>Charset plugin</title>
|
||||
|
||||
<para>
|
||||
Charset plugin lets you encode or decode data using charsets, with 3
|
||||
levels: global, by server, or by channel.
|
||||
This plugin is optional, but recommended: if it's not loaded, WeeChat
|
||||
can only read/write UTF-8 data.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Charset plugin should be autoloaded by WeeChat at startup.
|
||||
To be sure plugin is loaded, try:
|
||||
"<literal>/charset</literal>".
|
||||
If command is not found, then load plugin with command:
|
||||
<screen>/plugin load charset</screen>
|
||||
If plugin is not found, then you should compile again WeeChat with
|
||||
plugins and Charset support.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When Charset plugin starts, it displays terminal and internal charsets.
|
||||
Terminal charset depends on your locale, and internal is UTF-8.
|
||||
For example :
|
||||
<screen>
|
||||
-P- Charset plugin starting, terminal charset: ISO-8859-15 (WeeChat internal: UTF-8)
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<section id="secCharsetSettings">
|
||||
<title>Settings</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
To set global decode and encode charsets, use
|
||||
"<literal>/setp</literal>" command.
|
||||
For example:
|
||||
<screen>
|
||||
/setp charset.global.decode = ISO-8859-15
|
||||
/setp charset.global.encode = ISO-8859-15
|
||||
</screen>
|
||||
If global decode charset is not set (for example during first
|
||||
load of Charset plugin), it will be automatically set to terminal
|
||||
charset (if it's different from UTF-8), or by default to
|
||||
"<literal>ISO-8859-1</literal>".
|
||||
Default encode value is empty, so it sends by default with
|
||||
internal charset (UTF-8).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
To set server charset, use "<literal>/charset</literal>" command
|
||||
on server buffer.
|
||||
If you give only charset, then it will set "decode" and "encode"
|
||||
values.
|
||||
For example:
|
||||
<screen>/charset ISO-8859-15</screen>
|
||||
It's equivalent to:
|
||||
<screen>
|
||||
/charset decode ISO-8859-15
|
||||
/charset encode ISO-8859-15
|
||||
</screen>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
To set channel (or private) charset, use same commands as server,
|
||||
but on channel (or private) buffer.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="secCharsetFAQ">
|
||||
<title>FAQ</title>
|
||||
|
||||
<para>
|
||||
If you have problems with chars or accents using Charset plugin:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
check that weechat-curses is linked to libncursesw (warning:
|
||||
needed on most distributions but not all) :
|
||||
<screen>ldd /path/to/weechat-curses</screen>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
check charset line (on server buffer), you should see
|
||||
ISO-XXXXXX or UTF-8 for terminal charset. If you see
|
||||
ANSI_X3.4-1968 or other values, probably your locale is wrong.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
setup global decode value, for example:
|
||||
<screen>/setp charset.global.decode = ISO-8859-15</screen>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="secScriptsPlugins">
|
||||
<title>Scripts plugins</title>
|
||||
|
||||
@@ -5006,6 +5378,9 @@ weechat.set_charset("ISO-8859-1")
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
To display colored text, see <xref linkend="secAPI_print" />.
|
||||
</para>
|
||||
<para>
|
||||
Return value: 1 if success, 0 if an error occurred.
|
||||
</para>
|
||||
@@ -5016,6 +5391,7 @@ weechat.set_charset("ISO-8859-1")
|
||||
weechat::print("message");
|
||||
weechat::print("message", "#weechat");
|
||||
weechat::print("message", "#weechat", "freenode");
|
||||
weechat::print("test: \x0305 red \x0F normal");
|
||||
|
||||
# python
|
||||
weechat.prnt("message")
|
||||
@@ -5035,6 +5411,71 @@ weechat.print("message", "#weechat", "freenode")
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_print_server">
|
||||
<title>print_server</title>
|
||||
|
||||
<para>
|
||||
Perl prototype:
|
||||
<command>
|
||||
weechat::print_server(message)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Python prototype:
|
||||
<command>
|
||||
weechat.print_server(message)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Ruby prototype:
|
||||
<command>
|
||||
Weechat.print_server(message)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Lua prototype:
|
||||
<command>
|
||||
weechat.print_server(message)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Display a message on server buffer.
|
||||
</para>
|
||||
<para>
|
||||
Arguments:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>message</option>: message
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
To display colored text, see <xref linkend="secAPI_print" />.
|
||||
</para>
|
||||
<para>
|
||||
Return value: 1 if success, 0 if an error occurred.
|
||||
</para>
|
||||
<para>
|
||||
Examples:
|
||||
<screen>
|
||||
# perl
|
||||
weechat::print_server("message");
|
||||
weechat::print_server("test: \x0305 red \x0F normal");
|
||||
|
||||
# python
|
||||
weechat.print_server("message")
|
||||
|
||||
# ruby
|
||||
Weechat.print_server("message")
|
||||
|
||||
-- lua
|
||||
weechat.print_server("message")
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_print_infobar">
|
||||
<title>print_infobar</title>
|
||||
|
||||
@@ -5364,6 +5805,13 @@ end
|
||||
will not be sent to WeeChat neither other plugins
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal>: function
|
||||
successfully completed and make "highlight" on received
|
||||
message
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
@@ -5668,7 +6116,7 @@ def my_keyboard(key, input_before, input_after):
|
||||
|
||||
# ruby
|
||||
Weechat.add_keyboard_handler("my_keyboard")
|
||||
def my_keyboard(server, input_before, input_after)
|
||||
def my_keyboard(key, input_before, input_after)
|
||||
Weechat.print("keyboard handler: key = '#{key}', " \
|
||||
"input before = '#{input_before}' " \
|
||||
"after = '#{input_after}'")
|
||||
@@ -5677,7 +6125,7 @@ end
|
||||
|
||||
-- lua
|
||||
weechat.add_keyboard_handler("my_keyboard")
|
||||
function my_keyboard(server, input_before, input_after)
|
||||
function my_keyboard(key, input_before, input_after)
|
||||
weechat.print("keyboard handler: key = '"..key..
|
||||
"', input before = '"..input_before..
|
||||
"' after = '"..input_after.."'")
|
||||
@@ -5703,6 +6151,105 @@ end
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_add_event_handler">
|
||||
<title>add_event_handler</title>
|
||||
|
||||
<para>
|
||||
Perl prototype:
|
||||
<command>
|
||||
weechat::add_event_handler(event, function);
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Python prototype:
|
||||
<command>
|
||||
weechat.add_event_handler(event, function)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Ruby prototype:
|
||||
<command>
|
||||
Weechat.add_event_handler(event, function)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Lua prototype:
|
||||
<command>
|
||||
weechat.add_event_handler(event, function)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Add an event handler, called when an event happens.
|
||||
</para>
|
||||
<para>
|
||||
Arguments:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>event</option> : event
|
||||
(see <xref linkend="secAPI_event_handler_add" />)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>function</option>: function called
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Return value: 1 if success, 0 if an error occurred.
|
||||
</para>
|
||||
<para>
|
||||
Examples:
|
||||
<screen>
|
||||
# perl
|
||||
weechat::add_event_handler("buffer_open", "my_event");
|
||||
sub my_event
|
||||
{
|
||||
weechat::print("buffer open");
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
|
||||
# python
|
||||
weechat.add_event_handler("buffer_open", "my_event")
|
||||
def my_event():
|
||||
weechat.prnt("buffer open")
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
# ruby
|
||||
Weechat.add_event_handler("buffer_open", "my_event")
|
||||
def my_event()
|
||||
Weechat.print("buffer open")
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
-- lua
|
||||
weechat.add_event_handler("buffer_open", "my_event")
|
||||
function my_event()
|
||||
weechat.print("buffer open")
|
||||
return weechat.PLUGIN_RC_OK()
|
||||
end
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
Note: function called has to return one of following values:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_KO</literal>: function failed
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_OK</literal>: function successfully
|
||||
completed
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_remove_handler">
|
||||
<title>remove_handler</title>
|
||||
|
||||
@@ -5891,6 +6438,67 @@ weechat.remove_keyboard_handler("my_keyboard")
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScrip_remove_event_handler">
|
||||
<title>remove_event_handler</title>
|
||||
|
||||
<para>
|
||||
Perl prototype:
|
||||
<command>
|
||||
weechat::remove_event_handler(function);
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Python prototype:
|
||||
<command>
|
||||
weechat.remove_event_handler(function)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Ruby prototype:
|
||||
<command>
|
||||
Weechat.remove_event_handler(function)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Lua prototype:
|
||||
<command>
|
||||
weechat.remove_event_handler(function)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Remove an event handler.
|
||||
</para>
|
||||
<para>
|
||||
Arguments:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>function</option>: function
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Return value: 1 if success, 0 if an error occurred.
|
||||
</para>
|
||||
<para>
|
||||
Examples:
|
||||
<screen>
|
||||
# perl
|
||||
weechat::remove_event_handler("my_event");
|
||||
|
||||
# python
|
||||
weechat.remove_event_handler("my_event")
|
||||
|
||||
# ruby
|
||||
Weechat.remove_event_handler("my_event")
|
||||
|
||||
-- lua
|
||||
weechat.remove_event_handler("my_event")
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_add_modifier">
|
||||
<title>add_modifier</title>
|
||||
|
||||
|
||||
+69
-23
@@ -11,11 +11,12 @@ create an alias for a command
|
||||
|
||||
alias_name: name of alias
|
||||
command: command name (WeeChat or IRC command, many commands can be separated by semicolons)
|
||||
arguments: arguments for command
|
||||
arguments: arguments for command
|
||||
|
||||
</programlisting>
|
||||
<command>is replaced by all arguments.</command>
|
||||
<programlisting>
|
||||
<programlisting>Variables $nick, $channel and $server are replaced by current nick/channel/server.
|
||||
|
||||
</programlisting>
|
||||
<command>buffer [action [args] | number | [[server] [channel]]]</command>
|
||||
<programlisting>
|
||||
@@ -27,9 +28,22 @@ manage buffers
|
||||
list: list open buffers (no parameter implies this list)
|
||||
notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, 3=2+join/part)
|
||||
(when executed on server buffer, this sets default notify level for whole server)
|
||||
scroll: scroll in history (may be relative, and may end by a letter: s=sec, m=min, h=hour, d=day, M=month, y=year); if there is only letter, then scroll to beginning of this item
|
||||
|
||||
number: jump to buffer by number
|
||||
server,
|
||||
channel: jump to buffer by server and/or channel name
|
||||
number: jump to buffer by number
|
||||
|
||||
Examples:
|
||||
move buffer: /buffer move 5
|
||||
close buffer: /buffer close this is part msg
|
||||
set notify: /buffer notify 2
|
||||
scroll 1 day up: /buffer scroll 1d == /buffer scroll -1d == /buffer scroll -24h
|
||||
scroll to beginning
|
||||
of this day: /buffer scroll d
|
||||
scroll 15 min down: /buffer scroll +15m
|
||||
scroll 20 msgs up: /buffer scroll -20
|
||||
jump to #weechat: /buffer #weechat
|
||||
|
||||
</programlisting>
|
||||
<command>builtin command</command>
|
||||
@@ -40,24 +54,32 @@ command: command to execute (a '/' is automatically added if not found at beginn
|
||||
|
||||
|
||||
</programlisting>
|
||||
<command>clear [-all]</command>
|
||||
<command>clear [-all | number [number ...]]</command>
|
||||
<programlisting>
|
||||
clear window(s)
|
||||
|
||||
-all: clear all windows
|
||||
-all: clear all buffers
|
||||
number: clear buffer by number
|
||||
|
||||
</programlisting>
|
||||
<command>connect [servername]</command>
|
||||
<command>connect [-all [-nojoin] | servername [servername ...] [-nojoin] | hostname [-port port] [-ipv6] [-ssl]]</command>
|
||||
<programlisting>
|
||||
connect to a server
|
||||
connect to server(s)
|
||||
|
||||
servername: server name to connect
|
||||
-all: connect to all servers
|
||||
servername: internal server name to connect
|
||||
-nojoin: do not join any channel (even if autojoin is enabled on server)
|
||||
hostname: hostname to connect, creating temporary server
|
||||
port: port for server (integer, default is 6667)
|
||||
ipv6: use IPv6 protocol
|
||||
ssl: use SSL protocol
|
||||
|
||||
</programlisting>
|
||||
<command>disconnect [servername]</command>
|
||||
<command>disconnect [-all | servername [servername ...]]</command>
|
||||
<programlisting>
|
||||
disconnect from a server
|
||||
disconnect from server(s)
|
||||
|
||||
-all: disconnect from all servers
|
||||
servername: server name to disconnect
|
||||
|
||||
</programlisting>
|
||||
@@ -70,11 +92,12 @@ nickname: nickname to send file or chat
|
||||
file: filename (on local host)
|
||||
|
||||
</programlisting>
|
||||
<command>debug dump | windows</command>
|
||||
<command>debug dump | buffer | windows</command>
|
||||
<programlisting>
|
||||
print debug messages
|
||||
|
||||
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
|
||||
buffer: dump buffer content with hexadecimal values in log file
|
||||
windows: display windows tree
|
||||
|
||||
</programlisting>
|
||||
@@ -107,13 +130,14 @@ For each argument, '*' means all.
|
||||
Without argument, /ignore command lists all defined ignore.
|
||||
|
||||
</programlisting>
|
||||
<command>key [key [function/command]] [unbind key] [functions] [reset -yes]</command>
|
||||
<command>key [key [function/command]] [unbind key] [functions] [call function ["args"]] [reset -yes]</command>
|
||||
<programlisting>
|
||||
bind/unbind keys
|
||||
|
||||
key: display or bind this key to an internal function or a command (beginning by "/")
|
||||
unbind: unbind a key
|
||||
functions: list internal functions for key bindings
|
||||
call: call a function by name (with optional arguments)
|
||||
reset: restore bindings to the default values and delete ALL personal bindings (use carefully!)
|
||||
|
||||
</programlisting>
|
||||
@@ -131,13 +155,35 @@ autoload: autoload plugins in system or user directory
|
||||
Without argument, /plugin command lists loaded plugins.
|
||||
|
||||
</programlisting>
|
||||
<command>server [servername] | [servername hostname port [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1 nick2 nick3] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [del servername]</command>
|
||||
<command>reconnect [-all [-nojoin] | servername [servername ...] [-nojoin]]</command>
|
||||
<programlisting>
|
||||
reconnect to server(s)
|
||||
|
||||
-all: reconnect to all servers
|
||||
servername: server name to reconnect
|
||||
-nojoin: do not join any channel (even if autojoin is enabled on server)
|
||||
|
||||
</programlisting>
|
||||
<command>save [file]</command>
|
||||
<programlisting>
|
||||
save config to disk
|
||||
|
||||
file: filename for writing config
|
||||
|
||||
</programlisting>
|
||||
<command>server [list [servername]] | [listfull [servername]] | [add servername hostname [-port port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1 nick2 nick3] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [copy servername newservername] | [rename servername newservername] | [keep servername] | [del servername]</command>
|
||||
<programlisting>
|
||||
list, add or remove servers
|
||||
|
||||
list: list servers (no parameter implies this list)
|
||||
listfull: list servers with detailed info for each server
|
||||
add: create a new server
|
||||
servername: server name, for internal and display use
|
||||
hostname: name or IP address of server
|
||||
port: port for server (integer)
|
||||
port: port for server (integer, default is 6667)
|
||||
temp: create temporary server (not saved in config file)
|
||||
auto: automatically connect to server when WeeChat starts
|
||||
noauto: do not connect to server when WeeChat starts (default)
|
||||
ipv6: use IPv6 protocol
|
||||
ssl: use SSL protocol
|
||||
password: password for server
|
||||
@@ -146,13 +192,11 @@ servername: server name, for internal and display use
|
||||
nick3: second alternate nick for server
|
||||
username: user name
|
||||
realname: real name of user
|
||||
|
||||
</programlisting>
|
||||
<command>save [file]</command>
|
||||
<programlisting>
|
||||
save config to disk
|
||||
|
||||
file: filename for writing config
|
||||
copy: duplicate a server
|
||||
rename: rename a server
|
||||
keep: keep server in config file (for temporary servers only)
|
||||
del: delete a server
|
||||
deloutq: delete messages out queue for all servers (all messages WeeChat is currently sending)
|
||||
|
||||
</programlisting>
|
||||
<command>set [option [ = value]]</command>
|
||||
@@ -197,11 +241,13 @@ For each argument, '*' means all.
|
||||
Without argument, /unignore command lists all defined ignore.
|
||||
|
||||
</programlisting>
|
||||
<command>upgrade</command>
|
||||
<command>upgrade [path_to_binary]</command>
|
||||
<programlisting>
|
||||
upgrade WeeChat without disconnecting from servers
|
||||
|
||||
This command run again WeeChat binary, so it should have been compiled or installed with a package manager before running this command.
|
||||
path_to_binary: path to WeeChat binary (default is current binary)
|
||||
|
||||
This command run again a WeeChat binary, so it should have been compiled or installed with a package manager before running this command.
|
||||
|
||||
</programlisting>
|
||||
<command>uptime [-o]</command>
|
||||
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,8 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
LANGCODE = fr
|
||||
|
||||
+66
-17
@@ -87,28 +87,28 @@
|
||||
<entry>booléen</entry>
|
||||
<entry>'on' ou 'off'</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Afficher la fenêtre des utilisateurs (pour les fenêtres de canaux)</entry>
|
||||
<entry>Afficher la fenêtre des pseudos (pour les fenêtres de canaux)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nicklist_position</option></entry>
|
||||
<entry>chaîne</entry>
|
||||
<entry>'left', 'right', 'top', 'bottom'</entry>
|
||||
<entry>'right'</entry>
|
||||
<entry>Position de la fenêtre d'utilisateurs (haut (top), gauche (left), droite (right, par défaut), bas (bottom))</entry>
|
||||
<entry>Position de la fenêtre des pseudos (haut (top), gauche (left), droite (right, par défaut), bas (bottom))</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nicklist_min_size</option></entry>
|
||||
<entry>entier</entry>
|
||||
<entry>entre 0 et 100</entry>
|
||||
<entry>0</entry>
|
||||
<entry>Taille minimum pour la fenêtre d'utilisateurs (largeur ou hauteur, selon look_nicklist_position (0 = pas de taille minimum))</entry>
|
||||
<entry>Taille minimum pour la fenêtre des pseudos (largeur ou hauteur, selon look_nicklist_position (0 = pas de taille minimum))</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nicklist_max_size</option></entry>
|
||||
<entry>entier</entry>
|
||||
<entry>entre 0 et 100</entry>
|
||||
<entry>0</entry>
|
||||
<entry>Taille maximum pour la fenêtre d'utilisateurs (largeur ou hauteur, selon look_nicklist_position (0 = pas de taille maximum; si min == max et > 0, alors la taille est fixe))</entry>
|
||||
<entry>Taille maximum pour la fenêtre des pseudos (largeur ou hauteur, selon look_nicklist_position (0 = pas de taille maximum; si min = max et > 0, alors la taille est fixe))</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nicklist_separator</option></entry>
|
||||
@@ -122,21 +122,21 @@
|
||||
<entry>chaîne</entry>
|
||||
<entry>toute chaîne</entry>
|
||||
<entry>'-cmd-'</entry>
|
||||
<entry>Texte à afficher en lieu et place du nom d'utilisateur lorsque la connexion n'est pas active</entry>
|
||||
<entry>Texte à afficher en lieu et place du pseudo lorsque la connexion n'est pas active</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nickmode</option></entry>
|
||||
<entry>booléen</entry>
|
||||
<entry>'on' ou 'off'</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Afficher le mode de l'utilisateur ((half)op/voice) devant chaque utilisateur</entry>
|
||||
<entry>Afficher le mode du pseudo ((half)op/voice) devant chaque utilisateur</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nickmode_empty</option></entry>
|
||||
<entry>booléen</entry>
|
||||
<entry>'on' ou 'off'</entry>
|
||||
<entry>'off'</entry>
|
||||
<entry>Afficher un espace si le mode utilisateur n'est pas (half)op/voice</entry>
|
||||
<entry>Afficher un espace si le mode du pseudo n'est pas (half)op/voice</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_prefix</option></entry>
|
||||
@@ -180,6 +180,13 @@
|
||||
<entry>20</entry>
|
||||
<entry>Taille maximum pour l'alignement des pseudos et autres messages (doit être >= à look_align_size)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_align_text_offset</option></entry>
|
||||
<entry>entier</entry>
|
||||
<entry>entre -1 et 64</entry>
|
||||
<entry>-1</entry>
|
||||
<entry>Décalage pour aligner les lignes des messages (exceptées les premières lignes), par défaut -1 (aligner après le pseudo), une valeur nulle ou positive est le décalage après le début de la ligne</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_completor</option></entry>
|
||||
<entry>chaîne</entry>
|
||||
@@ -194,6 +201,13 @@
|
||||
<entry>'[]-^'</entry>
|
||||
<entry>Caractères à ignorer pour la complétion des pseudos</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_completion_smart</option></entry>
|
||||
<entry>booléen</entry>
|
||||
<entry>'on' ou 'off'</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Complétion intelligente pour les pseudos (complète d'abord avec les personnes qui ont parlé récemment)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_nick_complete_first</option></entry>
|
||||
<entry>booléen</entry>
|
||||
@@ -250,6 +264,13 @@
|
||||
<entry>0</entry>
|
||||
<entry>Nombre maximum des noms dans la liste d'activité (0 = pas de limite)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_hotlist_sort</option></entry>
|
||||
<entry>chaîne</entry>
|
||||
<entry>'group_time_asc', 'group_time_desc', 'group_number_asc', 'group_number_desc', 'number_asc', 'number_desc'</entry>
|
||||
<entry>'group_time_asc'</entry>
|
||||
<entry>Type de tri pour la liste d'activité (group_time_asc (par défaut), group_time_desc, group_number_asc, group_number_desc, number_asc, number_desc)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_day_change</option></entry>
|
||||
<entry>booléen</entry>
|
||||
@@ -266,8 +287,8 @@
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_read_marker</option></entry>
|
||||
<entry>chaîne</entry>
|
||||
<entry>toute chaîne</entry>
|
||||
<entry>caractère</entry>
|
||||
<entry>tout caractère</entry>
|
||||
<entry>' '</entry>
|
||||
<entry>Utiliser un marqueur sur les serveurs/canaux pour montrer la première ligne non lue</entry>
|
||||
</row>
|
||||
@@ -278,6 +299,13 @@
|
||||
<entry>'[%n(%m)] '</entry>
|
||||
<entry>Format pour l'invite de la zone de saisie ('%c' est remplacé par le canal ou serveur, '%n' par le pseudo et '%m' par les modes du pseudo)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>look_paste_max_lines</option></entry>
|
||||
<entry>entier</entry>
|
||||
<entry>entre 0 et 2147483647</entry>
|
||||
<entry>3</entry>
|
||||
<entry>Nombre maximum de lignes pour la détection de collage sans demander à l'utilisateur (0 = désactiver cette fonctionnalité)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_real_white</option></entry>
|
||||
<entry>booléen</entry>
|
||||
@@ -304,7 +332,7 @@
|
||||
<entry>couleur</entry>
|
||||
<entry>couleur Curses ou Gtk</entry>
|
||||
<entry>'lightmagenta'</entry>
|
||||
<entry>Couleur pour les '+' lors du scroll sur le titre</entry>
|
||||
<entry>Couleur pour les '+' lors du défilement du titre</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_title_bg</option></entry>
|
||||
@@ -374,14 +402,14 @@
|
||||
<entry>couleur</entry>
|
||||
<entry>couleur Curses ou Gtk</entry>
|
||||
<entry>'lightcyan'</entry>
|
||||
<entry>Couleur pour les noms d'utilisateurs dans les actions (fenêtre de discussion)</entry>
|
||||
<entry>Couleur pour les pseudos dans les actions (fenêtre de discussion)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_chat_host</option></entry>
|
||||
<entry>couleur</entry>
|
||||
<entry>couleur Curses ou Gtk</entry>
|
||||
<entry>'cyan'</entry>
|
||||
<entry>Couleur pour les noms de machines (fenêtre de discussion)</entry>
|
||||
<entry>Couleur pour les hôtes (fenêtre de discussion)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_chat_channel</option></entry>
|
||||
@@ -551,6 +579,20 @@
|
||||
<entry>'cyan'</entry>
|
||||
<entry>Couleur pour le texte saisi (délimiteurs)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_input_text_not_found</option></entry>
|
||||
<entry>couleur</entry>
|
||||
<entry>couleur Curses ou Gtk</entry>
|
||||
<entry>'red'</entry>
|
||||
<entry>Couleur pour le texte non trouvé</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_input_actions</option></entry>
|
||||
<entry>couleur</entry>
|
||||
<entry>couleur Curses ou Gtk</entry>
|
||||
<entry>'lightgreen'</entry>
|
||||
<entry>Couleur pour les actions dans la fenêtre de saisie</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_input_bg</option></entry>
|
||||
<entry>couleur</entry>
|
||||
@@ -607,12 +649,19 @@
|
||||
<entry>'yellow'</entry>
|
||||
<entry>Couleur pour le symbole voix</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_nick_user</option></entry>
|
||||
<entry>couleur</entry>
|
||||
<entry>couleur Curses ou Gtk</entry>
|
||||
<entry>'blue'</entry>
|
||||
<entry>Couleur pour le symbole utilisateur</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_nick_more</option></entry>
|
||||
<entry>couleur</entry>
|
||||
<entry>couleur Curses ou Gtk</entry>
|
||||
<entry>'lightmagenta'</entry>
|
||||
<entry>Couleur pour les '+' lors du scroll sur les pseudos</entry>
|
||||
<entry>Couleur pour les '+' lors du défilement des pseudos</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>col_nick_sep</option></entry>
|
||||
@@ -934,7 +983,7 @@
|
||||
<entry>booléen</entry>
|
||||
<entry>'on' ou 'off'</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Autorise l'utilisateur à envoyer des couleurs avec des codes spéciaux (%B=gras, %Cxx,yy=couleur, %U=souligné, %R=inversé)</entry>
|
||||
<entry>Autorise l'utilisateur à envoyer des couleurs avec des codes spéciaux (^Cb=gras, ^Cxx=couleur, ^Ccxx,yy=couleur+fond, ^Cu=souligné, ^Cr=inversé)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>irc_send_unknown_commands</option></entry>
|
||||
@@ -1025,7 +1074,7 @@
|
||||
<entry>booléen</entry>
|
||||
<entry>'on' ou 'off'</entry>
|
||||
<entry>'on'</entry>
|
||||
<entry>Continuer automatiquement les transferts dcc si la connexion avec la machine distante a été perdue</entry>
|
||||
<entry>Continuer automatiquement les transferts dcc si la connexion avec l'hôte a été perdue</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>proxy_use</option></entry>
|
||||
@@ -1053,7 +1102,7 @@
|
||||
<entry>chaîne</entry>
|
||||
<entry>toute chaîne</entry>
|
||||
<entry>''</entry>
|
||||
<entry>Adresse du serveur proxy (IP ou nom)</entry>
|
||||
<entry>Adresse du serveur proxy (IP ou nom de machine)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><option>proxy_port</option></entry>
|
||||
@@ -1212,7 +1261,7 @@
|
||||
<row>
|
||||
<entry><option>server_command_delay</option></entry>
|
||||
<entry>entier</entry>
|
||||
<entry>entre 0 et 5</entry>
|
||||
<entry>entre 0 et 3600</entry>
|
||||
<entry>0</entry>
|
||||
<entry>Délai (en secondes) après exécution de la commande (exemple: donner du temps pour l'authentification)</entry>
|
||||
</row>
|
||||
|
||||
+30
-30
@@ -36,17 +36,17 @@ message: message pour l'absence (si pas de message donn
|
||||
</programlisting>
|
||||
<command>ban [canal] [pseudo [pseudo ...]]</command>
|
||||
<programlisting>
|
||||
bannit des pseudos ou masques
|
||||
bannit des pseudos ou hôtes
|
||||
|
||||
canal: nom du canal pour le bannissement
|
||||
pseudo: pseudo ou masque pour le bannissement
|
||||
pseudo: pseudo ou hôte pour le bannissement
|
||||
|
||||
</programlisting>
|
||||
<command>ctcp cible type [arguments]</command>
|
||||
<programlisting>
|
||||
envoyer un message CTCP (Client-To-Client Protocol)
|
||||
|
||||
cible: utilisateur à qui envoyer le CTCP
|
||||
cible: pseudo à qui envoyer le CTCP
|
||||
type: type de CTCP (exemples: "version", "ping", etc...)
|
||||
arguments: arguments pour le CTCP
|
||||
|
||||
@@ -61,12 +61,12 @@ message_de_fin: message de fin (affich
|
||||
</programlisting>
|
||||
<command>dehalfop [pseudo [pseudo]]</command>
|
||||
<programlisting>
|
||||
retire le statut de demi-opérateur du canal à/aux nick(s)
|
||||
retire le statut de demi-opérateur du canal à/aux pseudo(s)
|
||||
|
||||
</programlisting>
|
||||
<command>deop [pseudo [pseudo]]</command>
|
||||
<programlisting>
|
||||
retire le statut d'opérateur du canal à/aux nick(s)
|
||||
retire le statut d'opérateur du canal à/aux pseudo(s)
|
||||
|
||||
</programlisting>
|
||||
<command>devoice [pseudo [pseudo]]</command>
|
||||
@@ -81,7 +81,7 @@ arr
|
||||
</programlisting>
|
||||
<command>halfop [pseudo [pseudo]]</command>
|
||||
<programlisting>
|
||||
donner le statut de demi-opérateur à un/des utilisateur(s)
|
||||
donner le statut de demi-opérateur à un/des pseudo(s)
|
||||
|
||||
</programlisting>
|
||||
<command>info [cible]</command>
|
||||
@@ -93,15 +93,15 @@ cible: nom du serveur
|
||||
</programlisting>
|
||||
<command>invite pseudo canal</command>
|
||||
<programlisting>
|
||||
inviter un utilisateur sur un canal
|
||||
inviter un pseudo sur un canal
|
||||
|
||||
pseudo: utilisateur à inviter
|
||||
pseudo: pseudo à inviter
|
||||
channel: canal pour l'invitation
|
||||
|
||||
</programlisting>
|
||||
<command>ison pseudo [pseudo ...]</command>
|
||||
<programlisting>
|
||||
vérifier si un utilisateur est actuellement sur IRC
|
||||
vérifier si un pseudo est actuellement sur IRC
|
||||
|
||||
pseudo: pseudo
|
||||
|
||||
@@ -119,16 +119,16 @@ canal: nom du canal
|
||||
retirer par la force un utilisateur d'un canal
|
||||
|
||||
canal: canal où l'utilisateur se trouve
|
||||
pseudo: utilisateur à éliminer
|
||||
pseudo: pseudo à éliminer
|
||||
commentaire: commentaire pour l'élimination
|
||||
|
||||
</programlisting>
|
||||
<command>kickban [canal] pseudo [commentaire]</command>
|
||||
<programlisting>
|
||||
retirer par la force un utilisateur d'un canal et le bannir
|
||||
retirer par la force un pseudo d'un canal et le bannir
|
||||
|
||||
canal: canal où l'utilisateur se trouve
|
||||
pseudo: utilisateur à éliminer et bannir
|
||||
pseudo: pseudo à éliminer et bannir
|
||||
commentaire: commentaire pour l'élimination
|
||||
|
||||
</programlisting>
|
||||
@@ -136,7 +136,7 @@ commentaire: commentaire pour l'
|
||||
<programlisting>
|
||||
fermer la connexion client-serveur
|
||||
|
||||
pseudo: utilisateur
|
||||
pseudo: pseudo
|
||||
commentaire: commentaire pour la mort
|
||||
|
||||
</programlisting>
|
||||
@@ -171,7 +171,7 @@ envoyer une action CTCP au canal courant
|
||||
message: message à envoyer
|
||||
|
||||
</programlisting>
|
||||
<command>mode { canal {[+|-]|o|p|s|i|t|n|b|v} [limite] [utilisateur] [masque de banissement] } | { nick {[+|-]|i|w|s|o} }</command>
|
||||
<command>mode { canal {[+|-]|o|p|s|i|t|n|b|v} [limite] [utilisateur] [masque de banissement] } | { pseudo {[+|-]|i|w|s|o} }</command>
|
||||
<programlisting>
|
||||
changer le mode du canal ou de l'utilisateur
|
||||
|
||||
@@ -190,7 +190,7 @@ modes de canaux :
|
||||
v: donner/reprendre la possibilité de parler sur un canal modéré
|
||||
k: définir une clé (mot de passe) pour accéder au canal
|
||||
modes utilisateur :
|
||||
pseudo: utilisateur à modifier
|
||||
pseudo: pseudo à modifier
|
||||
i: marquer un utilisateur comme invisible
|
||||
s: marquer un utilisateur pour recevoir les notices du serveur
|
||||
w: l'utilisateur reçoit les wallops
|
||||
@@ -206,15 +206,15 @@ cible: nom du serveur
|
||||
</programlisting>
|
||||
<command>msg cible[,cible] texte</command>
|
||||
<programlisting>
|
||||
envoyer un message à un utilisateur ou canal
|
||||
envoyer un message à un pseudo ou canal
|
||||
|
||||
cible: utilisateur ou canal (peut-être un masque, '*' = canal courant)
|
||||
cible: pseudo ou canal (peut-être un masque, '*' = canal courant)
|
||||
texte: texte à envoyer
|
||||
|
||||
</programlisting>
|
||||
<command>names [canal[,canal]]</command>
|
||||
<programlisting>
|
||||
lister les utilisateurs sur des canaux
|
||||
lister les pseudos sur des canaux
|
||||
|
||||
canal: nom du canal
|
||||
|
||||
@@ -231,13 +231,13 @@ pseudo: nouveau pseudo
|
||||
<programlisting>
|
||||
envoyer un message notice à un utilisateur
|
||||
|
||||
pseudo: utilisateur cible pour la notice
|
||||
pseudo: pseudo cible pour la notice
|
||||
texte: texte à envoyer
|
||||
|
||||
</programlisting>
|
||||
<command>op pseudo [pseudo]</command>
|
||||
<programlisting>
|
||||
donner le statut opérateur à un/des utilisateur(s)
|
||||
donner le statut opérateur à un/des pseudo(s)
|
||||
|
||||
</programlisting>
|
||||
<command>oper utilisateur mot_de_passe</command>
|
||||
@@ -273,9 +273,9 @@ d
|
||||
</programlisting>
|
||||
<command>query pseudo [texte]</command>
|
||||
<programlisting>
|
||||
envoyer un message privé à un utilisateur
|
||||
envoyer un message privé à un pseudo
|
||||
|
||||
pseudo: utilisateur pour la conversation privée
|
||||
pseudo: pseudo pour la conversation privée
|
||||
texte: texte à envoyer
|
||||
|
||||
</programlisting>
|
||||
@@ -376,15 +376,15 @@ cible: serveur
|
||||
</programlisting>
|
||||
<command>unban [canal] pseudo [pseudo ...]</command>
|
||||
<programlisting>
|
||||
supprime le bannissement sur des pseudos ou masques
|
||||
supprime le bannissement sur des pseudos ou hôtes
|
||||
|
||||
canal: nom du canal pour supprimer le bannissement
|
||||
pseudo: pseudo ou masque pour supprimer le bannissement
|
||||
pseudo: pseudo ou hôte pour supprimer le bannissement
|
||||
|
||||
</programlisting>
|
||||
<command>userhost pseudo [pseudo ...]</command>
|
||||
<programlisting>
|
||||
retourne une liste d'informations sur des utilisateurs
|
||||
retourne une liste d'informations sur des pseudos
|
||||
|
||||
pseudo: pseudo
|
||||
|
||||
@@ -398,15 +398,15 @@ cible: serveur
|
||||
</programlisting>
|
||||
<command>version [serveur | pseudo]</command>
|
||||
<programlisting>
|
||||
retourne la version de l'utilisateur ou du serveur (courant ou spécifié)
|
||||
retourne la version du pseudo ou du serveur (courant ou spécifié)
|
||||
|
||||
serveur: nom du serveur
|
||||
pseudo: utilisateur
|
||||
pseudo: pseudo
|
||||
|
||||
</programlisting>
|
||||
<command>voice [pseudo [pseudo]]</command>
|
||||
<programlisting>
|
||||
donne la voix à/aux utilisateur(s)
|
||||
donne la voix à/aux pseudo(s)
|
||||
|
||||
</programlisting>
|
||||
<command>wallops texte</command>
|
||||
@@ -429,12 +429,12 @@ masque: information qui correspond
|
||||
demande les informations sur le(s) utilisateur(s)
|
||||
|
||||
serveur: nom du serveur
|
||||
pseudo: utilisateur (peut être un masque)
|
||||
pseudo: pseudo (peut être un masque)
|
||||
|
||||
</programlisting>
|
||||
<command>whowas pseudo [,pseudo [,pseudo ...]] [nombre [cible]]</command>
|
||||
<programlisting>
|
||||
demander de l'information sur un nick qui n'existe plus
|
||||
demander de l'information sur un pseudo qui n'existe plus
|
||||
|
||||
pseudo: pseudo à chercher
|
||||
nombre: nombre de réponses à retourner (recherche complète si nombre négatif)
|
||||
|
||||
@@ -157,6 +157,10 @@
|
||||
<entry><literal>jump_last_buffer</literal></entry>
|
||||
<entry>sauter au dernier tampon</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>jump_previous_buffer</literal></entry>
|
||||
<entry>sauter au tampon précédent</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>jump_server</literal></entry>
|
||||
<entry>sauter au tampon du serveur</entry>
|
||||
@@ -171,15 +175,19 @@
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>scroll_previous_highlight</literal></entry>
|
||||
<entry>scroller jusqu'au highlight précédent du tampon</entry>
|
||||
<entry>faire défiler jusqu'au highlight précédent du tampon</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>scroll_next_highlight</literal></entry>
|
||||
<entry>scroller jusqu'au highlight suivant du tampon</entry>
|
||||
<entry>faire défiler jusqu'au highlight suivant du tampon</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>scroll_unread</literal></entry>
|
||||
<entry>scroller jusqu'à la première ligne non lue du tampon</entry>
|
||||
<entry>faire défiler jusqu'à la première ligne non lue du tampon</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>set_unread</literal></entry>
|
||||
<entry>positionner le marqueur de données non lues sur tous les tampons</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>hotlist_clear</literal></entry>
|
||||
@@ -197,3 +205,11 @@
|
||||
<entry><literal>grab_key</literal></entry>
|
||||
<entry>capturer une touche</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>insert</literal></entry>
|
||||
<entry>insérer une chaîne dans la ligne de commande</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>search_text</literal></entry>
|
||||
<entry>recherche de texte dans l'historique du tampon</entry>
|
||||
</row>
|
||||
|
||||
+668
-34
@@ -8,7 +8,7 @@ Copyright (c) 2003-2007 by FlashCode <flashcode@flashtux.org>
|
||||
|
||||
This manual is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This manual is distributed in the hope that it will be useful,
|
||||
@@ -17,8 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
|
||||
@@ -36,7 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
<bookinfo>
|
||||
|
||||
<title>WeeChat 0.2.3 - Guide utilisateur</title>
|
||||
<title>WeeChat 0.2.6 - Guide utilisateur</title>
|
||||
<subtitle>Client IRC rapide, léger et extensible</subtitle>
|
||||
|
||||
<author>
|
||||
@@ -48,7 +47,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
&date.xml;
|
||||
|
||||
<copyright>
|
||||
<year>2006</year>
|
||||
<year>2007</year>
|
||||
<holder>Sébastien Helleu</holder>
|
||||
</copyright>
|
||||
|
||||
@@ -56,7 +55,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
<para>
|
||||
This manual is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
</para>
|
||||
<para>
|
||||
@@ -67,9 +66,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</para>
|
||||
<para>
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</para>
|
||||
</legalnotice>
|
||||
|
||||
@@ -470,13 +467,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Flèche gauche</entry>
|
||||
<entry>Flèche gauche / Ctrl + B</entry>
|
||||
<entry>
|
||||
Aller au caractère précédent sur la ligne de commande
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Flèche droite</entry>
|
||||
<entry>Flèche droite / Ctrl + F</entry>
|
||||
<entry>
|
||||
Aller au caractère suivant sur la ligne de commande
|
||||
</entry>
|
||||
@@ -499,6 +496,36 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Aller au début de la ligne de commande
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C puis B</entry>
|
||||
<entry>
|
||||
Insérer le code pour mettre le texte en gras.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C puis C</entry>
|
||||
<entry>
|
||||
Insérer le code pour écrire en couleur.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C puis O</entry>
|
||||
<entry>
|
||||
Insérer le code pour réinitaliser la couleur.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C puis R</entry>
|
||||
<entry>
|
||||
Insérer le code pour écrire en couleur inversée.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + C puis U</entry>
|
||||
<entry>
|
||||
Insérer le code pour écrire en souligné.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>End / Ctrl + E</entry>
|
||||
<entry>
|
||||
@@ -517,6 +544,20 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Réafficher toute la fenêtre
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + R</entry>
|
||||
<entry>
|
||||
Chercher du texte dans l'historique du tampon
|
||||
(deux appuis successifs pour rechercher du texte exact)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + S puis Ctrl + U</entry>
|
||||
<entry>
|
||||
Positionner le marqueur de données non lues sur tous les
|
||||
tampons
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ctrl + T</entry>
|
||||
<entry>
|
||||
@@ -548,7 +589,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Delete</entry>
|
||||
<entry>Delete / Ctrl + D</entry>
|
||||
<entry>
|
||||
Effacer le caractère suivant sur la ligne de commande
|
||||
</entry>
|
||||
@@ -571,12 +612,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
<entry>Entrée / Ctrl + J / Ctrl + M</entry>
|
||||
<entry>
|
||||
Exécuter la commande ou envoyer le message
|
||||
(en mode recherche: arrêter la recherche)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Flèche haut / flèche bas</entry>
|
||||
<entry>
|
||||
Rappeler les dernières commandes ou messages
|
||||
(en mode recherche: chercher en haut/bas)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -697,6 +740,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Sauter au dernier tampon
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Alt + J puis Alt + P</entry>
|
||||
<entry>
|
||||
Sauter au tampon affiché précédemment
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Alt + J puis Alt + R</entry>
|
||||
<entry>
|
||||
@@ -812,7 +861,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
<para>
|
||||
Si l'option d'envoi des couleurs IRC
|
||||
("<literal>irc_colors_send</literal>") est activée, il est possible
|
||||
d'utiliser des codes couleur et attributs comme suit :
|
||||
d'utiliser des codes couleur et attributs comme suit (appuyer sur Ctrl-C
|
||||
puis la lettre qui suit et éventuellement une valeur) :
|
||||
<informaltable colsep="0" frame="none">
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
@@ -823,20 +873,20 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>%B</entry>
|
||||
<entry>^Cb</entry>
|
||||
<entry>
|
||||
texte gras
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%Cxx</entry>
|
||||
<entry>^Ccxx</entry>
|
||||
<entry>
|
||||
couleur du texte "<literal>xx</literal>"
|
||||
(voir le tableau des couleurs ci-dessous)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%Cxx,yy</entry>
|
||||
<entry>^Ccxx,yy</entry>
|
||||
<entry>
|
||||
couleur du texte "<literal>xx</literal>"
|
||||
et du fond "<literal>yy</literal>"
|
||||
@@ -844,38 +894,32 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%O</entry>
|
||||
<entry>^Co</entry>
|
||||
<entry>
|
||||
désactiver la couleur et tous les attributs
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%R</entry>
|
||||
<entry>^Cr</entry>
|
||||
<entry>
|
||||
vidéo inverse (inversion de la couleur d'écriture et du fond)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%U</entry>
|
||||
<entry>^Cu</entry>
|
||||
<entry>
|
||||
texte souligné
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>%%</entry>
|
||||
<entry>
|
||||
afficher un seul "<literal>%</literal>"
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
NB: le même code (sans le numéro pour %C) peut être utilisé pour stopper
|
||||
NB: le même code (sans le numéro pour ^Cc) peut être utilisé pour stopper
|
||||
l'attribut défini.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Les codes couleur pour %C sont :
|
||||
Les codes couleur pour ^Cc sont :
|
||||
<informaltable colsep="0" frame="none">
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
@@ -958,7 +1002,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Exemple : affichage de "<literal>bonjour tout le monde !</literal>"
|
||||
avec "<literal>bonjour</literal>" en bleu clair gras, et
|
||||
"<literal>tout le monde</literal>" en rouge clair souligné :
|
||||
<screen><userinput>%C12%Bbonjour%B%C04%U tout le monde%U%C !</userinput></screen>
|
||||
<screen><userinput>^Cc12^Cbbonjour^Cb^Cc04^Cu tout le monde^Cu^Cc !</userinput></screen>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
@@ -1180,7 +1224,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
<screen>
|
||||
#!/bin/sh
|
||||
if [ $# -eq 1 ]; then
|
||||
for fifo in $(/bin/ls ~/.weechat/weechat_fifo_* 2>/dev/null); do
|
||||
for fifo in ~/.weechat/weechat_fifo_*
|
||||
do
|
||||
echo -e "$1" >$fifo
|
||||
done
|
||||
fi
|
||||
@@ -1773,6 +1818,65 @@ plugin->exec_on_files (plugin, "/tmp", &callback);
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Pour afficher du texte en couleur, il faut utiliser les codes
|
||||
suivants :
|
||||
<informaltable colsep="0" frame="none">
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Code</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>0x02</entry>
|
||||
<entry>
|
||||
texte gras
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x03 + "xx"</entry>
|
||||
<entry>
|
||||
couleur du texte "<literal>xx</literal>"
|
||||
(voir <xref linkend="secAPI_get_irc_color" /> pour les
|
||||
couleurs)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x03 + "xx,yy"</entry>
|
||||
<entry>
|
||||
couleur du texte "<literal>xx</literal>"
|
||||
et du fond "<literal>yy</literal>"
|
||||
(voir <xref linkend="secAPI_get_irc_color" /> pour les
|
||||
couleurs)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x0F</entry>
|
||||
<entry>
|
||||
désactiver la couleur et tous les attributs
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x12</entry>
|
||||
<entry>
|
||||
vidéo inverse (inversion de la couleur d'écriture et du fond)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>0x1F</entry>
|
||||
<entry>
|
||||
texte souligné
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
NB: le même code (sans le numéro pour 0x03) peut être utilisé pour stopper
|
||||
l'attribut défini.
|
||||
</para>
|
||||
<para>
|
||||
Valeur renvoyée : aucune.
|
||||
</para>
|
||||
@@ -1782,6 +1886,11 @@ plugin->exec_on_files (plugin, "/tmp", &callback);
|
||||
plugin->print (plugin, NULL, NULL, "hello");
|
||||
plugin->print (plugin, NULL, "#weechat", "hello");
|
||||
plugin->print (plugin, "freenode", "#weechat", "hello");
|
||||
plugin->print (plugin, "freenode", "#weechat", "hello");
|
||||
plugin->print (plugin, NULL, NULL,
|
||||
"test: \x02 gras \x0F\x03%02d bleu \x03%02d vert",
|
||||
plugin->get_irc_color (plugin, "blue"),
|
||||
plugin->get_irc_color (plugin, "green"));
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
@@ -1815,6 +1924,10 @@ plugin->print (plugin, "freenode", "#weechat", "hello");
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Pour afficher du texte en couleur, voir
|
||||
<xref linkend="secAPI_print" />.
|
||||
</para>
|
||||
<para>
|
||||
Valeur renvoyée : aucune.
|
||||
</para>
|
||||
@@ -2105,6 +2218,12 @@ plugin->log (plugin, "freenode", "#weechat", "test");
|
||||
ne sera ni transmis à WeeChat ni à d'autres extensions
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal> : la fonction
|
||||
a réussi et provoque un "highlight" sur le message reçu
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
@@ -2202,6 +2321,14 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
|
||||
<entry><literal>%-</literal></entry>
|
||||
<entry>aucune complétion pour le paramètre</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%*</literal></entry>
|
||||
<entry>
|
||||
répétition de la dernière complétion pour tous
|
||||
les paramètres suivants (ce code doit être à la
|
||||
fin du modèle de complétion, précédé d'un "|")
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%a</literal></entry>
|
||||
<entry>alias</entry>
|
||||
@@ -2218,7 +2345,7 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%C</literal></entry>
|
||||
<entry>canaux du serveur courant</entry>
|
||||
<entry>tous les canaux (y compris les privés)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%f</literal></entry>
|
||||
@@ -2244,6 +2371,13 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
|
||||
<entry><literal>%m</literal></entry>
|
||||
<entry>pseudo sur le serveur courant</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%M</literal></entry>
|
||||
<entry>
|
||||
pseudos sur le serveur courant
|
||||
(tous les canaux ouverts)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%n</literal></entry>
|
||||
<entry>pseudos du canal courant</entry>
|
||||
@@ -2596,7 +2730,142 @@ keyb_handler = plugin->keyboard_handler_add (plugin, &mon_keyb);
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="secAPI_event_handler_add">
|
||||
<title>event_handler_add</title>
|
||||
|
||||
<para>
|
||||
Prototype :
|
||||
<command>
|
||||
t_plugin_handler *event_handler_add (t_weechat_plugin
|
||||
*plugin, char *evenement, t_plugin_handler_func *fonction,
|
||||
char *handler_args, void *handler_pointer)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Ajoute un gestionnaire d'évènement, appelé dès qu'un évènement se
|
||||
produit.
|
||||
</para>
|
||||
<para>
|
||||
Paramètres :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>plugin</option> : pointeur vers la structure
|
||||
de l'extension
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>évènement</option> : évènement (voir le tableau
|
||||
ci-dessous)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>fonction</option> : fonction appelée
|
||||
</para>
|
||||
<para>
|
||||
Elle a le prototype suivant :
|
||||
<command>
|
||||
int ma_fonction (t_weechat_plugin *plugin,
|
||||
int argc, char **argv,
|
||||
char *handler_args, void *handler_pointer)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Les paramètres passés à la fonction dépendent de l'évènement
|
||||
(voir le tableau ci-dessous).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>handler_args</option> : paramètres passés à la
|
||||
fonction appelée
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>handler_pointer</option> : pointeur passé à la
|
||||
fonction appelée
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Liste des évènements :
|
||||
<informaltable colsep="0" frame="none">
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Evènement</entry>
|
||||
<entry>Description</entry>
|
||||
<entry>Paramètres</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal>buffer_open</literal></entry>
|
||||
<entry>un tampon a été ouvert</entry>
|
||||
<entry>
|
||||
argc = 1, argv = { numéro de tampon }
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>buffer_close</literal></entry>
|
||||
<entry>un tampon a été fermé</entry>
|
||||
<entry>
|
||||
argc = 1, argv = { numéro de tampon }
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>buffer_move</literal></entry>
|
||||
<entry>un tampon a été déplacé</entry>
|
||||
<entry>
|
||||
argc = 2, argv = { nouveau numéro de tampon, ancien numéro }
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
<para>
|
||||
Valeur renvoyée : le pointeur vers le nouveau gestionnaire
|
||||
d'évènement.
|
||||
</para>
|
||||
<para>
|
||||
Note : la fonction appelée doit renvoyer une des valeurs
|
||||
suivantes :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_KO</literal> : la fonction a échoué
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_OK</literal> : la fonction a réussi
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Exemple :
|
||||
<screen>
|
||||
int mon_evenement (t_weechat_plugin *plugin, int argc, char **argv,
|
||||
char *handler_args, void *handler_pointer)
|
||||
{
|
||||
plugin->print (plugin, NULL, NULL, "mon_evenement");
|
||||
return PLUGIN_RC_OK;
|
||||
}
|
||||
...
|
||||
t_plugin_handler *event_handler;
|
||||
event_handler = plugin->event_handler_add (plugin, "buffer_open",
|
||||
&mon_evenement);
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secAPI_handler_remove">
|
||||
<title>handler_remove</title>
|
||||
|
||||
@@ -2987,6 +3256,13 @@ plugin->exec_command (plugin, "freenode", "#weechat", "bonjour");
|
||||
<entry><literal>server</literal></entry>
|
||||
<entry>nom du serveur</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>type</literal></entry>
|
||||
<entry>
|
||||
type de tampon: 0=standard, 1=DCC,
|
||||
2=données IRC brutes
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>away</literal></entry>
|
||||
<entry>drapeau "away"</entry>
|
||||
@@ -4408,7 +4684,7 @@ else
|
||||
<entry>int</entry>
|
||||
<entry><literal>type</literal></entry>
|
||||
<entry>
|
||||
type de tampon: 0=standard, 1=dcc,
|
||||
type de tampon: 0=standard, 1=DCC,
|
||||
2=données IRC brutes
|
||||
</entry>
|
||||
</row>
|
||||
@@ -4762,6 +5038,124 @@ void weechat_plugin_end (t_weechat_plugin *plugin)
|
||||
|
||||
</section>
|
||||
|
||||
<section id="secCharset">
|
||||
<title>Extension Charset</title>
|
||||
|
||||
<para>
|
||||
L'extension Charset vous permet d'encoder et décoder les données en
|
||||
utilisant un jeu de caractères, avec 3 niveaux : global, par serveur,
|
||||
ou par canal.
|
||||
Cette extension est facultative, mais recommandée : si elle n'est pas
|
||||
chargée, WeeChat pourra uniquement lire/écrire des données UTF-8.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
L'extension Charset devrait être automatiquement chargée par WeeChat
|
||||
au démarrage.
|
||||
Pour s'assurer que l'extension est bien chargée, essayez :
|
||||
"<literal>/charset</literal>".
|
||||
Si la commande n'est pas trouvée, alors chargez l'extension avec la
|
||||
commande :
|
||||
<screen>/plugin load charset</screen>
|
||||
Si l'extension n'est pas trouvée, alors vous devriez recompiler
|
||||
WeeChat avec les extensions et le support de Charset.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Lorsque l'extension Charset démarre, elle affiche le jeu de caractères
|
||||
du terminal et l'interne.
|
||||
Le jeu de caractères du terminal dépend de votre locale, et l'interne
|
||||
est UTF-8.
|
||||
Par exemple :
|
||||
<screen>
|
||||
-P- Charset plugin starting, terminal charset: ISO-8859-15 (WeeChat internal: UTF-8)
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<section id="secCharsetSettings">
|
||||
<title>Configuration</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Pour modifier les jeux de caractères de décodage et d'encodage
|
||||
globaux, utilisez la commande "<literal>/setp</literal>".
|
||||
Par exemple :
|
||||
<screen>
|
||||
/setp charset.global.decode = ISO-8859-15
|
||||
/setp charset.global.encode = ISO-8859-15
|
||||
</screen>
|
||||
Si le jeu de caractères de décodage global n'est pas renseigné
|
||||
(par exemple pendant le premier chargement de Charset), il sera
|
||||
renseigné automatiquement avec le jeu de caractères du terminal
|
||||
(s'il est différent de UTF-8) ou par défaut à
|
||||
"<literal>ISO-8859-1</literal>".
|
||||
La valeur d'encodage par défaut est vide, donc WeeChat envoie par
|
||||
défaut avec le jeu de caractères interne (UTF-8).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Pour modifier le jeu de caractères d'un serveur, utilisez la
|
||||
commande "<literal>/charset</literal>" sur le tampon serveur.
|
||||
Si vous donnez seulement le jeu de caractères, alors vous
|
||||
modifiez en même temps les valeurs de décodage et d'encodage.
|
||||
Par exemple :
|
||||
<screen>/charset ISO-8859-15</screen>
|
||||
Ce qui est équivalent à :
|
||||
<screen>
|
||||
/charset decode ISO-8859-15
|
||||
/charset encode ISO-8859-15
|
||||
</screen>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Pour modifier le jeu de caractères d'un canal (ou d'une
|
||||
conversation privée), utilisez la même commande que pour le
|
||||
serveur, mais sur le tampon du canal (ou du privé).
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="secCharsetFAQ">
|
||||
<title>FAQ</title>
|
||||
|
||||
<para>
|
||||
Si vous avez des problèmes avec certains caractères ou les accents en
|
||||
utilisant l'extension Charset :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
vérifiez que weechat-curses est lié avec libncursesw
|
||||
(attention : nécessaire sur beaucoup de distributions, mais pas
|
||||
toutes) :
|
||||
<screen>ldd /chemin/vers/weechat-curses</screen>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
vérifiez la ligne charset (sur le tampon serveur), vous devriez
|
||||
voir ISO-XXXXXX ou UTF-8 pour le charset du terminal. Si vous
|
||||
voyez ANSI_X3.4-1968 ou d'autres valeurs, votre locale est
|
||||
probablement erronée.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
affectez la valeur pour le décodage global, par exemple :
|
||||
<screen>/setp charset.global.decode = ISO-8859-15</screen>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="secExtensionsScripts">
|
||||
<title>Extensions pour scripts</title>
|
||||
|
||||
@@ -5126,6 +5520,10 @@ weechat.set_charset("ISO-8859-1")
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Pour afficher du texte en couleur, voir
|
||||
<xref linkend="secAPI_print" />.
|
||||
</para>
|
||||
<para>
|
||||
Valeur renvoyée : 1 si succès, 0 si une erreur s'est produite.
|
||||
</para>
|
||||
@@ -5136,6 +5534,7 @@ weechat.set_charset("ISO-8859-1")
|
||||
weechat::print("message");
|
||||
weechat::print("message", "#weechat");
|
||||
weechat::print("message", "#weechat", "freenode");
|
||||
weechat::print("test: \x0305 rouge \x0F normal");
|
||||
|
||||
# python
|
||||
weechat.prnt("message")
|
||||
@@ -5155,6 +5554,72 @@ weechat.print("message", "#weechat", "freenode")
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_print_server">
|
||||
<title>print_server</title>
|
||||
|
||||
<para>
|
||||
Prototype Perl :
|
||||
<command>
|
||||
weechat::print_server(message)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Prototype Python :
|
||||
<command>
|
||||
weechat.print_server(message)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Prototype Ruby :
|
||||
<command>
|
||||
Weechat.print_server(message)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Prototype Lua :
|
||||
<command>
|
||||
weechat.print_server(message)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Affiche un message sur le tampon serveur.
|
||||
</para>
|
||||
<para>
|
||||
Paramètres :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>message</option> : message à afficher
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Pour afficher du texte en couleur, voir
|
||||
<xref linkend="secAPI_print" />.
|
||||
</para>
|
||||
<para>
|
||||
Valeur renvoyée : 1 si succès, 0 si une erreur s'est produite.
|
||||
</para>
|
||||
<para>
|
||||
Exemples :
|
||||
<screen>
|
||||
# perl
|
||||
weechat::print_server("message");
|
||||
weechat::print_server("test: \x0305 rouge \x0F normal");
|
||||
|
||||
# python
|
||||
weechat.print_server("message")
|
||||
|
||||
# ruby
|
||||
Weechat.print_server("message")
|
||||
|
||||
-- lua
|
||||
weechat.print_server("message")
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_print_infobar">
|
||||
<title>print_infobar</title>
|
||||
|
||||
@@ -5487,6 +5952,12 @@ end
|
||||
ne sera ni transmis à WeeChat ni à d'autres extensions
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal> : la fonction
|
||||
a réussi et provoque un "highlight" sur le message reçu
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
@@ -5793,7 +6264,7 @@ def mon_clavier(key, input_before, input_after):
|
||||
|
||||
# ruby
|
||||
Weechat.add_keyboard_handler("mon_clavier")
|
||||
def mon_clavier(server, input_before, input_after)
|
||||
def mon_clavier(key, input_before, input_after)
|
||||
Weechat.print("gestionnaire clavier: touche = '#{key}', " \
|
||||
"entrée avant = '#{input_before}' " \
|
||||
"après = '#{input_after}'")
|
||||
@@ -5802,7 +6273,7 @@ end
|
||||
|
||||
-- lua
|
||||
weechat.add_keyboard_handler("mon_clavier")
|
||||
function mon_clavier(server, input_before, input_after)
|
||||
function mon_clavier(key, input_before, input_after)
|
||||
weechat.print("gestionnaire clavier: touche = '"..key..
|
||||
"', entrée avant = '"..input_before..
|
||||
"' après = '"..input_after.."'")
|
||||
@@ -5828,6 +6299,108 @@ end
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_add_event_handler">
|
||||
<title>add_event_handler</title>
|
||||
|
||||
<para>
|
||||
Prototype Perl :
|
||||
<command>
|
||||
weechat::add_event_handler(évènement, fonction);
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Prototype Python :
|
||||
<command>
|
||||
weechat.add_event_handler(évènement, fonction)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Prototype Ruby :
|
||||
<command>
|
||||
Weechat.add_event_handler(évènement, fonction)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Prototype Lua :
|
||||
<command>
|
||||
weechat.add_event_handler(évènement, fonction)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Ajoute un gestionnaire d'évènement, appelé dès qu'un évènement se
|
||||
produit.
|
||||
</para>
|
||||
<para>
|
||||
Paramètres :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>évènement</option> : évènement
|
||||
(voir <xref linkend="secAPI_event_handler_add" />)
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>fonction</option> : fonction appelée
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Valeur renvoyée : 1 si succès, 0 si une erreur s'est produite.
|
||||
</para>
|
||||
<para>
|
||||
Exemples :
|
||||
<screen>
|
||||
# perl
|
||||
weechat::add_event_handler("buffer_open", "mon_evenement");
|
||||
sub mon_evenement
|
||||
{
|
||||
weechat::print("buffer open");
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
|
||||
# python
|
||||
weechat.add_event_handler("buffer_open", "mon_evenement")
|
||||
def mon_evenement():
|
||||
weechat.prnt("buffer open")
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
# ruby
|
||||
Weechat.add_event_handler("buffer_open", "mon_evenement")
|
||||
def mon_evenement()
|
||||
Weechat.print("buffer open")
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
-- lua
|
||||
weechat.add_event_handler("buffer_open", "mon_evenement")
|
||||
function mon_evenement()
|
||||
weechat.print("buffer open")
|
||||
return weechat.PLUGIN_RC_OK()
|
||||
end
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
Note : la fonction appelée doit renvoyer une des valeurs
|
||||
suivantes :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_KO</literal> : la fonction a échoué
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>PLUGIN_RC_OK</literal> : la fonction a réussi
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_remove_handler">
|
||||
<title>remove_handler</title>
|
||||
|
||||
@@ -6016,6 +6589,67 @@ weechat.remove_keyboard_handler("mon_clavier")
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_remove_event_handler">
|
||||
<title>remove_event_handler</title>
|
||||
|
||||
<para>
|
||||
Prototype Perl :
|
||||
<command>
|
||||
weechat::remove_event_handler(fonction);
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Prototype Python :
|
||||
<command>
|
||||
weechat.remove_event_handler(fonction)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Prototype Ruby :
|
||||
<command>
|
||||
Weechat.remove_event_handler(fonction)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Prototype Lua :
|
||||
<command>
|
||||
weechat.remove_event_handler(fonction)
|
||||
</command>
|
||||
</para>
|
||||
<para>
|
||||
Supprime un gestionnaire d'évènement.
|
||||
</para>
|
||||
<para>
|
||||
Paramètres :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<option>fonction</option> : fonction
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Valeur renvoyée : 1 si succès, 0 si une erreur s'est produite.
|
||||
</para>
|
||||
<para>
|
||||
Exemples :
|
||||
<screen>
|
||||
# perl
|
||||
weechat::remove_event_handler("mon_evenement");
|
||||
|
||||
# python
|
||||
weechat.remove_event_handler("mon_evenement")
|
||||
|
||||
# ruby
|
||||
Weechat.remove_event_handler("mon_evenement")
|
||||
|
||||
-- lua
|
||||
weechat.remove_event_handler("mon_evenement")
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="secScript_add_modifier">
|
||||
<title>add_modifier</title>
|
||||
|
||||
|
||||
+71
-25
@@ -15,7 +15,8 @@ param
|
||||
|
||||
</programlisting>
|
||||
<command>est remplacé par tous les paramètres.</command>
|
||||
<programlisting>
|
||||
<programlisting>Les variables $nick, $channel et $server sont remplacées par le pseudo/canal/serveur courant.
|
||||
|
||||
</programlisting>
|
||||
<command>buffer [action [args] | nombre | [[serveur] [canal]]]</command>
|
||||
<programlisting>
|
||||
@@ -27,9 +28,22 @@ gestion des tampons
|
||||
list: liste les tampons ouverts (pas de paramètre affiche cette liste)
|
||||
notify: fixe le niveau de notification (0=jamais, 1=highlight, 2=1+msg, 3=2+join/part)
|
||||
(quand exécuté sur un tampon serveur, cela fixe le niveau de notification par défaut pour le serveur entier)
|
||||
scroll: fait défiler l'historique (peut être relatif, et peut se terminer par une lettre: s=sec, m=min, h=heure, d=jour, M=mois, y=année); s'il y a seulement une lettre, alors fait défiler jusqu'au début de cet élément
|
||||
|
||||
nombre: saute au tampon qui a ce numéro
|
||||
serveur,
|
||||
canal: saute au tampon par serveur et/ou nom de canal
|
||||
nombre: saute au tampon qui a ce numéro
|
||||
|
||||
Exemples :
|
||||
déplacer tampon: /buffer move 5
|
||||
fermer tampon: /buffer close c'est le message de départ
|
||||
niveau de notif.: /buffer notify 2
|
||||
défiler 1 jour haut: /buffer scroll 1d == /buffer scroll -1d == /buffer scroll -24h
|
||||
défiler au début
|
||||
de ce jour: /buffer scroll d
|
||||
défiler 15 min bas: /buffer scroll +15m
|
||||
défiler 20 msgs haut: /buffer scroll -20
|
||||
aller sur #weechat: /buffer #weechat
|
||||
|
||||
</programlisting>
|
||||
<command>builtin commande</command>
|
||||
@@ -40,24 +54,32 @@ commande: commande
|
||||
|
||||
|
||||
</programlisting>
|
||||
<command>clear [-all]</command>
|
||||
<command>clear [-all | numéro [numéro ...]]</command>
|
||||
<programlisting>
|
||||
effacer la/les fenêtre(s)
|
||||
|
||||
-all: effacer toutes les fenêtres
|
||||
-all: effacer tous les tampons
|
||||
numéro: effacer un tampon par son numéro
|
||||
|
||||
</programlisting>
|
||||
<command>connect [nom_serveur]</command>
|
||||
<command>connect [-all [-nojoin] | nom_serveur [nom_serveur ...] [-nojoin] | nom/IP [-port port] [-ipv6] [-ssl]]</command>
|
||||
<programlisting>
|
||||
se connecter à un serveur
|
||||
se connecter à un/plusieurs serveur(s)
|
||||
|
||||
-all: se reconnecter à tous les serveurs
|
||||
nom_serveur: nom du serveur pour se connecter
|
||||
-nojoin: ne rejoindre aucun canal (même si l'autojoin est activé pour le serveur)
|
||||
nom/IP: nom/IP pour se connecter, en créant un serveur temporaire
|
||||
port: port pour le serveur (nombre entier, 6667 par défaut)
|
||||
ipv6: utiliser le protocole IPv6
|
||||
ssl: utiliser le protocole SSL
|
||||
|
||||
</programlisting>
|
||||
<command>disconnect [nom_serveur]</command>
|
||||
<command>disconnect [-all | nom_serveur [nom_serveur...]]</command>
|
||||
<programlisting>
|
||||
se déconnecter d'un serveur
|
||||
se déconnecter d'un/plusieurs serveur(s)
|
||||
|
||||
-all: se déconnecter de tous les serveurs
|
||||
nom_serveur: nom du serveur pour se déconnecter
|
||||
|
||||
</programlisting>
|
||||
@@ -70,11 +92,12 @@ d
|
||||
fichier: nom du fichier (sur la machine locale)
|
||||
|
||||
</programlisting>
|
||||
<command>debug dump | windows</command>
|
||||
<command>debug dump | buffer | windows</command>
|
||||
<programlisting>
|
||||
affiche des messages de debogage
|
||||
|
||||
dump: affiche les variables mémoire WeeChat dans le fichier log (les mêmes messages sont affichés lorsque WeeChat plante)
|
||||
buffer: affiche le contenu du tampon en valeurs hexadécimales dans le fichier log
|
||||
windows: affiche l'arbre des fenêtres
|
||||
|
||||
</programlisting>
|
||||
@@ -95,9 +118,9 @@ valeur: nombre d'entr
|
||||
</programlisting>
|
||||
<command>ignore [masque [[type | commande] [canal [serveur]]]]</command>
|
||||
<programlisting>
|
||||
ignorer des messages IRC et/ou des masques
|
||||
ignorer des messages IRC et/ou des hôtes
|
||||
|
||||
masque: pseudo ou masque à ignorer
|
||||
masque: pseudo ou hôte à ignorer
|
||||
type: type de message à ignorer (action, ctcp, dcc, pv)
|
||||
commande: commande IRC
|
||||
canal: nom du canal pour le ignore
|
||||
@@ -107,13 +130,14 @@ Pour chaque param
|
||||
Sans paramètres, la commande /ignore liste les ignore définis.
|
||||
|
||||
</programlisting>
|
||||
<command>key [touche [fonction/commande]] [unbind touche] [functions] [reset -yes]</command>
|
||||
<command>key [touche [fonction/commande]] [unbind touche] [functions] [call fonction ["params"]] [reset -yes]</command>
|
||||
<programlisting>
|
||||
associer/libérer des touches
|
||||
|
||||
touche: voir ou associer cette touche à une fonction interne ou une commande (commençant par "/")
|
||||
unbind: supprimer l'association à une touche
|
||||
functions: lister la liste des fonctions internes pour les associations de touches
|
||||
call: appeler une foonction par son nom (avec paramètres optionnels)
|
||||
reset: restaure les touches aux valeurs par défaut et supprime TOUTES les touches personnelles (utiliser avec précaution !)
|
||||
|
||||
</programlisting>
|
||||
@@ -131,13 +155,35 @@ autoload: charger automatiquement les extensions dans un r
|
||||
Sans paramètre, la commande /plugin liste les extensions chargées.
|
||||
|
||||
</programlisting>
|
||||
<command>server [nom_serveur] | [nom_serveur nom/IP port [-auto | -noauto] [-ipv6] [-ssl] [-pwd mot_de_passe] [-nicks pseudo1 pseudo2 pseudo3] [-username nom_utilisateur] [-realname nom_réel] [-command commande] [-autojoin canal[,canal]] ] | [del nom_serveur]</command>
|
||||
<command>reconnect [-all [-nojoin] | nom_serveur [nom_serveur...] [-nojoin]]</command>
|
||||
<programlisting>
|
||||
se reconnecter à un/plusieurs serveur(s)
|
||||
|
||||
-all: se reconnecter à tous les serveurs
|
||||
nom_serveur: nom du serveur pour se reconnecter
|
||||
-nojoin: ne rejoindre aucun canal (même si l'autojoin est activé pour le serveur)
|
||||
|
||||
</programlisting>
|
||||
<command>save [fichier]</command>
|
||||
<programlisting>
|
||||
sauvegarder la configuration sur disque
|
||||
|
||||
fichier: fichier pour sauvegarder la configuration
|
||||
|
||||
</programlisting>
|
||||
<command>server [list [nom_serveur]] | [listfull [nom_serveur]] | [add nom_serveur nom/IP [-port port] [-temp] [-auto | -noauto] [-ipv6] [-ssl] [-pwd mot_de_passe] [-nicks pseudo1 pseudo2 pseudo3] [-username nom_utilisateur] [-realname nom_réel] [-command commande] [-autojoin canal[,canal]] ] | [copy nom_serveur nouveau_nom_serveur] | [rename nom_serveur nouveau_nom_serveur] | [keep nom_serveur] | [del nom_serveur]</command>
|
||||
<programlisting>
|
||||
liste, ajoute ou retire des serveurs
|
||||
|
||||
list: afficher les serveurs (pas de paramètre implique cette liste)
|
||||
listfull: afficher les serveurs avec de l'info détaillée pour chaque
|
||||
add: créer un nouveau serveur
|
||||
nom_serveur: nom du serveur, pour usage interne et affichage
|
||||
nom/IP: nom ou adresse IP du serveur
|
||||
port: port pour le serveur (nombre entier)
|
||||
port: port pour le serveur (nombre entier, 6667 par défaut)
|
||||
temp: créer un serveur temporaire (non sauvé dans le fichier de configuration)
|
||||
auto: se connecter automatiquement au serveur quand WeeChat démarre
|
||||
noauto: ne pas se connecter au serveur quand WeeChat démarre (par défaut)
|
||||
ipv6: utiliser le protocole IPv6
|
||||
ssl: utiliser le protocole SSL
|
||||
mot_de_passe: mot de passe pour le serveur
|
||||
@@ -146,13 +192,11 @@ liste, ajoute ou retire des serveurs
|
||||
pseudo3: second pseudo alternatif pour le serveur
|
||||
nom_utilisateur: nom d'utilisateur
|
||||
nom_réel: nom réel de l'utilisateur
|
||||
|
||||
</programlisting>
|
||||
<command>save [fichier]</command>
|
||||
<programlisting>
|
||||
sauvegarder la configuration sur disque
|
||||
|
||||
fichier: fichier pour sauvegarder la configuration
|
||||
copy: dupliquer un serveur
|
||||
rename: renommer un serveur
|
||||
keep: garder le serveur dans le fichier de configuration (pour les serveurs temporaires seulement)
|
||||
del: supprimer un serveur
|
||||
deloutq: supprimer la file d'attente des messages sortants pour tous les serveurs (tous les messages que WeeChat est actuellement en train d'envoyer)
|
||||
|
||||
</programlisting>
|
||||
<command>set [option [ = valeur]]</command>
|
||||
@@ -184,10 +228,10 @@ nom_alias: nom de l'alias
|
||||
</programlisting>
|
||||
<command>unignore [nombre | [masque [[type | commande] [canal [serveur]]]]]</command>
|
||||
<programlisting>
|
||||
supprimer le ignore des messages IRC et/ou des masques
|
||||
supprimer le ignore des messages IRC et/ou des hôtes
|
||||
|
||||
nombre: numéro de ignore à supprimer (le nombre est affiché sur la liste des ignore)
|
||||
masque: pseudo ou masque à ignorer
|
||||
masque: pseudo ou hôte à ignorer
|
||||
type: type de message à ignorer (action, ctcp, dcc, pv)
|
||||
commande: commande IRC
|
||||
canal: nom du canal pour le ignore
|
||||
@@ -197,11 +241,13 @@ Pour chaque param
|
||||
Sans paramètre, /ignore liste les ignore définis.
|
||||
|
||||
</programlisting>
|
||||
<command>upgrade</command>
|
||||
<command>upgrade [chemin_vers_binaire]</command>
|
||||
<programlisting>
|
||||
mettre à jour WeeChat sans se déconnecter des serveurs
|
||||
|
||||
Cette commande lance à nouveau le binaire WeeChat, il doit donc avoir été compilé ou installé via un gestionnaire de paquet avant de lancer cette commande.
|
||||
chemin_vers_binaire: chemin vers le binaire WeeChat (par défaut le binaire courant)
|
||||
|
||||
Cette commande lance à nouveau un binaire WeeChat, il doit donc avoir été compilé ou installé via un gestionnaire de paquet avant de lancer cette commande.
|
||||
|
||||
</programlisting>
|
||||
<command>uptime [-o]</command>
|
||||
|
||||
@@ -53,11 +53,11 @@ Guide de d
|
||||
Vous pouvez voir les options du serveur et les valeurs avec /set quakenet
|
||||
Pour modifier une option, utilisez /set quakenet.server_option = valeur
|
||||
|
||||
5. Se connecter au serveur et rejoindre les canaux :
|
||||
5. Se connecter au serveur et rejoindre les canaux
|
||||
|
||||
/connect quakenet
|
||||
|
||||
6. Rejoindre/quittre les canaux
|
||||
6. Rejoindre/quitter les canaux
|
||||
|
||||
Joindre un canal :
|
||||
/join #channel
|
||||
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,8 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
LANGCODE = pl
|
||||
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,8 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
LANGCODE = ru
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
LANGCODE = sco
|
||||
QUICKSTART = weechat_quickstart.$(LANGCODE).txt
|
||||
|
||||
EXTRA_DIST = $(QUICKSTART)
|
||||
|
||||
docdir = $(datadir)/doc/$(PACKAGE)
|
||||
|
||||
# install docs
|
||||
|
||||
install-data-hook:
|
||||
$(INSTALL_DATA) $(QUICKSTART) $(DESTDIR)$(docdir)/
|
||||
@@ -0,0 +1,108 @@
|
||||
WeeChat quik stairt guide (Scots version)
|
||||
=========================
|
||||
|
||||
1. Launch weechat
|
||||
|
||||
Accordin tae choosed GUI, ye hav tae launch:
|
||||
- weechat-curses fer Curses GUI
|
||||
- weechat-gtk fer Gtk GUI (under development)
|
||||
- weechat-qt fer Qt GUI (no developed)
|
||||
- weechat-wxwidgets fer WxWidgets GUI (no developed yit)
|
||||
|
||||
2. Online help / options
|
||||
|
||||
WeeChat hus help fer awl commands, jus issu /help
|
||||
Tae get help on a command, issu /help command
|
||||
|
||||
Tae set options, use eh /set option = value
|
||||
Ye can use /set option wi partial name (displ't awl options
|
||||
contain leters), or wi ownly a full option nam wi'oot value
|
||||
(tae see long help fer option).
|
||||
|
||||
Pure Important: settings are saved when WeeChat ends (or wi eh "/save"
|
||||
command). Gonnae NO(!) edit eh setup file whyle WeeChat is running, cause WeeChat
|
||||
may write eh file at 'ne time, and its nae possible tae reload it.
|
||||
Tae chainge any settins, use "/set" command, WeeChat immediately uses new
|
||||
settings.
|
||||
|
||||
3. Create a server
|
||||
|
||||
Fer example irc.quakenet.org, port 6667:
|
||||
/server quakenet irc.quakenet.org 6667
|
||||
(/help server fer ful command help)
|
||||
|
||||
4. Set custom server options
|
||||
|
||||
Nicks:
|
||||
/set quakenet.server_nick1 = "manick"
|
||||
/set quakenet.server_nick2 = "manick2"
|
||||
/set quakenet.server_nick3 = "manick3"
|
||||
|
||||
Username/realname:
|
||||
/set quakenet.server_username = "Ma username"
|
||||
/set quakenet.server_realname = "Ma real name"
|
||||
|
||||
Auto-connect tae server:
|
||||
/set quakenet.server_autoconnect = on
|
||||
|
||||
Auto-join fer sum channels:
|
||||
/set quakenet.server_autojoin = "#chan1,#chan2"
|
||||
|
||||
Other options:
|
||||
Ye can see servers options and values wi /set quakenet
|
||||
Tae set an option, use eh /set quakenet.server_option = value
|
||||
|
||||
5. Connect tae server n auto-join channels:
|
||||
|
||||
/connect quakenet
|
||||
|
||||
6. Join/part channels
|
||||
|
||||
Join a channel:
|
||||
/join #channel
|
||||
Part a channel:
|
||||
/part [quit message]
|
||||
Part a channel n close buffer:
|
||||
/close [quit message]
|
||||
(/close is an alias on /buffer close)
|
||||
|
||||
7. Buffer/window management
|
||||
|
||||
Ye can manage buffers wi "/buffer" command and windows
|
||||
with "/window" command.
|
||||
Fer example, tae split verticaly screen intae a wee windea (1/3 width),
|
||||
n a big yin (2/3), use command:
|
||||
/window splitv 33
|
||||
|
||||
8. Key bindings
|
||||
|
||||
According tae yer keyboard and/or ya needs, ye can rebind 'ne key
|
||||
wi "/key" command.
|
||||
A useful key is meta-k (alt-k) tae find key codes.
|
||||
|
||||
Fer example, tae bind meta-y (alt-y) tae command "/buffer close":
|
||||
/key (press meta-k) (press meta-y) /buffer close
|
||||
|
||||
Ye wull huv a command line like:
|
||||
/key meta-y /buffer close
|
||||
|
||||
9. Plugins/scripts
|
||||
|
||||
On som distros lyke Debian, plugins are available via a separate package
|
||||
(like weechat-plugins).
|
||||
Plugins are automatically loadet when found.
|
||||
Many plugins/scripts are available fer WeeChat, please luk at:
|
||||
http://weechat.flashtux.org/plugins.php
|
||||
Please luk at WeeChat documentation tae load/unload plugins or scripts.
|
||||
|
||||
10. Mer documentation
|
||||
|
||||
Yae can noo use WeeChat and read FAQ/documentation fer any oths questins:
|
||||
http://weechat.flashtux.org/faq.php
|
||||
http://weechat.flashtux.org/doc.php
|
||||
|
||||
Enjoy WeeChat!
|
||||
|
||||
--
|
||||
(c) 2006-05-31, written by FlashCode <flashcode@flashtux.org>, Translate't by AndrewB <andrewb@tuxhacker.org>
|
||||
This document is part of WeeChat and is distributed under GPL licence.
|
||||
@@ -0,0 +1,27 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
LANGCODE = sv
|
||||
QUICKSTART = weechat_quickstart.$(LANGCODE).txt
|
||||
|
||||
EXTRA_DIST = $(QUICKSTART)
|
||||
|
||||
docdir = $(datadir)/doc/$(PACKAGE)
|
||||
|
||||
# install docs
|
||||
|
||||
install-data-hook:
|
||||
$(INSTALL_DATA) $(QUICKSTART) $(DESTDIR)$(docdir)/
|
||||
@@ -0,0 +1,109 @@
|
||||
WeeChat snabb start guide (svensk version)
|
||||
=========================
|
||||
|
||||
1. Starta weechat
|
||||
|
||||
Beroende på vald GUI, måste du starta:
|
||||
- weechat-curses för Curses GUI
|
||||
- weechat-gtk för Gtk GUI (under utveckling)
|
||||
- weechat-qt för Qt GUI (inte utvecklad)
|
||||
- weechat-wxwidgets för WxWidgets GUI (inte utvecklad)
|
||||
|
||||
2. Online hjälp / inställningar
|
||||
|
||||
WeeChat har hjälp för alla kommandon, skriv /help för mer information.
|
||||
För att få hjälp med ett kommando, skriv /help kommando.
|
||||
|
||||
För att ställa in inställningarna, använd /set inställning = värde,
|
||||
t ex. /set col_nick_self = white (ändrar ditt namn till färgen vit.)
|
||||
Du kan använda /set inställning med partial namn (visar alla inställningar
|
||||
som innehåller bokstäver), eller bara en inställning utan ett värde
|
||||
(för att se mer information om den specifika inställningen, t ex. /set col_nick_self.)
|
||||
|
||||
Viktigt: inställningar sparas när WeeChat avlutas (eller med "/save"
|
||||
kommando). Redigera INTE setup filen medans WeeChat körs, därför WeeChat
|
||||
kan skriva i denna fil när som helst, och det är inte möjligt att ladda om den.
|
||||
För att ändra inställingar, använd "/set" kommandot, WeeChat använder då
|
||||
direkt de nya inställningarna.
|
||||
|
||||
3. Skapa en server
|
||||
|
||||
Till exempel irc.quakenet.org, port 6667:
|
||||
/server quakenet irc.quakenet.org 6667
|
||||
(/help server för full kommando hjälp)
|
||||
|
||||
4. Server inställningar
|
||||
|
||||
Smeknamn:
|
||||
/set quakenet.server_nick1 = "mynick"
|
||||
/set quakenet.server_nick2 = "mynick2"
|
||||
/set quakenet.server_nick3 = "mynick3"
|
||||
|
||||
Användarnamn/Riktigt namn:
|
||||
/set quakenet.server_username = "Mitt användarnamn"
|
||||
/set quakenet.server_realname = "Mtt riktiga namn"
|
||||
|
||||
Automatiskt ansluta till server:
|
||||
/set quakenet.server_autoconnect = on
|
||||
|
||||
Automatiskt joina en/flera kanaler:
|
||||
/set quakenet.server_autojoin = "#chan1,#chan2"
|
||||
|
||||
Andra inställningar:
|
||||
Du kan see server inställningar and värden med /set quakenet
|
||||
För att ställa in en inställning, använd /set quakenet.server_inställning = värde
|
||||
|
||||
5. Ansluta till en server och automatiskt joina kanaler:
|
||||
|
||||
/connect quakenet
|
||||
|
||||
6. Joina/parta en kanal:
|
||||
|
||||
Joina en kanal:
|
||||
/join #kanal
|
||||
Parta en kanal:
|
||||
/part [quit message]
|
||||
Parta en kanal och stäng buffer:
|
||||
/close [quit message]
|
||||
(/close är ett alias av /buffer close)
|
||||
|
||||
7. Buffer/fönster management
|
||||
|
||||
Du kan ta hand om buffers med "/buffer" kommandot och fönster
|
||||
med "/window" kommandot.
|
||||
Till exempel, För att dela fönstret till ett litet fönster (1/3 bred),
|
||||
och ett stort (2/3), använd kommandot:
|
||||
/window splitv 33
|
||||
|
||||
8. Knapp 'binding'
|
||||
|
||||
Beroende på ditt tangentbord och/eller dina behov, kan du binda varje tangentknapp
|
||||
med "/key" kommandot.
|
||||
|
||||
Till exempel, för att binda meta-y (alt-y) till kommandot "/buffer close":
|
||||
/key (tryck meta-k) (tryck meta-y) /buffer close
|
||||
Du borde ha en kommando rad som denna:
|
||||
/key meta-y /buffer close
|
||||
|
||||
9. Plugins/skripts
|
||||
|
||||
På vissa distributioner såsom Debian, är plugins tillgängliga via ett separat paket
|
||||
(som weechat-plugins).
|
||||
Plugins är automatiskt laddad när det har hittats.
|
||||
Det finns många plugins/skripts tillgängliga för WeeChat, Kolla:
|
||||
http://weechat.flashtux.org/plugins.php
|
||||
Kolla även WeeChat's dokumentering för att ladda/'unloada' plugins eller skripts..
|
||||
|
||||
10. Mer dokumentation
|
||||
|
||||
Du kan nu använda WeeChat och läsa FAQ/dokumentation för övriga frågor:
|
||||
http://weechat.flashtux.org/faq.php
|
||||
http://weechat.flashtux.org/doc.php
|
||||
|
||||
Njut av WeeChat!
|
||||
|
||||
--
|
||||
(c) 2006-05-31, skrivet av FlashCode <flashcode@flashtux.org>
|
||||
2007-08-09, översatt till svenska av Robin Karlsson <Robin--Karlsson@bredband.net>
|
||||
Det här dokumentet är en del av WeeChat och är distribuerad under GPL
|
||||
licens.
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH WEECHAT 1 "January 2007" "FlashCode"
|
||||
.TH WEECHAT 1 "September 2007" "FlashCode"
|
||||
|
||||
.SH NAME
|
||||
weechat-curses \- Wee Enhanced Environment for Chat (Curses version)
|
||||
@@ -14,7 +14,7 @@ or
|
||||
Fast, light and extensible IRC client for many operating systems.
|
||||
.br
|
||||
Everything can be done with a keyboard. It is customizable and extensible with scripts.
|
||||
Many GUIs are available (Curses, Gtk, Qt, and text).
|
||||
Many GUIs are or will be available (Curses, Gtk and Qt).
|
||||
It is compliant with RFCs 1459, 2810, 2811, 2812, and 2813.
|
||||
|
||||
.SH OPTIONS
|
||||
@@ -85,7 +85,7 @@ WeeChat is written by FlashCode <flashcode@flashtux.org>
|
||||
.br
|
||||
WeeChat on the web:
|
||||
.UR
|
||||
http://weechat.flashtux.org
|
||||
http://weechat.flashtux.org/
|
||||
.br
|
||||
Get support there:
|
||||
.UR
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
SET(PO_FILES
|
||||
fr.po
|
||||
es.po
|
||||
cs.po
|
||||
hu.po
|
||||
de.po
|
||||
ru.po
|
||||
)
|
||||
|
||||
SET(COPYRIGHT_HOLDER "WeeChat Team")
|
||||
SET(BUGS_ADDRESS "flashcode@flashtux.org")
|
||||
SET(POT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pot)
|
||||
|
||||
INCLUDE(srcfiles.cmake)
|
||||
|
||||
# Looking for xgettext, msgmerge and msgfmt
|
||||
FIND_PROGRAM(XGETTEXT_EXECUTABLE xgettext)
|
||||
FIND_PROGRAM(MSGMERGE_EXECUTABLE msgmerge)
|
||||
FIND_PROGRAM(MSGFMT_EXECUTABLE msgfmt)
|
||||
|
||||
IF(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
|
||||
|
||||
# Create PO template file weechat.pot
|
||||
SET(SRC_FILES)
|
||||
SET(POT_DEPENDS)
|
||||
|
||||
FOREACH(srcfile ${WEECHAT_SOURCES})
|
||||
SET(SRC_FILES ${SRC_FILES} ${srcfile})
|
||||
SET(POT_DEPENDS ${POT_DEPENDS} ${CMAKE_SOURCE_DIR}/${srcfile})
|
||||
ENDFOREACH(srcfile ${WEECHAT_SOURCES})
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${POT_FILE}
|
||||
COMMAND ${XGETTEXT_EXECUTABLE}
|
||||
ARGS -o ${POT_FILE} --keyword='_' --keyword='N_' --directory=${CMAKE_SOURCE_DIR} --omit-header --msgid-bugs-address=${BUGS_ADDRESS} --copyright-holder=${COPYRIGHT_HOLDER} ${SRC_FILES}
|
||||
DEPENDS ${POT_DEPENDS}
|
||||
COMMENT "Generating PO template file"
|
||||
)
|
||||
|
||||
# Update .po files and compile them to binary .gmo files
|
||||
|
||||
SET(GMO_FILES)
|
||||
FOREACH(pofile ${PO_FILES})
|
||||
GET_FILENAME_COMPONENT(polang ${pofile} NAME_WE)
|
||||
|
||||
SET(gmofile ${CMAKE_CURRENT_BINARY_DIR}/${polang}.gmo)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${gmofile}
|
||||
COMMAND ${MSGMERGE_EXECUTABLE} ARGS --quiet -s -o ${CMAKE_CURRENT_BINARY_DIR}/${pofile} ${CMAKE_CURRENT_SOURCE_DIR}/${pofile} ${POT_FILE}
|
||||
COMMAND ${MSGFMT_EXECUTABLE} ARGS -o ${gmofile} ${CMAKE_CURRENT_BINARY_DIR}/${pofile}
|
||||
DEPENDS ${POT_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}
|
||||
COMMENT "Compiling locales (${polang})"
|
||||
)
|
||||
|
||||
INSTALL(FILES ${gmofile} DESTINATION share/locale/${polang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
|
||||
SET(GMO_FILES ${GMO_FILES} ${gmofile})
|
||||
ENDFOREACH(pofile ${PO_FILES})
|
||||
ADD_CUSTOM_TARGET(translations ALL DEPENDS ${GMO_FILES})
|
||||
|
||||
ENDIF(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
DOMAIN = $(PACKAGE)
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=NG_:1,2
|
||||
COPYRIGHT_HOLDER =
|
||||
EXTRA_LOCALE_CATEGORIES =
|
||||
MSGID_BUGS_ADDRESS = flashcode@flashtux.org
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
SET(WEECHAT_SOURCES
|
||||
src/irc/irc-mode.c
|
||||
src/irc/irc-nick.c
|
||||
src/irc/irc-server.c
|
||||
src/irc/irc-channel.c
|
||||
src/irc/irc-commands.c
|
||||
src/irc/irc-display.c
|
||||
src/irc/irc-send.c
|
||||
src/irc/irc-recv.c
|
||||
src/irc/irc-dcc.c
|
||||
src/irc/irc-ignore.c
|
||||
src/irc/irc.h
|
||||
src/plugins/plugins.c
|
||||
src/plugins/plugins.h
|
||||
src/plugins/plugins-config.c
|
||||
src/plugins/plugins-config.h
|
||||
src/plugins/plugins-interface.c
|
||||
src/plugins/weechat-plugin.h
|
||||
src/gui/curses/gui-curses-chat.c
|
||||
src/gui/curses/gui-curses-color.c
|
||||
src/gui/curses/gui-curses-infobar.c
|
||||
src/gui/curses/gui-curses-input.c
|
||||
src/gui/curses/gui-curses-keyboard.c
|
||||
src/gui/curses/gui-curses-main.c
|
||||
src/gui/curses/gui-curses-nicklist.c
|
||||
src/gui/curses/gui-curses-panel.c
|
||||
src/gui/curses/gui-curses-status.c
|
||||
src/gui/curses/gui-curses-window.c
|
||||
src/gui/curses/gui-curses.h
|
||||
src/gui/gtk/gui-gtk-chat.c
|
||||
src/gui/gtk/gui-gtk-color.c
|
||||
src/gui/gtk/gui-gtk-infobar.c
|
||||
src/gui/gtk/gui-gtk-input.c
|
||||
src/gui/gtk/gui-gtk-keyboard.c
|
||||
src/gui/gtk/gui-gtk-main.c
|
||||
src/gui/gtk/gui-gtk-nicklist.c
|
||||
src/gui/gtk/gui-gtk-panel.c
|
||||
src/gui/gtk/gui-gtk-status.c
|
||||
src/gui/gtk/gui-gtk-window.c
|
||||
src/gui/gtk/gui-gtk.h
|
||||
src/gui/gui-action.c
|
||||
src/gui/gui-buffer.c
|
||||
src/gui/gui-common.c
|
||||
src/gui/gui-keyboard.c
|
||||
src/gui/gui-log.c
|
||||
src/gui/gui-panel.c
|
||||
src/gui/gui-window.c
|
||||
src/gui/gui.h
|
||||
src/gui/gui-buffer.h
|
||||
src/gui/gui-color.h
|
||||
src/gui/gui-keyboard.h
|
||||
src/gui/gui-panel.h
|
||||
src/gui/gui-window.h
|
||||
src/common/alias.c
|
||||
src/common/alias.h
|
||||
src/common/backtrace.c
|
||||
src/common/backtrace.h
|
||||
src/common/command.c
|
||||
src/common/command.h
|
||||
src/common/completion.c
|
||||
src/common/completion.h
|
||||
src/common/fifo.c
|
||||
src/common/fifo.h
|
||||
src/common/history.c
|
||||
src/common/history.h
|
||||
src/common/hotlist.c
|
||||
src/common/hotlist.h
|
||||
src/common/log.c
|
||||
src/common/log.h
|
||||
src/common/session.c
|
||||
src/common/session.h
|
||||
src/common/utf8.c
|
||||
src/common/utf8.h
|
||||
src/common/util.c
|
||||
src/common/util.h
|
||||
src/common/weechat.c
|
||||
src/common/weechat.h
|
||||
src/common/weeconfig.c
|
||||
src/common/weeconfig.h
|
||||
src/common/weelist.c
|
||||
src/common/weelist.h
|
||||
)
|
||||
+1577
-1276
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# Copyright (c) 2006 by FlashCode <flashcode@flashtux.org>
|
||||
# Copyright (c) 2006-2007 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,22 +12,22 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# Speaker beep on highlight/private msg.
|
||||
#
|
||||
# History:
|
||||
#
|
||||
# 2007-08-10, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.2: upgraded licence to GPL 3
|
||||
# 2006-09-02, FlashCode <flashcode@flashtux.org>:
|
||||
# initial release
|
||||
# version 0.1: initial release
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $version = "0.1";
|
||||
my $version = "0.2";
|
||||
my $beep_command = "echo -n \a";
|
||||
|
||||
# default values in setup file (~/.weechat/plugins.rc)
|
||||
|
||||
+10
-7
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# Copyright (c) 2006 by FlashCode <flashcode@flashtux.org>
|
||||
# Copyright (c) 2006-2007 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,8 +12,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
@@ -21,20 +20,24 @@
|
||||
#
|
||||
# History:
|
||||
#
|
||||
# 2007-08-10, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.3: upgraded licence to GPL 3
|
||||
# 2007-06-12, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.2: added filename completion
|
||||
# 2006-10-27, FlashCode <flashcode@flashtux.org>:
|
||||
# initial release
|
||||
# version 0.1: initial release
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $version = "0.1";
|
||||
my $version = "0.3";
|
||||
|
||||
weechat::register("bufsave", $version, "", "Save buffer content to a file");
|
||||
weechat::add_command_handler("bufsave", "bufsave_cmd",
|
||||
"save current buffer to a file",
|
||||
"filename",
|
||||
"filename: target file (must not exist)",
|
||||
"");
|
||||
"%f");
|
||||
|
||||
sub bufsave_cmd
|
||||
{
|
||||
|
||||
+81
-81
@@ -1,123 +1,123 @@
|
||||
# =============================================================================
|
||||
# Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
# Copyright (c) 2003-2007 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# fete.pl (c) Décembre 2003 par FlashCode <flashcode@flashtux.org>
|
||||
# Mis à jour le 04/06/2005, FlashCode <flashcode@flashtux.org>
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# fete.pl (c) December 2003 by FlashCode <flashcode@flashtux.org>
|
||||
# Updated on 2007-08-10 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# Manages french calendat feasts with "/fete" command
|
||||
# Syntax: /fete - display today's and tomorrow's feast
|
||||
# /fete firstname - search for name in calendar
|
||||
#
|
||||
# Gestion des fêtes du calendrier français avec la commande "/fete"
|
||||
# Syntaxe: /fete - affiche la fête du jour et du lendemain
|
||||
# /fete prenom - cherche un prénom dans le calendrier
|
||||
# =============================================================================
|
||||
|
||||
use locale;
|
||||
|
||||
my $version = "0.4";
|
||||
weechat::register ("Fete", $version, "", "Gestion des fêtes du calendrier français");
|
||||
weechat::print ("Script 'Fete' $version chargé");
|
||||
my $version = "0.7";
|
||||
|
||||
weechat::register ("Fete", $version, "", "Gestion des fêtes du calendrier français", "UTF-8");
|
||||
weechat::print ("Script 'Fete' $version chargé");
|
||||
weechat::add_command_handler ("fete", fete);
|
||||
|
||||
@noms_jours = qw(Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi);
|
||||
@noms_mois = qw(Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre);
|
||||
@noms_mois = qw(Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre);
|
||||
@fetes = (
|
||||
# janvier
|
||||
[ '!Marie - JOUR de l\'AN', '&Basile', '!Geneviève', '&Odilon', '&Edouard',
|
||||
'&Mélaine', '&Raymond', '&Lucien', '!Alix', '&Guillaume', '&Paulin',
|
||||
'!Tatiana', '!Yvette', '!Nina', '&Rémi', '&Marcel', '!Roseline',
|
||||
'!Prisca', '&Marius', '&Sébastien', '!Agnès', '&Vincent', '&Barnard',
|
||||
'&François de Sales', '-Conversion de St Paul', '!Paule', '!Angèle',
|
||||
[ '!Marie - JOUR de l\'AN', '&Basile', '!Geneviève', '&Odilon', '&Edouard',
|
||||
'&Mélaine', '&Raymond', '&Lucien', '!Alix', '&Guillaume', '&Paulin',
|
||||
'!Tatiana', '!Yvette', '!Nina', '&Rémi', '&Marcel', '!Roseline',
|
||||
'!Prisca', '&Marius', '&Sébastien', '!Agnès', '&Vincent', '&Barnard',
|
||||
'&François de Sales', '-Conversion de St Paul', '!Paule', '!Angèle',
|
||||
'&Thomas d\'Aquin', '&Gildas', '!Martine', '!Marcelle' ],
|
||||
# février
|
||||
[ '!Ella', '-Présentation', '&Blaise', '!Véronique', '!Agathe',
|
||||
'&Gaston', '!Eugénie', '!Jacqueline', '!Apolline', '&Arnaud',
|
||||
'-Notre-Dame de Lourdes', '&Félix', '!Béatrice', '&Valentin', '&Claude',
|
||||
'!Julienne', '&Alexis', '!Bernadette', '&Gabin', '!Aimée',
|
||||
'&Pierre Damien', '!Isabelle', '&Lazare', '&Modeste', '&Roméo', '&Nestor',
|
||||
# février
|
||||
[ '!Ella', '-Présentation', '&Blaise', '!Véronique', '!Agathe',
|
||||
'&Gaston', '!Eugénie', '!Jacqueline', '!Apolline', '&Arnaud',
|
||||
'-Notre-Dame de Lourdes', '&Félix', '!Béatrice', '&Valentin', '&Claude',
|
||||
'!Julienne', '&Alexis', '!Bernadette', '&Gabin', '!Aimée',
|
||||
'&Pierre Damien', '!Isabelle', '&Lazare', '&Modeste', '&Roméo', '&Nestor',
|
||||
'!Honorine', '&Romain', '&Auguste' ],
|
||||
# mars
|
||||
[ '&Aubin', '&Charles le Bon', '&Guénolé', '&Casimir', '&Olive', '&Colette',
|
||||
'!Félicité', '&Jean de Dieu', '!Françoise', '&Vivien', '!Rosine',
|
||||
'!Justine', '&Rodrigue', '!Mathilde', '!Louise de Marillac', '!Bénédicte',
|
||||
'&Patrice', '&Cyrille', '&Joseph', '&Herbert', '!Clémence', '!Léa',
|
||||
'&Victorien', '!Catherine de Suède', '-Annonciation', '!Larissa',
|
||||
'&Habib', '&Gontran', '!Gwladys', '&Amédée', '&Benjamin' ],
|
||||
[ '&Aubin', '&Charles le Bon', '&Guénolé', '&Casimir', '&Olive', '&Colette',
|
||||
'!Félicité', '&Jean de Dieu', '!Françoise', '&Vivien', '!Rosine',
|
||||
'!Justine', '&Rodrigue', '!Mathilde', '!Louise de Marillac', '!Bénédicte',
|
||||
'&Patrice', '&Cyrille', '&Joseph', '&Herbert', '!Clémence', '!Léa',
|
||||
'&Victorien', '!Catherine de Suède', '-Annonciation', '!Larissa',
|
||||
'&Habib', '&Gontran', '!Gwladys', '&Amédée', '&Benjamin' ],
|
||||
# avril
|
||||
[ '&Hugues', '!Sandrine', '&Richard', '&Isodore', '!Irène', '&Marcellin',
|
||||
[ '&Hugues', '!Sandrine', '&Richard', '&Isodore', '!Irène', '&Marcellin',
|
||||
'&Jean-Baptiste de la Salle', '!Julie', '&Gautier', '&Fulbert',
|
||||
'&Stanislas', '&Jules', '!Ida', '&Maxime', '&Paterne',
|
||||
'&Benoît-Joseph Labre', '&Anicet', '&Parfait', '!Emma', '!Odette',
|
||||
'&Anselme', '&Alexandre', '&Georges', '&Fidèle', '&Marc', '!Alida',
|
||||
'!Zita', '!Valérie', '!Catherine de Sienne', '&Robert' ],
|
||||
'&Benoît-Joseph Labre', '&Anicet', '&Parfait', '!Emma', '!Odette',
|
||||
'&Anselme', '&Alexandre', '&Georges', '&Fidèle', '&Marc', '!Alida',
|
||||
'!Zita', '!Valérie', '!Catherine de Sienne', '&Robert' ],
|
||||
# mai
|
||||
[ '&Jérémie - FETE du TRAVAIL', '&Boris', '&Philippe / Jacques', '&Sylvain',
|
||||
'!Judith', '!Prudence', '!Gisèle', '&Désiré - ANNIVERSAIRE 1945',
|
||||
'&Pacôme', '!Solange', '!Estelle', '&Achille', '!Rolande', '&Mathias',
|
||||
'!Denise', '&Honoré', '&Pascal', '&Eric', '&Yves', '&Bernardin',
|
||||
'&Constantin', '&Emile', '&Didier', '&Donatien', '!Sophie', '&Bérenger',
|
||||
[ '&Jérémie - FETE du TRAVAIL', '&Boris', '&Philippe / Jacques', '&Sylvain',
|
||||
'!Judith', '!Prudence', '!Gisèle', '&Désiré - ANNIVERSAIRE 1945',
|
||||
'&Pacôme', '!Solange', '!Estelle', '&Achille', '!Rolande', '&Mathias',
|
||||
'!Denise', '&Honoré', '&Pascal', '&Eric', '&Yves', '&Bernardin',
|
||||
'&Constantin', '&Emile', '&Didier', '&Donatien', '!Sophie', '&Bérenger',
|
||||
'&Augustin', '&Germain', '&Aymar', '&Ferdinand', '-Visitation' ],
|
||||
# juin
|
||||
[ '&Justin', '!Blandine', '&Kévin', '!Clotilde', '&Igor', '&Norbert',
|
||||
'&Gilbert', '&Médard', '!Diane', '&Landry', '&Barnabé', '&Guy',
|
||||
'&Antoine de Padoue', '&Elisée', '!Germaine', '&Jean-François Régis',
|
||||
'&Hervé', '&Léonce', '&Romuald', '&Silvère', '&Rodolphe', '&Alban',
|
||||
[ '&Justin', '!Blandine', '&Kévin', '!Clotilde', '&Igor', '&Norbert',
|
||||
'&Gilbert', '&Médard', '!Diane', '&Landry', '&Barnabé', '&Guy',
|
||||
'&Antoine de Padoue', '&Elisée', '!Germaine', '&Jean-François Régis',
|
||||
'&Hervé', '&Léonce', '&Romuald', '&Silvère', '&Rodolphe', '&Alban',
|
||||
'!Audrey', '&Jean-Baptiste', '&Salomon', '&Anthelme', '&Fernand',
|
||||
'&Irénée', '&Pierre / Paul', '&Martial' ],
|
||||
'&Irénée', '&Pierre / Paul', '&Martial' ],
|
||||
# juillet
|
||||
[ '&Thierry', '&Martinien', '&Thomas', '&Florent', '&Antoine', '!Mariette',
|
||||
'&Raoul', '&Thibaut', '!Amandine', '&Ulrich', '&Benoît', '&Olivier',
|
||||
'&Henri / Joël', '!Camille - FETE NATIONALE', '&Donald',
|
||||
'-N.D. du Mont Carmel', '!Charlotte', '&Frédéric', '&Arsène', '!Marina',
|
||||
'&Raoul', '&Thibaut', '!Amandine', '&Ulrich', '&Benoît', '&Olivier',
|
||||
'&Henri / Joël', '!Camille - FETE NATIONALE', '&Donald',
|
||||
'-N.D. du Mont Carmel', '!Charlotte', '&Frédéric', '&Arsène', '!Marina',
|
||||
'&Victor', '!Marie-Madeleine', '!Brigitte', '!Christine', '&Jacques',
|
||||
'&Anne', '!Nathalie', '&Samson', '!Marthe', '!Juliette',
|
||||
'&Ignace de Loyola' ],
|
||||
# août
|
||||
# août
|
||||
[ '&Alphonse', '&Julien', '!Lydie', '&Jean-Marie Vianney', '&Abel',
|
||||
'-Transfiguration', '&Gaëtan', '&Dominique', '&Amour', '&Laurent',
|
||||
'-Transfiguration', '&Gaëtan', '&Dominique', '&Amour', '&Laurent',
|
||||
'!Claire', '!Clarisse', '&Hippolyte', '&Evrard',
|
||||
'!Marie - ASSOMPTION', '&Armel', '&Hyacinthe', '!Hélène', '&Jean Eudes',
|
||||
'&Bernard', '&Christophe', '&Fabrice', '!Rose de Lima', '&Barthélémy',
|
||||
'!Marie - ASSOMPTION', '&Armel', '&Hyacinthe', '!Hélène', '&Jean Eudes',
|
||||
'&Bernard', '&Christophe', '&Fabrice', '!Rose de Lima', '&Barthélémy',
|
||||
'&Louis', '!Natacha', '!Monique', '&Augustin', '!Sabine', '&Fiacre',
|
||||
'&Aristide' ],
|
||||
# septembre
|
||||
[ '&Gilles', '!Ingrid', '&Grégoire', '!Rosalie', '!Raïssa', '&Bertrand',
|
||||
'!Reine', '-Nativité de Marie', '&Alain', '!Inès', '&Adelphe',
|
||||
'&Apollinaire', '&Aimé', '-La Ste Croix', '&Roland', '!Edith', '&Renaud',
|
||||
'!Nadège', '!Emilie', '&Davy', '&Matthieu', '&Maurice', '&Constant',
|
||||
'!Thècle', '&Hermann', '&Côme / Damien', '&Vincent de Paul', '&Venceslas',
|
||||
'&Michel / Gabriel', '&Jérôme' ],
|
||||
[ '&Gilles', '!Ingrid', '&Grégoire', '!Rosalie', '!Raïssa', '&Bertrand',
|
||||
'!Reine', '-Nativité de Marie', '&Alain', '!Inès', '&Adelphe',
|
||||
'&Apollinaire', '&Aimé', '-La Ste Croix', '&Roland', '!Edith', '&Renaud',
|
||||
'!Nadège', '!Emilie', '&Davy', '&Matthieu', '&Maurice', '&Constant',
|
||||
'!Thècle', '&Hermann', '&Côme / Damien', '&Vincent de Paul', '&Venceslas',
|
||||
'&Michel / Gabriel', '&Jérôme' ],
|
||||
# octobre
|
||||
[ '!Thérèse de l\'Enfant Jésus', '&Léger', '&Gérard', '&François d\'Assise',
|
||||
'!Fleur', '&Bruno', '&Serge', '!Pélagie', '&Denis', '&Ghislain', '&Firmin',
|
||||
'&Wilfried', '&Géraud', '&Juste', '!Thérèse d\'Avila', '!Edwige',
|
||||
'&Baudouin', '&Luc', '&René', '!Adeline', '!Céline', '!Elodie',
|
||||
'&Jean de Capistran', '&Florentin', '&Crépin', '&Dimitri', '!Emeline',
|
||||
[ '!Thérèse de l\'Enfant Jésus', '&Léger', '&Gérard', '&François d\'Assise',
|
||||
'!Fleur', '&Bruno', '&Serge', '!Pélagie', '&Denis', '&Ghislain', '&Firmin',
|
||||
'&Wilfried', '&Géraud', '&Juste', '!Thérèse d\'Avila', '!Edwige',
|
||||
'&Baudouin', '&Luc', '&René', '!Adeline', '!Céline', '!Elodie',
|
||||
'&Jean de Capistran', '&Florentin', '&Crépin', '&Dimitri', '!Emeline',
|
||||
'&Simon / Jude', '&Narcisse', '!Bienvenue', '&Quentin' ],
|
||||
# novembre
|
||||
[ '&Harold - TOUSSAINT', '-Défunts', '&Hubert', '&Charles', '!Sylvie',
|
||||
'!Bertille', '!Carine', '&Geoffroy', '&Théodore', '&Léon',
|
||||
[ '&Harold - TOUSSAINT', '-Défunts', '&Hubert', '&Charles', '!Sylvie',
|
||||
'!Bertille', '!Carine', '&Geoffroy', '&Théodore', '&Léon',
|
||||
'&Martin - ARMISTICE 1918', '&Christian', '&Brice', '&Sidoine', '&Albert',
|
||||
'!Marguerite', '!Elisabeth', '!Aude', '&Tanguy', '&Edmond',
|
||||
'-Présentation de Marie', '!Cécile', '&Clément', '!Flora', '!Catherine',
|
||||
'!Delphine', '&Séverin', '&Jacques de la Marche', '&Saturnin', '&André' ],
|
||||
# décembre
|
||||
[ '!Florence', '!Viviane', '&Xavier', '!Barbara', '&Gérald', '&Nicolas',
|
||||
'&Ambroise', '-Immaculée Conception', '&Pierre Fourier', '&Romaric',
|
||||
'-Présentation de Marie', '!Cécile', '&Clément', '!Flora', '!Catherine',
|
||||
'!Delphine', '&Séverin', '&Jacques de la Marche', '&Saturnin', '&André' ],
|
||||
# décembre
|
||||
[ '!Florence', '!Viviane', '&Xavier', '!Barbara', '&Gérald', '&Nicolas',
|
||||
'&Ambroise', '-Immaculée Conception', '&Pierre Fourier', '&Romaric',
|
||||
'&Daniel', '!Jeanne de Chantal', '!Lucie', '!Odile', '!Ninon', '!Alice',
|
||||
'&Gaël', '&Gatien', '&Urbain', '&Abraham', '&Pierre Canisius',
|
||||
'!Françoise-Xavier', '&Armand', '!Adèle', '&Emmanuel - NOEL', '&Etienne',
|
||||
'&Gaël', '&Gatien', '&Urbain', '&Abraham', '&Pierre Canisius',
|
||||
'!Françoise-Xavier', '&Armand', '!Adèle', '&Emmanuel - NOEL', '&Etienne',
|
||||
'&Jean', '-Sts Innocents', '&David', '&Roger', '&Sylvestre' ],
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
# growl-notify.pl -- Have Weechat send notifications thru Mac::Growl
|
||||
# Copyright (c) 2007 Zak B. Elep <zakame@spunge.org>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
use strict;
|
||||
|
||||
use Mac::Growl;
|
||||
|
||||
my $app = 'Weechat (Curses)';
|
||||
my @messages_events = (
|
||||
[ nick => 'Changed Nick', '$nick has changed nick to $text' ],
|
||||
[ join => 'Joined Room', '$nick has joined $text' ],
|
||||
[ part => 'Left Room', '$nick has left $channel($text)' ],
|
||||
[ quit => 'Quit', '$nick has quit($text)' ],
|
||||
[ topic => 'Set Topic', '$nick has set topic to \'$text\'' ],
|
||||
[ weechat_highlight => 'Highlight Mentioned', '$text in $channel' ],
|
||||
[ weechat_pv => 'Private Message', '$nick: $text' ],
|
||||
);
|
||||
my $notes;
|
||||
push @$notes, $_->[1] foreach @messages_events;
|
||||
|
||||
Mac::Growl::RegisterNotifications $app, $notes, $notes;
|
||||
|
||||
my $version = '0.2';
|
||||
weechat::register 'growl-notify', $version, '',
|
||||
'Send Weechat notifications thru Mac::Growl';
|
||||
|
||||
for my $message (@messages_events) {
|
||||
no strict 'refs'; # access symbol table
|
||||
my $subname = join '', __PACKAGE__, '::handler_', $message->[0];
|
||||
*{$subname} = sub
|
||||
{
|
||||
my($server, $args) = @_;
|
||||
# weechat::print $args;
|
||||
my($mask, $nick, $channel, $text);
|
||||
(undef, $channel, $text) = split /:/, $args, 3;
|
||||
($mask, undef, $channel) = split / /, $channel;
|
||||
($nick, undef) = split /!/, $mask;
|
||||
Mac::Growl::PostNotification $app, $message->[1],
|
||||
$message->[1], eval qq("$message->[2]"),
|
||||
($message->[0] =~ /(pv|highlight)/ ? 1 : 0);
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
};
|
||||
weechat::add_message_handler $message->[0], $subname;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
growl-notify.pl - Send Weechat notifications thru the Growl framework for Mac
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
# in Weechat console, do
|
||||
/perl load /path/to/growl-notify.pl
|
||||
|
||||
# or put script in .weechat/perl/autoload/
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
growl-notify is a script plugin for Weechat that sends notifications of common
|
||||
IRC events (such as joins, highlights, and private messages) to the Growl
|
||||
notification framework for the Macintosh. It uses the perl module L<Mac::Growl>
|
||||
to do its magic, even allowing the ncurses version of Weechat to generate
|
||||
graphical or audible event notifications.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<http://growl.info>, L<Mac::Growl>, L<http://weechat.flashtux.org>
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Zak B. Elep, C<< zakame at spunge.org >>
|
||||
|
||||
=cut
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
#
|
||||
# Copyright (c) 2007 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# Save/restore buffers layout.
|
||||
#
|
||||
# History:
|
||||
#
|
||||
# 2007-08-10, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.2, minor changes in script description
|
||||
# 2007-08-10, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.1, initial release
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $version = "0.2";
|
||||
|
||||
# default values in setup file (~/.weechat/plugins.rc)
|
||||
my $default_auto_save = "on";
|
||||
|
||||
weechat::register("layout", $version, "unload_layout", "Save/restore buffers layout");
|
||||
weechat::set_plugin_config("auto_save", $default_auto_save) if (weechat::get_plugin_config("auto_save") eq "");
|
||||
|
||||
weechat::add_command_handler("layout", "layout",
|
||||
"save/restore buffers layout",
|
||||
"[save]",
|
||||
"save: save buffers order",
|
||||
"save");
|
||||
weechat::add_event_handler("buffer_open", "buffer_open");
|
||||
|
||||
|
||||
# get buffer name, depending on type of buffer
|
||||
|
||||
sub get_buffer_name
|
||||
{
|
||||
# DCC type ?
|
||||
return "<DCC>" if ($_[0] eq "1");
|
||||
|
||||
# RAW IRC type ?
|
||||
return "<RAW>" if ($_[0] eq "2");
|
||||
|
||||
# no channel ?
|
||||
if ($_[2] eq "")
|
||||
{
|
||||
return "<servers>" if (weechat::get_config("look_one_server_buffer") eq "on");
|
||||
return "<empty>" if ($_[1] eq "");
|
||||
return $_[1];
|
||||
}
|
||||
|
||||
# return server/channel
|
||||
return $_[1]."/".$_[2];
|
||||
}
|
||||
|
||||
# get buffer list and build a hash: number => name
|
||||
|
||||
sub get_layout_hash
|
||||
{
|
||||
my %buflist;
|
||||
my $bufinfo = weechat::get_buffer_info();
|
||||
if ($bufinfo)
|
||||
{
|
||||
while (my ($nobuf, $binfos) = each %$bufinfo)
|
||||
{
|
||||
$buflist{$nobuf}{"server"} = $$binfos{"server"};
|
||||
$buflist{$nobuf}{"channel"} = $$binfos{"channel"};
|
||||
$buflist{$nobuf}{"name"} = get_buffer_name($$binfos{"type"},
|
||||
$$binfos{"server"},
|
||||
$$binfos{"channel"});
|
||||
}
|
||||
}
|
||||
return %buflist;
|
||||
}
|
||||
|
||||
# get buffet list and build a hash: name => number
|
||||
|
||||
sub get_layout_hash_by_name
|
||||
{
|
||||
my %buflist;
|
||||
my $bufinfo = weechat::get_buffer_info();
|
||||
if ($bufinfo)
|
||||
{
|
||||
while (my ($nobuf, $binfos) = each %$bufinfo)
|
||||
{
|
||||
my $name = get_buffer_name($$binfos{"type"},
|
||||
$$binfos{"server"},
|
||||
$$binfos{"channel"});
|
||||
$buflist{$name} = $nobuf;
|
||||
}
|
||||
}
|
||||
return %buflist;
|
||||
}
|
||||
|
||||
# build a string with buffer list hash
|
||||
|
||||
sub get_layout_string
|
||||
{
|
||||
my $layout = "";
|
||||
my %buflist = get_layout_hash();
|
||||
my @keys = sort { $a <=> $b } (keys %buflist);
|
||||
foreach my $key (@keys)
|
||||
{
|
||||
$layout .= ",".$key.":".$buflist{$key}{"name"};
|
||||
}
|
||||
$layout = substr($layout, 1);
|
||||
return $layout;
|
||||
}
|
||||
|
||||
# build a hash (name => number) from config string
|
||||
|
||||
sub get_hash_from_string
|
||||
{
|
||||
my %buflist;
|
||||
my @fields = split(/,/, $_[0]);
|
||||
foreach my $field (@fields)
|
||||
{
|
||||
$buflist{$2} = $1 if ($field =~ /([0-9]+):(.*)/);
|
||||
}
|
||||
return %buflist;
|
||||
}
|
||||
|
||||
# save layout to plugin option
|
||||
|
||||
sub save_layout
|
||||
{
|
||||
my $layout = get_layout_string();
|
||||
if ($layout ne "")
|
||||
{
|
||||
weechat::print_server("Layout: saving buffers order: $layout");
|
||||
weechat::set_plugin_config("buffers", $layout);
|
||||
}
|
||||
}
|
||||
|
||||
# the /layout command
|
||||
|
||||
sub layout
|
||||
{
|
||||
if ($_[1] eq "save")
|
||||
{
|
||||
save_layout();
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat::command("/help layout");
|
||||
}
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
|
||||
# event handler called when a buffer is open
|
||||
|
||||
sub buffer_open
|
||||
{
|
||||
# retrieve current layout and config layout
|
||||
my %buflist = get_layout_hash();
|
||||
my %buflist_name = get_layout_hash_by_name();
|
||||
my %config = get_hash_from_string(weechat::get_plugin_config("buffers"));
|
||||
|
||||
my $name = $buflist{$_[0]}{"name"};
|
||||
|
||||
# scan open buffers and look for correct position
|
||||
my $pos = $config{$name};
|
||||
if ($pos ne "")
|
||||
{
|
||||
my @keys = sort { $b <=> $a } (keys %buflist);
|
||||
my $nbbuf = $#keys + 1;
|
||||
|
||||
# find best position (move to last known buffer + 1)
|
||||
my ($best_pos, $best_pos2) = (-1, -1);
|
||||
my $config_seen = 0;
|
||||
foreach my $key (@keys)
|
||||
{
|
||||
$config_seen = 1 if (($name ne $buflist{$key}{"name"})
|
||||
&& ($config{$buflist{$key}{"name"}} ne ""));
|
||||
$best_pos = scalar($key) if ($config_seen == 0);
|
||||
}
|
||||
foreach my $key (@keys)
|
||||
{
|
||||
$best_pos2 = scalar($key) if (($best_pos2 == -1)
|
||||
&& ($name ne $buflist{$key}{"name"})
|
||||
&& ($config{$buflist{$key}{"name"}} ne "")
|
||||
&& (scalar($config{$name}) < scalar($config{$buflist{$key}{"name"}})));
|
||||
}
|
||||
$best_pos = $best_pos2 if (($best_pos2 != -1) && ($best_pos2 < $best_pos));
|
||||
|
||||
if (($best_pos != -1) && ($best_pos != scalar($buflist_name{$name})))
|
||||
{
|
||||
weechat::command("/buffer move $best_pos",
|
||||
$buflist{$_[0]}{"channel"},
|
||||
$buflist{$_[0]}{"server"});
|
||||
}
|
||||
}
|
||||
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
|
||||
# function called when unloading script (save layout if auto_save is on)
|
||||
|
||||
sub unload_layout
|
||||
{
|
||||
my $auto_save = weechat::get_plugin_config("auto_save");
|
||||
save_layout() if (lc($auto_save) eq "on");
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# Copyright (c) 2006 by FlashCode <flashcode@flashtux.org>
|
||||
# Copyright (c) 2006-2007 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,27 +12,30 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# Search for text in WeeChat disk log files.
|
||||
#
|
||||
# History:
|
||||
# 2007-08-10, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.2: upgraded licence to GPL 3
|
||||
# 2006-04-17, FlashCode <flashcode@flashtux.org>:
|
||||
# initial release
|
||||
# version 0.1: initial release
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $version = "0.2";
|
||||
|
||||
# default values in setup file (~/.weechat/plugins.rc)
|
||||
my $default_max = "8";
|
||||
my $default_server = "off";
|
||||
my $default_grep_options = "-i";
|
||||
|
||||
# init script
|
||||
weechat::register("logsearch", "0.1", "", "Search for text in WeeChat disk log files");
|
||||
weechat::register("logsearch", $version, "", "Search for text in WeeChat disk log files");
|
||||
weechat::set_plugin_config("max", $default_max) if (weechat::get_plugin_config("max") eq "");
|
||||
weechat::set_plugin_config("server", $default_server) if (weechat::get_plugin_config("server") eq "");
|
||||
weechat::set_plugin_config("grep_options", $default_grep_options) if (weechat::get_plugin_config("grep_options") eq "");
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
# perl
|
||||
# Logs URLs to a p5-DBI-MySQL database.
|
||||
# This script is BSD licensed.
|
||||
# Hacked together by Karlis "Hagabard" Loen in Feb 2007
|
||||
# hagabard AT gmail DOT com
|
||||
# Table format: (ircurls is default table name in script)
|
||||
#+-----------+---------------+------+-----+---------+-------+
|
||||
#| Field | Type | Null | Key | Default | Extra |
|
||||
#+-----------+---------------+------+-----+---------+-------+
|
||||
#| timestamp | timestamp(14) | YES | | NULL | |
|
||||
#| hostmask | text(255) | YES | | NULL | |
|
||||
#| target | text(255) | YES | | NULL | |
|
||||
#| url | text(255) | YES | | NULL | |
|
||||
#+-----------+---------------+------+-----+---------+-------+
|
||||
# In the future I hope to get around to adding stuff like:
|
||||
#+-----------+---------------+------+-----+---------+-------+
|
||||
#| httptitle | text(255) | YES | | NULL | |
|
||||
#| httpdinfo | text(255) | YES | | NULL | |
|
||||
#| tinyurl | text(255) | YES | | NULL | |
|
||||
#+-----------+---------------+------+-----+---------+-------+
|
||||
# Test other DBI types, maybe /setp perl.logurlsql.dbtype="Pg" works?
|
||||
|
||||
# Tested with p5-DBI-Mysql, others untested
|
||||
use DBI;
|
||||
|
||||
weechat::register("logurlsql", "0.2", "", "WeeChat p5-DBI script to log URLs to a SQL Database.");
|
||||
|
||||
weechat::add_message_handler("*", "cmd_logurl");
|
||||
|
||||
# Setup Database connection, now with /setp for your configuration pleasure
|
||||
weechat::set_plugin_config("dbtype", "mysql") if (weechat::get_plugin_config("dbtype") eq "");
|
||||
weechat::set_plugin_config("dbhost", "localhost") if (weechat::get_plugin_config("dbhost") eq "");
|
||||
weechat::set_plugin_config("dbname", "weechat") if (weechat::get_plugin_config("dbname") eq "");
|
||||
weechat::set_plugin_config("dbtable", "ircurls") if (weechat::get_plugin_config("dbtable") eq "");
|
||||
weechat::set_plugin_config("dbuser", "irc") if (weechat::get_plugin_config("dbuser") eq "");
|
||||
weechat::set_plugin_config("dbpass", "forever") if (weechat::get_plugin_config("dbpass") eq "");
|
||||
|
||||
# Regexps
|
||||
sub URL_SCHEME_REGEX() { '(http|ftp|https|news|irc)' }
|
||||
sub URL_GUESS_REGEX() { '(www|ftp)' }
|
||||
sub URL_BASE_REGEX() { '[a-z0-9_\-+\\/:?%.&!~;,=\#<]' }
|
||||
|
||||
# This sub borrowed from the BSD licensed urlplot.pl irssi script by bwolf.
|
||||
sub scan_url {
|
||||
my $rawtext = shift;
|
||||
return $1 if $rawtext =~ m|(@{[ URL_SCHEME_REGEX ]}://@{[ URL_BASE_REGEX ]}+)|io;
|
||||
# The URL misses a scheme, try to be smart
|
||||
if ($rawtext =~ m|@{[ URL_GUESS_REGEX ]}\.@{[ URL_BASE_REGEX ]}+|io) {
|
||||
my $preserve = $&;
|
||||
return "http://$preserve" if $1 =~ /^www/;
|
||||
return "ftp://$preserve" if $1 =~ /^ftp/;
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
|
||||
sub cmd_logurl {
|
||||
($null, $target, $data) = split ":",$_[1],3;
|
||||
($hostmask, $null, $target) = split " ", $target;
|
||||
if (defined($url = scan_url($data))) {
|
||||
#weechat::print("hostmask=$hostmask, target=$target, url=$url");
|
||||
db_insert($hostmask, $target, $url);
|
||||
}
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
|
||||
sub db_insert {
|
||||
my ($hostmask, $target, $url)=@_;
|
||||
my $dbh = DBI->connect( "DBI:". weechat::get_plugin_config(dbtype) .":". weechat::get_plugin_config(dbname) .":". weechat::get_plugin_config(dbhost), weechat::get_plugin_config(dbuser), weechat::get_plugin_config(dbpass));
|
||||
my $sql="insert into ". weechat::get_plugin_config(dbtable) ." (timestamp, hostmask, target, url) values (NOW()".",". $dbh->quote($hostmask) ."," . $dbh->quote($target) ."," . $dbh->quote($url) .")";
|
||||
my $sth = $dbh->do($sql);
|
||||
$dbh->disconnect();
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
#
|
||||
# Copyright (c) 2007 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# Display old topics for a channel.
|
||||
#
|
||||
# History:
|
||||
# 2007-08-10, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.2: upgraded licence to GPL 3
|
||||
# 2007-03-29, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.1: initial release
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $version = "0.2";
|
||||
|
||||
my $plugin_help_options = "Plugins options (set with /setp):\n"
|
||||
." - perl.oldtopic.log_server: if on, displays all topic changes on server buffer\n"
|
||||
." - perl.oldtopic.max_topics: number of topics to keep for each channel "
|
||||
."(0 = do not keep any topics)";
|
||||
|
||||
# default values in setup file (~/.weechat/plugins.rc)
|
||||
my $default_log_server = "off";
|
||||
my $default_max_topics = "10";
|
||||
|
||||
# init script
|
||||
weechat::register("oldtopic", $version, "", "Display old topics for a channel");
|
||||
weechat::set_plugin_config("log_server", $default_log_server) if (weechat::get_plugin_config("log_server") eq "");
|
||||
weechat::set_plugin_config("max_topics", $default_max_topics) if (weechat::get_plugin_config("max_topics") eq "");
|
||||
|
||||
# message and command handlers
|
||||
weechat::add_message_handler("topic", "topic_msg");
|
||||
weechat::add_message_handler("332", "topic_332_msg");
|
||||
weechat::add_message_handler("333", "topic_333_msg");
|
||||
weechat::add_command_handler ("lasttopic", "lasttopic_cmd",
|
||||
"Display last topic for a channel (topic before current one)",
|
||||
"[channel]",
|
||||
"channel: channel name (default: current channel)\n\n"
|
||||
.$plugin_help_options,
|
||||
"%C");
|
||||
weechat::add_command_handler ("oldtopic", "oldtopic_cmd",
|
||||
"Display old topics for a channel",
|
||||
"[channel]",
|
||||
"channel: channel name (default: current channel)\n\n"
|
||||
.$plugin_help_options,
|
||||
"%C");
|
||||
|
||||
my %oldtopic;
|
||||
undef %oldtopic;
|
||||
|
||||
my %msg_332_topic;
|
||||
undef %msg_332_topic;
|
||||
|
||||
sub get_config
|
||||
{
|
||||
my $conf_log_server = weechat::get_plugin_config("log_server");
|
||||
$conf_log_server = $default_log_server if ($conf_log_server eq "");
|
||||
|
||||
my $conf_max = weechat::get_plugin_config("max_topics");
|
||||
$conf_max = $default_max_topics if ($conf_max eq "");
|
||||
$conf_max = 0 if ($conf_max < 0);
|
||||
|
||||
return ($conf_log_server, $conf_max);
|
||||
}
|
||||
|
||||
sub add_topic
|
||||
{
|
||||
my ($server, $channel, $nick, $topic, $topicdate, $conf_max) =
|
||||
($_[0], $_[1], $_[2], $_[3], $_[4], $_[5]);
|
||||
|
||||
my $time = $topicdate;
|
||||
$time = time() if ($time eq "");
|
||||
|
||||
$oldtopic{$server}{$channel}{$time}{"nick"} = $nick;
|
||||
$oldtopic{$server}{$channel}{$time}{"topic"} = $topic;
|
||||
my $numchan = scalar(keys(%{$oldtopic{$server}{$channel}}));
|
||||
if ($numchan > $conf_max)
|
||||
{
|
||||
my $diff = $numchan - $conf_max;
|
||||
my $count = 0;
|
||||
foreach my $date (sort keys %{$oldtopic{$server}{$channel}})
|
||||
{
|
||||
delete($oldtopic{$server}{$channel}{$date});
|
||||
$count++;
|
||||
last if ($count >= $diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# received when someone changes topic on a channel
|
||||
sub topic_msg
|
||||
{
|
||||
my $server = $_[0];
|
||||
my ($conf_log_server, $conf_max) = get_config();
|
||||
|
||||
if ($_[1] =~ /(.*) TOPIC (.*)/)
|
||||
{
|
||||
my $nick = $1;
|
||||
my $args = $2;
|
||||
my $nick = $1 if ($nick =~ /:?([^!]+)(!?.*)/);
|
||||
if ($args =~ /([\#\&\+\!][^ ]*) (.*)/)
|
||||
{
|
||||
my $channel = $1;
|
||||
my $topic = $2;
|
||||
$topic = $1 if ($topic =~ /:(.*)/);
|
||||
|
||||
if ($conf_log_server eq "on")
|
||||
{
|
||||
weechat::print("Topic on $channel changed by ${nick} to: \"${topic}\x0F\"",
|
||||
"", $server);
|
||||
}
|
||||
|
||||
if ($conf_max > 0)
|
||||
{
|
||||
add_topic($server, $channel, $nick, $topic, "", $conf_max);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete($oldtopic{$server}{$channel});
|
||||
}
|
||||
}
|
||||
}
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
|
||||
# topic for a channel (when joining channel)
|
||||
sub topic_332_msg
|
||||
{
|
||||
my $server = $_[0];
|
||||
|
||||
if ($_[1] =~ /(.*) 332 (.*)/)
|
||||
{
|
||||
my $args = $2;
|
||||
if ($args =~ /([\#\&\+\!][^ ]*) (.*)/)
|
||||
{
|
||||
my $channel = $1;
|
||||
my $topic = $2;
|
||||
$topic = $1 if ($topic =~ /:(.*)/);
|
||||
$msg_332_topic{$server}{$channel} = $topic;
|
||||
}
|
||||
}
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
|
||||
# nick/date for topic (when joining channel, received after 332)
|
||||
sub topic_333_msg
|
||||
{
|
||||
my $server = $_[0];
|
||||
|
||||
if ($_[1] =~ /.* 333 .* ([\#\&\+\!][^ ]*) (.*) ([0-9]+)/)
|
||||
{
|
||||
my $channel = $1;
|
||||
my $nick = $2;
|
||||
my $date = $3;
|
||||
my ($conf_log_server, $conf_max) = get_config();
|
||||
add_topic($server, $channel, $nick,
|
||||
$msg_332_topic{$server}{$channel},
|
||||
$date, $conf_max);
|
||||
}
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
|
||||
sub lasttopic_cmd
|
||||
{
|
||||
my $server = weechat::get_info("server");
|
||||
my $channel = weechat::get_info("channel");
|
||||
$channel = $_[1] if ($_[1] ne "");
|
||||
|
||||
if ($channel ne "")
|
||||
{
|
||||
my ($conf_log_server, $conf_max) = get_config();
|
||||
|
||||
delete($oldtopic{$server}{$channel}) if ($conf_max == 0);
|
||||
|
||||
my $count = 0;
|
||||
my $found = 0;
|
||||
foreach my $date (sort { $b <=> $a } keys %{$oldtopic{$server}{$channel}})
|
||||
{
|
||||
$count++;
|
||||
if ($count > 1)
|
||||
{
|
||||
$found = 1;
|
||||
weechat::print("Last topic for ${server}/${channel}: on ".localtime($date)." by ".
|
||||
$oldtopic{$server}{$channel}{$date}{"nick"}.": \"".
|
||||
$oldtopic{$server}{$channel}{$date}{"topic"}."\x0F\"");
|
||||
last;
|
||||
}
|
||||
}
|
||||
weechat::print("Last topic not found for channel ${server}/${channel}.") if ($found == 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat::print("Error: this buffer is not a channel.");
|
||||
}
|
||||
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
|
||||
sub oldtopic_cmd
|
||||
{
|
||||
my $server = weechat::get_info("server");
|
||||
my $channel = weechat::get_info("channel");
|
||||
$channel = $_[1] if ($_[1] ne "");
|
||||
|
||||
if ($channel ne "")
|
||||
{
|
||||
my ($conf_log_server, $conf_max) = get_config();
|
||||
|
||||
delete($oldtopic{$server}{$channel}) if ($conf_max == 0);
|
||||
|
||||
my $found = 0;
|
||||
foreach my $date (sort keys %{$oldtopic{$server}{$channel}})
|
||||
{
|
||||
$found = 1;
|
||||
weechat::print("Topic for ${server}/${channel} on ".localtime($date)." by ".
|
||||
$oldtopic{$server}{$channel}{$date}{"nick"}.": \"".
|
||||
$oldtopic{$server}{$channel}{$date}{"topic"}."\x0F\"");
|
||||
}
|
||||
weechat::print("No old topic for channel ${server}/${channel}.") if ($found == 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat::print("Error: this buffer is not a channel.");
|
||||
}
|
||||
|
||||
return weechat::PLUGIN_RC_OK;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# Copyright (c) 2006 by FlashCode <flashcode@flashtux.org>
|
||||
# Copyright (c) 2006-2007 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,8 +12,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
@@ -21,6 +20,8 @@
|
||||
#
|
||||
# History:
|
||||
#
|
||||
# 2007-08-10, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.4: upgraded licence to GPL 3
|
||||
# 2006-05-30, FlashCode <flashcode@flashtux.org>:
|
||||
# added plugin options for commands
|
||||
# 2004-10-01, FlashCode <flashcode@flashtux.org>:
|
||||
@@ -29,7 +30,7 @@
|
||||
|
||||
use strict;
|
||||
|
||||
my $version = "0.3";
|
||||
my $version = "0.4";
|
||||
my $command_suffix = " >/dev/null 2>&1 &";
|
||||
|
||||
# default values in setup file (~/.weechat/plugins.rc)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# Copyright (c) 2006 by FlashCode <flashcode@flashtux.org>
|
||||
# Copyright (c) 2006-2007 by FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,20 +12,23 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# Translate words and display result in infobar, local buffer or channel
|
||||
#
|
||||
# History:
|
||||
# 2007-08-10, FlashCode <flashcode@flashtux.org>:
|
||||
# version 0.2: upgraded licence to GPL 3
|
||||
# 2006-07-03, FlashCode <flashcode@flashtux.org>:
|
||||
# initial release
|
||||
# version 0.1: initial release
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $version = "0.2";
|
||||
|
||||
# default values in setup file (~/.weechat/plugins.rc)
|
||||
my $default_output_infobar = "on";
|
||||
my $default_timeout = "2";
|
||||
@@ -34,7 +37,7 @@ my $default_timeout = "2";
|
||||
my $languages = "de|el|en|es|fr|it|ja|ko|nl|pt|ru|zh|zt";
|
||||
|
||||
# init script
|
||||
weechat::register("translate", "0.1", "", "Translation script");
|
||||
weechat::register("translate", $version, "", "Translation script");
|
||||
weechat::set_plugin_config("output_infobar", $default_output_infobar) if (weechat::get_plugin_config("output_infobar") eq "");
|
||||
weechat::set_plugin_config("timeout", $default_timeout) if (weechat::get_plugin_config("timeout") eq "");
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
# weeter.pl -- Send CTCP ACTION messages as Twitter status updates
|
||||
# Copyright (c) 2007 Zak B. Elep <zakame@spunge.org>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
use strict;
|
||||
|
||||
use Net::Twitter;
|
||||
|
||||
my $version = '0.1';
|
||||
weechat::register 'weeter', $version, '',
|
||||
'Send CTCP ACTION messages as Twitter status updates';
|
||||
|
||||
my %credentials;
|
||||
for(qw(username password)){
|
||||
$credentials{$_} = weechat::get_plugin_config $_;
|
||||
}
|
||||
my $twitter = new Net::Twitter %credentials;
|
||||
|
||||
weechat::add_modifier 'irc_user', 'privmsg', 'twitter_update';
|
||||
sub twitter_update
|
||||
{
|
||||
my $message = $_[1];
|
||||
(my $status = $message) =~ s#^/me\s+##;
|
||||
update $twitter $status unless $status eq $message;
|
||||
return $message;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
weeter.pl - Send Weechat CTCP ACTION messages to Twitter as status updates
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
# in Weechat console, do
|
||||
/setp perl.weeter.username = 'your-twitter-username'
|
||||
/setp perl.weeter.password = 'your-twitter-password'
|
||||
/perl load /path/to/weeter.pl
|
||||
|
||||
# or do the /setp and put script in .weechat/perl/autoload
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
weeter is a script plugin for Weechat that enables CTCP ACTION messages (aka
|
||||
C</me> actions) to be sent to the Twitter web service as user status updates.
|
||||
It uses the L<Net::Twitter> plugin from CPAN to do its work.
|
||||
|
||||
weeter requires the variables C<perl.weeter.username> and
|
||||
C<perl.weeter.password> defined prior to use.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<http://twitter.com>, L<Net::Twitter>, L<http://weechat.flashtux.org>
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Zak B. Elep, C<< zakame at spunge.org >>
|
||||
|
||||
=cut
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# xmms perl script for weechat #
|
||||
# #
|
||||
# Displays some useless xmms-infopipe values #
|
||||
# (c) 2006 by Cédric Chalier <llinkz@gmail.com> #
|
||||
# (c) 2006 by Cédric Chalier <ounaid AT gmail DOT com> #
|
||||
# #
|
||||
# This program is free software; you can redistribute it and/or #
|
||||
# modify it under the terms of the GNU General Public License #
|
||||
|
||||
@@ -0,0 +1,231 @@
|
||||
#
|
||||
# Copyright (c) 2006 by Eric Gach <eric.gach@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
|
||||
import weechat
|
||||
import os
|
||||
import subprocess
|
||||
import traceback
|
||||
|
||||
__desc__ = 'Amarok control and now playing script for Weechat.'
|
||||
__version__ = '1.0.2'
|
||||
__author__ = 'Eric Gach <eric.gach@gmail.com>'
|
||||
# With changes by Leonid Evdokimov (weechat at darkk dot net another dot ru):
|
||||
# http://darkk.net.ru/weechat/amarok.py
|
||||
# v 1.0.1 - added %year%
|
||||
# v 1.0.2 - fixed bug with dead zombie-childs
|
||||
# fixed bug when loading second instance of the script
|
||||
# added better default for dcop_user setting
|
||||
|
||||
dcop = {}
|
||||
debug = {}
|
||||
infobar = {}
|
||||
output = {}
|
||||
ssh = {}
|
||||
|
||||
class amarokException(Exception):
|
||||
pass
|
||||
|
||||
def amarokCommand(server, args):
|
||||
try:
|
||||
args = args.split(' ')
|
||||
if args[0] == 'infobar':
|
||||
if infobar['enabled']:
|
||||
infobar['enabled'] = False
|
||||
weechat.set_plugin_config('infobar_enabled', '0')
|
||||
weechat.remove_timer_handler('amarokInfobarUpdate')
|
||||
weechat.remove_infobar(0)
|
||||
weechat.prnt('Infobar disabled')
|
||||
else:
|
||||
infobar['enabled'] = True
|
||||
weechat.set_plugin_config('infobar_enabled', '1')
|
||||
amarokInfobarUpdate()
|
||||
weechat.add_timer_handler(infobar['update'], 'amarokInfobarUpdate')
|
||||
weechat.prnt('Infobar enabled')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
elif args[0] == 'next':
|
||||
__executeCommand('next')
|
||||
weechat.prnt('Amarok: Playing next song.')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
elif args[0] == 'np':
|
||||
return amarokNowPlaying(server)
|
||||
elif args[0] == 'pause':
|
||||
__executeCommand('pause')
|
||||
weechat.prnt('Amarok: Song paused.')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
elif args[0] == 'play':
|
||||
__executeCommand('play')
|
||||
weechat.prnt('Amarok: Started playing.')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
elif args[0] == 'prev':
|
||||
__executeCommand('prev')
|
||||
weechat.prnt('Amarok: Playing previous song.')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
elif args[0] == 'stop':
|
||||
__executeCommand('stop')
|
||||
weechat.prnt('Amarok: Stop playing.')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
elif args[0] == '':
|
||||
return amarokDisplayHelp(server)
|
||||
else:
|
||||
weechat.prnt('Amarok: Unknown command %s' % (args[0]), '', server)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
except amarokException, ex:
|
||||
return weechat.PLUGIN_RC_KO
|
||||
except:
|
||||
file = open(debug['file'], 'w')
|
||||
traceback.print_exc(None, file)
|
||||
weechat.prnt('Unknown Exception encountered. Stack dumped to %s' % (debug['file']), '', server)
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
def amarokDisplayHelp(server):
|
||||
weechat.prnt('%s - Version: %s' % (__desc__, __version__), '', server)
|
||||
weechat.prnt('Author: %s' % (__author__), '', server)
|
||||
weechat.prnt('', '', server)
|
||||
weechat.prnt('Commands Available', '', server)
|
||||
weechat.prnt(' /amarok next - Move to the next song in the playlist.', '', server)
|
||||
weechat.prnt(' /amarok np - Display currently playing song.', '', server)
|
||||
weechat.prnt(' /amarok play - Start playing music.', '', server)
|
||||
weechat.prnt(' /amarok pause - Toggle between pause/playing.', '', server)
|
||||
weechat.prnt(' /amarok prev - Move to the previous song in the playlist.', '', server)
|
||||
weechat.prnt(' /amarok stop - Stop playing music.', '', server)
|
||||
weechat.prnt(' /amarok infobar - Toggle the infobar display.', '', server)
|
||||
weechat.prnt('', '', server)
|
||||
weechat.prnt('Formatting', '', server)
|
||||
weechat.prnt(' %artist% - Replaced with the song artist.', '', server)
|
||||
weechat.prnt(' %title% - Replaced with the song title.', '', server)
|
||||
weechat.prnt(' %album% - Replaced with the song album.', '', server)
|
||||
weechat.prnt(' %year% - Replaced with the song year tag.', '', server)
|
||||
weechat.prnt(' %cTime% - Replaced with how long the song has been playing.', '', server)
|
||||
weechat.prnt(' %tTime% - Replaced with the length of the song.', '', server)
|
||||
weechat.prnt(' %bitrate% - Replaced with the bitrate of the song.', '', server)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def amarokInfobarUpdate():
|
||||
__loadSettings()
|
||||
if infobar['enabled'] == False:
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
isPlaying = __executeCommands((__dcopCommand('isPlaying'),))
|
||||
if isPlaying.strip() == 'false':
|
||||
weechat.print_infobar(infobar['update'], 'Amarok is not currently playing')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
song = __getSongInfo()
|
||||
format = __formatNP(infobar['format'], song)
|
||||
weechat.print_infobar(infobar['update'], format)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
|
||||
def amarokNowPlaying(server):
|
||||
__loadSettings()
|
||||
isPlaying = __executeCommands((__dcopCommand('isPlaying'),))
|
||||
if isPlaying.strip() == 'false':
|
||||
weechat.prnt('Amarok is not playing.', '', server)
|
||||
return weechat.PLUGIN_RC_KO
|
||||
else:
|
||||
song = __getSongInfo()
|
||||
format = __formatNP(output['format'], song)
|
||||
weechat.command(format)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def amarokUnload():
|
||||
"""Unload the plugin from weechat"""
|
||||
if infobar['enabled']:
|
||||
weechat.remove_infobar(0)
|
||||
weechat.remove_timer_handler('amarokInfobarUpdate')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def __formatNP(template, song):
|
||||
np = template.replace('%artist%', song['artist'])
|
||||
np = np.replace('%title%', song['title'])
|
||||
np = np.replace('%album%', song['album'])
|
||||
np = np.replace('%cTime%', song['cTime'])
|
||||
np = np.replace('%tTime%', song['tTime'])
|
||||
np = np.replace('%bitrate%', song['bitrate'])
|
||||
np = np.replace('%year%', song['year'])
|
||||
return np
|
||||
|
||||
def __dcopCommand(cmd):
|
||||
if dcop['user'] == ':':
|
||||
return 'dcop amarok player %s' % (cmd)
|
||||
else:
|
||||
return 'dcop --user %s amarok player %s' % (dcop['user'], cmd)
|
||||
|
||||
def __executeCommands(cmds):
|
||||
from subprocess import PIPE
|
||||
cmds = " && ".join(cmds)
|
||||
if ssh['enabled']:
|
||||
cmds = 'ssh -p %d %s@%s "%s"' % (ssh['port'], ssh['user'], ssh['host'], cmds)
|
||||
proc = subprocess.Popen(cmds, shell = True, stderr = PIPE, stdout = PIPE, close_fds = True)
|
||||
error = proc.stderr.read()
|
||||
if error != '':
|
||||
weechat.prnt(error)
|
||||
output = proc.stdout.read()
|
||||
proc.wait()
|
||||
return output
|
||||
|
||||
def __getSongInfo():
|
||||
"""Get the song information from amarok"""
|
||||
song = {}
|
||||
songs = __executeCommands(
|
||||
(
|
||||
__dcopCommand('artist'),
|
||||
__dcopCommand('title'),
|
||||
__dcopCommand('album'),
|
||||
__dcopCommand('currentTime'),
|
||||
__dcopCommand('totalTime'),
|
||||
__dcopCommand('bitrate'),
|
||||
__dcopCommand('year')
|
||||
)
|
||||
)
|
||||
|
||||
song['artist'], song['title'], song['album'], song['cTime'], song['tTime'], song['bitrate'], song['year'], empty = songs.split("\n")
|
||||
return song
|
||||
|
||||
def __loadSettings():
|
||||
dcop['user'] = __loadSetting('dcop_user', ':')
|
||||
debug['file'] = os.path.expanduser(__loadSetting('debug_file', '~/amarok_debug.txt'))
|
||||
infobar['enabled'] = __loadSetting('infobar_enabled', '0', 'bool')
|
||||
infobar['format'] = __loadSetting('infobar_format', 'Now Playing: %title% by %artist%')
|
||||
infobar['update'] = __loadSetting('infobar_update', '10', 'int')
|
||||
output['format'] = __loadSetting('output_format', '/me is listening to %C04%title%%C by %C03%artist%%C from %C12%album%%C [%cTime% of %tTime% @ %bitrate%kbps]')
|
||||
ssh['enabled'] = __loadSetting('ssh_enabled', '0', 'bool')
|
||||
ssh['host'] = __loadSetting('ssh_host', 'localhost')
|
||||
ssh['port'] = __loadSetting('ssh_port', '22', 'int')
|
||||
ssh['user'] = __loadSetting('ssh_user', 'user')
|
||||
|
||||
def __loadSetting(setting, default=None, type=None):
|
||||
value = weechat.get_plugin_config(setting)
|
||||
if value == '' and default != None:
|
||||
weechat.set_plugin_config(setting, default)
|
||||
value = default
|
||||
|
||||
if type == 'int' or type == 'bool':
|
||||
value = int(value)
|
||||
if type == 'bool':
|
||||
value = bool(value)
|
||||
|
||||
return value
|
||||
|
||||
if weechat.register('amarok', __version__, 'amarokUnload', __desc__):
|
||||
__loadSettings()
|
||||
if infobar['enabled']:
|
||||
amarokInfobarUpdate()
|
||||
weechat.add_timer_handler(infobar['update'], 'amarokInfobarUpdate')
|
||||
weechat.add_command_handler('amarok', 'amarokCommand', 'Manage amarok or display now playing information.', 'next|np|play|pause|prev|stop|infobar')
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
"""
|
||||
This script shows buffer list in infobar. Nothing more.
|
||||
It's inspired by `awl.pl` irssi script, but is less advanced. :)
|
||||
|
||||
The script is in the public domain.
|
||||
Leonid Evdokimov (weechat at darkk dot net dot ru)
|
||||
http://darkk.net.ru/weechat/awl.py
|
||||
|
||||
0.1 - initial commit
|
||||
0.2 - added `show_servers` option
|
||||
0.3 - infobar is actually redrawed only if that's necessary
|
||||
"""
|
||||
|
||||
#######################################################################
|
||||
|
||||
import weechat
|
||||
from itertools import ifilter
|
||||
|
||||
VERSION = "0.3"
|
||||
NAME = "awl"
|
||||
# how often to refresh infobar
|
||||
timer_interval = 1
|
||||
blist = ()
|
||||
|
||||
def cleanup():
|
||||
weechat.remove_infobar(-1)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def cfg_boolean(key, default = False):
|
||||
map = {True: 'ON', False: 'OFF'}
|
||||
value = weechat.get_plugin_config(key).upper()
|
||||
if not value in map.values():
|
||||
if value:
|
||||
weechat.prnt("[%s]: invalid %s value (%s), resetting to %s" % (NAME, key, value, map[default]))
|
||||
weechat.set_plugin_config(key, map[default])
|
||||
value = default
|
||||
else:
|
||||
value = ifilter(lambda p: p[1] == value, map.iteritems()).next()[0]
|
||||
return value
|
||||
|
||||
def update_channels():
|
||||
global blist
|
||||
names = ()
|
||||
buffers = weechat.get_buffer_info()
|
||||
if buffers != None:
|
||||
for index, buffer in buffers.iteritems():
|
||||
#**** info for buffer no 8 ****
|
||||
# > log_filename, notify_level, server, num_displayed, type, channel
|
||||
if len(buffer['channel']):
|
||||
name = buffer['channel']
|
||||
elif len(buffer['server']):
|
||||
if cfg_boolean('show_servers'):
|
||||
name = "[" + buffer['server'] + "]"
|
||||
else:
|
||||
continue
|
||||
else:
|
||||
name = "?"
|
||||
names += ("%i:%s" % (index, name), )
|
||||
if (names != blist):
|
||||
the_string = " ".join(names)
|
||||
blist = names
|
||||
weechat.remove_infobar(-1)
|
||||
weechat.print_infobar(0, the_string);
|
||||
|
||||
def on_timer():
|
||||
update_channels()
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
if weechat.register(NAME, VERSION, "cleanup", "bufferlist in infobar"):
|
||||
#message handlers are called __before__ buflist is changed, so we don't use them
|
||||
weechat.add_timer_handler(timer_interval, "on_timer")
|
||||
cfg_boolean('show_servers', False)
|
||||
update_channels()
|
||||
|
||||
# vim:set tabstop=4 softtabstop=4 shiftwidth=4:
|
||||
# vim:set expandtab:
|
||||
+600
-119
@@ -1,21 +1,33 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Catapult by Stalwart <stlwrt@gmail.com>
|
||||
Licensed under GNU GPL 2
|
||||
"""
|
||||
# Catapult v0.2 - less ordinary abuse generator
|
||||
# Copyright (C) 2007 Pavel Shevchuk <stlwrt@gmail.com>
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
import weechat
|
||||
import random
|
||||
|
||||
weechat.register("Catapult", "0.1", "", "Less ordinary abuse generator")
|
||||
weechat.register("Catapult", "0.2", "", "Less ordinary abuse generator.")
|
||||
weechat.add_command_handler("slap", "slapper", "Creative slapper", "<target>", "", "%n")
|
||||
weechat.add_command_handler("fortune", "fortune", "Fortune cookies!")
|
||||
weechat.add_command_handler("winjoke", "winjoke", "Windoze jokes")
|
||||
weechat.add_command_handler("linjoke", "linjoke", "Linux jokes")
|
||||
weechat.add_command_handler("give", "giver", "Creative giver", "<target>", "", "%n")
|
||||
weechat.add_command_handler("hate", "hater", "Creative hater", "<target>", "", "%n")
|
||||
weechat.add_command_handler("love", "lover", "Creative lover", "<target>", "", "%n")
|
||||
weechat.add_command_handler("dance", "dancer", "Creative dancer", "<target>", "", "%n")
|
||||
weechat.add_command_handler("excuse", "excuser", "BOFH excuses")
|
||||
weechat.add_command_handler("fortune", "fortune", "Fortune cookies!")
|
||||
weechat.add_command_handler("winjoke", "winjoke", "Windoze jokes")
|
||||
weechat.add_command_handler("linjoke", "linjoke", "Linux jokes")
|
||||
|
||||
# slapper
|
||||
def slapper(server, args):
|
||||
@@ -114,7 +126,9 @@ def slapper(server, args):
|
||||
"the Win2k Buglist",
|
||||
"a widescreen TV (it can damage your brain!)",
|
||||
"a chain saw",
|
||||
"a huge tree"
|
||||
"a huge tree",
|
||||
"a 50'' CRT monitor",
|
||||
"a warehouse (Quadratisch. Praktisch. Gut.)"
|
||||
]
|
||||
if args <> "":
|
||||
weechat.command("/me slaps %s with %s." % (args, random.choice(objects)))
|
||||
@@ -123,9 +137,579 @@ def slapper(server, args):
|
||||
weechat.prnt("You must specify target")
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
# giver
|
||||
def giver(server, args):
|
||||
objects = [
|
||||
"a binary four",
|
||||
"a nice cup of SHUT THE FUCK UP",
|
||||
"an asskick",
|
||||
"a sign: 'Please kill yourself'",
|
||||
"a sign: 'Please go home now'",
|
||||
"an unlocked Grenade *tick tick BOOM*",
|
||||
"a gun - do it for mankind!"
|
||||
|
||||
]
|
||||
if args <> "":
|
||||
weechat.command("/me gives %s %s." % (args, random.choice(objects)))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
weechat.prnt("You must specify target")
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
# hater
|
||||
def hater(server, args):
|
||||
objects = [
|
||||
"so much, that he spits hellfire",
|
||||
"so much, that he want's to shoot someone",
|
||||
"SOOOO MUUUUCH!!!"
|
||||
|
||||
]
|
||||
if args <> "":
|
||||
weechat.command("/me hates %s %s." % (args, random.choice(objects)))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
weechat.prnt("You must specify target")
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
# lover
|
||||
def lover(server, args):
|
||||
actions = [
|
||||
"a *mwah*",
|
||||
"a wet kiss",
|
||||
"a tight and long hug",
|
||||
"an ass-squeeze",
|
||||
"a tight hug",
|
||||
"a wet kiss",
|
||||
"a nice, tight hug",
|
||||
"a kiss on the cheek",
|
||||
"a wet, french kiss",
|
||||
"a kiss",
|
||||
"a hug",
|
||||
"sex",
|
||||
"sweet romance",
|
||||
"some groping",
|
||||
"bed actions",
|
||||
"oral sex",
|
||||
"a porn-tape",
|
||||
"anal love",
|
||||
]
|
||||
if args <> "":
|
||||
weechat.command("/me cheers %s with %s.." % (args, random.choice(actions)))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
weechat.prnt("You must specify target")
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
# dancer
|
||||
def dancer(server, args):
|
||||
objects = [
|
||||
"used condoms",
|
||||
"condoms",
|
||||
"used tampons",
|
||||
"tampons",
|
||||
"roses",
|
||||
"rosebuds",
|
||||
"rice",
|
||||
"uncooked rice",
|
||||
"bananas",
|
||||
"little pieces of paper with the text *YAY!* on",
|
||||
"little pieces of paper with the text *w00t!* on",
|
||||
"little pieces of paper with the text *WOOHOO!* on",
|
||||
"little pieces of paper with the text *Kiss my cheek!* on",
|
||||
"coconuts with faces on",
|
||||
"little pieces of paper with the text *LOVE ROCKS!* on",
|
||||
"little pieces of paper with the text *LETS HAVE SEX!* on",
|
||||
"little pieces of paper with the text *GOD BLESS AMERICA!* on",
|
||||
"balloons with faces on",
|
||||
"balloons",
|
||||
"chocolate cakes",
|
||||
"english teachers",
|
||||
"pr0n magazines",
|
||||
"vietnamese kids",
|
||||
"snowballs",
|
||||
"rocks",
|
||||
"Michael Jackson (naked)",
|
||||
"unlocked Grenades *BOOM*",
|
||||
"Nine Inch Nails",
|
||||
"Bodyparts (bloody, wet & sexy)",
|
||||
]
|
||||
if args <> "":
|
||||
weechat.command("/me dances around %s throwing %s.." % (args, random.choice(objects)))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
weechat.prnt("You must specify target")
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
# BOFH excuser
|
||||
def excuser(server, args):
|
||||
excuses = [
|
||||
"clock speed",
|
||||
"solar flares",
|
||||
"electromagnetic radiation from satellite debris",
|
||||
"static from nylon underwear",
|
||||
"static from plastic slide rules",
|
||||
"global warming",
|
||||
"poor power conditioning",
|
||||
"static buildup",
|
||||
"doppler effect",
|
||||
"hardware stress fractures",
|
||||
"magnetic interference from money/credit cards",
|
||||
"dry joints on cable plug",
|
||||
"we're waiting for [the phone company] to fix that line",
|
||||
"sounds like a Windows problem, try calling Microsoft support",
|
||||
"temporary routing anomaly",
|
||||
"somebody was calculating pi on the server",
|
||||
"fat electrons in the lines",
|
||||
"excess surge protection",
|
||||
"floating point processor overflow",
|
||||
"divide-by-zero error",
|
||||
"POSIX compliance problem",
|
||||
"monitor resolution too high",
|
||||
"improperly oriented keyboard",
|
||||
"network packets travelling uphill (use a carrier pigeon)",
|
||||
"Decreasing electron flux",
|
||||
"first Saturday after first full moon in Winter",
|
||||
"radiosity depletion",
|
||||
"CPU radiator broken",
|
||||
"It works the way the Wang did, what's the problem",
|
||||
"positron router malfunction",
|
||||
"cellular telephone interference",
|
||||
"techtonic stress",
|
||||
"piezo-electric interference",
|
||||
"(l)user error",
|
||||
"working as designed",
|
||||
"dynamic software linking table corrupted",
|
||||
"heavy gravity fluctuation, move computer to floor rapidly",
|
||||
"secretary plugged hairdryer into UPS",
|
||||
"terrorist activities",
|
||||
"not enough memory, go get system upgrade",
|
||||
"interrupt configuration error",
|
||||
"spaghetti cable cause packet failure",
|
||||
"boss forgot system password",
|
||||
"bank holiday - system operating credits not recharged",
|
||||
"virus attack, luser responsible",
|
||||
"waste water tank overflowed onto computer",
|
||||
"Complete Transient Lockout",
|
||||
"bad ether in the cables",
|
||||
"Bogon emissions",
|
||||
"Change in Earth's rotational speed",
|
||||
"Cosmic ray particles crashed through the hard disk platter",
|
||||
"Smell from unhygienic janitorial staff wrecked the tape heads",
|
||||
"Little hamster in running wheel had coronary; waiting for replacement to be Fedexed from Wyoming",
|
||||
"Evil dogs hypnotised the night shift",
|
||||
"Plumber mistook routing panel for decorative wall fixture",
|
||||
"Electricians made popcorn in the power supply",
|
||||
"Groundskeepers stole the root password",
|
||||
"high pressure system failure",
|
||||
"failed trials, system needs redesigned",
|
||||
"system has been recalled",
|
||||
"not approved by the FCC",
|
||||
"need to wrap system in aluminum foil to fix problem",
|
||||
"not properly grounded, please bury computer",
|
||||
"CPU needs recalibration",
|
||||
"system needs to be rebooted",
|
||||
"bit bucket overflow",
|
||||
"descramble code needed from software company",
|
||||
"only available on a need to know basis",
|
||||
"knot in cables caused data stream to become twisted and kinked",
|
||||
"nesting roaches shorted out the ether cable",
|
||||
"The file system is full of it",
|
||||
"Satan did it",
|
||||
"Daemons did it",
|
||||
"You're out of memory",
|
||||
"There isn't any problem",
|
||||
"Unoptimized hard drive",
|
||||
"Typo in the code",
|
||||
"Yes, yes, its called a design limitation",
|
||||
"Look, buddy: Windows 3.1 IS A General Protection Fault.",
|
||||
"That's a great computer you have there; have you considered how it would work as a BSD machine?",
|
||||
"Please excuse me, I have to circuit an AC line through my head to get this database working.",
|
||||
"Yeah, yo mama dresses you funny and you need a mouse to delete files.",
|
||||
"Support staff hung over, send aspirin and come back LATER.",
|
||||
"Someone is standing on the ethernet cable, causing a kink in the cable",
|
||||
"Windows 95 undocumented \"feature\"",
|
||||
"Runt packets",
|
||||
"Password is too complex to decrypt",
|
||||
"Boss' kid fucked up the machine",
|
||||
"Electromagnetic energy loss",
|
||||
"Budget cuts",
|
||||
"Mouse chewed through power cable",
|
||||
"Stale file handle (next time use Tupperware(tm)!)",
|
||||
"Feature not yet implemented",
|
||||
"Internet outage",
|
||||
"Pentium FDIV bug",
|
||||
"Vendor no longer supports the product",
|
||||
"Small animal kamikaze attack on power supplies",
|
||||
"The vendor put the bug there.",
|
||||
"SIMM crosstalk.",
|
||||
"IRQ dropout",
|
||||
"Collapsed Backbone",
|
||||
"Power company testing new voltage spike (creation) equipment",
|
||||
"operators on strike due to broken coffee machine",
|
||||
"backup tape overwritten with copy of system manager's favourite CD",
|
||||
"UPS interrupted the server's power",
|
||||
"The electrician didn't know what the yellow cable was so he yanked the ethernet out.",
|
||||
"The keyboard isn't plugged in",
|
||||
"The air conditioning water supply pipe ruptured over the machine room",
|
||||
"The electricity substation in the car park blew up.",
|
||||
"The rolling stones concert down the road caused a brown out",
|
||||
"The salesman drove over the CPU board.",
|
||||
"The monitor is plugged into the serial port",
|
||||
"Root nameservers are out of sync",
|
||||
"electro-magnetic pulses from French above ground nuke testing.",
|
||||
"your keyboard's space bar is generating spurious keycodes.",
|
||||
"the real ttys became pseudo ttys and vice-versa.",
|
||||
"the printer thinks its a router.",
|
||||
"the router thinks its a printer.",
|
||||
"evil hackers from Serbia.",
|
||||
"we just switched to FDDI.",
|
||||
"halon system went off and killed the operators.",
|
||||
"because Bill Gates is a Jehovah's witness and so nothing can work on St. Swithin's day.",
|
||||
"user to computer ratio too high.",
|
||||
"user to computer ration too low.",
|
||||
"we just switched to Sprint.",
|
||||
"it has Intel Inside",
|
||||
"Sticky bits on disk.",
|
||||
"Power Company having EMP problems with their reactor",
|
||||
"The ring needs another token",
|
||||
"new management",
|
||||
"telnet: Unable to connect to remote host: Connection refused",
|
||||
"SCSI Chain overterminated",
|
||||
"It's not plugged in.",
|
||||
"because of network lag due to too many people playing deathmatch",
|
||||
"You put the disk in upside down.",
|
||||
"Daemons loose in system.",
|
||||
"User was distributing pornography on server; system seized by FBI.",
|
||||
"BNC (brain not connected)",
|
||||
"UBNC (user brain not connected)",
|
||||
"LBNC (luser brain not connected)",
|
||||
"disks spinning backwards - toggle the hemisphere jumper.",
|
||||
"new guy cross-connected phone lines with ac power bus.",
|
||||
"had to use hammer to free stuck disk drive heads.",
|
||||
"Too few computrons available.",
|
||||
"Flat tire on station wagon with tapes. (\"Never underestimate the bandwidth of a station wagon full of tapes hurling down the highway\" Andrew S. Tannenbaum) ",
|
||||
"Communications satellite used by the military for star wars.",
|
||||
"Party-bug in the Aloha protocol.",
|
||||
"Insert coin for new game",
|
||||
"Dew on the telephone lines.",
|
||||
"Arcserve crashed the server again.",
|
||||
"Some one needed the powerstrip, so they pulled the switch plug.",
|
||||
"My pony-tail hit the on/off switch on the power strip.",
|
||||
"Big to little endian conversion error",
|
||||
"You can tune a file system, but you can't tune a fish (from most tunefs man pages)",
|
||||
"Dumb terminal",
|
||||
"Zombie processes haunting the computer",
|
||||
"Incorrect time synchronization",
|
||||
"Defunct processes",
|
||||
"Stubborn processes",
|
||||
"non-redundant fan failure ",
|
||||
"monitor VLF leakage",
|
||||
"bugs in the RAID",
|
||||
"no \"any\" key on keyboard",
|
||||
"root rot",
|
||||
"Backbone Scoliosis",
|
||||
"/pub/lunch",
|
||||
"excessive collisions & not enough packet ambulances",
|
||||
"le0: no carrier: transceiver cable problem?",
|
||||
"broadcast packets on wrong frequency",
|
||||
"popper unable to process jumbo kernel",
|
||||
"NOTICE: alloc: /dev/null: filesystem full",
|
||||
"pseudo-user on a pseudo-terminal",
|
||||
"Recursive traversal of loopback mount points",
|
||||
"Backbone adjustment",
|
||||
"OS swapped to disk",
|
||||
"vapors from evaporating sticky-note adhesives",
|
||||
"sticktion",
|
||||
"short leg on process table",
|
||||
"multicasts on broken packets",
|
||||
"ether leak",
|
||||
"Atilla the Hub",
|
||||
"endothermal recalibration",
|
||||
"filesystem not big enough for Jumbo Kernel Patch",
|
||||
"loop found in loop in redundant loopback",
|
||||
"system consumed all the paper for paging",
|
||||
"permission denied",
|
||||
"Reformatting Page. Wait...",
|
||||
"..disk or the processor is on fire.",
|
||||
"SCSI's too wide.",
|
||||
"Proprietary Information.",
|
||||
"Just type 'mv * /dev/null'.",
|
||||
"runaway cat on system.",
|
||||
"Did you pay the new Support Fee?",
|
||||
"We only support a 1200 bps connection.",
|
||||
"We only support a 28000 bps connection.",
|
||||
"Me no internet, only janitor, me just wax floors.",
|
||||
"I'm sorry a pentium won't do, you need an SGI to connect with us.",
|
||||
"Post-it Note Sludge leaked into the monitor.",
|
||||
"the curls in your keyboard cord are losing electricity.",
|
||||
"The monitor needs another box of pixels.",
|
||||
"RPC_PMAP_FAILURE",
|
||||
"kernel panic: write-only-memory (/dev/wom0) capacity exceeded.",
|
||||
"Write-only-memory subsystem too slow for this machine. Contact your local dealer.",
|
||||
"Just pick up the phone and give modem connect sounds. \"Well you said we should get more lines so we don't have voice lines.\"",
|
||||
"Quantum dynamics are affecting the transistors",
|
||||
"Police are examining all internet packets in the search for a narco-net-trafficker",
|
||||
"We are currently trying a new concept of using a live mouse. Unfortunately, one has yet to survive being hooked up to the computer.....please bear with us.",
|
||||
"Your mail is being routed through Germany ... and they're censoring us.",
|
||||
"Only people with names beginning with 'A' are getting mail this week (a la Microsoft)",
|
||||
"We didn't pay the Internet bill and it's been cut off.",
|
||||
"Lightning strikes.",
|
||||
"Of course it doesn't work. We've performed a software upgrade.",
|
||||
"Change your language to Finnish.",
|
||||
"Fluorescent lights are generating negative ions. If turning them off doesn't work, take them out and put tin foil on the ends.",
|
||||
"High nuclear activity in your area.",
|
||||
"What office are you in? Oh, that one. Did you know that your building was built over the universities first nuclear research site? And wow, aren't you the lucky one, your office is right over where the core is buried!",
|
||||
"The MGs ran out of gas.",
|
||||
"The UPS doesn't have a battery backup.",
|
||||
"Recursivity. Call back if it happens again.",
|
||||
"Someone thought The Big Red Button was a light switch.",
|
||||
"The mainframe needs to rest. It's getting old, you know.",
|
||||
"I'm not sure. Try calling the Internet's head office -- it's in the book.",
|
||||
"The lines are all busy (busied out, that is -- why let them in to begin with?).",
|
||||
"Jan 9 16:41:27 huber su: 'su root' succeeded for .... on /dev/pts/1",
|
||||
"It's those computer people in X {city of world}. They keep stuffing things up.",
|
||||
"A star wars satellite accidently blew up the WAN.",
|
||||
"Fatal error right in front of screen",
|
||||
"That function is not currently supported, but Bill Gates assures us it will be featured in the next upgrade.",
|
||||
"wrong polarity of neutron flow",
|
||||
"Lusers learning curve appears to be fractal",
|
||||
"We had to turn off that service to comply with the CDA Bill.",
|
||||
"Ionization from the air-conditioning",
|
||||
"TCP/IP UDP alarm threshold is set too low.",
|
||||
"Someone is broadcasting pygmy packets and the router doesn't know how to deal with them.",
|
||||
"The new frame relay network hasn't bedded down the software loop transmitter yet. ",
|
||||
"Fanout dropping voltage too much, try cutting some of those little traces",
|
||||
"Plate voltage too low on demodulator tube",
|
||||
"You did wha... oh _dear_....",
|
||||
"CPU needs bearings repacked",
|
||||
"Too many little pins on CPU confusing it, bend back and forth until 10-20% are neatly removed. Do _not_ leave metal bits visible!",
|
||||
"_Rosin_ core solder? But...",
|
||||
"Software uses US measurements, but the OS is in metric...",
|
||||
"The computer fleetly, mouse and all.",
|
||||
"Your cat tried to eat the mouse.",
|
||||
"The Borg tried to assimilate your system. Resistance is futile.",
|
||||
"It must have been the lightning storm we had (yesterday) (last week) (last month)",
|
||||
"Due to Federal Budget problems we have been forced to cut back on the number of users able to access the system at one time. (namely none allowed....)",
|
||||
"Too much radiation coming from the soil.",
|
||||
"Unfortunately we have run out of bits/bytes/whatever. Don't worry, the next supply will be coming next week.",
|
||||
"Program load too heavy for processor to lift.",
|
||||
"Processes running slowly due to weak power supply",
|
||||
"Our ISP is having {switching,routing,SMDS,frame relay} problems",
|
||||
"We've run out of licenses",
|
||||
"Interference from lunar radiation",
|
||||
"Standing room only on the bus.",
|
||||
"You need to install an RTFM interface.",
|
||||
"That would be because the software doesn't work.",
|
||||
"That's easy to fix, but I can't be bothered.",
|
||||
"Someone's tie is caught in the printer, and if anything else gets printed, he'll be in it too.",
|
||||
"We're upgrading /dev/null",
|
||||
"The Usenet news is out of date",
|
||||
"Our POP server was kidnapped by a weasel.",
|
||||
"It's stuck in the Web.",
|
||||
"Your modem doesn't speak English.",
|
||||
"The mouse escaped.",
|
||||
"All of the packets are empty.",
|
||||
"The UPS is on strike.",
|
||||
"Neutrino overload on the nameserver",
|
||||
"Melting hard drives",
|
||||
"Someone has messed up the kernel pointers",
|
||||
"The kernel license has expired",
|
||||
"Netscape has crashed",
|
||||
"The cord jumped over and hit the power switch.",
|
||||
"It was OK before you touched it.",
|
||||
"Bit rot",
|
||||
"U.S. Postal Service",
|
||||
"Your Flux Capacitor has gone bad.",
|
||||
"The Dilithium Crystals need to be rotated.",
|
||||
"The static electricity routing is acting up...",
|
||||
"Traceroute says that there is a routing problem in the backbone. It's not our problem.",
|
||||
"The co-locator cannot verify the frame-relay gateway to the ISDN server.",
|
||||
"High altitude condensation from U.S.A.F prototype aircraft has contaminated the primary subnet mask. Turn off your computer for 9 days to avoid damaging it.",
|
||||
"Lawn mower blade in your fan need sharpening",
|
||||
"Electrons on a bender",
|
||||
"Telecommunications is upgrading. ",
|
||||
"Telecommunications is downgrading.",
|
||||
"Telecommunications is downshifting.",
|
||||
"Hard drive sleeping. Let it wake up on it's own...",
|
||||
"Interference between the keyboard and the chair.",
|
||||
"The CPU has shifted, and become decentralized.",
|
||||
"Due to the CDA, we no longer have a root account.",
|
||||
"We ran out of dial tone and we're and waiting for the phone company to deliver another bottle.",
|
||||
"You must've hit the wrong any key.",
|
||||
"PCMCIA slave driver",
|
||||
"The Token fell out of the ring. Call us when you find it.",
|
||||
"The hardware bus needs a new token.",
|
||||
"Too many interrupts",
|
||||
"Not enough interrupts",
|
||||
"The data on your hard drive is out of balance.",
|
||||
"Digital Manipulator exceeding velocity parameters",
|
||||
"appears to be a Slow/Narrow SCSI-0 Interface problem",
|
||||
"microelectronic Riemannian curved-space fault in write-only file system",
|
||||
"fractal radiation jamming the backbone",
|
||||
"routing problems on the neural net",
|
||||
"IRQ-problems with the Un-Interruptible-Power-Supply",
|
||||
"CPU-angle has to be adjusted because of vibrations coming from the nearby road",
|
||||
"emissions from GSM-phones",
|
||||
"CD-ROM server needs recalibration",
|
||||
"firewall needs cooling",
|
||||
"asynchronous inode failure",
|
||||
"transient bus protocol violation",
|
||||
"incompatible bit-registration operators",
|
||||
"your process is not ISO 9000 compliant",
|
||||
"You need to upgrade your VESA local bus to a MasterCard local bus.",
|
||||
"The recent proliferation of Nuclear Testing",
|
||||
"Elves on strike. (Why do they call EMAG Elf Magic)",
|
||||
"Internet exceeded Luser level, please wait until a luser logs off before attempting to log back on.",
|
||||
"Your EMAIL is now being delivered by the USPS.",
|
||||
"Your computer hasn't been returning all the bits it gets from the Internet.",
|
||||
"You've been infected by the Telescoping Hubble virus.",
|
||||
"Scheduled global CPU outage",
|
||||
"Your Pentium has a heating problem - try cooling it with ice cold water.(Do not turn off your computer, you do not want to cool down the Pentium Chip while he isn't working, do you?)",
|
||||
"Your processor has processed too many instructions. Turn it off immediately, do not type any commands!!",
|
||||
"Your packets were eaten by the terminator",
|
||||
"Your processor does not develop enough heat.",
|
||||
"We need a licensed electrician to replace the light bulbs in the computer room.",
|
||||
"The POP server is out of Coke",
|
||||
"Fiber optics caused gas main leak",
|
||||
"Server depressed, needs Prozac",
|
||||
"quantum decoherence",
|
||||
"those damn raccoons!",
|
||||
"suboptimal routing experience",
|
||||
"A plumber is needed, the network drain is clogged",
|
||||
"50% of the manual is in .pdf readme files",
|
||||
"the AA battery in the wallclock sends magnetic interference",
|
||||
"the xy axis in the trackball is coordinated with the summer solstice",
|
||||
"the butane lighter causes the pincushioning",
|
||||
"old inkjet cartridges emanate barium-based fumes",
|
||||
"manager in the cable duct",
|
||||
"We'll fix that in the next (upgrade, update, patch release, service pack).",
|
||||
"HTTPD Error 666 : BOFH was here",
|
||||
"HTTPD Error 4004 : very old Intel cpu - insufficient processing power",
|
||||
"The ATM board has run out of 10 pound notes. We are having a whip round to refill it, care to contribute ?",
|
||||
"Network failure - call NBC",
|
||||
"Having to manually track the satellite.",
|
||||
"Your/our computer(s) had suffered a memory leak, and we are waiting for them to be topped up.",
|
||||
"The rubber band broke",
|
||||
"We're on Token Ring, and it looks like the token got loose.",
|
||||
"Stray Alpha Particles from memory packaging caused Hard Memory Error on Server.",
|
||||
"paradigm shift...without a clutch",
|
||||
"PEBKAC (Problem Exists Between Keyboard And Chair)",
|
||||
"The cables are not the same length.",
|
||||
"Second-system effect.",
|
||||
"Chewing gum on /dev/sd3c",
|
||||
"Boredom in the Kernel.",
|
||||
"the daemons! the daemons! the terrible daemons!",
|
||||
"I'd love to help you -- it's just that the Boss won't let me near the computer. ",
|
||||
"struck by the Good Times virus",
|
||||
"YOU HAVE AN I/O ERROR -> Incompetent Operator error",
|
||||
"Your parity check is overdrawn and you're out of cache.",
|
||||
"Communist revolutionaries taking over the server room and demanding all the computers in the building or they shoot the sysadmin. Poor misguided fools.",
|
||||
"Plasma conduit breach",
|
||||
"Out of cards on drive D:",
|
||||
"Sand fleas eating the Internet cables",
|
||||
"parallel processors running perpendicular today",
|
||||
"ATM cell has no roaming feature turned on, notebooks can't connect",
|
||||
"Webmasters kidnapped by evil cult.",
|
||||
"Failure to adjust for daylight savings time.",
|
||||
"Virus transmitted from computer to sysadmins.",
|
||||
"Virus due to computers having unsafe sex.",
|
||||
"Incorrectly configured static routes on the corerouters.",
|
||||
"Forced to support NT servers; sysadmins quit.",
|
||||
"Suspicious pointer corrupted virtual machine",
|
||||
"It's the InterNIC's fault.",
|
||||
"Root name servers corrupted.",
|
||||
"Budget cuts forced us to sell all the power cords for the servers.",
|
||||
"Someone hooked the twisted pair wires into the answering machine.",
|
||||
"Operators killed by year 2000 bug bite.",
|
||||
"We've picked COBOL as the language of choice.",
|
||||
"Operators killed when huge stack of backup tapes fell over.",
|
||||
"Robotic tape changer mistook operator's tie for a backup tape.",
|
||||
"Someone was smoking in the computer room and set off the halon systems.",
|
||||
"Your processor has taken a ride to Heaven's Gate on the UFO behind Hale-Bopp's comet.",
|
||||
"it's an ID-10-T error",
|
||||
"Dyslexics retyping hosts file on servers",
|
||||
"The Internet is being scanned for viruses.",
|
||||
"Your computer's union contract is set to expire at midnight.",
|
||||
"Bad user karma.",
|
||||
"/dev/clue was linked to /dev/null",
|
||||
"Increased sunspot activity.",
|
||||
"We already sent around a notice about that.",
|
||||
"It's union rules. There's nothing we can do about it. Sorry.",
|
||||
"Interference from the Van Allen Belt.",
|
||||
"Jupiter is aligned with Mars.",
|
||||
"Redundant ACLs. ",
|
||||
"Mail server hit by UniSpammer.",
|
||||
"T-1's congested due to porn traffic to the news server.",
|
||||
"Data for intranet got routed through the extranet and landed on the internet.",
|
||||
"We are a 100% Microsoft Shop.",
|
||||
"We are Microsoft. What you are experiencing is not a problem; it is an undocumented feature.",
|
||||
"Sales staff sold a product we don't offer.",
|
||||
"Secretary sent chain letter to all 5000 employees.",
|
||||
"Sysadmin didn't hear pager go off due to loud music from bar-room speakers.",
|
||||
"Sysadmin accidentally destroyed pager with a large hammer.",
|
||||
"Sysadmins unavailable because they are in a meeting talking about why they are unavailable so much.",
|
||||
"Bad cafeteria food landed all the sysadmins in the hospital.",
|
||||
"Route flapping at the NAP.",
|
||||
"Computers under water due to SYN flooding.",
|
||||
"The vulcan-death-grip ping has been applied.",
|
||||
"Electrical conduits in machine room are melting.",
|
||||
"Traffic jam on the Information Superhighway.",
|
||||
"Radial Telemetry Infiltration",
|
||||
"Cow-tippers tipped a cow onto the server.",
|
||||
"tachyon emissions overloading the system",
|
||||
"Maintenance window broken",
|
||||
"We're out of slots on the server",
|
||||
"Computer room being moved. Our systems are down for the weekend.",
|
||||
"Sysadmins busy fighting SPAM.",
|
||||
"Repeated reboots of the system failed to solve problem",
|
||||
"Feature was not beta tested",
|
||||
"Domain controller not responding",
|
||||
"Someone else stole your IP address, call the Internet detectives!",
|
||||
"It's not RFC-822 compliant.",
|
||||
"operation failed because: there is no message for this error (#1014)",
|
||||
"stop bit received",
|
||||
"internet is needed to catch the etherbunny",
|
||||
"network down, IP packets delivered via UPS",
|
||||
"Firmware update in the coffee machine",
|
||||
"Temporal anomaly",
|
||||
"Mouse has out-of-cheese-error",
|
||||
"Borg implants are failing",
|
||||
"Borg nanites have infested the server",
|
||||
"error: one bad user found in front of screen",
|
||||
"Please state the nature of the technical emergency",
|
||||
"Internet shut down due to maintenance",
|
||||
"Daemon escaped from pentagram",
|
||||
"crop circles in the corn shell",
|
||||
"sticky bit has come loose",
|
||||
"Hot Java has gone cold",
|
||||
"Cache miss - please take better aim next time",
|
||||
"Hash table has woodworm",
|
||||
"Trojan horse ran out of hay",
|
||||
"Zombie processes detected, machine is haunted.",
|
||||
"overflow error in /dev/null",
|
||||
"Browser's cookie is corrupted -- someone's been nibbling on it.",
|
||||
"Mailer-daemon is busy burning your message in hell.",
|
||||
"According to Microsoft, it's by design",
|
||||
"vi needs to be upgraded to vii",
|
||||
"greenpeace free'd the mallocs",
|
||||
"Terrorists crashed an airplane into the server room, have to remove /bin/laden. (rm -rf /bin/laden)",
|
||||
"astropneumatic oscillations in the water-cooling",
|
||||
"Somebody ran the operating system through a spelling checker.",
|
||||
"Rhythmic variations in the voltage reaching the power supply.",
|
||||
"Keyboard Actuator Failure. Order and Replace.",
|
||||
"Packet held up at customs.",
|
||||
"Propagation delay.",
|
||||
"High line impedance.",
|
||||
"Someone set us up the bomb.",
|
||||
"Power surges on the Underground."
|
||||
]
|
||||
weechat.command(random.choice(excuses))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
|
||||
# fortune cookies
|
||||
def fortune(server, args):
|
||||
objects = [
|
||||
fortunes = [
|
||||
"There are three kinds of people: men, women, and unix.",
|
||||
"BOFH Excuse #118: the router thinks its a printer.",
|
||||
"CHUBBY CHECKER just had a CHICKEN SANDWICH in downtown DULUTH!",
|
||||
@@ -242,12 +826,12 @@ def fortune(server, args):
|
||||
"Tact, n.: The unsaid part of what you're thinking.",
|
||||
"Shit Happens."
|
||||
]
|
||||
weechat.command(("Wanda the Fish says: %s") % random.choice(objects))
|
||||
weechat.command(("Wanda the Fish says: %s") % random.choice(fortunes))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
# winjoke
|
||||
def winjoke(server, args):
|
||||
objects = [
|
||||
winjokes = [
|
||||
"Windows NT, from the people who invented EDLIN!",
|
||||
"Windows: Microsoft's tax on computer illiterates.",
|
||||
"The nice thing about Windows is - It does not just crash, it displays a dialog box and lets you press 'OK' first.",
|
||||
@@ -291,12 +875,12 @@ def winjoke(server, args):
|
||||
"Microsoft Zen - Become one with the blue screen.",
|
||||
"The next hot technology from Microsoft will be object-oriented assembly."
|
||||
]
|
||||
weechat.command(("Wanda the Fish says: %s") % random.choice(objects))
|
||||
weechat.command(("Wanda the Fish says: %s") % random.choice(winjokes))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
# linjoke
|
||||
def linjoke(server, args):
|
||||
objects = [
|
||||
linjokes = [
|
||||
"Got Linux?",
|
||||
"Microsoft gives you Windows... Linux gives you the whole house.",
|
||||
"Linux, DOS, Windows NT -- The Good, the Bad, and the Ugly",
|
||||
@@ -322,108 +906,5 @@ def linjoke(server, args):
|
||||
"Oh My God! They Killed init! You Bastards!",
|
||||
"Unix: Where /sbin/init is still Job 1."
|
||||
]
|
||||
weechat.command(("Wanda the Fish says: %s") % random.choice(objects))
|
||||
weechat.command(("Wanda the Fish says: %s") % random.choice(linjokes))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
# giver
|
||||
def giver(server, args):
|
||||
objects = [
|
||||
"a binary four",
|
||||
"a nice cup of SHUT THE FUCK UP",
|
||||
"an asskick",
|
||||
"a sign: 'Please kill yourself'",
|
||||
"a sign: 'Please go home now'",
|
||||
"an unlocked Grenade *tick tick BOOM*",
|
||||
"a gun - do it for mankind!"
|
||||
|
||||
]
|
||||
if args <> "":
|
||||
weechat.command("/me gives %s %s." % (args, random.choice(objects)))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
weechat.prnt("You must specify target")
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
# hater
|
||||
def hater(server, args):
|
||||
objects = [
|
||||
"so much, that he spits hellfire",
|
||||
"so much, that he want's to shoot someone",
|
||||
"SOOOO MUUUUCH!!!"
|
||||
|
||||
]
|
||||
if args <> "":
|
||||
weechat.command("/me hates %s %s." % (args, random.choice(objects)))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
weechat.prnt("You must specify target")
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
# lover
|
||||
def lover(server, args):
|
||||
actions = [
|
||||
"a *mwah*",
|
||||
"a wet kiss",
|
||||
"a tight and long hug",
|
||||
"an ass-squeeze",
|
||||
"a tight hug",
|
||||
"a wet kiss",
|
||||
"a nice, tight hug",
|
||||
"a kiss on the cheek",
|
||||
"a wet, french kiss",
|
||||
"a kiss",
|
||||
"a hug",
|
||||
"sex",
|
||||
"sweet romance",
|
||||
"some groping",
|
||||
"bed actions",
|
||||
"oral sex",
|
||||
"a porn-tape",
|
||||
"anal love",
|
||||
]
|
||||
if args <> "":
|
||||
weechat.command("/me cheers %s with %s.." % (args, random.choice(actions)))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
weechat.prnt("You must specify target")
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
# dancer
|
||||
def dancer(server, args):
|
||||
objects = [
|
||||
"used condoms",
|
||||
"condoms",
|
||||
"used tampons",
|
||||
"tampons",
|
||||
"roses",
|
||||
"rosebuds",
|
||||
"rice",
|
||||
"uncooked rice",
|
||||
"bananas",
|
||||
"little pieces of paper with the text *YAY!* on",
|
||||
"little pieces of paper with the text *w00t!* on",
|
||||
"little pieces of paper with the text *WOOHOO!* on",
|
||||
"little pieces of paper with the text *Kiss my cheek!* on",
|
||||
"coconuts with faces on",
|
||||
"little pieces of paper with the text *LOVE ROCKS!* on",
|
||||
"little pieces of paper with the text *LETS HAVE SEX!* on",
|
||||
"little pieces of paper with the text *GOD BLESS AMERICA!* on",
|
||||
"balloons with faces on",
|
||||
"balloons",
|
||||
"chocolate cakes",
|
||||
"english teachers",
|
||||
"pr0n magazines",
|
||||
"vietnamese kids",
|
||||
"snowballs",
|
||||
"rocks",
|
||||
"Michael Jackson (naked)",
|
||||
"unlocked Grenades *BOOM*",
|
||||
"Nine Inch Nails",
|
||||
"Bodyparts (bloody, wet & sexy)",
|
||||
]
|
||||
if args <> "":
|
||||
weechat.command("/me dances around %s throwing %s.." % (args, random.choice(objects)))
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
weechat.prnt("You must specify target")
|
||||
return weechat.PLUGIN_RC_KO
|
||||
|
||||
+27
-8
@@ -15,9 +15,10 @@
|
||||
|
||||
Hope you enjoy it :-)
|
||||
-- Henning aka asmanian
|
||||
-- Leonid Evdokimov (weechat at darkk dot net one more dot ru)
|
||||
"""
|
||||
|
||||
version = "0.8"
|
||||
version = "0.10"
|
||||
history = """
|
||||
0.1 initial
|
||||
0.2
|
||||
@@ -35,6 +36,10 @@ history = """
|
||||
- added multi-server support
|
||||
0.8
|
||||
- fixed on_msg (occasionally caused a minor fault)
|
||||
0.9
|
||||
- added dump_to_servchan and dump_to_current setting
|
||||
0.10
|
||||
- added SILENT (asmanian)
|
||||
"""
|
||||
|
||||
short_syntax = """[REQUEST ANSWER]"""
|
||||
@@ -43,7 +48,8 @@ syntax = """ Examples:
|
||||
|
||||
/set_ctcp
|
||||
show settings for common CTCP-Requests.
|
||||
where "OFF" means "use weechat default behaviour.
|
||||
where "OFF" means "use weechat default behaviour,
|
||||
"SILENT" means: "dont answer at all".
|
||||
|
||||
/set_ctcp VERSION I prefer using weechat $version
|
||||
Reply with a fancy message.
|
||||
@@ -65,13 +71,20 @@ syntax = """ Examples:
|
||||
import weechat as wc
|
||||
import re
|
||||
|
||||
wc.register("ctcp", version, "", "Customize CTCP replies")
|
||||
wc.add_command_handler("set_ctcp", "set", "", short_syntax, syntax)
|
||||
wc.add_message_handler("privmsg", "on_msg")
|
||||
if wc.register("ctcp", version, "", "Customize CTCP replies"):
|
||||
wc.add_command_handler("set_ctcp", "set", "", short_syntax, syntax)
|
||||
wc.add_message_handler("privmsg", "on_msg")
|
||||
|
||||
if not wc.get_plugin_config("requests"):
|
||||
wc.set_plugin_config("requests", " ".join(["VERSION", "USERINFO", "FINGER", "TIME", "PING"]))
|
||||
if not wc.get_plugin_config("requests"):
|
||||
wc.set_plugin_config("requests", " ".join(["VERSION", "USERINFO", "FINGER", "TIME", "PING"]))
|
||||
|
||||
for key, default in {'dump_to_servchan': 'OFF', 'dump_to_current': 'ON'}.iteritems():
|
||||
value = wc.get_plugin_config(key)
|
||||
if not value in ['ON', 'OFF']:
|
||||
if value:
|
||||
wc.prnt("[ctcp]: invalid %s value, resetting to %s" % (key, default))
|
||||
wc.set_plugin_config(key, default)
|
||||
|
||||
def get_answers():
|
||||
# Strangely, get_plugin_config sometimes returns
|
||||
# the integer 0
|
||||
@@ -111,6 +124,9 @@ def on_msg(server, args):
|
||||
if not ans or ans == "OFF":
|
||||
raise ValueError
|
||||
|
||||
if ans == "SILENT":
|
||||
return wc.PLUGIN_RC_OK_IGNORE_ALL
|
||||
|
||||
info = {
|
||||
"version": wc.get_info("version"),
|
||||
"nick": wc.get_info("nick"),
|
||||
@@ -125,7 +141,10 @@ def on_msg(server, args):
|
||||
l, r = match.span()
|
||||
ans = ans[:l+1] + info.get(match.group(1), "$" + match.group(1)) + ans[r:]
|
||||
|
||||
wc.prnt("CTCP %s received from %s (on %s)" % (req, source, server))
|
||||
if wc.get_plugin_config("dump_to_servchan") == 'ON':
|
||||
wc.prnt("CTCP %s received from %s (on %s)" % (req, source, server), server)
|
||||
if wc.get_plugin_config("dump_to_current") == 'ON':
|
||||
wc.prnt("CTCP %s received from %s (on %s)" % (req, source, server))
|
||||
wc.command("/quote NOTICE %s :\x01%s %s\x01" % (
|
||||
source, req, ans), "", server)
|
||||
return wc.PLUGIN_RC_OK_IGNORE_ALL
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
"""
|
||||
:Author: Tim Schumacher <tim AT we-are-teh-b DOT org>
|
||||
|
||||
:What it does:
|
||||
This script informs the active window of your last
|
||||
submitted song at last.fm
|
||||
|
||||
:Usage:
|
||||
/np - Displays your last submitted song.
|
||||
|
||||
:Configuration Variables:
|
||||
============= ==========================================
|
||||
Variable name Meaning
|
||||
============= ==========================================
|
||||
lastfmuser Your username at last.fm
|
||||
|
||||
Released under GPL licence.
|
||||
"""
|
||||
#!/usr/bin/python
|
||||
|
||||
todo = """
|
||||
- Realy check if a song was recent.
|
||||
- Define 'recent' through a userdefinedvar
|
||||
- Add more help
|
||||
|
||||
"""
|
||||
|
||||
import urllib
|
||||
import weechat as wc
|
||||
|
||||
wc.register("lastfmnp", "0.2.1", "", "now playing for last.fm")
|
||||
|
||||
def getLastSong(server, args):
|
||||
"""
|
||||
Provides your last submitted song in last.fm to the actual context
|
||||
"""
|
||||
user = wc.get_plugin_config("lastfmuser")
|
||||
url = "http://ws.audioscrobbler.com/1.0/user/" + user + "/recenttracks.txt"
|
||||
url_handle = urllib.urlopen(url)
|
||||
lines = url_handle.readlines()
|
||||
song = lines[0].split(",")[1].replace("\n","");
|
||||
if song == '':
|
||||
song = 'nothing :-)';
|
||||
wc.command("np: " + song)
|
||||
return 0
|
||||
|
||||
|
||||
wc.add_command_handler("np", "getLastSong")
|
||||
|
||||
default = {
|
||||
"lastfmuser": "timds235"
|
||||
}
|
||||
|
||||
for k, v in default.items():
|
||||
if not wc.get_plugin_config(k):
|
||||
wc.set_plugin_config(k, v)
|
||||
@@ -0,0 +1,36 @@
|
||||
# mp3blaster nowplaying script by Stalwart <stlwrt@gmail.com>
|
||||
# written for Caleb
|
||||
# released under GNU GPL v2 or newer
|
||||
|
||||
import weechat
|
||||
from os.path import expandvars, expanduser
|
||||
|
||||
def mp3blasternp(server, args):
|
||||
try:
|
||||
statusfile = open(expandvars(expanduser(weechat.get_plugin_config('statusfile'))), 'rU')
|
||||
info = statusfile.readlines()
|
||||
statusfile.close()
|
||||
artist = title = path = ''
|
||||
for line in info:
|
||||
if (line.split()[0] == 'artist'):
|
||||
artist = line.strip(' \n')[7:]
|
||||
elif (line.split()[0] == 'title'):
|
||||
title = line.strip(' \n')[6:]
|
||||
elif (line.split()[0] == 'path'):
|
||||
path = line.strip(' \n')[5:]
|
||||
if (title):
|
||||
if (artist):
|
||||
weechat.command('/me np: '+artist+' - '+title)
|
||||
else:
|
||||
weechat.command('/me np: '+title)
|
||||
else:
|
||||
weechat.command('/me np: '+path)
|
||||
except:
|
||||
if (weechat.get_plugin_config('statusfile') == ''):
|
||||
weechat.set_plugin_config('statusfile', '~/.mp3blasterstatus')
|
||||
weechat.prnt('mp3blaster status file not found. Set proper using /setp python.mp3blaster.statusfile = /path/to/file')
|
||||
|
||||
return 0
|
||||
|
||||
weechat.register ('mp3blaster', '1.0', '', 'Posts track now played by mp3blaster')
|
||||
weechat.add_command_handler ('np', 'mp3blasternp')
|
||||
@@ -0,0 +1,66 @@
|
||||
# Author: Skippy the Kangoo <Skippythekangoo AT yahoo DOT fr>
|
||||
# This script manages basic controls of mpd (play/pause, next song, previous song, increase volume, decrease volume, display current song)
|
||||
# Usage: /mpd toggle|next|prev|volume_up|volume_down|status
|
||||
# Released under GNU GPL v2 or newer
|
||||
|
||||
import weechat
|
||||
from os import popen
|
||||
|
||||
weechat.register ('mpd', '0.0.2', '', 'mpd control script')
|
||||
|
||||
weechat.add_command_handler('mpd', 'mpd', 'mpd control', 'toggle|next|prev|volume_up|volume_down|status', '', 'toggle|next|prev|volume_up|volume_down|status')
|
||||
|
||||
def toggle (server, args,):
|
||||
popen('mpc toggle')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def next (server, args,):
|
||||
popen('mpc next')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def prev (server, args,):
|
||||
popen('mpc prev')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def volume_up (server, args,):
|
||||
popen('mpc volume +10')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def volume_down (server, args,):
|
||||
volume_down = popen('mpc volume -10')
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def status (server, args,):
|
||||
status = popen('mpc').readline().rstrip()
|
||||
weechat.print_infobar(3, status)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def mpd(server, args):
|
||||
|
||||
largs = args.split(" ")
|
||||
|
||||
#strip spaces
|
||||
while '' in largs:
|
||||
largs.remove('')
|
||||
while ' ' in largs:
|
||||
largs.remove(' ')
|
||||
|
||||
if len(largs) == 0:
|
||||
weechat.command("/help mpd")
|
||||
return weechat.PLUGIN_RC_OK
|
||||
else:
|
||||
inchan = False
|
||||
|
||||
if largs[0] == 'toggle':
|
||||
toggle(" ".join(largs[1:]), inchan)
|
||||
elif largs[0] == 'next':
|
||||
next(" ".join(largs[1:]), inchan)
|
||||
elif largs[0] == 'prev':
|
||||
prev(' '.join(largs[1:]), inchan)
|
||||
elif largs[0] == 'volume_up':
|
||||
volume_up(' '.join(largs[1:]), inchan)
|
||||
elif largs[0] == 'volume_down':
|
||||
volume_down(' '.join(largs[1:]), inchan)
|
||||
elif largs[0] == 'status':
|
||||
status(" ".join(largs[1:]), inchan)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
@@ -0,0 +1,289 @@
|
||||
"""
|
||||
Response: Simple autoresponse script for WeeChat
|
||||
Author: Christian Taylor <cht@chello.at>
|
||||
License: GPL version 2 or later
|
||||
"""
|
||||
|
||||
version = "0.1"
|
||||
|
||||
helptext = """ /response list
|
||||
Displays a list of your current responses.
|
||||
|
||||
/response toggle <number>
|
||||
Activates or deactivates response with the specified number.
|
||||
|
||||
/response delete <number>
|
||||
Deletes response with the specified number.
|
||||
|
||||
/response add "<message-regexp>" "<command>"
|
||||
Adds a response that executes <command> when it encounters a message matching
|
||||
the specified regular expression in any channel.
|
||||
<command> can be an actual command to be executed (for instance "/nick xyz")
|
||||
or a simple text (for instance "xyz") which is then posted to the channel.
|
||||
The following sequences are replaced in <command>:
|
||||
\\nick => nickname of the user that triggered the response
|
||||
\\mask => hostmask of the user that triggered the response
|
||||
\\channel => name of the channel in which the response was triggered
|
||||
\\<number> => matches of the message regular expression subgroups, \\0 for whole match
|
||||
$<number> => whitespace-separated word number <number> of the whole triggering message
|
||||
(starts with 0; negative numbers count from the last word)
|
||||
|
||||
/response add "<hostmask-regexp>" "<channel-regexp>" "<message-regexp>" "<command>"
|
||||
Same as above, but only triggers if hostmask and channel match the given additional regexps.
|
||||
Blank regexps ("") will trigger for any hostmask and/or channel.
|
||||
|
||||
Examples:
|
||||
/response add "^!whoami" "/msg \\channel You are \\nick (\\mask) in \\channel!"
|
||||
/response add "^!make (.*)" "/msg \\channel No rule for \\1. Stop."
|
||||
/response add "somebody@somehost" "" "^!op" "/op \\nick"
|
||||
"""
|
||||
|
||||
import weechat, sys, re, pickle
|
||||
|
||||
weechat.register("Response", version, "", "Execute commands on specific triggers")
|
||||
|
||||
weechat.add_message_handler("privmsg", "triggercheck")
|
||||
weechat.add_command_handler("response", "triggercontrol", " Allows you to view, add and delete responses:", "<operation>", helptext, "add|delete|list|toggle")
|
||||
|
||||
debug = 0
|
||||
|
||||
t_enabled = 0
|
||||
t_nick = 1
|
||||
t_channel = 2
|
||||
t_trigger = 3
|
||||
t_reaction = 4
|
||||
t_outstream = 5
|
||||
|
||||
def triggercheck(server, args):
|
||||
null, context, message = args.split(":", 2)
|
||||
mask, null, channel = context.strip().split(" ", 2)
|
||||
nick, whois = mask.split("!", 1)
|
||||
|
||||
if debug: tell("Server: " + server + " | Mask: " + mask + " | Channel: " + channel + " | Message: " + message, server)
|
||||
|
||||
for trigger in triggerlist:
|
||||
if trigger[t_enabled]:
|
||||
if trigger[t_channel]:
|
||||
channelmatch = re.compile(trigger[t_channel]).search(channel)
|
||||
else:
|
||||
channelmatch = True
|
||||
|
||||
if channelmatch and trigger[t_nick]:
|
||||
nickmatch = re.compile(trigger[t_nick]).search(whois)
|
||||
else:
|
||||
nickmatch = True
|
||||
|
||||
if channelmatch and nickmatch and trigger[t_trigger]:
|
||||
messagematch = re.compile(trigger[t_trigger]).search(message)
|
||||
else:
|
||||
messagematch = False
|
||||
|
||||
if channelmatch and nickmatch and messagematch:
|
||||
reaction = trigger[t_reaction]
|
||||
reaction = reaction.replace("\\nick", nick)
|
||||
reaction = reaction.replace("\\{nick}", nick)
|
||||
reaction = reaction.replace("\\mask", whois)
|
||||
reaction = reaction.replace("\\{mask}", whois)
|
||||
reaction = reaction.replace("\\channel", channel)
|
||||
reaction = reaction.replace("\\{channel}", channel)
|
||||
|
||||
messagewords = message.split()
|
||||
|
||||
wordstring = re.compile("\\${?(-?\\d+)}?").search(reaction)
|
||||
replacecount = 0
|
||||
while wordstring and replacecount < 256:
|
||||
replacecount += 1
|
||||
try:
|
||||
reaction = reaction.replace(wordstring.group(0), messagewords[int(wordstring.group(1))])
|
||||
except IndexError:
|
||||
reaction = reaction.replace(wordstring.group(0), "")
|
||||
wordstring = re.compile("\\${?(-?\\d+)}?").search(reaction)
|
||||
|
||||
subgroupstring = re.compile("\\\\{?(\\d+)}?").search(reaction)
|
||||
replacecount = 0
|
||||
while subgroupstring and replacecount < 256:
|
||||
replacecount += 1
|
||||
try:
|
||||
reaction = reaction.replace(subgroupstring.group(0), messagematch.group(int(subgroupstring.group(1))))
|
||||
except (IndexError, TypeError):
|
||||
reaction = reaction.replace(subgroupstring.group(0), "")
|
||||
subgroupstring = re.compile("\\\\{?(\\d+)}?").search(reaction)
|
||||
|
||||
if trigger[t_outstream] == 1: weechat.command(reaction, channel, server)
|
||||
if trigger[t_outstream] == 2: weechat.prnt(reaction, channel, server)
|
||||
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def tell(text, server):
|
||||
return weechat.prnt(str(text), "[" + str(server) + "]", server)
|
||||
|
||||
def triggercontrol(server, args):
|
||||
try:
|
||||
if args.startswith("list"): return listdisplay(server, args)
|
||||
if args.startswith("toggle"): return activetoggle(server, args)
|
||||
if args.startswith("delete"): return deletetrigger(server, args)
|
||||
if args.startswith("add"): return addtrigger(server, args)
|
||||
if args.startswith("ostoggle"): return outstreamtoggle(server, args)
|
||||
if args.startswith("debug"): return debugtoggle(server, args)
|
||||
|
||||
tell("Unknown operation. Supported operations are add / delete / list / toggle.", server)
|
||||
except ValueError:
|
||||
tell("Error: Incorrect syntax (malformed number).", server)
|
||||
except:
|
||||
(e_type, e_value, e_trace) = sys.exc_info()
|
||||
tell("Error: %s: %s" % (str(e_type).replace("exceptions.", ""), e_value), server)
|
||||
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def savetriggers(varname):
|
||||
savestring = pickle.dumps(triggerlist)
|
||||
savestring = savestring.replace("\n", "\\$$$")
|
||||
return weechat.set_plugin_config(varname, savestring)
|
||||
|
||||
def loadtriggers(varname):
|
||||
try:
|
||||
oldtriggers = weechat.get_plugin_config(varname)
|
||||
if oldtriggers:
|
||||
oldtriggers = oldtriggers.replace("\\$$$", "\n")
|
||||
newtriggerlist = pickle.loads(oldtriggers)
|
||||
return newtriggerlist
|
||||
else:
|
||||
return oldtriggers
|
||||
except:
|
||||
return False
|
||||
|
||||
def triggerstring(i, trigger):
|
||||
if trigger:
|
||||
cl = str(i+1) + " "
|
||||
if i < 9: cl += " "
|
||||
|
||||
if trigger[t_enabled]:
|
||||
cl += "[X] "
|
||||
else:
|
||||
cl += "[ ] "
|
||||
|
||||
if trigger[t_nick]:
|
||||
cl += "\"" + str(trigger[t_nick]) + "\" in "
|
||||
else:
|
||||
cl += "(everyone) in "
|
||||
|
||||
if trigger[t_channel]:
|
||||
cl += "\"" + str(trigger[t_channel]) + "\": "
|
||||
else:
|
||||
cl += "(all channels): "
|
||||
|
||||
cl += "\"" + str(trigger[t_trigger]) + "\" => "
|
||||
|
||||
cl += "\"" + str(trigger[t_reaction]) + "\""
|
||||
|
||||
#if trigger[t_outstream] == 1: cl += " <public output>"
|
||||
if trigger[t_outstream] == 2: cl += " <private output>"
|
||||
|
||||
return cl
|
||||
else:
|
||||
return "No response number " + str(i+1)
|
||||
|
||||
def listdisplay(server, args):
|
||||
if triggerlist:
|
||||
tell(" --- Responses ---", server)
|
||||
for i, trigger in enumerate(triggerlist):
|
||||
tell(triggerstring(i, trigger), server)
|
||||
else:
|
||||
tell("No responses in the list.", server)
|
||||
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def activetoggle(server, args):
|
||||
triggernum = int(args.replace("toggle ", ""))
|
||||
if 1 <= triggernum < len(triggerlist) +1:
|
||||
if triggerlist[triggernum-1][t_enabled]:
|
||||
triggerlist[triggernum-1][t_enabled] = 0
|
||||
tell("Deactivated response number " + str(triggernum), server)
|
||||
else:
|
||||
triggerlist[triggernum-1][t_enabled] = 1
|
||||
tell("Activated response number " + str(triggernum), server)
|
||||
savetriggers("responses")
|
||||
else:
|
||||
tell("There is no response number " + str(triggernum), server)
|
||||
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def outstreamtoggle(server, args):
|
||||
triggernum = int(args.replace("ostoggle ", ""))
|
||||
if 1 <= triggernum < len(triggerlist) +1:
|
||||
if triggerlist[triggernum-1][t_outstream] == 1:
|
||||
triggerlist[triggernum-1][t_outstream] = 2
|
||||
tell("Set response number " + str(triggernum) + " to private output", server)
|
||||
else:
|
||||
triggerlist[triggernum-1][t_outstream] = 1
|
||||
tell("Set response number " + str(triggernum) + " to public output", server)
|
||||
savetriggers("responses")
|
||||
else:
|
||||
tell("There is no response number " + str(triggernum), server)
|
||||
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def deletetrigger(server, args):
|
||||
triggernum = int(args.replace("delete ", ""))
|
||||
if 1 <= triggernum < len(triggerlist) +1:
|
||||
del triggerlist[triggernum-1]
|
||||
tell("Deleted response number " + str(triggernum), server)
|
||||
if triggerlist:
|
||||
listdisplay(server, args)
|
||||
savetriggers("responses")
|
||||
else:
|
||||
tell("There is no response number " + str(triggernum), server)
|
||||
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def addtrigger(server, args):
|
||||
newtriggerargs = args.replace("add ", "")
|
||||
if newtriggerargs.startswith('"') and newtriggerargs.endswith('"'):
|
||||
newtriggerargs = newtriggerargs[1:-1]
|
||||
newtrigger = newtriggerargs.split('" "')
|
||||
elif newtriggerargs.startswith("'") and newtriggerargs.endswith("'"):
|
||||
newtriggerargs = newtriggerargs[1:-1]
|
||||
newtrigger = newtriggerargs.split("' '")
|
||||
else:
|
||||
tell ("Error: Incorrectly formatted input.", server)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
if len(newtrigger) == 2:
|
||||
triggerlist.append([1, "", "", 1])
|
||||
triggerlist[-1][3:3] = newtrigger
|
||||
tell(triggerstring(len(triggerlist)-1, triggerlist[-1]), server)
|
||||
elif len(newtrigger) == 3:
|
||||
triggerlist.append([1, "", 1])
|
||||
triggerlist[-1][2:2] = newtrigger
|
||||
tell(triggerstring(len(triggerlist)-1, triggerlist[-1]), server)
|
||||
elif len(newtrigger) == 4:
|
||||
triggerlist.append([1, 1])
|
||||
triggerlist[-1][1:1] = newtrigger
|
||||
tell(triggerstring(len(triggerlist)-1, triggerlist[-1]), server)
|
||||
else:
|
||||
tell("Error: Incorrectly formatted input.", server)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
savetriggers("responses")
|
||||
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def debugtoggle(server, args):
|
||||
global debug
|
||||
if debug:
|
||||
debug = 0
|
||||
tell("Debugging output deactivated", server)
|
||||
else:
|
||||
debug = 1
|
||||
tell("Debugging output activated", server)
|
||||
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
|
||||
triggerlist = []
|
||||
newtriggerlist = loadtriggers("responses")
|
||||
if newtriggerlist:
|
||||
triggerlist = newtriggerlist
|
||||
weechat.prnt("Response: Loaded " + str(len(triggerlist)) + " responses, " + str(len([1 for x in triggerlist if x[t_enabled]])) + " are active.")
|
||||
else:
|
||||
weechat.prnt("Response: No previously saved responses. Type '/help response' for usage information.")
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Theme manager for WeeChat.
|
||||
It loads configuration parameters from file
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/bin/env python
|
||||
#
|
||||
# TinyUrl, version 3.3, for weechat version 0.1.9
|
||||
#
|
||||
|
||||
+103
-88
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# UrlGrab, version 1.0, for weechat version 0.1.6
|
||||
# UrlGrab, version 1.1, for weechat version 0.2.4
|
||||
#
|
||||
# Listens to all channels for URLs, collects them in a list, and launches
|
||||
# them in your favourite web server on the local host or a remote server.
|
||||
@@ -59,9 +59,13 @@
|
||||
# The file where the command output (if any) is saved. Overwritten
|
||||
# each time you launch a new URL. Default is ~/.weechat/urllaunch.log
|
||||
#
|
||||
# default
|
||||
# The command that will be run if no arguemnts to /url are given.
|
||||
# Default is help
|
||||
#
|
||||
# Requirements:
|
||||
#
|
||||
# - Designed to run with weechat version 1.0.6 or better.
|
||||
# - Designed to run with weechat version 0.2.4 or better.
|
||||
# http://weechat.flashtux.org/
|
||||
#
|
||||
# Acknowlegements:
|
||||
@@ -70,6 +74,13 @@
|
||||
# irc.freenode.net/#weechat Honestly, I just cleaned up the code a bit and
|
||||
# made the settings a little more useful (to me).
|
||||
#
|
||||
# - With changes by Leonid Evdokimov (weechat at darkk dot net another dot ru):
|
||||
# http://darkk.net.ru/weechat/urlgrab.py
|
||||
# v1.1: added better handling of dead zombie-childs
|
||||
# added parsing of private messages
|
||||
# added default command setting
|
||||
# added parsing of scrollback buffers on load
|
||||
#
|
||||
# Copyright (C) 2005 Jim Ramsay <i.am@jimramsay.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
@@ -88,16 +99,13 @@
|
||||
# USA.
|
||||
#
|
||||
|
||||
import sys
|
||||
import os
|
||||
import weechat
|
||||
import subprocess
|
||||
|
||||
UC_NAME="UrlGrab"
|
||||
UC_VERSION="1.0"
|
||||
|
||||
weechat.register (UC_NAME, UC_VERSION, "", "Url collector/launcher for weechat")
|
||||
weechat.add_message_handler("privmsg", "urlGrabCheck")
|
||||
weechat.add_command_handler("url", "urlGrabMain",
|
||||
"Controls UrlGrab -> '/url help' for usage")
|
||||
UC_VERSION="1.1"
|
||||
|
||||
def urlGrabPrint(message):
|
||||
weechat.prnt("-[%s]- %s" % ( UC_NAME, message ) )
|
||||
@@ -114,6 +122,8 @@ class WeechatSetting:
|
||||
class UrlGrabSettings:
|
||||
def __init__(self):
|
||||
self.settings = {
|
||||
'default':WeechatSetting('default', 'help',
|
||||
"default command to /url to run if none given" ),
|
||||
'historysize':WeechatSetting('historysize', '10',
|
||||
"Number of URLs to keep per channel" ),
|
||||
'method':WeechatSetting('method', 'local',
|
||||
@@ -276,15 +286,22 @@ class UrlGrabber:
|
||||
if not found:
|
||||
urlGrabPrint(channel + "@" + server + ": no entries")
|
||||
|
||||
def urlGrabParsemsg(command):
|
||||
infos = command.split(" ")
|
||||
chan = infos[2]
|
||||
message = " ".join(infos[3:])[1:]
|
||||
return (chan, message)
|
||||
def urlGrabParsemsg(server, command):
|
||||
# :nick!ident@host PRIVMSG dest :foobarbaz
|
||||
l = command.split(' ')
|
||||
mask = l[0][1:]
|
||||
dest = l[2]
|
||||
message = ' '.join(l[3:])[1:]
|
||||
###########################################
|
||||
#nothing, info, message = command.split(":", 2)
|
||||
#info = info.split(' ')
|
||||
if dest == weechat.get_info('nick', server):
|
||||
source = mask.split("!")[0]
|
||||
else:
|
||||
source = dest
|
||||
return (source, message)
|
||||
|
||||
def urlGrabCheck(server, args):
|
||||
global urlGrab
|
||||
chan, message = urlGrabParsemsg(args)
|
||||
def urlGrabCheckMsgline(server, chan, message):
|
||||
# Ignore output from 'tinyurl.py'
|
||||
if message.startswith( "[AKA] http://tinyurl.com" ):
|
||||
return weechat.PLUGIN_RC_OK
|
||||
@@ -294,17 +311,20 @@ def urlGrabCheck(server, args):
|
||||
word[0:8] == "https://" or \
|
||||
word[0:6] == "ftp://":
|
||||
urlGrab.addUrl(word, chan, server)
|
||||
# check for any dead children and clean them up
|
||||
while True:
|
||||
try:
|
||||
mypid, status = os.waitpid(0, os.WNOHANG)
|
||||
except:
|
||||
break
|
||||
else:
|
||||
if mypid <= 0:
|
||||
break
|
||||
|
||||
def urlGrabCheck(server, args):
|
||||
global urlGrab
|
||||
chan, message = urlGrabParsemsg(server, args)
|
||||
urlGrabCheckMsgline(server, chan, message)
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
def urlGrabCheckOnload():
|
||||
for buf in weechat.get_buffer_info().itervalues():
|
||||
if len(buf['channel']):
|
||||
lines = weechat.get_buffer_data(buf['server'], buf['channel'])
|
||||
for line in reversed(lines):
|
||||
urlGrabCheckMsgline(buf['server'], buf['channel'], line['data'])
|
||||
|
||||
def urlGrabOpen(index, channel = None):
|
||||
global urlGrab, urlGrabSettings
|
||||
|
||||
@@ -336,30 +356,22 @@ def urlGrabOpen(index, channel = None):
|
||||
except:
|
||||
urlGrabPrint("Fork failed!")
|
||||
if childpid == 0:
|
||||
# in the child- Detach from tty and Exec the command
|
||||
logfile = os.path.expanduser( urlGrabSettings.get( 'cmdlog' ) )
|
||||
din = open("/dev/null", "r")
|
||||
dout = open(logfile, "a")
|
||||
try:
|
||||
# Redirect IO for the child
|
||||
os.dup2(din.fileno(), 0)
|
||||
os.dup2(dout.fileno(), 1)
|
||||
os.dup2(dout.fileno(), 2)
|
||||
subprocess.Popen(
|
||||
argl,
|
||||
stdin = open('/dev/null', 'r'),
|
||||
stdout = open(logfile, 'a'),
|
||||
stderr = subprocess.STDOUT)
|
||||
except:
|
||||
dout.write( "UrlGrab: IO Redirection failed\n" )
|
||||
dout.close()
|
||||
din.close()
|
||||
sys.exit(1)
|
||||
try:
|
||||
# Actually run the command
|
||||
os.execvp( argl[0], argl )
|
||||
except:
|
||||
dout.write( "UrlGrab: Exec failed" )
|
||||
dout.close()
|
||||
din.close()
|
||||
sys.exit(1)
|
||||
urlGrabPrint(traceback.format_exc(None))
|
||||
sys.exit(0)
|
||||
else:
|
||||
# In the parent - Don't wait now, wait later.
|
||||
# In the parent - we may wait for stub to fork again and let the init kill grand-child
|
||||
try:
|
||||
os.waitpid(childpid, 0)
|
||||
except:
|
||||
pass
|
||||
return
|
||||
|
||||
def urlGrabList( args ):
|
||||
@@ -398,50 +410,53 @@ def urlGrabMain(server, args):
|
||||
while ' ' in largs:
|
||||
largs.remove(' ')
|
||||
if len(largs) == 0:
|
||||
largs = [urlGrabSettings.get('default')]
|
||||
if largs[0] == 'help':
|
||||
urlGrabHelp()
|
||||
else:
|
||||
if largs[0] == 'help':
|
||||
urlGrabHelp()
|
||||
elif largs[0] == 'list':
|
||||
urlGrabList( largs[1:] )
|
||||
elif largs[0] == 'set':
|
||||
try:
|
||||
if (len(largs) == 1):
|
||||
urlGrabPrint( "Available settings:" )
|
||||
urlGrabSettings.prntall()
|
||||
elif (len(largs) == 2):
|
||||
name = largs[1]
|
||||
urlGrabPrint( "Get %s" % name )
|
||||
urlGrabSettings.prnt( name )
|
||||
elif (len(largs) > 2):
|
||||
name = largs[1]
|
||||
value = None
|
||||
if( largs[2] != "="):
|
||||
value = " ".join(largs[2:])
|
||||
elif( largs > 3 and largs[2] == "=" ):
|
||||
value = " ".join(largs[3:])
|
||||
urlGrabPrint( "set %s = \'%s\'" % (name, value) )
|
||||
if value is not None:
|
||||
try:
|
||||
urlGrabSettings.set( name, value )
|
||||
urlGrabSettings.prnt( name, verbose=False )
|
||||
except ValueError, msg:
|
||||
weechat.prnt( " Failed: %s" % msg )
|
||||
else:
|
||||
weechat.prnt( " Failed: No value given" )
|
||||
except KeyError:
|
||||
weechat.prnt( " Failed: Unrecognized parameter '%s'" % name )
|
||||
else:
|
||||
try:
|
||||
no = int(largs[0])
|
||||
if len(largs) > 1:
|
||||
urlGrabOpen(no, largs[1])
|
||||
elif largs[0] == 'list':
|
||||
urlGrabList( largs[1:] )
|
||||
elif largs[0] == 'set':
|
||||
try:
|
||||
if (len(largs) == 1):
|
||||
urlGrabPrint( "Available settings:" )
|
||||
urlGrabSettings.prntall()
|
||||
elif (len(largs) == 2):
|
||||
name = largs[1]
|
||||
urlGrabPrint( "Get %s" % name )
|
||||
urlGrabSettings.prnt( name )
|
||||
elif (len(largs) > 2):
|
||||
name = largs[1]
|
||||
value = None
|
||||
if( largs[2] != "="):
|
||||
value = " ".join(largs[2:])
|
||||
elif( largs > 3 and largs[2] == "=" ):
|
||||
value = " ".join(largs[3:])
|
||||
urlGrabPrint( "set %s = \'%s\'" % (name, value) )
|
||||
if value is not None:
|
||||
try:
|
||||
urlGrabSettings.set( name, value )
|
||||
urlGrabSettings.prnt( name, verbose=False )
|
||||
except ValueError, msg:
|
||||
weechat.prnt( " Failed: %s" % msg )
|
||||
else:
|
||||
urlGrabOpen(no)
|
||||
except ValueError:
|
||||
urlGrabPrint( "Unknown command '%s'. Try '/url help' for usage" % largs[0])
|
||||
weechat.prnt( " Failed: No value given" )
|
||||
except KeyError:
|
||||
weechat.prnt( " Failed: Unrecognized parameter '%s'" % name )
|
||||
else:
|
||||
try:
|
||||
no = int(largs[0])
|
||||
if len(largs) > 1:
|
||||
urlGrabOpen(no, largs[1])
|
||||
else:
|
||||
urlGrabOpen(no)
|
||||
except ValueError:
|
||||
urlGrabPrint( "Unknown command '%s'. Try '/url help' for usage" % largs[0])
|
||||
return weechat.PLUGIN_RC_OK
|
||||
|
||||
# Initialize global variables
|
||||
urlGrabSettings = UrlGrabSettings()
|
||||
urlGrab = UrlGrabber( urlGrabSettings.get('historysize') )
|
||||
if weechat.register (UC_NAME, UC_VERSION, "", "Url collector/launcher for weechat"):
|
||||
urlGrabSettings = UrlGrabSettings()
|
||||
urlGrab = UrlGrabber( urlGrabSettings.get('historysize') )
|
||||
urlGrabCheckOnload()
|
||||
weechat.add_message_handler("privmsg", "urlGrabCheck")
|
||||
weechat.add_command_handler("url", "urlGrabMain", "Controls UrlGrab -> '/url help' for usage")
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#Author: Pablo Escobar <pablo__escobar AT tlen DOT pl>
|
||||
#What it does: This script shows the currently played song in mpd
|
||||
#Usage: /weempd - Displays the songname
|
||||
#Released under GNU GPL v2 or newer
|
||||
|
||||
#/usr/bin/python
|
||||
#coding: utf-8
|
||||
|
||||
import weechat
|
||||
import re
|
||||
import codecs
|
||||
from os import popen
|
||||
|
||||
weechat.register ('weempd', '0.01', '', """mpd-weechat current song script (usage: /weempd)""")
|
||||
weechat.add_command_handler ('weempd', 'show_it_to_them')
|
||||
|
||||
default = {
|
||||
"msg_head": "is playing",
|
||||
"msg_tail": "with mpd",
|
||||
"spacer": "★",
|
||||
"colour_title": "C12",
|
||||
"colour_spacer": "C08",
|
||||
}
|
||||
|
||||
for k, v in default.items():
|
||||
if not weechat.get_plugin_config(k):
|
||||
weechat.set_plugin_config(k, v)
|
||||
|
||||
def show_it_to_them(server, args):
|
||||
spacer = weechat.get_plugin_config("spacer")
|
||||
msg_tail = weechat.get_plugin_config("msg_tail")
|
||||
msg_head = weechat.get_plugin_config("msg_head")
|
||||
colour_title = weechat.get_plugin_config("colour_title")
|
||||
colour_spacer = weechat.get_plugin_config("colour_spacer")
|
||||
tempinfo = popen('mpc').readline().rstrip()
|
||||
all = '/me ' + msg_head + ' %' + colour_spacer + spacer + ' %' + colour_title + tempinfo + ' %' + colour_spacer + spacer + " %C00" + msg_tail
|
||||
weechat.command(all)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#Author: Pablo Escobar <pablo__escobar AT tlen DOT pl>
|
||||
#What it does: This script shows the currently played song in exaile
|
||||
#Usage: /weexaile - Displays the songname
|
||||
#Released under GNU GPL v2 or newer
|
||||
|
||||
#/usr/bin/python
|
||||
#coding: utf-8
|
||||
|
||||
import weechat
|
||||
import re
|
||||
import codecs
|
||||
from os import popen
|
||||
|
||||
weechat.register ('exaile', '0.01', '', """exaile-weechat current song script (usage: /weexaile)""")
|
||||
weechat.add_command_handler ('weexaile', 'show_it_to_them')
|
||||
|
||||
default = {
|
||||
"msg_head": "is playing",
|
||||
"msg_tail": "with exaile",
|
||||
"spacer": "★",
|
||||
"colour_artist": "C03",
|
||||
"colour_title": "C02",
|
||||
"colour_lenght": "C05",
|
||||
"colour_spacer": "C08",
|
||||
}
|
||||
|
||||
for k, v in default.items():
|
||||
if not weechat.get_plugin_config(k):
|
||||
weechat.set_plugin_config(k, v)
|
||||
|
||||
def show_it_to_them(server, args):
|
||||
spacer = weechat.get_plugin_config("spacer")
|
||||
msg_tail = weechat.get_plugin_config("msg_tail")
|
||||
msg_head = weechat.get_plugin_config("msg_head")
|
||||
colour_artist = weechat.get_plugin_config("colour_artist")
|
||||
colour_title = weechat.get_plugin_config("colour_title")
|
||||
colour_lenght = weechat.get_plugin_config("colour_lenght")
|
||||
colour_spacer = weechat.get_plugin_config("colour_spacer")
|
||||
exaile_running = popen ('exaile --get-title')
|
||||
exaile_running_text = exaile_running.readline().rstrip()
|
||||
if exaile_running_text != "No running Exaile instance found.":
|
||||
song_name = popen ('exaile --get-title')
|
||||
song_name_text = song_name.readline().rstrip()
|
||||
song_artist = popen ('exaile --get-artist')
|
||||
song_artist_text = song_artist.readline().rstrip()
|
||||
song_length = popen ('exaile --get-length')
|
||||
song_length_text = song_length.readline().rstrip()
|
||||
song_current = popen ('exaile --current-position')
|
||||
song_current_text = str(round(float(song_current.readline().rstrip()),2))
|
||||
all = '/me ' + msg_head + ' %' + colour_title + song_name_text + ' %' + colour_spacer + spacer + ' %' + colour_artist + song_artist_text + ' %' + colour_spacer + spacer + ' %' + colour_lenght + song_length_text + " (" + song_current_text + "%)" + " %C00" + msg_tail
|
||||
weechat.command(all)
|
||||
return 0
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
# Copyright (c) 2007 by Javier Valencia <jvalencia@log01.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
|
||||
def weechat_init
|
||||
Weechat.register("browse", "0.1", "", "Fast url browsing for Weechat.")
|
||||
|
||||
Weechat.add_command_handler(
|
||||
"browse",
|
||||
"do_browse",
|
||||
"Use your preferred browser to navigate an url.",
|
||||
"[number of url] (-1 to browse all) (leave empty to browse first one)")
|
||||
Weechat.add_command_handler(
|
||||
"webbrowser",
|
||||
"set_browser",
|
||||
"Get/Set browser command",
|
||||
"[command] (leavy empty to get current command)")
|
||||
Weechat.add_command_handler(
|
||||
"urls",
|
||||
"get_url_list",
|
||||
"Get a list of urls in a channel.")
|
||||
|
||||
Weechat.print("")
|
||||
Weechat.print("See help for 'browse', 'webbrowser' and 'urls' commands.")
|
||||
if Weechat.get_plugin_config("webbrowser").empty?
|
||||
Weechat.print("")
|
||||
Weechat.print("WARNING: you must define a web browser with the command /webbrowser.")
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
def set_browser(server, args)
|
||||
if args.empty?
|
||||
Weechat.print("current web browser -> #{Weechat.get_plugin_config('webbrowser')}")
|
||||
else
|
||||
Weechat.set_plugin_config("webbrowser", args)
|
||||
Weechat.print("web browser set to -> #{args}")
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
def get_url_array(buffer_data)
|
||||
urls = Array.new
|
||||
buffer_data.each do |line|
|
||||
line["data"].split.each do |word|
|
||||
if word =~ /^http\:\/\/.*/
|
||||
urls << word
|
||||
end
|
||||
end
|
||||
end
|
||||
return urls.uniq.reverse
|
||||
end
|
||||
|
||||
def get_url_list(server,args)
|
||||
channel = Weechat.get_info("channel")
|
||||
if channel.empty?
|
||||
Weechat.print("You must be inside a channel.")
|
||||
return Weechat::PLUGIN_RC_KO
|
||||
end
|
||||
buffer = Weechat.get_buffer_data(server, channel)
|
||||
unless buffer
|
||||
Weechat.print("Error retrieving window buffer, may be a bug?.")
|
||||
return Weechat::PLUGIN_RC_KO
|
||||
end
|
||||
Weechat.print("")
|
||||
Weechat.print("URL listing:")
|
||||
pos = 0
|
||||
get_url_array(buffer).each do |url|
|
||||
Weechat.print("#{pos}) #{url}")
|
||||
pos += 1
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
def do_browse(server, args)
|
||||
num = args.to_i
|
||||
channel = Weechat.get_info("channel")
|
||||
if channel.empty?
|
||||
Weechat.print("You must be inside a channel.")
|
||||
return Weechat::PLUGIN_RC_KO
|
||||
end
|
||||
buffer = Weechat.get_buffer_data(server, channel)
|
||||
unless buffer
|
||||
Weechat.print("Error retrieving window buffer, may be a bug?.")
|
||||
return Weechat::PLUGIN_RC_KO
|
||||
end
|
||||
browser = Weechat.get_plugin_config("webbrowser")
|
||||
if browser.empty?
|
||||
Weechat.print("")
|
||||
Weechat.print("WARNING: you must define a web browser with the command /webbrowser.")
|
||||
return Weechat::PLUGIN_RC_KO
|
||||
end
|
||||
urls = get_url_array(buffer)
|
||||
if urls.empty?
|
||||
Weechat.print("No urls in current channel.")
|
||||
else
|
||||
if num == -1
|
||||
Weechat.print("Starting browser...")
|
||||
fork do # only for unix/posix
|
||||
exec("#{browser} #{urls.join(' ')} &> /dev/null")
|
||||
end
|
||||
else
|
||||
if urls[num]
|
||||
Weechat.print("Starting browser...")
|
||||
fork do # only for unix/posix
|
||||
exec("#{browser} #{urls[num]} &> /dev/null")
|
||||
end
|
||||
else
|
||||
Weechat.print("Invalid url number.")
|
||||
end
|
||||
end
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
@@ -0,0 +1,35 @@
|
||||
# Forcenick v1.0 - forces your original nickname
|
||||
# Copyright (C) 2007 Pavel Shevchuk <stlwrt@gmail.com>
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
def weechat_init
|
||||
Weechat.register("forcenick", "1.0", "", "Forces your original nickname, wipes out ghosts and nick stealers")
|
||||
Weechat.add_command_handler("forcenick", "forcenick", "Forces server_nick1, identifies to nickserv using server_password. Useful to call from server_command if your connection is unstable")
|
||||
end
|
||||
|
||||
def forcenick(server, args)
|
||||
server_info = Weechat.get_server_info[server]
|
||||
cur_nick = server_info['nick']
|
||||
forced_nick = server_info['nick1']
|
||||
password = server_info['password']
|
||||
if cur_nick != forced_nick
|
||||
Weechat.command("/msg nickserv ghost #{forced_nick} #{password}", "", server)
|
||||
Weechat.command("/nick #{forced_nick}", "", server)
|
||||
Weechat.command("/msg nickserv identify #{password}", "", server)
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
# Rbox plugin (Rhythmnox control and now playing plugin.)
|
||||
# Version 0.2
|
||||
# Released under GNU GPL v2
|
||||
# Metallines <metallines@gmail.com>
|
||||
# /rbox-help for help
|
||||
|
||||
def weechat_init
|
||||
Weechat.register("rbox", "0.2", "", "Rhythmbox control and now playing plugin.")
|
||||
Weechat.add_command_handler("rbox-print", "rbox_print")
|
||||
Weechat.add_command_handler("rbox-play", "rbox_play")
|
||||
Weechat.add_command_handler("rbox-pause", "rbox_pause")
|
||||
Weechat.add_command_handler("rbox-previous", "rbox_previous")
|
||||
Weechat.add_command_handler("rbox-next", "rbox_next")
|
||||
Weechat.add_command_handler("rbox-help", "rbox_help")
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
def rbox_print(server, args)
|
||||
if `ps -C rhythmbox` =~ /rhythmbox/
|
||||
artiste = `rhythmbox-client --print-playing-format %ta`.chomp
|
||||
titre = `rhythmbox-client --print-playing-format %tt`.chomp
|
||||
album = `rhythmbox-client --print-playing-format %at`.chomp
|
||||
|
||||
couleur_artiste = "C05"
|
||||
couleur_titre = "C10"
|
||||
couleur_album = "C03"
|
||||
couleur_entre = "C14"
|
||||
|
||||
Weechat.command("/me écoute" + " %" + couleur_titre + titre + " %" + couleur_entre + "par" + " %" + couleur_artiste + artiste + " %" + couleur_entre + "de l'album" + " %" + couleur_album + album)
|
||||
else
|
||||
Weechat.print("Rhythmbox isn't running.")
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
def rbox_play(server, args)
|
||||
if `ps -C rhythmbox` =~ /rhythmbox/
|
||||
`rhythmbox-client --play`
|
||||
Weechat.print("Start playback.")
|
||||
else
|
||||
Weechat.print("Rhythmbox isn't running.")
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
def rbox_pause(server, args)
|
||||
if `ps -C rhythmbox` =~ /rhythmbox/
|
||||
`rhythmbox-client --pause`
|
||||
Weechat.print("Pause playback.")
|
||||
else
|
||||
Weechat.print("Rhythmbox isn't running.")
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
def rbox_previous(server, args)
|
||||
if `ps -C rhythmbox` =~ /rhythmbox/
|
||||
`rhythmbox-client --previous`
|
||||
Weechat.print("Skip to the previous track.")
|
||||
else
|
||||
Weechat.print("Rhythmbox isn't running.")
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
def rbox_next(server, args)
|
||||
if `ps -C rhythmbox` =~ /rhythmbox/
|
||||
`rhythmbox-client --next`
|
||||
Weechat.print("Skip to the next track.")
|
||||
else
|
||||
Weechat.print("Rhythmbox isn't running.")
|
||||
end
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
|
||||
def rbox_help(server, args)
|
||||
Weechat.print("/rbox-play -> Start playback")
|
||||
Weechat.print("/rbox-pause -> Pause playback")
|
||||
Weechat.print("/rbox-previous -> Skip to previous track")
|
||||
Weechat.print("/rbox-next -> Skip to next track")
|
||||
Weechat.print("/rbox-print -> Print which song rhythmbox is playing in current channel")
|
||||
Weechat.print("/robix-help -> Display this help")
|
||||
return Weechat::PLUGIN_RC_OK
|
||||
end
|
||||
@@ -0,0 +1,116 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
|
||||
CHECK_INCLUDE_FILES("arpa/inet.h" HAVE_ARPA_INET_H)
|
||||
CHECK_INCLUDE_FILES("limits.h" HAVE_LIMITS_H)
|
||||
CHECK_INCLUDE_FILES("locale.h" HAVE_LOCALE_H)
|
||||
CHECK_INCLUDE_FILES("netdb.h" HAVE_NETDB_H)
|
||||
CHECK_INCLUDE_FILES("netinet/in.h" HAVE_NETINET_IN_H)
|
||||
CHECK_INCLUDE_FILES("stdlib.h" HAVE_STDLIB_H)
|
||||
CHECK_INCLUDE_FILES("string.h" HAVE_STRING_H)
|
||||
CHECK_INCLUDE_FILES("sys/socket.h" HAVE_SYS_SOCKET_H)
|
||||
CHECK_INCLUDE_FILES("sys/time.h" HAVE_SYS_TIME_H)
|
||||
CHECK_INCLUDE_FILES("sys/types.h" HAVE_SYS_TYPES_H)
|
||||
CHECK_INCLUDE_FILES("unistd.h" HAVE_UNISTD_H)
|
||||
CHECK_INCLUDE_FILES("pwd.h" HAVE_PWD_H)
|
||||
CHECK_INCLUDE_FILES("errno.h" HAVE_ERRNO_H)
|
||||
CHECK_INCLUDE_FILES("wchar.h" HAVE_WCHAR_H)
|
||||
CHECK_INCLUDE_FILES("langinfo.h" HAVE_LANGINFO_CODESET)
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
CHECK_INCLUDE_FILES("utf8/wchar.h" HAVE_UTF8_WCHAR_H)
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
|
||||
CHECK_FUNCTION_EXISTS(gethostbyname HAVE_GETHOSTBYNAME)
|
||||
CHECK_FUNCTION_EXISTS(gethostname HAVE_GETHOSTNAME)
|
||||
CHECK_FUNCTION_EXISTS(getsockname HAVE_GETSOCKNAME)
|
||||
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
CHECK_FUNCTION_EXISTS(inet_ntoa HAVE_INET_NTOA)
|
||||
CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)
|
||||
CHECK_FUNCTION_EXISTS(mkdir HAVE_MKDIR)
|
||||
CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
|
||||
CHECK_FUNCTION_EXISTS(setlocale HAVE_SETLOCALE)
|
||||
CHECK_FUNCTION_EXISTS(socket HAVE_SOCKET)
|
||||
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
|
||||
CHECK_FUNCTION_EXISTS(strchr HAVE_STRCHR)
|
||||
CHECK_FUNCTION_EXISTS(strdup HAVE_STRDUP)
|
||||
CHECK_FUNCTION_EXISTS(strndup HAVE_STRNDUP)
|
||||
CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)
|
||||
CHECK_FUNCTION_EXISTS(strpbrk HAVE_STRPBRK)
|
||||
CHECK_FUNCTION_EXISTS(strrchr HAVE_STRRCHR)
|
||||
CHECK_FUNCTION_EXISTS(strstr HAVE_STRSTR)
|
||||
|
||||
|
||||
#needs to be splitted in subdirectories
|
||||
# FIXME: weechat_gui_common MUST be the first lib in the list
|
||||
SET(STATIC_LIBS weechat_gui_common)
|
||||
|
||||
# Check for Gettext
|
||||
IF(NOT DISABLE_NLS)
|
||||
FIND_PACKAGE(Gettext)
|
||||
IF(GETTEXT_FOUND)
|
||||
ADD_DEFINITIONS(-DENABLE_NLS)
|
||||
ENDIF(GETTEXT_FOUND)
|
||||
ENDIF(NOT DISABLE_NLS)
|
||||
|
||||
# Check for GnuTLS
|
||||
IF(NOT DISABLE_GNUTLS)
|
||||
FIND_PACKAGE(GnuTLS)
|
||||
|
||||
IF(GNUTLS_FOUND)
|
||||
STRING(REGEX REPLACE "/[^/]*$" "" GNUTLS_LIBRARY_PATH "${GNUTLS_LIBRARY}")
|
||||
ADD_DEFINITIONS(-DHAVE_GNUTLS)
|
||||
INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_PATH})
|
||||
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${GNUTLS_LIBRARY_PATH}")
|
||||
LIST(APPEND EXTRA_LIBS gnutls)
|
||||
ENDIF(GNUTLS_FOUND)
|
||||
ENDIF(NOT DISABLE_GNUTLS)
|
||||
|
||||
# Check for iconv
|
||||
FIND_PACKAGE(Iconv)
|
||||
IF(ICONV_FOUND)
|
||||
ADD_DEFINITIONS( -DHAVE_ICONV )
|
||||
ENDIF(ICONV_FOUND)
|
||||
|
||||
IF(NOT DISABLE_PLUGINS)
|
||||
FIND_LIBRARY(DL_LIBRARY
|
||||
NAMES dl
|
||||
PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec
|
||||
)
|
||||
ADD_DEFINITIONS(-DPLUGINS)
|
||||
LIST(APPEND STATIC_LIBS weechat_plugins)
|
||||
IF(DL_LIBRARY)
|
||||
STRING(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}")
|
||||
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}")
|
||||
LIST(APPEND EXTRA_LIBS dl)
|
||||
ENDIF(DL_LIBRARY)
|
||||
ENDIF(NOT DISABLE_PLUGINS)
|
||||
|
||||
ADD_SUBDIRECTORY( common )
|
||||
List(APPEND STATIC_LIBS weechat_main)
|
||||
|
||||
ADD_SUBDIRECTORY( irc )
|
||||
LIST(APPEND STATIC_LIBS weechat_irc)
|
||||
|
||||
IF(NOT DISABLE_PLUGINS)
|
||||
ADD_SUBDIRECTORY( plugins )
|
||||
ENDIF(NOT DISABLE_PLUGINS)
|
||||
|
||||
ADD_SUBDIRECTORY( gui )
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,8 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
SUBDIRS = common irc plugins gui
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
SET(LIB_MAIN_SRC weechat.c weechat.h alias.c alias.h backtrace.c backtrace.h
|
||||
command.c command.h completion.c completion.h weelist.c weelist.h weeconfig.c
|
||||
weeconfig.h history.c history.h hotlist.c hotlist.h log.c log.h fifo.c fifo.h
|
||||
session.c session.h utf8.c utf8.h util.c util.h)
|
||||
|
||||
# Check for flock support
|
||||
INCLUDE(CheckSymbolExists)
|
||||
CHECK_INCLUDE_FILES("sys/file.h" HAVE_SYS_FILE_H)
|
||||
CHECK_SYMBOL_EXISTS(flock "sys/file.h" HAVE_FLOCK)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
|
||||
ADD_LIBRARY(weechat_main STATIC ${LIB_MAIN_SRC})
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,8 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(GNUTLS_CFLAGS)
|
||||
|
||||
+15
-20
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
@@ -13,8 +13,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* alias.c: WeeChat alias */
|
||||
@@ -165,7 +164,7 @@ alias_get_final_command (t_weechat_alias *alias)
|
||||
|
||||
if (alias->running)
|
||||
{
|
||||
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
|
||||
irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s circular reference when calling alias \"/%s\"\n"),
|
||||
WEECHAT_ERROR, alias->alias_name);
|
||||
@@ -299,40 +298,36 @@ alias_replace_args (char *alias_args, char *user_args)
|
||||
*/
|
||||
|
||||
char *
|
||||
alias_replace_vars (char *string)
|
||||
alias_replace_vars (t_irc_server *server, t_irc_channel *channel, char *string)
|
||||
{
|
||||
char *nick, *channel, *server;
|
||||
char *var_nick, *var_channel, *var_server;
|
||||
char empty_string[1] = { '\0' };
|
||||
char *res, *temp;
|
||||
|
||||
nick = (SERVER(gui_current_window->buffer)
|
||||
&& SERVER(gui_current_window->buffer)->nick) ?
|
||||
SERVER(gui_current_window->buffer)->nick : empty_string;
|
||||
channel = (CHANNEL(gui_current_window->buffer)) ?
|
||||
CHANNEL(gui_current_window->buffer)->name : empty_string;
|
||||
server = (SERVER(gui_current_window->buffer)) ?
|
||||
SERVER(gui_current_window->buffer)->name : empty_string;
|
||||
|
||||
var_nick = (server && server->nick) ? server->nick : empty_string;
|
||||
var_channel = (channel) ? channel->name : empty_string;
|
||||
var_server = (server) ? server->name : empty_string;
|
||||
|
||||
/* replace nick */
|
||||
temp = weechat_strreplace (string, "$nick", nick);
|
||||
temp = weechat_strreplace (string, "$nick", var_nick);
|
||||
if (!temp)
|
||||
return NULL;
|
||||
res = temp;
|
||||
|
||||
|
||||
/* replace channel */
|
||||
temp = weechat_strreplace (res, "$channel", channel);
|
||||
temp = weechat_strreplace (res, "$channel", var_channel);
|
||||
free (res);
|
||||
if (!temp)
|
||||
return NULL;
|
||||
res = temp;
|
||||
|
||||
|
||||
/* replace server */
|
||||
temp = weechat_strreplace (res, "$server", server);
|
||||
temp = weechat_strreplace (res, "$server", var_server);
|
||||
free (res);
|
||||
if (!temp)
|
||||
return NULL;
|
||||
res = temp;
|
||||
|
||||
|
||||
/* return result */
|
||||
return res;
|
||||
}
|
||||
|
||||
+5
-4
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
@@ -13,14 +13,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __WEECHAT_ALIAS_H
|
||||
#define __WEECHAT_ALIAS_H 1
|
||||
|
||||
#include "../irc/irc.h"
|
||||
|
||||
typedef struct t_weechat_alias t_weechat_alias;
|
||||
|
||||
struct t_weechat_alias
|
||||
@@ -39,7 +40,7 @@ extern t_weechat_alias *alias_search (char *);
|
||||
extern t_weechat_alias *alias_new (char *, char *);
|
||||
extern char *alias_get_final_command (t_weechat_alias *);
|
||||
extern char *alias_replace_args (char *, char *);
|
||||
extern char *alias_replace_vars (char *);
|
||||
extern char *alias_replace_vars (t_irc_server *, t_irc_channel *, char *);
|
||||
extern void alias_free (t_weechat_alias *);
|
||||
extern void alias_free_all ();
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
@@ -13,8 +13,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* backtrace.c: display backtrace after a segfault */
|
||||
@@ -136,7 +135,7 @@ weechat_backtrace_addr2line (int number, void *address, char *symbol)
|
||||
number, function_name);
|
||||
pclose (output);
|
||||
#else
|
||||
/* make gcc happy */
|
||||
/* make C compiler happy */
|
||||
(void) number;
|
||||
(void) address;
|
||||
(void) symbol;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
@@ -13,8 +13,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
+1485
-777
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
@@ -13,8 +13,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
@@ -53,6 +52,7 @@ extern t_weelist *last_index_command;
|
||||
|
||||
extern void command_index_build ();
|
||||
extern void command_index_free ();
|
||||
extern int command_used_by_weechat (char *);
|
||||
extern char **split_multi_command (char *, char);
|
||||
extern void free_multi_command (char **);
|
||||
extern int exec_weechat_command (t_irc_server *, t_irc_channel *, char *, int);
|
||||
@@ -72,6 +72,7 @@ extern int weechat_cmd_ignore (t_irc_server *, t_irc_channel *, int, char **);
|
||||
extern int weechat_cmd_key (t_irc_server *, t_irc_channel *, char *);
|
||||
extern int weechat_cmd_panel (t_irc_server *, t_irc_channel *, int, char **);
|
||||
extern int weechat_cmd_plugin (t_irc_server *, t_irc_channel *, int, char **);
|
||||
extern int weechat_cmd_reconnect (t_irc_server *, t_irc_channel *, int, char **);
|
||||
extern int weechat_cmd_save (t_irc_server *, t_irc_channel *, int, char **);
|
||||
extern int weechat_cmd_server (t_irc_server *, t_irc_channel *, int, char **);
|
||||
extern int weechat_cmd_set (t_irc_server *, t_irc_channel *, char *);
|
||||
|
||||
+374
-173
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
@@ -13,8 +13,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* completion.c: completes words according to context (cmd/nick) */
|
||||
@@ -95,12 +94,14 @@ completion_free (t_completion *completion)
|
||||
free (completion->args);
|
||||
completion->args = NULL;
|
||||
|
||||
while (completion->completion_list)
|
||||
weelist_remove (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
completion->completion_list);
|
||||
weelist_remove_all (&completion->completion_list,
|
||||
&completion->last_completion);
|
||||
completion->completion_list = NULL;
|
||||
completion->last_completion = NULL;
|
||||
|
||||
if (completion->word_found)
|
||||
free (completion->word_found);
|
||||
completion->word_found = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -203,20 +204,96 @@ completion_get_command_infos (t_completion *completion,
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_is_only_alphanum: return 1 if there is only alpha/num chars
|
||||
* in a string
|
||||
*/
|
||||
|
||||
int
|
||||
completion_is_only_alphanum (char *string)
|
||||
{
|
||||
while (string[0])
|
||||
{
|
||||
if (strchr (cfg_look_nick_completion_ignore, string[0]))
|
||||
return 0;
|
||||
string++;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_strdup_alphanum: duplicate alpha/num chars in a string
|
||||
*/
|
||||
|
||||
char *
|
||||
completion_strdup_alphanum (char *string)
|
||||
{
|
||||
char *result, *pos;
|
||||
|
||||
result = (char *)malloc (strlen (string) + 1);
|
||||
pos = result;
|
||||
while (string[0])
|
||||
{
|
||||
if (!strchr (cfg_look_nick_completion_ignore, string[0]))
|
||||
{
|
||||
pos[0] = string[0];
|
||||
pos++;
|
||||
}
|
||||
string++;
|
||||
}
|
||||
pos[0] = '\0';
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_nickncmp: locale and case independent string comparison
|
||||
* with max length for nicks (alpha or digits only)
|
||||
*/
|
||||
|
||||
int
|
||||
completion_nickncmp (char *base_word, char *nick, int max)
|
||||
{
|
||||
char *base_word2, *nick2;
|
||||
int return_cmp;
|
||||
|
||||
if (!cfg_look_nick_completion_ignore
|
||||
|| !cfg_look_nick_completion_ignore[0]
|
||||
|| !base_word || !nick || !base_word[0] || !nick[0]
|
||||
|| (!completion_is_only_alphanum (base_word)))
|
||||
return ascii_strncasecmp (base_word, nick, max);
|
||||
|
||||
base_word2 = completion_strdup_alphanum (base_word);
|
||||
nick2 = completion_strdup_alphanum (nick);
|
||||
|
||||
return_cmp = ascii_strncasecmp (base_word2, nick2, strlen (base_word2));
|
||||
|
||||
free (base_word2);
|
||||
free (nick2);
|
||||
|
||||
return return_cmp;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_list_add: add a word to completion word list
|
||||
*/
|
||||
|
||||
void
|
||||
completion_list_add (t_completion *completion, char *word)
|
||||
completion_list_add (t_completion *completion, char *word,
|
||||
int nick_completion, int position)
|
||||
{
|
||||
if (!word || !word[0])
|
||||
return;
|
||||
|
||||
if (!completion->base_word || !completion->base_word[0]
|
||||
|| (ascii_strncasecmp (completion->base_word, word,
|
||||
strlen (completion->base_word)) == 0))
|
||||
|| (nick_completion && (completion_nickncmp (completion->base_word, word,
|
||||
strlen (completion->base_word)) == 0))
|
||||
|| (!nick_completion && (ascii_strncasecmp (completion->base_word, word,
|
||||
strlen (completion->base_word)) == 0)))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
word);
|
||||
word,
|
||||
position);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +308,8 @@ completion_list_add_alias (t_completion *completion)
|
||||
|
||||
for (ptr_alias = weechat_alias; ptr_alias; ptr_alias = ptr_alias->next_alias)
|
||||
{
|
||||
completion_list_add (completion, ptr_alias->alias_name);
|
||||
completion_list_add (completion, ptr_alias->alias_name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +324,7 @@ completion_list_add_alias_cmd (t_completion *completion)
|
||||
|
||||
for (ptr_list = index_commands; ptr_list; ptr_list = ptr_list->next_weelist)
|
||||
{
|
||||
completion_list_add (completion, ptr_list->data);
|
||||
completion_list_add (completion, ptr_list->data, 0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,24 +337,31 @@ completion_list_add_channel (t_completion *completion)
|
||||
{
|
||||
if (completion->channel)
|
||||
completion_list_add (completion,
|
||||
((t_irc_channel *)(completion->channel))->name);
|
||||
((t_irc_channel *)(completion->channel))->name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_list_add_server_channels: add server channels to completion list
|
||||
* completion_list_add_channels: add server channels to completion list
|
||||
*/
|
||||
|
||||
void
|
||||
completion_list_add_server_channels (t_completion *completion)
|
||||
completion_list_add_channels (t_completion *completion)
|
||||
{
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
|
||||
if (completion->server)
|
||||
{
|
||||
for (ptr_channel = ((t_irc_server *)(completion->server))->channels;
|
||||
ptr_channel; ptr_channel = ptr_channel->next_channel)
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
completion_list_add (completion, ptr_channel->name);
|
||||
for (ptr_channel = ptr_server->channels;
|
||||
ptr_channel; ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
completion_list_add (completion, ptr_channel->name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,7 +446,8 @@ completion_list_add_filename (t_completion *completion)
|
||||
entry->d_name,
|
||||
S_ISDIR(statbuf.st_mode) ? DIR_SEPARATOR : "");
|
||||
|
||||
completion_list_add (completion, buffer);
|
||||
completion_list_add (completion, buffer,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -392,11 +478,12 @@ completion_list_add_plugin_cmd (t_completion *completion)
|
||||
ptr_handler; ptr_handler = ptr_handler->next_handler)
|
||||
{
|
||||
if (ptr_handler->type == PLUGIN_HANDLER_COMMAND)
|
||||
completion_list_add (completion, ptr_handler->command);
|
||||
completion_list_add (completion, ptr_handler->command,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* make gcc happy */
|
||||
/* make C compiler happy */
|
||||
(void) completion;
|
||||
#endif
|
||||
}
|
||||
@@ -413,7 +500,8 @@ completion_list_add_irc_cmd_sent (t_completion *completion)
|
||||
for (i = 0; irc_commands[i].command_name; i++)
|
||||
{
|
||||
if (irc_commands[i].cmd_function_args || irc_commands[i].cmd_function_1arg)
|
||||
completion_list_add (completion, irc_commands[i].command_name);
|
||||
completion_list_add (completion, irc_commands[i].command_name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +517,8 @@ completion_list_add_irc_cmd_recv (t_completion *completion)
|
||||
for (i = 0; irc_commands[i].command_name; i++)
|
||||
{
|
||||
if (irc_commands[i].recv_function)
|
||||
completion_list_add(completion, irc_commands[i].command_name);
|
||||
completion_list_add(completion, irc_commands[i].command_name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,7 +533,8 @@ completion_list_add_key_cmd (t_completion *completion)
|
||||
|
||||
for (i = 0; gui_key_functions[i].function_name; i++)
|
||||
{
|
||||
completion_list_add (completion, gui_key_functions[i].function_name);
|
||||
completion_list_add (completion, gui_key_functions[i].function_name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -455,9 +545,62 @@ completion_list_add_key_cmd (t_completion *completion)
|
||||
void
|
||||
completion_list_add_self_nick (t_completion *completion)
|
||||
{
|
||||
if (completion->server)
|
||||
completion_list_add (completion,
|
||||
((t_irc_server *)(completion->server))->nick,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_list_add_server_nicks: add server nicks to completion list
|
||||
*/
|
||||
|
||||
void
|
||||
completion_list_add_server_nicks (t_completion *completion)
|
||||
{
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
if (completion->server)
|
||||
{
|
||||
completion_list_add (completion, ((t_irc_server *)(completion->server))->nick);
|
||||
for (ptr_server = (t_irc_server *)(completion->server); ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
for (ptr_channel = ptr_server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if ((!completion->channel || (t_irc_channel *)(completion->channel) != ptr_channel)
|
||||
&& (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL))
|
||||
{
|
||||
for (ptr_nick = ptr_channel->nicks; ptr_nick;
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
completion_list_add (completion, ptr_nick->nick,
|
||||
1, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* add current channel nicks at beginning */
|
||||
if (completion->channel && (((t_irc_channel *)(completion->channel))->type == IRC_CHANNEL_TYPE_CHANNEL))
|
||||
{
|
||||
for (ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
|
||||
ptr_nick; ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
completion_list_add (completion, ptr_nick->nick,
|
||||
1, WEELIST_POS_BEGINNING);
|
||||
}
|
||||
}
|
||||
|
||||
/* add self nick at the end */
|
||||
if (completion->server)
|
||||
completion_list_add (completion,
|
||||
((t_irc_server *)(completion->server))->nick,
|
||||
1, WEELIST_POS_END);
|
||||
|
||||
completion->arg_is_nick = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,22 +612,45 @@ void
|
||||
completion_list_add_channel_nicks (t_completion *completion)
|
||||
{
|
||||
t_irc_nick *ptr_nick;
|
||||
t_weelist *ptr_weelist;
|
||||
|
||||
if (completion->channel)
|
||||
{
|
||||
if (((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_CHANNEL)
|
||||
if (((t_irc_channel *)(completion->channel))->type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
{
|
||||
/* add channel nicks */
|
||||
for (ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
|
||||
ptr_nick; ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
completion_list_add (completion, ptr_nick->nick);
|
||||
completion_list_add (completion, ptr_nick->nick,
|
||||
1, WEELIST_POS_SORT);
|
||||
}
|
||||
|
||||
/* add nicks speaking recently on this channel */
|
||||
if (cfg_look_nick_completion_smart)
|
||||
{
|
||||
for (ptr_weelist = ((t_irc_channel *)(completion->channel))->nicks_speaking;
|
||||
ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (irc_nick_search ((t_irc_channel *)(completion->channel),
|
||||
ptr_weelist->data))
|
||||
completion_list_add (completion, ptr_weelist->data,
|
||||
1, WEELIST_POS_BEGINNING);
|
||||
}
|
||||
}
|
||||
|
||||
/* add self nick at the end */
|
||||
if (completion->server)
|
||||
completion_list_add (completion,
|
||||
((t_irc_server *)(completion->server))->nick,
|
||||
1, WEELIST_POS_END);
|
||||
}
|
||||
if ((((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_PRIVATE)
|
||||
|| (((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_DCC_CHAT))
|
||||
if ((((t_irc_channel *)(completion->channel))->type == IRC_CHANNEL_TYPE_PRIVATE)
|
||||
|| (((t_irc_channel *)(completion->channel))->type == IRC_CHANNEL_TYPE_DCC_CHAT))
|
||||
{
|
||||
completion_list_add (completion,
|
||||
((t_irc_channel *)(completion->channel))->name);
|
||||
((t_irc_channel *)(completion->channel))->name,
|
||||
1, WEELIST_POS_SORT);
|
||||
}
|
||||
completion->arg_is_nick = 1;
|
||||
}
|
||||
@@ -503,12 +669,13 @@ completion_list_add_channel_nicks_hosts (t_completion *completion)
|
||||
|
||||
if (completion->channel)
|
||||
{
|
||||
if (((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_CHANNEL)
|
||||
if (((t_irc_channel *)(completion->channel))->type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
{
|
||||
for (ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
|
||||
ptr_nick; ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
completion_list_add (completion, ptr_nick->nick);
|
||||
completion_list_add (completion, ptr_nick->nick,
|
||||
1, WEELIST_POS_SORT);
|
||||
if (ptr_nick->host)
|
||||
{
|
||||
length = strlen (ptr_nick->nick) + 1 +
|
||||
@@ -518,17 +685,19 @@ completion_list_add_channel_nicks_hosts (t_completion *completion)
|
||||
{
|
||||
snprintf (buf, length, "%s!%s",
|
||||
ptr_nick->nick, ptr_nick->host);
|
||||
completion_list_add (completion, buf);
|
||||
completion_list_add (completion, buf,
|
||||
1, WEELIST_POS_SORT);
|
||||
free (buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_PRIVATE)
|
||||
|| (((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_PRIVATE))
|
||||
if ((((t_irc_channel *)(completion->channel))->type == IRC_CHANNEL_TYPE_PRIVATE)
|
||||
|| (((t_irc_channel *)(completion->channel))->type == IRC_CHANNEL_TYPE_PRIVATE))
|
||||
{
|
||||
completion_list_add (completion,
|
||||
((t_irc_channel *)(completion->channel))->name);
|
||||
((t_irc_channel *)(completion->channel))->name,
|
||||
1, WEELIST_POS_SORT);
|
||||
}
|
||||
completion->arg_is_nick = 1;
|
||||
}
|
||||
@@ -553,7 +722,8 @@ completion_list_add_option (t_completion *completion)
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
{
|
||||
completion_list_add (completion,
|
||||
weechat_options[i][j].option_name);
|
||||
weechat_options[i][j].option_name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -565,7 +735,7 @@ completion_list_add_option (t_completion *completion)
|
||||
snprintf (option_name, sizeof (option_name), "%s.%s",
|
||||
ptr_server->name,
|
||||
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
|
||||
completion_list_add (completion, option_name);
|
||||
completion_list_add (completion, option_name, 0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -583,10 +753,10 @@ completion_list_add_plugin_option (t_completion *completion)
|
||||
for (ptr_option = plugin_options; ptr_option;
|
||||
ptr_option = ptr_option->next_option)
|
||||
{
|
||||
completion_list_add (completion, ptr_option->name);
|
||||
completion_list_add (completion, ptr_option->name, 0, WEELIST_POS_SORT);
|
||||
}
|
||||
#else
|
||||
/* make gcc happy */
|
||||
/* make C compiler happy */
|
||||
(void) completion;
|
||||
#endif
|
||||
}
|
||||
@@ -599,7 +769,8 @@ void
|
||||
completion_list_add_part (t_completion *completion)
|
||||
{
|
||||
if (cfg_irc_default_msg_part && cfg_irc_default_msg_part[0])
|
||||
completion_list_add (completion, cfg_irc_default_msg_part);
|
||||
completion_list_add (completion, cfg_irc_default_msg_part,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -615,10 +786,11 @@ completion_list_add_plugin (t_completion *completion)
|
||||
for (ptr_plugin = weechat_plugins; ptr_plugin;
|
||||
ptr_plugin = ptr_plugin->next_plugin)
|
||||
{
|
||||
completion_list_add (completion, ptr_plugin->name);
|
||||
completion_list_add (completion, ptr_plugin->name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
#else
|
||||
/* make gcc happy */
|
||||
/* make C compiler happy */
|
||||
(void) completion;
|
||||
#endif
|
||||
}
|
||||
@@ -631,7 +803,8 @@ void
|
||||
completion_list_add_quit (t_completion *completion)
|
||||
{
|
||||
if (cfg_irc_default_msg_quit && cfg_irc_default_msg_quit[0])
|
||||
completion_list_add (completion, cfg_irc_default_msg_quit);
|
||||
completion_list_add (completion, cfg_irc_default_msg_quit,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -643,7 +816,8 @@ completion_list_add_server (t_completion *completion)
|
||||
{
|
||||
if (completion->server)
|
||||
completion_list_add (completion,
|
||||
((t_irc_server *)(completion->server))->name);
|
||||
((t_irc_server *)(completion->server))->name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -658,7 +832,8 @@ completion_list_add_servers (t_completion *completion)
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
completion_list_add (completion, ptr_server->name);
|
||||
completion_list_add (completion, ptr_server->name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -671,19 +846,18 @@ completion_list_add_topic (t_completion *completion)
|
||||
{
|
||||
char *string;
|
||||
|
||||
if (!completion->server || !completion->channel
|
||||
|| !((t_irc_channel *)(completion->channel))->topic
|
||||
|| !((t_irc_channel *)(completion->channel))->topic[0])
|
||||
completion_stop (completion);
|
||||
else
|
||||
if (completion->server && completion->channel
|
||||
&& ((t_irc_channel *)(completion->channel))->topic
|
||||
&& ((t_irc_channel *)(completion->channel))->topic[0])
|
||||
{
|
||||
if (cfg_irc_colors_send)
|
||||
string = (char *)gui_color_decode_for_user_entry ((unsigned char *)((t_irc_channel *)(completion->channel))->topic);
|
||||
else
|
||||
string = (char *)gui_color_decode ((unsigned char *)((t_irc_channel *)(completion->channel))->topic, 0);
|
||||
string = (char *)gui_color_decode ((unsigned char *)((t_irc_channel *)(completion->channel))->topic, 0, 0);
|
||||
completion_list_add (completion,
|
||||
(string) ?
|
||||
string : ((t_irc_channel *)(completion->channel))->topic);
|
||||
string : ((t_irc_channel *)(completion->channel))->topic,
|
||||
0, WEELIST_POS_SORT);
|
||||
if (string)
|
||||
free (string);
|
||||
}
|
||||
@@ -715,26 +889,31 @@ completion_list_add_option_value (t_completion *completion)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
if (option_value && (*((int *)(option_value))))
|
||||
completion_list_add (completion, "on");
|
||||
completion_list_add (completion, "on",
|
||||
0, WEELIST_POS_SORT);
|
||||
else
|
||||
completion_list_add (completion, "off");
|
||||
completion_list_add (completion, "off",
|
||||
0, WEELIST_POS_SORT);
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
snprintf (option_string, sizeof (option_string) - 1,
|
||||
"%d", (option_value) ? *((int *)(option_value)) : option->default_int);
|
||||
completion_list_add (completion, option_string);
|
||||
completion_list_add (completion, option_string,
|
||||
0, WEELIST_POS_SORT);
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
completion_list_add (completion,
|
||||
(option_value) ?
|
||||
option->array_values[*((int *)(option_value))] :
|
||||
option->array_values[option->default_int]);
|
||||
option->array_values[option->default_int],
|
||||
0, WEELIST_POS_SORT);
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
completion_list_add (completion,
|
||||
(option_value) ?
|
||||
gui_color_get_name (*((int *)(option_value))) :
|
||||
option->default_string);
|
||||
option->default_string,
|
||||
0, WEELIST_POS_SORT);
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
snprintf (option_string, sizeof (option_string) - 1,
|
||||
@@ -742,7 +921,8 @@ completion_list_add_option_value (t_completion *completion)
|
||||
((option_value) && (*((char **)(option_value)))) ?
|
||||
*((char **)(option_value)) :
|
||||
option->default_string);
|
||||
completion_list_add (completion, option_string);
|
||||
completion_list_add (completion, option_string,
|
||||
0, WEELIST_POS_SORT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -770,13 +950,14 @@ completion_list_add_plugin_option_value (t_completion *completion)
|
||||
|
||||
ptr_option = plugin_config_search_internal (completion->args);
|
||||
if (ptr_option)
|
||||
completion_list_add (completion, ptr_option->value);
|
||||
completion_list_add (completion, ptr_option->value,
|
||||
0, WEELIST_POS_SORT);
|
||||
|
||||
if (pos)
|
||||
pos[0] = ' ';
|
||||
}
|
||||
#else
|
||||
/* make gcc happy */
|
||||
/* make C compiler happy */
|
||||
(void) completion;
|
||||
#endif
|
||||
}
|
||||
@@ -792,7 +973,8 @@ completion_list_add_weechat_cmd (t_completion *completion)
|
||||
|
||||
for (i = 0; weechat_commands[i].command_name; i++)
|
||||
{
|
||||
completion_list_add (completion, weechat_commands[i].command_name);
|
||||
completion_list_add (completion, weechat_commands[i].command_name,
|
||||
0, WEELIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -821,7 +1003,8 @@ completion_build_list_template (t_completion *completion, char *template)
|
||||
word[word_offset] = '\0';
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
word);
|
||||
word,
|
||||
WEELIST_POS_SORT);
|
||||
}
|
||||
word_offset = 0;
|
||||
break;
|
||||
@@ -836,6 +1019,8 @@ completion_build_list_template (t_completion *completion, char *template)
|
||||
free (word);
|
||||
return;
|
||||
break;
|
||||
case '*': /* repeat last completion (do nothing there) */
|
||||
break;
|
||||
case 'a': /* alias */
|
||||
completion_list_add_alias (completion);
|
||||
break;
|
||||
@@ -846,7 +1031,7 @@ completion_build_list_template (t_completion *completion, char *template)
|
||||
completion_list_add_channel (completion);
|
||||
break;
|
||||
case 'C': /* all channels */
|
||||
completion_list_add_server_channels (completion);
|
||||
completion_list_add_channels (completion);
|
||||
break;
|
||||
case 'f': /* filename */
|
||||
completion_list_add_filename (completion);
|
||||
@@ -866,6 +1051,9 @@ completion_build_list_template (t_completion *completion, char *template)
|
||||
case 'm': /* self nickname */
|
||||
completion_list_add_self_nick (completion);
|
||||
break;
|
||||
case 'M': /* nicks of current server (all open channels) */
|
||||
completion_list_add_server_nicks (completion);
|
||||
break;
|
||||
case 'n': /* channel nicks */
|
||||
completion_list_add_channel_nicks (completion);
|
||||
completion->context = COMPLETION_NICK;
|
||||
@@ -928,8 +1116,10 @@ completion_build_list_template (t_completion *completion, char *template)
|
||||
void
|
||||
completion_build_list (t_completion *completion)
|
||||
{
|
||||
char *template, *pos_space;
|
||||
int max_arg, i;
|
||||
char *template, *pos_template, *pos_space;
|
||||
int repeat_last, max_arg, i, length;
|
||||
|
||||
repeat_last = 0;
|
||||
|
||||
completion_get_command_infos (completion, &template, &max_arg);
|
||||
if (!template || (strcmp (template, "-") == 0) ||
|
||||
@@ -938,25 +1128,40 @@ completion_build_list (t_completion *completion)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
i = 1;
|
||||
while (template && template[0])
|
||||
|
||||
length = strlen (template);
|
||||
if (length >= 2)
|
||||
{
|
||||
pos_space = strchr (template, ' ');
|
||||
if (strcmp (template + length - 2, "%*") == 0)
|
||||
repeat_last = 1;
|
||||
}
|
||||
|
||||
i = 1;
|
||||
pos_template = template;
|
||||
while (pos_template && pos_template[0])
|
||||
{
|
||||
pos_space = strchr (pos_template, ' ');
|
||||
if (i == completion->base_command_arg)
|
||||
{
|
||||
completion_build_list_template (completion, template);
|
||||
completion_build_list_template (completion, pos_template);
|
||||
return;
|
||||
}
|
||||
if (pos_space)
|
||||
{
|
||||
template = pos_space;
|
||||
while (template[0] == ' ')
|
||||
template++;
|
||||
pos_template = pos_space;
|
||||
while (pos_template[0] == ' ')
|
||||
pos_template++;
|
||||
}
|
||||
else
|
||||
template = NULL;
|
||||
pos_template = NULL;
|
||||
i++;
|
||||
}
|
||||
if (repeat_last)
|
||||
{
|
||||
pos_space = rindex (template, ' ');
|
||||
completion_build_list_template (completion,
|
||||
(pos_space) ? pos_space + 1 : template);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1107,7 +1312,9 @@ completion_command (t_completion *completion)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
completion->word_found = ptr_weelist->data;
|
||||
if (completion->word_found)
|
||||
free (completion->word_found);
|
||||
completion->word_found = strdup (ptr_weelist->data);
|
||||
|
||||
if (completion->direction < 0)
|
||||
ptr_weelist2 = ptr_weelist->prev_weelist;
|
||||
@@ -1146,80 +1353,12 @@ completion_command (t_completion *completion)
|
||||
}
|
||||
if (completion->word_found)
|
||||
{
|
||||
free (completion->word_found);
|
||||
completion->word_found = NULL;
|
||||
completion_command (completion);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_is_only_alphanum: return 1 if there is only alpha/num chars
|
||||
* in a string
|
||||
*/
|
||||
|
||||
int
|
||||
completion_is_only_alphanum (char *string)
|
||||
{
|
||||
while (string[0])
|
||||
{
|
||||
if (strchr (cfg_look_nick_completion_ignore, string[0]))
|
||||
return 0;
|
||||
string++;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_strdup_alphanum: duplicate alpha/num chars in a string
|
||||
*/
|
||||
|
||||
char *
|
||||
completion_strdup_alphanum (char *string)
|
||||
{
|
||||
char *result, *pos;
|
||||
|
||||
result = (char *)malloc (strlen (string) + 1);
|
||||
pos = result;
|
||||
while (string[0])
|
||||
{
|
||||
if (!strchr (cfg_look_nick_completion_ignore, string[0]))
|
||||
{
|
||||
pos[0] = string[0];
|
||||
pos++;
|
||||
}
|
||||
string++;
|
||||
}
|
||||
pos[0] = '\0';
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_nickncmp: locale and case independent string comparison
|
||||
* with max length for nicks (alpha or digits only)
|
||||
*/
|
||||
|
||||
int
|
||||
completion_nickncmp (char *base_word, char *nick, int max)
|
||||
{
|
||||
char *base_word2, *nick2;
|
||||
int return_cmp;
|
||||
|
||||
if (!cfg_look_nick_completion_ignore
|
||||
|| !cfg_look_nick_completion_ignore[0]
|
||||
|| !base_word || !nick || !base_word[0] || !nick[0]
|
||||
|| (!completion_is_only_alphanum (base_word)))
|
||||
return ascii_strncasecmp (base_word, nick, max);
|
||||
|
||||
base_word2 = completion_strdup_alphanum (base_word);
|
||||
nick2 = completion_strdup_alphanum (nick);
|
||||
|
||||
return_cmp = ascii_strncasecmp (base_word2, nick2, strlen (base_word2));
|
||||
|
||||
free (base_word2);
|
||||
free (nick2);
|
||||
|
||||
return return_cmp;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_command_arg: complete a command argument
|
||||
*/
|
||||
@@ -1245,7 +1384,9 @@ completion_command_arg (t_completion *completion, int nick_completion)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
completion->word_found = ptr_weelist->data;
|
||||
if (completion->word_found)
|
||||
free (completion->word_found);
|
||||
completion->word_found = strdup (ptr_weelist->data);
|
||||
|
||||
if (completion->direction < 0)
|
||||
ptr_weelist2 = ptr_weelist->prev_weelist;
|
||||
@@ -1286,6 +1427,7 @@ completion_command_arg (t_completion *completion, int nick_completion)
|
||||
}
|
||||
if (completion->word_found)
|
||||
{
|
||||
free (completion->word_found);
|
||||
completion->word_found = NULL;
|
||||
completion_command_arg (completion, nick_completion);
|
||||
}
|
||||
@@ -1299,45 +1441,98 @@ void
|
||||
completion_nick (t_completion *completion)
|
||||
{
|
||||
int length, word_found_seen, other_completion;
|
||||
t_irc_nick *ptr_nick, *ptr_nick2;
|
||||
t_irc_nick *ptr_nick;
|
||||
t_weelist *ptr_weelist, *ptr_weelist2;
|
||||
|
||||
if (!completion->channel)
|
||||
return;
|
||||
|
||||
completion->context = COMPLETION_NICK;
|
||||
|
||||
if ((((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_PRIVATE)
|
||||
|| (((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_DCC_CHAT))
|
||||
if ((((t_irc_channel *)(completion->channel))->type == IRC_CHANNEL_TYPE_PRIVATE)
|
||||
|| (((t_irc_channel *)(completion->channel))->type == IRC_CHANNEL_TYPE_DCC_CHAT))
|
||||
{
|
||||
if (!(completion->completion_list))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_channel *)(completion->channel))->name);
|
||||
((t_irc_channel *)(completion->channel))->name,
|
||||
WEELIST_POS_SORT);
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_server *)(completion->server))->nick);
|
||||
((t_irc_server *)(completion->server))->nick,
|
||||
WEELIST_POS_SORT);
|
||||
}
|
||||
completion_command_arg (completion, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
/* rebuild nick list for completion, with nicks speaking at beginning of list */
|
||||
if ((((t_irc_channel *)(completion->channel))->nick_completion_reset)
|
||||
|| (!(completion->completion_list)))
|
||||
{
|
||||
/* empty completion list */
|
||||
if (completion->completion_list)
|
||||
{
|
||||
weelist_remove_all (&(completion->completion_list),
|
||||
&(completion->last_completion));
|
||||
completion->completion_list = NULL;
|
||||
completion->last_completion = NULL;
|
||||
}
|
||||
|
||||
/* add channel nicks */
|
||||
for (ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
|
||||
ptr_nick; ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
weelist_add (&(completion->completion_list),
|
||||
&(completion->last_completion),
|
||||
ptr_nick->nick,
|
||||
WEELIST_POS_SORT);
|
||||
}
|
||||
|
||||
/* add nicks speaking recently on this channel */
|
||||
if (cfg_look_nick_completion_smart)
|
||||
{
|
||||
for (ptr_weelist = ((t_irc_channel *)(completion->channel))->nicks_speaking;
|
||||
ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (irc_nick_search ((t_irc_channel *)(completion->channel),
|
||||
ptr_weelist->data))
|
||||
weelist_add (&(completion->completion_list),
|
||||
&(completion->last_completion),
|
||||
ptr_weelist->data,
|
||||
WEELIST_POS_BEGINNING);
|
||||
}
|
||||
}
|
||||
|
||||
/* add self nick at the end */
|
||||
if (completion->server)
|
||||
weelist_add (&(completion->completion_list),
|
||||
&(completion->last_completion),
|
||||
((t_irc_server *)(completion->server))->nick,
|
||||
WEELIST_POS_END);
|
||||
|
||||
((t_irc_channel *)(completion->channel))->nick_completion_reset = 0;
|
||||
}
|
||||
|
||||
length = strlen (completion->base_word);
|
||||
word_found_seen = 0;
|
||||
other_completion = 0;
|
||||
|
||||
if (completion->direction < 0)
|
||||
ptr_nick = ((t_irc_channel *)(completion->channel))->last_nick;
|
||||
else
|
||||
ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
|
||||
|
||||
while (ptr_nick)
|
||||
if (completion->direction < 0)
|
||||
ptr_weelist = completion->last_completion;
|
||||
else
|
||||
ptr_weelist = completion->completion_list;
|
||||
|
||||
while (ptr_weelist)
|
||||
{
|
||||
if (completion_nickncmp (completion->base_word, ptr_nick->nick, length) == 0)
|
||||
if (completion_nickncmp (completion->base_word, ptr_weelist->data, length) == 0)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
completion->word_found = ptr_nick->nick;
|
||||
if (completion->word_found)
|
||||
free (completion->word_found);
|
||||
completion->word_found = strdup (ptr_weelist->data);
|
||||
if (cfg_look_nick_complete_first)
|
||||
{
|
||||
completion->position = -1;
|
||||
@@ -1345,21 +1540,21 @@ completion_nick (t_completion *completion)
|
||||
}
|
||||
|
||||
if (completion->direction < 0)
|
||||
ptr_nick2 = ptr_nick->prev_nick;
|
||||
ptr_weelist2 = ptr_weelist->prev_weelist;
|
||||
else
|
||||
ptr_nick2 = ptr_nick->next_nick;
|
||||
ptr_weelist2 = ptr_weelist->next_weelist;
|
||||
|
||||
while (ptr_nick2)
|
||||
while (ptr_weelist2)
|
||||
{
|
||||
if (completion_nickncmp (completion->base_word,
|
||||
ptr_nick2->nick,
|
||||
ptr_weelist2->data,
|
||||
length) == 0)
|
||||
other_completion++;
|
||||
|
||||
|
||||
if (completion->direction < 0)
|
||||
ptr_nick2 = ptr_nick2->prev_nick;
|
||||
ptr_weelist2 = ptr_weelist2->prev_weelist;
|
||||
else
|
||||
ptr_nick2 = ptr_nick2->next_nick;
|
||||
ptr_weelist2 = ptr_weelist2->next_weelist;
|
||||
}
|
||||
|
||||
if (other_completion == 0)
|
||||
@@ -1374,16 +1569,17 @@ completion_nick (t_completion *completion)
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(ascii_strcasecmp (ptr_nick->nick, completion->word_found) == 0))
|
||||
(ascii_strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
word_found_seen = 1;
|
||||
|
||||
|
||||
if (completion->direction < 0)
|
||||
ptr_nick = ptr_nick->prev_nick;
|
||||
ptr_weelist = ptr_weelist->prev_weelist;
|
||||
else
|
||||
ptr_nick = ptr_nick->next_nick;
|
||||
ptr_weelist = ptr_weelist->next_weelist;
|
||||
}
|
||||
if (completion->word_found)
|
||||
{
|
||||
free (completion->word_found);
|
||||
completion->word_found = NULL;
|
||||
completion_nick (completion);
|
||||
}
|
||||
@@ -1407,10 +1603,10 @@ completion_auto (t_completion *completion)
|
||||
}
|
||||
|
||||
/* channel completion */
|
||||
if (string_is_channel (completion->base_word))
|
||||
if (irc_channel_is_channel (completion->base_word))
|
||||
{
|
||||
if (!completion->completion_list)
|
||||
completion_list_add_server_channels (completion);
|
||||
completion_list_add_channels (completion);
|
||||
completion_command_arg (completion, 0);
|
||||
return;
|
||||
}
|
||||
@@ -1437,12 +1633,15 @@ completion_search (t_completion *completion, int direction,
|
||||
/* if new completion => look for base word */
|
||||
if (pos != completion->position)
|
||||
{
|
||||
if (completion->word_found)
|
||||
free (completion->word_found);
|
||||
completion->word_found = NULL;
|
||||
completion_find_context (completion, buffer, size, pos);
|
||||
}
|
||||
|
||||
/* completion */
|
||||
old_word_found = completion->word_found;
|
||||
old_word_found = (completion->word_found) ?
|
||||
strdup (completion->word_found) : NULL;
|
||||
switch (completion->context)
|
||||
{
|
||||
case COMPLETION_NULL:
|
||||
@@ -1489,6 +1688,8 @@ completion_search (t_completion *completion, int direction,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (old_word_found)
|
||||
free (old_word_found);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user