mirror of
https://github.com/weechat/weechat.git
synced 2026-06-20 18:14:46 +02:00
Compare commits
192 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b738f4c8aa | |||
| 6f3b6d9e50 | |||
| def35c5a66 | |||
| da4ee1a6ee | |||
| 7c31dd9189 | |||
| dbad2a0206 | |||
| ec1d57063c | |||
| 5bd56f86c6 | |||
| 2fab4da03d | |||
| c69c77507c | |||
| b330ec3dae | |||
| ae8f8a5700 | |||
| 5e8b47f187 | |||
| f4abd0bf59 | |||
| abe7e08147 | |||
| 4e9193a943 | |||
| bbd373c44d | |||
| 6b011234cf | |||
| 71a76ada48 | |||
| a7ddb89076 | |||
| 6fe262c131 | |||
| 0a32bc5326 | |||
| 70fe8e9472 | |||
| b0310b6e78 | |||
| 8218316502 | |||
| d00c99f292 | |||
| f72e5952f2 | |||
| ebf5f9e66d | |||
| 7330dc862a | |||
| 9eb1422bb7 | |||
| d86a783b6a | |||
| 5b3f96dace | |||
| 821c2e87c8 | |||
| 1de7b52aa2 | |||
| 4d4a667094 | |||
| 0eb3d45582 | |||
| 7c63a73999 | |||
| 2ab3467c05 | |||
| 37d74c4941 | |||
| 01186c6c8b | |||
| 29ffe7e0d8 | |||
| a8619181b7 | |||
| 5a90270a79 | |||
| 3900a0f5ae | |||
| 5f46617b11 | |||
| 68ec2acbb3 | |||
| e7041a467b | |||
| ee2121b917 | |||
| bff5f95056 | |||
| 2b178c73fa | |||
| 13d8a4f093 | |||
| b935a02ceb | |||
| e7c899014c | |||
| f88b75b241 | |||
| c8ad30020b | |||
| c6fc8bd147 | |||
| eda55fbdb4 | |||
| dca4064502 | |||
| 8a3d30b03a | |||
| 40d02fdffd | |||
| 7cc2635652 | |||
| df2f164ffc | |||
| eb0b722ee5 | |||
| 04d6257224 | |||
| 73c69d2d71 | |||
| 2f9f37bed6 | |||
| d90587c443 | |||
| 992632857f | |||
| 5ebab583f6 | |||
| ca117dbb24 | |||
| 40c348df7a | |||
| 0b781f96f7 | |||
| 5090689a76 | |||
| a92ca4961b | |||
| ae8a4633ef | |||
| 38505d02dd | |||
| 20dcc4f56e | |||
| 36b2e10497 | |||
| cec88e0047 | |||
| 3198879ff2 | |||
| 88a6fc7f16 | |||
| fbcd5b3673 | |||
| 7fe5afe3cb | |||
| 212ca071c6 | |||
| f5074da156 | |||
| a23af790df | |||
| 6d1d1a7b90 | |||
| 0b78294f1a | |||
| 2580406aa7 | |||
| bbd4011020 | |||
| 1524432007 | |||
| 09242c3ba6 | |||
| bba97304a0 | |||
| 32851b7758 | |||
| 4322501ebd | |||
| 39d14185a1 | |||
| c3f5e88286 | |||
| 89c311646f | |||
| bcd4623a6d | |||
| 8270b50548 | |||
| 6e253245fe | |||
| 47d03e7dee | |||
| 9fbd33faaf | |||
| 5301c75021 | |||
| 7f165b4c7c | |||
| 9526e4a79d | |||
| 2b79d0fe5c | |||
| de43c7984a | |||
| f78eb88e5a | |||
| 4b5b5354da | |||
| ac446e9c1f | |||
| 951ec2e7be | |||
| bce7a0e961 | |||
| 7433015842 | |||
| 57daa68be5 | |||
| d310a8e960 | |||
| 4281d09a95 | |||
| 7dedba18bf | |||
| 90e4e34f8c | |||
| 12026ef17e | |||
| 46234f0504 | |||
| 4d4d697b17 | |||
| 3686d92cb5 | |||
| 64c33a8295 | |||
| 7596736ae9 | |||
| 8f55d297e6 | |||
| 5238dba084 | |||
| 81e700ea43 | |||
| a13f301d49 | |||
| 575565371b | |||
| 24d0c49ae4 | |||
| 559b651669 | |||
| 6199f9b629 | |||
| 6e60c95056 | |||
| 73f6606771 | |||
| e3088336ab | |||
| 3e81666752 | |||
| 6d0be7db4b | |||
| 5cdcfdebb7 | |||
| ca50f2c8fc | |||
| 84f84823c9 | |||
| 0d21ca207d | |||
| 235d96d728 | |||
| 58417dddc6 | |||
| b3d66118b4 | |||
| 0473d2c8db | |||
| 34ce958df9 | |||
| dfc1c0370d | |||
| 89d9fb641e | |||
| a55da76244 | |||
| e90e206b35 | |||
| 8ede80b2b6 | |||
| 1af0359046 | |||
| 9c67fdf3ea | |||
| 0c695733b3 | |||
| df4ed3eeba | |||
| 85bd530a88 | |||
| 8921e45815 | |||
| 74b83e5294 | |||
| 4fa9edeb56 | |||
| 4d3e76eb3e | |||
| c48ee3cd73 | |||
| 9a7b7af41c | |||
| 7debba0eca | |||
| a0255a0a3a | |||
| 159fa3d806 | |||
| 07686bf69b | |||
| f877e8be51 | |||
| 757d00ab48 | |||
| ecb6ed6707 | |||
| 9d0b6fad72 | |||
| 63d6ee1007 | |||
| 6a1230de54 | |||
| 684f43298e | |||
| 26af7b49fd | |||
| 1ee8e1edb2 | |||
| a5bbd513b7 | |||
| 88930e50dd | |||
| 555999534e | |||
| 64601fc662 | |||
| d8360af103 | |||
| 55c042d604 | |||
| 6d3c24361d | |||
| 2f5c9a8fd4 | |||
| 96fc2c9aec | |||
| aca19813ad | |||
| 7dbaec1abf | |||
| 3b05b6bafe | |||
| 82265b629b | |||
| a3e3113e4e | |||
| b2c5317e17 | |||
| 9adb547b36 |
@@ -0,0 +1,996 @@
|
||||
1 Notes on the Free Translation Project
|
||||
***************************************
|
||||
|
||||
Free software is going international! The Free Translation Project is
|
||||
a way to get maintainers of free software, translators, and users all
|
||||
together, so that free software will gradually become able to speak many
|
||||
languages. A few packages already provide translations for their
|
||||
messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do _not_
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work on translations can contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
1.1 Quick configuration advice
|
||||
==============================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias, message inheritance, automatic
|
||||
charset conversion or plural form handling) as the implementation here.
|
||||
It is also not possible to offer this additional functionality on top
|
||||
of a `catgets' implementation. Future versions of GNU `gettext' will
|
||||
very likely convey even more functionality. So it might be a good idea
|
||||
to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need _not_ provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
1.2 INSTALL Matters
|
||||
===================
|
||||
|
||||
Some packages are "localizable" when properly installed; the programs
|
||||
they contain can be made to speak your own native language. Most such
|
||||
packages use GNU `gettext'. Other packages have their own ways to
|
||||
internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system already
|
||||
provides the GNU `gettext' functions. If not, the included GNU
|
||||
`gettext' library will be used. This library is wholly contained
|
||||
within this package, usually in the `intl/' subdirectory, so prior
|
||||
installation of the GNU `gettext' package is _not_ required.
|
||||
Installers may use special options at configuration time for changing
|
||||
the default behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --disable-nls
|
||||
|
||||
will, respectively, bypass any pre-existing `gettext' to use the
|
||||
internationalizing routines provided within this package, or else,
|
||||
_totally_ disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might not be desirable. You should use
|
||||
the more recent version of the GNU `gettext' library. I.e. if the file
|
||||
`intl/VERSION' shows that the library which comes with this package is
|
||||
more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
The configuration process will not test for the `catgets' function
|
||||
and therefore it will not be used. The reason is that even an
|
||||
emulation of `gettext' on top of `catgets' could not provide all the
|
||||
extensions of the GNU `gettext' library.
|
||||
|
||||
Internationalized packages usually have many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
1.3 Using This Package
|
||||
======================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
||||
suppose that you speak German and live in Germany. At the shell
|
||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
||||
This can be done from your `.login' or `.profile' file, once and for
|
||||
all.
|
||||
|
||||
You might think that the country code specification is redundant.
|
||||
But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
||||
language and `CC' denoting the country, is the one use on systems based
|
||||
on GNU libc. On other systems, some variations of this scheme are
|
||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
||||
locales supported by your system for your country by running the command
|
||||
`locale -a | grep '^LL''.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
This is done through a different environment variable, called
|
||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
||||
for the purpose of message handling, but you still need to have `LANG'
|
||||
set to the primary language; this is required by other parts of the
|
||||
system libraries. For example, some Swedish users who would rather
|
||||
read translations in German than English for when Swedish is not
|
||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
||||
|
||||
Special advice for Norwegian users: The language code for Norwegian
|
||||
bokma*l changed from `no' to `nb' recently (in 2003). During the
|
||||
transition period, while some message catalogs for this language are
|
||||
installed under `nb' and some older ones under `no', it's recommended
|
||||
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
|
||||
older translations are used.
|
||||
|
||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
||||
to denote the language's main dialect. For example, `de' is equivalent
|
||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
||||
(Portuguese as spoken in Portugal) in this context.
|
||||
|
||||
1.4 Translating Teams
|
||||
=====================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list. The up-to-date list of
|
||||
teams can be found at the Free Translation Project's homepage,
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
||||
area.
|
||||
|
||||
If you'd like to volunteer to _work_ at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is _not_ the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
_actively_ in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
1.5 Available Packages
|
||||
======================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of May 2005.
|
||||
The matrix shows, in regard of each package, for which languages PO
|
||||
files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB
|
||||
+-------------------------------------------------+
|
||||
GNUnet | |
|
||||
a2ps | [] [] [] [] [] |
|
||||
aegis | () |
|
||||
ant-phone | () |
|
||||
anubis | [] |
|
||||
ap-utils | |
|
||||
aspell | [] [] [] [] |
|
||||
bash | [] [] |
|
||||
batchelor | [] |
|
||||
bfd | |
|
||||
bibshelf | [] |
|
||||
binutils | [] |
|
||||
bison | [] [] |
|
||||
bluez-pin | [] [] [] [] |
|
||||
clisp | [] [] |
|
||||
console-tools | [] [] |
|
||||
coreutils | [] [] [] [] |
|
||||
cpio | |
|
||||
cpplib | [] [] [] |
|
||||
darkstat | [] () [] |
|
||||
dialog | [] [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] |
|
||||
doodle | [] |
|
||||
e2fsprogs | [] [] |
|
||||
enscript | [] [] [] [] |
|
||||
error | [] [] [] [] |
|
||||
fetchmail | [] [] () [] |
|
||||
fileutils | [] [] |
|
||||
findutils | [] [] [] |
|
||||
flex | [] [] [] |
|
||||
fslint | [] |
|
||||
gas | |
|
||||
gawk | [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] |
|
||||
gcc | [] |
|
||||
gettext-examples | [] [] [] [] |
|
||||
gettext-runtime | [] [] [] [] |
|
||||
gettext-tools | [] [] |
|
||||
gimp-print | [] [] [] [] |
|
||||
gip | |
|
||||
gliv | [] |
|
||||
glunarclock | |
|
||||
gmult | [] [] |
|
||||
gnubiff | () |
|
||||
gnucash | [] () () [] |
|
||||
gnucash-glossary | [] () |
|
||||
gpe-aerial | [] [] |
|
||||
gpe-beam | [] [] |
|
||||
gpe-calendar | [] [] |
|
||||
gpe-clock | [] [] |
|
||||
gpe-conf | [] [] |
|
||||
gpe-contacts | |
|
||||
gpe-edit | [] |
|
||||
gpe-go | [] |
|
||||
gpe-login | [] [] |
|
||||
gpe-ownerinfo | [] [] |
|
||||
gpe-sketchbook | [] [] |
|
||||
gpe-su | [] [] |
|
||||
gpe-taskmanager | [] [] |
|
||||
gpe-timesheet | [] |
|
||||
gpe-today | [] [] |
|
||||
gpe-todo | [] [] |
|
||||
gphoto2 | [] [] [] [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () |
|
||||
gramadoir | [] [] |
|
||||
grep | [] [] [] [] [] [] |
|
||||
gretl | |
|
||||
gsasl | [] |
|
||||
gss | |
|
||||
gst-plugins | [] [] [] [] [] [] |
|
||||
gstreamer | [] [] [] [] [] |
|
||||
gtick | [] () |
|
||||
gtkspell | [] [] [] |
|
||||
hello | [] [] [] [] |
|
||||
id-utils | [] [] |
|
||||
impost | |
|
||||
indent | [] [] |
|
||||
iso_3166 | |
|
||||
iso_3166_1 | [] [] [] [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | |
|
||||
iso_639 | |
|
||||
jpilot | [] |
|
||||
jtag | |
|
||||
jwhois | |
|
||||
kbd | [] [] [] [] |
|
||||
latrine | () |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] |
|
||||
libextractor | |
|
||||
libgpewidget | [] [] [] |
|
||||
libgphoto2 | [] |
|
||||
libgphoto2_port | [] |
|
||||
libgsasl | |
|
||||
libiconv | [] [] [] [] [] |
|
||||
libidn | |
|
||||
lifelines | [] () |
|
||||
lilypond | [] |
|
||||
lingoteach | |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
mailutils | [] |
|
||||
make | [] [] |
|
||||
man-db | [] () [] [] |
|
||||
minicom | [] [] |
|
||||
mysecretdiary | [] [] |
|
||||
nano | [] () [] |
|
||||
nano_1_0 | [] () [] [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] [] |
|
||||
psmisc | |
|
||||
ptx | [] [] [] |
|
||||
pwdutils | |
|
||||
python | |
|
||||
radius | [] |
|
||||
recode | [] [] [] [] [] |
|
||||
rpm | [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] [] [] [] [] [] |
|
||||
sed | [] [] |
|
||||
sh-utils | [] [] |
|
||||
shared-mime-info | [] [] |
|
||||
sharutils | [] [] [] [] [] |
|
||||
silky | |
|
||||
skencil | [] () |
|
||||
sketch | [] () |
|
||||
solfege | [] |
|
||||
soundtracker | [] [] |
|
||||
sp | [] |
|
||||
stardict | [] |
|
||||
tar | |
|
||||
texinfo | [] [] |
|
||||
textutils | [] [] [] |
|
||||
tin | () () |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] [] |
|
||||
vorbis-tools | [] [] [] [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] |
|
||||
wget | |
|
||||
xchat | [] [] [] [] [] |
|
||||
xkeyboard-config | |
|
||||
xpad | |
|
||||
+-------------------------------------------------+
|
||||
af am ar az be bg bs ca cs cy da de el en en_GB
|
||||
10 0 0 2 7 5 0 40 43 2 51 91 19 1 14
|
||||
|
||||
eo es et eu fa fi fr ga gl he hi hr hu id is
|
||||
+-----------------------------------------------+
|
||||
GNUnet | |
|
||||
a2ps | [] [] [] |
|
||||
aegis | |
|
||||
ant-phone | [] |
|
||||
anubis | [] |
|
||||
ap-utils | [] |
|
||||
aspell | [] [] |
|
||||
bash | [] [] [] [] |
|
||||
batchelor | [] [] |
|
||||
bfd | [] |
|
||||
bibshelf | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] [] |
|
||||
bluez-pin | [] [] [] [] [] [] |
|
||||
clisp | [] [] |
|
||||
console-tools | |
|
||||
coreutils | [] [] [] [] [] |
|
||||
cpio | [] [] |
|
||||
cpplib | [] [] |
|
||||
darkstat | [] () [] [] [] |
|
||||
dialog | [] [] [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] [] [] [] |
|
||||
doodle | [] |
|
||||
e2fsprogs | [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] [] [] [] |
|
||||
fetchmail | [] |
|
||||
fileutils | [] [] [] [] [] |
|
||||
findutils | [] [] [] [] |
|
||||
flex | [] [] [] |
|
||||
fslint | [] |
|
||||
gas | [] [] |
|
||||
gawk | [] [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] [] |
|
||||
gcc | [] |
|
||||
gettext-examples | [] [] [] |
|
||||
gettext-runtime | [] [] [] [] [] |
|
||||
gettext-tools | [] [] |
|
||||
gimp-print | [] [] |
|
||||
gip | [] [] [] |
|
||||
gliv | () |
|
||||
glunarclock | [] [] [] |
|
||||
gmult | [] [] |
|
||||
gnubiff | () |
|
||||
gnucash | [] () |
|
||||
gnucash-glossary | [] |
|
||||
gpe-aerial | [] [] |
|
||||
gpe-beam | [] [] |
|
||||
gpe-calendar | [] [] [] [] |
|
||||
gpe-clock | [] [] [] |
|
||||
gpe-conf | [] |
|
||||
gpe-contacts | [] |
|
||||
gpe-edit | [] [] |
|
||||
gpe-go | [] [] |
|
||||
gpe-login | [] [] [] |
|
||||
gpe-ownerinfo | [] [] [] [] [] |
|
||||
gpe-sketchbook | [] [] |
|
||||
gpe-su | [] [] [] |
|
||||
gpe-taskmanager | [] [] [] |
|
||||
gpe-timesheet | [] [] [] [] |
|
||||
gpe-today | [] [] [] [] |
|
||||
gpe-todo | [] [] [] |
|
||||
gphoto2 | [] [] [] [] |
|
||||
gprof | [] [] [] |
|
||||
gpsdrive | () () [] |
|
||||
gramadoir | [] [] |
|
||||
grep | [] [] [] [] [] [] [] [] [] [] [] |
|
||||
gretl | [] [] |
|
||||
gsasl | [] [] [] |
|
||||
gss | [] |
|
||||
gst-plugins | [] [] |
|
||||
gstreamer | |
|
||||
gtick | [] [] [] [] |
|
||||
gtkspell | [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
impost | [] [] |
|
||||
indent | [] [] [] [] [] [] [] [] [] [] |
|
||||
iso_3166 | [] [] [] |
|
||||
iso_3166_1 | [] [] [] [] [] [] [] |
|
||||
iso_3166_2 | [] |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | [] [] [] |
|
||||
iso_639 | [] [] [] [] |
|
||||
jpilot | [] [] |
|
||||
jtag | [] |
|
||||
jwhois | [] [] [] [] |
|
||||
kbd | [] [] |
|
||||
latrine | [] [] |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] |
|
||||
libextractor | |
|
||||
libgpewidget | [] [] [] [] [] |
|
||||
libgphoto2 | [] [] [] |
|
||||
libgphoto2_port | [] |
|
||||
libgsasl | [] [] |
|
||||
libiconv | [] [] [] [] [] [] [] [] [] [] |
|
||||
libidn | [] [] |
|
||||
lifelines | () |
|
||||
lilypond | |
|
||||
lingoteach | [] [] |
|
||||
lynx | [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
mailutils | [] [] |
|
||||
make | [] [] [] [] [] [] [] |
|
||||
man-db | () |
|
||||
minicom | [] [] [] [] |
|
||||
mysecretdiary | [] [] [] |
|
||||
nano | [] [] () [] |
|
||||
nano_1_0 | [] [] [] [] |
|
||||
opcodes | [] [] [] |
|
||||
parted | [] [] [] |
|
||||
psmisc | [] |
|
||||
ptx | [] [] [] [] [] [] [] [] [] |
|
||||
pwdutils | |
|
||||
python | |
|
||||
radius | [] [] |
|
||||
recode | [] [] [] [] [] [] [] |
|
||||
rpm | [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] |
|
||||
sed | [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] |
|
||||
shared-mime-info | [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] |
|
||||
silky | [] |
|
||||
skencil | [] [] |
|
||||
sketch | [] [] |
|
||||
solfege | |
|
||||
soundtracker | [] [] |
|
||||
sp | [] |
|
||||
stardict | [] |
|
||||
tar | [] [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] [] [] [] |
|
||||
tin | [] () |
|
||||
tp-robot | [] [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | [] [] |
|
||||
util-linux | [] [] [] [] [] |
|
||||
vorbis-tools | [] [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] [] [] [] |
|
||||
wget | [] [] [] [] |
|
||||
xchat | [] [] [] [] [] |
|
||||
xkeyboard-config | |
|
||||
xpad | [] [] [] |
|
||||
+-----------------------------------------------+
|
||||
eo es et eu fa fi fr ga gl he hi hr hu id is
|
||||
15 85 21 15 2 35 115 45 16 8 1 6 40 27 1
|
||||
|
||||
it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
|
||||
+--------------------------------------------------+
|
||||
GNUnet | |
|
||||
a2ps | () () [] [] () |
|
||||
aegis | () |
|
||||
ant-phone | [] |
|
||||
anubis | [] [] [] |
|
||||
ap-utils | |
|
||||
aspell | [] [] |
|
||||
bash | [] |
|
||||
batchelor | [] |
|
||||
bfd | |
|
||||
bibshelf | [] |
|
||||
binutils | |
|
||||
bison | [] [] [] [] |
|
||||
bluez-pin | [] [] |
|
||||
clisp | [] |
|
||||
console-tools | |
|
||||
coreutils | [] [] |
|
||||
cpio | |
|
||||
cpplib | [] |
|
||||
darkstat | [] [] |
|
||||
dialog | [] [] |
|
||||
diffutils | [] [] [] [] |
|
||||
doodle | [] |
|
||||
e2fsprogs | [] |
|
||||
enscript | [] |
|
||||
error | [] |
|
||||
fetchmail | [] [] |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] |
|
||||
flex | [] [] |
|
||||
fslint | [] |
|
||||
gas | |
|
||||
gawk | [] [] |
|
||||
gbiff | [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext-examples | [] [] [] |
|
||||
gettext-runtime | [] [] [] [] |
|
||||
gettext-tools | [] [] [] |
|
||||
gimp-print | [] [] |
|
||||
gip | [] |
|
||||
gliv | [] |
|
||||
glunarclock | [] [] |
|
||||
gmult | [] [] |
|
||||
gnubiff | () |
|
||||
gnucash | [] () () [] |
|
||||
gnucash-glossary | [] [] |
|
||||
gpe-aerial | [] |
|
||||
gpe-beam | [] |
|
||||
gpe-calendar | [] |
|
||||
gpe-clock | [] |
|
||||
gpe-conf | [] |
|
||||
gpe-contacts | |
|
||||
gpe-edit | [] |
|
||||
gpe-go | [] |
|
||||
gpe-login | [] |
|
||||
gpe-ownerinfo | [] |
|
||||
gpe-sketchbook | [] |
|
||||
gpe-su | [] |
|
||||
gpe-taskmanager | [] [] |
|
||||
gpe-timesheet | [] |
|
||||
gpe-today | [] |
|
||||
gpe-todo | [] |
|
||||
gphoto2 | [] [] [] |
|
||||
gprof | |
|
||||
gpsdrive | () () () () |
|
||||
gramadoir | () |
|
||||
grep | [] [] [] [] |
|
||||
gretl | [] |
|
||||
gsasl | [] |
|
||||
gss | |
|
||||
gst-plugins | [] [] |
|
||||
gstreamer | [] [] |
|
||||
gtick | [] [] |
|
||||
gtkspell | [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] |
|
||||
impost | |
|
||||
indent | [] [] [] |
|
||||
iso_3166 | [] |
|
||||
iso_3166_1 | [] [] |
|
||||
iso_3166_2 | [] |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | [] [] [] |
|
||||
iso_639 | [] [] [] |
|
||||
jpilot | () () () |
|
||||
jtag | |
|
||||
jwhois | [] [] |
|
||||
kbd | [] |
|
||||
latrine | [] [] |
|
||||
ld | |
|
||||
libc | [] [] [] [] [] |
|
||||
libextractor | |
|
||||
libgpewidget | [] |
|
||||
libgphoto2 | [] [] |
|
||||
libgphoto2_port | [] [] |
|
||||
libgsasl | [] |
|
||||
libiconv | [] [] |
|
||||
libidn | [] |
|
||||
lifelines | [] |
|
||||
lilypond | |
|
||||
lingoteach | [] [] |
|
||||
lynx | [] [] [] |
|
||||
m4 | [] [] |
|
||||
mailutils | |
|
||||
make | [] [] [] |
|
||||
man-db | () |
|
||||
minicom | [] |
|
||||
mysecretdiary | [] |
|
||||
nano | [] [] [] |
|
||||
nano_1_0 | [] [] [] [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] [] |
|
||||
psmisc | [] [] [] |
|
||||
ptx | [] [] [] |
|
||||
pwdutils | |
|
||||
python | |
|
||||
radius | |
|
||||
recode | [] [] |
|
||||
rpm | [] [] |
|
||||
screem | [] |
|
||||
scrollkeeper | [] [] [] |
|
||||
sed | [] [] |
|
||||
sh-utils | [] [] [] |
|
||||
shared-mime-info | [] [] [] [] |
|
||||
sharutils | [] [] [] |
|
||||
silky | [] |
|
||||
skencil | |
|
||||
sketch | |
|
||||
solfege | [] [] [] |
|
||||
soundtracker | [] |
|
||||
sp | () |
|
||||
stardict | [] [] |
|
||||
tar | [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] [] |
|
||||
tin | |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] |
|
||||
vorbis-tools | [] |
|
||||
wastesedge | [] |
|
||||
wdiff | [] [] [] |
|
||||
wget | [] |
|
||||
xchat | [] [] [] [] [] |
|
||||
xkeyboard-config | [] |
|
||||
xpad | [] |
|
||||
+--------------------------------------------------+
|
||||
it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
|
||||
46 35 11 2 1 1 2 2 3 11 0 15 96 7 5 0
|
||||
|
||||
or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv
|
||||
+----------------------------------------------+
|
||||
GNUnet | |
|
||||
a2ps | () [] [] [] [] [] [] |
|
||||
aegis | () () |
|
||||
ant-phone | [] |
|
||||
anubis | [] [] [] |
|
||||
ap-utils | () |
|
||||
aspell | [] [] |
|
||||
bash | [] [] [] |
|
||||
batchelor | [] |
|
||||
bfd | |
|
||||
bibshelf | |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] [] |
|
||||
bluez-pin | [] [] [] [] [] [] [] [] |
|
||||
clisp | [] |
|
||||
console-tools | [] |
|
||||
coreutils | [] [] [] [] |
|
||||
cpio | [] [] |
|
||||
cpplib | |
|
||||
darkstat | [] [] [] [] [] [] |
|
||||
dialog | [] [] [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
doodle | [] |
|
||||
e2fsprogs | [] [] |
|
||||
enscript | [] [] [] [] |
|
||||
error | [] [] [] |
|
||||
fetchmail | [] [] [] [] |
|
||||
fileutils | [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] |
|
||||
flex | [] [] [] [] [] |
|
||||
fslint | [] [] [] |
|
||||
gas | |
|
||||
gawk | [] [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] |
|
||||
gcc | |
|
||||
gettext-examples | [] [] [] [] [] [] |
|
||||
gettext-runtime | [] [] [] [] [] [] [] |
|
||||
gettext-tools | [] [] [] [] [] [] [] |
|
||||
gimp-print | [] [] |
|
||||
gip | [] [] [] |
|
||||
gliv | [] [] [] |
|
||||
glunarclock | [] [] [] [] [] [] |
|
||||
gmult | [] [] [] [] |
|
||||
gnubiff | () [] |
|
||||
gnucash | () [] [] [] [] |
|
||||
gnucash-glossary | [] [] [] |
|
||||
gpe-aerial | [] [] [] [] [] [] |
|
||||
gpe-beam | [] [] [] [] [] [] |
|
||||
gpe-calendar | [] [] [] [] [] [] [] |
|
||||
gpe-clock | [] [] [] [] [] [] [] |
|
||||
gpe-conf | [] [] [] [] [] [] |
|
||||
gpe-contacts | [] [] [] [] |
|
||||
gpe-edit | [] [] [] [] [] [] [] |
|
||||
gpe-go | [] [] [] [] [] |
|
||||
gpe-login | [] [] [] [] [] [] [] |
|
||||
gpe-ownerinfo | [] [] [] [] [] [] [] |
|
||||
gpe-sketchbook | [] [] [] [] [] [] [] |
|
||||
gpe-su | [] [] [] [] [] [] [] |
|
||||
gpe-taskmanager | [] [] [] [] [] [] [] |
|
||||
gpe-timesheet | [] [] [] [] [] [] [] |
|
||||
gpe-today | [] [] [] [] [] [] [] |
|
||||
gpe-todo | [] [] [] [] [] [] [] [] |
|
||||
gphoto2 | [] [] [] [] |
|
||||
gprof | [] [] [] |
|
||||
gpsdrive | [] [] |
|
||||
gramadoir | [] |
|
||||
grep | [] [] [] [] [] [] [] |
|
||||
gretl | [] |
|
||||
gsasl | [] [] [] [] [] |
|
||||
gss | [] [] [] |
|
||||
gst-plugins | [] [] [] [] |
|
||||
gstreamer | [] [] [] [] |
|
||||
gtick | [] [] [] |
|
||||
gtkspell | [] [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] [] |
|
||||
impost | |
|
||||
indent | [] [] [] [] [] [] |
|
||||
iso_3166 | [] [] [] [] [] |
|
||||
iso_3166_1 | [] [] [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | [] [] [] |
|
||||
iso_4217 | [] [] |
|
||||
iso_639 | [] [] [] |
|
||||
jpilot | |
|
||||
jtag | [] |
|
||||
jwhois | [] [] [] () () |
|
||||
kbd | [] [] [] |
|
||||
latrine | [] [] |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] |
|
||||
libextractor | [] |
|
||||
libgpewidget | [] [] [] [] [] [] |
|
||||
libgphoto2 | [] [] |
|
||||
libgphoto2_port | [] |
|
||||
libgsasl | [] [] [] |
|
||||
libiconv | [] [] [] [] [] [] [] [] [] [] |
|
||||
libidn | [] () |
|
||||
lifelines | [] [] |
|
||||
lilypond | |
|
||||
lingoteach | [] |
|
||||
lynx | [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
mailutils | [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
man-db | [] [] |
|
||||
minicom | [] [] [] [] |
|
||||
mysecretdiary | [] [] [] [] |
|
||||
nano | [] [] [] |
|
||||
nano_1_0 | [] [] [] [] |
|
||||
opcodes | [] [] |
|
||||
parted | [] [] [] [] |
|
||||
psmisc | [] [] |
|
||||
ptx | [] [] [] [] [] [] |
|
||||
pwdutils | [] |
|
||||
python | |
|
||||
radius | [] [] |
|
||||
recode | [] [] [] [] [] [] |
|
||||
rpm | [] [] [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] |
|
||||
shared-mime-info | [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] |
|
||||
silky | [] |
|
||||
skencil | [] [] [] |
|
||||
sketch | [] [] [] |
|
||||
solfege | |
|
||||
soundtracker | [] [] |
|
||||
sp | |
|
||||
stardict | [] [] |
|
||||
tar | [] [] [] [] |
|
||||
texinfo | [] [] [] [] |
|
||||
textutils | [] [] [] |
|
||||
tin | |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] |
|
||||
vorbis-tools | [] [] |
|
||||
wastesedge | |
|
||||
wdiff | [] [] [] [] [] [] |
|
||||
wget | |
|
||||
xchat | [] [] [] [] [] [] [] |
|
||||
xkeyboard-config | |
|
||||
xpad | |
|
||||
+----------------------------------------------+
|
||||
or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv
|
||||
1 3 47 29 57 6 78 73 5 44 12 12 50 85
|
||||
|
||||
ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
|
||||
+-----------------------------------------------+
|
||||
GNUnet | | 0
|
||||
a2ps | [] [] [] | 19
|
||||
aegis | | 0
|
||||
ant-phone | [] [] | 5
|
||||
anubis | [] [] [] | 11
|
||||
ap-utils | () [] | 2
|
||||
aspell | [] [] [] | 13
|
||||
bash | [] | 11
|
||||
batchelor | [] [] | 7
|
||||
bfd | | 1
|
||||
bibshelf | [] | 5
|
||||
binutils | [] | 6
|
||||
bison | [] [] | 18
|
||||
bluez-pin | [] [] [] [] [] | 25
|
||||
clisp | | 7
|
||||
console-tools | [] [] | 5
|
||||
coreutils | [] [] | 17
|
||||
cpio | [] [] [] | 7
|
||||
cpplib | [] [] | 8
|
||||
darkstat | [] () () | 15
|
||||
dialog | [] [] [] | 25
|
||||
diffutils | [] [] [] [] | 28
|
||||
doodle | [] | 5
|
||||
e2fsprogs | [] | 8
|
||||
enscript | [] | 12
|
||||
error | [] [] [] | 16
|
||||
fetchmail | [] | 12
|
||||
fileutils | [] [] [] | 18
|
||||
findutils | [] [] | 17
|
||||
flex | [] [] | 15
|
||||
fslint | [] | 7
|
||||
gas | [] | 3
|
||||
gawk | [] | 14
|
||||
gbiff | [] | 5
|
||||
gcal | [] | 5
|
||||
gcc | [] [] | 4
|
||||
gettext-examples | [] [] [] [] [] | 21
|
||||
gettext-runtime | [] [] [] [] [] | 25
|
||||
gettext-tools | [] [] [] [] [] | 19
|
||||
gimp-print | [] | 11
|
||||
gip | [] | 8
|
||||
gliv | [] [] | 7
|
||||
glunarclock | [] [] | 13
|
||||
gmult | [] [] [] | 13
|
||||
gnubiff | [] | 3
|
||||
gnucash | () [] | 10
|
||||
gnucash-glossary | [] [] | 9
|
||||
gpe-aerial | [] [] | 13
|
||||
gpe-beam | [] [] | 13
|
||||
gpe-calendar | [] [] [] [] | 18
|
||||
gpe-clock | [] [] [] [] | 17
|
||||
gpe-conf | [] [] | 12
|
||||
gpe-contacts | [] [] | 7
|
||||
gpe-edit | [] [] [] [] | 15
|
||||
gpe-go | [] [] | 11
|
||||
gpe-login | [] [] [] [] [] | 18
|
||||
gpe-ownerinfo | [] [] [] [] | 19
|
||||
gpe-sketchbook | [] [] | 14
|
||||
gpe-su | [] [] [] | 16
|
||||
gpe-taskmanager | [] [] [] | 17
|
||||
gpe-timesheet | [] [] [] [] | 17
|
||||
gpe-today | [] [] [] [] [] | 19
|
||||
gpe-todo | [] [] [] | 17
|
||||
gphoto2 | [] [] [] | 18
|
||||
gprof | [] [] | 10
|
||||
gpsdrive | | 3
|
||||
gramadoir | [] | 6
|
||||
grep | [] [] [] [] | 32
|
||||
gretl | | 4
|
||||
gsasl | [] [] | 12
|
||||
gss | [] | 5
|
||||
gst-plugins | [] [] [] | 17
|
||||
gstreamer | [] [] [] [] | 15
|
||||
gtick | [] | 11
|
||||
gtkspell | [] [] [] [] | 21
|
||||
hello | [] [] [] [] | 37
|
||||
id-utils | [] [] | 13
|
||||
impost | [] | 3
|
||||
indent | [] [] [] [] | 25
|
||||
iso_3166 | [] [] [] | 12
|
||||
iso_3166_1 | [] [] | 20
|
||||
iso_3166_2 | | 2
|
||||
iso_3166_3 | [] [] | 8
|
||||
iso_4217 | [] [] | 10
|
||||
iso_639 | [] [] | 12
|
||||
jpilot | [] [] [] | 6
|
||||
jtag | | 2
|
||||
jwhois | [] [] [] | 12
|
||||
kbd | [] [] | 12
|
||||
latrine | [] [] | 8
|
||||
ld | [] | 5
|
||||
libc | [] [] | 22
|
||||
libextractor | | 1
|
||||
libgpewidget | [] [] | 17
|
||||
libgphoto2 | [] | 9
|
||||
libgphoto2_port | | 5
|
||||
libgsasl | [] | 7
|
||||
libiconv | [] [] [] [] [] | 32
|
||||
libidn | [] [] | 6
|
||||
lifelines | | 4
|
||||
lilypond | | 1
|
||||
lingoteach | [] | 6
|
||||
lynx | [] [] [] | 15
|
||||
m4 | [] [] | 17
|
||||
mailutils | [] | 7
|
||||
make | [] [] | 18
|
||||
man-db | | 5
|
||||
minicom | | 11
|
||||
mysecretdiary | [] [] | 12
|
||||
nano | [] [] | 13
|
||||
nano_1_0 | [] [] [] | 18
|
||||
opcodes | [] [] | 9
|
||||
parted | [] [] [] | 18
|
||||
psmisc | [] | 7
|
||||
ptx | [] [] | 23
|
||||
pwdutils | | 1
|
||||
python | | 0
|
||||
radius | [] | 6
|
||||
recode | [] [] | 22
|
||||
rpm | [] [] | 11
|
||||
screem | | 1
|
||||
scrollkeeper | [] [] [] | 24
|
||||
sed | [] [] [] | 21
|
||||
sh-utils | [] | 15
|
||||
shared-mime-info | [] [] [] | 21
|
||||
sharutils | [] [] [] | 20
|
||||
silky | | 3
|
||||
skencil | | 6
|
||||
sketch | | 6
|
||||
solfege | | 4
|
||||
soundtracker | [] | 8
|
||||
sp | [] | 3
|
||||
stardict | [] [] [] [] | 10
|
||||
tar | [] [] [] [] | 15
|
||||
texinfo | [] [] | 14
|
||||
textutils | [] [] [] | 17
|
||||
tin | | 1
|
||||
tp-robot | [] [] [] | 8
|
||||
tuxpaint | [] [] [] [] | 34
|
||||
unicode-han-tra... | | 0
|
||||
unicode-transla... | | 2
|
||||
util-linux | [] [] [] | 18
|
||||
vorbis-tools | [] | 10
|
||||
wastesedge | | 1
|
||||
wdiff | [] [] | 22
|
||||
wget | [] [] | 7
|
||||
xchat | [] [] [] [] | 26
|
||||
xkeyboard-config | [] | 2
|
||||
xpad | [] | 5
|
||||
+-----------------------------------------------+
|
||||
73 teams ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
|
||||
149 domains 0 0 0 1 77 30 0 92 16 0 42 32 0 1746
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If May 2005 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
||||
matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
1.6 Using `gettext' in new packages
|
||||
===================================
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
the use of `gettext' the only thing missing are the translations. The
|
||||
Free Translation Project is also available for packages which are not
|
||||
developed inside the GNU project. Therefore the information given above
|
||||
applies also for every other Free Software Project. Contact
|
||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
||||
the translation teams.
|
||||
|
||||
|
||||
@@ -4,26 +4,50 @@ WeeChat - Wee Enhanced Environment for Chat
|
||||
Developers:
|
||||
----------
|
||||
|
||||
All developers are connected to IRC:
|
||||
server: irc.freenode.net, channel: #weechat
|
||||
* General code
|
||||
|
||||
FlashCode <flashcode@flashtux.org>
|
||||
Web : http://www.flashtux.org
|
||||
IRC : nick is "FlashCode"
|
||||
Jabber: flashcode@jabber.org
|
||||
ICQ : 160677660
|
||||
AIM : FlashCode AIM
|
||||
Yahoo : FlashCode_Y
|
||||
FlashCode <flashcode@flashtux.org>
|
||||
Web : http://weechat.flashtux.org
|
||||
IRC : nick is "FlashCode" @ irc.freenode.net
|
||||
Jabber: flashcode@jabber.org
|
||||
ICQ : 160677660
|
||||
AIM : FlashCode AIM
|
||||
Yahoo : FlashCode_Y
|
||||
|
||||
* Python plugin
|
||||
|
||||
Kolter <kolter@free.fr>
|
||||
Web : http://kolter.free.fr
|
||||
IRC : nick is "kolter" @ irc.freenode.net
|
||||
Jabber: kolter@jabber.org
|
||||
|
||||
|
||||
Debian packager:
|
||||
---------------
|
||||
|
||||
Julien Louis <ptitlouis@sysif.net>
|
||||
IRC : nicks are "ptitlouis" or "tioui" @ irc.freenode.net
|
||||
Jabber: ptitlouis@amessage.info
|
||||
|
||||
|
||||
Testers:
|
||||
-------
|
||||
|
||||
Bounga <bounga@altern.org>
|
||||
Web : http://bounga.ath.cx
|
||||
IRC : nick is "Bounga"
|
||||
IRC : nick is "Bounga" @ irc.freenode.net
|
||||
Jabber: Bounga@jabber.org
|
||||
ICQ : 178297842
|
||||
|
||||
Xahlexx <xahlexx@weeland.org>
|
||||
Web : http://www.weeland.org
|
||||
IRC : nick is "xahlexx"
|
||||
IRC : nick is "xahlexx" @ irc.freenode.net
|
||||
|
||||
|
||||
=====
|
||||
|
||||
Whole team is connected to IRC:
|
||||
server: irc.freenode.net, channel: #weechat
|
||||
|
||||
|
||||
See README file for licence detail.
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
WeeChat known bugs, 2005-01-01
|
||||
WeeChat known bugs, 2005-05-21
|
||||
|
||||
- ./configure does not check that Curses headers are installed
|
||||
- ./configure does not check that Gtk 2.0 libraries are installed
|
||||
- ./configure does not check that Perl headers & libraries are installed
|
||||
- too much nicks in the channel (> height of window) => display bug
|
||||
- problem when resizing terminal and that some windows are outside new term size
|
||||
- some IRC commands are marked as 'unknown' when received
|
||||
(IRC protocol is under dev!)
|
||||
- when quitting WeeChat term title is not restored (if look_set_title is ON)
|
||||
- command name for /server can not contain spaces
|
||||
- wrong alias is not created and not saved when quitting WeeChat
|
||||
|
||||
@@ -1,9 +1,95 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2005-01-01
|
||||
ChangeLog - 2005-06-30
|
||||
|
||||
|
||||
Version 0.1.3 (2005-07-02):
|
||||
* proxy support (http, socks4, socks5) with authentification (http, socks5)
|
||||
and ipv6 support (client to proxy)
|
||||
* completion added for config option (with /set command)
|
||||
* commands from users outside channel now authorized (if special user or
|
||||
channel without "n" flag)
|
||||
* added IPv6 support
|
||||
* kill command now received and displayed
|
||||
* added SSL support
|
||||
* channel notify levels are saved in config file (new option
|
||||
"server_notify_levels" for server sections)
|
||||
* part message now accepts %v (replaced by WeeChat version), like quit message
|
||||
* errors while loading perl scripts are now displayed in server buffer
|
||||
(instead of current buffer)
|
||||
* in python scripts, all messages written in stdin and stderr are redirected
|
||||
in server buffer
|
||||
* fix a filename error while loading a python script manually
|
||||
* fixed plugins "print" and "prnt" functions: now ok for writing on server
|
||||
buffers
|
||||
* fixed color problem with new libcurses version
|
||||
* fixed crash when using Alt-S or Alt-X on DCC buffer (Alt-D)
|
||||
* fixed startup crash when config file (~/.weechat/weechat.rc) is not found
|
||||
* improved Perl/Python libs detection for ./configure script
|
||||
|
||||
Version 0.1.2 (2005-05-21):
|
||||
* added Python plugin support, improved Perl interface (and now Perl/Python
|
||||
libraries are checked by configure script)
|
||||
* added nicklist scroll keys (Alt+{home/end/pgup/pgdn} or F11/F12)
|
||||
* added transfer rate for DCC files
|
||||
* added "-all" option for /nick command
|
||||
* buffers timestamp can now be changed (new option in config file)
|
||||
* WeeChat now ok under *BSD and Mac OS X
|
||||
* fixed nicklist sort
|
||||
* fixed crash when purging old DCC
|
||||
* fixed crash with 64-bits arch (like AMD64) when converting UTF-8
|
||||
* added missing IRC commands (307, 341, 485, 671)
|
||||
|
||||
Version 0.1.1 (2005-03-20):
|
||||
* added nicks count for channel buffers
|
||||
* added FIFO pipe for remote control
|
||||
* added crash dump when WeeChat receives SIGSEGV (Segmentation fault)
|
||||
* added new display engine: doesn't cut words at end of lines
|
||||
* added DCC send and DCC chat
|
||||
* added /halfop & /dehalfop commands, fixed halfop display bug in nicklist
|
||||
* added /ban, /unban and /kickban commands
|
||||
* added spanish translation
|
||||
* added --irc-commands and --weechat-commands command line options
|
||||
* connection to IRC server is now made by child process (non blocking)
|
||||
* added support for UnrealIrcd ("~" for chan owner, "&" for chan admin)
|
||||
* new key for window switch (now: F5/F6=switch buffer, F7/F8=switch window)
|
||||
* on server buffer, only server messages are logged
|
||||
* improved /help command output
|
||||
* plugins messages are logged with new config option (log_plugin_msg)
|
||||
* fixed /kick command
|
||||
* fixed /invite command (and now invite requests are displayed)
|
||||
* fixed /buffer close command (now ok when disconnected from server)
|
||||
* fixed display bugs when many windows are opened
|
||||
|
||||
Version 0.1.0 (2005-02-12):
|
||||
* improved /window command: now split and merge are ok
|
||||
* away nicks are now displayed with another color (new option: "irc_away_check")
|
||||
* added away indicator in status bar
|
||||
* added lag indicator (and auto-disconnect after a delay if important lag)
|
||||
* improved completion: now completes commands arguments (IRC and internal),
|
||||
when only one completion matches, completion mechanism is stoped (to
|
||||
complete command arg for example)
|
||||
* improved /set command: empty strings are allowed, new colors, server
|
||||
options can be changed while WeeChat is running
|
||||
* added default away/part/quit messages in config file
|
||||
* new [irc] section in config file, option "look_display_away" moved to
|
||||
"irc_display_away"
|
||||
* server messages & errors are all prefixed (by 3 chars, like '-@-')
|
||||
* added new options for charset (UTF-8 support): look_charset_decode,
|
||||
look_charset_encode and look_charset_internal
|
||||
* fixed many memory leaks
|
||||
* fixed colors bug: removed "gray" color (replaced by "default"), colors are
|
||||
ok when terminal has white (or light) background
|
||||
* fixed crash when resizing terminal to small size
|
||||
* fixed crash when multiple servers and big messages received from server
|
||||
* fixed crash when closing some private buffers
|
||||
* fixed crash when unknown section with option(s) in config file
|
||||
* fixed /op, /deop, /voice, /devoice (now ok with many nicks)
|
||||
* fixed /me command (now ok without parameter)
|
||||
* fixed /away command (now ok if not away)
|
||||
* logs are now disabled by default (server/channel/private)
|
||||
|
||||
Version 0.0.9 (2005-01-01):
|
||||
* auto-reconnection to server (new options: server_autoreconnect (on/off),
|
||||
server_autoreconnect_delay (in seconds))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2004-05-31
|
||||
WeeChat FAQ, 2005-05-21
|
||||
=======================
|
||||
|
||||
Intended audience:
|
||||
@@ -22,8 +22,10 @@ finding a solution.
|
||||
Q: I heard about many GUI for WeeChat. How can I compile/use them?
|
||||
|
||||
A: Curses GUI is built by default.
|
||||
To build Gtk or Qt GUI you've to specify extra options to ./configure script:
|
||||
To build Gtk, wxWidgets or Qt GUI you've to specify extra options to
|
||||
./configure script:
|
||||
--enable-gtk to enable Gtk GUI
|
||||
--enable-wxwidgets to enable wxWidgets GUI
|
||||
--enable-qt to enable Qt QUI
|
||||
Type ./configure --help to see available options.
|
||||
WARNING: only Curses GUI is ok today. Other GUI are under development!
|
||||
@@ -34,8 +36,8 @@ A: Curses GUI is built by default.
|
||||
Q: I can't compile WeeChat CVS.
|
||||
|
||||
A: Check that you have latest version of autoconf and automake.
|
||||
WeeChat has been developed with autoconf version 2.56 and automake
|
||||
version 1.7.
|
||||
WeeChat has been developed with autoconf version 2.59 and automake
|
||||
version 1.9.5.
|
||||
You should have at least these versions in order to compile WeeChat CVS.
|
||||
If you can't or don't want to install these versions, you can download and
|
||||
install "devel package", a package built almost every day, based on CVS.
|
||||
@@ -48,12 +50,14 @@ Q: Why using WeeChat ? X-Chat and Irssi are so good...
|
||||
|
||||
A: Because WeeChat is very light and has new features.
|
||||
Some new features:
|
||||
* many GUI (Curses, Gtk, Qt),
|
||||
* many GUI (Curses, Gtk, wxWidgets, Qt),
|
||||
* extensible with scripts (Perl, Python, Ruby),
|
||||
* developed from scratch (not based on any other IRC client)
|
||||
* multi-platform
|
||||
* 100% GPL and free
|
||||
This is the "geekest Irc client" ;)
|
||||
This is the "geekest" IRC client ;)
|
||||
|
||||
More info on this page: http://weechat.flashtux.org/features.php
|
||||
|
||||
|
||||
2.2
|
||||
@@ -61,39 +65,56 @@ A: Because WeeChat is very light and has new features.
|
||||
Q: I've launched WeeChat, but I'm lost, what can I do?
|
||||
|
||||
A: For help you can type /help. For help about a command, type /help command.
|
||||
Keys and commands are listed in documentation.
|
||||
|
||||
|
||||
2.3
|
||||
================================================================================
|
||||
Q: How can I customize key bindings?
|
||||
Q: I don't see come chars with accents, what can I do?
|
||||
|
||||
A: Today you can't do that. This will be available in a future version.
|
||||
A: You have to setup charset used for decoding, encoding, and internal WeeChat
|
||||
charset.
|
||||
Change value of option "look_charset_decode" to "UTF-8".
|
||||
Option "look_charset_internal" should not be changed (default is
|
||||
"ISO-8859-1").
|
||||
|
||||
|
||||
2.4
|
||||
================================================================================
|
||||
Q: How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
Q: How can I customize key bindings?
|
||||
|
||||
A: You can use /perl command to load scripts
|
||||
(default path is ~/.weechat/perl).
|
||||
Note that scripts in ~/.weechat/perl/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat perl scripts are compatible with X-Chat, not with Irssi, sorry ;)
|
||||
A: Today you can't do that. This is planed for a future version.
|
||||
|
||||
|
||||
2.5
|
||||
================================================================================
|
||||
Q: How can I load Python scripts?
|
||||
Q: How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
|
||||
A: Today Python interface is not developed, so can't load any Python script.
|
||||
A: You can use /perl command to load scripts (default path is
|
||||
~/.weechat/perl).
|
||||
Note that scripts in ~/.weechat/perl/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat Perl scripts are 80% compatible with X-Chat, but not with Irssi.
|
||||
|
||||
|
||||
2.6
|
||||
================================================================================
|
||||
Q: How can I load Python scripts?
|
||||
Are Python scripts compatible with X-chat or/and Irssi ?
|
||||
|
||||
A: You can use /python command to load scripts (default path is
|
||||
~/.weechat/python).
|
||||
Note that scripts in ~/.weechat/python/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat Python scripts are 80% compatible with X-Chat, but not with Irssi.
|
||||
|
||||
|
||||
2.7
|
||||
================================================================================
|
||||
Q: How can I load Ruby scripts?
|
||||
|
||||
A: Today Ruby interface is not developed, so can't load any Ruby script.
|
||||
A: Today Ruby interface is not developed, so you can't load any Ruby script.
|
||||
|
||||
|
||||
3.1
|
||||
@@ -136,13 +157,27 @@ A: There is 2 ways to submit your feature request:
|
||||
|
||||
3.4
|
||||
================================================================================
|
||||
Q: Will WeeChat be ported to *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
Q: What is the list of supported platforms for WeeChat?
|
||||
|
||||
A: Yes. Future versions will be available for these OS.
|
||||
A: Today WeeChat was succesfully tested on these platforms:
|
||||
- GNU/Linux (any distribution / i386, AMD64, Sparc)
|
||||
- FreeBSD
|
||||
- NetBSD
|
||||
- OpenBSD
|
||||
- Mac OS X
|
||||
- Microsoft Windows (with Cygwin and some code changes)
|
||||
|
||||
|
||||
3.5
|
||||
================================================================================
|
||||
Q: Will WeeChat be ported to QNX or other operating systems?
|
||||
|
||||
A: Yes. Future versions will be available for these OS.
|
||||
We need help for such systems, any help is welcome :)
|
||||
|
||||
|
||||
3.6
|
||||
================================================================================
|
||||
Q: I want to help WeeChat developers. What can I do?
|
||||
|
||||
A: There's many tasks to do (code, documentation, ...)
|
||||
@@ -150,8 +185,9 @@ A: There's many tasks to do (code, documentation, ...)
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.6
|
||||
3.7
|
||||
================================================================================
|
||||
Q: Can I give money or other things to WeeChat developers?
|
||||
|
||||
A: No.
|
||||
A: Beer is welcome :)
|
||||
Otherwise Paypal account is: flashcode@free.fr (no limit for gifts :)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2004-05-31
|
||||
WeeChat FAQ, 2005-05-21
|
||||
=======================
|
||||
|
||||
Public concerné :
|
||||
@@ -23,9 +23,10 @@ Q: J'ai entendu parler de plusieurs interfaces pour WeeChat.
|
||||
Comment puis-je les compiler/utiliser ?
|
||||
|
||||
R: L'interface Curses est construite par défaut.
|
||||
Pour construire l'interface Gtk ou Qt, vous devez spécifier des options
|
||||
pour le script ./configure :
|
||||
Pour construire l'interface Gtk, wxWidgets ou Qt, vous devez spécifier des
|
||||
options pour le script ./configure :
|
||||
--enable-gtk pour activer l'interface Gtk
|
||||
--enable-wxwidgets pour activer l'interface wxWidgets
|
||||
--enable-qt pour activer l'interface Qt
|
||||
Tapez ./configure --help pour voir les options disponibles.
|
||||
ATTENTION : seule l'interface Curses est ok aujourd'hui.
|
||||
@@ -37,8 +38,8 @@ R: L'interface Curses est construite par d
|
||||
Q: Je ne peux pas compiler le CVS WeeChat.
|
||||
|
||||
R: Vérifiez que vous avez bien la dernière version d'autoconf et automake.
|
||||
WeeChat a été développé avec autoconf version 2.56 et automake
|
||||
version 1.7.
|
||||
WeeChat a été développé avec autoconf version 2.59 et automake
|
||||
version 1.9.5.
|
||||
Vous devez avoir au moins ces versions pour compiler le CVS WeeChat.
|
||||
Si vous n'avez pas ou ne souhaitez pas installer ces versions, vous
|
||||
pouvez télécharger et installer le paquet "devel", un paquet construit
|
||||
@@ -52,12 +53,14 @@ Q: Pourquoi utiliser WeeChat ? X-Chat et Irssi sont si bien...
|
||||
|
||||
R: Parce que WeeChat est très léger et a de nouvelles fonctionnalités.
|
||||
Quelques nouvelles fonctionnalités :
|
||||
* plusieurs interfaces (Curses, Gtk, Qt),
|
||||
* plusieurs interfaces (Curses, Gtk, wxWidgets, Qt),
|
||||
* extensible par des scripts (Perl, Python, Ruby),
|
||||
* développé à partir de zéro (non basé sur un quelconque client IRC)
|
||||
* multi-platformes
|
||||
* 100% GPL et libre
|
||||
C'est le client le plus "geek" ;)
|
||||
C'est le client IRC le plus "geek" ;)
|
||||
|
||||
Plus d'infos sur cette page: http://weechat.flashtux.org/features.php
|
||||
|
||||
|
||||
2.2
|
||||
@@ -66,39 +69,54 @@ Q: J'ai lanc
|
||||
|
||||
R: Pour obtenir de l'aide tapez /help. Pour de l'aide sur une commande,
|
||||
tapez /help commande.
|
||||
Les touches et commandes sont listées dans la documentation.
|
||||
|
||||
|
||||
2.3
|
||||
================================================================================
|
||||
Q: Je ne vois pas bien certains accents dans WeeChat, que faire ?
|
||||
|
||||
R: Il faut configurer le charset utilisé pour le décodage, l'encodage ainsi que
|
||||
le charset interne Ă WeeChat.
|
||||
Modifiez la valeur de l'option "look_charset_decode" en "UTF-8".
|
||||
L'option "look_charset_internal" ne devrait pas être modifiée (par défaut
|
||||
"ISO-8859-1").
|
||||
|
||||
|
||||
2.4
|
||||
================================================================================
|
||||
Q: Comment puis-je configurer les raccourcis clavier ?
|
||||
|
||||
R: Aujourd'hui vous ne pouvez pas le faire. Ce sera possible dans une
|
||||
version future.
|
||||
|
||||
|
||||
2.4
|
||||
2.5
|
||||
================================================================================
|
||||
Q: Comment puis-je charger des scripts Perl ?
|
||||
Les scripts Perl sont-ils compatibles avec X-chat et/ou Irssi ?
|
||||
|
||||
R: La commande /perl permet de charger les scripts Perl
|
||||
(le chemin par défaut est ~/.weechat/perl).
|
||||
R: La commande /perl permet de charger les scripts Perl (le chemin par défaut
|
||||
est ~/.weechat/perl).
|
||||
Notez que les scripts dans ~/.weechat/perl/autoload sont automatiquement
|
||||
chargés par WeeChat lorsqu'il démarre.
|
||||
Les scripts Perl WeeChat sont compatibles avec X-Chat, pas Irssi,
|
||||
désolé ;)
|
||||
|
||||
|
||||
2.5
|
||||
================================================================================
|
||||
Q: Comment puis-je charger les scripts Python ?
|
||||
|
||||
R: Aujourd'hui l'interface Python n'est pas déceloppée.
|
||||
Vous ne pouvez donc charger aucun script Python.
|
||||
Les scripts Perl WeeChat sont 80% compatibles avec X-Chat, mais pas Irssi.
|
||||
|
||||
|
||||
2.6
|
||||
================================================================================
|
||||
Q: Comment puis-je charger les scripts Python ?
|
||||
Les scripts Python sont-ils compatibles avec X-chat et/ou Irssi ?
|
||||
|
||||
R: La commande /python permet de charger les scripts Python (le chemin par
|
||||
défaut est ~/.weechat/python).
|
||||
Notez que les scripts dans ~/.weechat/python/autoload sont automatiquement
|
||||
chargés par WeeChat lorsqu'il démarre.
|
||||
Les scripts Python WeeChat sont 80% compatibles avec X-Chat, mais pas Irssi.
|
||||
|
||||
|
||||
2.7
|
||||
================================================================================
|
||||
Q: Comment puis-je charger des scripts Ruby ?
|
||||
|
||||
R: Aujourd'hui l'interface Ruby n'est pas développée.
|
||||
@@ -150,13 +168,27 @@ R: Il y a 2 mani
|
||||
|
||||
3.4
|
||||
================================================================================
|
||||
Q: WeeChat sera-t-il porté sur *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
Q: Quelle est la liste des plate-formes supportées par WeeChat ?
|
||||
|
||||
R: Oui. Les futures versions seront disponibles pour ces OS.
|
||||
R: Aujourd'hui WeeChat a été testé avec succès sur ces plate-formes :
|
||||
- GNU/Linux (toute distribution / i386, AMD64, Sparc)
|
||||
- FreeBSD
|
||||
- NetBSD
|
||||
- OpenBSD
|
||||
- Mac OS X
|
||||
- Microsoft Windows (avec Cygwin et quelques modifications de code)
|
||||
|
||||
|
||||
3.5
|
||||
================================================================================
|
||||
Q: WeeChat sera-t-il porté sur QNX ou d'autres systèmes d'exploitation ?
|
||||
|
||||
R: Oui. Les futures versions seront disponibles pour ces OS.
|
||||
Nous avons besoin d'aide pour ces systèmes, toute aide est la bienvenue :)
|
||||
|
||||
|
||||
3.6
|
||||
================================================================================
|
||||
Q: Je souhaiterai aider les développeurs WeeChat. Que puis-je faire ?
|
||||
|
||||
R: Il y a plusieurs choses Ă faire (code, documentation, ...)
|
||||
@@ -165,8 +197,10 @@ R: Il y a plusieurs choses
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.6
|
||||
3.7
|
||||
================================================================================
|
||||
Q: Puis-je donner de l'argent ou d'autres choses aux développeurs WeeChat ?
|
||||
|
||||
R: Non.
|
||||
R: La bière est la bienvenue :)
|
||||
Sinon le compte Paypal est: flashcode@free.fr (il n'y a pas de limite pour
|
||||
les dons :)
|
||||
|
||||
@@ -6,7 +6,7 @@ WeeChat - Installation instructions
|
||||
--disable-curses : do not build Curses interface
|
||||
--enable-gtk : build Gtk+ interface (under development!)
|
||||
--enable-qt : build Qt interface (not developed!)
|
||||
--with-debug : 1 for debug compilation, 2 for debug messages
|
||||
--with-debug=X : X=1 for debug compilation, 2 for debug messages
|
||||
|
||||
2) Run 'make'
|
||||
|
||||
|
||||
+4
-2
@@ -17,12 +17,14 @@
|
||||
|
||||
SUBDIRS = po intl src
|
||||
|
||||
EXTRA_DIST = weechat-curses.1 BUGS FAQ FAQ.fr \
|
||||
EXTRA_DIST = config.rpath weechat-curses.1 BUGS FAQ FAQ.fr \
|
||||
debian/changelog debian/control \
|
||||
debian/copyright debian/files \
|
||||
debian/copyright \
|
||||
debian/rules debian/weechat-common.docs \
|
||||
debian/weechat-common.install debian/weechat-curses.dirs \
|
||||
debian/weechat-curses.install debian/weechat-gtk.dirs \
|
||||
debian/weechat-gtk.install
|
||||
|
||||
man_MANS = weechat-curses.1
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
@@ -1,6 +1,22 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
* FlashCode, 2005-07-02
|
||||
|
||||
WeeChat 0.1.3 released.
|
||||
|
||||
* FlashCode, 2005-05-21
|
||||
|
||||
WeeChat 0.1.2 released.
|
||||
|
||||
* FlashCode, 2005-03-20
|
||||
|
||||
WeeChat 0.1.1 released.
|
||||
|
||||
* FlashCode, 2005-02-12
|
||||
|
||||
WeeChat 0.1.0 released.
|
||||
|
||||
* FlashCode, 2005-01-01
|
||||
|
||||
WeeChat 0.0.9 released.
|
||||
|
||||
@@ -14,7 +14,7 @@ Features
|
||||
* small, fast and very light
|
||||
* customizable and extensible with scripts (Perl, Python, Ruby) (2)
|
||||
* compliant with RFC 1459,2810,2811,2812,2813
|
||||
* developed from scratch (not based on any other IRC client, except for look ;)
|
||||
* developed from scratch
|
||||
* multi-platform (GNU/Linux, *BSD, Windows & other) (3)
|
||||
* 100% GPL & free
|
||||
|
||||
@@ -22,10 +22,7 @@ Features
|
||||
Copyright
|
||||
---------
|
||||
|
||||
WeeChat (c) Copyright 2004
|
||||
by: FlashCode <flashcode@flashtux.org>
|
||||
Xahlexx <xahlex@weeland.org>
|
||||
Bounga <bounga@altern.org>
|
||||
WeeChat (c) Copyright 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
(see AUTHORS file if you want to contact authors)
|
||||
|
||||
WeeChat is distributed under GPL licence (see COPYING file for complete license):
|
||||
@@ -47,5 +44,5 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---
|
||||
(1) only Curses interface is available today
|
||||
(2) only Perl interface is available today
|
||||
(3) only GNU/Linux version is available today
|
||||
(2) only Perl and Python interfaces are available today
|
||||
(3) only GNU/Linux and *BSD versions are available today
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
TODO - 2005-01-01
|
||||
TODO - 2005-07-02
|
||||
|
||||
Legend:
|
||||
# done
|
||||
@@ -10,33 +10,32 @@ Legend:
|
||||
? is this really necessary?
|
||||
|
||||
|
||||
v0.0.9:
|
||||
v0.1.3:
|
||||
------
|
||||
|
||||
* General:
|
||||
- Windows version
|
||||
+ Windows version
|
||||
+ Solaris version
|
||||
|
||||
* IRC protocol:
|
||||
+ "/dcc" command (for chat and sending/receiving files)
|
||||
|
||||
* Interface:
|
||||
+ "/window" command, split terminal in multiple windows
|
||||
(horizontally/vertically)
|
||||
+ Gtk GUI
|
||||
+ internationalization (traduce WeeChat in many languages)
|
||||
|
||||
* TCP/IP communication:
|
||||
# SSL support
|
||||
# IPv6 protocol implementation
|
||||
# proxy support (http, socks4, socks5) with authentification
|
||||
(http, socks5) and ipv6 support (client to proxy)
|
||||
|
||||
* Configuration:
|
||||
+ add missing options for config file
|
||||
- add key bindings to config file
|
||||
# save buffer notify levels
|
||||
|
||||
|
||||
Future versions:
|
||||
---------------
|
||||
|
||||
* General:
|
||||
- *BSD version
|
||||
|
||||
* IRC protocol:
|
||||
- customizable CTCP version reply
|
||||
- complete "/list" command: add regexp search, display only channels that
|
||||
match regexp
|
||||
- "/ignore" and "/unignore" commands: hide all that is write by a given
|
||||
@@ -47,35 +46,21 @@ Future versions:
|
||||
nick/host connect to the given irc network
|
||||
|
||||
* WeeChat commands:
|
||||
- "/reload" command: reload the WeeChat's config file
|
||||
- "/highlight" command: highlight a given word when it appears on
|
||||
channels/privates
|
||||
- "/completion" command: do shortcuts (for example when we type "u"
|
||||
in the text bar it send it to the server as "you")
|
||||
- "/exec" command: execute a command as if we was in shell
|
||||
and show us the output on the current window. An option to exec
|
||||
like -o could send the output to the server, on the current
|
||||
channel/private
|
||||
- "/last": command to look for text in previous messages
|
||||
|
||||
* Interface:
|
||||
+ Gtk GUI
|
||||
- color for nicks (except own nick) when nick colors are disabled
|
||||
- interpret special chars in messages (color & bold for example)
|
||||
- add lag indicator
|
||||
- improve completion (for example complete command parameters when possible)
|
||||
- understand incomplete commands if unambigous (for example: /he for /help is ok)
|
||||
- tab key with empty command line should switch to next window (like F7)
|
||||
? Qt GUI
|
||||
|
||||
* TCP/IP communication:
|
||||
- connect to server with child process (background)
|
||||
- proxy support
|
||||
- SSL support
|
||||
- IPv6 protocol implementation
|
||||
|
||||
* Plugins:
|
||||
- Python plugin
|
||||
- "/python load" and "/python unload" commands to (un)load Python scripts
|
||||
- Ruby plugin
|
||||
- "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts
|
||||
|
||||
* Configuration:
|
||||
- add key bindings to config file
|
||||
|
||||
+13
-53
@@ -1,55 +1,15 @@
|
||||
#!/bin/sh
|
||||
rm -f config.cache
|
||||
|
||||
### GETTEXT ###
|
||||
|
||||
echo searching for GNU gettext intl directory...
|
||||
|
||||
dirs="/usr/share /usr/local/share /opt/share /usr /usr/local /opt /usr/gnu/share"
|
||||
found=0
|
||||
for try in $dirs; do
|
||||
echo -n " -> $try/gettext/intl... "
|
||||
if test -d $try/gettext/intl; then
|
||||
echo found it
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
echo no
|
||||
done
|
||||
if test "$found" != 1; then
|
||||
echo ERROR: Cannot find gettext/intl directory.
|
||||
echo ERROR: Install GNU gettext in /usr or /usr/local prefix.
|
||||
exit 7
|
||||
fi;
|
||||
|
||||
echo copying gettext intl files...
|
||||
intldir="$try/gettext/intl"
|
||||
if test ! -d intl; then
|
||||
mkdir intl
|
||||
fi
|
||||
olddir=`pwd`
|
||||
cd $intldir
|
||||
for file in *; do
|
||||
if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
|
||||
rm -f $olddir/intl/$file
|
||||
cp $intldir/$file $olddir/intl/
|
||||
fi
|
||||
done
|
||||
cp -f $try/gettext/po/Makefile.in.in $olddir/po/
|
||||
cd $olddir
|
||||
if test -f intl/plural.c; then
|
||||
sleep 2
|
||||
touch intl/plural.c
|
||||
fi
|
||||
|
||||
### END GETTEXT ###
|
||||
|
||||
echo "running aclocal..."
|
||||
aclocal -I /usr/share/aclocal
|
||||
echo "running autoconf..."
|
||||
autoconf
|
||||
echo "running autoheader..."
|
||||
autoheader
|
||||
echo "running automake..."
|
||||
automake -a
|
||||
echo "autogen.sh ok, now run ./configure script"
|
||||
# gettextize updates Makefile.am, configure.in
|
||||
cp configure.in configure.in.old
|
||||
cp Makefile.am Makefile.am.old
|
||||
gettextize --copy --force --intl --no-changelog &&
|
||||
mv Makefile.am.old Makefile.am
|
||||
mv configure.in.old configure.in
|
||||
aclocal &&
|
||||
# autoheader creates config.h.in needed by autoconf
|
||||
autoheader &&
|
||||
# autoconf creates configure
|
||||
autoconf &&
|
||||
# automake creates Makefile.in
|
||||
automake --add-missing --copy --gnu
|
||||
|
||||
+180
-30
@@ -19,10 +19,10 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(WeeChat, 0.0.9, flashcode@flashtux.org)
|
||||
AC_INIT(WeeChat, 0.1.3, flashcode@flashtux.org)
|
||||
AC_CONFIG_SRCDIR([src/common/weechat.c])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([weechat], [0.0.9])
|
||||
AM_INIT_AUTOMAKE([weechat], [0.1.3])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -30,11 +30,11 @@ AC_PROG_MAKE_SET
|
||||
AC_PROG_RANLIB
|
||||
|
||||
# Gettext
|
||||
ALL_LINGUAS="fr"
|
||||
ALL_LINGUAS="fr es"
|
||||
AM_GNU_GETTEXT
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([curses], [initscr], LIBCURSES_FOUND=1, LIBCURSES_FOUND=0)
|
||||
AC_CHECK_LIB([ncurses], [initscr], LIBNCURSES_FOUND=1, LIBNCURSES_FOUND=0)
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
@@ -44,42 +44,86 @@ AC_CHECK_HEADERS([arpa/inet.h libintl.h limits.h locale.h netdb.h netinet/in.h s
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
AC_MSG_CHECKING([for socklen_t])
|
||||
AC_CACHE_VAL(ac_cv_type_socklen_t,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>],
|
||||
[socklen_t t;],
|
||||
ac_cv_type_socklen_t=yes,
|
||||
ac_cv_type_socklen_t=no,
|
||||
)])
|
||||
if test $ac_cv_type_socklen_t = no; then
|
||||
AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.)
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_type_socklen_t)
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_REALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr uname])
|
||||
AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr uname])
|
||||
|
||||
AH_VERBATIM([PLUGINS], [#undef PLUGINS])
|
||||
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
|
||||
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
|
||||
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
|
||||
AH_VERBATIM([DEBUG], [#undef DEBUG])
|
||||
|
||||
AC_ARG_ENABLE(curses, [ --disable-curses Turn off Curses interface (default=auto)],,enable_curses=yes)
|
||||
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=yes,enable_gtk=no)
|
||||
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=yes,enable_qt=no)
|
||||
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=yes,enable_perl=no)
|
||||
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0)
|
||||
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],enable_ncurses=$enableval,enable_ncurses=yes)
|
||||
AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (default=no)],enable_wxwidgets=$enableval,enable_wxwidgets=no)
|
||||
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=$enableval,enable_gtk=no)
|
||||
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=$enableval,enable_qt=no)
|
||||
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=$enableval,enable_perl=no)
|
||||
AC_ARG_ENABLE(python, [ --enable-python Turn on Python plugins (default=no)],enable_python=$enableval,enable_python=no)
|
||||
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=auto)],enable_gnutls=$enableval,enable_gnutls=yes)
|
||||
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0)
|
||||
|
||||
enable_plugins="no"
|
||||
enable_python="no"
|
||||
PYTHON_CFLAGS=
|
||||
enable_ruby="no"
|
||||
RUBY_CFLAGS=
|
||||
|
||||
AM_CONDITIONAL(GUI_CURSES, test "$enable_curses" = "yes")
|
||||
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
|
||||
AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
|
||||
AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
|
||||
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
|
||||
# AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
|
||||
# AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
|
||||
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
||||
|
||||
if test "x$enable_curses" = "xyes" ; then
|
||||
if test "$LIBCURSES_FOUND" = "0" ; then
|
||||
AC_MSG_ERROR([Curses library not found! Install Curses library or run ./configure with --disable-curses parameter.])
|
||||
if test "x$enable_ncurses" = "xyes" ; then
|
||||
if test "$LIBNCURSES_FOUND" = "0" ; then
|
||||
AC_MSG_ERROR([
|
||||
*** ncurses library not found!
|
||||
*** Please install ncurses library or run ./configure with --disable-ncurses parameter.])
|
||||
fi
|
||||
CURSES_LIBS="-lcurses"
|
||||
AC_SUBST(CURSES_LIBS)
|
||||
NCURSES_LIBS="-lncurses"
|
||||
AC_SUBST(NCURSES_LIBS)
|
||||
fi
|
||||
|
||||
if test "x$enable_wxwidgets" = "xyes" ; then
|
||||
AM_OPTIONS_WXCONFIG
|
||||
AM_PATH_WXCONFIG(2.3.4, wxWin=1)
|
||||
|
||||
if test "$wxWin" != 1; then
|
||||
AC_MSG_ERROR([
|
||||
*** wxWindows must be installed on your system
|
||||
*** but wx-config script couldn't be found.
|
||||
|
||||
*** Please check that wx-config is in path, the directory
|
||||
*** where wxWindows libraries are installed (returned by
|
||||
*** 'wx-config --libs' command) is in LD_LIBRARY_PATH or
|
||||
*** equivalent variable and wxWindows version is 2.3.4 or above.
|
||||
])
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
|
||||
CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
|
||||
LDFLAGS="$LDFLAGS $WX_LIBS"
|
||||
|
||||
WXWIDGETS_CFLAGS=""
|
||||
WXWIDGETS_LIBS=""
|
||||
fi
|
||||
|
||||
if test "x$enable_gtk" = "xyes" ; then
|
||||
@@ -96,18 +140,112 @@ PLUGINS_LIBS=
|
||||
|
||||
if test "x$enable_perl" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/perl/lib_weechat_perl.a `perl -MExtUtils::Embed -e ldopts`"
|
||||
PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
|
||||
|
||||
AC_PATH_PROG(PERL, perl perl5)
|
||||
if test -z $PERL ; then
|
||||
AC_MSG_ERROR([
|
||||
*** Perl must be installed on your system
|
||||
*** but perl interpreter couldn't be found in path.
|
||||
|
||||
Please check that perl is in path, or install
|
||||
it with your software package manager.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for Perl headers files)
|
||||
|
||||
PERL_HEADER_TEST=`PT=perltest.c ; echo "#include <EXTERN.h>" > $PT; echo "#include <perl.h>" >> $PT; echo "#include <XSUB.h>" >> $PT ; echo "int main() { return 0; }" >> $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ccopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
|
||||
|
||||
if test "x$PERL_HEADER_TEST" = "x0" ; then
|
||||
PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Perl headers couldn't be found in your system.
|
||||
*** Try to install it with your software package manager.])
|
||||
fi
|
||||
AC_MSG_RESULT(found)
|
||||
|
||||
AC_MSG_CHECKING(for Perl library)
|
||||
|
||||
PERL_LIB_TEST=`PT=perltest.c ; echo "int main() { return 0; }" > $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ldopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
|
||||
|
||||
if test "x$PERL_LIB_TEST" = "x0" ; then
|
||||
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/perl/lib_weechat_perl.a `$PERL -MExtUtils::Embed -e ldopts`"
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Perl library couldn't be found in your system.
|
||||
*** Try to install it with your software package manager.])
|
||||
fi
|
||||
AC_MSG_RESULT(found)
|
||||
|
||||
AC_SUBST(PERL_CFLAGS)
|
||||
AC_DEFINE(PLUGIN_PERL)
|
||||
fi
|
||||
|
||||
if test "x$enable_python" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
|
||||
AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2)
|
||||
if test -z $PYTHON ; then
|
||||
AC_MSG_ERROR([
|
||||
*** Python must be installed on your system
|
||||
*** but python interpreter couldn't be found in path.
|
||||
|
||||
*** Please check that python is in path, or install
|
||||
*** it with your software package manager.])
|
||||
fi
|
||||
|
||||
PYTHON_SYSPREFIX=`$PYTHON -c 'import sys; print "%s" % sys.prefix'`
|
||||
PYTHON_VERSION=`$PYTHON -c 'import sys ; print sys.version[[:3]]'`
|
||||
PYTHON_INCLUDE="$PYTHON_SYSPREFIX/include/python$PYTHON_VERSION"
|
||||
|
||||
AC_MSG_CHECKING(for Python header files)
|
||||
if test -r "$PYTHON_INCLUDE/Python.h"; then
|
||||
PYTHON_CFLAGS=-I`$PYTHON -c "import distutils.sysconfig,string; print distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Python header files couldn't be found in your system.
|
||||
*** Try to install them with your software package manager.])
|
||||
fi
|
||||
AC_MSG_RESULT(found)
|
||||
|
||||
PYTHON_LIB="$PYTHON_SYSPREFIX/lib/python$PYTHON_VERSION/config"
|
||||
|
||||
AC_MSG_CHECKING(for Python library)
|
||||
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so" -o -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
|
||||
PYTHON_LFLAGS="-lpython$PYTHON_VERSION -lpthread -lutil"
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Python library couldn't be found in your system.
|
||||
*** Try to install it with your software package manager.])
|
||||
fi
|
||||
AC_MSG_RESULT(found)
|
||||
|
||||
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/python/lib_weechat_python.a $PYTHON_LFLAGS"
|
||||
AC_SUBST(PYTHON_CFLAGS)
|
||||
AC_DEFINE(PLUGIN_PYTHON)
|
||||
fi
|
||||
|
||||
if test "x$enable_plugins" = "xyes" ; then
|
||||
AC_DEFINE(PLUGINS)
|
||||
fi
|
||||
|
||||
AC_SUBST(PLUGINS_LIBS)
|
||||
|
||||
if test "x$enable_gnutls" = "xyes" ; then
|
||||
found_gnutls="no"
|
||||
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, 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_LIBS="-lgnutls"
|
||||
AC_SUBST(GNUTLS_LIBS)
|
||||
AC_DEFINE(HAVE_GNUTLS)
|
||||
else
|
||||
enable_gnutls="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
CFLAGS=`echo $CFLAGS | sed s/-g//g`
|
||||
if test "x$CFLAGS" = "x" ; then
|
||||
CFLAGS="-O2"
|
||||
@@ -122,14 +260,20 @@ if test "x$debug" = "x2" ; then
|
||||
AC_DEFINE(DEBUG)
|
||||
fi
|
||||
|
||||
dnl For FreeBSD
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
CFLAGS="$CFLAGS $CPPFLAGS"
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
src/Makefile
|
||||
src/common/Makefile
|
||||
src/irc/Makefile
|
||||
src/plugins/Makefile
|
||||
src/plugins/perl/Makefile
|
||||
src/plugins/python/Makefile
|
||||
src/gui/Makefile
|
||||
src/gui/curses/Makefile
|
||||
src/gui/wxwidgets/Makefile
|
||||
src/gui/gtk/Makefile
|
||||
src/gui/qt/Makefile
|
||||
intl/Makefile
|
||||
@@ -139,8 +283,11 @@ echo
|
||||
echo $PACKAGE $VERSION
|
||||
|
||||
listgui=
|
||||
if test "x$enable_curses" = "xyes" ; then
|
||||
listgui="$listgui Curses"
|
||||
if test "x$enable_ncurses" = "xyes" ; then
|
||||
listgui="$listgui ncurses"
|
||||
fi
|
||||
if test "x$enable_wxwidgets" = "xyes"; then
|
||||
listgui="$listgui WxWidgets"
|
||||
fi
|
||||
if test "x$enable_gtk" = "xyes" ; then
|
||||
listgui="$listgui Gtk+"
|
||||
@@ -150,16 +297,18 @@ if test "x$enable_qt" = "xyes" ; then
|
||||
fi
|
||||
|
||||
if test "x$listgui" = "x" ; then
|
||||
AC_MSG_ERROR([No interface specified... Please specify at least Curses, Gtk or Qt.])
|
||||
AC_MSG_ERROR([
|
||||
*** No interface specified...
|
||||
*** Please specify at least ncurses, WxWidgets, Gtk or Qt.])
|
||||
fi
|
||||
|
||||
msg_debug_compiler="No"
|
||||
msg_debug_verbose="No"
|
||||
msg_debug_compiler="no"
|
||||
msg_debug_verbose="no"
|
||||
if test "x$debug" = "x1" || test "x$debug" = "x2" ; then
|
||||
msg_debug_compiler="Yes"
|
||||
msg_debug_compiler="yes"
|
||||
fi
|
||||
if test "x$debug" = "x2" ; then
|
||||
msg_debug_verbose="Yes"
|
||||
msg_debug_verbose="yes"
|
||||
fi
|
||||
|
||||
echo
|
||||
@@ -169,6 +318,7 @@ echo Build with Plugin support..... : $enable_plugins
|
||||
echo Build with Perl support....... : $enable_perl
|
||||
echo Build with Python support..... : $enable_python
|
||||
echo Build with Ruby support....... : $enable_ruby
|
||||
echo Build with GNUtls support..... : $enable_gnutls
|
||||
echo
|
||||
echo Compile with debug info....... : $msg_debug_compiler
|
||||
echo Print debugging messages...... : $msg_debug_verbose
|
||||
|
||||
Vendored
+33
@@ -1,3 +1,36 @@
|
||||
weechat (0.1.2-2) unstable; urgency=low
|
||||
|
||||
* Patch src/gui/curse/gui-display.c to fix segfault
|
||||
when config file does not exists (Closes: #310589).
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Tue, 24 May 2005 20:55:02 +0200
|
||||
|
||||
weechat (0.1.2-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.1.2, see ChangeLog for detail.
|
||||
|
||||
-- Sebastien Helleu <flashcode@flashtux.org> Sat, 21 May 2005 08:00:00 +0200
|
||||
|
||||
weechat (0.1.1-2) unstable; urgency=low
|
||||
|
||||
* debian/control:
|
||||
- Add myself to uploaders.
|
||||
- Remove unecessary dependency on weechat-gtk (Closes: #308287).
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Tue, 10 May 2005 22:38:52 +0200
|
||||
|
||||
weechat (0.1.1-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.1.1, see ChangeLog for detail (closes: #306492)
|
||||
|
||||
-- Sebastien Helleu <flashcode@flashtux.org> Sat, 20 Mar 2005 08:00:00 +0200
|
||||
|
||||
weechat (0.1.0-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.1.0, see ChangeLog for detail.
|
||||
|
||||
-- Sebastien Helleu <flashcode@flashtux.org> Sat, 12 Feb 2005 12:00:00 +0200
|
||||
|
||||
weechat (0.0.9-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.0.9, see ChangeLog for detail.
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
4
|
||||
Vendored
+5
-4
@@ -1,13 +1,14 @@
|
||||
Source: weechat
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: FlashCode <flashcode@flashtux.org>
|
||||
Build-Depends: debhelper (>> 4.0.0), libncurses5 (>= 5.2.20020112a-7), perl (>= 5.6.0-16), libperl-dev
|
||||
Standards-Version: 3.5.8
|
||||
Maintainer: Sebastien Helleu <flashcode@flashtux.org>
|
||||
Uploaders: Julien Louis <ptitlouis@sysif.net>
|
||||
Build-Depends: debhelper (>> 4.0.4), libncurses5-dev (>= 5.2.20020112a-7), libperl-dev, python-dev
|
||||
Standards-Version: 3.6.1
|
||||
|
||||
Package: weechat
|
||||
Architecture: all
|
||||
Depends: ${shlibs:Depends}, weechat-common (= ${Source-Version}), weechat-curses (= ${Source-Version}), weechat-gtk (= ${Source-Version})
|
||||
Depends: weechat-common (= ${Source-Version}), weechat-curses (= ${Source-Version})
|
||||
Description: Fast, light and extensible IRC client
|
||||
WeeChat (Wee Enhanced Environment for Chat) is a fast and light IRC client
|
||||
for many operating systems. Everything can be done with a keyboard.
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
This package was debianized by FlashCode <flashcode@flashtux.org> on
|
||||
Sat, 01 Jan 2005 13:00:00 +0200.
|
||||
Sat, 21 May 2005 08:00:00 +0200.
|
||||
|
||||
It was downloaded from http://weechat.flashtux.org/download
|
||||
|
||||
|
||||
Vendored
+17
-15
@@ -14,7 +14,8 @@ endif
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
./configure --prefix=/usr --sysconfdir=/etc --enable-perl
|
||||
./configure --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man \
|
||||
--enable-perl --enable-python
|
||||
touch configure-stamp
|
||||
|
||||
|
||||
@@ -29,7 +30,7 @@ clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp configure-stamp
|
||||
-$(MAKE) clean
|
||||
-$(MAKE) distclean
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
@@ -40,32 +41,33 @@ install: build
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/weechat
|
||||
dh_install --sourcedir=debian/weechat
|
||||
install -o root -g root -m 755 src/gui/curses/weechat-curses $(CURDIR)/debian/weechat-curses/usr/bin
|
||||
#install -o root -g root -m 755 src/gui/gtk/weechat-gtk $(CURDIR)/debian/weechat-gtk/usr/bin
|
||||
# install -o root -g root -m 755 src/gui/gtk/weechat-gtk $(CURDIR)/debian/weechat-gtk/usr/bin
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
dh_testdir -pweechat-common
|
||||
dh_testroot -pweechat-common
|
||||
dh_testdir -pweechat-common -pweechat
|
||||
dh_testroot -pweechat-common -pweechat
|
||||
dh_installchangelogs ChangeLog -pweechat-common
|
||||
dh_installdocs -pweechat-common
|
||||
dh_installexamples -pweechat-common
|
||||
dh_compress -pweechat-common
|
||||
dh_fixperms -pweechat-common
|
||||
dh_installdeb -pweechat-common
|
||||
dh_shlibdeps -pweechat-common
|
||||
dh_gencontrol -pweechat-common
|
||||
dh_md5sums -pweechat-common
|
||||
dh_builddeb -pweechat-common
|
||||
dh_compress -pweechat-common -pweechat
|
||||
dh_link -pweechat usr/share/doc/weechat-common usr/share/doc/weechat
|
||||
dh_fixperms -pweechat-common -pweechat
|
||||
dh_installdeb -pweechat-common -pweechat
|
||||
dh_shlibdeps -pweechat-common -pweechat
|
||||
dh_gencontrol -pweechat-common -pweechat
|
||||
dh_md5sums -pweechat-common -pweechat
|
||||
dh_builddeb -pweechat-common -pweechat
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir -a
|
||||
dh_testroot -a
|
||||
dh_installchangelogs -a
|
||||
dh_installdocs -a
|
||||
# dh_installchangelogs -a
|
||||
# dh_installdocs -a
|
||||
dh_installman weechat-curses.1 -pweechat-curses
|
||||
dh_link -a
|
||||
dh_link -a usr/share/doc/weechat-common usr/share/doc/weechat-curses
|
||||
dh_strip -a
|
||||
dh_compress -a
|
||||
dh_fixperms -a
|
||||
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2003 FlashCode <flashcode@flashtux.org>
|
||||
# Copyright (c) 2003-2005 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
|
||||
@@ -15,15 +15,18 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
all: weechat_doc_fr.texi weechat_doc_en.texi weechat_doc_pt.texi
|
||||
all: weechat_doc_fr.texi weechat_doc_en.texi weechat_doc_pt.texi weechat_doc_es.texi
|
||||
export LANG=fr_FR && makeinfo --html --no-split --number-sections weechat_doc_fr.texi
|
||||
export LANG=fr_FR && makeinfo --no-headers --no-warn --no-split --number-sections weechat_doc_fr.texi >weechat_doc_fr.txt
|
||||
export LANG=en_EN && makeinfo --html --no-split --number-sections weechat_doc_en.texi
|
||||
export LANG=en_EN && makeinfo --no-headers --no-warn --no-split --number-sections weechat_doc_en.texi >weechat_doc_en.txt
|
||||
export LANG=es_ES && makeinfo --html --no-split --number-sections weechat_doc_es.texi
|
||||
export LANG=es_ES && makeinfo --no-headers --no-warn --no-split --number-sections weechat_doc_es.texi >weechat_doc_es.txt
|
||||
export LANG=pt_PT && makeinfo --html --no-split --number-sections weechat_doc_pt.texi
|
||||
export LANG=pt_PT && makeinfo --no-headers --no-warn --no-split --number-sections weechat_doc_pt.texi >weechat_doc_pt.txt
|
||||
export LANG=fr_FR && texi2pdf weechat_doc_fr.texi
|
||||
export LANG=en_EN && texi2pdf weechat_doc_en.texi
|
||||
export LANG=es_ES && texi2pdf weechat_doc_es.texi
|
||||
export LANG=pt_PT && texi2pdf weechat_doc_pt.texi
|
||||
|
||||
clean:
|
||||
|
||||
+938
-173
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+940
-174
File diff suppressed because it is too large
Load Diff
+1148
-52
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+14
-5
@@ -1,30 +1,39 @@
|
||||
./src/irc/irc-nick.c
|
||||
./src/irc/irc-server.c
|
||||
./src/irc/irc-channel.c
|
||||
./src/irc/irc.h
|
||||
./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.h
|
||||
./src/plugins/perl/wee-perl.c
|
||||
./src/plugins/perl/wee-perl.h
|
||||
./src/plugins/python/wee-python.c
|
||||
./src/plugins/python/wee-python.h
|
||||
./src/plugins/plugins.c
|
||||
./src/plugins/plugins.h
|
||||
./src/gui/curses/gui-input.c
|
||||
./src/gui/curses/gui-display.c
|
||||
./src/gui/gtk/gui-display.c
|
||||
./src/gui/gtk/gui-input.c
|
||||
./src/gui/gui.h
|
||||
./src/gui/gui-common.c
|
||||
./src/gui/gui.h
|
||||
./src/common/command.c
|
||||
./src/common/completion.c
|
||||
./src/common/history.c
|
||||
./src/common/weechat.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/weechat.c
|
||||
./src/common/weechat.h
|
||||
./src/common/weeconfig.c
|
||||
./src/common/weeconfig.h
|
||||
./src/common/weelist.c
|
||||
./src/common/weelist.h
|
||||
|
||||
+1677
-1117
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,8 @@ lib_weechat_main_a_SOURCES = weechat.c \
|
||||
command.h \
|
||||
completion.c \
|
||||
completion.h \
|
||||
weelist.c \
|
||||
weelist.h \
|
||||
weeconfig.c \
|
||||
weeconfig.h \
|
||||
history.c \
|
||||
@@ -32,4 +34,6 @@ lib_weechat_main_a_SOURCES = weechat.c \
|
||||
hotlist.c \
|
||||
hotlist.h \
|
||||
log.c \
|
||||
log.h
|
||||
log.h \
|
||||
fifo.c \
|
||||
fifo.h
|
||||
|
||||
+870
-439
File diff suppressed because it is too large
Load Diff
+12
-13
@@ -21,7 +21,9 @@
|
||||
#ifndef __WEECHAT_COMMAND_H
|
||||
#define __WEECHAT_COMMAND_H 1
|
||||
|
||||
#include "weelist.h"
|
||||
#include "../irc/irc.h"
|
||||
#include "../gui/gui.h"
|
||||
|
||||
#define MAX_ARGS 8192
|
||||
|
||||
@@ -48,35 +50,32 @@ struct t_weechat_alias
|
||||
t_weechat_alias *next_alias;
|
||||
};
|
||||
|
||||
typedef struct t_index_command t_index_command;
|
||||
|
||||
struct t_index_command
|
||||
{
|
||||
char *command_name;
|
||||
t_index_command *prev_index;
|
||||
t_index_command *next_index;
|
||||
};
|
||||
extern t_weechat_command weechat_commands[];
|
||||
|
||||
extern t_weechat_alias *weechat_alias;
|
||||
extern t_index_command *index_commands;
|
||||
extern t_weelist *index_commands;
|
||||
extern t_weelist *last_index_command;
|
||||
|
||||
extern t_index_command *index_command_search (char *);
|
||||
extern t_index_command *index_command_new (char *);
|
||||
extern void index_command_build ();
|
||||
extern void command_index_build ();
|
||||
extern void command_index_free ();
|
||||
extern t_weechat_alias *alias_new (char *, char *);
|
||||
extern void alias_free_all ();
|
||||
extern int exec_weechat_command (t_irc_server *, char *);
|
||||
extern void user_command (t_irc_server *, char *);
|
||||
extern void user_command (t_irc_server *, t_gui_buffer *, char *);
|
||||
extern int weechat_cmd_alias (char *);
|
||||
extern int weechat_cmd_buffer (int, char **);
|
||||
extern int weechat_cmd_clear (int, char **);
|
||||
extern int weechat_cmd_connect (int, char **);
|
||||
extern int weechat_cmd_debug (int, char **);
|
||||
extern int weechat_cmd_disconnect (int, char **);
|
||||
extern int weechat_cmd_help (int, char **);
|
||||
extern int weechat_cmd_perl (int, char **);
|
||||
extern int weechat_cmd_python (int, char **);
|
||||
extern int weechat_cmd_save (int, char **);
|
||||
extern int weechat_cmd_server (int, char **);
|
||||
extern int weechat_cmd_set (char *);
|
||||
extern int weechat_cmd_unalias (char *);
|
||||
extern int weechat_cmd_unset (char *);
|
||||
extern int weechat_cmd_window (int, char **);
|
||||
|
||||
#endif /* command.h */
|
||||
|
||||
+729
-72
@@ -29,8 +29,10 @@
|
||||
|
||||
#include "weechat.h"
|
||||
#include "completion.h"
|
||||
#include "../irc/irc.h"
|
||||
#include "command.h"
|
||||
#include "weelist.h"
|
||||
#include "weeconfig.h"
|
||||
#include "../irc/irc.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -40,8 +42,15 @@
|
||||
void
|
||||
completion_init (t_completion *completion)
|
||||
{
|
||||
completion->context = COMPLETION_NULL;
|
||||
completion->base_command = NULL;
|
||||
completion->base_command_arg = 0;
|
||||
completion->position = -1;
|
||||
completion->base_word = NULL;
|
||||
completion->args = NULL;
|
||||
|
||||
completion->completion_list = NULL;
|
||||
completion->last_completion = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -51,8 +60,605 @@ completion_init (t_completion *completion)
|
||||
void
|
||||
completion_free (t_completion *completion)
|
||||
{
|
||||
if (completion->base_command)
|
||||
free (completion->base_command);
|
||||
completion->base_command = NULL;
|
||||
|
||||
if (completion->base_word)
|
||||
free (completion->base_word);
|
||||
completion->base_word = NULL;
|
||||
|
||||
if (completion->args)
|
||||
free (completion->args);
|
||||
completion->args = NULL;
|
||||
|
||||
while (completion->completion_list)
|
||||
weelist_remove (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
completion->completion_list);
|
||||
completion->completion_list = NULL;
|
||||
completion->last_completion = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_stop: stop completion (for example after 1 arg of command with 1 arg)
|
||||
*/
|
||||
|
||||
void
|
||||
completion_stop (t_completion *completion)
|
||||
{
|
||||
completion->context = COMPLETION_NULL;
|
||||
completion->position = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_build_list: build data list according to command and argument #
|
||||
*/
|
||||
|
||||
void
|
||||
completion_build_list (t_completion *completion, void *channel)
|
||||
{
|
||||
t_weelist *ptr_list;
|
||||
int i, j;
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
char *pos, option_name[256];
|
||||
t_weechat_alias *ptr_alias;
|
||||
t_config_option *option;
|
||||
void *option_value;
|
||||
char option_string[2048];
|
||||
|
||||
/* WeeChat internal commands */
|
||||
|
||||
/* no completion for some commands */
|
||||
if ((strcasecmp (completion->base_command, "server") == 0)
|
||||
|| (strcasecmp (completion->base_command, "save") == 0))
|
||||
{
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "alias") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
for (ptr_list = index_commands; ptr_list; ptr_list = ptr_list->next_weelist)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
ptr_list->data);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "buffer") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"close");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"list");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"move");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"notify");
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "clear") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"-all");
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "connect") == 0)
|
||||
|| (strcasecmp (completion->base_command, "disconnect") == 0))
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
ptr_server->name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "debug") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"dump");
|
||||
else
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "help") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
for (i = 0; weechat_commands[i].command_name; i++)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
weechat_commands[i].command_name);
|
||||
}
|
||||
for (i = 0; irc_commands[i].command_name; i++)
|
||||
{
|
||||
if (irc_commands[i].cmd_function_args || irc_commands[i].cmd_function_1arg)
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
irc_commands[i].command_name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (((strcasecmp (completion->base_command, "perl") == 0)
|
||||
|| (strcasecmp (completion->base_command, "python") == 0))
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"load");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"autoload");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"reload");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"unload");
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "set") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
for (i = 0; i < CONFIG_NUMBER_SECTIONS; i++)
|
||||
{
|
||||
if ((i != CONFIG_SECTION_ALIAS) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
weechat_options[i][j].option_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
|
||||
{
|
||||
snprintf (option_name, sizeof (option_name), "%s.%s",
|
||||
ptr_server->name,
|
||||
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
option_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (completion->base_command_arg == 3)
|
||||
{
|
||||
if (completion->args)
|
||||
{
|
||||
pos = strchr (completion->args, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
option = NULL;
|
||||
option_value = NULL;
|
||||
config_option_search_option_value (completion->args, &option, &option_value);
|
||||
if (option && option_value)
|
||||
{
|
||||
switch (option->option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
if (option_value && (*((int *)(option_value))))
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"on");
|
||||
else
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"off");
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
snprintf (option_string, sizeof (option_string) - 1,
|
||||
"%d", (option_value) ? *((int *)(option_value)) : option->default_int);
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
option_string);
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
(option_value) ?
|
||||
option->array_values[*((int *)(option_value))] :
|
||||
option->array_values[option->default_int]);
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
(option_value) ?
|
||||
gui_get_color_by_value (*((int *)(option_value))) :
|
||||
option->default_string);
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
(option_value) ?
|
||||
*((char **)(option_value)) :
|
||||
option->default_string);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pos)
|
||||
pos[0] = ' ';
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "unalias") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
for (ptr_alias = weechat_alias; ptr_alias; ptr_alias = ptr_alias->next_alias)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
ptr_alias->alias_name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "window") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"list");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"splith");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"splitv");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"merge");
|
||||
return;
|
||||
}
|
||||
|
||||
if (completion->base_command_arg == 2)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"down");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"up");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"left");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"right");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"all");
|
||||
return;
|
||||
}
|
||||
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
|
||||
/* IRC commands */
|
||||
|
||||
/* no completion for some commands */
|
||||
if ((strcasecmp (completion->base_command, "admin") == 0)
|
||||
|| (strcasecmp (completion->base_command, "die") == 0)
|
||||
|| (strcasecmp (completion->base_command, "info") == 0)
|
||||
|| (strcasecmp (completion->base_command, "join") == 0)
|
||||
|| (strcasecmp (completion->base_command, "links") == 0)
|
||||
|| (strcasecmp (completion->base_command, "list") == 0)
|
||||
|| (strcasecmp (completion->base_command, "lusers") == 0)
|
||||
|| (strcasecmp (completion->base_command, "motd") == 0)
|
||||
|| (strcasecmp (completion->base_command, "oper") == 0)
|
||||
|| (strcasecmp (completion->base_command, "rehash") == 0)
|
||||
|| (strcasecmp (completion->base_command, "restart") == 0)
|
||||
|| (strcasecmp (completion->base_command, "service") == 0)
|
||||
|| (strcasecmp (completion->base_command, "servlist") == 0)
|
||||
|| (strcasecmp (completion->base_command, "squery") == 0)
|
||||
|| (strcasecmp (completion->base_command, "squit") == 0)
|
||||
|| (strcasecmp (completion->base_command, "stats") == 0)
|
||||
|| (strcasecmp (completion->base_command, "summon") == 0)
|
||||
|| (strcasecmp (completion->base_command, "time") == 0)
|
||||
|| (strcasecmp (completion->base_command, "trace") == 0)
|
||||
|| (strcasecmp (completion->base_command, "users") == 0)
|
||||
|| (strcasecmp (completion->base_command, "wallops") == 0)
|
||||
|| (strcasecmp (completion->base_command, "who") == 0))
|
||||
{
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "away") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
if (cfg_irc_default_msg_away && cfg_irc_default_msg_away[0])
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
cfg_irc_default_msg_away);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "ctcp") == 0)
|
||||
&& (completion->base_command_arg == 2))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"action");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"version");
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "dcc") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"chat");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"send");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"close");
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "invite") == 0)
|
||||
{
|
||||
/* arg1: nickname */
|
||||
if (completion->base_command_arg == 1)
|
||||
return;
|
||||
|
||||
/* arg > 2: not allowed */
|
||||
if (completion->base_command_arg > 2)
|
||||
{
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
|
||||
/* arg2: channel */
|
||||
if (SERVER(gui_current_window->buffer))
|
||||
{
|
||||
for (ptr_channel = SERVER(gui_current_window->buffer)->channels;
|
||||
ptr_channel; ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
ptr_channel->name);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "kick") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "kill") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "me") == 0)
|
||||
{
|
||||
completion->context = COMPLETION_NICK;
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "notice") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "part") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
if (cfg_irc_default_msg_part && cfg_irc_default_msg_part[0])
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
cfg_irc_default_msg_part);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "query") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "quit") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
if (cfg_irc_default_msg_quit && cfg_irc_default_msg_quit[0])
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
cfg_irc_default_msg_quit);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "topic") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
if (!channel || !((t_irc_channel *)channel)->topic
|
||||
|| !((t_irc_channel *)channel)->topic[0])
|
||||
completion_stop (completion);
|
||||
else
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_channel *)channel)->topic);
|
||||
}
|
||||
else
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_find_context: find context for completion
|
||||
*/
|
||||
|
||||
void
|
||||
completion_find_context (t_completion *completion, void *channel, char *buffer,
|
||||
int size, int pos)
|
||||
{
|
||||
int i, command, command_arg, pos_start, pos_end;
|
||||
|
||||
/* look for context */
|
||||
completion_free (completion);
|
||||
command = (buffer[0] == '/') ? 1 : 0;
|
||||
command_arg = 0;
|
||||
i = 0;
|
||||
while (i < pos)
|
||||
{
|
||||
if (buffer[i] == ' ')
|
||||
{
|
||||
command_arg++;
|
||||
i++;
|
||||
while ((i < pos) && (buffer[i] == ' ')) i++;
|
||||
if (!completion->args)
|
||||
completion->args = strdup (buffer + i);
|
||||
}
|
||||
else
|
||||
i++;
|
||||
}
|
||||
if (command)
|
||||
{
|
||||
if (command_arg > 0)
|
||||
{
|
||||
completion->context = COMPLETION_COMMAND_ARG;
|
||||
completion->base_command_arg = command_arg;
|
||||
}
|
||||
else
|
||||
{
|
||||
completion->context = COMPLETION_COMMAND;
|
||||
completion->base_command_arg = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (channel)
|
||||
completion->context = COMPLETION_NICK;
|
||||
else
|
||||
completion->context = COMPLETION_NULL;
|
||||
}
|
||||
|
||||
/* look for word to complete (base word) */
|
||||
completion->base_word_pos = 0;
|
||||
completion->position_replace = pos;
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
i = pos;
|
||||
pos_start = i;
|
||||
if (buffer[i] == ' ')
|
||||
{
|
||||
if ((i > 0) && (buffer[i-1] != ' '))
|
||||
{
|
||||
i--;
|
||||
while ((i >= 0) && (buffer[i] != ' '))
|
||||
i--;
|
||||
pos_start = i + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while ((i >= 0) && (buffer[i] != ' '))
|
||||
i--;
|
||||
pos_start = i + 1;
|
||||
}
|
||||
i = pos;
|
||||
while ((i < size) && (buffer[i] != ' '))
|
||||
i++;
|
||||
pos_end = i - 1;
|
||||
|
||||
completion->base_word_pos = pos_start;
|
||||
|
||||
if (pos_start <= pos_end)
|
||||
{
|
||||
if (completion->context == COMPLETION_COMMAND)
|
||||
completion->position_replace = pos_start + 1;
|
||||
else
|
||||
completion->position_replace = pos_start;
|
||||
|
||||
completion->base_word = (char *) malloc (pos_end - pos_start + 2);
|
||||
for (i = pos_start; i <= pos_end; i++)
|
||||
completion->base_word[i - pos_start] = buffer[i];
|
||||
completion->base_word[pos_end - pos_start + 1] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
if (!completion->base_word)
|
||||
completion->base_word = strdup ("");
|
||||
|
||||
/* find command (for command argument completion only) */
|
||||
if (completion->context == COMPLETION_COMMAND_ARG)
|
||||
{
|
||||
pos_start = 0;
|
||||
while ((pos_start < size) && (buffer[pos_start] != '/'))
|
||||
pos_start++;
|
||||
if (buffer[pos_start] == '/')
|
||||
{
|
||||
pos_start++;
|
||||
pos_end = pos_start;
|
||||
while ((pos_end < size) && (buffer[pos_end] != ' '))
|
||||
pos_end++;
|
||||
if (buffer[pos_end] == ' ')
|
||||
pos_end--;
|
||||
|
||||
completion->base_command = (char *) malloc (pos_end - pos_start + 2);
|
||||
for (i = pos_start; i <= pos_end; i++)
|
||||
completion->base_command[i - pos_start] = buffer[i];
|
||||
completion->base_command[pos_end - pos_start + 1] = '\0';
|
||||
completion_build_list (completion, channel);
|
||||
}
|
||||
}
|
||||
|
||||
/* nick completion with nothing as base word is disabled,
|
||||
in order to prevent completion when pasting messages with [tab] inside */
|
||||
if ((completion->context == COMPLETION_NICK)
|
||||
&& ((!completion->base_word) || (!completion->base_word[0])))
|
||||
{
|
||||
completion->context = COMPLETION_NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!completion->completion_list && channel &&
|
||||
(((t_irc_channel *)channel)->type == CHAT_PRIVATE)
|
||||
&& (completion->context == COMPLETION_NICK))
|
||||
{
|
||||
/* nick completion in private (only other nick and self) */
|
||||
completion->context = COMPLETION_NICK;
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_channel *)channel)->name);
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
SERVER(gui_current_window->buffer)->nick);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -62,23 +668,37 @@ completion_free (t_completion *completion)
|
||||
void
|
||||
completion_command (t_completion *completion)
|
||||
{
|
||||
int length, word_found_seen;
|
||||
t_index_command *ptr_index;
|
||||
int length, word_found_seen, other_completion;
|
||||
t_weelist *ptr_weelist, *ptr_weelist2;
|
||||
|
||||
length = strlen (completion->base_word) - 1;
|
||||
word_found_seen = 0;
|
||||
for (ptr_index = index_commands; ptr_index; ptr_index = ptr_index->next_index)
|
||||
other_completion = 0;
|
||||
for (ptr_weelist = index_commands; ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_index->command_name, completion->base_word + 1, length) == 0)
|
||||
if (strncasecmp (ptr_weelist->data, completion->base_word + 1, length) == 0)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
completion->word_found = ptr_index->command_name;
|
||||
completion->word_found = ptr_weelist->data;
|
||||
for (ptr_weelist2 = ptr_weelist->next_weelist; ptr_weelist2;
|
||||
ptr_weelist2 = ptr_weelist2->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_weelist2->data,
|
||||
completion->base_word + 1, length) == 0)
|
||||
other_completion++;
|
||||
}
|
||||
if (other_completion == 0)
|
||||
completion->position = -1;
|
||||
else
|
||||
if (completion->position < 0)
|
||||
completion->position = 0;
|
||||
return;
|
||||
}
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(strcasecmp (ptr_index->command_name, completion->word_found) == 0))
|
||||
(strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
word_found_seen = 1;
|
||||
}
|
||||
if (completion->word_found)
|
||||
@@ -88,6 +708,54 @@ completion_command (t_completion *completion)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_command_arg: complete a command argument
|
||||
*/
|
||||
|
||||
void
|
||||
completion_command_arg (t_completion *completion, t_irc_channel *channel)
|
||||
{
|
||||
int length, word_found_seen, other_completion;
|
||||
t_weelist *ptr_weelist, *ptr_weelist2;
|
||||
|
||||
length = strlen (completion->base_word);
|
||||
word_found_seen = 0;
|
||||
other_completion = 0;
|
||||
for (ptr_weelist = completion->completion_list; ptr_weelist;
|
||||
ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_weelist->data, completion->base_word, length) == 0)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
completion->word_found = ptr_weelist->data;
|
||||
for (ptr_weelist2 = ptr_weelist->next_weelist; ptr_weelist2;
|
||||
ptr_weelist2 = ptr_weelist2->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_weelist2->data,
|
||||
completion->base_word, length) == 0)
|
||||
other_completion++;
|
||||
}
|
||||
if (other_completion == 0)
|
||||
completion->position = -1;
|
||||
else
|
||||
if (completion->position < 0)
|
||||
completion->position = 0;
|
||||
return;
|
||||
}
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
word_found_seen = 1;
|
||||
}
|
||||
if (completion->word_found)
|
||||
{
|
||||
completion->word_found = NULL;
|
||||
completion_command_arg (completion, channel);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_nick: complete a nick
|
||||
*/
|
||||
@@ -95,11 +763,21 @@ completion_command (t_completion *completion)
|
||||
void
|
||||
completion_nick (t_completion *completion, t_irc_channel *channel)
|
||||
{
|
||||
int length, word_found_seen;
|
||||
t_irc_nick *ptr_nick;
|
||||
int length, word_found_seen, other_completion;
|
||||
t_irc_nick *ptr_nick, *ptr_nick2;
|
||||
|
||||
if (!channel)
|
||||
return;
|
||||
|
||||
if (((t_irc_channel *)channel)->type == CHAT_PRIVATE)
|
||||
{
|
||||
completion_command_arg (completion, channel);
|
||||
return;
|
||||
}
|
||||
|
||||
length = strlen (completion->base_word);
|
||||
word_found_seen = 0;
|
||||
other_completion = 0;
|
||||
for (ptr_nick = channel->nicks; ptr_nick; ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
if (strncasecmp (ptr_nick->nick, completion->base_word, length) == 0)
|
||||
@@ -107,8 +785,21 @@ completion_nick (t_completion *completion, t_irc_channel *channel)
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
completion->word_found = ptr_nick->nick;
|
||||
for (ptr_nick2 = ptr_nick->next_nick; ptr_nick2;
|
||||
ptr_nick2 = ptr_nick2->next_nick)
|
||||
{
|
||||
if (strncasecmp (ptr_nick2->nick,
|
||||
completion->base_word, length) == 0)
|
||||
other_completion++;
|
||||
}
|
||||
if (other_completion == 0)
|
||||
completion->position = -1;
|
||||
else
|
||||
if (completion->position < 0)
|
||||
completion->position = 0;
|
||||
return;
|
||||
}
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(strcasecmp (ptr_nick->nick, completion->word_found) == 0))
|
||||
@@ -129,83 +820,49 @@ void
|
||||
completion_search (t_completion *completion, void *channel,
|
||||
char *buffer, int size, int pos)
|
||||
{
|
||||
int i, pos_start, pos_end;
|
||||
char *old_word_found;
|
||||
|
||||
/* TODO: complete when no word is there with command according to context */
|
||||
if (size == 0)
|
||||
{
|
||||
completion->word_found = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
/* if new complation => look for base word */
|
||||
/* if new completion => look for base word */
|
||||
if (pos != completion->position)
|
||||
{
|
||||
completion->word_found = NULL;
|
||||
|
||||
if ((pos == size) || (buffer[pos-1] != ' '))
|
||||
pos--;
|
||||
if ((pos > 0) && (buffer[pos] == ' '))
|
||||
return;
|
||||
|
||||
i = pos;
|
||||
while ((i >= 0) && (buffer[i] != ' '))
|
||||
i--;
|
||||
pos_start = i + 1;
|
||||
i = pos;
|
||||
while ((i < size) && (buffer[i] != ' '))
|
||||
i++;
|
||||
pos_end = i - 1;
|
||||
|
||||
if (pos_start > pos_end)
|
||||
return;
|
||||
|
||||
completion->base_word_pos = pos_start;
|
||||
|
||||
if (completion->base_word)
|
||||
free (completion->base_word);
|
||||
completion->base_word = (char *) malloc (pos_end - pos_start + 2);
|
||||
|
||||
for (i = pos_start; i <= pos_end; i++)
|
||||
completion->base_word[i - pos_start] = buffer[i];
|
||||
completion->base_word[pos_end - pos_start + 1] = '\0';
|
||||
|
||||
if (completion->base_word[0] == '/')
|
||||
completion->position_replace = pos_start + 1;
|
||||
else
|
||||
completion->position_replace = pos_start;
|
||||
completion_find_context (completion, channel, buffer, size, pos);
|
||||
}
|
||||
|
||||
/* completion */
|
||||
old_word_found = completion->word_found;
|
||||
if (completion->base_word[0] == '/')
|
||||
switch (completion->context)
|
||||
{
|
||||
completion_command (completion);
|
||||
if (completion->word_found)
|
||||
{
|
||||
if (old_word_found)
|
||||
completion->diff_size = strlen (completion->word_found) -
|
||||
strlen (old_word_found);
|
||||
case COMPLETION_NULL:
|
||||
/* should never be executed */
|
||||
return;
|
||||
case COMPLETION_NICK:
|
||||
if (channel)
|
||||
completion_nick (completion, (t_irc_channel *)channel);
|
||||
else
|
||||
completion->diff_size = strlen (completion->word_found) -
|
||||
strlen (completion->base_word) + 1;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case COMPLETION_COMMAND:
|
||||
completion_command (completion);
|
||||
break;
|
||||
case COMPLETION_COMMAND_ARG:
|
||||
if (completion->completion_list)
|
||||
completion_command_arg (completion, (t_irc_channel *)channel);
|
||||
else
|
||||
completion_nick (completion, (t_irc_channel *)channel);
|
||||
break;
|
||||
}
|
||||
else
|
||||
if (completion->word_found)
|
||||
{
|
||||
if (channel)
|
||||
if (old_word_found)
|
||||
completion->diff_size = strlen (completion->word_found) -
|
||||
strlen (old_word_found);
|
||||
else
|
||||
{
|
||||
completion_nick (completion, (t_irc_channel *)channel);
|
||||
if (completion->word_found)
|
||||
{
|
||||
if (old_word_found)
|
||||
completion->diff_size = strlen (completion->word_found) -
|
||||
strlen (old_word_found);
|
||||
else
|
||||
completion->diff_size = strlen (completion->word_found) -
|
||||
strlen (completion->base_word);
|
||||
}
|
||||
completion->diff_size = strlen (completion->word_found) -
|
||||
strlen (completion->base_word);
|
||||
if (completion->context == COMPLETION_COMMAND)
|
||||
completion->diff_size++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+24
-6
@@ -21,16 +21,34 @@
|
||||
#ifndef __WEECHAT_COMPLETION_H
|
||||
#define __WEECHAT_COMPLETION_H 1
|
||||
|
||||
#include "weelist.h"
|
||||
|
||||
#define COMPLETION_NULL 0
|
||||
#define COMPLETION_NICK 1
|
||||
#define COMPLETION_COMMAND 2
|
||||
#define COMPLETION_COMMAND_ARG 3
|
||||
|
||||
typedef struct t_completion t_completion;
|
||||
|
||||
struct t_completion
|
||||
{
|
||||
char *base_word; /* word to complete (when Tab was pressed) */
|
||||
int base_word_pos; /* beggining of base word */
|
||||
int position; /* position where we shoud complete */
|
||||
char *word_found; /* word found (to replace base word) */
|
||||
int position_replace; /* position where word should be replaced */
|
||||
int diff_size; /* size difference (< 0 = char(s) deleted) */
|
||||
/* completion context */
|
||||
int context; /* context: null, nick, command, cmd arg */
|
||||
char *base_command; /* command with arg to complete (can be NULL) */
|
||||
int base_command_arg; /* # arg to complete (if context is cmd arg) */
|
||||
char *base_word; /* word to complete (when Tab was pressed) */
|
||||
int base_word_pos; /* beggining of base word */
|
||||
int position; /* position where Tab was pressed */
|
||||
char *args; /* command line args (including base word) */
|
||||
|
||||
/* for command argument completion */
|
||||
t_weelist *completion_list; /* data list for completion */
|
||||
t_weelist *last_completion; /* last data element for completion */
|
||||
|
||||
/* completion found */
|
||||
char *word_found; /* word found (to replace base word) */
|
||||
int position_replace; /* position where word has to be replaced */
|
||||
int diff_size; /* size difference (< 0 = char(s) deleted) */
|
||||
};
|
||||
|
||||
extern void completion_init (t_completion *);
|
||||
|
||||
@@ -0,0 +1,310 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* fifo.c: FIFO pipe for WeeChat remote control */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "fifo.h"
|
||||
#include "command.h"
|
||||
#include "weeconfig.h"
|
||||
#include "../gui/gui.h"
|
||||
|
||||
|
||||
int weechat_fifo = -1;
|
||||
char *weechat_fifo_filename = NULL;
|
||||
char *weechat_fifo_unterminated = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* fifo_create: create FIFO pipe for remote control
|
||||
*/
|
||||
|
||||
void
|
||||
fifo_create ()
|
||||
{
|
||||
int filename_length;
|
||||
|
||||
if (cfg_irc_fifo_pipe)
|
||||
{
|
||||
/* build FIFO filename: "~/.weechat/weechat_fifo_" + process PID */
|
||||
if (!weechat_fifo_filename)
|
||||
{
|
||||
filename_length = strlen (weechat_home) + 64;
|
||||
weechat_fifo_filename = (char *) malloc (filename_length * sizeof (char));
|
||||
snprintf (weechat_fifo_filename, filename_length, "%s/weechat_fifo_%d",
|
||||
weechat_home, (int) getpid());
|
||||
}
|
||||
|
||||
/* create FIFO pipe, writable for user only */
|
||||
if ((weechat_fifo = mkfifo (weechat_fifo_filename, 0600)) != 0)
|
||||
{
|
||||
weechat_fifo = -1;
|
||||
gui_printf (NULL,
|
||||
_("%s unable to create FIFO pipe for remote control (%s)\n"),
|
||||
WEECHAT_ERROR, weechat_fifo_filename);
|
||||
wee_log_printf (_("%s unable to create FIFO pipe for remote control (%s)\n"),
|
||||
WEECHAT_ERROR, weechat_fifo_filename);
|
||||
return;
|
||||
}
|
||||
|
||||
/* open FIFO pipe in read-only (for WeeChat), non nlobking mode */
|
||||
if ((weechat_fifo = open (weechat_fifo_filename, O_RDONLY | O_NONBLOCK)) == -1)
|
||||
{
|
||||
gui_printf (NULL,
|
||||
_("%s unable to open FIFO pipe (%s) for reading\n"),
|
||||
WEECHAT_ERROR, weechat_fifo_filename);
|
||||
wee_log_printf (_("%s unable to open FIFO pipe (%s) for reading\n"),
|
||||
WEECHAT_ERROR, weechat_fifo_filename);
|
||||
return;
|
||||
}
|
||||
|
||||
wee_log_printf (_("FIFO pipe is open\n"));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* fifo_exec: execute a command/text received by FIFO pipe
|
||||
*/
|
||||
|
||||
void
|
||||
fifo_exec (char *text)
|
||||
{
|
||||
char *pos_msg, *pos;
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
|
||||
pos = NULL;
|
||||
ptr_server = NULL;
|
||||
ptr_channel = NULL;
|
||||
ptr_buffer = NULL;
|
||||
|
||||
/* look for server/channel at beginning of text */
|
||||
/* text may be: "server,channel *text" or "server *text" or "*text" */
|
||||
if (text[0] == '*')
|
||||
{
|
||||
pos_msg = text + 1;
|
||||
ptr_server = SERVER(gui_current_window->buffer);
|
||||
ptr_buffer = gui_current_window->buffer;
|
||||
|
||||
if (!ptr_server)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL, _("%s invalid buffer for displaying text via FIFO pipe\n"),
|
||||
WEECHAT_WARNING);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pos_msg = strstr (text, " *");
|
||||
if (!pos_msg)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL, _("%s invalid text received on FIFO pipe\n"),
|
||||
WEECHAT_WARNING);
|
||||
return;
|
||||
}
|
||||
pos_msg[0] = '\0';
|
||||
pos = pos_msg - 1;
|
||||
pos_msg += 2;
|
||||
while ((pos >= text) && (pos[0] == ' '))
|
||||
{
|
||||
pos[0] = '\0';
|
||||
pos--;
|
||||
}
|
||||
|
||||
if (text[0])
|
||||
{
|
||||
pos = strchr (text, ',');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
ptr_server = server_search (text);
|
||||
if (!ptr_server || !ptr_server->buffer)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL, _("%s server \"%s\" not found (FIFO pipe data)\n"),
|
||||
WEECHAT_WARNING, text);
|
||||
return;
|
||||
}
|
||||
if (ptr_server)
|
||||
{
|
||||
if (pos)
|
||||
{
|
||||
ptr_channel = channel_search (ptr_server, pos + 1);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL, _("%s channel \"%s\" not found (FIFO pipe data)\n"),
|
||||
WEECHAT_WARNING, pos + 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ptr_server)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL, _("%s invalid text received on FIFO pipe\n"),
|
||||
WEECHAT_WARNING);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ptr_buffer)
|
||||
{
|
||||
if (ptr_channel)
|
||||
ptr_buffer = ptr_channel->buffer;
|
||||
else
|
||||
ptr_buffer = ptr_server->buffer;
|
||||
}
|
||||
|
||||
user_command (ptr_server, ptr_buffer, pos_msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* fifo_read: read data in FIFO pipe
|
||||
*/
|
||||
|
||||
void
|
||||
fifo_read ()
|
||||
{
|
||||
static char buffer[4096 + 2];
|
||||
char *buf2, *pos, *ptr_buf, *next_ptr_buf;
|
||||
int num_read;
|
||||
|
||||
num_read = read (weechat_fifo, buffer, sizeof (buffer) - 2);
|
||||
if (num_read > 0)
|
||||
{
|
||||
buffer[num_read] = '\0';
|
||||
|
||||
buf2 = NULL;
|
||||
ptr_buf = buffer;
|
||||
if (weechat_fifo_unterminated)
|
||||
{
|
||||
buf2 = (char *) malloc (strlen (weechat_fifo_unterminated) +
|
||||
strlen (buffer) + 1);
|
||||
if (buf2)
|
||||
{
|
||||
strcpy (buf2, weechat_fifo_unterminated);
|
||||
strcat (buf2, buffer);
|
||||
}
|
||||
ptr_buf = buf2;
|
||||
free (weechat_fifo_unterminated);
|
||||
weechat_fifo_unterminated = NULL;
|
||||
}
|
||||
|
||||
while (ptr_buf && ptr_buf[0])
|
||||
{
|
||||
next_ptr_buf = NULL;
|
||||
pos = strstr (ptr_buf, "\r\n");
|
||||
if (pos)
|
||||
{
|
||||
pos[0] = '\0';
|
||||
next_ptr_buf = pos + 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = strstr (ptr_buf, "\n");
|
||||
if (pos)
|
||||
{
|
||||
pos[0] = '\0';
|
||||
next_ptr_buf = pos + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_fifo_unterminated = strdup (ptr_buf);
|
||||
ptr_buf = NULL;
|
||||
next_ptr_buf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr_buf)
|
||||
fifo_exec (ptr_buf);
|
||||
|
||||
ptr_buf = next_ptr_buf;
|
||||
}
|
||||
|
||||
if (buf2)
|
||||
free (buf2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num_read < 0)
|
||||
{
|
||||
gui_printf (NULL,
|
||||
_("%s error reading FIFO pipe, closing it\n"),
|
||||
WEECHAT_ERROR);
|
||||
wee_log_printf (_("%s error reading FIFO pipe, closing it\n"),
|
||||
WEECHAT_ERROR);
|
||||
fifo_remove ();
|
||||
}
|
||||
else
|
||||
{
|
||||
close (weechat_fifo);
|
||||
weechat_fifo = open (weechat_fifo_filename, O_RDONLY | O_NONBLOCK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* fifo_remove: remove FIFO pipe
|
||||
*/
|
||||
|
||||
void
|
||||
fifo_remove ()
|
||||
{
|
||||
if (weechat_fifo != -1)
|
||||
{
|
||||
/* close FIFO pipe */
|
||||
close (weechat_fifo);
|
||||
weechat_fifo = -1;
|
||||
}
|
||||
|
||||
/* remove FIFO from disk */
|
||||
if (weechat_fifo_filename)
|
||||
unlink (weechat_fifo_filename);
|
||||
|
||||
if (weechat_fifo_unterminated)
|
||||
{
|
||||
free (weechat_fifo_unterminated);
|
||||
weechat_fifo_unterminated = NULL;
|
||||
}
|
||||
|
||||
if (weechat_fifo_filename)
|
||||
{
|
||||
free (weechat_fifo_filename);
|
||||
weechat_fifo_filename = NULL;
|
||||
}
|
||||
|
||||
wee_log_printf (_("FIFO pipe is closed\n"));
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __WEECHAT_FIFO_H
|
||||
#define __WEECHAT_FIFO_H 1
|
||||
|
||||
extern int weechat_fifo;
|
||||
|
||||
extern void fifo_create ();
|
||||
extern void fifo_read ();
|
||||
extern void fifo_remove ();
|
||||
|
||||
#endif /* fifo.h */
|
||||
@@ -136,3 +136,50 @@ history_add (void *buffer, char *string)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* history_general_free: free general history
|
||||
*/
|
||||
|
||||
void
|
||||
history_general_free ()
|
||||
{
|
||||
t_history *ptr_history;
|
||||
|
||||
while (history_general)
|
||||
{
|
||||
ptr_history = history_general->next_history;
|
||||
if (history_general->text)
|
||||
free (history_general->text);
|
||||
free (history_general);
|
||||
history_general = ptr_history;
|
||||
}
|
||||
history_general = NULL;
|
||||
history_general_last = NULL;
|
||||
history_general_ptr = NULL;
|
||||
num_history_general = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* history_buffer_free: free history for a buffer
|
||||
*/
|
||||
|
||||
void
|
||||
history_buffer_free (void *buffer)
|
||||
{
|
||||
t_history *ptr_history;
|
||||
|
||||
while (((t_gui_buffer *)(buffer))->history)
|
||||
{
|
||||
ptr_history = ((t_gui_buffer *)(buffer))->history->next_history;
|
||||
if (((t_gui_buffer *)(buffer))->history->text)
|
||||
free (((t_gui_buffer *)(buffer))->history->text);
|
||||
free (((t_gui_buffer *)(buffer))->history);
|
||||
((t_gui_buffer *)(buffer))->history = ptr_history;
|
||||
}
|
||||
((t_gui_buffer *)(buffer))->history = NULL;
|
||||
((t_gui_buffer *)(buffer))->last_history = NULL;
|
||||
((t_gui_buffer *)(buffer))->ptr_history = NULL;
|
||||
((t_gui_buffer *)(buffer))->num_history = 0;
|
||||
}
|
||||
|
||||
@@ -31,5 +31,7 @@ struct t_history
|
||||
};
|
||||
|
||||
extern void history_add (void *, char *);
|
||||
extern void history_general_free ();
|
||||
extern void history_buffer_free (void *);
|
||||
|
||||
#endif /* history.h */
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "weechat.h"
|
||||
#include "log.h"
|
||||
#include "weeconfig.h"
|
||||
#include "../gui/gui.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -71,6 +72,28 @@ log_write (t_gui_buffer *buffer, char *message)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* log_write_line: writes a WeeChat line to log file
|
||||
*/
|
||||
|
||||
void
|
||||
log_write_line (t_gui_buffer *buffer, t_gui_line *line)
|
||||
{
|
||||
t_gui_message *ptr_msg;
|
||||
|
||||
if (buffer->log_file)
|
||||
{
|
||||
log_write_date (buffer);
|
||||
for (ptr_msg = line->messages; ptr_msg; ptr_msg = ptr_msg->next_message)
|
||||
{
|
||||
if (ptr_msg->type != MSG_TYPE_TIME)
|
||||
fprintf (buffer->log_file, "%s", ptr_msg->message);
|
||||
}
|
||||
fprintf (buffer->log_file, "\n");
|
||||
fflush (buffer->log_file);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* log_start: starts a log
|
||||
*/
|
||||
|
||||
@@ -22,9 +22,11 @@
|
||||
#define __WEECHAT_LOG_H 1
|
||||
|
||||
#include "../irc/irc.h"
|
||||
#include "../gui/gui.h"
|
||||
|
||||
extern void log_write_date (t_gui_buffer *);
|
||||
extern void log_write (t_gui_buffer *, char *);
|
||||
extern void log_write_line (t_gui_buffer *, t_gui_line *);
|
||||
extern void log_start (t_gui_buffer *);
|
||||
extern void log_end (t_gui_buffer *);
|
||||
|
||||
|
||||
+337
-35
@@ -8,11 +8,9 @@
|
||||
* ### WeeChat - Wee Enhanced Environment for Chat ###
|
||||
* ### Fast & light environment for Chat ###
|
||||
* ### ###
|
||||
* ### By: FlashCode <flashcode@flashtux.org> ###
|
||||
* ### Bounga <bounga@altern.org> ###
|
||||
* ### Xahlexx <xahlexx@weeland.org> ###
|
||||
* ### ###
|
||||
* ### http://weechat.flashtux.org ###
|
||||
* ### By FlashCode <flashcode@flashtux.org> ###
|
||||
### ###
|
||||
* ### http://weechat.flashtux.org ###
|
||||
* ### ###
|
||||
* ############################################################################
|
||||
*
|
||||
@@ -50,31 +48,40 @@
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_GNUTLS
|
||||
#include <gnutls/gnutls.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ICONV
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LANGINFO_CODESET
|
||||
#include <langinfo.h>
|
||||
#endif
|
||||
|
||||
#include "weechat.h"
|
||||
#include "weeconfig.h"
|
||||
#include "command.h"
|
||||
#include "fifo.h"
|
||||
#include "../irc/irc.h"
|
||||
#include "../gui/gui.h"
|
||||
#include "../plugins/plugins.h"
|
||||
|
||||
|
||||
int quit_weechat; /* = 1 if quit request from user... why ? :'( */
|
||||
char *weechat_home; /* WeeChat home dir. (example: /home/toto/.weechat) */
|
||||
FILE *weechat_log_file; /* WeeChat log file (~/.weechat/weechat.log) */
|
||||
int quit_weechat; /* = 1 if quit request from user... why ? :'( */
|
||||
int sigsegv = 0; /* SIGSEGV received? */
|
||||
char *weechat_home = NULL; /* WeeChat home dir. (example: /home/toto/.weechat) */
|
||||
FILE *weechat_log_file = NULL; /* WeeChat log file (~/.weechat/weechat.log) */
|
||||
|
||||
int server_cmd_line; /* at least one server on WeeChat command line */
|
||||
char *local_charset = NULL; /* local charset, for example: ISO-8859-1 */
|
||||
|
||||
int server_cmd_line; /* at least one server on WeeChat command line */
|
||||
|
||||
/*
|
||||
* my_sigint: SIGINT handler, do nothing (just ignore this signal)
|
||||
* Prevents user for exiting with Ctrl-C
|
||||
*/
|
||||
#ifdef HAVE_GNUTLS
|
||||
gnutls_certificate_credentials gnutls_xcred; /* gnutls client credentials */
|
||||
#endif
|
||||
|
||||
void
|
||||
my_sigint ()
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_log_printf: displays a message in WeeChat log (~/.weechat/weechat.log)
|
||||
@@ -107,6 +114,79 @@ wee_log_printf (char *message, ...)
|
||||
fflush (weechat_log_file);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat_convert_encoding: convert string to another encoding
|
||||
*/
|
||||
|
||||
char *
|
||||
weechat_convert_encoding (char *from_code, char *to_code, char *string)
|
||||
{
|
||||
char *outbuf;
|
||||
|
||||
#ifdef HAVE_ICONV
|
||||
iconv_t cd;
|
||||
char *inbuf;
|
||||
ICONV_CONST char *ptr_inbuf;
|
||||
char *ptr_outbuf;
|
||||
size_t inbytesleft, outbytesleft;
|
||||
|
||||
if (from_code && from_code[0] && to_code && to_code[0]
|
||||
&& (strcasecmp(from_code, to_code) != 0))
|
||||
{
|
||||
cd = iconv_open (to_code, from_code);
|
||||
if (cd == (iconv_t)(-1))
|
||||
outbuf = strdup (string);
|
||||
else
|
||||
{
|
||||
inbuf = strdup (string);
|
||||
ptr_inbuf = inbuf;
|
||||
inbytesleft = strlen (inbuf);
|
||||
outbytesleft = inbytesleft * 4;
|
||||
outbuf = (char *) malloc (outbytesleft + 2);
|
||||
ptr_outbuf = outbuf;
|
||||
iconv (cd, &ptr_inbuf, &inbytesleft, &ptr_outbuf, &outbytesleft);
|
||||
if (inbytesleft != 0)
|
||||
{
|
||||
free (outbuf);
|
||||
outbuf = strdup (string);
|
||||
}
|
||||
else
|
||||
ptr_outbuf[0] = '\0';
|
||||
free (inbuf);
|
||||
iconv_close (cd);
|
||||
}
|
||||
}
|
||||
else
|
||||
outbuf = strdup (string);
|
||||
#else
|
||||
/* make gcc happy */
|
||||
(void) from_code;
|
||||
(void) to_code;
|
||||
outbuf = strdup (string);
|
||||
#endif /* HAVE_ICONV */
|
||||
|
||||
return outbuf;
|
||||
}
|
||||
|
||||
/*
|
||||
* get_timeval_diff: calculates difference between two times (return in milliseconds)
|
||||
*/
|
||||
|
||||
long get_timeval_diff(struct timeval *tv1, struct timeval *tv2)
|
||||
{
|
||||
long diff_sec, diff_usec;
|
||||
|
||||
diff_sec = tv2->tv_sec - tv1->tv_sec;
|
||||
diff_usec = tv2->tv_usec - tv1->tv_usec;
|
||||
|
||||
if (diff_usec < 0)
|
||||
{
|
||||
diff_usec += 1000000;
|
||||
diff_sec--;
|
||||
}
|
||||
return ((diff_usec / 1000) + (diff_sec * 1000));
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_display_config_options: display config options
|
||||
*/
|
||||
@@ -180,6 +260,59 @@ void wee_display_config_options ()
|
||||
printf (_("where 'j' is alias name, and 'join' associated command.\n\n"));
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_display_commands: display WeeChat and/or IRC commands
|
||||
*/
|
||||
|
||||
void wee_display_commands (int weechat_cmd, int irc_cmd)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (weechat_cmd)
|
||||
{
|
||||
printf (_("%s internal commands:\n"), PACKAGE_NAME);
|
||||
printf ("\n");
|
||||
for (i = 0; weechat_commands[i].command_name; i++)
|
||||
{
|
||||
printf ("* %s", weechat_commands[i].command_name);
|
||||
if (weechat_commands[i].arguments &&
|
||||
weechat_commands[i].arguments[0])
|
||||
printf (" %s\n\n", _(weechat_commands[i].arguments));
|
||||
else
|
||||
printf ("\n\n");
|
||||
printf ("%s\n\n", _(weechat_commands[i].command_description));
|
||||
if (weechat_commands[i].arguments_description &&
|
||||
weechat_commands[i].arguments_description[0])
|
||||
printf ("%s\n\n",
|
||||
_(weechat_commands[i].arguments_description));
|
||||
}
|
||||
}
|
||||
|
||||
if (irc_cmd)
|
||||
{
|
||||
printf (_("IRC commands:\n"));
|
||||
printf ("\n");
|
||||
for (i = 0; irc_commands[i].command_name; i++)
|
||||
{
|
||||
if (irc_commands[i].cmd_function_args ||
|
||||
irc_commands[i].cmd_function_1arg)
|
||||
{
|
||||
printf ("* %s", irc_commands[i].command_name);
|
||||
if (irc_commands[i].arguments &&
|
||||
irc_commands[i].arguments[0])
|
||||
printf (" %s\n\n", _(irc_commands[i].arguments));
|
||||
else
|
||||
printf ("\n\n");
|
||||
printf ("%s\n\n", _(irc_commands[i].command_description));
|
||||
if (irc_commands[i].arguments_description &&
|
||||
irc_commands[i].arguments_description[0])
|
||||
printf ("%s\n\n",
|
||||
_(irc_commands[i].arguments_description));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_parse_args: parse command line args
|
||||
*/
|
||||
@@ -198,28 +331,40 @@ wee_parse_args (int argc, char *argv[])
|
||||
|| (strcmp (argv[i], "--config") == 0))
|
||||
{
|
||||
wee_display_config_options ();
|
||||
exit (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
}
|
||||
else if ((strcmp (argv[i], "-h") == 0)
|
||||
|| (strcmp (argv[i], "--help") == 0))
|
||||
{
|
||||
printf ("\n" WEE_USAGE1, argv[0], argv[0]);
|
||||
printf ("%s", WEE_USAGE2);
|
||||
exit (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
}
|
||||
if ((strcmp (argv[i], "-i") == 0)
|
||||
|| (strcmp (argv[i], "--irc-commands") == 0))
|
||||
{
|
||||
wee_display_commands (0, 1);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
}
|
||||
else if ((strcmp (argv[i], "-l") == 0)
|
||||
|| (strcmp (argv[i], "--license") == 0))
|
||||
{
|
||||
printf ("\n%s%s", WEE_LICENSE);
|
||||
exit (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
}
|
||||
else if ((strcmp (argv[i], "-v") == 0)
|
||||
|| (strcmp (argv[i], "--version") == 0))
|
||||
{
|
||||
printf (PACKAGE_VERSION "\n");
|
||||
exit (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
}
|
||||
else if ((strncasecmp (argv[i], "irc://", 6) == 0))
|
||||
if ((strcmp (argv[i], "-w") == 0)
|
||||
|| (strcmp (argv[i], "--weechat-commands") == 0))
|
||||
{
|
||||
wee_display_commands (1, 0);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
}
|
||||
else if ((strncasecmp (argv[i], "irc", 3) == 0))
|
||||
{
|
||||
if (server_init_with_url (argv[i], &server_tmp) < 0)
|
||||
{
|
||||
@@ -232,9 +377,10 @@ wee_parse_args (int argc, char *argv[])
|
||||
server_tmp.autoreconnect,
|
||||
server_tmp.autoreconnect_delay,
|
||||
1, server_tmp.address, server_tmp.port,
|
||||
server_tmp.ipv6, server_tmp.ssl,
|
||||
server_tmp.password, server_tmp.nick1,
|
||||
server_tmp.nick2, server_tmp.nick3,
|
||||
NULL, NULL, NULL, 0, server_tmp.autojoin, 1))
|
||||
NULL, NULL, NULL, 0, server_tmp.autojoin, 1, NULL))
|
||||
fprintf (stderr, _("%s unable to create server ('%s'), ignored\n"),
|
||||
WEECHAT_WARNING, argv[i]);
|
||||
server_destroy (&server_tmp);
|
||||
@@ -292,7 +438,7 @@ wee_create_home_dirs ()
|
||||
{
|
||||
fprintf (stderr, _("%s unable to get HOME directory\n"),
|
||||
WEECHAT_ERROR);
|
||||
exit (EXIT_FAILURE);
|
||||
wee_shutdown (EXIT_FAILURE);
|
||||
}
|
||||
dir_length = strlen (ptr_home) + 10;
|
||||
weechat_home =
|
||||
@@ -301,7 +447,7 @@ wee_create_home_dirs ()
|
||||
{
|
||||
fprintf (stderr, _("%s not enough memory for home directory\n"),
|
||||
WEECHAT_ERROR);
|
||||
exit (EXIT_FAILURE);
|
||||
wee_shutdown (EXIT_FAILURE);
|
||||
}
|
||||
snprintf (weechat_home, dir_length, "%s%s.weechat", ptr_home,
|
||||
DIR_SEPARATOR);
|
||||
@@ -311,7 +457,7 @@ wee_create_home_dirs ()
|
||||
{
|
||||
fprintf (stderr, _("%s unable to create ~/.weechat directory\n"),
|
||||
WEECHAT_ERROR);
|
||||
exit (EXIT_FAILURE);
|
||||
wee_shutdown (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
dir_length = strlen (weechat_home) + 64;
|
||||
@@ -364,6 +510,7 @@ wee_create_home_dirs ()
|
||||
fprintf (stderr, _("%s unable to create ~/.weechat/logs directory\n"),
|
||||
WEECHAT_WARNING);
|
||||
}
|
||||
chmod (dir_name, 0700);
|
||||
|
||||
free (dir_name);
|
||||
}
|
||||
@@ -378,6 +525,13 @@ wee_init_vars ()
|
||||
/* init received messages queue */
|
||||
recv_msgq = NULL;
|
||||
msgq_last_msg = NULL;
|
||||
|
||||
/* init gnutls */
|
||||
#ifdef HAVE_GNUTLS
|
||||
gnutls_global_init ();
|
||||
gnutls_certificate_allocate_credentials (&gnutls_xcred);
|
||||
gnutls_certificate_set_x509_trust_file (gnutls_xcred, "ca.pem", GNUTLS_X509_FMT_PEM);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -439,6 +593,21 @@ weechat_welcome_message ()
|
||||
cfg_look_startup_version)
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_PREFIX1,
|
||||
"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
|
||||
|
||||
wee_log_printf ("%s (%s %s %s)\n",
|
||||
PACKAGE_STRING, _("compiled on"), __DATE__, __TIME__);
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_gui_shutdown: shutdown WeeChat GUI
|
||||
*/
|
||||
|
||||
void
|
||||
wee_gui_shutdown ()
|
||||
{
|
||||
dcc_end ();
|
||||
server_free_all ();
|
||||
gui_end ();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -446,14 +615,139 @@ weechat_welcome_message ()
|
||||
*/
|
||||
|
||||
void
|
||||
wee_shutdown ()
|
||||
wee_shutdown (int return_code)
|
||||
{
|
||||
dcc_end ();
|
||||
server_free_all ();
|
||||
gui_end ();
|
||||
fifo_remove ();
|
||||
if (weechat_home)
|
||||
free (weechat_home);
|
||||
if (weechat_log_file)
|
||||
fclose (weechat_log_file);
|
||||
exit (EXIT_SUCCESS);
|
||||
if (local_charset)
|
||||
free (local_charset);
|
||||
alias_free_all ();
|
||||
|
||||
#ifdef HAVE_GNUTLS
|
||||
gnutls_certificate_free_credentials (gnutls_xcred);
|
||||
gnutls_global_deinit();
|
||||
#endif
|
||||
|
||||
exit (return_code);
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_dump writes dump to WeeChat log file
|
||||
*/
|
||||
|
||||
void
|
||||
wee_dump (int crash)
|
||||
{
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
t_gui_window *ptr_window;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
|
||||
/* prevent reentrance */
|
||||
if (sigsegv)
|
||||
exit (EXIT_FAILURE);
|
||||
|
||||
if (crash)
|
||||
{
|
||||
sigsegv = 1;
|
||||
wee_log_printf ("Very bad, WeeChat is crashing (SIGSEGV received)...\n");
|
||||
}
|
||||
|
||||
wee_log_printf ("\n");
|
||||
if (crash)
|
||||
{
|
||||
wee_log_printf ("****** WeeChat CRASH DUMP ******\n");
|
||||
wee_log_printf ("****** Please send this file to WeeChat developers ******\n");
|
||||
wee_log_printf ("****** and explain when this crash happened ******\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
wee_log_printf ("****** WeeChat dump request ******\n");
|
||||
}
|
||||
|
||||
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
|
||||
{
|
||||
wee_log_printf ("\n");
|
||||
server_print_log (ptr_server);
|
||||
|
||||
for (ptr_channel = ptr_server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
wee_log_printf ("\n");
|
||||
channel_print_log (ptr_channel);
|
||||
|
||||
for (ptr_nick = ptr_channel->nicks; ptr_nick;
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
wee_log_printf ("\n");
|
||||
nick_print_log (ptr_nick);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
wee_log_printf ("\n");
|
||||
wee_log_printf ("[windows/buffers]\n");
|
||||
wee_log_printf (" => windows:\n");
|
||||
for (ptr_window = gui_windows; ptr_window; ptr_window = ptr_window->next_window)
|
||||
{
|
||||
wee_log_printf (" 0x%X\n", ptr_window);
|
||||
}
|
||||
wee_log_printf (" => buffers:\n");
|
||||
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
|
||||
{
|
||||
wee_log_printf (" 0x%X\n", ptr_buffer);
|
||||
}
|
||||
wee_log_printf (" => current window = 0x%X\n", gui_current_window);
|
||||
|
||||
for (ptr_window = gui_windows; ptr_window; ptr_window = ptr_window->next_window)
|
||||
{
|
||||
wee_log_printf ("\n");
|
||||
gui_window_print_log (ptr_window);
|
||||
}
|
||||
|
||||
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
|
||||
{
|
||||
wee_log_printf ("\n");
|
||||
gui_buffer_print_log (ptr_buffer);
|
||||
}
|
||||
|
||||
wee_log_printf ("\n");
|
||||
wee_log_printf ("****** End of dump ******\n");
|
||||
wee_log_printf ("\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* my_sigint: SIGINT handler, do nothing (just ignore this signal)
|
||||
* Prevents user for exiting with Ctrl-C
|
||||
*/
|
||||
|
||||
void
|
||||
my_sigint ()
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
/*
|
||||
* my_sigsegv: SIGSEGV handler: save crash log to ~/.weechat/weechat.log and exit
|
||||
*/
|
||||
|
||||
void
|
||||
my_sigsegv ()
|
||||
{
|
||||
wee_dump (1);
|
||||
wee_gui_shutdown ();
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, "*** Very bad! WeeChat has crashed (SIGSEGV received)\n");
|
||||
fprintf (stderr, "*** Full crash dump was saved to ~/.weechat/weechat.log file\n");
|
||||
fprintf (stderr, "*** Please send this file to WeeChat developers.\n");
|
||||
fprintf (stderr, "*** (be careful, private info may be in this file since\n");
|
||||
fprintf (stderr, "*** part of chats are displayed, so remove lines if needed)\n\n");
|
||||
wee_shutdown (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -469,13 +763,18 @@ main (int argc, char *argv[])
|
||||
textdomain (PACKAGE);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LANGINFO_CODESET
|
||||
local_charset = strdup (nl_langinfo (CODESET));
|
||||
#endif
|
||||
|
||||
signal (SIGINT, my_sigint); /* ignore SIGINT signal */
|
||||
signal (SIGSEGV, my_sigsegv); /* crash dump when SIGSEGV is received */
|
||||
gui_pre_init (&argc, &argv); /* pre-initiliaze interface */
|
||||
wee_init_vars (); /* initialize some variables */
|
||||
wee_parse_args (argc, argv); /* parse command line args */
|
||||
wee_create_home_dirs (); /* create WeeChat directories */
|
||||
wee_init_log (); /* init log file */
|
||||
index_command_build (); /* build commands index for completion */
|
||||
command_index_build (); /* build commands index for completion */
|
||||
|
||||
switch (config_read ()) /* read configuration */
|
||||
{
|
||||
@@ -493,17 +792,20 @@ main (int argc, char *argv[])
|
||||
}
|
||||
|
||||
gui_init (); /* init WeeChat interface */
|
||||
plugin_init (); /* init plugin interface(s) */
|
||||
weechat_welcome_message (); /* display WeeChat welcome message */
|
||||
plugin_init (); /* init plugin interface(s) */
|
||||
/* auto-connect to servers */
|
||||
server_auto_connect (server_cmd_line);
|
||||
fifo_create (); /* create FIFO pipe for remote control */
|
||||
|
||||
gui_main_loop (); /* WeeChat main loop */
|
||||
|
||||
plugin_end (); /* end plugin interface(s) */
|
||||
server_disconnect_all (); /* disconnect from all servers */
|
||||
(void) config_write (NULL); /* save config file */
|
||||
wee_shutdown (); /* quit WeeChat (oh no, why?) */
|
||||
command_index_free (); /* free commands index */
|
||||
wee_gui_shutdown (); /* shut down WeeChat GUI */
|
||||
wee_shutdown (EXIT_SUCCESS); /* quit WeeChat (oh no, why?) */
|
||||
|
||||
return EXIT_SUCCESS; /* make gcc happy (never executed) */
|
||||
}
|
||||
|
||||
+31
-15
@@ -26,10 +26,19 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef HAVE_GNUTLS
|
||||
#include <gnutls/gnutls.h>
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_NLS) && !defined(_)
|
||||
#include <locale.h>
|
||||
#include <libintl.h>
|
||||
#ifdef HAVE_LIBINTL_H
|
||||
#include <libintl.h>
|
||||
#else
|
||||
#include "../../intl/libintl.h"
|
||||
#endif
|
||||
#define _(x) gettext(x)
|
||||
#ifdef gettext_noop
|
||||
#define N_(string) gettext_noop (string)
|
||||
@@ -43,11 +52,11 @@
|
||||
#endif
|
||||
|
||||
|
||||
#define WEECHAT_COPYRIGHT PACKAGE_NAME " (c) 2003-2005 by Wee Team"
|
||||
#define WEECHAT_COPYRIGHT_DATE "(c) 2003-2005"
|
||||
#define WEECHAT_WEBSITE "http://weechat.flashtux.org"
|
||||
|
||||
#define WEECHAT_ERROR _(PACKAGE_NAME " Error:")
|
||||
#define WEECHAT_WARNING _(PACKAGE_NAME " Warning:")
|
||||
#define WEECHAT_ERROR _("WeeChat Error:")
|
||||
#define WEECHAT_WARNING _("WeeChat Warning:")
|
||||
|
||||
/* log file */
|
||||
|
||||
@@ -57,10 +66,7 @@
|
||||
|
||||
#define WEE_LICENSE \
|
||||
PACKAGE_STRING " (c) Copyright 2003-2005, compiled on " __DATE__ " " __TIME__ \
|
||||
"\nDeveloped by FlashCode <flashcode@flashtux.org>\n" \
|
||||
" Bounga <bounga@altern.org>\n" \
|
||||
" Xahlexx <xahlexx@weeland.org>\n" \
|
||||
"Website: " WEECHAT_WEBSITE "\n\n" \
|
||||
"\nDeveloped by FlashCode <flashcode@flashtux.org> - " WEECHAT_WEBSITE "\n\n" \
|
||||
"This program is free software; you can redistribute it and/or modify\n" \
|
||||
"it under the terms of the GNU General Public License as published by\n" \
|
||||
"the Free Software Foundation; either version 2 of the License, or\n" \
|
||||
@@ -78,15 +84,17 @@
|
||||
|
||||
#define WEE_USAGE1 \
|
||||
PACKAGE_STRING " (c) Copyright 2003-2005, compiled on " __DATE__ " " __TIME__ \
|
||||
"\nDeveloped by FlashCode, Bounga and Xahlexx - " WEECHAT_WEBSITE "\n\n" \
|
||||
"\nDeveloped by FlashCode <flashcode@flashtux.org> - " WEECHAT_WEBSITE "\n\n" \
|
||||
"Usage: %s [options ...]\n" \
|
||||
" or: %s [irc://[nickname[:password]@]irc.example.org[:port][/channel] ...]\n\n"
|
||||
" or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/channel][,channel[...]]\n\n"
|
||||
|
||||
#define WEE_USAGE2 \
|
||||
" -c, --config config file help (list of options)\n" \
|
||||
" -h, --help this help screen\n" \
|
||||
" -l, --license display WeeChat license\n" \
|
||||
" -v, --version display WeeChat version\n\n"
|
||||
" -c, --config display config file options\n" \
|
||||
" -h, --help this help screen\n" \
|
||||
" -i, --irc-commands display IRC commands\n" \
|
||||
" -l, --license display WeeChat license\n" \
|
||||
" -v, --version display WeeChat version\n" \
|
||||
" -w, --weechat-commands display WeeChat commands\n\n"
|
||||
|
||||
/* directory separator, depending on OS */
|
||||
|
||||
@@ -102,8 +110,16 @@
|
||||
|
||||
extern int quit_weechat;
|
||||
extern char *weechat_home;
|
||||
extern char *local_charset;
|
||||
|
||||
#ifdef HAVE_GNUTLS
|
||||
extern gnutls_certificate_credentials gnutls_xcred;
|
||||
#endif
|
||||
|
||||
extern void wee_log_printf (char *, ...);
|
||||
extern void wee_shutdown ();
|
||||
extern void wee_dump (int);
|
||||
extern char *weechat_convert_encoding (char *, char *, char *);
|
||||
extern long get_timeval_diff (struct timeval *, struct timeval *);
|
||||
extern void wee_shutdown (int);
|
||||
|
||||
#endif /* weechat.h */
|
||||
|
||||
+512
-133
@@ -33,10 +33,12 @@
|
||||
#include <time.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "weeconfig.h"
|
||||
#include "command.h"
|
||||
#include "fifo.h"
|
||||
#include "../irc/irc.h"
|
||||
#include "../gui/gui.h"
|
||||
|
||||
@@ -48,6 +50,7 @@ t_config_section config_sections[CONFIG_NUMBER_SECTIONS] =
|
||||
{ CONFIG_SECTION_COLORS, "colors" },
|
||||
{ CONFIG_SECTION_HISTORY, "history" },
|
||||
{ CONFIG_SECTION_LOG, "log" },
|
||||
{ CONFIG_SECTION_IRC, "irc" },
|
||||
{ CONFIG_SECTION_DCC, "dcc" },
|
||||
{ CONFIG_SECTION_PROXY, "proxy" },
|
||||
{ CONFIG_SECTION_ALIAS, "alias" },
|
||||
@@ -60,6 +63,10 @@ int cfg_look_set_title;
|
||||
int cfg_look_startup_logo;
|
||||
int cfg_look_startup_version;
|
||||
char *cfg_look_weechat_slogan;
|
||||
char *cfg_look_charset_decode;
|
||||
char *cfg_look_charset_encode;
|
||||
char *cfg_look_charset_internal;
|
||||
char *cfg_look_buffer_timestamp;
|
||||
int cfg_look_color_nicks;
|
||||
int cfg_look_color_actions;
|
||||
int cfg_look_remove_colors_from_msgs;
|
||||
@@ -73,7 +80,6 @@ int cfg_look_nickmode;
|
||||
int cfg_look_nickmode_empty;
|
||||
char *cfg_look_no_nickname;
|
||||
char *cfg_look_completor;
|
||||
int cfg_look_display_away;
|
||||
int cfg_look_infobar;
|
||||
char *cfg_look_infobar_timestamp;
|
||||
int cfg_look_infobar_delay_highlight;
|
||||
@@ -95,6 +101,22 @@ t_config_option weechat_options_look[] =
|
||||
N_("WeeChat slogan (if empty, slogan is not used)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"the geekest IRC client!", NULL, NULL, &cfg_look_weechat_slogan, config_change_noop },
|
||||
{ "look_charset_decode", N_("charset for decoding messages from server"),
|
||||
N_("charset for decoding messages from server, examples: UTF-8, ISO-8859-1 (if empty, messages are not converted)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"UTF-8", NULL, NULL, &cfg_look_charset_decode, config_change_buffer_content },
|
||||
{ "look_charset_encode", N_("charset for encoding messages sent to server"),
|
||||
N_("charset for encoding messages sent to server, examples: UFT-8, ISO-8859-1 (if empty, local charset is used)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &cfg_look_charset_encode, config_change_buffer_content },
|
||||
{ "look_charset_internal", N_("internal WeeChat charset (should be ISO)"),
|
||||
N_("internal WeeChat charset, should be ISO-xxxx even if locale is UTF-8 (if empty, local charset is used)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"ISO-8859-1", NULL, NULL, &cfg_look_charset_internal, config_change_buffer_content },
|
||||
{ "look_buffer_timestamp", N_("timestamp for buffers"),
|
||||
N_("timestamp for buffers"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"[%H:%M:%S]", NULL, NULL, &cfg_look_buffer_timestamp, config_change_buffer_content },
|
||||
{ "look_color_nicks", N_("display nick names with different colors"),
|
||||
N_("display nick names with different colors"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
@@ -141,10 +163,6 @@ t_config_option weechat_options_look[] =
|
||||
N_("the string inserted after nick completion"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
":", NULL, NULL, &cfg_look_completor, config_change_noop },
|
||||
{ "look_display_away", N_("display message to all channels when away"),
|
||||
N_("display message to all channels when (un)marking as away"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_display_away, NULL, config_change_noop },
|
||||
{ "look_infobar", N_("enable info bar"),
|
||||
N_("enable info bar"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
@@ -191,9 +209,13 @@ int cfg_col_input_channel;
|
||||
int cfg_col_input_nick;
|
||||
int cfg_col_input_bg;
|
||||
int cfg_col_nick;
|
||||
int cfg_col_nick_away;
|
||||
int cfg_col_nick_chanowner;
|
||||
int cfg_col_nick_chanadmin;
|
||||
int cfg_col_nick_op;
|
||||
int cfg_col_nick_halfop;
|
||||
int cfg_col_nick_voice;
|
||||
int cfg_col_nick_more;
|
||||
int cfg_col_nick_sep;
|
||||
int cfg_col_nick_self;
|
||||
int cfg_col_nick_private;
|
||||
@@ -211,7 +233,7 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_title", N_("color for title bar"),
|
||||
N_("color for title bar"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"gray", NULL, &cfg_col_title, NULL, &config_change_color },
|
||||
"default", NULL, &cfg_col_title, NULL, &config_change_color },
|
||||
{ "col_title_bg", N_("background for title bar"),
|
||||
N_("background for title bar"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -221,11 +243,11 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_chat", N_("color for chat text"),
|
||||
N_("color for chat text"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"gray", NULL, &cfg_col_chat, NULL, &config_change_color },
|
||||
"default", NULL, &cfg_col_chat, NULL, &config_change_color },
|
||||
{ "col_chat_time", N_("color for time"),
|
||||
N_("color for time in chat window"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"gray", NULL, &cfg_col_chat_time, NULL, &config_change_color },
|
||||
"default", NULL, &cfg_col_chat_time, NULL, &config_change_color },
|
||||
{ "col_chat_time_sep", N_("color for time separator"),
|
||||
N_("color for time separator (chat window)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -267,7 +289,7 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_status", N_("color for status bar"),
|
||||
N_("color for status bar"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"gray", NULL, &cfg_col_status, NULL, &config_change_color },
|
||||
"default", NULL, &cfg_col_status, NULL, &config_change_color },
|
||||
{ "col_status_delimiters", N_("color for status bar delimiters"),
|
||||
N_("color for status bar delimiters"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -283,8 +305,8 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_status_data_other", N_("color for window with new data (not messages)"),
|
||||
N_("color for window with new data (not messages) (status bar)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"gray", NULL, &cfg_col_status_data_other, NULL, &config_change_color },
|
||||
{ "col_status_more", N_("color for \"*MORE*\" text"),
|
||||
"default", NULL, &cfg_col_status_data_other, NULL, &config_change_color },
|
||||
{ "col_status_more", N_("color for \"-MORE-\" text"),
|
||||
N_("color for window with new data (status bar)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"white", NULL, &cfg_col_status_more, NULL, &config_change_color },
|
||||
@@ -311,7 +333,7 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_input", N_("color for input text"),
|
||||
N_("color for input text"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"gray", NULL, &cfg_col_input, NULL, &config_change_color },
|
||||
"default", NULL, &cfg_col_input, NULL, &config_change_color },
|
||||
{ "col_input_channel", N_("color for input text (channel name)"),
|
||||
N_("color for input text (channel name)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -329,7 +351,19 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_nick", N_("color for nicknames"),
|
||||
N_("color for nicknames"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"gray", NULL, &cfg_col_nick, NULL, &config_change_color },
|
||||
"default", NULL, &cfg_col_nick, NULL, &config_change_color },
|
||||
{ "col_nick_away", N_("color for away nicknames"),
|
||||
N_("color for away nicknames"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"cyan", NULL, &cfg_col_nick_away, NULL, &config_change_color },
|
||||
{ "col_nick_chanowner", N_("color for chan owner symbol"),
|
||||
N_("color for chan owner symbol (specific to unrealircd)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightgreen", NULL, &cfg_col_nick_chanowner, NULL, &config_change_color },
|
||||
{ "col_nick_chanadmin", N_("color for chan admin symbol"),
|
||||
N_("color for chan admin symbol (specific to unrealircd)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightgreen", NULL, &cfg_col_nick_chanadmin, NULL, &config_change_color },
|
||||
{ "col_nick_op", N_("color for operator symbol"),
|
||||
N_("color for operator symbol"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -342,6 +376,10 @@ t_config_option weechat_options_colors[] =
|
||||
N_("color for voice symbol"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"yellow", NULL, &cfg_col_nick_voice, NULL, &config_change_color },
|
||||
{ "col_nick_more", N_("color for '+' when scrolling nicks"),
|
||||
N_("color for '+' when scrolling nicks"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightmagenta", NULL, &cfg_col_nick_more, NULL, &config_change_color },
|
||||
{ "col_nick_sep", N_("color for nick separator"),
|
||||
N_("color for nick separator"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -353,7 +391,7 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_nick_private", N_("color for other nick in private window"),
|
||||
N_("color for other nick in private window"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"gray", NULL, &cfg_col_nick_private, NULL, &config_change_color },
|
||||
"default", NULL, &cfg_col_nick_private, NULL, &config_change_color },
|
||||
{ "col_nick_bg", N_("background for nicknames"),
|
||||
N_("background for nicknames"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -367,7 +405,7 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_dcc_waiting", N_("color for \"waiting\" dcc status"),
|
||||
N_("color for \"waiting\" dcc status"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"white", NULL, &cfg_col_dcc_waiting, NULL, &config_change_color },
|
||||
"lightcyan", NULL, &cfg_col_dcc_waiting, NULL, &config_change_color },
|
||||
{ "col_dcc_connecting", N_("color for \"connecting\" dcc status"),
|
||||
N_("color for \"connecting\" dcc status"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -402,11 +440,11 @@ t_config_option weechat_options_history[] =
|
||||
N_("maximum number of lines in history "
|
||||
"for one server/channel/private window (0 = unlimited)"),
|
||||
OPTION_TYPE_INT, 0, INT_MAX, 4096,
|
||||
NULL, NULL, &cfg_history_max_lines, NULL, NULL },
|
||||
NULL, NULL, &cfg_history_max_lines, NULL, config_change_noop },
|
||||
{ "history_max_commands", N_("max user commands in history"),
|
||||
N_("maximum number of user commands in history (0 = unlimited)"),
|
||||
OPTION_TYPE_INT, 0, INT_MAX, 100,
|
||||
NULL, NULL, &cfg_history_max_commands, NULL, NULL },
|
||||
NULL, NULL, &cfg_history_max_commands, NULL, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -415,6 +453,7 @@ t_config_option weechat_options_history[] =
|
||||
int cfg_log_auto_server;
|
||||
int cfg_log_auto_channel;
|
||||
int cfg_log_auto_private;
|
||||
int cfg_log_plugin_msg;
|
||||
char *cfg_log_path;
|
||||
char *cfg_log_timestamp;
|
||||
int cfg_log_hide_nickserv_pwd;
|
||||
@@ -422,28 +461,84 @@ int cfg_log_hide_nickserv_pwd;
|
||||
t_config_option weechat_options_log[] =
|
||||
{ { "log_auto_server", N_("automatically log server messages"),
|
||||
N_("automatically log server messages"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_log_auto_server, NULL, NULL },
|
||||
{ "log_auto_channel", N_("automatically log channel chats"),
|
||||
N_("automatically log channel chats"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_log_auto_channel, NULL, NULL },
|
||||
{ "log_auto_private", N_("automatically log private chats"),
|
||||
N_("automatically log private chats"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_log_auto_private, NULL, NULL },
|
||||
{ "log_plugin_msg", N_("log messages from plugins (scripts)"),
|
||||
N_("log messages from plugins (scripts)"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_log_plugin_msg, NULL, NULL },
|
||||
{ "log_path", N_("path for log files"),
|
||||
N_("path for WeeChat log files"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"~/.weechat/logs/", NULL, NULL, &cfg_log_path, NULL },
|
||||
"~/.weechat/logs/", NULL, NULL, &cfg_log_path, config_change_noop },
|
||||
{ "log_timestamp", N_("timestamp for log"),
|
||||
N_("timestamp for log (see man strftime for date/time specifiers)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"%Y %b %d %H:%M:%S", NULL, NULL, &cfg_log_timestamp, NULL },
|
||||
"%Y %b %d %H:%M:%S", NULL, NULL, &cfg_log_timestamp, config_change_noop },
|
||||
{ "log_hide_nickserv_pwd", N_("hide password displayed by nickserv"),
|
||||
N_("hide password displayed by nickserv"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_log_hide_nickserv_pwd, NULL, NULL },
|
||||
NULL, NULL, &cfg_log_hide_nickserv_pwd, NULL, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
/* config, irc section */
|
||||
|
||||
int cfg_irc_display_away;
|
||||
char *cfg_irc_default_msg_away;
|
||||
char *cfg_irc_default_msg_part;
|
||||
char *cfg_irc_default_msg_quit;
|
||||
int cfg_irc_away_check;
|
||||
int cfg_irc_lag_check;
|
||||
int cfg_irc_lag_min_show;
|
||||
int cfg_irc_lag_disconnect;
|
||||
int cfg_irc_fifo_pipe;
|
||||
|
||||
t_config_option weechat_options_irc[] =
|
||||
{ { "irc_display_away", N_("display message to all channels when away"),
|
||||
N_("display message to all channels when (un)marking as away"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_irc_display_away, NULL, config_change_noop },
|
||||
{ "irc_default_msg_away", N_("default message when away"),
|
||||
N_("default message when away"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"away", NULL, NULL, &cfg_irc_default_msg_away, config_change_noop },
|
||||
{ "irc_default_msg_part", N_("default part message (leaving channel)"),
|
||||
N_("default part message (leaving channel)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"WeeChat %v", NULL, NULL, &cfg_irc_default_msg_part, config_change_noop },
|
||||
{ "irc_default_msg_quit", N_("default quit message"),
|
||||
N_("default quit message ('%v' will be replaced by WeeChat version in string)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"WeeChat %v", NULL, NULL, &cfg_irc_default_msg_quit, config_change_noop },
|
||||
{ "irc_away_check", N_("interval between two checks for away"),
|
||||
N_("interval between two checks for away (in minutes, 0 = never check)"),
|
||||
OPTION_TYPE_INT, 0, INT_MAX, 0,
|
||||
NULL, NULL, &cfg_irc_away_check, NULL, config_change_away_check },
|
||||
{ "irc_lag_check", N_("interval between two checks for lag"),
|
||||
N_("interval between two checks for lag (in seconds)"),
|
||||
OPTION_TYPE_INT, 30, INT_MAX, 60,
|
||||
NULL, NULL, &cfg_irc_lag_check, NULL, config_change_noop },
|
||||
{ "irc_lag_min_show", N_("minimum lag to show"),
|
||||
N_("minimum lag to show (in seconds)"),
|
||||
OPTION_TYPE_INT, 0, INT_MAX, 1,
|
||||
NULL, NULL, &cfg_irc_lag_min_show, NULL, config_change_noop },
|
||||
{ "irc_lag_disconnect", N_("disconnect after important lag"),
|
||||
N_("disconnect after important lag (in minutes, 0 = never disconnect)"),
|
||||
OPTION_TYPE_INT, 0, INT_MAX, 5,
|
||||
NULL, NULL, &cfg_irc_lag_disconnect, NULL, config_change_noop },
|
||||
{ "irc_fifo_pipe", N_("create a FIFO pipe for remote control"),
|
||||
N_("create a FIFO pipe for remote control"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_irc_fifo_pipe, NULL, config_change_fifo_pipe },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -455,6 +550,7 @@ int cfg_dcc_timeout;
|
||||
int cfg_dcc_blocksize;
|
||||
char *cfg_dcc_download_path;
|
||||
char *cfg_dcc_upload_path;
|
||||
int cfg_dcc_convert_spaces;
|
||||
int cfg_dcc_auto_rename;
|
||||
int cfg_dcc_auto_resume;
|
||||
|
||||
@@ -465,15 +561,15 @@ t_config_option weechat_options_dcc[] =
|
||||
NULL, NULL, &cfg_dcc_auto_accept_files, NULL, config_change_noop },
|
||||
{ "dcc_auto_accept_chats", N_("automatically accept dcc chats"),
|
||||
N_("automatically accept dcc chats (use carefully!)"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_dcc_auto_accept_chats, NULL, config_change_noop },
|
||||
{ "dcc_timeout", N_("timeout for dcc request"),
|
||||
N_("timeout for dcc request (in seconds)"),
|
||||
OPTION_TYPE_INT, 1, INT_MAX, 300,
|
||||
NULL, NULL, &cfg_dcc_timeout, NULL, config_change_noop },
|
||||
{ "dcc_blocksize", N_("block size for dcc packets"),
|
||||
N_("block size for dcc packets in bytes (default: 1024)"),
|
||||
OPTION_TYPE_INT, 1024, 102400, 1024,
|
||||
N_("block size for dcc packets in bytes (default: 65536)"),
|
||||
OPTION_TYPE_INT, 1024, 102400, 65536,
|
||||
NULL, NULL, &cfg_dcc_blocksize, NULL, config_change_noop },
|
||||
{ "dcc_download_path", N_("path for incoming files with dcc"),
|
||||
N_("path for writing incoming files with dcc (default: user home)"),
|
||||
@@ -483,6 +579,10 @@ t_config_option weechat_options_dcc[] =
|
||||
N_("path for reading files when sending thru dcc (when no path is specified)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0, "~",
|
||||
NULL, NULL, &cfg_dcc_upload_path, config_change_noop },
|
||||
{ "dcc_convert_spaces", N_("convert spaces to underscores when sending files"),
|
||||
N_("convert spaces to underscores when sending files"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_dcc_convert_spaces, NULL, config_change_noop },
|
||||
{ "dcc_auto_rename", N_("automatically rename dcc files if already exists"),
|
||||
N_("rename incoming files if already exists (add '.1', '.2', ...)"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
@@ -497,27 +597,44 @@ t_config_option weechat_options_dcc[] =
|
||||
/* config, proxy section */
|
||||
|
||||
int cfg_proxy_use;
|
||||
int cfg_proxy_type;
|
||||
int cfg_proxy_ipv6;
|
||||
char *cfg_proxy_type_values[] =
|
||||
{ "http", "socks4", "socks5", NULL };
|
||||
char *cfg_proxy_address;
|
||||
int cfg_proxy_port;
|
||||
char *cfg_proxy_username;
|
||||
char *cfg_proxy_password;
|
||||
|
||||
t_config_option weechat_options_proxy[] =
|
||||
{ { "proxy_use", N_("use proxy"),
|
||||
N_("use a proxy server to connect to irc server"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_proxy_use, NULL, NULL },
|
||||
NULL, NULL, &cfg_proxy_use, NULL, config_change_noop },
|
||||
{ "proxy_type", N_("proxy type"),
|
||||
N_("proxy type (http (default), socks4, socks5)"),
|
||||
OPTION_TYPE_INT_WITH_STRING, 0, 0, 0,
|
||||
"http", cfg_proxy_type_values, &cfg_proxy_type, NULL, config_change_noop },
|
||||
{ "proxy_ipv6", N_("use ipv6 proxy"),
|
||||
N_("connect to proxy in ipv6"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_proxy_ipv6, NULL, config_change_noop },
|
||||
{ "proxy_address", N_("proxy address"),
|
||||
N_("proxy server address (IP or hostname)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &cfg_proxy_address, NULL },
|
||||
"", NULL, NULL, &cfg_proxy_address, config_change_noop },
|
||||
{ "proxy_port", N_("port for proxy"),
|
||||
N_("port for connecting to proxy server"),
|
||||
OPTION_TYPE_INT, 0, 65535, 1080,
|
||||
NULL, NULL, &cfg_proxy_port, NULL, NULL },
|
||||
OPTION_TYPE_INT, 0, 65535, 3128,
|
||||
NULL, NULL, &cfg_proxy_port, NULL, config_change_noop },
|
||||
{ "proxy_username", N_("proxy username"),
|
||||
N_("username for proxy server"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &cfg_proxy_username, config_change_noop },
|
||||
{ "proxy_password", N_("proxy password"),
|
||||
N_("password for proxy server"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &cfg_proxy_password, NULL },
|
||||
"", NULL, NULL, &cfg_proxy_password, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -539,7 +656,7 @@ t_config_option weechat_options_server[] =
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &(cfg_server.autoreconnect), NULL, NULL },
|
||||
{ "server_autoreconnect_delay", N_("delay before trying again to reconnect"),
|
||||
N_("delay (in deconds) before trying again to reconnect to server"),
|
||||
N_("delay (in seconds) before trying again to reconnect to server"),
|
||||
OPTION_TYPE_INT, 0, 65535, 30,
|
||||
NULL, NULL, &(cfg_server.autoreconnect_delay), NULL, NULL },
|
||||
{ "server_address", N_("server address or hostname"),
|
||||
@@ -550,6 +667,14 @@ t_config_option weechat_options_server[] =
|
||||
N_("port for connecting to server"),
|
||||
OPTION_TYPE_INT, 0, 65535, 6667,
|
||||
NULL, NULL, &(cfg_server.port), NULL, NULL },
|
||||
{ "server_ipv6", N_("use IPv6 protocol for server communication"),
|
||||
N_("use IPv6 protocol for server communication"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &(cfg_server.ipv6), NULL, NULL },
|
||||
{ "server_ssl", N_("use SSL for server communication"),
|
||||
N_("use SSL for server communication"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &(cfg_server.ssl), NULL, NULL },
|
||||
{ "server_password", N_("server password"),
|
||||
N_("password for IRC server"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
@@ -580,7 +705,7 @@ t_config_option weechat_options_server[] =
|
||||
"", NULL, NULL, &(cfg_server.command), NULL },
|
||||
{ "server_command_delay", N_("delay (in seconds) after command was executed"),
|
||||
N_("delay (in seconds) after command was executed (example: give some time for authentication)"),
|
||||
OPTION_TYPE_INT, 0, 3600, 1,
|
||||
OPTION_TYPE_INT, 0, 5, 0,
|
||||
NULL, NULL, &(cfg_server.command_delay), NULL, NULL },
|
||||
{ "server_autojoin", N_("list of channels to join when connected to server"),
|
||||
N_("comma separated list of channels to join when connected to server"),
|
||||
@@ -590,6 +715,10 @@ t_config_option weechat_options_server[] =
|
||||
N_("automatically rejoin channels when kicked"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &(cfg_server.autorejoin), NULL, NULL },
|
||||
{ "server_notify_levels", N_("notify levels for channels of this server"),
|
||||
N_("comma separated list of notify levels for channels of this server (format: #channel:1,..)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &(cfg_server.notify_levels), config_change_notify_levels },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -597,8 +726,8 @@ t_config_option weechat_options_server[] =
|
||||
|
||||
t_config_option *weechat_options[CONFIG_NUMBER_SECTIONS] =
|
||||
{ weechat_options_look, weechat_options_colors, weechat_options_history,
|
||||
weechat_options_log, weechat_options_dcc, weechat_options_proxy,
|
||||
NULL, weechat_options_server
|
||||
weechat_options_log, weechat_options_irc, weechat_options_dcc,
|
||||
weechat_options_proxy, NULL, weechat_options_server
|
||||
};
|
||||
|
||||
|
||||
@@ -695,11 +824,62 @@ config_change_buffer_content ()
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_color()
|
||||
config_change_color ()
|
||||
{
|
||||
gui_init_colors ();
|
||||
}
|
||||
|
||||
/*
|
||||
* config_change_away_check: called when away check is changed
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_away_check ()
|
||||
{
|
||||
check_away = 0;
|
||||
if (cfg_irc_away_check == 0)
|
||||
{
|
||||
/* reset away flag for all nicks/chans/servers */
|
||||
server_remove_away ();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* config_change_fifo_pipe: called when FIFO pipe is changed
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_fifo_pipe ()
|
||||
{
|
||||
if (cfg_irc_fifo_pipe)
|
||||
{
|
||||
if (weechat_fifo == -1)
|
||||
fifo_create ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (weechat_fifo != -1)
|
||||
fifo_remove ();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* config_change_notify_levels: called when notify levels is changed for a server
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_notify_levels ()
|
||||
{
|
||||
t_gui_buffer *ptr_buffer;
|
||||
|
||||
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
|
||||
{
|
||||
if (BUFFER_IS_CHANNEL(ptr_buffer) || BUFFER_IS_PRIVATE(ptr_buffer))
|
||||
ptr_buffer->notify_level =
|
||||
channel_get_notify_level (SERVER(ptr_buffer), CHANNEL(ptr_buffer));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* config_option_set_value: set new value for an option
|
||||
* return: 0 if success
|
||||
@@ -746,6 +926,125 @@ config_option_set_value (t_config_option *option, char *value)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_get_server_option_ptr: get a pointer to a server config option
|
||||
*/
|
||||
|
||||
void *
|
||||
config_get_server_option_ptr (t_irc_server *server, char *option_name)
|
||||
{
|
||||
if (strcasecmp (option_name, "server_name") == 0)
|
||||
return (void *)(&server->name);
|
||||
if (strcasecmp (option_name, "server_autoconnect") == 0)
|
||||
return (void *)(&server->autoconnect);
|
||||
if (strcasecmp (option_name, "server_autoreconnect") == 0)
|
||||
return (void *)(&server->autoreconnect);
|
||||
if (strcasecmp (option_name, "server_autoreconnect_delay") == 0)
|
||||
return (void *)(&server->autoreconnect_delay);
|
||||
if (strcasecmp (option_name, "server_address") == 0)
|
||||
return (void *)(&server->address);
|
||||
if (strcasecmp (option_name, "server_port") == 0)
|
||||
return (void *)(&server->port);
|
||||
if (strcasecmp (option_name, "server_ipv6") == 0)
|
||||
return (void *)(&server->ipv6);
|
||||
if (strcasecmp (option_name, "server_ssl") == 0)
|
||||
return (void *)(&server->ssl);
|
||||
if (strcasecmp (option_name, "server_password") == 0)
|
||||
return (void *)(&server->password);
|
||||
if (strcasecmp (option_name, "server_nick1") == 0)
|
||||
return (void *)(&server->nick1);
|
||||
if (strcasecmp (option_name, "server_nick2") == 0)
|
||||
return (void *)(&server->nick2);
|
||||
if (strcasecmp (option_name, "server_nick3") == 0)
|
||||
return (void *)(&server->nick3);
|
||||
if (strcasecmp (option_name, "server_username") == 0)
|
||||
return (void *)(&server->username);
|
||||
if (strcasecmp (option_name, "server_realname") == 0)
|
||||
return (void *)(&server->realname);
|
||||
if (strcasecmp (option_name, "server_command") == 0)
|
||||
return (void *)(&server->command);
|
||||
if (strcasecmp (option_name, "server_command_delay") == 0)
|
||||
return (void *)(&server->command_delay);
|
||||
if (strcasecmp (option_name, "server_autojoin") == 0)
|
||||
return (void *)(&server->autojoin);
|
||||
if (strcasecmp (option_name, "server_autorejoin") == 0)
|
||||
return (void *)(&server->autorejoin);
|
||||
if (strcasecmp (option_name, "server_notify_levels") == 0)
|
||||
return (void *)(&server->notify_levels);
|
||||
/* option not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_set_server_value: set new value for an option
|
||||
* return: 0 if success
|
||||
* -1 if option not found
|
||||
* -2 if bad value
|
||||
*/
|
||||
|
||||
int
|
||||
config_set_server_value (t_irc_server *server, char *option_name,
|
||||
char *value)
|
||||
{
|
||||
t_config_option *ptr_option;
|
||||
int i;
|
||||
void *ptr_data;
|
||||
int int_value;
|
||||
|
||||
ptr_data = config_get_server_option_ptr (server, option_name);
|
||||
if (!ptr_data)
|
||||
return -1;
|
||||
|
||||
ptr_option = NULL;
|
||||
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
|
||||
{
|
||||
/* if option found, return pointer */
|
||||
if (strcasecmp (weechat_options[CONFIG_SECTION_SERVER][i].option_name, option_name) == 0)
|
||||
{
|
||||
ptr_option = &weechat_options[CONFIG_SECTION_SERVER][i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!ptr_option)
|
||||
return -1;
|
||||
|
||||
switch (ptr_option->option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
if (strcasecmp (value, "on") == 0)
|
||||
*((int *)(ptr_data)) = BOOL_TRUE;
|
||||
else if (strcasecmp (value, "off") == 0)
|
||||
*((int *)(ptr_data)) = BOOL_FALSE;
|
||||
else
|
||||
return -2;
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
int_value = atoi (value);
|
||||
if ((int_value < ptr_option->min) || (int_value > ptr_option->max))
|
||||
return -2;
|
||||
*((int *)(ptr_data)) = int_value;
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
int_value = get_pos_array_values (ptr_option->array_values, value);
|
||||
if (int_value < 0)
|
||||
return -2;
|
||||
*((int *)(ptr_data)) = int_value;
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
if (!gui_assign_color ((int *)ptr_data, value))
|
||||
return -2;
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
if (*((char **)ptr_data))
|
||||
free (*((char **)ptr_data));
|
||||
*((char **)ptr_data) = strdup (value);
|
||||
break;
|
||||
}
|
||||
if (ptr_option->handler_change != NULL)
|
||||
(void) (ptr_option->handler_change());
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_option_search: look for an option and return pointer to this option
|
||||
* if option is not found, NULL is returned
|
||||
@@ -772,6 +1071,72 @@ config_option_search (char *option_name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_option_search_option_value: look for type and value of an option
|
||||
* (including server options)
|
||||
* if option is not found, NULL is returned
|
||||
*/
|
||||
|
||||
void
|
||||
config_option_search_option_value (char *option_name, t_config_option **option,
|
||||
void **option_value)
|
||||
{
|
||||
t_config_option *ptr_option;
|
||||
t_irc_server *ptr_server;
|
||||
int i;
|
||||
void *ptr_value;
|
||||
char *pos;
|
||||
|
||||
ptr_option = NULL;
|
||||
ptr_value = NULL;
|
||||
|
||||
ptr_option = config_option_search (option_name);
|
||||
if (!ptr_option)
|
||||
{
|
||||
pos = strchr (option_name, '.');
|
||||
if (pos)
|
||||
{
|
||||
pos[0] = '\0';
|
||||
ptr_server = server_search (option_name);
|
||||
if (ptr_server)
|
||||
{
|
||||
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
|
||||
{
|
||||
if (strcmp (weechat_options[CONFIG_SECTION_SERVER][i].option_name,
|
||||
pos + 1) == 0)
|
||||
{
|
||||
ptr_option = &weechat_options[CONFIG_SECTION_SERVER][i];
|
||||
ptr_value = config_get_server_option_ptr (ptr_server, pos + 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
pos[0] = '.';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ptr_option->option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
case OPTION_TYPE_INT:
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
case OPTION_TYPE_COLOR:
|
||||
ptr_value = (void *)(ptr_option->ptr_int);
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
ptr_value = (void *)(ptr_option->ptr_string);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr_option)
|
||||
{
|
||||
*option = ptr_option;
|
||||
*option_value = ptr_value;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* config_set_value: set new value for an option (found by name)
|
||||
* return: 0 if success
|
||||
@@ -823,12 +1188,13 @@ config_allocate_server (char *filename, int line_number)
|
||||
return 0;
|
||||
}
|
||||
if (!server_new (cfg_server.name,
|
||||
cfg_server.autoconnect, cfg_server.autoreconnect,
|
||||
cfg_server.autoreconnect_delay, 0, cfg_server.address, cfg_server.port,
|
||||
cfg_server.password, cfg_server.nick1, cfg_server.nick2,
|
||||
cfg_server.nick3, cfg_server.username, cfg_server.realname,
|
||||
cfg_server.command, cfg_server.command_delay, cfg_server.autojoin,
|
||||
cfg_server.autorejoin))
|
||||
cfg_server.autoconnect, cfg_server.autoreconnect,
|
||||
cfg_server.autoreconnect_delay, 0, cfg_server.address,
|
||||
cfg_server.port, cfg_server.ipv6, cfg_server.ssl,
|
||||
cfg_server.password, cfg_server.nick1, cfg_server.nick2,
|
||||
cfg_server.nick3, cfg_server.username, cfg_server.realname,
|
||||
cfg_server.command, cfg_server.command_delay, cfg_server.autojoin,
|
||||
cfg_server.autorejoin, cfg_server.notify_levels))
|
||||
{
|
||||
server_free_all ();
|
||||
gui_printf (NULL,
|
||||
@@ -872,7 +1238,7 @@ config_default_values ()
|
||||
if (int_value < 0)
|
||||
gui_printf (NULL,
|
||||
_("%s unable to assign default int with string (\"%s\")\n"),
|
||||
weechat_options[i][j].default_string);
|
||||
WEECHAT_WARNING, weechat_options[i][j].default_string);
|
||||
else
|
||||
*weechat_options[i][j].ptr_int =
|
||||
int_value;
|
||||
@@ -883,7 +1249,7 @@ config_default_values ()
|
||||
weechat_options[i][j].default_string))
|
||||
gui_printf (NULL,
|
||||
_("%s unable to assign default color (\"%s\")\n"),
|
||||
weechat_options[i][j].default_string);
|
||||
WEECHAT_WARNING, weechat_options[i][j].default_string);
|
||||
break;
|
||||
case OPTION_TYPE_STRING:
|
||||
*weechat_options[i][j].ptr_string =
|
||||
@@ -985,96 +1351,105 @@ config_read ()
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = strchr (line, '=');
|
||||
if (pos == NULL)
|
||||
if (section == CONFIG_SECTION_NONE)
|
||||
{
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid syntax, missing \"=\"\n"),
|
||||
_("%s %s, line %d: invalid section for option, line is ignored\n"),
|
||||
WEECHAT_WARNING, filename, line_number);
|
||||
}
|
||||
else
|
||||
{
|
||||
pos[0] = '\0';
|
||||
pos++;
|
||||
pos2 = strchr (pos, '\r');
|
||||
if (pos2 != NULL)
|
||||
pos2[0] = '\0';
|
||||
pos2 = strchr (pos, '\n');
|
||||
if (pos2 != NULL)
|
||||
pos2[0] = '\0';
|
||||
|
||||
if (section == CONFIG_SECTION_ALIAS)
|
||||
{
|
||||
if (alias_new (line, pos))
|
||||
index_command_new (line);
|
||||
}
|
||||
pos = strchr (line, '=');
|
||||
if (pos == NULL)
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid syntax, missing \"=\"\n"),
|
||||
WEECHAT_WARNING, filename, line_number);
|
||||
else
|
||||
{
|
||||
option_number = -1;
|
||||
for (i = 0;
|
||||
weechat_options[section][i].option_name; i++)
|
||||
pos[0] = '\0';
|
||||
pos++;
|
||||
pos2 = strchr (pos, '\r');
|
||||
if (pos2 != NULL)
|
||||
pos2[0] = '\0';
|
||||
pos2 = strchr (pos, '\n');
|
||||
if (pos2 != NULL)
|
||||
pos2[0] = '\0';
|
||||
|
||||
if (section == CONFIG_SECTION_ALIAS)
|
||||
{
|
||||
if (strcmp
|
||||
(weechat_options[section][i].option_name,
|
||||
ptr_line) == 0)
|
||||
{
|
||||
option_number = i;
|
||||
break;
|
||||
}
|
||||
if (alias_new (line, pos))
|
||||
weelist_add (&index_commands, &last_index_command, line);
|
||||
}
|
||||
if (option_number < 0)
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid option \"%s\"\n"),
|
||||
WEECHAT_WARNING, filename, line_number, ptr_line);
|
||||
else
|
||||
{
|
||||
if (config_option_set_value (&weechat_options[section][option_number], pos) < 0)
|
||||
option_number = -1;
|
||||
for (i = 0;
|
||||
weechat_options[section][i].option_name; i++)
|
||||
{
|
||||
switch (weechat_options[section]
|
||||
[option_number].option_type)
|
||||
if (strcmp
|
||||
(weechat_options[section][i].option_name,
|
||||
ptr_line) == 0)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid value for"
|
||||
"option '%s'\n"
|
||||
"Expected: boolean value: "
|
||||
"'off' or 'on'\n"),
|
||||
WEECHAT_WARNING, filename,
|
||||
line_number, ptr_line);
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid value for "
|
||||
"option '%s'\n"
|
||||
"Expected: integer between %d "
|
||||
"and %d\n"),
|
||||
WEECHAT_WARNING, filename,
|
||||
line_number, ptr_line,
|
||||
weechat_options[section][option_number].min,
|
||||
weechat_options[section][option_number].max);
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid value for "
|
||||
"option '%s'\n"
|
||||
"Expected: one of these strings: "),
|
||||
WEECHAT_WARNING, filename,
|
||||
line_number, ptr_line);
|
||||
i = 0;
|
||||
while (weechat_options[section][option_number].array_values[i])
|
||||
{
|
||||
gui_printf (NULL, "\"%s\" ",
|
||||
weechat_options[section][option_number].array_values[i]);
|
||||
i++;
|
||||
}
|
||||
gui_printf (NULL, "\n");
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid color "
|
||||
"name for option '%s'\n"),
|
||||
WEECHAT_WARNING, filename,
|
||||
line_number,
|
||||
ptr_line);
|
||||
break;
|
||||
option_number = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (option_number < 0)
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid option \"%s\"\n"),
|
||||
WEECHAT_WARNING, filename, line_number, ptr_line);
|
||||
else
|
||||
{
|
||||
if (config_option_set_value (&weechat_options[section][option_number], pos) < 0)
|
||||
{
|
||||
switch (weechat_options[section]
|
||||
[option_number].option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid value for"
|
||||
"option '%s'\n"
|
||||
"Expected: boolean value: "
|
||||
"'off' or 'on'\n"),
|
||||
WEECHAT_WARNING, filename,
|
||||
line_number, ptr_line);
|
||||
break;
|
||||
case OPTION_TYPE_INT:
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid value for "
|
||||
"option '%s'\n"
|
||||
"Expected: integer between %d "
|
||||
"and %d\n"),
|
||||
WEECHAT_WARNING, filename,
|
||||
line_number, ptr_line,
|
||||
weechat_options[section][option_number].min,
|
||||
weechat_options[section][option_number].max);
|
||||
break;
|
||||
case OPTION_TYPE_INT_WITH_STRING:
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid value for "
|
||||
"option '%s'\n"
|
||||
"Expected: one of these strings: "),
|
||||
WEECHAT_WARNING, filename,
|
||||
line_number, ptr_line);
|
||||
i = 0;
|
||||
while (weechat_options[section][option_number].array_values[i])
|
||||
{
|
||||
gui_printf (NULL, "\"%s\" ",
|
||||
weechat_options[section][option_number].array_values[i]);
|
||||
i++;
|
||||
}
|
||||
gui_printf (NULL, "\n");
|
||||
break;
|
||||
case OPTION_TYPE_COLOR:
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid color "
|
||||
"name for option '%s'\n"),
|
||||
WEECHAT_WARNING, filename,
|
||||
line_number,
|
||||
ptr_line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1135,7 +1510,7 @@ config_create_default ()
|
||||
}
|
||||
|
||||
printf (_("%s: creating default config file...\n"), PACKAGE_NAME);
|
||||
wee_log_printf (_("creating default config file\n"));
|
||||
wee_log_printf (_("Creating default config file\n"));
|
||||
|
||||
current_time = time (NULL);
|
||||
fprintf (file, _("#\n# %s configuration file, created by "
|
||||
@@ -1148,11 +1523,6 @@ config_create_default ()
|
||||
if ((i != CONFIG_SECTION_ALIAS) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
fprintf (file, "\n[%s]\n", config_sections[i].section_name);
|
||||
if ((i == CONFIG_SECTION_HISTORY) || (i == CONFIG_SECTION_LOG) ||
|
||||
(i == CONFIG_SECTION_DCC) || (i == CONFIG_SECTION_PROXY))
|
||||
fprintf (file,
|
||||
"# WARNING!!! Options for section \"%s\" are not developed!\n",
|
||||
config_sections[i].section_name);
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
{
|
||||
switch (weechat_options[i][j].option_type)
|
||||
@@ -1214,8 +1584,12 @@ config_create_default ()
|
||||
fprintf (file, "\n[server]\n");
|
||||
fprintf (file, "server_name=freenode\n");
|
||||
fprintf (file, "server_autoconnect=on\n");
|
||||
fprintf (file, "server_autoreconnect=on\n");
|
||||
fprintf (file, "server_autoreconnect_delay=30\n");
|
||||
fprintf (file, "server_address=irc.freenode.net\n");
|
||||
fprintf (file, "server_port=6667\n");
|
||||
fprintf (file, "server_ipv6=off\n");
|
||||
fprintf (file, "server_ssl=off\n");
|
||||
fprintf (file, "server_password=\n");
|
||||
|
||||
/* Get the user's name from /etc/passwd */
|
||||
@@ -1258,10 +1632,12 @@ config_create_default ()
|
||||
}
|
||||
|
||||
fprintf (file, "server_command=\n");
|
||||
fprintf (file, "server_command_delay=0\n");
|
||||
fprintf (file, "server_autojoin=\n");
|
||||
fprintf (file, "server_autorejoin=on\n");
|
||||
|
||||
fclose (file);
|
||||
chmod (filename, 0600);
|
||||
free (filename);
|
||||
return 0;
|
||||
}
|
||||
@@ -1304,7 +1680,7 @@ config_write (char *config_name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
wee_log_printf (_("saving config to disk\n"));
|
||||
wee_log_printf (_("Saving config to disk\n"));
|
||||
|
||||
current_time = time (NULL);
|
||||
fprintf (file, _("#\n# %s configuration file, created by "
|
||||
@@ -1317,10 +1693,6 @@ config_write (char *config_name)
|
||||
if ((i != CONFIG_SECTION_ALIAS) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
fprintf (file, "\n[%s]\n", config_sections[i].section_name);
|
||||
if (i == CONFIG_SECTION_PROXY)
|
||||
fprintf (file,
|
||||
"# WARNING!!! Options for section \"%s\" are not developed!\n",
|
||||
config_sections[i].section_name);
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
{
|
||||
switch (weechat_options[i][j].option_type)
|
||||
@@ -1390,6 +1762,10 @@ config_write (char *config_name)
|
||||
ptr_server->autoreconnect_delay);
|
||||
fprintf (file, "server_address=%s\n", ptr_server->address);
|
||||
fprintf (file, "server_port=%d\n", ptr_server->port);
|
||||
fprintf (file, "server_ipv6=%s\n",
|
||||
(ptr_server->ipv6) ? "on" : "off");
|
||||
fprintf (file, "server_ssl=%s\n",
|
||||
(ptr_server->ssl) ? "on" : "off");
|
||||
fprintf (file, "server_password=%s\n",
|
||||
(ptr_server->password) ? ptr_server->password : "");
|
||||
fprintf (file, "server_nick1=%s\n", ptr_server->nick1);
|
||||
@@ -1404,10 +1780,13 @@ config_write (char *config_name)
|
||||
(ptr_server->autojoin) ? ptr_server->autojoin : "");
|
||||
fprintf (file, "server_autorejoin=%s\n",
|
||||
(ptr_server->autorejoin) ? "on" : "off");
|
||||
fprintf (file, "server_notify_levels=%s\n",
|
||||
(ptr_server->notify_levels) ? ptr_server->notify_levels : "");
|
||||
}
|
||||
}
|
||||
|
||||
fclose (file);
|
||||
chmod (filename, 0600);
|
||||
free (filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+38
-6
@@ -21,6 +21,8 @@
|
||||
#ifndef __WEECHAT_CONFIG_H
|
||||
#define __WEECHAT_CONFIG_H 1
|
||||
|
||||
#include "../irc/irc.h"
|
||||
|
||||
#define WEECHAT_CONFIG_NAME "weechat.rc"
|
||||
|
||||
#define CONFIG_SECTION_NONE -1
|
||||
@@ -28,11 +30,12 @@
|
||||
#define CONFIG_SECTION_COLORS 1
|
||||
#define CONFIG_SECTION_HISTORY 2
|
||||
#define CONFIG_SECTION_LOG 3
|
||||
#define CONFIG_SECTION_DCC 4
|
||||
#define CONFIG_SECTION_PROXY 5
|
||||
#define CONFIG_SECTION_ALIAS 6
|
||||
#define CONFIG_SECTION_SERVER 7
|
||||
#define CONFIG_NUMBER_SECTIONS 8
|
||||
#define CONFIG_SECTION_IRC 4
|
||||
#define CONFIG_SECTION_DCC 5
|
||||
#define CONFIG_SECTION_PROXY 6
|
||||
#define CONFIG_SECTION_ALIAS 7
|
||||
#define CONFIG_SECTION_SERVER 8
|
||||
#define CONFIG_NUMBER_SECTIONS 9
|
||||
|
||||
#define OPTION_TYPE_BOOLEAN 1 /* values: on/off */
|
||||
#define OPTION_TYPE_INT 2 /* values: from min to max */
|
||||
@@ -77,6 +80,10 @@ extern int cfg_look_set_title;
|
||||
extern int cfg_look_startup_logo;
|
||||
extern int cfg_look_startup_version;
|
||||
extern char *cfg_look_weechat_slogan;
|
||||
extern char *cfg_look_charset_decode;
|
||||
extern char *cfg_look_charset_encode;
|
||||
extern char *cfg_look_charset_internal;
|
||||
extern char *cfg_look_buffer_timestamp;
|
||||
extern int cfg_look_color_nicks;
|
||||
extern int cfg_look_color_actions;
|
||||
extern int cfg_look_remove_colors_from_msgs;
|
||||
@@ -88,7 +95,6 @@ extern int cfg_look_nickmode;
|
||||
extern int cfg_look_nickmode_empty;
|
||||
extern char *cfg_look_no_nickname;
|
||||
extern char *cfg_look_completor;
|
||||
extern int cfg_look_display_away;
|
||||
extern int cfg_look_infobar;
|
||||
extern char *cfg_look_infobar_timestamp;
|
||||
extern int cfg_look_infobar_delay_highlight;
|
||||
@@ -121,9 +127,13 @@ extern int cfg_col_input_channel;
|
||||
extern int cfg_col_input_nick;
|
||||
extern int cfg_col_input_bg;
|
||||
extern int cfg_col_nick;
|
||||
extern int cfg_col_nick_away;
|
||||
extern int cfg_col_nick_chanowner;
|
||||
extern int cfg_col_nick_chanadmin;
|
||||
extern int cfg_col_nick_op;
|
||||
extern int cfg_col_nick_halfop;
|
||||
extern int cfg_col_nick_voice;
|
||||
extern int cfg_col_nick_more;
|
||||
extern int cfg_col_nick_sep;
|
||||
extern int cfg_col_nick_self;
|
||||
extern int cfg_col_nick_private;
|
||||
@@ -142,22 +152,38 @@ extern int cfg_history_max_commands;
|
||||
extern int cfg_log_auto_server;
|
||||
extern int cfg_log_auto_channel;
|
||||
extern int cfg_log_auto_private;
|
||||
extern int cfg_log_plugin_msg;
|
||||
extern char *cfg_log_path;
|
||||
extern char *cfg_log_timestamp;
|
||||
extern int cfg_log_hide_nickserv_pwd;
|
||||
|
||||
extern int cfg_irc_display_away;
|
||||
extern char *cfg_irc_default_msg_away;
|
||||
extern char *cfg_irc_default_msg_part;
|
||||
extern char *cfg_irc_default_msg_quit;
|
||||
extern int cfg_irc_away_check;
|
||||
extern int cfg_irc_lag_check;
|
||||
extern int cfg_irc_lag_min_show;
|
||||
extern int cfg_irc_lag_disconnect;
|
||||
extern int cfg_irc_fifo_pipe;
|
||||
|
||||
extern int cfg_dcc_auto_accept_files;
|
||||
extern int cfg_dcc_auto_accept_chats;
|
||||
extern int cfg_dcc_timeout;
|
||||
extern int cfg_dcc_blocksize;
|
||||
extern char *cfg_dcc_download_path;
|
||||
extern char *cfg_dcc_upload_path;
|
||||
extern int cfg_dcc_convert_spaces;
|
||||
extern int cfg_dcc_auto_rename;
|
||||
extern int cfg_dcc_auto_resume;
|
||||
|
||||
extern int cfg_proxy_use;
|
||||
extern int cfg_proxy_type;
|
||||
extern char *cfg_proxy_type_values[];
|
||||
extern int cfg_proxy_ipv6;
|
||||
extern char *cfg_proxy_address;
|
||||
extern int cfg_proxy_port;
|
||||
extern char *cfg_proxy_username;
|
||||
extern char *cfg_proxy_password;
|
||||
|
||||
extern t_config_section config_sections [CONFIG_NUMBER_SECTIONS];
|
||||
@@ -169,9 +195,15 @@ extern void config_change_title ();
|
||||
extern void config_change_buffers ();
|
||||
extern void config_change_buffer_content ();
|
||||
extern void config_change_color ();
|
||||
extern void config_change_away_check ();
|
||||
extern void config_change_fifo_pipe ();
|
||||
extern void config_change_notify_levels ();
|
||||
extern int config_option_set_value (t_config_option *, char *);
|
||||
extern t_config_option *config_option_search (char *);
|
||||
extern void config_option_search_option_value (char *, t_config_option **, void **);
|
||||
extern int config_set_value (char *, char *);
|
||||
extern void *config_get_server_option_ptr (t_irc_server *, char *);
|
||||
extern int config_set_server_value (t_irc_server *, char *, char *);
|
||||
extern int config_read ();
|
||||
extern int config_create_default ();
|
||||
extern int config_write ();
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* weelist.c: sorted lists management */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "weelist.h"
|
||||
|
||||
|
||||
/*
|
||||
* weelist_search: search date in a list
|
||||
*/
|
||||
|
||||
t_weelist *
|
||||
weelist_search (t_weelist *weelist, char *data)
|
||||
{
|
||||
t_weelist *ptr_weelist;
|
||||
|
||||
for (ptr_weelist = weelist; ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (strcasecmp (data, ptr_weelist->data) == 0)
|
||||
return ptr_weelist;
|
||||
}
|
||||
/* word not found in list */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* weelist_find_pos: find position for data (keeping list sorted)
|
||||
*/
|
||||
|
||||
t_weelist *
|
||||
weelist_find_pos (t_weelist *weelist, char *data)
|
||||
{
|
||||
t_weelist *ptr_weelist;
|
||||
|
||||
for (ptr_weelist = weelist; ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (strcasecmp (data, ptr_weelist->data) < 0)
|
||||
return ptr_weelist;
|
||||
}
|
||||
/* position not found, best position is at the end */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* weelist_insert: insert an element to the list (at good position)
|
||||
*/
|
||||
|
||||
void
|
||||
weelist_insert (t_weelist **weelist, t_weelist **last_weelist, t_weelist *element)
|
||||
{
|
||||
t_weelist *pos_weelist;
|
||||
|
||||
pos_weelist = weelist_find_pos (*weelist, element->data);
|
||||
|
||||
if (*weelist)
|
||||
{
|
||||
if (pos_weelist)
|
||||
{
|
||||
/* insert data into the list (before position found) */
|
||||
element->prev_weelist = pos_weelist->prev_weelist;
|
||||
element->next_weelist = pos_weelist;
|
||||
if (pos_weelist->prev_weelist)
|
||||
pos_weelist->prev_weelist->next_weelist = element;
|
||||
else
|
||||
*weelist = element;
|
||||
pos_weelist->prev_weelist = element;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* add data to the end */
|
||||
element->prev_weelist = *last_weelist;
|
||||
element->next_weelist = NULL;
|
||||
(*last_weelist)->next_weelist = element;
|
||||
*last_weelist = element;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
element->prev_weelist = NULL;
|
||||
element->next_weelist = NULL;
|
||||
*weelist = element;
|
||||
*last_weelist = element;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* weelist_add: create new data and add it to list
|
||||
*/
|
||||
|
||||
t_weelist *
|
||||
weelist_add (t_weelist **weelist, t_weelist **last_weelist, char *data)
|
||||
{
|
||||
t_weelist *new_weelist;
|
||||
|
||||
if (!data || (!data[0]))
|
||||
return NULL;
|
||||
|
||||
if ((new_weelist = ((t_weelist *) malloc (sizeof (t_weelist)))))
|
||||
{
|
||||
new_weelist->data = strdup (data);
|
||||
weelist_insert (weelist, last_weelist, new_weelist);
|
||||
return new_weelist;
|
||||
}
|
||||
/* failed to allocate new element */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* weelist_remove: free an element in a list
|
||||
*/
|
||||
|
||||
void
|
||||
weelist_remove (t_weelist **weelist, t_weelist **last_weelist, t_weelist *element)
|
||||
{
|
||||
t_weelist *new_weelist;
|
||||
|
||||
/* remove element from list */
|
||||
if (*last_weelist == element)
|
||||
*last_weelist = element->prev_weelist;
|
||||
if (element->prev_weelist)
|
||||
{
|
||||
(element->prev_weelist)->next_weelist = element->next_weelist;
|
||||
new_weelist = *weelist;
|
||||
}
|
||||
else
|
||||
new_weelist = element->next_weelist;
|
||||
|
||||
if (element->next_weelist)
|
||||
(element->next_weelist)->prev_weelist = element->prev_weelist;
|
||||
|
||||
/* free data */
|
||||
if (element->data)
|
||||
free (element->data);
|
||||
free (element);
|
||||
*weelist = new_weelist;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __WEECHAT_LIST_H
|
||||
#define __WEECHAT_LIST_H 1
|
||||
|
||||
typedef struct t_weelist t_weelist;
|
||||
|
||||
struct t_weelist
|
||||
{
|
||||
char *data;
|
||||
t_weelist *prev_weelist;
|
||||
t_weelist *next_weelist;
|
||||
};
|
||||
|
||||
t_weelist *weelist_search (t_weelist *, char *);
|
||||
t_weelist *weelist_add (t_weelist **, t_weelist **, char *);
|
||||
void weelist_remove (t_weelist **, t_weelist **, t_weelist *);
|
||||
|
||||
#endif /* weelist.h */
|
||||
+13
-2
@@ -15,10 +15,21 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
if GUI_CURSES
|
||||
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
|
||||
noinst_LIBRARIES = lib_weechat_gui_common.a
|
||||
|
||||
lib_weechat_gui_common_a_SOURCES = gui-common.c \
|
||||
gui.h
|
||||
|
||||
if GUI_NCURSES
|
||||
curses_dir=curses
|
||||
endif
|
||||
|
||||
if GUI_WXWIDGETS
|
||||
wxwidgets_dir=wxwidgets
|
||||
endif
|
||||
|
||||
if GUI_GTK
|
||||
gtk_dir=gtk
|
||||
endif
|
||||
@@ -27,4 +38,4 @@ if GUI_QT
|
||||
qt_dir=qt
|
||||
endif
|
||||
|
||||
SUBDIRS = $(curses_dir) $(gtk_dir) $(qt_dir)
|
||||
SUBDIRS = . $(curses_dir) $(wxwidgets_dir) $(gtk_dir) $(qt_dir)
|
||||
|
||||
@@ -19,12 +19,12 @@ INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
|
||||
bin_PROGRAMS = weechat-curses
|
||||
|
||||
weechat_curses_LDADD = ../../common/lib_weechat_main.a \
|
||||
weechat_curses_LDADD = ../lib_weechat_gui_common.a \
|
||||
../../common/lib_weechat_main.a \
|
||||
../../irc/lib_weechat_irc.a \
|
||||
$(CURSES_LIBS) \
|
||||
../../plugins/lib_weechat_plugins.a $(PLUGINS_LIBS)
|
||||
$(NCURSES_LIBS) \
|
||||
../../plugins/lib_weechat_plugins.a $(PLUGINS_LIBS) \
|
||||
$(GNUTLS_LIBS)
|
||||
|
||||
weechat_curses_SOURCES = ../gui.h \
|
||||
../gui-common.c \
|
||||
gui-display.c \
|
||||
weechat_curses_SOURCES = gui-display.c \
|
||||
gui-input.c
|
||||
|
||||
+1135
-511
File diff suppressed because it is too large
Load Diff
+233
-90
@@ -31,13 +31,14 @@
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <curses.h>
|
||||
#include <ncurses.h>
|
||||
|
||||
#include "../../common/weechat.h"
|
||||
#include "../gui.h"
|
||||
#include "../../common/weeconfig.h"
|
||||
#include "../../common/command.h"
|
||||
#include "../../common/hotlist.h"
|
||||
#include "../../common/fifo.h"
|
||||
#include "../../irc/irc.h"
|
||||
|
||||
#define KEY_ESCAPE 27
|
||||
@@ -52,8 +53,9 @@ gui_read_keyb ()
|
||||
int key, i;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
t_irc_server *ptr_server;
|
||||
char new_char[2];
|
||||
t_dcc *dcc_selected;
|
||||
t_irc_dcc *ptr_dcc, *ptr_dcc_next;
|
||||
char new_char[3], *decoded_string;
|
||||
t_irc_dcc *dcc_selected;
|
||||
|
||||
key = getch ();
|
||||
if (key != ERR)
|
||||
@@ -69,19 +71,20 @@ gui_read_keyb ()
|
||||
case KEY_F(2):
|
||||
case KEY_F(3):
|
||||
case KEY_F(4):
|
||||
case KEY_F(5):
|
||||
case KEY_F(9):
|
||||
case KEY_F(11):
|
||||
case KEY_F(12):
|
||||
break;
|
||||
/* previous buffer in window */
|
||||
case KEY_F(6):
|
||||
case KEY_F(5):
|
||||
gui_switch_to_previous_buffer (gui_current_window);
|
||||
break;
|
||||
/* next buffer in window */
|
||||
case KEY_F(7):
|
||||
case KEY_F(6):
|
||||
gui_switch_to_next_buffer (gui_current_window);
|
||||
break;
|
||||
/* previous window */
|
||||
case KEY_F(7):
|
||||
gui_switch_to_previous_window (gui_current_window);
|
||||
break;
|
||||
/* next window */
|
||||
case KEY_F(8):
|
||||
gui_switch_to_next_window (gui_current_window);
|
||||
@@ -89,6 +92,13 @@ gui_read_keyb ()
|
||||
/* remove last infobar message */
|
||||
case KEY_F(10):
|
||||
gui_infobar_remove ();
|
||||
gui_draw_buffer_infobar (gui_current_window->buffer, 1);
|
||||
break;
|
||||
case KEY_F(11):
|
||||
gui_nick_move_page_up (gui_current_window);
|
||||
break;
|
||||
case KEY_F(12):
|
||||
gui_nick_move_page_down (gui_current_window);
|
||||
break;
|
||||
/* cursor up */
|
||||
case KEY_UP:
|
||||
@@ -97,14 +107,14 @@ gui_read_keyb ()
|
||||
if (dcc_list)
|
||||
{
|
||||
if (gui_current_window->dcc_selected
|
||||
&& ((t_dcc *)(gui_current_window->dcc_selected))->prev_dcc)
|
||||
&& ((t_irc_dcc *)(gui_current_window->dcc_selected))->prev_dcc)
|
||||
{
|
||||
if (gui_current_window->dcc_selected ==
|
||||
gui_current_window->dcc_first)
|
||||
gui_current_window->dcc_first =
|
||||
((t_dcc *)(gui_current_window->dcc_first))->prev_dcc;
|
||||
((t_irc_dcc *)(gui_current_window->dcc_first))->prev_dcc;
|
||||
gui_current_window->dcc_selected =
|
||||
((t_dcc *)(gui_current_window->dcc_selected))->prev_dcc;
|
||||
((t_irc_dcc *)(gui_current_window->dcc_selected))->prev_dcc;
|
||||
gui_draw_buffer_chat (gui_current_window->buffer, 1);
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 1);
|
||||
}
|
||||
@@ -143,7 +153,7 @@ gui_read_keyb ()
|
||||
if (dcc_list)
|
||||
{
|
||||
if (!gui_current_window->dcc_selected
|
||||
|| ((t_dcc *)(gui_current_window->dcc_selected))->next_dcc)
|
||||
|| ((t_irc_dcc *)(gui_current_window->dcc_selected))->next_dcc)
|
||||
{
|
||||
if (gui_current_window->dcc_last_displayed
|
||||
&& (gui_current_window->dcc_selected ==
|
||||
@@ -151,14 +161,14 @@ gui_read_keyb ()
|
||||
{
|
||||
if (gui_current_window->dcc_first)
|
||||
gui_current_window->dcc_first =
|
||||
((t_dcc *)(gui_current_window->dcc_first))->next_dcc;
|
||||
((t_irc_dcc *)(gui_current_window->dcc_first))->next_dcc;
|
||||
else
|
||||
gui_current_window->dcc_first =
|
||||
dcc_list->next_dcc;
|
||||
}
|
||||
if (gui_current_window->dcc_selected)
|
||||
gui_current_window->dcc_selected =
|
||||
((t_dcc *)(gui_current_window->dcc_selected))->next_dcc;
|
||||
((t_irc_dcc *)(gui_current_window->dcc_selected))->next_dcc;
|
||||
else
|
||||
gui_current_window->dcc_selected =
|
||||
dcc_list->next_dcc;
|
||||
@@ -311,16 +321,16 @@ gui_read_keyb ()
|
||||
gui_current_window->buffer->input_buffer,
|
||||
gui_current_window->buffer->input_buffer_size,
|
||||
gui_current_window->buffer->input_buffer_pos);
|
||||
|
||||
if (gui_current_window->buffer->completion.word_found)
|
||||
{
|
||||
/* replace word with new completed word into input buffer */
|
||||
gui_current_window->buffer->input_buffer_size +=
|
||||
gui_current_window->buffer->completion.diff_size;
|
||||
gui_optimize_input_buffer_size (gui_current_window->buffer);
|
||||
gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_size] = '\0';
|
||||
|
||||
if (gui_current_window->buffer->completion.diff_size > 0)
|
||||
{
|
||||
gui_current_window->buffer->input_buffer_size +=
|
||||
gui_current_window->buffer->completion.diff_size;
|
||||
gui_optimize_input_buffer_size (gui_current_window->buffer);
|
||||
gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_size] = '\0';
|
||||
for (i = gui_current_window->buffer->input_buffer_size - 1;
|
||||
i >= gui_current_window->buffer->completion.position_replace +
|
||||
(int)strlen (gui_current_window->buffer->completion.word_found); i--)
|
||||
@@ -336,6 +346,10 @@ gui_read_keyb ()
|
||||
gui_current_window->buffer->input_buffer[i] =
|
||||
gui_current_window->buffer->input_buffer[i -
|
||||
gui_current_window->buffer->completion.diff_size];
|
||||
gui_current_window->buffer->input_buffer_size +=
|
||||
gui_current_window->buffer->completion.diff_size;
|
||||
gui_optimize_input_buffer_size (gui_current_window->buffer);
|
||||
gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_size] = '\0';
|
||||
}
|
||||
|
||||
strncpy (gui_current_window->buffer->input_buffer + gui_current_window->buffer->completion.position_replace,
|
||||
@@ -344,35 +358,45 @@ gui_read_keyb ()
|
||||
gui_current_window->buffer->input_buffer_pos =
|
||||
gui_current_window->buffer->completion.position_replace +
|
||||
strlen (gui_current_window->buffer->completion.word_found);
|
||||
gui_current_window->buffer->completion.position =
|
||||
gui_current_window->buffer->input_buffer_pos;
|
||||
|
||||
/* position is < 0 this means only one word was found to complete,
|
||||
so reinit to stop completion */
|
||||
if (gui_current_window->buffer->completion.position >= 0)
|
||||
gui_current_window->buffer->completion.position =
|
||||
gui_current_window->buffer->input_buffer_pos;
|
||||
|
||||
/* add space or completor to the end of completion, if needed */
|
||||
if (gui_current_window->buffer->completion.base_word[0] == '/')
|
||||
if ((gui_current_window->buffer->completion.context == COMPLETION_COMMAND)
|
||||
|| (gui_current_window->buffer->completion.context == COMPLETION_COMMAND_ARG))
|
||||
{
|
||||
if (gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_pos] != ' ')
|
||||
gui_buffer_insert_string (gui_current_window->buffer,
|
||||
" ",
|
||||
gui_current_window->buffer->input_buffer_pos);
|
||||
gui_current_window->buffer->completion.position++;
|
||||
if (gui_current_window->buffer->completion.position >= 0)
|
||||
gui_current_window->buffer->completion.position++;
|
||||
gui_current_window->buffer->input_buffer_pos++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gui_current_window->buffer->completion.base_word_pos == 0)
|
||||
/* add nick completor if position 0 and completing nick */
|
||||
if ((gui_current_window->buffer->completion.base_word_pos == 0)
|
||||
&& (gui_current_window->buffer->completion.context == COMPLETION_NICK))
|
||||
{
|
||||
if (strncmp (gui_current_window->buffer->input_buffer + gui_current_window->buffer->input_buffer_pos,
|
||||
cfg_look_completor, strlen (cfg_look_completor)) != 0)
|
||||
gui_buffer_insert_string (gui_current_window->buffer,
|
||||
cfg_look_completor,
|
||||
gui_current_window->buffer->input_buffer_pos);
|
||||
gui_current_window->buffer->completion.position += strlen (cfg_look_completor);
|
||||
if (gui_current_window->buffer->completion.position >= 0)
|
||||
gui_current_window->buffer->completion.position += strlen (cfg_look_completor);
|
||||
gui_current_window->buffer->input_buffer_pos += strlen (cfg_look_completor);
|
||||
if (gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_pos] != ' ')
|
||||
gui_buffer_insert_string (gui_current_window->buffer,
|
||||
" ",
|
||||
gui_current_window->buffer->input_buffer_pos);
|
||||
gui_current_window->buffer->completion.position++;
|
||||
if (gui_current_window->buffer->completion.position >= 0)
|
||||
gui_current_window->buffer->completion.position++;
|
||||
gui_current_window->buffer->input_buffer_pos++;
|
||||
}
|
||||
}
|
||||
@@ -396,25 +420,38 @@ gui_read_keyb ()
|
||||
case KEY_RIGHT:
|
||||
gui_switch_to_next_buffer (gui_current_window);
|
||||
break;
|
||||
/* Alt + home */
|
||||
case KEY_HOME:
|
||||
gui_nick_move_beginning (gui_current_window);
|
||||
break;
|
||||
/* Alt + end */
|
||||
case KEY_END:
|
||||
gui_nick_move_end (gui_current_window);
|
||||
break;
|
||||
/* Alt + page up */
|
||||
case KEY_PPAGE:
|
||||
gui_nick_move_page_up (gui_current_window);
|
||||
break;
|
||||
/* Alt + page down */
|
||||
case KEY_NPAGE:
|
||||
gui_nick_move_page_down (gui_current_window);
|
||||
break;
|
||||
case 79:
|
||||
/* TODO: replace 79 by constant name! */
|
||||
if (key == 79)
|
||||
if ((key = getch()) != ERR)
|
||||
{
|
||||
if ((key = getch()) != ERR)
|
||||
switch (key)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
/* Control + Right */
|
||||
case 99:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_next_word (gui_current_window->buffer);
|
||||
break;
|
||||
/* Control + Left */
|
||||
case 100:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_previous_word (gui_current_window->buffer);
|
||||
break;
|
||||
}
|
||||
/* Control + Right */
|
||||
case 99:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_next_word (gui_current_window->buffer);
|
||||
break;
|
||||
/* Control + Left */
|
||||
case 100:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_previous_word (gui_current_window->buffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -482,33 +519,39 @@ gui_read_keyb ()
|
||||
/* Alt-S: jump to server buffer */
|
||||
case 's':
|
||||
case 'S':
|
||||
if (SERVER(gui_current_window->buffer)->buffer !=
|
||||
gui_current_window->buffer)
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
gui_switch_to_buffer (gui_current_window,
|
||||
SERVER(gui_current_window->buffer)->buffer);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
if (SERVER(gui_current_window->buffer)->buffer !=
|
||||
gui_current_window->buffer)
|
||||
{
|
||||
gui_switch_to_buffer (gui_current_window,
|
||||
SERVER(gui_current_window->buffer)->buffer);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* Alt-X: jump to first channel/private of next server */
|
||||
case 'x':
|
||||
case 'X':
|
||||
ptr_server = SERVER(gui_current_window->buffer)->next_server;
|
||||
if (!ptr_server)
|
||||
ptr_server = irc_servers;
|
||||
while (ptr_server != SERVER(gui_current_window->buffer))
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (ptr_server->buffer)
|
||||
break;
|
||||
ptr_server = (ptr_server->next_server) ?
|
||||
ptr_server->next_server : irc_servers;
|
||||
}
|
||||
if (ptr_server != SERVER(gui_current_window->buffer))
|
||||
{
|
||||
ptr_buffer = (ptr_server->channels) ?
|
||||
ptr_server->channels->buffer : ptr_server->buffer;
|
||||
gui_switch_to_buffer (gui_current_window, ptr_buffer);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
ptr_server = SERVER(gui_current_window->buffer)->next_server;
|
||||
if (!ptr_server)
|
||||
ptr_server = irc_servers;
|
||||
while (ptr_server != SERVER(gui_current_window->buffer))
|
||||
{
|
||||
if (ptr_server->buffer)
|
||||
break;
|
||||
ptr_server = (ptr_server->next_server) ?
|
||||
ptr_server->next_server : irc_servers;
|
||||
}
|
||||
if (ptr_server != SERVER(gui_current_window->buffer))
|
||||
{
|
||||
ptr_buffer = (ptr_server->channels) ?
|
||||
ptr_server->channels->buffer : ptr_server->buffer;
|
||||
gui_switch_to_buffer (gui_current_window, ptr_buffer);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -529,11 +572,13 @@ gui_read_keyb ()
|
||||
gui_current_window->buffer->ptr_history = NULL;
|
||||
ptr_buffer = gui_current_window->buffer;
|
||||
user_command (SERVER(gui_current_window->buffer),
|
||||
gui_current_window->buffer,
|
||||
gui_current_window->buffer->input_buffer);
|
||||
if (ptr_buffer == gui_current_window->buffer)
|
||||
gui_draw_buffer_input (ptr_buffer, 0);
|
||||
if (ptr_buffer)
|
||||
{
|
||||
ptr_buffer->input_buffer[0] = '\0';
|
||||
gui_draw_buffer_input (ptr_buffer, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -542,16 +587,15 @@ gui_read_keyb ()
|
||||
if (gui_current_window->buffer->dcc)
|
||||
{
|
||||
dcc_selected = (gui_current_window->dcc_selected) ?
|
||||
(t_dcc *) gui_current_window->dcc_selected : dcc_list;
|
||||
(t_irc_dcc *) gui_current_window->dcc_selected : dcc_list;
|
||||
switch (key)
|
||||
{
|
||||
/* accept DCC */
|
||||
case 'a':
|
||||
case 'A':
|
||||
if (dcc_selected
|
||||
&& (((dcc_selected->type == DCC_CHAT_RECV)
|
||||
|| (dcc_selected->type == DCC_FILE_RECV))
|
||||
&& (dcc_selected->status == DCC_WAITING)))
|
||||
&& (DCC_IS_RECV(dcc_selected->status))
|
||||
&& (dcc_selected->status == DCC_WAITING))
|
||||
{
|
||||
dcc_accept (dcc_selected);
|
||||
}
|
||||
@@ -560,29 +604,44 @@ gui_read_keyb ()
|
||||
case 'c':
|
||||
case 'C':
|
||||
if (dcc_selected
|
||||
&& ((dcc_selected->status == DCC_WAITING)
|
||||
|| (dcc_selected->status == DCC_CONNECTING)
|
||||
|| (dcc_selected->status == DCC_ACTIVE)))
|
||||
&& (!DCC_ENDED(dcc_selected->status)))
|
||||
{
|
||||
dcc_close (dcc_selected, DCC_ABORTED);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
break;
|
||||
/* purge old DCC */
|
||||
case 'p':
|
||||
case 'P':
|
||||
gui_current_window->dcc_selected = NULL;
|
||||
ptr_dcc = dcc_list;
|
||||
while (ptr_dcc)
|
||||
{
|
||||
ptr_dcc_next = ptr_dcc->next_dcc;
|
||||
if (DCC_ENDED(ptr_dcc->status))
|
||||
dcc_free (ptr_dcc);
|
||||
ptr_dcc = ptr_dcc_next;
|
||||
}
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
break;
|
||||
/* close DCC window */
|
||||
case 'q':
|
||||
case 'Q':
|
||||
gui_buffer_free (gui_current_window->buffer, 1);
|
||||
if (buffer_before_dcc)
|
||||
{
|
||||
gui_buffer_free (gui_current_window->buffer, 1);
|
||||
gui_switch_to_buffer (gui_current_window,
|
||||
buffer_before_dcc);
|
||||
}
|
||||
else
|
||||
gui_buffer_free (gui_current_window->buffer, 1);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
break;
|
||||
/* remove from DCC list */
|
||||
case 'r':
|
||||
case 'R':
|
||||
if (dcc_selected
|
||||
&& (((dcc_selected->type == DCC_CHAT_RECV)
|
||||
|| (dcc_selected->type == DCC_FILE_RECV))
|
||||
&& ((dcc_selected->status == DCC_DONE)
|
||||
|| (dcc_selected->status == DCC_FAILED)
|
||||
|| (dcc_selected->status == DCC_ABORTED))))
|
||||
&& (DCC_ENDED(dcc_selected->status)))
|
||||
{
|
||||
if (dcc_selected->next_dcc)
|
||||
gui_current_window->dcc_selected = dcc_selected->next_dcc;
|
||||
@@ -600,12 +659,28 @@ gui_read_keyb ()
|
||||
"[Debug] key pressed = %d, hex = %02X, octal = %o\n", key, key, key);*/
|
||||
new_char[0] = key;
|
||||
new_char[1] = '\0';
|
||||
decoded_string = NULL;
|
||||
|
||||
/* UTF-8 input */
|
||||
if (key == 0xC3)
|
||||
{
|
||||
if ((key = getch()) != ERR)
|
||||
{
|
||||
new_char[1] = key;
|
||||
new_char[2] = '\0';
|
||||
decoded_string = weechat_convert_encoding (local_charset, cfg_look_charset_internal, new_char);
|
||||
}
|
||||
}
|
||||
|
||||
gui_buffer_insert_string (gui_current_window->buffer,
|
||||
new_char,
|
||||
(decoded_string) ? decoded_string : new_char,
|
||||
gui_current_window->buffer->input_buffer_pos);
|
||||
gui_current_window->buffer->input_buffer_pos++;
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
gui_current_window->buffer->completion.position = -1;
|
||||
|
||||
if (decoded_string)
|
||||
free (decoded_string);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -620,15 +695,17 @@ void
|
||||
gui_main_loop ()
|
||||
{
|
||||
fd_set read_fd;
|
||||
static struct timeval timeout;
|
||||
static struct timeval timeout, tv;
|
||||
static struct timezone tz;
|
||||
t_irc_server *ptr_server;
|
||||
int old_min, old_sec;
|
||||
int old_min, old_sec, diff;
|
||||
time_t new_time;
|
||||
struct tm *local_time;
|
||||
|
||||
quit_weechat = 0;
|
||||
old_min = -1;
|
||||
old_sec = -1;
|
||||
check_away = 0;
|
||||
while (!quit_weechat)
|
||||
{
|
||||
new_time = time (NULL);
|
||||
@@ -641,22 +718,43 @@ gui_main_loop ()
|
||||
gui_draw_buffer_infobar (gui_current_window->buffer, 1);
|
||||
}
|
||||
|
||||
/* second has changed ? => count down time for infobar, if needed */
|
||||
/* second has changed ? */
|
||||
if (local_time->tm_sec != old_sec)
|
||||
{
|
||||
old_sec = local_time->tm_sec;
|
||||
|
||||
/* infobar count down */
|
||||
if (gui_infobar && gui_infobar->remaining_time > 0)
|
||||
{
|
||||
gui_infobar->remaining_time--;
|
||||
if (gui_infobar->remaining_time == 0)
|
||||
{
|
||||
gui_infobar_remove ();
|
||||
gui_draw_buffer_infobar (gui_current_window->buffer, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* away check */
|
||||
if (cfg_irc_away_check != 0)
|
||||
{
|
||||
check_away++;
|
||||
if (check_away >= (cfg_irc_away_check * 60))
|
||||
{
|
||||
check_away = 0;
|
||||
server_check_away ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FD_ZERO (&read_fd);
|
||||
|
||||
FD_SET (STDIN_FILENO, &read_fd);
|
||||
if (weechat_fifo != -1)
|
||||
FD_SET (weechat_fifo, &read_fd);
|
||||
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = 10000;
|
||||
FD_ZERO (&read_fd);
|
||||
FD_SET (STDIN_FILENO, &read_fd);
|
||||
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
@@ -666,22 +764,67 @@ gui_main_loop ()
|
||||
&& (new_time >= (ptr_server->reconnect_start + ptr_server->autoreconnect_delay)))
|
||||
server_reconnect (ptr_server);
|
||||
else
|
||||
if (ptr_server->sock4 >= 0)
|
||||
FD_SET (ptr_server->sock4, &read_fd);
|
||||
{
|
||||
if (ptr_server->is_connected)
|
||||
{
|
||||
/* check for lag */
|
||||
if ((ptr_server->lag_check_time.tv_sec == 0)
|
||||
&& (new_time >= ptr_server->lag_next_check))
|
||||
{
|
||||
server_sendf (ptr_server, "PING %s\r\n", ptr_server->address);
|
||||
gettimeofday (&(ptr_server->lag_check_time), &tz);
|
||||
}
|
||||
|
||||
/* lag timeout => disconnect */
|
||||
if ((ptr_server->lag_check_time.tv_sec != 0)
|
||||
&& (cfg_irc_lag_disconnect > 0))
|
||||
{
|
||||
gettimeofday (&tv, &tz);
|
||||
diff = (int) get_timeval_diff (&(ptr_server->lag_check_time), &tv);
|
||||
if (diff / 1000 > cfg_irc_lag_disconnect * 60)
|
||||
{
|
||||
irc_display_prefix (ptr_server->buffer, PREFIX_ERROR);
|
||||
gui_printf (ptr_server->buffer,
|
||||
_("%s lag is high, disconnecting from server...\n"),
|
||||
WEECHAT_WARNING);
|
||||
server_disconnect (ptr_server, 1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ptr_server->is_connected && (ptr_server->child_pid > 0))
|
||||
FD_SET (ptr_server->child_read, &read_fd);
|
||||
else
|
||||
{
|
||||
if (ptr_server->sock >= 0)
|
||||
FD_SET (ptr_server->sock, &read_fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (select (FD_SETSIZE, &read_fd, NULL, NULL, &timeout))
|
||||
|
||||
if (select (FD_SETSIZE, &read_fd, NULL, NULL, &timeout) > 0)
|
||||
{
|
||||
if (FD_ISSET (STDIN_FILENO, &read_fd))
|
||||
{
|
||||
gui_read_keyb ();
|
||||
}
|
||||
else
|
||||
if ((weechat_fifo != -1) && (FD_ISSET (weechat_fifo, &read_fd)))
|
||||
{
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
fifo_read ();
|
||||
}
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (!ptr_server->is_connected && (ptr_server->child_pid > 0))
|
||||
{
|
||||
if ((ptr_server->sock4 >= 0) &&
|
||||
(FD_ISSET (ptr_server->sock4, &read_fd)))
|
||||
if (FD_ISSET (ptr_server->child_read, &read_fd))
|
||||
server_child_read (ptr_server);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((ptr_server->sock >= 0) &&
|
||||
(FD_ISSET (ptr_server->sock, &read_fd)))
|
||||
server_recv (ptr_server);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,12 +19,11 @@ INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(GTK_CFLAGS)
|
||||
|
||||
bin_PROGRAMS = weechat-gtk
|
||||
|
||||
weechat_gtk_LDADD = ../../common/lib_weechat_main.a \
|
||||
weechat_gtk_LDADD = ../lib_weechat_gui_common.a \
|
||||
../../common/lib_weechat_main.a \
|
||||
../../irc/lib_weechat_irc.a \
|
||||
$(GTK_LIBS) \
|
||||
../../plugins/lib_weechat_plugins.a $(PLUGINS_LIBS)
|
||||
|
||||
weechat_gtk_SOURCES = ../gui.h \
|
||||
../gui-common.c \
|
||||
gui-display.c \
|
||||
weechat_gtk_SOURCES = gui-display.c \
|
||||
gui-input.c
|
||||
|
||||
+170
-14
@@ -43,6 +43,8 @@
|
||||
int gui_init_ok = 0; /* = 1 if GUI is initialized */
|
||||
int gui_ok = 0; /* = 1 if GUI is ok */
|
||||
/* (0 when term size too small) */
|
||||
int gui_add_hotlist = 1; /* 0 is for temporarly disable */
|
||||
/* hotlist add for all buffers */
|
||||
|
||||
t_gui_window *gui_windows = NULL; /* pointer to first window */
|
||||
t_gui_window *last_gui_window = NULL; /* pointer to last window */
|
||||
@@ -64,7 +66,7 @@ gui_window_new (int x, int y, int width, int height)
|
||||
t_gui_window *new_window;
|
||||
|
||||
#ifdef DEBUG
|
||||
wee_log_printf ("creating new window (x:%d, y:%d, width:%d, height:%d)\n",
|
||||
wee_log_printf ("Creating new window (x:%d, y:%d, width:%d, height:%d)\n",
|
||||
x, y, width, height);
|
||||
#endif
|
||||
if ((new_window = (t_gui_window *)(malloc (sizeof (t_gui_window)))))
|
||||
@@ -85,6 +87,7 @@ gui_window_new (int x, int y, int width, int height)
|
||||
new_window->win_nick_y = 0;
|
||||
new_window->win_nick_width = 0;
|
||||
new_window->win_nick_height = 0;
|
||||
new_window->win_nick_start = 0;
|
||||
|
||||
new_window->win_title = NULL;
|
||||
new_window->win_chat = NULL;
|
||||
@@ -135,7 +138,7 @@ gui_buffer_new (t_gui_window *window, void *server, void *channel, int dcc,
|
||||
t_gui_buffer *new_buffer;
|
||||
|
||||
#ifdef DEBUG
|
||||
wee_log_printf ("creating new buffer\n");
|
||||
wee_log_printf ("Creating new buffer\n");
|
||||
#endif
|
||||
|
||||
/* use first buffer if no server was assigned to this buffer */
|
||||
@@ -145,8 +148,8 @@ gui_buffer_new (t_gui_window *window, void *server, void *channel, int dcc,
|
||||
((t_irc_server *)(server))->buffer = gui_buffers;
|
||||
if (channel)
|
||||
((t_irc_channel *)(channel))->buffer = gui_buffers;
|
||||
SERVER(gui_buffers) = server;
|
||||
CHANNEL(gui_buffers) = channel;
|
||||
gui_buffers->server = server;
|
||||
gui_buffers->channel = channel;
|
||||
if (cfg_log_auto_server)
|
||||
log_start (gui_buffers);
|
||||
return gui_buffers;
|
||||
@@ -158,8 +161,8 @@ gui_buffer_new (t_gui_window *window, void *server, void *channel, int dcc,
|
||||
new_buffer->number = (last_gui_buffer) ? last_gui_buffer->number + 1 : 1;
|
||||
|
||||
/* assign server and channel to buffer */
|
||||
SERVER(new_buffer) = server;
|
||||
CHANNEL(new_buffer) = channel;
|
||||
new_buffer->server = server;
|
||||
new_buffer->channel = channel;
|
||||
new_buffer->dcc = dcc;
|
||||
/* assign buffer to server and channel */
|
||||
if (server && !channel)
|
||||
@@ -183,7 +186,7 @@ gui_buffer_new (t_gui_window *window, void *server, void *channel, int dcc,
|
||||
new_buffer->line_complete = 1;
|
||||
|
||||
/* notify level */
|
||||
new_buffer->notify_level = 3;
|
||||
new_buffer->notify_level = channel_get_notify_level (server, channel);
|
||||
|
||||
/* create/append to log file */
|
||||
new_buffer->log_filename = NULL;
|
||||
@@ -299,17 +302,22 @@ gui_infobar_printf (int time_displayed, int color, char *message, ...)
|
||||
static char buffer[1024];
|
||||
va_list argptr;
|
||||
t_gui_infobar *ptr_infobar;
|
||||
char *pos;
|
||||
char *pos, *buf2;
|
||||
|
||||
va_start (argptr, message);
|
||||
vsnprintf (buffer, sizeof (buffer) - 1, message, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
buf2 = weechat_convert_encoding (cfg_look_charset_decode,
|
||||
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
|
||||
cfg_look_charset_internal : local_charset,
|
||||
buffer);
|
||||
|
||||
ptr_infobar = (t_gui_infobar *)malloc (sizeof (t_gui_infobar));
|
||||
if (ptr_infobar)
|
||||
{
|
||||
ptr_infobar->color = color;
|
||||
ptr_infobar->text = strdup (buffer);
|
||||
ptr_infobar->text = strdup (buf2);
|
||||
pos = strchr (ptr_infobar->text, '\n');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
@@ -319,8 +327,32 @@ gui_infobar_printf (int time_displayed, int color, char *message, ...)
|
||||
gui_draw_buffer_infobar (gui_current_window->buffer, 1);
|
||||
}
|
||||
else
|
||||
wee_log_printf (_("%s not enough memory for infobar message\n"),
|
||||
WEECHAT_ERROR);
|
||||
wee_log_printf (_("Not enough memory for infobar message\n"));
|
||||
|
||||
free (buf2);
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_window_free: delete a window
|
||||
*/
|
||||
|
||||
void
|
||||
gui_window_free (t_gui_window *window)
|
||||
{
|
||||
if (window->buffer && (window->buffer->num_displayed > 0))
|
||||
window->buffer->num_displayed--;
|
||||
|
||||
/* remove window from windows list */
|
||||
if (window->prev_window)
|
||||
window->prev_window->next_window = window->next_window;
|
||||
if (window->next_window)
|
||||
window->next_window->prev_window = window->prev_window;
|
||||
if (gui_windows == window)
|
||||
gui_windows = window->next_window;
|
||||
if (last_gui_window == window)
|
||||
last_gui_window = window->prev_window;
|
||||
|
||||
free (window);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -339,7 +371,6 @@ gui_infobar_remove ()
|
||||
free (gui_infobar->text);
|
||||
free (gui_infobar);
|
||||
gui_infobar = new_infobar;
|
||||
gui_draw_buffer_infobar (gui_current_window->buffer, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,6 +412,9 @@ gui_buffer_free (t_gui_buffer *buffer, int switch_to_another)
|
||||
if (hotlist_initial_buffer == buffer)
|
||||
hotlist_initial_buffer = NULL;
|
||||
|
||||
if (buffer_before_dcc == buffer)
|
||||
buffer_before_dcc = NULL;
|
||||
|
||||
if (switch_to_another)
|
||||
{
|
||||
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
|
||||
@@ -414,6 +448,8 @@ gui_buffer_free (t_gui_buffer *buffer, int switch_to_another)
|
||||
|
||||
completion_free (&(buffer->completion));
|
||||
|
||||
history_buffer_free (buffer);
|
||||
|
||||
/* remove buffer from buffers list */
|
||||
if (buffer->prev_buffer)
|
||||
buffer->prev_buffer->next_buffer = buffer->next_buffer;
|
||||
@@ -424,6 +460,12 @@ gui_buffer_free (t_gui_buffer *buffer, int switch_to_another)
|
||||
if (last_gui_buffer == buffer)
|
||||
last_gui_buffer = buffer->prev_buffer;
|
||||
|
||||
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
|
||||
{
|
||||
if (ptr_win->buffer == buffer)
|
||||
ptr_win->buffer = NULL;
|
||||
}
|
||||
|
||||
free (buffer);
|
||||
|
||||
/* always at least one buffer */
|
||||
@@ -444,6 +486,7 @@ gui_new_line (t_gui_buffer *buffer)
|
||||
{
|
||||
new_line->length = 0;
|
||||
new_line->length_align = 0;
|
||||
new_line->log_write = 1;
|
||||
new_line->line_with_message = 0;
|
||||
new_line->line_with_highlight = 0;
|
||||
new_line->messages = NULL;
|
||||
@@ -459,7 +502,7 @@ gui_new_line (t_gui_buffer *buffer)
|
||||
}
|
||||
else
|
||||
{
|
||||
wee_log_printf (_("%s not enough memory for new line!\n"));
|
||||
wee_log_printf (_("Not enough memory for new line\n"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -502,7 +545,7 @@ gui_new_message (t_gui_buffer *buffer)
|
||||
}
|
||||
else
|
||||
{
|
||||
wee_log_printf (_("not enough memory!\n"));
|
||||
wee_log_printf (_("Not enough memory for new message\n"));
|
||||
return NULL;
|
||||
}
|
||||
return new_message;
|
||||
@@ -776,3 +819,116 @@ gui_move_buffer_to_number (t_gui_window *window, int number)
|
||||
|
||||
gui_redraw_buffer (window->buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_window_print_log: print window infos in log (usually for crash dump)
|
||||
*/
|
||||
|
||||
void
|
||||
gui_window_print_log (t_gui_window *window)
|
||||
{
|
||||
wee_log_printf ("[window (addr:0x%X)]\n", window);
|
||||
wee_log_printf (" win_x . . . . . . . : %d\n", window->win_x);
|
||||
wee_log_printf (" win_y . . . . . . . : %d\n", window->win_y);
|
||||
wee_log_printf (" win_width . . . . . : %d\n", window->win_width);
|
||||
wee_log_printf (" win_height. . . . . : %d\n", window->win_height);
|
||||
wee_log_printf (" win_chat_x. . . . . : %d\n", window->win_chat_x);
|
||||
wee_log_printf (" win_chat_y. . . . . : %d\n", window->win_chat_y);
|
||||
wee_log_printf (" win_chat_width. . . : %d\n", window->win_chat_width);
|
||||
wee_log_printf (" win_chat_height . . : %d\n", window->win_chat_height);
|
||||
wee_log_printf (" win_chat_cursor_x . : %d\n", window->win_chat_cursor_x);
|
||||
wee_log_printf (" win_chat_cursor_y . : %d\n", window->win_chat_cursor_y);
|
||||
wee_log_printf (" win_nick_x. . . . . : %d\n", window->win_nick_x);
|
||||
wee_log_printf (" win_nick_y. . . . . : %d\n", window->win_nick_y);
|
||||
wee_log_printf (" win_nick_width. . . : %d\n", window->win_nick_width);
|
||||
wee_log_printf (" win_nick_height . . : %d\n", window->win_nick_height);
|
||||
wee_log_printf (" win_nick_start. . . : %d\n", window->win_nick_start);
|
||||
wee_log_printf (" win_title . . . . . : 0x%X\n", window->win_title);
|
||||
wee_log_printf (" win_chat. . . . . . : 0x%X\n", window->win_chat);
|
||||
wee_log_printf (" win_nick. . . . . . : 0x%X\n", window->win_nick);
|
||||
wee_log_printf (" win_status. . . . . : 0x%X\n", window->win_status);
|
||||
wee_log_printf (" win_infobar . . . . : 0x%X\n", window->win_infobar);
|
||||
wee_log_printf (" win_input . . . . . : 0x%X\n", window->win_input);
|
||||
wee_log_printf (" win_separator . . . : 0x%X\n", window->win_separator);
|
||||
wee_log_printf (" textview_chat . . . : 0x%X\n", window->textview_chat);
|
||||
wee_log_printf (" textbuffer_chat . . : 0x%X\n", window->textbuffer_chat);
|
||||
wee_log_printf (" texttag_chat. . . . : 0x%X\n", window->texttag_chat);
|
||||
wee_log_printf (" textview_nicklist . : 0x%X\n", window->textview_nicklist);
|
||||
wee_log_printf (" textbuffer_nicklist : 0x%X\n", window->textbuffer_nicklist);
|
||||
wee_log_printf (" dcc_first . . . . . : 0x%X\n", window->dcc_first);
|
||||
wee_log_printf (" dcc_selected. . . . : 0x%X\n", window->dcc_selected);
|
||||
wee_log_printf (" dcc_last_displayed. : 0x%X\n", window->dcc_last_displayed);
|
||||
wee_log_printf (" buffer. . . . . . . : 0x%X\n", window->buffer);
|
||||
wee_log_printf (" first_line_displayed: %d\n", window->first_line_displayed);
|
||||
wee_log_printf (" sub_lines . . . . . : %d\n", window->sub_lines);
|
||||
wee_log_printf (" prev_window . . . . : 0x%X\n", window->prev_window);
|
||||
wee_log_printf (" next_window . . . . : 0x%X\n", window->next_window);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_buffer_print_log: print buffer infos in log (usually for crash dump)
|
||||
*/
|
||||
|
||||
void
|
||||
gui_buffer_print_log (t_gui_buffer *buffer)
|
||||
{
|
||||
t_gui_line *ptr_line;
|
||||
t_gui_message *ptr_message;
|
||||
int num;
|
||||
char buf[4096];
|
||||
|
||||
wee_log_printf ("[buffer (addr:0x%X)]\n", buffer);
|
||||
wee_log_printf (" num_displayed. . . . : %d\n", buffer->num_displayed);
|
||||
wee_log_printf (" number . . . . . . . : %d\n", buffer->number);
|
||||
wee_log_printf (" server . . . . . . . : 0x%X\n", buffer->server);
|
||||
wee_log_printf (" channel. . . . . . . : 0x%X\n", buffer->channel);
|
||||
wee_log_printf (" dcc. . . . . . . . . : %d\n", buffer->dcc);
|
||||
wee_log_printf (" lines. . . . . . . . : 0x%X\n", buffer->lines);
|
||||
wee_log_printf (" last_line. . . . . . : 0x%X\n", buffer->last_line);
|
||||
wee_log_printf (" num_lines. . . . . . : %d\n", buffer->num_lines);
|
||||
wee_log_printf (" line_complete. . . . : %d\n", buffer->line_complete);
|
||||
wee_log_printf (" notify_level . . . . : %d\n", buffer->notify_level);
|
||||
wee_log_printf (" log_filename . . . . : '%s'\n", buffer->log_filename);
|
||||
wee_log_printf (" log_file . . . . . . : 0x%X\n", buffer->log_file);
|
||||
wee_log_printf (" input_buffer . . . . : '%s'\n", buffer->input_buffer);
|
||||
wee_log_printf (" input_buffer_alloc . : %d\n", buffer->input_buffer_alloc);
|
||||
wee_log_printf (" input_buffer_size. . : %d\n", buffer->input_buffer_size);
|
||||
wee_log_printf (" input_buffer_pos . . : %d\n", buffer->input_buffer_pos);
|
||||
wee_log_printf (" input_buffer_1st_disp: %d\n", buffer->input_buffer_1st_display);
|
||||
wee_log_printf (" history. . . . . . . : 0x%X\n", buffer->history);
|
||||
wee_log_printf (" last_history . . . . : 0x%X\n", buffer->last_history);
|
||||
wee_log_printf (" ptr_history. . . . . : 0x%X\n", buffer->ptr_history);
|
||||
wee_log_printf (" prev_buffer. . . . . : 0x%X\n", buffer->prev_buffer);
|
||||
wee_log_printf (" next_buffer. . . . . : 0x%X\n", buffer->next_buffer);
|
||||
wee_log_printf ("\n");
|
||||
wee_log_printf (" => last 100 lines:\n");
|
||||
|
||||
num = 0;
|
||||
ptr_line = buffer->last_line;
|
||||
while (ptr_line && (num < 100))
|
||||
{
|
||||
num++;
|
||||
ptr_line = ptr_line->prev_line;
|
||||
}
|
||||
if (!ptr_line)
|
||||
ptr_line = buffer->lines;
|
||||
else
|
||||
ptr_line = ptr_line->next_line;
|
||||
|
||||
while (ptr_line)
|
||||
{
|
||||
buf[0] = '\0';
|
||||
for (ptr_message = ptr_line->messages; ptr_message;
|
||||
ptr_message = ptr_message->next_message)
|
||||
{
|
||||
if (strlen (buf) + strlen (ptr_message->message) + 1 >= sizeof (buf))
|
||||
break;
|
||||
strcat (buf, ptr_message->message);
|
||||
}
|
||||
num--;
|
||||
wee_log_printf (" line N-%05d: %s\n", num, buf);
|
||||
|
||||
ptr_line = ptr_line->next_line;
|
||||
}
|
||||
}
|
||||
|
||||
+64
-30
@@ -26,7 +26,7 @@
|
||||
|
||||
#define INPUT_BUFFER_BLOCK_SIZE 256
|
||||
|
||||
#define NUM_COLORS 46
|
||||
#define NUM_COLORS 50
|
||||
#define COLOR_WIN_TITLE 1
|
||||
#define COLOR_WIN_CHAT 2
|
||||
#define COLOR_WIN_CHAT_TIME 3
|
||||
@@ -50,22 +50,26 @@
|
||||
#define COLOR_WIN_INPUT_CHANNEL 21
|
||||
#define COLOR_WIN_INPUT_NICK 22
|
||||
#define COLOR_WIN_NICK 23
|
||||
#define COLOR_WIN_NICK_OP 24
|
||||
#define COLOR_WIN_NICK_HALFOP 25
|
||||
#define COLOR_WIN_NICK_VOICE 26
|
||||
#define COLOR_WIN_NICK_SEP 27
|
||||
#define COLOR_WIN_NICK_SELF 28
|
||||
#define COLOR_WIN_NICK_PRIVATE 29
|
||||
#define COLOR_WIN_NICK_FIRST 30
|
||||
#define COLOR_WIN_NICK_LAST 39
|
||||
#define COLOR_WIN_NICK_AWAY 24
|
||||
#define COLOR_WIN_NICK_CHANOWNER 25
|
||||
#define COLOR_WIN_NICK_CHANADMIN 26
|
||||
#define COLOR_WIN_NICK_OP 27
|
||||
#define COLOR_WIN_NICK_HALFOP 28
|
||||
#define COLOR_WIN_NICK_VOICE 29
|
||||
#define COLOR_WIN_NICK_MORE 30
|
||||
#define COLOR_WIN_NICK_SEP 31
|
||||
#define COLOR_WIN_NICK_SELF 32
|
||||
#define COLOR_WIN_NICK_PRIVATE 33
|
||||
#define COLOR_WIN_NICK_FIRST 34
|
||||
#define COLOR_WIN_NICK_LAST 43
|
||||
#define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1)
|
||||
#define COLOR_DCC_SELECTED 40
|
||||
#define COLOR_DCC_WAITING 41
|
||||
#define COLOR_DCC_CONNECTING 42
|
||||
#define COLOR_DCC_ACTIVE 43
|
||||
#define COLOR_DCC_DONE 44
|
||||
#define COLOR_DCC_FAILED 45
|
||||
#define COLOR_DCC_ABORTED 46
|
||||
#define COLOR_DCC_SELECTED 44
|
||||
#define COLOR_DCC_WAITING 45
|
||||
#define COLOR_DCC_CONNECTING 46
|
||||
#define COLOR_DCC_ACTIVE 47
|
||||
#define COLOR_DCC_DONE 48
|
||||
#define COLOR_DCC_FAILED 49
|
||||
#define COLOR_DCC_ABORTED 50
|
||||
|
||||
#define SERVER(buffer) ((t_irc_server *)(buffer->server))
|
||||
#define CHANNEL(buffer) ((t_irc_channel *)(buffer->channel))
|
||||
@@ -75,16 +79,28 @@
|
||||
#define BUFFER_IS_PRIVATE(buffer) (CHANNEL(buffer) && (CHANNEL(buffer)->type == CHAT_PRIVATE))
|
||||
|
||||
#define MSG_TYPE_TIME 1
|
||||
#define MSG_TYPE_NICK 2
|
||||
#define MSG_TYPE_INFO 4
|
||||
#define MSG_TYPE_MSG 8
|
||||
#define MSG_TYPE_HIGHLIGHT 16
|
||||
#define MSG_TYPE_PREFIX 2
|
||||
#define MSG_TYPE_NICK 4
|
||||
#define MSG_TYPE_INFO 8
|
||||
#define MSG_TYPE_MSG 16
|
||||
#define MSG_TYPE_HIGHLIGHT 32
|
||||
#define MSG_TYPE_NOLOG 64
|
||||
|
||||
#define gui_printf_color(buffer, color, fmt, argz...) \
|
||||
gui_printf_color_type(buffer, MSG_TYPE_INFO, color, fmt, ##argz)
|
||||
gui_printf_type_color(buffer, MSG_TYPE_INFO, color, fmt, ##argz)
|
||||
|
||||
#define gui_printf_type(buffer, type, fmt, argz...) \
|
||||
gui_printf_type_color(buffer, type, -1, fmt, ##argz)
|
||||
|
||||
#define gui_printf(buffer, fmt, argz...) \
|
||||
gui_printf_color_type(buffer, MSG_TYPE_INFO, -1, fmt, ##argz)
|
||||
gui_printf_type_color(buffer, MSG_TYPE_INFO, -1, fmt, ##argz)
|
||||
|
||||
#define gui_printf_nolog(buffer, fmt, argz...) \
|
||||
gui_printf_type_color(buffer, MSG_TYPE_INFO | MSG_TYPE_NOLOG, -1, fmt, ##argz)
|
||||
|
||||
#define NOTIFY_LEVEL_MIN 0
|
||||
#define NOTIFY_LEVEL_MAX 3
|
||||
#define NOTIFY_LEVEL_DEFAULT NOTIFY_LEVEL_MAX
|
||||
|
||||
typedef struct t_gui_message t_gui_message;
|
||||
|
||||
@@ -103,6 +119,7 @@ struct t_gui_line
|
||||
{
|
||||
int length; /* length of the line (in char) */
|
||||
int length_align; /* alignment length (time or time/nick) */
|
||||
int log_write; /* = 1 if line will be written to log */
|
||||
int line_with_message; /* line contains a message from a user? */
|
||||
int line_with_highlight; /* line contains highlight */
|
||||
t_gui_message *messages; /* messages for the line */
|
||||
@@ -197,9 +214,10 @@ struct t_gui_window
|
||||
int win_chat_cursor_y; /* position of cursor in chat window */
|
||||
|
||||
/* nicklist window settings */
|
||||
int win_nick_x, win_nick_y; /* chat window position */
|
||||
int win_nick_width; /* width of chat window */
|
||||
int win_nick_height; /* height of chat window */
|
||||
int win_nick_x, win_nick_y; /* nick window position */
|
||||
int win_nick_width; /* width of nick window */
|
||||
int win_nick_height; /* height of nick window */
|
||||
int win_nick_start; /* # of 1st nick for display (scroll) */
|
||||
|
||||
/* windows for Curses GUI */
|
||||
void *win_title; /* title window */
|
||||
@@ -238,6 +256,7 @@ struct t_gui_window
|
||||
|
||||
extern int gui_init_ok;
|
||||
extern int gui_ok;
|
||||
extern int gui_add_hotlist;
|
||||
extern t_gui_window *gui_windows;
|
||||
extern t_gui_window *last_gui_window;
|
||||
extern t_gui_window *gui_current_window;
|
||||
@@ -246,14 +265,14 @@ extern t_gui_buffer *last_gui_buffer;
|
||||
extern t_gui_buffer *buffer_before_dcc;
|
||||
extern t_gui_infobar *gui_infobar;
|
||||
|
||||
/* prototypes */
|
||||
|
||||
/* GUI independent functions */
|
||||
|
||||
extern t_gui_window *gui_window_new (int, int, int, int);
|
||||
extern t_gui_buffer *gui_buffer_new (t_gui_window *, void *, void *, int, int);
|
||||
extern void gui_buffer_clear (t_gui_buffer *);
|
||||
extern void gui_buffer_clear_all ();
|
||||
extern void gui_infobar_printf (int, int, char *, ...);
|
||||
extern void gui_window_free (t_gui_window *);
|
||||
extern void gui_infobar_remove ();
|
||||
extern void gui_buffer_free (t_gui_buffer *, int);
|
||||
extern t_gui_line *gui_new_line (t_gui_buffer *);
|
||||
@@ -265,7 +284,11 @@ extern void gui_move_next_word (t_gui_buffer *);
|
||||
extern void gui_buffer_insert_string (t_gui_buffer *, char *, int);
|
||||
extern t_gui_buffer *gui_switch_to_buffer_by_number (t_gui_window *, int);
|
||||
extern void gui_move_buffer_to_number (t_gui_window *, int);
|
||||
extern void gui_window_print_log (t_gui_window *);
|
||||
extern void gui_buffer_print_log (t_gui_buffer *);
|
||||
|
||||
/* GUI dependant functions */
|
||||
|
||||
extern int gui_assign_color (int *, char *);
|
||||
extern int gui_get_color_by_name (char *);
|
||||
extern char *gui_get_color_by_value (int);
|
||||
@@ -283,19 +306,30 @@ extern t_gui_buffer *gui_get_dcc_buffer ();
|
||||
extern void gui_switch_to_dcc_buffer ();
|
||||
extern void gui_switch_to_previous_buffer (t_gui_window *);
|
||||
extern void gui_switch_to_next_buffer (t_gui_window *);
|
||||
extern void gui_switch_to_previous_window (t_gui_window *);
|
||||
extern void gui_switch_to_next_window (t_gui_window *);
|
||||
extern void gui_move_page_up ();
|
||||
extern void gui_move_page_down ();
|
||||
extern void gui_move_page_up (t_gui_window *);
|
||||
extern void gui_move_page_down (t_gui_window *);
|
||||
extern void gui_nick_move_beginning (t_gui_window *);
|
||||
extern void gui_nick_move_end (t_gui_window *);
|
||||
extern void gui_nick_move_page_up (t_gui_window *);
|
||||
extern void gui_nick_move_page_down (t_gui_window *);
|
||||
extern void gui_curses_resize_handler ();
|
||||
extern void gui_window_init_subwindows (t_gui_window *);
|
||||
extern void gui_window_split_horiz (t_gui_window *);
|
||||
extern void gui_window_split_vertic (t_gui_window *);
|
||||
extern int gui_window_merge_up (t_gui_window *);
|
||||
extern int gui_window_merge_down (t_gui_window *);
|
||||
extern int gui_window_merge_left (t_gui_window *);
|
||||
extern int gui_window_merge_right (t_gui_window *);
|
||||
extern void gui_window_merge_auto (t_gui_window *);
|
||||
extern void gui_window_merge_all (t_gui_window *);
|
||||
extern void gui_pre_init (int *, char **[]);
|
||||
extern void gui_init_colors ();
|
||||
extern void gui_set_window_title ();
|
||||
extern void gui_init ();
|
||||
extern void gui_end ();
|
||||
extern void gui_printf_color_type (/*@null@*/ t_gui_buffer *, int, int, char *, ...);
|
||||
extern void gui_printf_type_color (/*@null@*/ t_gui_buffer *, int, int, char *, ...);
|
||||
extern void gui_main_loop ();
|
||||
|
||||
#endif /* gui.h */
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Copyright (c) 2003-2005 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.
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
|
||||
bin_PROGRAMS = weechat-wxwidgets
|
||||
|
||||
weechat_wxwidgets_LDADD = ../lib_weechat_gui_common.a \
|
||||
../../common/lib_weechat_main.a \
|
||||
../../irc/lib_weechat_irc.a \
|
||||
$(WXWIDGETS_LIBS) \
|
||||
../../plugins/lib_weechat_plugins.a $(PLUGINS_LIBS)
|
||||
|
||||
weechat_wxwidgets_SOURCES = gui-display.c \
|
||||
gui-input.c
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* gui-display.c: display functions for wxWidgets GUI */
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* gui-input: user input functions for wxWidgets GUI */
|
||||
@@ -25,10 +25,12 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../common/weechat.h"
|
||||
#include "irc.h"
|
||||
#include "../gui/gui.h"
|
||||
|
||||
|
||||
char *channel_modes = "iklmnst";
|
||||
@@ -53,12 +55,15 @@ channel_new (t_irc_server *server, int channel_type, char *channel_name,
|
||||
|
||||
/* initialize new channel */
|
||||
new_channel->type = channel_type;
|
||||
new_channel->dcc_chat = NULL;
|
||||
new_channel->name = strdup (channel_name);
|
||||
new_channel->topic = NULL;
|
||||
memset (new_channel->modes, ' ', sizeof (new_channel->modes));
|
||||
new_channel->modes[sizeof (new_channel->modes) - 1] = '\0';
|
||||
new_channel->limit = 0;
|
||||
new_channel->key = NULL;
|
||||
new_channel->nicks_count = 0;
|
||||
new_channel->checking_away = 0;
|
||||
new_channel->nicks = NULL;
|
||||
new_channel->last_nick = NULL;
|
||||
|
||||
@@ -100,6 +105,14 @@ channel_free (t_irc_server *server, t_irc_channel *channel)
|
||||
if (channel->next_channel)
|
||||
(channel->next_channel)->prev_channel = channel->prev_channel;
|
||||
|
||||
/* close DCC CHAT */
|
||||
if ((t_irc_dcc *)(channel->dcc_chat) &&
|
||||
(!DCC_ENDED(((t_irc_dcc *)(channel->dcc_chat))->status)))
|
||||
{
|
||||
dcc_close ((t_irc_dcc *)(channel->dcc_chat), DCC_ABORTED);
|
||||
dcc_redraw (1);
|
||||
}
|
||||
|
||||
/* free data */
|
||||
if (channel->name)
|
||||
free (channel->name);
|
||||
@@ -153,3 +166,251 @@ string_is_channel (char *string)
|
||||
first_char[1] = '\0';
|
||||
return (strpbrk (first_char, CHANNEL_PREFIX)) ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* channel_remove_away: remove away for all nicks on a channel
|
||||
*/
|
||||
|
||||
void
|
||||
channel_remove_away (t_irc_channel *channel)
|
||||
{
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
if (channel->type == CHAT_CHANNEL)
|
||||
{
|
||||
for (ptr_nick = channel->nicks; ptr_nick; ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
ptr_nick->is_away = 0;
|
||||
}
|
||||
gui_draw_buffer_nick (channel->buffer, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* channel_check_away: check for away on a channel
|
||||
*/
|
||||
|
||||
void
|
||||
channel_check_away (t_irc_server *server, t_irc_channel *channel)
|
||||
{
|
||||
if (channel->type == CHAT_CHANNEL)
|
||||
{
|
||||
channel->checking_away++;
|
||||
server_sendf (server, "WHO %s\r\n", channel->name);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* channel_set_away: set/unset away status for a channel
|
||||
*/
|
||||
|
||||
void
|
||||
channel_set_away (t_irc_channel *channel, char *nick, int is_away)
|
||||
{
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
if (channel->type == CHAT_CHANNEL)
|
||||
{
|
||||
ptr_nick = nick_search (channel, nick);
|
||||
if (ptr_nick)
|
||||
nick_set_away (channel, ptr_nick, is_away);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* channel_create_dcc: create DCC CHAT channel
|
||||
*/
|
||||
|
||||
int
|
||||
channel_create_dcc (t_irc_dcc *ptr_dcc)
|
||||
{
|
||||
t_irc_channel *ptr_channel;
|
||||
|
||||
ptr_channel = channel_search (ptr_dcc->server, ptr_dcc->nick);
|
||||
if (!ptr_channel)
|
||||
ptr_channel = channel_new (ptr_dcc->server, CHAT_PRIVATE,
|
||||
ptr_dcc->nick, 0);
|
||||
if (!ptr_channel)
|
||||
return 0;
|
||||
|
||||
if (ptr_channel->dcc_chat &&
|
||||
(!DCC_ENDED(((t_irc_dcc *)(ptr_channel->dcc_chat))->status)))
|
||||
return 0;
|
||||
|
||||
ptr_channel->dcc_chat = ptr_dcc;
|
||||
ptr_dcc->channel = ptr_channel;
|
||||
gui_redraw_buffer (ptr_channel->buffer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* channel_remove_dcc: remove a DCC CHAT
|
||||
*/
|
||||
|
||||
void
|
||||
channel_remove_dcc (t_irc_dcc *ptr_dcc)
|
||||
{
|
||||
t_irc_channel *ptr_channel;
|
||||
|
||||
for (ptr_channel = ptr_dcc->server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if ((t_irc_dcc *)(ptr_channel->dcc_chat) == ptr_dcc)
|
||||
{
|
||||
ptr_channel->dcc_chat = NULL;
|
||||
gui_redraw_buffer (ptr_channel->buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* channel_get_notify_level: get channel notify level
|
||||
*/
|
||||
|
||||
int
|
||||
channel_get_notify_level (t_irc_server *server, t_irc_channel *channel)
|
||||
{
|
||||
char *name, *pos, *pos2, notify;
|
||||
|
||||
if ((!server) || (!channel))
|
||||
return NOTIFY_LEVEL_DEFAULT;
|
||||
|
||||
if ((!server->notify_levels) || (!server->notify_levels[0]))
|
||||
return NOTIFY_LEVEL_DEFAULT;
|
||||
|
||||
name = (char *) malloc (strlen (channel->name) + 2);
|
||||
strcpy (name, channel->name);
|
||||
strcat (name, ":");
|
||||
pos = strstr (server->notify_levels, name);
|
||||
free (name);
|
||||
if (!pos)
|
||||
return NOTIFY_LEVEL_DEFAULT;
|
||||
|
||||
pos2 = pos + strlen (channel->name);
|
||||
if (pos2[0] != ':')
|
||||
return NOTIFY_LEVEL_DEFAULT;
|
||||
pos2++;
|
||||
if (!pos2[0])
|
||||
return NOTIFY_LEVEL_DEFAULT;
|
||||
|
||||
notify = (int)(pos2[0] - '0');
|
||||
if ((notify < NOTIFY_LEVEL_MIN) || (notify > NOTIFY_LEVEL_MAX))
|
||||
return NOTIFY_LEVEL_DEFAULT;
|
||||
else
|
||||
return notify;
|
||||
}
|
||||
|
||||
/*
|
||||
* server_remove_notify_level: remove channel notify from list
|
||||
*/
|
||||
|
||||
void
|
||||
channel_remove_notify_level (t_irc_server *server, t_irc_channel *channel)
|
||||
{
|
||||
char *name, *pos, *pos2;
|
||||
|
||||
if ((!server) || (!channel))
|
||||
return;
|
||||
|
||||
name = (char *) malloc (strlen (channel->name) + 2);
|
||||
strcpy (name, channel->name);
|
||||
strcat (name, ":");
|
||||
pos = strstr (server->notify_levels, name);
|
||||
free (name);
|
||||
if (pos)
|
||||
{
|
||||
pos2 = pos + strlen (channel->name);
|
||||
if (pos2[0] == ':')
|
||||
{
|
||||
pos2++;
|
||||
if (pos2[0])
|
||||
{
|
||||
pos2++;
|
||||
if (pos2[0] == ',')
|
||||
pos2++;
|
||||
if (!pos2[0] && (pos != server->notify_levels))
|
||||
pos--;
|
||||
strcpy (pos, pos2);
|
||||
server->notify_levels = (char *) realloc (server->notify_levels,
|
||||
strlen (server->notify_levels) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* server_set_notify_level: set channel notify level
|
||||
*/
|
||||
|
||||
void
|
||||
channel_set_notify_level (t_irc_server *server, t_irc_channel *channel, int notify)
|
||||
{
|
||||
char *name, *pos, *pos2, level_string[2];
|
||||
|
||||
if ((!server) || (!channel))
|
||||
return;
|
||||
|
||||
if (notify == NOTIFY_LEVEL_DEFAULT)
|
||||
{
|
||||
channel_remove_notify_level (server, channel);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!server->notify_levels)
|
||||
{
|
||||
server->notify_levels = (char *) malloc (strlen (channel->name) + 3);
|
||||
server->notify_levels[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
name = (char *) malloc (strlen (channel->name) + 2);
|
||||
strcpy (name, channel->name);
|
||||
strcat (name, ":");
|
||||
pos = strstr (server->notify_levels, name);
|
||||
free (name);
|
||||
if (pos)
|
||||
{
|
||||
pos2 = pos + strlen (channel->name) + 1;
|
||||
if (pos2[0])
|
||||
{
|
||||
pos2[0] = '0' + notify;
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* realloc notify list to add channel */
|
||||
server->notify_levels = (char *) realloc (server->notify_levels,
|
||||
strlen (server->notify_levels) + 1 +
|
||||
strlen (channel->name) + 2 + 1);
|
||||
}
|
||||
|
||||
/* channel not in notify list => add it */
|
||||
if (server->notify_levels[0])
|
||||
strcat (server->notify_levels, ",");
|
||||
strcat (server->notify_levels, channel->name);
|
||||
strcat (server->notify_levels, ":");
|
||||
level_string[0] = notify + '0';
|
||||
level_string[1] = '\0';
|
||||
strcat (server->notify_levels, level_string);
|
||||
}
|
||||
|
||||
/*
|
||||
* channel_print_log: print channel infos in log (usually for crash dump)
|
||||
*/
|
||||
|
||||
void
|
||||
channel_print_log (t_irc_channel *channel)
|
||||
{
|
||||
wee_log_printf ("=> channel %s (addr:0x%X)]\n", channel->name, channel);
|
||||
wee_log_printf (" type . . . . : %d\n", channel->type);
|
||||
wee_log_printf (" dcc_chat . . : 0x%X\n", channel->dcc_chat);
|
||||
wee_log_printf (" topic. . . . : '%s'\n", channel->topic);
|
||||
wee_log_printf (" modes. . . . : '%s'\n", channel->modes);
|
||||
wee_log_printf (" limit. . . . : %d\n", channel->limit);
|
||||
wee_log_printf (" key. . . . . : '%s'\n", channel->key);
|
||||
wee_log_printf (" checking_away: %d\n", channel->checking_away);
|
||||
wee_log_printf (" nicks. . . . : 0x%X\n", channel->nicks);
|
||||
wee_log_printf (" last_nick. . : 0x%X\n", channel->last_nick);
|
||||
wee_log_printf (" buffer . . . : 0x%X\n", channel->buffer);
|
||||
wee_log_printf (" prev_channel : 0x%X\n", channel->prev_channel);
|
||||
wee_log_printf (" next_channel : 0x%X\n", channel->next_channel);
|
||||
}
|
||||
|
||||
+56
-25
@@ -40,26 +40,36 @@ t_irc_command irc_commands[] =
|
||||
N_("-all: toggle away status on all connected servers\n"
|
||||
"message: message for away (if no message is given, away status is removed)"),
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_away, NULL },
|
||||
{ "ban", N_("bans nicks or hosts"),
|
||||
N_("[channel] [nickname [nickname ...]]"),
|
||||
N_("channel: channel for ban\nnickname: user or host to ban"),
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_ban, NULL },
|
||||
{ "ctcp", N_("send a ctcp message"),
|
||||
N_("nickname type"),
|
||||
N_("nickname: user to send ctcp to\ntype: \"action\" or \"version\""),
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_ctcp, NULL },
|
||||
{ "dcc", N_("starts DCC (file or chat)"),
|
||||
N_("action nickname [file]"),
|
||||
N_("action: 'send' (file) or 'chat'\n"
|
||||
{ "dcc", N_("starts DCC (file or chat) or close chat"),
|
||||
N_("action [nickname [file]]"),
|
||||
N_("action: 'send' (file) or 'chat' or 'close' (chat)\n"
|
||||
"nickname: nickname to send file or chat\n"
|
||||
"file: filename (on local host)"),
|
||||
2, 3, 1, NULL, irc_cmd_send_dcc, NULL },
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_dcc, NULL },
|
||||
{ "dehalfop", N_("removes half channel operator status from nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, MAX_ARGS, 1, irc_cmd_send_dehalfop, NULL, NULL },
|
||||
{ "deop", N_("removes channel operator status from nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, 1, 1, irc_cmd_send_deop, NULL, NULL },
|
||||
1, MAX_ARGS, 1, irc_cmd_send_deop, NULL, NULL },
|
||||
{ "devoice", N_("removes voice from nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, 1, 1, irc_cmd_send_devoice, NULL, NULL },
|
||||
1, MAX_ARGS, 1, irc_cmd_send_devoice, NULL, NULL },
|
||||
{ "die", N_("shutdown the server"),
|
||||
"", "",
|
||||
0, 0, 1, NULL, irc_cmd_send_die, NULL },
|
||||
{ "error", N_("error received from IRC server"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "halfop", N_("gives half channel operator status to nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, MAX_ARGS, 1, irc_cmd_send_halfop, NULL, NULL },
|
||||
{ "info", N_("get information describing the server"),
|
||||
N_("[target]"),
|
||||
N_("target: server name"),
|
||||
@@ -67,7 +77,7 @@ t_irc_command irc_commands[] =
|
||||
{ "invite", N_("invite a nick on a channel"),
|
||||
N_("nickname channel"),
|
||||
N_("nickname: nick to invite\nchannel: channel to invite"),
|
||||
2, 2, 1, NULL, irc_cmd_send_invite, NULL },
|
||||
1, 2, 1, irc_cmd_send_invite, NULL, irc_cmd_recv_invite },
|
||||
{ "ison", N_("check if a nickname is currently on IRC"),
|
||||
N_("nickname [nickname ...]"),
|
||||
N_("nickname: nickname"),
|
||||
@@ -80,20 +90,24 @@ t_irc_command irc_commands[] =
|
||||
N_("[channel] nickname [comment]"),
|
||||
N_("channel: channel where user is\nnickname: nickname to kick\ncomment: comment for kick"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_kick, irc_cmd_recv_kick },
|
||||
{ "kickban", N_("kicks and bans a nick from a channel"),
|
||||
N_("[channel] nickname [comment]"),
|
||||
N_("channel: channel where user is\nnickname: nickname to kick and ban\ncomment: comment for kick"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_kickban, NULL },
|
||||
{ "kill", N_("close client-server connection"),
|
||||
N_("nickname comment"),
|
||||
N_("nickname: nickname\ncomment: comment for kill"),
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_kill, NULL },
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_kill, irc_cmd_recv_kill },
|
||||
{ "links", N_("list all servernames which are known by the server answering the query"),
|
||||
N_("[[remove_server] server_mask]"),
|
||||
N_("remote_server: this server should answer the query\n"
|
||||
N_("[[server] server_mask]"),
|
||||
N_("server: this server should answer the query\n"
|
||||
"server_mask: list of servers must match this mask"),
|
||||
0, 2, 1, NULL, irc_cmd_send_links, NULL },
|
||||
{ "list", N_("list channels and their topic"),
|
||||
N_("[channel[,channel] [server]]"),
|
||||
N_("channel: channel to list\nserver: server name"),
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_list, NULL },
|
||||
{ "lusers", N_("get statistics about ths size of the IRC network"),
|
||||
{ "lusers", N_("get statistics about the size of the IRC network"),
|
||||
N_("[mask [target]]"),
|
||||
N_("mask: servers matching the mask only\n"
|
||||
"target: server for forwarding request"),
|
||||
@@ -101,10 +115,10 @@ t_irc_command irc_commands[] =
|
||||
{ "me", N_("send a ctcp action to the current channel"),
|
||||
N_("message"),
|
||||
N_("message: message to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_me, NULL },
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_me, NULL },
|
||||
{ "mode", N_("change channel or user mode"),
|
||||
N_("{ channel {[+|-]|o|p|s|i|t|n|b|v} [limit] [user] [ban mask] } | "
|
||||
"{ nickname {[+|-]|i|w|s|o}"),
|
||||
"{ nickname {[+|-]|i|w|s|o} }"),
|
||||
N_("channel modes:\n"
|
||||
" channel: channel name to modify\n"
|
||||
" o: give/take channel operator privileges\n"
|
||||
@@ -123,7 +137,7 @@ t_irc_command irc_commands[] =
|
||||
" i: mark a user as invisible\n"
|
||||
" s: mark a user for receive server notices\n"
|
||||
" w: user receives wallops\n"
|
||||
" o: operator flag\n"),
|
||||
" o: operator flag"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_mode, irc_cmd_recv_mode },
|
||||
{ "motd", N_("get the \"Message Of The Day\""),
|
||||
N_("[target]"),
|
||||
@@ -136,16 +150,18 @@ t_irc_command irc_commands[] =
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_msg, NULL },
|
||||
{ "names", N_("list nicknames on channels"),
|
||||
N_("[channel[,channel]]"), N_("channel: channel name"),
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_names, NULL },
|
||||
0, 1, 1, NULL, irc_cmd_send_names, NULL },
|
||||
{ "nick", N_("change current nickname"),
|
||||
N_("nickname"), N_("nickname: new nickname for current IRC server"),
|
||||
1, 1, 1, irc_cmd_send_nick, NULL, irc_cmd_recv_nick },
|
||||
N_("[-all] nickname"),
|
||||
N_("-all: set new nickname for all connected servers\n"
|
||||
"nickname: new nickname"),
|
||||
1, 2, 1, irc_cmd_send_nick, NULL, irc_cmd_recv_nick },
|
||||
{ "notice", N_("send notice message to user"),
|
||||
N_("nickname text"), N_("nickname: user to send notice to\ntext: text to send"),
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_notice, irc_cmd_recv_notice },
|
||||
{ "op", N_("gives channel operator status to nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, 1, 1, irc_cmd_send_op, NULL, NULL },
|
||||
1, MAX_ARGS, 1, irc_cmd_send_op, NULL, NULL },
|
||||
{ "oper", N_("get operator privileges"),
|
||||
N_("user password"),
|
||||
N_("user/password: used to get privileges on current IRC server"),
|
||||
@@ -161,7 +177,7 @@ t_irc_command irc_commands[] =
|
||||
{ "pong", N_("answer to a ping message"),
|
||||
N_("daemon [daemon2]"), N_("daemon: daemon who has responded to Ping message\n"
|
||||
"daemon2: forward message to this daemon"),
|
||||
1, 2, 1, NULL, irc_cmd_send_pong, NULL },
|
||||
1, 2, 1, NULL, irc_cmd_send_pong, irc_cmd_recv_pong },
|
||||
{ "privmsg", N_("message received"),
|
||||
"", "",
|
||||
0, 0, 1, NULL, NULL, irc_cmd_recv_privmsg },
|
||||
@@ -170,7 +186,7 @@ t_irc_command irc_commands[] =
|
||||
N_("nickname: nickname for private conversation"
|
||||
"\ntext: text to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_query, NULL },
|
||||
{ "quit", N_("close all connections & quit " PACKAGE_NAME),
|
||||
{ "quit", N_("close all connections & quit"),
|
||||
N_("[quit_message]"),
|
||||
N_("quit_message: quit message (displayed to other users)"),
|
||||
0, MAX_ARGS, 0, NULL, irc_cmd_send_quit, irc_cmd_recv_quit },
|
||||
@@ -197,7 +213,7 @@ t_irc_command irc_commands[] =
|
||||
N_("service text"), N_("service: name of service\ntext: text to send"),
|
||||
2, 2, 1, NULL, irc_cmd_send_squery, NULL },
|
||||
{ "squit", N_("disconnect server links"),
|
||||
N_("server commnent"), N_("server: server name\ncomment: comment for quit"),
|
||||
N_("server comment"), N_("server: server name\ncomment: comment for quit"),
|
||||
2, 2, 1, NULL, irc_cmd_send_squit, NULL },
|
||||
{ "stats", N_("query statistics about server"),
|
||||
N_("[query [server]]"),
|
||||
@@ -218,6 +234,10 @@ t_irc_command irc_commands[] =
|
||||
{ "trace", N_("find the route to specific server"),
|
||||
N_("[target]"), N_("target: server"),
|
||||
0, 1, 1, NULL, irc_cmd_send_trace, NULL },
|
||||
{ "unban", N_("unbans nicks or hosts"),
|
||||
N_("[channel] nickname [nickname ...]"),
|
||||
N_("channel: channel for unban\nnickname: user or host to unban"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_unban, NULL },
|
||||
{ "userhost", N_("return a list of information about nicknames"),
|
||||
N_("nickname [nickname ...]"), N_("nickname: nickname"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_userhost, NULL },
|
||||
@@ -229,14 +249,14 @@ t_irc_command irc_commands[] =
|
||||
0, 1, 1, NULL, irc_cmd_send_version, NULL },
|
||||
{ "voice", N_("gives voice to nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, 1, 1, irc_cmd_send_voice, NULL, NULL },
|
||||
1, MAX_ARGS, 1, irc_cmd_send_voice, NULL, NULL },
|
||||
{ "wallops", N_("send a message to all currently connected users who have "
|
||||
"set the 'w' user mode for themselves"),
|
||||
N_("text"), N_("text to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_wallops, NULL },
|
||||
{ "who", N_("generate a query which returns a list of information"),
|
||||
N_("[mask [\"o\"]]"), N_("mask: only information which match this mask\n"
|
||||
"o: only operators are returned according to the mask supplied\n"),
|
||||
"o: only operators are returned according to the mask supplied"),
|
||||
0, 2, 1, NULL, irc_cmd_send_who, NULL },
|
||||
{ "whois", N_("query information about user(s)"),
|
||||
N_("[server] nickname[,nickname]"), N_("server: server name\n"
|
||||
@@ -280,11 +300,12 @@ t_irc_command irc_commands[] =
|
||||
{ "303", N_("ison"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_303 },
|
||||
{ "305", N_("unaway"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_305 },
|
||||
{ "306", N_("now away"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_306 },
|
||||
{ "307", N_("whois (registered nick)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_307 },
|
||||
{ "311", N_("whois (user)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_311 },
|
||||
{ "312", N_("whois (server)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_312 },
|
||||
{ "313", N_("whois (operator)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_313 },
|
||||
{ "314", N_("whowas"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_314 },
|
||||
{ "315", N_("end of /who list"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "315", N_("end of /who list"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_315 },
|
||||
{ "317", N_("whois (idle)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_317 },
|
||||
{ "318", N_("whois (end)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_318 },
|
||||
{ "319", N_("whois (channels)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_319 },
|
||||
@@ -302,6 +323,7 @@ t_irc_command irc_commands[] =
|
||||
{ "333", N_("infos about topic (nick & date changed)"),
|
||||
"", "",
|
||||
0, 0, 1, NULL, NULL, irc_cmd_recv_333 },
|
||||
{ "341", N_("inviting"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_341 },
|
||||
{ "351", N_("server version"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_351 },
|
||||
{ "352", N_("who"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_352 },
|
||||
{ "353", N_("list of nicks on channel"),
|
||||
@@ -311,6 +333,8 @@ t_irc_command irc_commands[] =
|
||||
{ "364", N_("links"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "365", N_("end of /links list"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "366", N_("end of /names list"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_366 },
|
||||
{ "367", N_("banlist"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_367 },
|
||||
{ "368", N_("end of banlist"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_368 },
|
||||
{ "369", N_("end of /whowas list"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "371", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "372", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
@@ -337,6 +361,8 @@ t_irc_command irc_commands[] =
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "409", N_("no origin"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "410", N_("no services"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "411", N_("no recipient"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "412", N_("no text to send"),
|
||||
@@ -355,12 +381,14 @@ t_irc_command irc_commands[] =
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "431", N_("no nickname given"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "432", N_("erroneus nickname"),
|
||||
{ "432", N_("erroneous nickname"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "433", N_("nickname already in use"),
|
||||
"", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_433 },
|
||||
{ "436", N_("nickname collision"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "438", N_("not authorized to change nickname"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_438 },
|
||||
{ "441", N_("user not in channel"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "442", N_("not on channel"),
|
||||
@@ -407,11 +435,14 @@ t_irc_command irc_commands[] =
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "483", N_("you can't kill a server!"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "485", N_("user is immune from kick/deop"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "491", N_("no O-lines for your host"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "501", N_("unknown mode flag"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "502", N_("can't change mode for other users"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "671", N_("whois (secure connection)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_671 },
|
||||
{ NULL, NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
+822
-150
File diff suppressed because it is too large
Load Diff
+116
-34
@@ -43,11 +43,18 @@
|
||||
void
|
||||
irc_display_prefix (t_gui_buffer *buffer, char *prefix)
|
||||
{
|
||||
int type;
|
||||
|
||||
type = MSG_TYPE_INFO | MSG_TYPE_PREFIX;
|
||||
|
||||
if (!cfg_log_plugin_msg && (prefix == PREFIX_PLUGIN))
|
||||
type |= MSG_TYPE_NOLOG;
|
||||
|
||||
if (prefix[0] == prefix[2])
|
||||
{
|
||||
gui_printf_color (buffer, COLOR_WIN_CHAT_PREFIX1, "%c", prefix[0]);
|
||||
gui_printf_color (buffer, COLOR_WIN_CHAT_PREFIX2, "%c", prefix[1]);
|
||||
gui_printf_color (buffer, COLOR_WIN_CHAT_PREFIX1, "%c ", prefix[2]);
|
||||
gui_printf_type_color (buffer, type, COLOR_WIN_CHAT_PREFIX1, "%c", prefix[0]);
|
||||
gui_printf_type_color (buffer, type, COLOR_WIN_CHAT_PREFIX2, "%c", prefix[1]);
|
||||
gui_printf_type_color (buffer, type, COLOR_WIN_CHAT_PREFIX1, "%c ", prefix[2]);
|
||||
}
|
||||
else
|
||||
gui_printf_color (buffer, COLOR_WIN_CHAT_PREFIX1, "%s ", prefix);
|
||||
@@ -59,55 +66,59 @@ irc_display_prefix (t_gui_buffer *buffer, char *prefix)
|
||||
*/
|
||||
|
||||
void
|
||||
irc_display_nick (t_gui_buffer *buffer, t_irc_nick *nick, int message_type,
|
||||
int display_around, int color_nick, int no_nickmode)
|
||||
irc_display_nick (t_gui_buffer *buffer, t_irc_nick *nick, char *nickname,
|
||||
int message_type, int display_around, int color_nick, int no_nickmode)
|
||||
{
|
||||
if (display_around)
|
||||
gui_printf_color_type (buffer,
|
||||
message_type, COLOR_WIN_CHAT_DARK, "<");
|
||||
if (cfg_look_nickmode)
|
||||
gui_printf_type_color (buffer,
|
||||
message_type, COLOR_WIN_CHAT_DARK,
|
||||
(nick) ? "<" : ">");
|
||||
if (nick && cfg_look_nickmode)
|
||||
{
|
||||
if (nick->is_op)
|
||||
gui_printf_color_type (buffer,
|
||||
if (nick->is_chanowner)
|
||||
gui_printf_type_color (buffer,
|
||||
message_type,
|
||||
COLOR_WIN_NICK_OP, "~");
|
||||
else if (nick->is_chanadmin)
|
||||
gui_printf_type_color (buffer,
|
||||
message_type,
|
||||
COLOR_WIN_NICK_OP, "&");
|
||||
else if (nick->is_op)
|
||||
gui_printf_type_color (buffer,
|
||||
message_type,
|
||||
COLOR_WIN_NICK_OP, "@");
|
||||
else if (nick->is_halfop)
|
||||
gui_printf_type_color (buffer,
|
||||
message_type,
|
||||
COLOR_WIN_NICK_HALFOP, "%%");
|
||||
else if (nick->has_voice)
|
||||
gui_printf_type_color (buffer,
|
||||
message_type,
|
||||
COLOR_WIN_NICK_VOICE, "+");
|
||||
else
|
||||
{
|
||||
if (nick->is_halfop)
|
||||
gui_printf_color_type (buffer,
|
||||
if (cfg_look_nickmode_empty && !no_nickmode)
|
||||
gui_printf_type_color (buffer,
|
||||
message_type,
|
||||
COLOR_WIN_NICK_HALFOP, "%%");
|
||||
else
|
||||
{
|
||||
if (nick->has_voice)
|
||||
gui_printf_color_type (buffer,
|
||||
message_type,
|
||||
COLOR_WIN_NICK_VOICE, "+");
|
||||
else
|
||||
if (cfg_look_nickmode_empty && !no_nickmode)
|
||||
gui_printf_color_type (buffer,
|
||||
message_type,
|
||||
COLOR_WIN_CHAT, " ");
|
||||
}
|
||||
}
|
||||
COLOR_WIN_CHAT, " ");
|
||||
}
|
||||
if (color_nick < 0)
|
||||
gui_printf_color_type (buffer,
|
||||
gui_printf_type_color (buffer,
|
||||
message_type,
|
||||
COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
"%s", nick->nick);
|
||||
"%s", (nick) ? nick->nick : nickname);
|
||||
else
|
||||
gui_printf_color_type (buffer,
|
||||
gui_printf_type_color (buffer,
|
||||
message_type,
|
||||
(color_nick) ?
|
||||
(nick && color_nick) ?
|
||||
((cfg_look_color_nicks) ?
|
||||
nick->color : COLOR_WIN_CHAT) :
|
||||
COLOR_WIN_CHAT,
|
||||
"%s", nick->nick);
|
||||
"%s", (nick) ? nick->nick : nickname);
|
||||
|
||||
if (display_around)
|
||||
gui_printf_color_type (buffer,
|
||||
message_type, COLOR_WIN_CHAT_DARK, "> ");
|
||||
gui_printf_type_color (buffer,
|
||||
message_type, COLOR_WIN_CHAT_DARK,
|
||||
(nick) ? "> " : "< ");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -133,3 +144,74 @@ irc_display_mode (t_gui_buffer *buffer, char *channel_name, char set_flag,
|
||||
else
|
||||
gui_printf_color (buffer, COLOR_WIN_CHAT, " %s\n", message);
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_display_server: display server description
|
||||
*/
|
||||
|
||||
void
|
||||
irc_display_server (t_irc_server *server)
|
||||
{
|
||||
gui_printf (NULL, "\n");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT, _("Server: "));
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, "%s", server->name);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, " [");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT, "%s",
|
||||
(server->is_connected) ?
|
||||
_("connected") : _("not connected"));
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "]\n");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_autoconnect : %s%s\n",
|
||||
(server->autoconnect) ? _("yes") : _("no"),
|
||||
(server->command_line) ?
|
||||
_(" (temporary server, will not be saved)") : "");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_autoreconnect . . .: %s\n",
|
||||
(server->autoreconnect) ? _("yes") : _("no"));
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_autoreconnect_delay: %d seconds\n",
|
||||
server->autoreconnect_delay);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_address . . . . . .: %s\n",
|
||||
server->address);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_port . . . . . . .: %d\n",
|
||||
server->port);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_ipv6 . . . . . . .: %s\n",
|
||||
(server->ipv6) ? _("yes") : _("no"));
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_ssl . . . . . . . .: %s\n",
|
||||
(server->ssl) ? _("yes") : _("no"));
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_password . . . . .: %s\n",
|
||||
(server->password && server->password[0]) ?
|
||||
_("(hidden)") : "");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_nick1/2/3 . . . . .: %s", server->nick1);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, " / ");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT, "%s", server->nick2);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, " / ");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT, "%s\n", server->nick3);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_username . . . . .: %s\n",
|
||||
server->username);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_realname . . . . .: %s\n",
|
||||
server->realname);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_command . . . . . .: %s\n",
|
||||
(server->command && server->command[0]) ?
|
||||
server->command : "");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_command_delay . . .: %d seconds\n",
|
||||
server->command_delay);
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_autojoin . . . . .: %s\n",
|
||||
(server->autojoin && server->autojoin[0]) ?
|
||||
server->autojoin : "");
|
||||
gui_printf_color (NULL, COLOR_WIN_CHAT,
|
||||
" server_notify_levels . . .: %s\n",
|
||||
(server->notify_levels && server->notify_levels[0]) ?
|
||||
server->notify_levels : "");
|
||||
}
|
||||
|
||||
+71
-6
@@ -51,6 +51,26 @@ nick_find_color (t_irc_nick *nick)
|
||||
return COLOR_WIN_NICK_FIRST + color;
|
||||
}
|
||||
|
||||
/*
|
||||
* nick_score_for_sort: return score for sorting nick, according to privileges
|
||||
*/
|
||||
|
||||
int
|
||||
nick_score_for_sort (t_irc_nick *nick)
|
||||
{
|
||||
if (nick->is_chanowner)
|
||||
return -32;
|
||||
if (nick->is_chanadmin)
|
||||
return -16;
|
||||
if (nick->is_op)
|
||||
return -8;
|
||||
if (nick->is_halfop)
|
||||
return -4;
|
||||
if (nick->has_voice)
|
||||
return -2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* nick_compare: compare two nicks
|
||||
* return: -1 is nick1 < nick2
|
||||
@@ -64,8 +84,8 @@ nick_compare (t_irc_nick *nick1, t_irc_nick *nick2)
|
||||
{
|
||||
int score1, score2, comp;
|
||||
|
||||
score1 = - ( (nick1->is_op * 8) + (nick1->is_halfop * 4) + (nick1->has_voice * 2));
|
||||
score2 = - ( (nick2->is_op * 8) + (nick2->is_halfop * 4) + (nick2->has_voice * 2));
|
||||
score1 = nick_score_for_sort (nick1);
|
||||
score2 = nick_score_for_sort (nick2);
|
||||
|
||||
comp = strcasecmp(nick1->nick, nick2->nick);
|
||||
if (comp > 0)
|
||||
@@ -149,7 +169,8 @@ nick_insert_sorted (t_irc_channel *channel, t_irc_nick *nick)
|
||||
|
||||
t_irc_nick *
|
||||
nick_new (t_irc_channel *channel, char *nick_name,
|
||||
int is_op, int is_halfop, int has_voice)
|
||||
int is_chanowner, int is_chanadmin, int is_op, int is_halfop,
|
||||
int has_voice)
|
||||
{
|
||||
t_irc_nick *new_nick;
|
||||
|
||||
@@ -157,6 +178,8 @@ nick_new (t_irc_channel *channel, char *nick_name,
|
||||
if ((new_nick = nick_search (channel, nick_name)))
|
||||
{
|
||||
/* update nick */
|
||||
new_nick->is_chanowner = is_chanowner;
|
||||
new_nick->is_chanadmin = is_chanadmin;
|
||||
new_nick->is_op = is_op;
|
||||
new_nick->is_halfop = is_halfop;
|
||||
new_nick->has_voice = has_voice;
|
||||
@@ -173,9 +196,12 @@ nick_new (t_irc_channel *channel, char *nick_name,
|
||||
|
||||
/* initialize new nick */
|
||||
new_nick->nick = strdup (nick_name);
|
||||
new_nick->is_chanowner = is_chanowner;
|
||||
new_nick->is_chanadmin = is_chanadmin;
|
||||
new_nick->is_op = is_op;
|
||||
new_nick->is_halfop = is_halfop;
|
||||
new_nick->has_voice = has_voice;
|
||||
new_nick->is_away = 0;
|
||||
if (strcasecmp (new_nick->nick, SERVER(channel->buffer)->nick) == 0)
|
||||
new_nick->color = COLOR_WIN_NICK_SELF;
|
||||
else
|
||||
@@ -183,6 +209,8 @@ nick_new (t_irc_channel *channel, char *nick_name,
|
||||
|
||||
nick_insert_sorted (channel, new_nick);
|
||||
|
||||
channel->nicks_count++;
|
||||
|
||||
/* all is ok, return address of new nick */
|
||||
return new_nick;
|
||||
}
|
||||
@@ -255,6 +283,8 @@ nick_free (t_irc_channel *channel, t_irc_nick *nick)
|
||||
if (nick->next_nick)
|
||||
(nick->next_nick)->prev_nick = nick->prev_nick;
|
||||
|
||||
channel->nicks_count--;
|
||||
|
||||
/* free data */
|
||||
if (nick->nick)
|
||||
free (nick->nick);
|
||||
@@ -272,6 +302,9 @@ nick_free_all (t_irc_channel *channel)
|
||||
/* remove all nicks for the channel */
|
||||
while (channel->nicks)
|
||||
nick_free (channel, channel->nicks);
|
||||
|
||||
/* sould be zero, but prevent any bug :D */
|
||||
channel->nicks_count = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -311,7 +344,7 @@ nick_count (t_irc_channel *channel, int *total, int *count_op,
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
(*total)++;
|
||||
if (ptr_nick->is_op)
|
||||
if ((ptr_nick->is_chanowner) || (ptr_nick->is_chanadmin) || (ptr_nick->is_op))
|
||||
(*count_op)++;
|
||||
else
|
||||
{
|
||||
@@ -339,8 +372,7 @@ nick_get_max_length (t_irc_channel *channel)
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
max_length = 0;
|
||||
for (ptr_nick = channel->nicks; ptr_nick;
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
for (ptr_nick = channel->nicks; ptr_nick; ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
length = strlen (ptr_nick->nick);
|
||||
if (length > max_length)
|
||||
@@ -348,3 +380,36 @@ nick_get_max_length (t_irc_channel *channel)
|
||||
}
|
||||
return max_length;
|
||||
}
|
||||
|
||||
/*
|
||||
* nick_set_away: set/unset away status for a channel
|
||||
*/
|
||||
|
||||
void
|
||||
nick_set_away (t_irc_channel *channel, t_irc_nick *nick, int is_away)
|
||||
{
|
||||
if (nick->is_away != is_away)
|
||||
{
|
||||
nick->is_away = is_away;
|
||||
gui_draw_buffer_nick (channel->buffer, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* nick_print_log: print nick infos in log (usually for crash dump)
|
||||
*/
|
||||
|
||||
void
|
||||
nick_print_log (t_irc_nick *nick)
|
||||
{
|
||||
wee_log_printf ("=> nick %s (addr:0x%X)]\n", nick->nick, nick);
|
||||
wee_log_printf (" is_chanowner . : %d\n", nick->is_chanowner);
|
||||
wee_log_printf (" is_chanadmin . : %d\n", nick->is_chanadmin);
|
||||
wee_log_printf (" is_op. . . . . : %d\n", nick->is_op);
|
||||
wee_log_printf (" is_halfop. . . : %d\n", nick->is_halfop);
|
||||
wee_log_printf (" has_voice. . . : %d\n", nick->has_voice);
|
||||
wee_log_printf (" is_away. . . . : %d\n", nick->is_away);
|
||||
wee_log_printf (" color. . . . . : %d\n", nick->color);
|
||||
wee_log_printf (" prev_nick. . . : 0x%X\n", nick->prev_nick);
|
||||
wee_log_printf (" next_nick. . . : 0x%X\n", nick->next_nick);
|
||||
}
|
||||
|
||||
+917
-169
File diff suppressed because it is too large
Load Diff
+605
-142
File diff suppressed because it is too large
Load Diff
+1037
-171
File diff suppressed because it is too large
Load Diff
+113
-23
@@ -21,7 +21,18 @@
|
||||
#ifndef __WEECHAT_IRC_H
|
||||
#define __WEECHAT_IRC_H 1
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_GNUTLS
|
||||
#include <gnutls/gnutls.h>
|
||||
#endif
|
||||
|
||||
#include "../gui/gui.h"
|
||||
|
||||
/* prefixes for chat window */
|
||||
@@ -69,6 +80,14 @@
|
||||
#define DCC_FAILED 4 /* DCC failed */
|
||||
#define DCC_ABORTED 5 /* DCC aborted by user */
|
||||
|
||||
#define DCC_IS_CHAT(type) ((type == DCC_CHAT_RECV) || (type == DCC_CHAT_SEND))
|
||||
#define DCC_IS_FILE(type) ((type == DCC_FILE_RECV) || (type == DCC_FILE_SEND))
|
||||
#define DCC_IS_RECV(type) ((type == DCC_CHAT_RECV) || (type == DCC_FILE_RECV))
|
||||
#define DCC_IS_SEND(type) ((type == DCC_CHAT_SEND) || (type == DCC_FILE_SEND))
|
||||
|
||||
#define DCC_ENDED(status) ((status == DCC_DONE) || (status == DCC_FAILED) || \
|
||||
(status == DCC_ABORTED))
|
||||
|
||||
/* nick types */
|
||||
|
||||
typedef struct t_irc_nick t_irc_nick;
|
||||
@@ -76,10 +95,13 @@ typedef struct t_irc_nick t_irc_nick;
|
||||
struct t_irc_nick
|
||||
{
|
||||
char *nick; /* nickname */
|
||||
int is_chanowner; /* chan owner? (specific to unrealircd) */
|
||||
int is_chanadmin; /* chan admin? (specific to unrealircd) */
|
||||
int is_op; /* operator privileges? */
|
||||
int is_halfop; /* half operaor privileges? */
|
||||
int has_voice; /* nick has voice? */
|
||||
int color; /* color for nickname */
|
||||
int is_away; /* = 1 if nick is away, otherwise 0 */
|
||||
int color; /* color for nickname in chat window */
|
||||
t_irc_nick *prev_nick; /* link to previous nick on the channel */
|
||||
t_irc_nick *next_nick; /* link to next nick on the channel */
|
||||
};
|
||||
@@ -95,11 +117,14 @@ typedef struct t_irc_channel t_irc_channel;
|
||||
struct t_irc_channel
|
||||
{
|
||||
int type; /* channel type */
|
||||
void *dcc_chat; /* DCC CHAT pointer (NULL if not DCC) */
|
||||
char *name; /* name of channel (exemple: "#abc") */
|
||||
char *topic; /* topic of channel (host for private) */
|
||||
char modes[NUM_CHANNEL_MODES+1];/* channel modes */
|
||||
int limit; /* user limit (0 is limit not set) */
|
||||
char *key; /* channel key (NULL if no key is set) */
|
||||
int nicks_count; /* # nicks on channel (0 if dcc/pv) */
|
||||
int checking_away; /* = 1 if checking away with WHO cmd */
|
||||
t_irc_nick *nicks; /* nicks on the channel */
|
||||
t_irc_nick *last_nick; /* last nick on the channel */
|
||||
t_gui_buffer *buffer; /* GUI buffer allocated for channel */
|
||||
@@ -121,27 +146,40 @@ struct t_irc_server
|
||||
int command_line; /* server was given on command line */
|
||||
char *address; /* address of server (IP or name) */
|
||||
int port; /* port for server (6667 by default) */
|
||||
int ipv6; /* use IPv6 protocol */
|
||||
int ssl; /* SSL protocol */
|
||||
char *password; /* password for server */
|
||||
char *nick1; /* first nickname for the server */
|
||||
char *nick2; /* alternate nickname */
|
||||
char *nick3; /* 2nd alternate nickname */
|
||||
char *username; /* user name */
|
||||
char *realname; /* real name */
|
||||
char *command; /* command to run once connected */
|
||||
char *command; /* command to run once connected */
|
||||
int command_delay; /* delay after execution of command */
|
||||
char *autojoin; /* channels to automatically join */
|
||||
char *autojoin; /* channels to automatically join */
|
||||
int autorejoin; /* auto rejoin channels when kicked */
|
||||
char *notify_levels; /* channels notify levels */
|
||||
|
||||
/* internal vars */
|
||||
char *nick; /* current nickname */
|
||||
pid_t child_pid; /* pid of child process (connecting) */
|
||||
int child_read; /* to read into child pipe */
|
||||
int child_write; /* to write into child pipe */
|
||||
int sock; /* socket for server (IPv4 or IPv6) */
|
||||
int is_connected; /* 1 if WeeChat is connected to server */
|
||||
#ifdef HAVE_GNUTLS
|
||||
int ssl_connected; /* = 1 if connected with SSL */
|
||||
gnutls_session gnutls_sess; /* gnutls session (only if SSL is used) */
|
||||
#endif
|
||||
|
||||
char *unterminated_message; /* beginning of a message in input buf */
|
||||
char *nick; /* current nickname */
|
||||
time_t reconnect_start; /* this time + delay = reconnect time */
|
||||
int reconnect_join; /* 1 if channels opened to rejoin */
|
||||
int sock4; /* socket for server */
|
||||
int is_away; /* 1 is user is marker as away */
|
||||
time_t away_time; /* time() when user marking as away */
|
||||
int server_read; /* pipe for reading server data */
|
||||
int server_write; /* pipe for sending data to server */
|
||||
int lag; /* lag (in milliseconds) */
|
||||
struct timeval lag_check_time; /* last time lag was checked (ping sent)*/
|
||||
time_t lag_next_check; /* time for next check */
|
||||
t_gui_buffer *buffer; /* GUI buffer allocated for server */
|
||||
t_irc_channel *channels; /* opened channels on server */
|
||||
t_irc_channel *last_channel; /* last opened channal on server */
|
||||
@@ -182,31 +220,40 @@ struct t_irc_message
|
||||
|
||||
/* DCC */
|
||||
|
||||
typedef struct t_dcc t_dcc;
|
||||
typedef struct t_irc_dcc t_irc_dcc;
|
||||
|
||||
struct t_dcc
|
||||
struct t_irc_dcc
|
||||
{
|
||||
t_irc_server *server; /* irc server */
|
||||
t_irc_channel *channel; /* irc channel (for DCC chat only) */
|
||||
int type; /* DCC type (send or receive) */
|
||||
int status; /* DCC status (waiting, sending, ..) */
|
||||
time_t start_time; /* the time when DCC started */
|
||||
time_t start_transfer; /* the time when DCC transfer started */
|
||||
unsigned long addr; /* IP address */
|
||||
int port; /* port */
|
||||
char *nick; /* remote nick */
|
||||
int sock; /* socket for connection */
|
||||
char *unterminated_message; /* beginning of a message in input buf */
|
||||
int file; /* local file (for reading or writing) */
|
||||
char *filename; /* filename (given by sender) */
|
||||
char *local_filename; /* local filename (with path) */
|
||||
int filename_suffix; /* suffix (.1 for ex) if renaming file */
|
||||
unsigned long size; /* file size */
|
||||
unsigned long pos; /* number of bytes received/sent */
|
||||
t_dcc *prev_dcc; /* link to previous dcc file/chat */
|
||||
t_dcc *next_dcc; /* link to next dcc file/chat */
|
||||
unsigned long ack; /* number of bytes received OK */
|
||||
time_t last_check_time; /* last time we looked at bytes sent/rcv*/
|
||||
unsigned long last_check_pos; /* bytes sent/recv at last check */
|
||||
unsigned long bytes_per_sec; /* bytes per second */
|
||||
t_irc_dcc *prev_dcc; /* link to previous dcc file/chat */
|
||||
t_irc_dcc *next_dcc; /* link to next dcc file/chat */
|
||||
};
|
||||
|
||||
extern t_irc_command irc_commands[];
|
||||
extern t_irc_server *irc_servers;
|
||||
extern t_irc_message *recv_msgq, *msgq_last_msg;
|
||||
extern t_dcc *dcc_list;
|
||||
extern int check_away;
|
||||
extern t_irc_dcc *dcc_list;
|
||||
extern char *dcc_status_string[6];
|
||||
extern char *channel_modes;
|
||||
|
||||
@@ -218,12 +265,13 @@ extern t_irc_server *server_alloc ();
|
||||
extern void server_destroy (t_irc_server *);
|
||||
extern void server_free (t_irc_server *);
|
||||
extern void server_free_all ();
|
||||
extern t_irc_server *server_new (char *, int, int, int, int, char *, int, char *,
|
||||
extern t_irc_server *server_new (char *, int, int, int, int, char *, int, int, int,
|
||||
char *, char *, char *, char *, char *, char *,
|
||||
int, char *, int);
|
||||
char *, int, char *, int, char *);
|
||||
extern int server_send (t_irc_server *, char *, int);
|
||||
extern void server_sendf (t_irc_server *, char *, ...);
|
||||
extern void server_recv (t_irc_server *);
|
||||
extern void server_child_read (t_irc_server *);
|
||||
extern int server_connect (t_irc_server *);
|
||||
extern void server_reconnect (t_irc_server *);
|
||||
extern void server_auto_connect (int);
|
||||
@@ -232,6 +280,19 @@ extern void server_disconnect_all ();
|
||||
extern t_irc_server *server_search (char *);
|
||||
extern int server_get_number_connected ();
|
||||
extern int server_name_already_exists (char *);
|
||||
extern void server_remove_away ();
|
||||
extern void server_check_away ();
|
||||
extern void server_set_away (t_irc_server *, char *, int);
|
||||
extern void server_print_log (t_irc_server *);
|
||||
|
||||
/* proxy functions (irc-server.c) */
|
||||
extern void convbase64_8x3_to_6x4(char *from, char* to);
|
||||
extern void base64encode(char *from, char *to);
|
||||
extern int pass_httpproxy(t_irc_server *server);
|
||||
extern int resolve(char *hostname, char *ip, int *version);
|
||||
extern int pass_socks4proxy(t_irc_server *server);
|
||||
extern int pass_socks5proxy(t_irc_server *server);
|
||||
extern int pass_proxy(t_irc_server *server);
|
||||
|
||||
/* channel functions (irc-channel.c) */
|
||||
|
||||
@@ -240,10 +301,19 @@ extern void channel_free (t_irc_server *, t_irc_channel *);
|
||||
extern void channel_free_all (t_irc_server *);
|
||||
extern t_irc_channel *channel_search (t_irc_server *, char *);
|
||||
extern int string_is_channel (char *);
|
||||
extern void channel_remove_away (t_irc_channel *);
|
||||
extern void channel_check_away (t_irc_server *, t_irc_channel *);
|
||||
extern void channel_set_away (t_irc_channel *, char *, int);
|
||||
extern int channel_create_dcc (t_irc_dcc *);
|
||||
extern void channel_remove_dcc (t_irc_dcc *);
|
||||
extern int channel_get_notify_level (t_irc_server *, t_irc_channel *);
|
||||
extern void channel_remove_notify_level (t_irc_server *, t_irc_channel *);
|
||||
extern void channel_set_notify_level (t_irc_server *, t_irc_channel *, int);
|
||||
extern void channel_print_log (t_irc_channel *);
|
||||
|
||||
/* nick functions (irc-nick.c) */
|
||||
|
||||
extern t_irc_nick *nick_new (t_irc_channel *, char *, int, int, int);
|
||||
extern t_irc_nick *nick_new (t_irc_channel *, char *, int, int, int, int, int);
|
||||
extern void nick_resort (t_irc_channel *, t_irc_nick *);
|
||||
extern void nick_change (t_irc_channel *, t_irc_nick *, char *);
|
||||
extern void nick_free (t_irc_channel *, t_irc_nick *);
|
||||
@@ -251,24 +321,29 @@ extern void nick_free_all (t_irc_channel *);
|
||||
extern t_irc_nick *nick_search (t_irc_channel *, char *);
|
||||
extern void nick_count (t_irc_channel *, int *, int *, int *, int *, int *);
|
||||
extern int nick_get_max_length (t_irc_channel *);
|
||||
extern void nick_set_away (t_irc_channel *, t_irc_nick *, int);
|
||||
extern void nick_print_log (t_irc_nick *);
|
||||
|
||||
/* DCC functions (irc-dcc.c) */
|
||||
|
||||
extern void dcc_send ();
|
||||
extern void dcc_free (t_dcc *);
|
||||
extern void dcc_close (t_dcc *, int);
|
||||
extern void dcc_accept (t_dcc *);
|
||||
extern t_dcc *dcc_add (t_irc_server *, int, unsigned long, int, char *, char *,
|
||||
unsigned int);
|
||||
extern void dcc_redraw (int);
|
||||
extern void dcc_free (t_irc_dcc *);
|
||||
extern void dcc_close (t_irc_dcc *, int);
|
||||
extern void dcc_accept (t_irc_dcc *);
|
||||
extern t_irc_dcc *dcc_add (t_irc_server *, int, unsigned long, int, char *, int,
|
||||
char *, char *, unsigned long);
|
||||
extern void dcc_send_request (t_irc_server *, int, char *, char *);
|
||||
extern void dcc_chat_sendf (t_irc_dcc *, char *, ...);
|
||||
extern void dcc_handle ();
|
||||
extern void dcc_end ();
|
||||
|
||||
/* IRC display (irc-diplay.c) */
|
||||
|
||||
extern void irc_display_prefix (/*@null@*/ t_gui_buffer *, char *);
|
||||
extern void irc_display_nick (t_gui_buffer *, t_irc_nick *, int, int, int, int);
|
||||
extern void irc_display_nick (t_gui_buffer *, t_irc_nick *, char *, int, int, int, int);
|
||||
extern void irc_display_mode (t_gui_buffer *, char *, char, char *, char *,
|
||||
char *, char *);
|
||||
extern void irc_display_server (t_irc_server *ptr_server);
|
||||
|
||||
/* IRC protocol (irc-commands.c) */
|
||||
|
||||
@@ -277,16 +352,20 @@ extern void irc_login (t_irc_server *);
|
||||
/* IRC commands issued by user */
|
||||
extern int irc_cmd_send_admin (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_away (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_ban (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_ctcp (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_dcc (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_dehalfop (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_deop (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_devoice (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_die (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_halfop (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_info (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_invite (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_invite (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_ison (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_join (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_kick (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_kickban (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_kill (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_links (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_list (t_irc_server *, char *);
|
||||
@@ -319,6 +398,7 @@ extern int irc_cmd_send_summon (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_time (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_topic (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_trace (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_unban (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_userhost (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_users (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_version (t_irc_server *, char *);
|
||||
@@ -329,13 +409,16 @@ extern int irc_cmd_send_whois (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_whowas (t_irc_server *, char *);
|
||||
/* IRC commands executed when received from server */
|
||||
extern int irc_cmd_recv_error (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_invite (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_join (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_kick (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_kill (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_mode (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_nick (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_notice (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_part (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_ping (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_pong (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_privmsg (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_quit (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_server_msg (t_irc_server *, char *, char *);
|
||||
@@ -348,10 +431,12 @@ extern int irc_cmd_recv_302 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_303 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_305 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_306 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_307 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_311 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_312 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_313 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_314 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_315 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_317 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_318 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_319 (t_irc_server *, char *, char *);
|
||||
@@ -364,11 +449,16 @@ extern int irc_cmd_recv_329 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_331 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_332 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_333 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_341 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_351 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_352 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_353 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_365 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_366 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_367 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_368 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_433 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_438 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_671 (t_irc_server *, char *, char *);
|
||||
|
||||
#endif /* irc.h */
|
||||
|
||||
@@ -21,16 +21,16 @@ if PLUGIN_PERL
|
||||
perl_dir = perl
|
||||
endif
|
||||
|
||||
# if PLUGIN_PYTHON
|
||||
# python_dir = python
|
||||
# endif
|
||||
if PLUGIN_PYTHON
|
||||
python_dir = python
|
||||
endif
|
||||
|
||||
# if PLUGIN_RUBY
|
||||
# ruby_dir = ruby
|
||||
# endif
|
||||
|
||||
# SUBDIRS = $(perl_dir) $(python_dir) $(ruby_dir)
|
||||
SUBDIRS = $(perl_dir)
|
||||
SUBDIRS = $(perl_dir) $(python_dir)
|
||||
|
||||
noinst_LIBRARIES = lib_weechat_plugins.a
|
||||
|
||||
|
||||
+411
-25
@@ -28,6 +28,7 @@
|
||||
#include <EXTERN.h>
|
||||
#include <perl.h>
|
||||
#include <XSUB.h>
|
||||
#undef _
|
||||
#include "../../common/weechat.h"
|
||||
#include "../plugins.h"
|
||||
#include "wee-perl.h"
|
||||
@@ -44,10 +45,14 @@ t_plugin_script *last_perl_script = NULL;
|
||||
extern void boot_DynaLoader (pTHX_ CV* cv);
|
||||
|
||||
|
||||
/******************************* Old interface ********************************/
|
||||
|
||||
/*
|
||||
* IRC::register: startup function for all WeeChat Perl scripts
|
||||
*/
|
||||
|
||||
/*** DEPRECATED function, kept for compatibility only, please don't update! ***/
|
||||
|
||||
static XS (XS_IRC_register)
|
||||
{
|
||||
char *name, *version, *shutdown_func, *description;
|
||||
@@ -77,12 +82,12 @@ static XS (XS_IRC_register)
|
||||
|
||||
if (perl_script_found)
|
||||
{
|
||||
/* error: another scripts already exists with this name! */
|
||||
/* error: another script already exists with this name! */
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("Perl error: unable to register Perl script \"%s\" (another script "
|
||||
_("%s error: unable to register \"%s\" script (another script "
|
||||
"already exists with this name)\n"),
|
||||
name);
|
||||
"Perl", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -104,15 +109,15 @@ static XS (XS_IRC_register)
|
||||
perl_scripts = new_perl_script;
|
||||
last_perl_script = new_perl_script;
|
||||
|
||||
wee_log_printf (_("registered Perl script: \"%s\", version %s (%s)\n"),
|
||||
name, version, description);
|
||||
wee_log_printf (_("Registered %s script: \"%s\", version %s (%s)\n"),
|
||||
"Perl", name, version, description);
|
||||
}
|
||||
else
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s unable to load Perl script \"%s\" (not enough memory)\n"),
|
||||
WEECHAT_ERROR, name);
|
||||
_("%s error: unable to load script \"%s\" (not enough memory)\n"),
|
||||
"Perl", name);
|
||||
}
|
||||
}
|
||||
XST_mPV (0, VERSION);
|
||||
@@ -123,6 +128,8 @@ static XS (XS_IRC_register)
|
||||
* IRC::print: print message to current buffer
|
||||
*/
|
||||
|
||||
/*** DEPRECATED function, kept for compatibility only, please don't update! ***/
|
||||
|
||||
static XS (XS_IRC_print)
|
||||
{
|
||||
int i, integer;
|
||||
@@ -147,6 +154,8 @@ static XS (XS_IRC_print)
|
||||
* (server is optional)
|
||||
*/
|
||||
|
||||
/*** DEPRECATED function, kept for compatibility only, please don't update! ***/
|
||||
|
||||
static XS (XS_IRC_print_with_channel)
|
||||
{
|
||||
int integer;
|
||||
@@ -206,6 +215,8 @@ static XS (XS_IRC_print_with_channel)
|
||||
* IRC::print_infobar: print message to infobar
|
||||
*/
|
||||
|
||||
/*** DEPRECATED function, kept for compatibility only, please don't update! ***/
|
||||
|
||||
static XS (XS_IRC_print_infobar)
|
||||
{
|
||||
int integer;
|
||||
@@ -220,7 +231,8 @@ static XS (XS_IRC_print_infobar)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("Perl error: wrong parameters for IRC::print_infobar Perl function\n"));
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Perl", "print_infobar");
|
||||
}
|
||||
|
||||
XSRETURN_EMPTY;
|
||||
@@ -230,6 +242,8 @@ static XS (XS_IRC_print_infobar)
|
||||
* IRC::command: send command to server
|
||||
*/
|
||||
|
||||
/*** DEPRECATED function, kept for compatibility only, please don't update! ***/
|
||||
|
||||
static XS (XS_IRC_command)
|
||||
{
|
||||
int integer;
|
||||
@@ -253,7 +267,8 @@ static XS (XS_IRC_command)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("Perl error: server not found for IRC::command Perl function\n"));
|
||||
_("%s error: server not found for \"%s\" function\n"),
|
||||
"Perl", "command");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -279,6 +294,8 @@ static XS (XS_IRC_command)
|
||||
* IRC::add_message_handler: add handler for messages (privmsg, ...)
|
||||
*/
|
||||
|
||||
/*** DEPRECATED function, kept for compatibility only, please don't update! ***/
|
||||
|
||||
static XS (XS_IRC_add_message_handler)
|
||||
{
|
||||
char *name, *function;
|
||||
@@ -300,6 +317,8 @@ static XS (XS_IRC_add_message_handler)
|
||||
* IRC::add_command_handler: add command handler (define/redefine commands)
|
||||
*/
|
||||
|
||||
/*** DEPRECATED function, kept for compatibility only, please don't update! ***/
|
||||
|
||||
static XS (XS_IRC_add_command_handler)
|
||||
{
|
||||
char *name, *function;
|
||||
@@ -313,8 +332,8 @@ static XS (XS_IRC_add_command_handler)
|
||||
|
||||
name = SvPV (ST (0), integer);
|
||||
function = SvPV (ST (1), integer);
|
||||
if (!index_command_search (name))
|
||||
index_command_new (name);
|
||||
if (!weelist_search (index_commands, name))
|
||||
weelist_add (&index_commands, &last_index_command, name);
|
||||
ptr_plugin_handler = plugin_handler_search (plugin_cmd_handlers, name);
|
||||
if (ptr_plugin_handler)
|
||||
{
|
||||
@@ -331,6 +350,8 @@ static XS (XS_IRC_add_command_handler)
|
||||
* IRC::get_info: get various infos
|
||||
*/
|
||||
|
||||
/*** DEPRECATED function, kept for compatibility only, please don't update! ***/
|
||||
|
||||
static XS (XS_IRC_get_info)
|
||||
{
|
||||
char *arg, *info = NULL, *server;
|
||||
@@ -354,7 +375,8 @@ static XS (XS_IRC_get_info)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("Perl error: server not found for IRC::get_info Perl function\n"));
|
||||
_("%s error: server not found for \"%s\" function\n"),
|
||||
"Perl", "get_info");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -405,6 +427,355 @@ static XS (XS_IRC_get_info)
|
||||
XSRETURN (1);
|
||||
}
|
||||
|
||||
/******************************* New interface ********************************/
|
||||
|
||||
/*
|
||||
* weechat::register: startup function for all WeeChat Perl scripts
|
||||
*/
|
||||
|
||||
static XS (XS_weechat_register)
|
||||
{
|
||||
char *name, *version, *shutdown_func, *description;
|
||||
int integer;
|
||||
t_plugin_script *ptr_perl_script, *perl_script_found, *new_perl_script;
|
||||
dXSARGS;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) items;
|
||||
(void) cv;
|
||||
|
||||
name = SvPV (ST (0), integer);
|
||||
version = SvPV (ST (1), integer);
|
||||
shutdown_func = SvPV (ST (2), integer);
|
||||
description = SvPV (ST (3), integer);
|
||||
|
||||
perl_script_found = NULL;
|
||||
for (ptr_perl_script = perl_scripts; ptr_perl_script;
|
||||
ptr_perl_script = ptr_perl_script->next_script)
|
||||
{
|
||||
if (strcasecmp (ptr_perl_script->name, name) == 0)
|
||||
{
|
||||
perl_script_found = ptr_perl_script;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (perl_script_found)
|
||||
{
|
||||
/* error: another script already exists with this name! */
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: unable to register \"%s\" script (another script "
|
||||
"already exists with this name)\n"),
|
||||
"Perl", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* registering script */
|
||||
new_perl_script = (t_plugin_script *)malloc (sizeof (t_plugin_script));
|
||||
if (new_perl_script)
|
||||
{
|
||||
new_perl_script->name = strdup (name);
|
||||
new_perl_script->version = strdup (version);
|
||||
new_perl_script->shutdown_func = strdup (shutdown_func);
|
||||
new_perl_script->description = strdup (description);
|
||||
|
||||
/* add new script to list */
|
||||
new_perl_script->prev_script = last_perl_script;
|
||||
new_perl_script->next_script = NULL;
|
||||
if (perl_scripts)
|
||||
last_perl_script->next_script = new_perl_script;
|
||||
else
|
||||
perl_scripts = new_perl_script;
|
||||
last_perl_script = new_perl_script;
|
||||
|
||||
wee_log_printf (_("Registered %s script: \"%s\", version %s (%s)\n"),
|
||||
"Perl", name, version, description);
|
||||
}
|
||||
else
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: unable to load script \"%s\" (not enough memory)\n"),
|
||||
"Perl", name);
|
||||
}
|
||||
}
|
||||
XST_mPV (0, VERSION);
|
||||
XSRETURN (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::print: print message into a buffer (current or specified one)
|
||||
*/
|
||||
|
||||
static XS (XS_weechat_print)
|
||||
{
|
||||
int integer;
|
||||
char *message, *channel_name, *server_name;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
dXSARGS;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) cv;
|
||||
|
||||
if ((items < 1) || (items > 3))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Perl", "print");
|
||||
XSRETURN_NO;
|
||||
return;
|
||||
}
|
||||
|
||||
channel_name = NULL;
|
||||
server_name = NULL;
|
||||
|
||||
if (items > 1)
|
||||
{
|
||||
channel_name = SvPV (ST (1), integer);
|
||||
if (items > 2)
|
||||
server_name = SvPV (ST (2), integer);
|
||||
}
|
||||
|
||||
ptr_buffer = plugin_find_buffer (server_name, channel_name);
|
||||
if (ptr_buffer)
|
||||
{
|
||||
message = SvPV (ST (0), integer);
|
||||
irc_display_prefix (ptr_buffer, PREFIX_PLUGIN);
|
||||
gui_printf (ptr_buffer, "%s%s",
|
||||
message,
|
||||
((strlen (message) == 0) || (message[strlen (message) - 1] != '\n')) ? "\n" : "");
|
||||
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
/* buffer not found */
|
||||
XSRETURN_NO;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::print_infobar: print message to infobar
|
||||
*/
|
||||
|
||||
static XS (XS_weechat_print_infobar)
|
||||
{
|
||||
int integer;
|
||||
dXSARGS;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) cv;
|
||||
|
||||
if (items != 2)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Perl", "print_infobar");
|
||||
XSRETURN_NO;
|
||||
}
|
||||
|
||||
gui_infobar_printf (SvIV (ST (0)), COLOR_WIN_INFOBAR, SvPV (ST (1), integer));
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::command: send command to server
|
||||
*/
|
||||
|
||||
static XS (XS_weechat_command)
|
||||
{
|
||||
int integer;
|
||||
char *command, *channel_name, *server_name;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
dXSARGS;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) cv;
|
||||
|
||||
if ((items < 1) || (items > 3))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Perl", "command");
|
||||
XSRETURN_NO;
|
||||
return;
|
||||
}
|
||||
|
||||
channel_name = NULL;
|
||||
server_name = NULL;
|
||||
|
||||
if (items > 1)
|
||||
{
|
||||
channel_name = SvPV (ST (1), integer);
|
||||
if (items > 2)
|
||||
server_name = SvPV (ST (2), integer);
|
||||
}
|
||||
|
||||
ptr_buffer = plugin_find_buffer (server_name, channel_name);
|
||||
if (ptr_buffer)
|
||||
{
|
||||
command = SvPV (ST (0), integer);
|
||||
user_command (SERVER(ptr_buffer), ptr_buffer, command);
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
/* buffer not found */
|
||||
XSRETURN_NO;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::add_message_handler: add handler for messages (privmsg, ...)
|
||||
*/
|
||||
|
||||
static XS (XS_weechat_add_message_handler)
|
||||
{
|
||||
char *name, *function;
|
||||
int integer;
|
||||
dXSARGS;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) cv;
|
||||
|
||||
if (items != 2)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Perl", "add_message_handler");
|
||||
XSRETURN_NO;
|
||||
}
|
||||
|
||||
name = SvPV (ST (0), integer);
|
||||
function = SvPV (ST (1), integer);
|
||||
plugin_handler_add (&plugin_msg_handlers, &last_plugin_msg_handler,
|
||||
PLUGIN_TYPE_PERL, name, function);
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::add_command_handler: add command handler (define/redefine commands)
|
||||
*/
|
||||
|
||||
static XS (XS_weechat_add_command_handler)
|
||||
{
|
||||
char *name, *function;
|
||||
int integer;
|
||||
t_plugin_handler *ptr_plugin_handler;
|
||||
dXSARGS;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) cv;
|
||||
|
||||
if (items != 2)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Perl", "add_command_handler");
|
||||
XSRETURN_NO;
|
||||
}
|
||||
|
||||
name = SvPV (ST (0), integer);
|
||||
function = SvPV (ST (1), integer);
|
||||
if (!weelist_search (index_commands, name))
|
||||
weelist_add (&index_commands, &last_index_command, name);
|
||||
ptr_plugin_handler = plugin_handler_search (plugin_cmd_handlers, name);
|
||||
if (ptr_plugin_handler)
|
||||
{
|
||||
free (ptr_plugin_handler->function_name);
|
||||
ptr_plugin_handler->function_name = strdup (function);
|
||||
}
|
||||
else
|
||||
plugin_handler_add (&plugin_cmd_handlers, &last_plugin_cmd_handler,
|
||||
PLUGIN_TYPE_PERL, name, function);
|
||||
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::get_info: get various infos
|
||||
*/
|
||||
|
||||
static XS (XS_weechat_get_info)
|
||||
{
|
||||
char *arg, *info = NULL, *server_name;
|
||||
t_irc_server *ptr_server;
|
||||
int integer;
|
||||
dXSARGS;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) cv;
|
||||
|
||||
if ((items < 1) || (items > 2))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Perl", "get_info");
|
||||
XSRETURN_NO;
|
||||
}
|
||||
|
||||
if (items == 2)
|
||||
{
|
||||
server_name = SvPV (ST (1), integer);
|
||||
ptr_server = server_search (server_name);
|
||||
}
|
||||
else
|
||||
ptr_server = SERVER(gui_current_window->buffer);
|
||||
|
||||
if (!ptr_server)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: server not found for \"%s\" function\n"),
|
||||
"Perl", "get_info");
|
||||
XSRETURN_NO;
|
||||
}
|
||||
|
||||
arg = SvPV (ST (0), integer);
|
||||
if (arg)
|
||||
{
|
||||
if ( (strcasecmp (arg, "0") == 0) || (strcasecmp (arg, "version") == 0) )
|
||||
{
|
||||
info = PACKAGE_STRING;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "1") == 0) || (strcasecmp (arg, "nick") == 0) )
|
||||
{
|
||||
if (ptr_server->nick)
|
||||
info = ptr_server->nick;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "2") == 0) || (strcasecmp (arg, "channel") == 0) )
|
||||
{
|
||||
if (BUFFER_IS_CHANNEL (gui_current_window->buffer))
|
||||
info = CHANNEL (gui_current_window->buffer)->name;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "3") == 0) || (strcasecmp (arg, "server") == 0) )
|
||||
{
|
||||
if (ptr_server->name)
|
||||
info = ptr_server->name;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "4") == 0) || (strcasecmp (arg, "weechatdir") == 0) )
|
||||
{
|
||||
info = weechat_home;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "5") == 0) || (strcasecmp (arg, "away") == 0) )
|
||||
{
|
||||
XST_mIV (0, SERVER(gui_current_window->buffer)->is_away);
|
||||
XSRETURN (1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info)
|
||||
XST_mPV (0, info);
|
||||
else
|
||||
XST_mPV (0, "");
|
||||
}
|
||||
|
||||
XSRETURN (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* xs_init: initialize subroutines
|
||||
*/
|
||||
@@ -413,6 +784,8 @@ void
|
||||
xs_init (pTHX)
|
||||
{
|
||||
newXS ("DynaLoader::boot_DynaLoader", boot_DynaLoader, __FILE__);
|
||||
|
||||
/* DEPRECATED & old interface (WeeChat <= 0.1.1), kept for compatibility */
|
||||
newXS ("IRC::register", XS_IRC_register, "IRC");
|
||||
newXS ("IRC::print", XS_IRC_print, "IRC");
|
||||
newXS ("IRC::print_with_channel", XS_IRC_print_with_channel, "IRC");
|
||||
@@ -421,6 +794,15 @@ xs_init (pTHX)
|
||||
newXS ("IRC::add_message_handler", XS_IRC_add_message_handler, "IRC");
|
||||
newXS ("IRC::add_command_handler", XS_IRC_add_command_handler, "IRC");
|
||||
newXS ("IRC::get_info", XS_IRC_get_info, "IRC");
|
||||
|
||||
/* new interface (WeeChat >= 0.1.2) */
|
||||
newXS ("weechat::register", XS_weechat_register, "weechat");
|
||||
newXS ("weechat::print", XS_weechat_print, "weechat");
|
||||
newXS ("weechat::print_infobar", XS_weechat_print_infobar, "weechat");
|
||||
newXS ("weechat::command", XS_weechat_command, "weechat");
|
||||
newXS ("weechat::add_message_handler", XS_weechat_add_message_handler, "weechat");
|
||||
newXS ("weechat::add_command_handler", XS_weechat_add_command_handler, "weechat");
|
||||
newXS ("weechat::get_info", XS_weechat_get_info, "weechat");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -432,7 +814,7 @@ wee_perl_init ()
|
||||
{
|
||||
char *perl_args[] = { "", "-e", "0" };
|
||||
/* Following Perl code is extracted/modified from X-Chat IRC client */
|
||||
/* X-Chat is (c) 1998-2002 Peter Zelezny */
|
||||
/* X-Chat is (c) 1998-2005 Peter Zelezny */
|
||||
char *weechat_perl_func =
|
||||
{
|
||||
"sub wee_perl_load_file"
|
||||
@@ -450,21 +832,22 @@ wee_perl_init ()
|
||||
" my $content = wee_perl_load_file ($filename);"
|
||||
" if ($content eq \"__WEECHAT_ERROR__\")"
|
||||
" {"
|
||||
" IRC::print \"" WEECHAT_ERROR " Perl script '$filename' not found.\\n\";"
|
||||
" weechat::print \"WeeChat Error: Perl script '$filename' not found.\\n\", \"\";"
|
||||
" return 1;"
|
||||
" }"
|
||||
" eval $content;"
|
||||
" if ($@)"
|
||||
" {"
|
||||
" IRC::print \"" WEECHAT_ERROR " unable to load Perl script '$filename':\\n\";"
|
||||
" IRC::print \"$@\\n\";"
|
||||
" weechat::print \"WeeChat error: unable to load Perl script '$filename':\\n\", \"\";"
|
||||
" weechat::print \"$@\\n\";"
|
||||
" return 2;"
|
||||
" }"
|
||||
" return 0;"
|
||||
"}"
|
||||
"$SIG{__WARN__} = sub { IRC::print \"$_[0]\n\"; };"
|
||||
"$SIG{__WARN__} = sub { weechat::print \"$_[0]\n\", \"\"; };"
|
||||
};
|
||||
|
||||
wee_log_printf (_("Loading %s module \"weechat\"\n"), "Perl");
|
||||
my_perl = perl_alloc ();
|
||||
perl_construct (my_perl);
|
||||
perl_parse (my_perl, xs_init, 3, perl_args, NULL);
|
||||
@@ -523,7 +906,7 @@ wee_perl_exec (char *function, char *server, char *arguments)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("Perl error: %s\n"),
|
||||
_("Perl error: %s"),
|
||||
SvPV (sv, count));
|
||||
POPs;
|
||||
}
|
||||
@@ -533,8 +916,8 @@ wee_perl_exec (char *function, char *server, char *arguments)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("Perl error: too much values from \"%s\" (%d). Expected: 1.\n"),
|
||||
function, count);
|
||||
_("%s error: too much values from \"%s\" (%d). Expected: 1.\n"),
|
||||
"Perl", function, count);
|
||||
}
|
||||
else
|
||||
return_code = POPi;
|
||||
@@ -555,9 +938,9 @@ int
|
||||
wee_perl_load (char *filename)
|
||||
{
|
||||
/* execute Perl script */
|
||||
wee_log_printf (_("loading Perl script \"%s\"\n"), filename);
|
||||
wee_log_printf (_("Loading %s script \"%s\"\n"), "Perl", filename);
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("Loading Perl script \"%s\"\n"), filename);
|
||||
gui_printf (NULL, _("Loading %s script \"%s\"\n"), "Perl", filename);
|
||||
return wee_perl_exec ("wee_perl_load_eval_file", filename, "");
|
||||
}
|
||||
|
||||
@@ -606,8 +989,8 @@ wee_perl_unload (t_plugin_script *ptr_perl_script)
|
||||
{
|
||||
if (ptr_perl_script)
|
||||
{
|
||||
wee_log_printf (_("unloading Perl script \"%s\"\n"),
|
||||
ptr_perl_script->name);
|
||||
wee_log_printf (_("Unloading %s script \"%s\"\n"),
|
||||
"Perl", ptr_perl_script->name);
|
||||
|
||||
/* call shutdown callback function */
|
||||
if (ptr_perl_script->shutdown_func[0])
|
||||
@@ -623,9 +1006,12 @@ wee_perl_unload (t_plugin_script *ptr_perl_script)
|
||||
void
|
||||
wee_perl_unload_all ()
|
||||
{
|
||||
wee_log_printf (_("unloading all Perl scripts...\n"));
|
||||
wee_log_printf (_("Unloading all %s scripts...\n"), "Perl");
|
||||
while (perl_scripts)
|
||||
wee_perl_unload (perl_scripts);
|
||||
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("%s scripts unloaded\n"), "Perl");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+133
-7
@@ -39,6 +39,10 @@
|
||||
#include "perl/wee-perl.h"
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_PYTHON
|
||||
#include "python/wee-python.h"
|
||||
#endif
|
||||
|
||||
|
||||
char *plugin_name[3] = { "Perl", "Python", "Ruby" };
|
||||
|
||||
@@ -86,12 +90,13 @@ plugin_auto_load (int plugin_type, char *directory)
|
||||
lstat (entry->d_name, &statbuf);
|
||||
if (! S_ISDIR(statbuf.st_mode))
|
||||
{
|
||||
wee_log_printf (_("auto-loading %s script: %s%s%s\n"),
|
||||
wee_log_printf (_("Auto-loading %s script: %s%s%s\n"),
|
||||
plugin_name[plugin_type],
|
||||
dir_name, DIR_SEPARATOR, entry->d_name);
|
||||
plugin_load (plugin_type, entry->d_name);
|
||||
}
|
||||
}
|
||||
closedir (dir);
|
||||
}
|
||||
|
||||
/* restore working directory */
|
||||
@@ -114,6 +119,11 @@ plugin_init ()
|
||||
wee_perl_init();
|
||||
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload");
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_PYTHON
|
||||
wee_python_init();
|
||||
plugin_auto_load (PLUGIN_TYPE_PYTHON, "python/autoload");
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -132,12 +142,18 @@ plugin_load (int plugin_type, char *filename)
|
||||
#endif
|
||||
break;
|
||||
case PLUGIN_TYPE_PYTHON:
|
||||
/* TODO: load Python script */
|
||||
#ifdef PLUGIN_PYTHON
|
||||
wee_python_load (filename);
|
||||
#endif
|
||||
break;
|
||||
case PLUGIN_TYPE_RUBY:
|
||||
/* TODO: load Ruby script */
|
||||
break;
|
||||
}
|
||||
#else
|
||||
/* make gcc happy */
|
||||
(void) plugin_type;
|
||||
(void) filename;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -178,6 +194,7 @@ plugin_handler_add (t_plugin_handler **plugin_handlers,
|
||||
new_plugin_handler->plugin_type = plugin_type;
|
||||
new_plugin_handler->name = strdup (name);
|
||||
new_plugin_handler->function_name = strdup (function);
|
||||
new_plugin_handler->running = 0;
|
||||
|
||||
/* add new handler to list */
|
||||
new_plugin_handler->prev_handler = *last_plugin_handler;
|
||||
@@ -273,7 +290,7 @@ plugin_handler_free_all_type (t_plugin_handler **plugin_handlers,
|
||||
*/
|
||||
|
||||
void
|
||||
plugin_event_msg (char *irc_command, char *arguments, char *server)
|
||||
plugin_event_msg (char *irc_command, char *server, char *arguments)
|
||||
{
|
||||
#ifdef PLUGINS
|
||||
t_plugin_handler *ptr_plugin_handler;
|
||||
@@ -285,7 +302,25 @@ plugin_event_msg (char *irc_command, char *arguments, char *server)
|
||||
{
|
||||
#ifdef PLUGIN_PERL
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PERL)
|
||||
wee_perl_exec (ptr_plugin_handler->function_name, arguments, server);
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
{
|
||||
ptr_plugin_handler->running = 1;
|
||||
wee_perl_exec (ptr_plugin_handler->function_name, server, arguments);
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef PLUGIN_PYTHON
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
{
|
||||
ptr_plugin_handler->running = 1;
|
||||
wee_python_exec (ptr_plugin_handler->function_name, server, arguments);
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -293,6 +328,7 @@ plugin_event_msg (char *irc_command, char *arguments, char *server)
|
||||
/* make gcc happy */
|
||||
(void) irc_command;
|
||||
(void) arguments;
|
||||
(void) server;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -301,7 +337,7 @@ plugin_event_msg (char *irc_command, char *arguments, char *server)
|
||||
*/
|
||||
|
||||
int
|
||||
plugin_exec_command (char *user_command, char *arguments, char *server)
|
||||
plugin_exec_command (char *user_command, char *server, char *arguments)
|
||||
{
|
||||
#ifdef PLUGINS
|
||||
t_plugin_handler *ptr_plugin_handler;
|
||||
@@ -313,7 +349,25 @@ plugin_exec_command (char *user_command, char *arguments, char *server)
|
||||
{
|
||||
#ifdef PLUGIN_PERL
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PERL)
|
||||
wee_perl_exec (ptr_plugin_handler->function_name, arguments, server);
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
{
|
||||
ptr_plugin_handler->running = 1;
|
||||
wee_perl_exec (ptr_plugin_handler->function_name, server, arguments);
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef PLUGIN_PYTHON
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
{
|
||||
ptr_plugin_handler->running = 1;
|
||||
wee_python_exec (ptr_plugin_handler->function_name, server, arguments);
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* command executed */
|
||||
@@ -324,12 +378,71 @@ plugin_exec_command (char *user_command, char *arguments, char *server)
|
||||
/* make gcc happy */
|
||||
(void) user_command;
|
||||
(void) arguments;
|
||||
(void) server;
|
||||
#endif
|
||||
|
||||
/* no command executed */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* plugin_find_buffer: find a buffer for text display or command execution
|
||||
*/
|
||||
|
||||
t_gui_buffer *
|
||||
plugin_find_buffer (char *server, char *channel)
|
||||
{
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
|
||||
ptr_server = NULL;
|
||||
ptr_channel = NULL;
|
||||
ptr_buffer = NULL;
|
||||
|
||||
if (server && server[0])
|
||||
{
|
||||
ptr_server = server_search (server);
|
||||
if (!ptr_server)
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_server = SERVER(gui_current_window->buffer);
|
||||
if (!ptr_server)
|
||||
ptr_server = SERVER(gui_buffers);
|
||||
}
|
||||
|
||||
if (channel && channel[0])
|
||||
{
|
||||
if (ptr_server)
|
||||
{
|
||||
ptr_channel = channel_search (ptr_server, channel);
|
||||
if (ptr_channel)
|
||||
ptr_buffer = ptr_channel->buffer;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!channel)
|
||||
{
|
||||
ptr_buffer = gui_current_window->buffer;
|
||||
if (ptr_buffer->dcc)
|
||||
ptr_buffer = gui_buffers;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ptr_server)
|
||||
ptr_buffer = ptr_server->buffer;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ptr_buffer)
|
||||
return NULL;
|
||||
|
||||
return (ptr_buffer->dcc) ? NULL : ptr_buffer;
|
||||
}
|
||||
|
||||
/*
|
||||
* plugin_unload: unload all scripts for a plugin type
|
||||
*/
|
||||
@@ -337,6 +450,9 @@ plugin_exec_command (char *user_command, char *arguments, char *server)
|
||||
void
|
||||
plugin_unload (int plugin_type, char *scriptname)
|
||||
{
|
||||
/* make gcc happy */
|
||||
(void) scriptname;
|
||||
|
||||
#ifdef PLUGINS
|
||||
switch (plugin_type)
|
||||
{
|
||||
@@ -348,12 +464,18 @@ plugin_unload (int plugin_type, char *scriptname)
|
||||
#endif
|
||||
break;
|
||||
case PLUGIN_TYPE_PYTHON:
|
||||
/* TODO: unload Python scripts */
|
||||
#ifdef PLUGIN_PYTHON
|
||||
wee_python_end ();
|
||||
wee_python_init ();
|
||||
#endif
|
||||
break;
|
||||
case PLUGIN_TYPE_RUBY:
|
||||
/* TODO: unload Ruby scripts */
|
||||
break;
|
||||
}
|
||||
#else
|
||||
/* make gcc happy */
|
||||
(void) plugin_type;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -370,4 +492,8 @@ plugin_end ()
|
||||
#ifdef PLUGIN_PERL
|
||||
wee_perl_end();
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_PYTHON
|
||||
wee_python_end();
|
||||
#endif
|
||||
}
|
||||
|
||||
+11
-2
@@ -21,6 +21,8 @@
|
||||
#ifndef __WEECHAT_PLUGINS_H
|
||||
#define __WEECHAT_PLUGINS_H 1
|
||||
|
||||
#include "../gui/gui.h"
|
||||
|
||||
#define PLUGIN_TYPE_PERL 0
|
||||
#define PLUGIN_TYPE_PYTHON 1
|
||||
#define PLUGIN_TYPE_RUBY 2
|
||||
@@ -45,6 +47,8 @@ struct t_plugin_handler
|
||||
char *name; /* name of IRC command (PRIVMSG, ..)
|
||||
or command (without first '/') */
|
||||
char *function_name; /* name of function (handler) */
|
||||
int running; /* 1 if currently running */
|
||||
/* (used to prevent circular call) */
|
||||
t_plugin_handler *prev_handler; /* link to previous handler */
|
||||
t_plugin_handler *next_handler; /* link to next handler */
|
||||
};
|
||||
@@ -59,17 +63,22 @@ extern t_plugin_handler *last_plugin_cmd_handler;
|
||||
extern t_plugin_script *perl_scripts;
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_PYTHON
|
||||
extern t_plugin_script *python_scripts;
|
||||
#endif
|
||||
|
||||
extern void plugin_auto_load (int, char *);
|
||||
extern void plugin_init ();
|
||||
extern void plugin_load (int, char *);
|
||||
extern void plugin_unload (int, /*@null@*/ char *);
|
||||
extern void plugin_unload (int, char *);
|
||||
extern t_plugin_handler *plugin_handler_search (t_plugin_handler *, char *);
|
||||
extern void plugin_handler_add (t_plugin_handler **, t_plugin_handler **,
|
||||
int, char *, char *);
|
||||
extern void plugin_handler_free_all_type (t_plugin_handler **,
|
||||
t_plugin_handler **, int);
|
||||
extern void plugin_event_msg (char *, char *, char *);
|
||||
extern int plugin_exec_command (char *, /*@null@*/ char *, char *);
|
||||
extern int plugin_exec_command (char *, char *, char *);
|
||||
extern t_gui_buffer *plugin_find_buffer (char *, char *);
|
||||
extern void plugin_end ();
|
||||
|
||||
#endif /* plugins.h */
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Copyright (c) 2003-2005 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.
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PYTHON_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib_weechat_python.a
|
||||
|
||||
lib_weechat_python_a_SOURCES = wee-python.h \
|
||||
wee-python.c
|
||||
@@ -0,0 +1,688 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* wee-python.c: Python plugin support for WeeChat */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <Python.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#undef _
|
||||
#include "../../common/weechat.h"
|
||||
#include "../plugins.h"
|
||||
#include "wee-python.h"
|
||||
#include "../../common/command.h"
|
||||
#include "../../irc/irc.h"
|
||||
#include "../../gui/gui.h"
|
||||
|
||||
|
||||
t_plugin_script *python_scripts = NULL;
|
||||
t_plugin_script *last_python_script = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* weechat.register: startup function for all WeeChat Python scripts
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
wee_python_register (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *name, *version, *shutdown_func, *description;
|
||||
t_plugin_script *ptr_python_script, *python_script_found, *new_python_script;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) self;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "ssss", &name, &version, &shutdown_func, &description))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Python", "register");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
python_script_found = NULL;
|
||||
for (ptr_python_script = python_scripts; ptr_python_script;
|
||||
ptr_python_script = ptr_python_script->next_script)
|
||||
{
|
||||
if (strcasecmp (ptr_python_script->name, name) == 0)
|
||||
{
|
||||
python_script_found = ptr_python_script;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (python_script_found)
|
||||
{
|
||||
/* error: another scripts already exists with this name! */
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: unable to register \"%s\" script (another script "
|
||||
"already exists with this name)\n"),
|
||||
"Python", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* registering script */
|
||||
new_python_script = (t_plugin_script *)malloc (sizeof (t_plugin_script));
|
||||
if (new_python_script)
|
||||
{
|
||||
new_python_script->name = strdup (name);
|
||||
new_python_script->version = strdup (version);
|
||||
new_python_script->shutdown_func = strdup (shutdown_func);
|
||||
new_python_script->description = strdup (description);
|
||||
|
||||
/* add new script to list */
|
||||
new_python_script->prev_script = last_python_script;
|
||||
new_python_script->next_script = NULL;
|
||||
if (python_scripts)
|
||||
last_python_script->next_script = new_python_script;
|
||||
else
|
||||
python_scripts = new_python_script;
|
||||
last_python_script = new_python_script;
|
||||
|
||||
wee_log_printf (_("Registered %s script: \"%s\", version %s (%s)\n"),
|
||||
"Python", name, version, description);
|
||||
}
|
||||
else
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: unable to load script \"%s\" (not enough memory)\n"),
|
||||
"Python", name);
|
||||
}
|
||||
}
|
||||
|
||||
Py_INCREF (Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat.print: print message into a buffer (current or specified one)
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
wee_python_print (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *message, *channel_name, *server_name;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) self;
|
||||
|
||||
message = NULL;
|
||||
channel_name = NULL;
|
||||
server_name = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "s|ss", &message, &channel_name, &server_name))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Python", "prnt");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr_buffer = plugin_find_buffer (server_name, channel_name);
|
||||
if (ptr_buffer)
|
||||
{
|
||||
irc_display_prefix (ptr_buffer, PREFIX_PLUGIN);
|
||||
gui_printf (ptr_buffer, "%s\n", message);
|
||||
return Py_BuildValue ("i", 1);
|
||||
}
|
||||
|
||||
/* buffer not found */
|
||||
return Py_BuildValue ("i", 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat.print_infobar: print message to infobar
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
wee_python_print_infobar (PyObject *self, PyObject *args)
|
||||
{
|
||||
int delay;
|
||||
char *message;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) self;
|
||||
|
||||
delay = 1;
|
||||
message = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "is", &delay, &message))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Python", "print_infobar");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gui_infobar_printf (delay, COLOR_WIN_INFOBAR, message);
|
||||
|
||||
Py_INCREF (Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat.command: send command to server
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
wee_python_command (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *command, *channel_name, *server_name;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) self;
|
||||
|
||||
command = NULL;
|
||||
channel_name = NULL;
|
||||
server_name = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "s|ss", &command, &channel_name, &server_name))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Python", "command");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr_buffer = plugin_find_buffer (server_name, channel_name);
|
||||
if (ptr_buffer)
|
||||
{
|
||||
user_command (SERVER(ptr_buffer), ptr_buffer, command);
|
||||
return Py_BuildValue ("i", 1);
|
||||
}
|
||||
|
||||
/* buffer not found */
|
||||
return Py_BuildValue ("i", 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat.add_message_handler: add handler for messages
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
wee_python_add_message_handler (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *message, *function;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) self;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "ss", &message, &function))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Python", "add_message_handler");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
plugin_handler_add (&plugin_msg_handlers, &last_plugin_msg_handler,
|
||||
PLUGIN_TYPE_PYTHON, message, function);
|
||||
|
||||
Py_INCREF (Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat.add_command_handler: define/redefines commands
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
wee_python_add_command_handler(PyObject *self, PyObject *args)
|
||||
{
|
||||
char *name, *function;
|
||||
t_plugin_handler *ptr_plugin_handler;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) self;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "ss", &name, &function))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Python", "add_command_handler");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!weelist_search (index_commands, name))
|
||||
weelist_add (&index_commands, &last_index_command, name);
|
||||
|
||||
ptr_plugin_handler = plugin_handler_search (plugin_cmd_handlers, name);
|
||||
if (ptr_plugin_handler)
|
||||
{
|
||||
free (ptr_plugin_handler->function_name);
|
||||
ptr_plugin_handler->function_name = strdup (function);
|
||||
}
|
||||
else
|
||||
plugin_handler_add (&plugin_cmd_handlers, &last_plugin_cmd_handler,
|
||||
PLUGIN_TYPE_PYTHON, name, function);
|
||||
|
||||
Py_INCREF (Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat.get_info: get various infos
|
||||
*/
|
||||
|
||||
static PyObject *
|
||||
wee_python_get_info (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *arg, *info = NULL, *server = NULL;
|
||||
t_irc_server *ptr_server;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) self;
|
||||
|
||||
if (!PyArg_ParseTuple (args, "s|s", &arg, &server))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Python", "get_info");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (server == NULL)
|
||||
{
|
||||
ptr_server = SERVER(gui_current_window->buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (strcasecmp (ptr_server->name, server) == 0)
|
||||
break;
|
||||
}
|
||||
if (!ptr_server)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: server not found for \"%s\" function\n"),
|
||||
"Python", "get_info");
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr_server && arg)
|
||||
{
|
||||
if ( (strcasecmp (arg, "0") == 0) || (strcasecmp (arg, "version") == 0) )
|
||||
{
|
||||
info = PACKAGE_STRING;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "1") == 0) || (strcasecmp (arg, "nick") == 0) )
|
||||
{
|
||||
if (ptr_server->nick)
|
||||
info = ptr_server->nick;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "2") == 0) || (strcasecmp (arg, "channel") == 0) )
|
||||
{
|
||||
if (BUFFER_IS_CHANNEL (gui_current_window->buffer))
|
||||
info = CHANNEL (gui_current_window->buffer)->name;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "3") == 0) || (strcasecmp (arg, "server") == 0) )
|
||||
{
|
||||
if (ptr_server->name)
|
||||
info = ptr_server->name;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "4") == 0) || (strcasecmp (arg, "weechatdir") == 0) )
|
||||
{
|
||||
info = weechat_home;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "5") == 0) || (strcasecmp (arg, "away") == 0) )
|
||||
{
|
||||
return Py_BuildValue ("i", SERVER(gui_current_window->buffer)->is_away);
|
||||
}
|
||||
|
||||
if (info)
|
||||
return Py_BuildValue ("s", info);
|
||||
else
|
||||
return Py_BuildValue ("s", "");
|
||||
}
|
||||
|
||||
return Py_BuildValue ("i", 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Python subroutines
|
||||
*/
|
||||
|
||||
static
|
||||
PyMethodDef weechat_funcs[] = {
|
||||
{ "register", wee_python_register, METH_VARARGS, "" },
|
||||
{ "prnt", wee_python_print, METH_VARARGS, "" },
|
||||
{ "print_infobar", wee_python_print_infobar, METH_VARARGS, "" },
|
||||
{ "command", wee_python_command, METH_VARARGS, "" },
|
||||
{ "add_message_handler", wee_python_add_message_handler, METH_VARARGS, "" },
|
||||
{ "add_command_handler", wee_python_add_command_handler, METH_VARARGS, "" },
|
||||
{ "get_info", wee_python_get_info, METH_VARARGS, "" },
|
||||
{ NULL, NULL, 0, NULL }
|
||||
};
|
||||
|
||||
/*
|
||||
* wee_python_init: initialize Python interface for WeeChat
|
||||
*/
|
||||
|
||||
void
|
||||
wee_python_init ()
|
||||
{
|
||||
|
||||
Py_Initialize ();
|
||||
if (Py_IsInitialized () == 0)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("%s error: error while launching interpreter\n"),
|
||||
"Python");
|
||||
}
|
||||
else
|
||||
{
|
||||
wee_log_printf (_("Loading %s module \"weechat\"\n"), "Python");
|
||||
Py_InitModule ("weechat", weechat_funcs);
|
||||
|
||||
if (PyRun_SimpleString (
|
||||
"import weechat, sys, string\n"
|
||||
|
||||
"class weechatStdout:\n"
|
||||
"\tdef write(self, str):\n"
|
||||
"\t\tstr = string.strip(str)\n"
|
||||
"\t\tif str != \"\":\n"
|
||||
"\t\t\tweechat.prnt(\"Python stdout : \" + str, \"\")\n"
|
||||
|
||||
"class weechatStderr:\n"
|
||||
"\tdef write(self, str):\n"
|
||||
"\t\tstr = string.strip(str)\n"
|
||||
"\t\tif str != \"\":\n"
|
||||
"\t\t\tweechat.prnt(\"Python stderr : \" + str, \"\")\n"
|
||||
|
||||
"sys.stdout = weechatStdout()\n"
|
||||
"sys.stderr = weechatStderr()\n"
|
||||
) != 0)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL,
|
||||
_("%s error: error while redirecting stdout and stderr\n"),
|
||||
"Python");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_python_search: search a (loaded) Python script by name
|
||||
*/
|
||||
|
||||
t_plugin_script *
|
||||
wee_python_search (char *name)
|
||||
{
|
||||
t_plugin_script *ptr_python_script;
|
||||
|
||||
for (ptr_python_script = python_scripts; ptr_python_script;
|
||||
ptr_python_script = ptr_python_script->next_script)
|
||||
{
|
||||
if (strcmp (ptr_python_script->name, name) == 0)
|
||||
return ptr_python_script;
|
||||
}
|
||||
|
||||
/* script not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_python_exec: execute a Python script
|
||||
*/
|
||||
|
||||
int
|
||||
wee_python_exec (char *function, char *server, char *arguments)
|
||||
{
|
||||
int len, return_code, i, j, alen;
|
||||
char *srv, *args, *runstring;
|
||||
|
||||
return_code = 1;
|
||||
|
||||
if (arguments == NULL)
|
||||
{
|
||||
alen = 0;
|
||||
args = strdup ("");
|
||||
}
|
||||
else
|
||||
{
|
||||
alen = (int) strlen (arguments);
|
||||
args = (char *) malloc ( 2 * alen * sizeof (*args));
|
||||
}
|
||||
|
||||
if (!args)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: unable to run function \"%s\" in script (not enough memory)\n"),
|
||||
"Python", function);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// copy arguments in args to escape double quotes
|
||||
j = 0;
|
||||
for (i=0; i < alen; ++i)
|
||||
{
|
||||
if (arguments[i] == '"' || arguments[i] == '\\')
|
||||
{
|
||||
args[j] = '\\';
|
||||
++j;
|
||||
}
|
||||
args[j] = arguments[i];
|
||||
++j;
|
||||
}
|
||||
args[j] = 0;
|
||||
|
||||
if (server == NULL)
|
||||
srv = strdup ("");
|
||||
else
|
||||
srv = strdup (server);
|
||||
|
||||
if (!srv)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: unable to run function \"%s\" in script (not enough memory)\n"),
|
||||
"Python", function);
|
||||
free (args);
|
||||
return 0;
|
||||
}
|
||||
|
||||
len = (int) strlen (function);
|
||||
len += (int) strlen ("(\"\",\"\")");
|
||||
len += (int) strlen (srv);
|
||||
len += (int) strlen (args);
|
||||
len += 1;
|
||||
|
||||
runstring = (char *) malloc ( len * sizeof (*runstring));
|
||||
|
||||
if (runstring)
|
||||
{
|
||||
sprintf (runstring, "%s(\"%s\",\"%s\")", function, srv, args);
|
||||
|
||||
if (PyRun_SimpleString (runstring) != 0)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: error while running function \"%s\"\n"),
|
||||
"Python", function);
|
||||
return_code = 0;
|
||||
}
|
||||
free (runstring);
|
||||
}
|
||||
else
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: unable to run function \"%s\" in script (not enough memory)\n"),
|
||||
"Python", function);
|
||||
return_code = 0;
|
||||
}
|
||||
|
||||
free (args);
|
||||
free (srv);
|
||||
|
||||
return return_code;
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_python_load: load a Python script
|
||||
*/
|
||||
|
||||
int
|
||||
wee_python_load (char *filename)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
/* execute Python script */
|
||||
wee_log_printf (_("Loading %s script \"%s\"\n"), "Python", filename);
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("Loading %s script \"%s\"\n"), "Python", filename);
|
||||
|
||||
if ((fp = fopen (filename, "r")) == NULL)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: error while opening file \"%s\"\n"),
|
||||
"Python", filename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (PyRun_SimpleFile (fp, filename) != 0)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: error while parsing file \"%s\"\n"),
|
||||
"Python", filename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fclose (fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_python_script_free: free a Python script
|
||||
*/
|
||||
|
||||
void
|
||||
wee_python_script_free (t_plugin_script *ptr_python_script)
|
||||
{
|
||||
t_plugin_script *new_python_scripts;
|
||||
|
||||
/* remove script from list */
|
||||
if (last_python_script == ptr_python_script)
|
||||
last_python_script = ptr_python_script->prev_script;
|
||||
if (ptr_python_script->prev_script)
|
||||
{
|
||||
(ptr_python_script->prev_script)->next_script = ptr_python_script->next_script;
|
||||
new_python_scripts = python_scripts;
|
||||
}
|
||||
else
|
||||
new_python_scripts = ptr_python_script->next_script;
|
||||
|
||||
if (ptr_python_script->next_script)
|
||||
(ptr_python_script->next_script)->prev_script = ptr_python_script->prev_script;
|
||||
|
||||
/* free data */
|
||||
if (ptr_python_script->name)
|
||||
free (ptr_python_script->name);
|
||||
if (ptr_python_script->version)
|
||||
free (ptr_python_script->version);
|
||||
if (ptr_python_script->shutdown_func)
|
||||
free (ptr_python_script->shutdown_func);
|
||||
if (ptr_python_script->description)
|
||||
free (ptr_python_script->description);
|
||||
free (ptr_python_script);
|
||||
python_scripts = new_python_scripts;
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_python_unload: unload a Python script
|
||||
*/
|
||||
|
||||
void
|
||||
wee_python_unload (t_plugin_script *ptr_python_script)
|
||||
{
|
||||
if (ptr_python_script)
|
||||
{
|
||||
wee_log_printf (_("Unloading %s script \"%s\"\n"),
|
||||
"Python", ptr_python_script->name);
|
||||
|
||||
/* call shutdown callback function */
|
||||
if (ptr_python_script->shutdown_func[0])
|
||||
wee_python_exec (ptr_python_script->shutdown_func, "", "");
|
||||
wee_python_script_free (ptr_python_script);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_python_unload_all: unload all Python scripts
|
||||
*/
|
||||
|
||||
void
|
||||
wee_python_unload_all ()
|
||||
{
|
||||
wee_log_printf (_("Unloading all %s scripts...\n"), "Python");
|
||||
while (python_scripts)
|
||||
wee_python_unload (python_scripts);
|
||||
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("%s scripts unloaded\n"), "Python");
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_python_end: shutdown Python interface
|
||||
*/
|
||||
|
||||
void
|
||||
wee_python_end ()
|
||||
{
|
||||
/* unload all scripts */
|
||||
wee_python_unload_all ();
|
||||
|
||||
/* free all handlers */
|
||||
plugin_handler_free_all_type (&plugin_msg_handlers,
|
||||
&last_plugin_msg_handler,
|
||||
PLUGIN_TYPE_PYTHON);
|
||||
plugin_handler_free_all_type (&plugin_cmd_handlers,
|
||||
&last_plugin_cmd_handler,
|
||||
PLUGIN_TYPE_PYTHON);
|
||||
|
||||
/* free Python interpreter */
|
||||
Py_Finalize ();
|
||||
if (Py_IsInitialized () != 0)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("%s error: error while freeing interpreter\n"),
|
||||
"Python");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
* See README for License detail, AUTHORS for developers list.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __WEECHAT_PYTHON_H
|
||||
#define __WEECHAT_PYTHON_H 1
|
||||
|
||||
#include "../plugins.h"
|
||||
|
||||
extern void wee_python_init ();
|
||||
extern t_plugin_script *wee_python_search (char *);
|
||||
extern int wee_python_exec (char *, char *, char *);
|
||||
extern int wee_python_load (char *);
|
||||
extern void wee_python_unload (t_plugin_script *);
|
||||
extern void wee_python_unload_all ();
|
||||
extern void wee_python_end ();
|
||||
|
||||
#endif /* wee-python.h */
|
||||
+11
-7
@@ -1,4 +1,4 @@
|
||||
.TH WEECHAT 1 "January 2005" "FlashCode"
|
||||
.TH WEECHAT 1 "July 2005" "FlashCode"
|
||||
|
||||
.SH NAME
|
||||
weechat-curses \- Wee Enhanced Environment for Chat (Curses version)
|
||||
@@ -27,6 +27,10 @@ display config file help (list of options)
|
||||
.br
|
||||
display summary of options
|
||||
.TP
|
||||
.B \-i, \-\-irc\-commands
|
||||
.br
|
||||
display IRC commands
|
||||
.TP
|
||||
.B \-l, \-\-license
|
||||
.br
|
||||
display program license
|
||||
@@ -34,12 +38,16 @@ display program license
|
||||
.B \-v, \-\-version
|
||||
.br
|
||||
display WeeChat version
|
||||
.TP
|
||||
.B \-w, \-\-weechat\-commands
|
||||
.br
|
||||
display WeeChat commands
|
||||
|
||||
.SH URL
|
||||
WeeChat can use an URL (Uniform Resource Locator) to automatically connect
|
||||
to an IRC server. These are in the following form:
|
||||
.TP
|
||||
.B irc://[[nickname][:password]@]server[:port][/[#&+!]channel]
|
||||
.B irc[6][s]://[[nickname][:password]@]server[:port][/[#&+!]channel[,channel...]]
|
||||
.TP
|
||||
Exemple to join WeeChat channel support with nick "FlashCode":
|
||||
irc://FlashCode@irc.freenode.net/weechat
|
||||
@@ -53,11 +61,7 @@ configuration file for WeeChat
|
||||
WeeChat log file
|
||||
|
||||
.SH AUTHOR
|
||||
WeeChat is written by:
|
||||
.br
|
||||
- FlashCode <flashcode@flashtux.org>
|
||||
- Bounga <bounga@altern.org>
|
||||
- Xahlexx <xahlexx@weeland.org>
|
||||
WeeChat is written by FlashCode <flashcode@flashtux.org>
|
||||
.br
|
||||
WeeChat on the web:
|
||||
.UR
|
||||
|
||||
+11
-3
@@ -1,5 +1,5 @@
|
||||
%define name weechat
|
||||
%define version 0.0.9
|
||||
%define version 0.1.3
|
||||
%define release 1
|
||||
|
||||
Name: %{name}
|
||||
@@ -10,7 +10,7 @@ Source: http://weechat.flashtux.org/download/%{name}-%{version}.tar.gz
|
||||
URL: http://weechat.flashtux.org
|
||||
Group: Networking/IRC
|
||||
BuildRoot: %{_tmppath}/%{name}-buildroot
|
||||
Requires: perl
|
||||
Requires: perl, python, libgnutls
|
||||
License: GPL
|
||||
|
||||
%description
|
||||
@@ -23,7 +23,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure --enable-perl
|
||||
./configure --enable-perl --enable-python
|
||||
make DESTDIR="$RPM_BUILD_ROOT" LOCALRPM="local"
|
||||
|
||||
%install
|
||||
@@ -41,6 +41,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/local/bin/weechat-curses
|
||||
|
||||
%changelog
|
||||
* Sat Jul 02 2005 FlashCode <flashcode@flashtux.org> 0.1.3-1
|
||||
- Released version 0.1.3
|
||||
* Sat May 21 2005 FlashCode <flashcode@flashtux.org> 0.1.2-1
|
||||
- Released version 0.1.2
|
||||
* Sat Mar 20 2005 FlashCode <flashcode@flashtux.org> 0.1.1-1
|
||||
- Released version 0.1.1
|
||||
* Sat Feb 12 2005 FlashCode <flashcode@flashtux.org> 0.1.0-1
|
||||
- Released version 0.1.0
|
||||
* Sat Jan 01 2005 FlashCode <flashcode@flashtux.org> 0.0.9-1
|
||||
- Released version 0.0.9
|
||||
* Sat Oct 30 2004 FlashCode <flashcode@flashtux.org> 0.0.8-1
|
||||
|
||||
@@ -0,0 +1,996 @@
|
||||
1 Notes on the Free Translation Project
|
||||
***************************************
|
||||
|
||||
Free software is going international! The Free Translation Project is
|
||||
a way to get maintainers of free software, translators, and users all
|
||||
together, so that free software will gradually become able to speak many
|
||||
languages. A few packages already provide translations for their
|
||||
messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do _not_
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work on translations can contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
1.1 Quick configuration advice
|
||||
==============================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias, message inheritance, automatic
|
||||
charset conversion or plural form handling) as the implementation here.
|
||||
It is also not possible to offer this additional functionality on top
|
||||
of a `catgets' implementation. Future versions of GNU `gettext' will
|
||||
very likely convey even more functionality. So it might be a good idea
|
||||
to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need _not_ provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
1.2 INSTALL Matters
|
||||
===================
|
||||
|
||||
Some packages are "localizable" when properly installed; the programs
|
||||
they contain can be made to speak your own native language. Most such
|
||||
packages use GNU `gettext'. Other packages have their own ways to
|
||||
internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system already
|
||||
provides the GNU `gettext' functions. If not, the included GNU
|
||||
`gettext' library will be used. This library is wholly contained
|
||||
within this package, usually in the `intl/' subdirectory, so prior
|
||||
installation of the GNU `gettext' package is _not_ required.
|
||||
Installers may use special options at configuration time for changing
|
||||
the default behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --disable-nls
|
||||
|
||||
will, respectively, bypass any pre-existing `gettext' to use the
|
||||
internationalizing routines provided within this package, or else,
|
||||
_totally_ disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might not be desirable. You should use
|
||||
the more recent version of the GNU `gettext' library. I.e. if the file
|
||||
`intl/VERSION' shows that the library which comes with this package is
|
||||
more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
The configuration process will not test for the `catgets' function
|
||||
and therefore it will not be used. The reason is that even an
|
||||
emulation of `gettext' on top of `catgets' could not provide all the
|
||||
extensions of the GNU `gettext' library.
|
||||
|
||||
Internationalized packages usually have many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
1.3 Using This Package
|
||||
======================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
||||
suppose that you speak German and live in Germany. At the shell
|
||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
||||
This can be done from your `.login' or `.profile' file, once and for
|
||||
all.
|
||||
|
||||
You might think that the country code specification is redundant.
|
||||
But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
||||
language and `CC' denoting the country, is the one use on systems based
|
||||
on GNU libc. On other systems, some variations of this scheme are
|
||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
||||
locales supported by your system for your country by running the command
|
||||
`locale -a | grep '^LL''.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
This is done through a different environment variable, called
|
||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
||||
for the purpose of message handling, but you still need to have `LANG'
|
||||
set to the primary language; this is required by other parts of the
|
||||
system libraries. For example, some Swedish users who would rather
|
||||
read translations in German than English for when Swedish is not
|
||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
||||
|
||||
Special advice for Norwegian users: The language code for Norwegian
|
||||
bokma*l changed from `no' to `nb' recently (in 2003). During the
|
||||
transition period, while some message catalogs for this language are
|
||||
installed under `nb' and some older ones under `no', it's recommended
|
||||
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
|
||||
older translations are used.
|
||||
|
||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
||||
to denote the language's main dialect. For example, `de' is equivalent
|
||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
||||
(Portuguese as spoken in Portugal) in this context.
|
||||
|
||||
1.4 Translating Teams
|
||||
=====================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list. The up-to-date list of
|
||||
teams can be found at the Free Translation Project's homepage,
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
||||
area.
|
||||
|
||||
If you'd like to volunteer to _work_ at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is _not_ the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
_actively_ in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
1.5 Available Packages
|
||||
======================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of May 2005.
|
||||
The matrix shows, in regard of each package, for which languages PO
|
||||
files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB
|
||||
+-------------------------------------------------+
|
||||
GNUnet | |
|
||||
a2ps | [] [] [] [] [] |
|
||||
aegis | () |
|
||||
ant-phone | () |
|
||||
anubis | [] |
|
||||
ap-utils | |
|
||||
aspell | [] [] [] [] |
|
||||
bash | [] [] |
|
||||
batchelor | [] |
|
||||
bfd | |
|
||||
bibshelf | [] |
|
||||
binutils | [] |
|
||||
bison | [] [] |
|
||||
bluez-pin | [] [] [] [] |
|
||||
clisp | [] [] |
|
||||
console-tools | [] [] |
|
||||
coreutils | [] [] [] [] |
|
||||
cpio | |
|
||||
cpplib | [] [] [] |
|
||||
darkstat | [] () [] |
|
||||
dialog | [] [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] |
|
||||
doodle | [] |
|
||||
e2fsprogs | [] [] |
|
||||
enscript | [] [] [] [] |
|
||||
error | [] [] [] [] |
|
||||
fetchmail | [] [] () [] |
|
||||
fileutils | [] [] |
|
||||
findutils | [] [] [] |
|
||||
flex | [] [] [] |
|
||||
fslint | [] |
|
||||
gas | |
|
||||
gawk | [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] |
|
||||
gcc | [] |
|
||||
gettext-examples | [] [] [] [] |
|
||||
gettext-runtime | [] [] [] [] |
|
||||
gettext-tools | [] [] |
|
||||
gimp-print | [] [] [] [] |
|
||||
gip | |
|
||||
gliv | [] |
|
||||
glunarclock | |
|
||||
gmult | [] [] |
|
||||
gnubiff | () |
|
||||
gnucash | [] () () [] |
|
||||
gnucash-glossary | [] () |
|
||||
gpe-aerial | [] [] |
|
||||
gpe-beam | [] [] |
|
||||
gpe-calendar | [] [] |
|
||||
gpe-clock | [] [] |
|
||||
gpe-conf | [] [] |
|
||||
gpe-contacts | |
|
||||
gpe-edit | [] |
|
||||
gpe-go | [] |
|
||||
gpe-login | [] [] |
|
||||
gpe-ownerinfo | [] [] |
|
||||
gpe-sketchbook | [] [] |
|
||||
gpe-su | [] [] |
|
||||
gpe-taskmanager | [] [] |
|
||||
gpe-timesheet | [] |
|
||||
gpe-today | [] [] |
|
||||
gpe-todo | [] [] |
|
||||
gphoto2 | [] [] [] [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () |
|
||||
gramadoir | [] [] |
|
||||
grep | [] [] [] [] [] [] |
|
||||
gretl | |
|
||||
gsasl | [] |
|
||||
gss | |
|
||||
gst-plugins | [] [] [] [] [] [] |
|
||||
gstreamer | [] [] [] [] [] |
|
||||
gtick | [] () |
|
||||
gtkspell | [] [] [] |
|
||||
hello | [] [] [] [] |
|
||||
id-utils | [] [] |
|
||||
impost | |
|
||||
indent | [] [] |
|
||||
iso_3166 | |
|
||||
iso_3166_1 | [] [] [] [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | |
|
||||
iso_639 | |
|
||||
jpilot | [] |
|
||||
jtag | |
|
||||
jwhois | |
|
||||
kbd | [] [] [] [] |
|
||||
latrine | () |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] |
|
||||
libextractor | |
|
||||
libgpewidget | [] [] [] |
|
||||
libgphoto2 | [] |
|
||||
libgphoto2_port | [] |
|
||||
libgsasl | |
|
||||
libiconv | [] [] [] [] [] |
|
||||
libidn | |
|
||||
lifelines | [] () |
|
||||
lilypond | [] |
|
||||
lingoteach | |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
mailutils | [] |
|
||||
make | [] [] |
|
||||
man-db | [] () [] [] |
|
||||
minicom | [] [] |
|
||||
mysecretdiary | [] [] |
|
||||
nano | [] () [] |
|
||||
nano_1_0 | [] () [] [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] [] |
|
||||
psmisc | |
|
||||
ptx | [] [] [] |
|
||||
pwdutils | |
|
||||
python | |
|
||||
radius | [] |
|
||||
recode | [] [] [] [] [] |
|
||||
rpm | [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] [] [] [] [] [] |
|
||||
sed | [] [] |
|
||||
sh-utils | [] [] |
|
||||
shared-mime-info | [] [] |
|
||||
sharutils | [] [] [] [] [] |
|
||||
silky | |
|
||||
skencil | [] () |
|
||||
sketch | [] () |
|
||||
solfege | [] |
|
||||
soundtracker | [] [] |
|
||||
sp | [] |
|
||||
stardict | [] |
|
||||
tar | |
|
||||
texinfo | [] [] |
|
||||
textutils | [] [] [] |
|
||||
tin | () () |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] [] |
|
||||
vorbis-tools | [] [] [] [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] |
|
||||
wget | |
|
||||
xchat | [] [] [] [] [] |
|
||||
xkeyboard-config | |
|
||||
xpad | |
|
||||
+-------------------------------------------------+
|
||||
af am ar az be bg bs ca cs cy da de el en en_GB
|
||||
10 0 0 2 7 5 0 40 43 2 51 91 19 1 14
|
||||
|
||||
eo es et eu fa fi fr ga gl he hi hr hu id is
|
||||
+-----------------------------------------------+
|
||||
GNUnet | |
|
||||
a2ps | [] [] [] |
|
||||
aegis | |
|
||||
ant-phone | [] |
|
||||
anubis | [] |
|
||||
ap-utils | [] |
|
||||
aspell | [] [] |
|
||||
bash | [] [] [] [] |
|
||||
batchelor | [] [] |
|
||||
bfd | [] |
|
||||
bibshelf | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] [] |
|
||||
bluez-pin | [] [] [] [] [] [] |
|
||||
clisp | [] [] |
|
||||
console-tools | |
|
||||
coreutils | [] [] [] [] [] |
|
||||
cpio | [] [] |
|
||||
cpplib | [] [] |
|
||||
darkstat | [] () [] [] [] |
|
||||
dialog | [] [] [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] [] [] [] |
|
||||
doodle | [] |
|
||||
e2fsprogs | [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] [] [] [] |
|
||||
fetchmail | [] |
|
||||
fileutils | [] [] [] [] [] |
|
||||
findutils | [] [] [] [] |
|
||||
flex | [] [] [] |
|
||||
fslint | [] |
|
||||
gas | [] [] |
|
||||
gawk | [] [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] [] |
|
||||
gcc | [] |
|
||||
gettext-examples | [] [] [] |
|
||||
gettext-runtime | [] [] [] [] [] |
|
||||
gettext-tools | [] [] |
|
||||
gimp-print | [] [] |
|
||||
gip | [] [] [] |
|
||||
gliv | () |
|
||||
glunarclock | [] [] [] |
|
||||
gmult | [] [] |
|
||||
gnubiff | () |
|
||||
gnucash | [] () |
|
||||
gnucash-glossary | [] |
|
||||
gpe-aerial | [] [] |
|
||||
gpe-beam | [] [] |
|
||||
gpe-calendar | [] [] [] [] |
|
||||
gpe-clock | [] [] [] |
|
||||
gpe-conf | [] |
|
||||
gpe-contacts | [] |
|
||||
gpe-edit | [] [] |
|
||||
gpe-go | [] [] |
|
||||
gpe-login | [] [] [] |
|
||||
gpe-ownerinfo | [] [] [] [] [] |
|
||||
gpe-sketchbook | [] [] |
|
||||
gpe-su | [] [] [] |
|
||||
gpe-taskmanager | [] [] [] |
|
||||
gpe-timesheet | [] [] [] [] |
|
||||
gpe-today | [] [] [] [] |
|
||||
gpe-todo | [] [] [] |
|
||||
gphoto2 | [] [] [] [] |
|
||||
gprof | [] [] [] |
|
||||
gpsdrive | () () [] |
|
||||
gramadoir | [] [] |
|
||||
grep | [] [] [] [] [] [] [] [] [] [] [] |
|
||||
gretl | [] [] |
|
||||
gsasl | [] [] [] |
|
||||
gss | [] |
|
||||
gst-plugins | [] [] |
|
||||
gstreamer | |
|
||||
gtick | [] [] [] [] |
|
||||
gtkspell | [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
impost | [] [] |
|
||||
indent | [] [] [] [] [] [] [] [] [] [] |
|
||||
iso_3166 | [] [] [] |
|
||||
iso_3166_1 | [] [] [] [] [] [] [] |
|
||||
iso_3166_2 | [] |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | [] [] [] |
|
||||
iso_639 | [] [] [] [] |
|
||||
jpilot | [] [] |
|
||||
jtag | [] |
|
||||
jwhois | [] [] [] [] |
|
||||
kbd | [] [] |
|
||||
latrine | [] [] |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] |
|
||||
libextractor | |
|
||||
libgpewidget | [] [] [] [] [] |
|
||||
libgphoto2 | [] [] [] |
|
||||
libgphoto2_port | [] |
|
||||
libgsasl | [] [] |
|
||||
libiconv | [] [] [] [] [] [] [] [] [] [] |
|
||||
libidn | [] [] |
|
||||
lifelines | () |
|
||||
lilypond | |
|
||||
lingoteach | [] [] |
|
||||
lynx | [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
mailutils | [] [] |
|
||||
make | [] [] [] [] [] [] [] |
|
||||
man-db | () |
|
||||
minicom | [] [] [] [] |
|
||||
mysecretdiary | [] [] [] |
|
||||
nano | [] [] () [] |
|
||||
nano_1_0 | [] [] [] [] |
|
||||
opcodes | [] [] [] |
|
||||
parted | [] [] [] |
|
||||
psmisc | [] |
|
||||
ptx | [] [] [] [] [] [] [] [] [] |
|
||||
pwdutils | |
|
||||
python | |
|
||||
radius | [] [] |
|
||||
recode | [] [] [] [] [] [] [] |
|
||||
rpm | [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] |
|
||||
sed | [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] |
|
||||
shared-mime-info | [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] |
|
||||
silky | [] |
|
||||
skencil | [] [] |
|
||||
sketch | [] [] |
|
||||
solfege | |
|
||||
soundtracker | [] [] |
|
||||
sp | [] |
|
||||
stardict | [] |
|
||||
tar | [] [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] [] [] [] |
|
||||
tin | [] () |
|
||||
tp-robot | [] [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | [] [] |
|
||||
util-linux | [] [] [] [] [] |
|
||||
vorbis-tools | [] [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] [] [] [] |
|
||||
wget | [] [] [] [] |
|
||||
xchat | [] [] [] [] [] |
|
||||
xkeyboard-config | |
|
||||
xpad | [] [] [] |
|
||||
+-----------------------------------------------+
|
||||
eo es et eu fa fi fr ga gl he hi hr hu id is
|
||||
15 85 21 15 2 35 115 45 16 8 1 6 40 27 1
|
||||
|
||||
it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
|
||||
+--------------------------------------------------+
|
||||
GNUnet | |
|
||||
a2ps | () () [] [] () |
|
||||
aegis | () |
|
||||
ant-phone | [] |
|
||||
anubis | [] [] [] |
|
||||
ap-utils | |
|
||||
aspell | [] [] |
|
||||
bash | [] |
|
||||
batchelor | [] |
|
||||
bfd | |
|
||||
bibshelf | [] |
|
||||
binutils | |
|
||||
bison | [] [] [] [] |
|
||||
bluez-pin | [] [] |
|
||||
clisp | [] |
|
||||
console-tools | |
|
||||
coreutils | [] [] |
|
||||
cpio | |
|
||||
cpplib | [] |
|
||||
darkstat | [] [] |
|
||||
dialog | [] [] |
|
||||
diffutils | [] [] [] [] |
|
||||
doodle | [] |
|
||||
e2fsprogs | [] |
|
||||
enscript | [] |
|
||||
error | [] |
|
||||
fetchmail | [] [] |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] |
|
||||
flex | [] [] |
|
||||
fslint | [] |
|
||||
gas | |
|
||||
gawk | [] [] |
|
||||
gbiff | [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext-examples | [] [] [] |
|
||||
gettext-runtime | [] [] [] [] |
|
||||
gettext-tools | [] [] [] |
|
||||
gimp-print | [] [] |
|
||||
gip | [] |
|
||||
gliv | [] |
|
||||
glunarclock | [] [] |
|
||||
gmult | [] [] |
|
||||
gnubiff | () |
|
||||
gnucash | [] () () [] |
|
||||
gnucash-glossary | [] [] |
|
||||
gpe-aerial | [] |
|
||||
gpe-beam | [] |
|
||||
gpe-calendar | [] |
|
||||
gpe-clock | [] |
|
||||
gpe-conf | [] |
|
||||
gpe-contacts | |
|
||||
gpe-edit | [] |
|
||||
gpe-go | [] |
|
||||
gpe-login | [] |
|
||||
gpe-ownerinfo | [] |
|
||||
gpe-sketchbook | [] |
|
||||
gpe-su | [] |
|
||||
gpe-taskmanager | [] [] |
|
||||
gpe-timesheet | [] |
|
||||
gpe-today | [] |
|
||||
gpe-todo | [] |
|
||||
gphoto2 | [] [] [] |
|
||||
gprof | |
|
||||
gpsdrive | () () () () |
|
||||
gramadoir | () |
|
||||
grep | [] [] [] [] |
|
||||
gretl | [] |
|
||||
gsasl | [] |
|
||||
gss | |
|
||||
gst-plugins | [] [] |
|
||||
gstreamer | [] [] |
|
||||
gtick | [] [] |
|
||||
gtkspell | [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] |
|
||||
impost | |
|
||||
indent | [] [] [] |
|
||||
iso_3166 | [] |
|
||||
iso_3166_1 | [] [] |
|
||||
iso_3166_2 | [] |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | [] [] [] |
|
||||
iso_639 | [] [] [] |
|
||||
jpilot | () () () |
|
||||
jtag | |
|
||||
jwhois | [] [] |
|
||||
kbd | [] |
|
||||
latrine | [] [] |
|
||||
ld | |
|
||||
libc | [] [] [] [] [] |
|
||||
libextractor | |
|
||||
libgpewidget | [] |
|
||||
libgphoto2 | [] [] |
|
||||
libgphoto2_port | [] [] |
|
||||
libgsasl | [] |
|
||||
libiconv | [] [] |
|
||||
libidn | [] |
|
||||
lifelines | [] |
|
||||
lilypond | |
|
||||
lingoteach | [] [] |
|
||||
lynx | [] [] [] |
|
||||
m4 | [] [] |
|
||||
mailutils | |
|
||||
make | [] [] [] |
|
||||
man-db | () |
|
||||
minicom | [] |
|
||||
mysecretdiary | [] |
|
||||
nano | [] [] [] |
|
||||
nano_1_0 | [] [] [] [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] [] |
|
||||
psmisc | [] [] [] |
|
||||
ptx | [] [] [] |
|
||||
pwdutils | |
|
||||
python | |
|
||||
radius | |
|
||||
recode | [] [] |
|
||||
rpm | [] [] |
|
||||
screem | [] |
|
||||
scrollkeeper | [] [] [] |
|
||||
sed | [] [] |
|
||||
sh-utils | [] [] [] |
|
||||
shared-mime-info | [] [] [] [] |
|
||||
sharutils | [] [] [] |
|
||||
silky | [] |
|
||||
skencil | |
|
||||
sketch | |
|
||||
solfege | [] [] [] |
|
||||
soundtracker | [] |
|
||||
sp | () |
|
||||
stardict | [] [] |
|
||||
tar | [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] [] |
|
||||
tin | |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] |
|
||||
vorbis-tools | [] |
|
||||
wastesedge | [] |
|
||||
wdiff | [] [] [] |
|
||||
wget | [] |
|
||||
xchat | [] [] [] [] [] |
|
||||
xkeyboard-config | [] |
|
||||
xpad | [] |
|
||||
+--------------------------------------------------+
|
||||
it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
|
||||
46 35 11 2 1 1 2 2 3 11 0 15 96 7 5 0
|
||||
|
||||
or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv
|
||||
+----------------------------------------------+
|
||||
GNUnet | |
|
||||
a2ps | () [] [] [] [] [] [] |
|
||||
aegis | () () |
|
||||
ant-phone | [] |
|
||||
anubis | [] [] [] |
|
||||
ap-utils | () |
|
||||
aspell | [] [] |
|
||||
bash | [] [] [] |
|
||||
batchelor | [] |
|
||||
bfd | |
|
||||
bibshelf | |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] [] |
|
||||
bluez-pin | [] [] [] [] [] [] [] [] |
|
||||
clisp | [] |
|
||||
console-tools | [] |
|
||||
coreutils | [] [] [] [] |
|
||||
cpio | [] [] |
|
||||
cpplib | |
|
||||
darkstat | [] [] [] [] [] [] |
|
||||
dialog | [] [] [] [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
doodle | [] |
|
||||
e2fsprogs | [] [] |
|
||||
enscript | [] [] [] [] |
|
||||
error | [] [] [] |
|
||||
fetchmail | [] [] [] [] |
|
||||
fileutils | [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] |
|
||||
flex | [] [] [] [] [] |
|
||||
fslint | [] [] [] |
|
||||
gas | |
|
||||
gawk | [] [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] |
|
||||
gcc | |
|
||||
gettext-examples | [] [] [] [] [] [] |
|
||||
gettext-runtime | [] [] [] [] [] [] [] |
|
||||
gettext-tools | [] [] [] [] [] [] [] |
|
||||
gimp-print | [] [] |
|
||||
gip | [] [] [] |
|
||||
gliv | [] [] [] |
|
||||
glunarclock | [] [] [] [] [] [] |
|
||||
gmult | [] [] [] [] |
|
||||
gnubiff | () [] |
|
||||
gnucash | () [] [] [] [] |
|
||||
gnucash-glossary | [] [] [] |
|
||||
gpe-aerial | [] [] [] [] [] [] |
|
||||
gpe-beam | [] [] [] [] [] [] |
|
||||
gpe-calendar | [] [] [] [] [] [] [] |
|
||||
gpe-clock | [] [] [] [] [] [] [] |
|
||||
gpe-conf | [] [] [] [] [] [] |
|
||||
gpe-contacts | [] [] [] [] |
|
||||
gpe-edit | [] [] [] [] [] [] [] |
|
||||
gpe-go | [] [] [] [] [] |
|
||||
gpe-login | [] [] [] [] [] [] [] |
|
||||
gpe-ownerinfo | [] [] [] [] [] [] [] |
|
||||
gpe-sketchbook | [] [] [] [] [] [] [] |
|
||||
gpe-su | [] [] [] [] [] [] [] |
|
||||
gpe-taskmanager | [] [] [] [] [] [] [] |
|
||||
gpe-timesheet | [] [] [] [] [] [] [] |
|
||||
gpe-today | [] [] [] [] [] [] [] |
|
||||
gpe-todo | [] [] [] [] [] [] [] [] |
|
||||
gphoto2 | [] [] [] [] |
|
||||
gprof | [] [] [] |
|
||||
gpsdrive | [] [] |
|
||||
gramadoir | [] |
|
||||
grep | [] [] [] [] [] [] [] |
|
||||
gretl | [] |
|
||||
gsasl | [] [] [] [] [] |
|
||||
gss | [] [] [] |
|
||||
gst-plugins | [] [] [] [] |
|
||||
gstreamer | [] [] [] [] |
|
||||
gtick | [] [] [] |
|
||||
gtkspell | [] [] [] [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] [] |
|
||||
impost | |
|
||||
indent | [] [] [] [] [] [] |
|
||||
iso_3166 | [] [] [] [] [] |
|
||||
iso_3166_1 | [] [] [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | [] [] [] |
|
||||
iso_4217 | [] [] |
|
||||
iso_639 | [] [] [] |
|
||||
jpilot | |
|
||||
jtag | [] |
|
||||
jwhois | [] [] [] () () |
|
||||
kbd | [] [] [] |
|
||||
latrine | [] [] |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] |
|
||||
libextractor | [] |
|
||||
libgpewidget | [] [] [] [] [] [] |
|
||||
libgphoto2 | [] [] |
|
||||
libgphoto2_port | [] |
|
||||
libgsasl | [] [] [] |
|
||||
libiconv | [] [] [] [] [] [] [] [] [] [] |
|
||||
libidn | [] () |
|
||||
lifelines | [] [] |
|
||||
lilypond | |
|
||||
lingoteach | [] |
|
||||
lynx | [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
mailutils | [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
man-db | [] [] |
|
||||
minicom | [] [] [] [] |
|
||||
mysecretdiary | [] [] [] [] |
|
||||
nano | [] [] [] |
|
||||
nano_1_0 | [] [] [] [] |
|
||||
opcodes | [] [] |
|
||||
parted | [] [] [] [] |
|
||||
psmisc | [] [] |
|
||||
ptx | [] [] [] [] [] [] |
|
||||
pwdutils | [] |
|
||||
python | |
|
||||
radius | [] [] |
|
||||
recode | [] [] [] [] [] [] |
|
||||
rpm | [] [] [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] |
|
||||
shared-mime-info | [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] |
|
||||
silky | [] |
|
||||
skencil | [] [] [] |
|
||||
sketch | [] [] [] |
|
||||
solfege | |
|
||||
soundtracker | [] [] |
|
||||
sp | |
|
||||
stardict | [] [] |
|
||||
tar | [] [] [] [] |
|
||||
texinfo | [] [] [] [] |
|
||||
textutils | [] [] [] |
|
||||
tin | |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] |
|
||||
vorbis-tools | [] [] |
|
||||
wastesedge | |
|
||||
wdiff | [] [] [] [] [] [] |
|
||||
wget | |
|
||||
xchat | [] [] [] [] [] [] [] |
|
||||
xkeyboard-config | |
|
||||
xpad | |
|
||||
+----------------------------------------------+
|
||||
or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv
|
||||
1 3 47 29 57 6 78 73 5 44 12 12 50 85
|
||||
|
||||
ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
|
||||
+-----------------------------------------------+
|
||||
GNUnet | | 0
|
||||
a2ps | [] [] [] | 19
|
||||
aegis | | 0
|
||||
ant-phone | [] [] | 5
|
||||
anubis | [] [] [] | 11
|
||||
ap-utils | () [] | 2
|
||||
aspell | [] [] [] | 13
|
||||
bash | [] | 11
|
||||
batchelor | [] [] | 7
|
||||
bfd | | 1
|
||||
bibshelf | [] | 5
|
||||
binutils | [] | 6
|
||||
bison | [] [] | 18
|
||||
bluez-pin | [] [] [] [] [] | 25
|
||||
clisp | | 7
|
||||
console-tools | [] [] | 5
|
||||
coreutils | [] [] | 17
|
||||
cpio | [] [] [] | 7
|
||||
cpplib | [] [] | 8
|
||||
darkstat | [] () () | 15
|
||||
dialog | [] [] [] | 25
|
||||
diffutils | [] [] [] [] | 28
|
||||
doodle | [] | 5
|
||||
e2fsprogs | [] | 8
|
||||
enscript | [] | 12
|
||||
error | [] [] [] | 16
|
||||
fetchmail | [] | 12
|
||||
fileutils | [] [] [] | 18
|
||||
findutils | [] [] | 17
|
||||
flex | [] [] | 15
|
||||
fslint | [] | 7
|
||||
gas | [] | 3
|
||||
gawk | [] | 14
|
||||
gbiff | [] | 5
|
||||
gcal | [] | 5
|
||||
gcc | [] [] | 4
|
||||
gettext-examples | [] [] [] [] [] | 21
|
||||
gettext-runtime | [] [] [] [] [] | 25
|
||||
gettext-tools | [] [] [] [] [] | 19
|
||||
gimp-print | [] | 11
|
||||
gip | [] | 8
|
||||
gliv | [] [] | 7
|
||||
glunarclock | [] [] | 13
|
||||
gmult | [] [] [] | 13
|
||||
gnubiff | [] | 3
|
||||
gnucash | () [] | 10
|
||||
gnucash-glossary | [] [] | 9
|
||||
gpe-aerial | [] [] | 13
|
||||
gpe-beam | [] [] | 13
|
||||
gpe-calendar | [] [] [] [] | 18
|
||||
gpe-clock | [] [] [] [] | 17
|
||||
gpe-conf | [] [] | 12
|
||||
gpe-contacts | [] [] | 7
|
||||
gpe-edit | [] [] [] [] | 15
|
||||
gpe-go | [] [] | 11
|
||||
gpe-login | [] [] [] [] [] | 18
|
||||
gpe-ownerinfo | [] [] [] [] | 19
|
||||
gpe-sketchbook | [] [] | 14
|
||||
gpe-su | [] [] [] | 16
|
||||
gpe-taskmanager | [] [] [] | 17
|
||||
gpe-timesheet | [] [] [] [] | 17
|
||||
gpe-today | [] [] [] [] [] | 19
|
||||
gpe-todo | [] [] [] | 17
|
||||
gphoto2 | [] [] [] | 18
|
||||
gprof | [] [] | 10
|
||||
gpsdrive | | 3
|
||||
gramadoir | [] | 6
|
||||
grep | [] [] [] [] | 32
|
||||
gretl | | 4
|
||||
gsasl | [] [] | 12
|
||||
gss | [] | 5
|
||||
gst-plugins | [] [] [] | 17
|
||||
gstreamer | [] [] [] [] | 15
|
||||
gtick | [] | 11
|
||||
gtkspell | [] [] [] [] | 21
|
||||
hello | [] [] [] [] | 37
|
||||
id-utils | [] [] | 13
|
||||
impost | [] | 3
|
||||
indent | [] [] [] [] | 25
|
||||
iso_3166 | [] [] [] | 12
|
||||
iso_3166_1 | [] [] | 20
|
||||
iso_3166_2 | | 2
|
||||
iso_3166_3 | [] [] | 8
|
||||
iso_4217 | [] [] | 10
|
||||
iso_639 | [] [] | 12
|
||||
jpilot | [] [] [] | 6
|
||||
jtag | | 2
|
||||
jwhois | [] [] [] | 12
|
||||
kbd | [] [] | 12
|
||||
latrine | [] [] | 8
|
||||
ld | [] | 5
|
||||
libc | [] [] | 22
|
||||
libextractor | | 1
|
||||
libgpewidget | [] [] | 17
|
||||
libgphoto2 | [] | 9
|
||||
libgphoto2_port | | 5
|
||||
libgsasl | [] | 7
|
||||
libiconv | [] [] [] [] [] | 32
|
||||
libidn | [] [] | 6
|
||||
lifelines | | 4
|
||||
lilypond | | 1
|
||||
lingoteach | [] | 6
|
||||
lynx | [] [] [] | 15
|
||||
m4 | [] [] | 17
|
||||
mailutils | [] | 7
|
||||
make | [] [] | 18
|
||||
man-db | | 5
|
||||
minicom | | 11
|
||||
mysecretdiary | [] [] | 12
|
||||
nano | [] [] | 13
|
||||
nano_1_0 | [] [] [] | 18
|
||||
opcodes | [] [] | 9
|
||||
parted | [] [] [] | 18
|
||||
psmisc | [] | 7
|
||||
ptx | [] [] | 23
|
||||
pwdutils | | 1
|
||||
python | | 0
|
||||
radius | [] | 6
|
||||
recode | [] [] | 22
|
||||
rpm | [] [] | 11
|
||||
screem | | 1
|
||||
scrollkeeper | [] [] [] | 24
|
||||
sed | [] [] [] | 21
|
||||
sh-utils | [] | 15
|
||||
shared-mime-info | [] [] [] | 21
|
||||
sharutils | [] [] [] | 20
|
||||
silky | | 3
|
||||
skencil | | 6
|
||||
sketch | | 6
|
||||
solfege | | 4
|
||||
soundtracker | [] | 8
|
||||
sp | [] | 3
|
||||
stardict | [] [] [] [] | 10
|
||||
tar | [] [] [] [] | 15
|
||||
texinfo | [] [] | 14
|
||||
textutils | [] [] [] | 17
|
||||
tin | | 1
|
||||
tp-robot | [] [] [] | 8
|
||||
tuxpaint | [] [] [] [] | 34
|
||||
unicode-han-tra... | | 0
|
||||
unicode-transla... | | 2
|
||||
util-linux | [] [] [] | 18
|
||||
vorbis-tools | [] | 10
|
||||
wastesedge | | 1
|
||||
wdiff | [] [] | 22
|
||||
wget | [] [] | 7
|
||||
xchat | [] [] [] [] | 26
|
||||
xkeyboard-config | [] | 2
|
||||
xpad | [] | 5
|
||||
+-----------------------------------------------+
|
||||
73 teams ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
|
||||
149 domains 0 0 0 1 77 30 0 92 16 0 42 32 0 1746
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If May 2005 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
||||
matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
1.6 Using `gettext' in new packages
|
||||
===================================
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
the use of `gettext' the only thing missing are the translations. The
|
||||
Free Translation Project is also available for packages which are not
|
||||
developed inside the GNU project. Therefore the information given above
|
||||
applies also for every other Free Software Project. Contact
|
||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
||||
the translation teams.
|
||||
|
||||
|
||||
+35
-11
@@ -4,26 +4,50 @@ WeeChat - Wee Enhanced Environment for Chat
|
||||
Developers:
|
||||
----------
|
||||
|
||||
All developers are connected to IRC:
|
||||
server: irc.freenode.net, channel: #weechat
|
||||
* General code
|
||||
|
||||
FlashCode <flashcode@flashtux.org>
|
||||
Web : http://www.flashtux.org
|
||||
IRC : nick is "FlashCode"
|
||||
Jabber: flashcode@jabber.org
|
||||
ICQ : 160677660
|
||||
AIM : FlashCode AIM
|
||||
Yahoo : FlashCode_Y
|
||||
FlashCode <flashcode@flashtux.org>
|
||||
Web : http://weechat.flashtux.org
|
||||
IRC : nick is "FlashCode" @ irc.freenode.net
|
||||
Jabber: flashcode@jabber.org
|
||||
ICQ : 160677660
|
||||
AIM : FlashCode AIM
|
||||
Yahoo : FlashCode_Y
|
||||
|
||||
* Python plugin
|
||||
|
||||
Kolter <kolter@free.fr>
|
||||
Web : http://kolter.free.fr
|
||||
IRC : nick is "kolter" @ irc.freenode.net
|
||||
Jabber: kolter@jabber.org
|
||||
|
||||
|
||||
Debian packager:
|
||||
---------------
|
||||
|
||||
Julien Louis <ptitlouis@sysif.net>
|
||||
IRC : nicks are "ptitlouis" or "tioui" @ irc.freenode.net
|
||||
Jabber: ptitlouis@amessage.info
|
||||
|
||||
|
||||
Testers:
|
||||
-------
|
||||
|
||||
Bounga <bounga@altern.org>
|
||||
Web : http://bounga.ath.cx
|
||||
IRC : nick is "Bounga"
|
||||
IRC : nick is "Bounga" @ irc.freenode.net
|
||||
Jabber: Bounga@jabber.org
|
||||
ICQ : 178297842
|
||||
|
||||
Xahlexx <xahlexx@weeland.org>
|
||||
Web : http://www.weeland.org
|
||||
IRC : nick is "xahlexx"
|
||||
IRC : nick is "xahlexx" @ irc.freenode.net
|
||||
|
||||
|
||||
=====
|
||||
|
||||
Whole team is connected to IRC:
|
||||
server: irc.freenode.net, channel: #weechat
|
||||
|
||||
|
||||
See README file for licence detail.
|
||||
|
||||
+1
-7
@@ -1,15 +1,9 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
WeeChat known bugs, 2005-01-01
|
||||
WeeChat known bugs, 2005-05-21
|
||||
|
||||
- ./configure does not check that Curses headers are installed
|
||||
- ./configure does not check that Gtk 2.0 libraries are installed
|
||||
- ./configure does not check that Perl headers & libraries are installed
|
||||
- too much nicks in the channel (> height of window) => display bug
|
||||
- problem when resizing terminal and that some windows are outside new term size
|
||||
- some IRC commands are marked as 'unknown' when received
|
||||
(IRC protocol is under dev!)
|
||||
- when quitting WeeChat term title is not restored (if look_set_title is ON)
|
||||
- command name for /server can not contain spaces
|
||||
- wrong alias is not created and not saved when quitting WeeChat
|
||||
|
||||
+87
-1
@@ -1,9 +1,95 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2005-01-01
|
||||
ChangeLog - 2005-06-30
|
||||
|
||||
|
||||
Version 0.1.3 (2005-07-02):
|
||||
* proxy support (http, socks4, socks5) with authentification (http, socks5)
|
||||
and ipv6 support (client to proxy)
|
||||
* completion added for config option (with /set command)
|
||||
* commands from users outside channel now authorized (if special user or
|
||||
channel without "n" flag)
|
||||
* added IPv6 support
|
||||
* kill command now received and displayed
|
||||
* added SSL support
|
||||
* channel notify levels are saved in config file (new option
|
||||
"server_notify_levels" for server sections)
|
||||
* part message now accepts %v (replaced by WeeChat version), like quit message
|
||||
* errors while loading perl scripts are now displayed in server buffer
|
||||
(instead of current buffer)
|
||||
* in python scripts, all messages written in stdin and stderr are redirected
|
||||
in server buffer
|
||||
* fix a filename error while loading a python script manually
|
||||
* fixed plugins "print" and "prnt" functions: now ok for writing on server
|
||||
buffers
|
||||
* fixed color problem with new libcurses version
|
||||
* fixed crash when using Alt-S or Alt-X on DCC buffer (Alt-D)
|
||||
* fixed startup crash when config file (~/.weechat/weechat.rc) is not found
|
||||
* improved Perl/Python libs detection for ./configure script
|
||||
|
||||
Version 0.1.2 (2005-05-21):
|
||||
* added Python plugin support, improved Perl interface (and now Perl/Python
|
||||
libraries are checked by configure script)
|
||||
* added nicklist scroll keys (Alt+{home/end/pgup/pgdn} or F11/F12)
|
||||
* added transfer rate for DCC files
|
||||
* added "-all" option for /nick command
|
||||
* buffers timestamp can now be changed (new option in config file)
|
||||
* WeeChat now ok under *BSD and Mac OS X
|
||||
* fixed nicklist sort
|
||||
* fixed crash when purging old DCC
|
||||
* fixed crash with 64-bits arch (like AMD64) when converting UTF-8
|
||||
* added missing IRC commands (307, 341, 485, 671)
|
||||
|
||||
Version 0.1.1 (2005-03-20):
|
||||
* added nicks count for channel buffers
|
||||
* added FIFO pipe for remote control
|
||||
* added crash dump when WeeChat receives SIGSEGV (Segmentation fault)
|
||||
* added new display engine: doesn't cut words at end of lines
|
||||
* added DCC send and DCC chat
|
||||
* added /halfop & /dehalfop commands, fixed halfop display bug in nicklist
|
||||
* added /ban, /unban and /kickban commands
|
||||
* added spanish translation
|
||||
* added --irc-commands and --weechat-commands command line options
|
||||
* connection to IRC server is now made by child process (non blocking)
|
||||
* added support for UnrealIrcd ("~" for chan owner, "&" for chan admin)
|
||||
* new key for window switch (now: F5/F6=switch buffer, F7/F8=switch window)
|
||||
* on server buffer, only server messages are logged
|
||||
* improved /help command output
|
||||
* plugins messages are logged with new config option (log_plugin_msg)
|
||||
* fixed /kick command
|
||||
* fixed /invite command (and now invite requests are displayed)
|
||||
* fixed /buffer close command (now ok when disconnected from server)
|
||||
* fixed display bugs when many windows are opened
|
||||
|
||||
Version 0.1.0 (2005-02-12):
|
||||
* improved /window command: now split and merge are ok
|
||||
* away nicks are now displayed with another color (new option: "irc_away_check")
|
||||
* added away indicator in status bar
|
||||
* added lag indicator (and auto-disconnect after a delay if important lag)
|
||||
* improved completion: now completes commands arguments (IRC and internal),
|
||||
when only one completion matches, completion mechanism is stoped (to
|
||||
complete command arg for example)
|
||||
* improved /set command: empty strings are allowed, new colors, server
|
||||
options can be changed while WeeChat is running
|
||||
* added default away/part/quit messages in config file
|
||||
* new [irc] section in config file, option "look_display_away" moved to
|
||||
"irc_display_away"
|
||||
* server messages & errors are all prefixed (by 3 chars, like '-@-')
|
||||
* added new options for charset (UTF-8 support): look_charset_decode,
|
||||
look_charset_encode and look_charset_internal
|
||||
* fixed many memory leaks
|
||||
* fixed colors bug: removed "gray" color (replaced by "default"), colors are
|
||||
ok when terminal has white (or light) background
|
||||
* fixed crash when resizing terminal to small size
|
||||
* fixed crash when multiple servers and big messages received from server
|
||||
* fixed crash when closing some private buffers
|
||||
* fixed crash when unknown section with option(s) in config file
|
||||
* fixed /op, /deop, /voice, /devoice (now ok with many nicks)
|
||||
* fixed /me command (now ok without parameter)
|
||||
* fixed /away command (now ok if not away)
|
||||
* logs are now disabled by default (server/channel/private)
|
||||
|
||||
Version 0.0.9 (2005-01-01):
|
||||
* auto-reconnection to server (new options: server_autoreconnect (on/off),
|
||||
server_autoreconnect_delay (in seconds))
|
||||
|
||||
+58
-22
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2004-05-31
|
||||
WeeChat FAQ, 2005-05-21
|
||||
=======================
|
||||
|
||||
Intended audience:
|
||||
@@ -22,8 +22,10 @@ finding a solution.
|
||||
Q: I heard about many GUI for WeeChat. How can I compile/use them?
|
||||
|
||||
A: Curses GUI is built by default.
|
||||
To build Gtk or Qt GUI you've to specify extra options to ./configure script:
|
||||
To build Gtk, wxWidgets or Qt GUI you've to specify extra options to
|
||||
./configure script:
|
||||
--enable-gtk to enable Gtk GUI
|
||||
--enable-wxwidgets to enable wxWidgets GUI
|
||||
--enable-qt to enable Qt QUI
|
||||
Type ./configure --help to see available options.
|
||||
WARNING: only Curses GUI is ok today. Other GUI are under development!
|
||||
@@ -34,8 +36,8 @@ A: Curses GUI is built by default.
|
||||
Q: I can't compile WeeChat CVS.
|
||||
|
||||
A: Check that you have latest version of autoconf and automake.
|
||||
WeeChat has been developed with autoconf version 2.56 and automake
|
||||
version 1.7.
|
||||
WeeChat has been developed with autoconf version 2.59 and automake
|
||||
version 1.9.5.
|
||||
You should have at least these versions in order to compile WeeChat CVS.
|
||||
If you can't or don't want to install these versions, you can download and
|
||||
install "devel package", a package built almost every day, based on CVS.
|
||||
@@ -48,12 +50,14 @@ Q: Why using WeeChat ? X-Chat and Irssi are so good...
|
||||
|
||||
A: Because WeeChat is very light and has new features.
|
||||
Some new features:
|
||||
* many GUI (Curses, Gtk, Qt),
|
||||
* many GUI (Curses, Gtk, wxWidgets, Qt),
|
||||
* extensible with scripts (Perl, Python, Ruby),
|
||||
* developed from scratch (not based on any other IRC client)
|
||||
* multi-platform
|
||||
* 100% GPL and free
|
||||
This is the "geekest Irc client" ;)
|
||||
This is the "geekest" IRC client ;)
|
||||
|
||||
More info on this page: http://weechat.flashtux.org/features.php
|
||||
|
||||
|
||||
2.2
|
||||
@@ -61,39 +65,56 @@ A: Because WeeChat is very light and has new features.
|
||||
Q: I've launched WeeChat, but I'm lost, what can I do?
|
||||
|
||||
A: For help you can type /help. For help about a command, type /help command.
|
||||
Keys and commands are listed in documentation.
|
||||
|
||||
|
||||
2.3
|
||||
================================================================================
|
||||
Q: How can I customize key bindings?
|
||||
Q: I don't see come chars with accents, what can I do?
|
||||
|
||||
A: Today you can't do that. This will be available in a future version.
|
||||
A: You have to setup charset used for decoding, encoding, and internal WeeChat
|
||||
charset.
|
||||
Change value of option "look_charset_decode" to "UTF-8".
|
||||
Option "look_charset_internal" should not be changed (default is
|
||||
"ISO-8859-1").
|
||||
|
||||
|
||||
2.4
|
||||
================================================================================
|
||||
Q: How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
Q: How can I customize key bindings?
|
||||
|
||||
A: You can use /perl command to load scripts
|
||||
(default path is ~/.weechat/perl).
|
||||
Note that scripts in ~/.weechat/perl/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat perl scripts are compatible with X-Chat, not with Irssi, sorry ;)
|
||||
A: Today you can't do that. This is planed for a future version.
|
||||
|
||||
|
||||
2.5
|
||||
================================================================================
|
||||
Q: How can I load Python scripts?
|
||||
Q: How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
|
||||
A: Today Python interface is not developed, so can't load any Python script.
|
||||
A: You can use /perl command to load scripts (default path is
|
||||
~/.weechat/perl).
|
||||
Note that scripts in ~/.weechat/perl/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat Perl scripts are 80% compatible with X-Chat, but not with Irssi.
|
||||
|
||||
|
||||
2.6
|
||||
================================================================================
|
||||
Q: How can I load Python scripts?
|
||||
Are Python scripts compatible with X-chat or/and Irssi ?
|
||||
|
||||
A: You can use /python command to load scripts (default path is
|
||||
~/.weechat/python).
|
||||
Note that scripts in ~/.weechat/python/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat Python scripts are 80% compatible with X-Chat, but not with Irssi.
|
||||
|
||||
|
||||
2.7
|
||||
================================================================================
|
||||
Q: How can I load Ruby scripts?
|
||||
|
||||
A: Today Ruby interface is not developed, so can't load any Ruby script.
|
||||
A: Today Ruby interface is not developed, so you can't load any Ruby script.
|
||||
|
||||
|
||||
3.1
|
||||
@@ -136,13 +157,27 @@ A: There is 2 ways to submit your feature request:
|
||||
|
||||
3.4
|
||||
================================================================================
|
||||
Q: Will WeeChat be ported to *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
Q: What is the list of supported platforms for WeeChat?
|
||||
|
||||
A: Yes. Future versions will be available for these OS.
|
||||
A: Today WeeChat was succesfully tested on these platforms:
|
||||
- GNU/Linux (any distribution / i386, AMD64, Sparc)
|
||||
- FreeBSD
|
||||
- NetBSD
|
||||
- OpenBSD
|
||||
- Mac OS X
|
||||
- Microsoft Windows (with Cygwin and some code changes)
|
||||
|
||||
|
||||
3.5
|
||||
================================================================================
|
||||
Q: Will WeeChat be ported to QNX or other operating systems?
|
||||
|
||||
A: Yes. Future versions will be available for these OS.
|
||||
We need help for such systems, any help is welcome :)
|
||||
|
||||
|
||||
3.6
|
||||
================================================================================
|
||||
Q: I want to help WeeChat developers. What can I do?
|
||||
|
||||
A: There's many tasks to do (code, documentation, ...)
|
||||
@@ -150,8 +185,9 @@ A: There's many tasks to do (code, documentation, ...)
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.6
|
||||
3.7
|
||||
================================================================================
|
||||
Q: Can I give money or other things to WeeChat developers?
|
||||
|
||||
A: No.
|
||||
A: Beer is welcome :)
|
||||
Otherwise Paypal account is: flashcode@free.fr (no limit for gifts :)
|
||||
|
||||
+58
-24
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2004-05-31
|
||||
WeeChat FAQ, 2005-05-21
|
||||
=======================
|
||||
|
||||
Public concerné :
|
||||
@@ -23,9 +23,10 @@ Q: J'ai entendu parler de plusieurs interfaces pour WeeChat.
|
||||
Comment puis-je les compiler/utiliser ?
|
||||
|
||||
R: L'interface Curses est construite par défaut.
|
||||
Pour construire l'interface Gtk ou Qt, vous devez spécifier des options
|
||||
pour le script ./configure :
|
||||
Pour construire l'interface Gtk, wxWidgets ou Qt, vous devez spécifier des
|
||||
options pour le script ./configure :
|
||||
--enable-gtk pour activer l'interface Gtk
|
||||
--enable-wxwidgets pour activer l'interface wxWidgets
|
||||
--enable-qt pour activer l'interface Qt
|
||||
Tapez ./configure --help pour voir les options disponibles.
|
||||
ATTENTION : seule l'interface Curses est ok aujourd'hui.
|
||||
@@ -37,8 +38,8 @@ R: L'interface Curses est construite par d
|
||||
Q: Je ne peux pas compiler le CVS WeeChat.
|
||||
|
||||
R: Vérifiez que vous avez bien la dernière version d'autoconf et automake.
|
||||
WeeChat a été développé avec autoconf version 2.56 et automake
|
||||
version 1.7.
|
||||
WeeChat a été développé avec autoconf version 2.59 et automake
|
||||
version 1.9.5.
|
||||
Vous devez avoir au moins ces versions pour compiler le CVS WeeChat.
|
||||
Si vous n'avez pas ou ne souhaitez pas installer ces versions, vous
|
||||
pouvez télécharger et installer le paquet "devel", un paquet construit
|
||||
@@ -52,12 +53,14 @@ Q: Pourquoi utiliser WeeChat ? X-Chat et Irssi sont si bien...
|
||||
|
||||
R: Parce que WeeChat est très léger et a de nouvelles fonctionnalités.
|
||||
Quelques nouvelles fonctionnalités :
|
||||
* plusieurs interfaces (Curses, Gtk, Qt),
|
||||
* plusieurs interfaces (Curses, Gtk, wxWidgets, Qt),
|
||||
* extensible par des scripts (Perl, Python, Ruby),
|
||||
* développé à partir de zéro (non basé sur un quelconque client IRC)
|
||||
* multi-platformes
|
||||
* 100% GPL et libre
|
||||
C'est le client le plus "geek" ;)
|
||||
C'est le client IRC le plus "geek" ;)
|
||||
|
||||
Plus d'infos sur cette page: http://weechat.flashtux.org/features.php
|
||||
|
||||
|
||||
2.2
|
||||
@@ -66,39 +69,54 @@ Q: J'ai lanc
|
||||
|
||||
R: Pour obtenir de l'aide tapez /help. Pour de l'aide sur une commande,
|
||||
tapez /help commande.
|
||||
Les touches et commandes sont listées dans la documentation.
|
||||
|
||||
|
||||
2.3
|
||||
================================================================================
|
||||
Q: Je ne vois pas bien certains accents dans WeeChat, que faire ?
|
||||
|
||||
R: Il faut configurer le charset utilisé pour le décodage, l'encodage ainsi que
|
||||
le charset interne Ă WeeChat.
|
||||
Modifiez la valeur de l'option "look_charset_decode" en "UTF-8".
|
||||
L'option "look_charset_internal" ne devrait pas être modifiée (par défaut
|
||||
"ISO-8859-1").
|
||||
|
||||
|
||||
2.4
|
||||
================================================================================
|
||||
Q: Comment puis-je configurer les raccourcis clavier ?
|
||||
|
||||
R: Aujourd'hui vous ne pouvez pas le faire. Ce sera possible dans une
|
||||
version future.
|
||||
|
||||
|
||||
2.4
|
||||
2.5
|
||||
================================================================================
|
||||
Q: Comment puis-je charger des scripts Perl ?
|
||||
Les scripts Perl sont-ils compatibles avec X-chat et/ou Irssi ?
|
||||
|
||||
R: La commande /perl permet de charger les scripts Perl
|
||||
(le chemin par défaut est ~/.weechat/perl).
|
||||
R: La commande /perl permet de charger les scripts Perl (le chemin par défaut
|
||||
est ~/.weechat/perl).
|
||||
Notez que les scripts dans ~/.weechat/perl/autoload sont automatiquement
|
||||
chargés par WeeChat lorsqu'il démarre.
|
||||
Les scripts Perl WeeChat sont compatibles avec X-Chat, pas Irssi,
|
||||
désolé ;)
|
||||
|
||||
|
||||
2.5
|
||||
================================================================================
|
||||
Q: Comment puis-je charger les scripts Python ?
|
||||
|
||||
R: Aujourd'hui l'interface Python n'est pas déceloppée.
|
||||
Vous ne pouvez donc charger aucun script Python.
|
||||
Les scripts Perl WeeChat sont 80% compatibles avec X-Chat, mais pas Irssi.
|
||||
|
||||
|
||||
2.6
|
||||
================================================================================
|
||||
Q: Comment puis-je charger les scripts Python ?
|
||||
Les scripts Python sont-ils compatibles avec X-chat et/ou Irssi ?
|
||||
|
||||
R: La commande /python permet de charger les scripts Python (le chemin par
|
||||
défaut est ~/.weechat/python).
|
||||
Notez que les scripts dans ~/.weechat/python/autoload sont automatiquement
|
||||
chargés par WeeChat lorsqu'il démarre.
|
||||
Les scripts Python WeeChat sont 80% compatibles avec X-Chat, mais pas Irssi.
|
||||
|
||||
|
||||
2.7
|
||||
================================================================================
|
||||
Q: Comment puis-je charger des scripts Ruby ?
|
||||
|
||||
R: Aujourd'hui l'interface Ruby n'est pas développée.
|
||||
@@ -150,13 +168,27 @@ R: Il y a 2 mani
|
||||
|
||||
3.4
|
||||
================================================================================
|
||||
Q: WeeChat sera-t-il porté sur *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
Q: Quelle est la liste des plate-formes supportées par WeeChat ?
|
||||
|
||||
R: Oui. Les futures versions seront disponibles pour ces OS.
|
||||
R: Aujourd'hui WeeChat a été testé avec succès sur ces plate-formes :
|
||||
- GNU/Linux (toute distribution / i386, AMD64, Sparc)
|
||||
- FreeBSD
|
||||
- NetBSD
|
||||
- OpenBSD
|
||||
- Mac OS X
|
||||
- Microsoft Windows (avec Cygwin et quelques modifications de code)
|
||||
|
||||
|
||||
3.5
|
||||
================================================================================
|
||||
Q: WeeChat sera-t-il porté sur QNX ou d'autres systèmes d'exploitation ?
|
||||
|
||||
R: Oui. Les futures versions seront disponibles pour ces OS.
|
||||
Nous avons besoin d'aide pour ces systèmes, toute aide est la bienvenue :)
|
||||
|
||||
|
||||
3.6
|
||||
================================================================================
|
||||
Q: Je souhaiterai aider les développeurs WeeChat. Que puis-je faire ?
|
||||
|
||||
R: Il y a plusieurs choses Ă faire (code, documentation, ...)
|
||||
@@ -165,8 +197,10 @@ R: Il y a plusieurs choses
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.6
|
||||
3.7
|
||||
================================================================================
|
||||
Q: Puis-je donner de l'argent ou d'autres choses aux développeurs WeeChat ?
|
||||
|
||||
R: Non.
|
||||
R: La bière est la bienvenue :)
|
||||
Sinon le compte Paypal est: flashcode@free.fr (il n'y a pas de limite pour
|
||||
les dons :)
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ WeeChat - Installation instructions
|
||||
--disable-curses : do not build Curses interface
|
||||
--enable-gtk : build Gtk+ interface (under development!)
|
||||
--enable-qt : build Qt interface (not developed!)
|
||||
--with-debug : 1 for debug compilation, 2 for debug messages
|
||||
--with-debug=X : X=1 for debug compilation, 2 for debug messages
|
||||
|
||||
2) Run 'make'
|
||||
|
||||
|
||||
+4
-2
@@ -17,12 +17,14 @@
|
||||
|
||||
SUBDIRS = po intl src
|
||||
|
||||
EXTRA_DIST = weechat-curses.1 BUGS FAQ FAQ.fr \
|
||||
EXTRA_DIST = config.rpath weechat-curses.1 BUGS FAQ FAQ.fr \
|
||||
debian/changelog debian/control \
|
||||
debian/copyright debian/files \
|
||||
debian/copyright \
|
||||
debian/rules debian/weechat-common.docs \
|
||||
debian/weechat-common.install debian/weechat-curses.dirs \
|
||||
debian/weechat-curses.install debian/weechat-gtk.dirs \
|
||||
debian/weechat-gtk.install
|
||||
|
||||
man_MANS = weechat-curses.1
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
@@ -1,6 +1,22 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
* FlashCode, 2005-07-02
|
||||
|
||||
WeeChat 0.1.3 released.
|
||||
|
||||
* FlashCode, 2005-05-21
|
||||
|
||||
WeeChat 0.1.2 released.
|
||||
|
||||
* FlashCode, 2005-03-20
|
||||
|
||||
WeeChat 0.1.1 released.
|
||||
|
||||
* FlashCode, 2005-02-12
|
||||
|
||||
WeeChat 0.1.0 released.
|
||||
|
||||
* FlashCode, 2005-01-01
|
||||
|
||||
WeeChat 0.0.9 released.
|
||||
|
||||
+4
-7
@@ -14,7 +14,7 @@ Features
|
||||
* small, fast and very light
|
||||
* customizable and extensible with scripts (Perl, Python, Ruby) (2)
|
||||
* compliant with RFC 1459,2810,2811,2812,2813
|
||||
* developed from scratch (not based on any other IRC client, except for look ;)
|
||||
* developed from scratch
|
||||
* multi-platform (GNU/Linux, *BSD, Windows & other) (3)
|
||||
* 100% GPL & free
|
||||
|
||||
@@ -22,10 +22,7 @@ Features
|
||||
Copyright
|
||||
---------
|
||||
|
||||
WeeChat (c) Copyright 2004
|
||||
by: FlashCode <flashcode@flashtux.org>
|
||||
Xahlexx <xahlex@weeland.org>
|
||||
Bounga <bounga@altern.org>
|
||||
WeeChat (c) Copyright 2003-2005 by FlashCode <flashcode@flashtux.org>
|
||||
(see AUTHORS file if you want to contact authors)
|
||||
|
||||
WeeChat is distributed under GPL licence (see COPYING file for complete license):
|
||||
@@ -47,5 +44,5 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
---
|
||||
(1) only Curses interface is available today
|
||||
(2) only Perl interface is available today
|
||||
(3) only GNU/Linux version is available today
|
||||
(2) only Perl and Python interfaces are available today
|
||||
(3) only GNU/Linux and *BSD versions are available today
|
||||
|
||||
+15
-30
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
TODO - 2005-01-01
|
||||
TODO - 2005-07-02
|
||||
|
||||
Legend:
|
||||
# done
|
||||
@@ -10,33 +10,32 @@ Legend:
|
||||
? is this really necessary?
|
||||
|
||||
|
||||
v0.0.9:
|
||||
v0.1.3:
|
||||
------
|
||||
|
||||
* General:
|
||||
- Windows version
|
||||
+ Windows version
|
||||
+ Solaris version
|
||||
|
||||
* IRC protocol:
|
||||
+ "/dcc" command (for chat and sending/receiving files)
|
||||
|
||||
* Interface:
|
||||
+ "/window" command, split terminal in multiple windows
|
||||
(horizontally/vertically)
|
||||
+ Gtk GUI
|
||||
+ internationalization (traduce WeeChat in many languages)
|
||||
|
||||
* TCP/IP communication:
|
||||
# SSL support
|
||||
# IPv6 protocol implementation
|
||||
# proxy support (http, socks4, socks5) with authentification
|
||||
(http, socks5) and ipv6 support (client to proxy)
|
||||
|
||||
* Configuration:
|
||||
+ add missing options for config file
|
||||
- add key bindings to config file
|
||||
# save buffer notify levels
|
||||
|
||||
|
||||
Future versions:
|
||||
---------------
|
||||
|
||||
* General:
|
||||
- *BSD version
|
||||
|
||||
* IRC protocol:
|
||||
- customizable CTCP version reply
|
||||
- complete "/list" command: add regexp search, display only channels that
|
||||
match regexp
|
||||
- "/ignore" and "/unignore" commands: hide all that is write by a given
|
||||
@@ -47,35 +46,21 @@ Future versions:
|
||||
nick/host connect to the given irc network
|
||||
|
||||
* WeeChat commands:
|
||||
- "/reload" command: reload the WeeChat's config file
|
||||
- "/highlight" command: highlight a given word when it appears on
|
||||
channels/privates
|
||||
- "/completion" command: do shortcuts (for example when we type "u"
|
||||
in the text bar it send it to the server as "you")
|
||||
- "/exec" command: execute a command as if we was in shell
|
||||
and show us the output on the current window. An option to exec
|
||||
like -o could send the output to the server, on the current
|
||||
channel/private
|
||||
- "/last": command to look for text in previous messages
|
||||
|
||||
* Interface:
|
||||
+ Gtk GUI
|
||||
- color for nicks (except own nick) when nick colors are disabled
|
||||
- interpret special chars in messages (color & bold for example)
|
||||
- add lag indicator
|
||||
- improve completion (for example complete command parameters when possible)
|
||||
- understand incomplete commands if unambigous (for example: /he for /help is ok)
|
||||
- tab key with empty command line should switch to next window (like F7)
|
||||
? Qt GUI
|
||||
|
||||
* TCP/IP communication:
|
||||
- connect to server with child process (background)
|
||||
- proxy support
|
||||
- SSL support
|
||||
- IPv6 protocol implementation
|
||||
|
||||
* Plugins:
|
||||
- Python plugin
|
||||
- "/python load" and "/python unload" commands to (un)load Python scripts
|
||||
- Ruby plugin
|
||||
- "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts
|
||||
|
||||
* Configuration:
|
||||
- add key bindings to config file
|
||||
|
||||
+13
-53
@@ -1,55 +1,15 @@
|
||||
#!/bin/sh
|
||||
rm -f config.cache
|
||||
|
||||
### GETTEXT ###
|
||||
|
||||
echo searching for GNU gettext intl directory...
|
||||
|
||||
dirs="/usr/share /usr/local/share /opt/share /usr /usr/local /opt /usr/gnu/share"
|
||||
found=0
|
||||
for try in $dirs; do
|
||||
echo -n " -> $try/gettext/intl... "
|
||||
if test -d $try/gettext/intl; then
|
||||
echo found it
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
echo no
|
||||
done
|
||||
if test "$found" != 1; then
|
||||
echo ERROR: Cannot find gettext/intl directory.
|
||||
echo ERROR: Install GNU gettext in /usr or /usr/local prefix.
|
||||
exit 7
|
||||
fi;
|
||||
|
||||
echo copying gettext intl files...
|
||||
intldir="$try/gettext/intl"
|
||||
if test ! -d intl; then
|
||||
mkdir intl
|
||||
fi
|
||||
olddir=`pwd`
|
||||
cd $intldir
|
||||
for file in *; do
|
||||
if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
|
||||
rm -f $olddir/intl/$file
|
||||
cp $intldir/$file $olddir/intl/
|
||||
fi
|
||||
done
|
||||
cp -f $try/gettext/po/Makefile.in.in $olddir/po/
|
||||
cd $olddir
|
||||
if test -f intl/plural.c; then
|
||||
sleep 2
|
||||
touch intl/plural.c
|
||||
fi
|
||||
|
||||
### END GETTEXT ###
|
||||
|
||||
echo "running aclocal..."
|
||||
aclocal -I /usr/share/aclocal
|
||||
echo "running autoconf..."
|
||||
autoconf
|
||||
echo "running autoheader..."
|
||||
autoheader
|
||||
echo "running automake..."
|
||||
automake -a
|
||||
echo "autogen.sh ok, now run ./configure script"
|
||||
# gettextize updates Makefile.am, configure.in
|
||||
cp configure.in configure.in.old
|
||||
cp Makefile.am Makefile.am.old
|
||||
gettextize --copy --force --intl --no-changelog &&
|
||||
mv Makefile.am.old Makefile.am
|
||||
mv configure.in.old configure.in
|
||||
aclocal &&
|
||||
# autoheader creates config.h.in needed by autoconf
|
||||
autoheader &&
|
||||
# autoconf creates configure
|
||||
autoconf &&
|
||||
# automake creates Makefile.in
|
||||
automake --add-missing --copy --gnu
|
||||
|
||||
+180
-30
@@ -19,10 +19,10 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(WeeChat, 0.0.9, flashcode@flashtux.org)
|
||||
AC_INIT(WeeChat, 0.1.3, flashcode@flashtux.org)
|
||||
AC_CONFIG_SRCDIR([src/common/weechat.c])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([weechat], [0.0.9])
|
||||
AM_INIT_AUTOMAKE([weechat], [0.1.3])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -30,11 +30,11 @@ AC_PROG_MAKE_SET
|
||||
AC_PROG_RANLIB
|
||||
|
||||
# Gettext
|
||||
ALL_LINGUAS="fr"
|
||||
ALL_LINGUAS="fr es"
|
||||
AM_GNU_GETTEXT
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([curses], [initscr], LIBCURSES_FOUND=1, LIBCURSES_FOUND=0)
|
||||
AC_CHECK_LIB([ncurses], [initscr], LIBNCURSES_FOUND=1, LIBNCURSES_FOUND=0)
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
@@ -44,42 +44,86 @@ AC_CHECK_HEADERS([arpa/inet.h libintl.h limits.h locale.h netdb.h netinet/in.h s
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
AC_MSG_CHECKING([for socklen_t])
|
||||
AC_CACHE_VAL(ac_cv_type_socklen_t,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>],
|
||||
[socklen_t t;],
|
||||
ac_cv_type_socklen_t=yes,
|
||||
ac_cv_type_socklen_t=no,
|
||||
)])
|
||||
if test $ac_cv_type_socklen_t = no; then
|
||||
AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.)
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_type_socklen_t)
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_REALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr uname])
|
||||
AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr uname])
|
||||
|
||||
AH_VERBATIM([PLUGINS], [#undef PLUGINS])
|
||||
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
|
||||
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
|
||||
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
|
||||
AH_VERBATIM([DEBUG], [#undef DEBUG])
|
||||
|
||||
AC_ARG_ENABLE(curses, [ --disable-curses Turn off Curses interface (default=auto)],,enable_curses=yes)
|
||||
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=yes,enable_gtk=no)
|
||||
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=yes,enable_qt=no)
|
||||
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=yes,enable_perl=no)
|
||||
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0)
|
||||
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],enable_ncurses=$enableval,enable_ncurses=yes)
|
||||
AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (default=no)],enable_wxwidgets=$enableval,enable_wxwidgets=no)
|
||||
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=$enableval,enable_gtk=no)
|
||||
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=$enableval,enable_qt=no)
|
||||
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=$enableval,enable_perl=no)
|
||||
AC_ARG_ENABLE(python, [ --enable-python Turn on Python plugins (default=no)],enable_python=$enableval,enable_python=no)
|
||||
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=auto)],enable_gnutls=$enableval,enable_gnutls=yes)
|
||||
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0)
|
||||
|
||||
enable_plugins="no"
|
||||
enable_python="no"
|
||||
PYTHON_CFLAGS=
|
||||
enable_ruby="no"
|
||||
RUBY_CFLAGS=
|
||||
|
||||
AM_CONDITIONAL(GUI_CURSES, test "$enable_curses" = "yes")
|
||||
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
|
||||
AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
|
||||
AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
|
||||
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
|
||||
# AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
|
||||
# AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
|
||||
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
||||
|
||||
if test "x$enable_curses" = "xyes" ; then
|
||||
if test "$LIBCURSES_FOUND" = "0" ; then
|
||||
AC_MSG_ERROR([Curses library not found! Install Curses library or run ./configure with --disable-curses parameter.])
|
||||
if test "x$enable_ncurses" = "xyes" ; then
|
||||
if test "$LIBNCURSES_FOUND" = "0" ; then
|
||||
AC_MSG_ERROR([
|
||||
*** ncurses library not found!
|
||||
*** Please install ncurses library or run ./configure with --disable-ncurses parameter.])
|
||||
fi
|
||||
CURSES_LIBS="-lcurses"
|
||||
AC_SUBST(CURSES_LIBS)
|
||||
NCURSES_LIBS="-lncurses"
|
||||
AC_SUBST(NCURSES_LIBS)
|
||||
fi
|
||||
|
||||
if test "x$enable_wxwidgets" = "xyes" ; then
|
||||
AM_OPTIONS_WXCONFIG
|
||||
AM_PATH_WXCONFIG(2.3.4, wxWin=1)
|
||||
|
||||
if test "$wxWin" != 1; then
|
||||
AC_MSG_ERROR([
|
||||
*** wxWindows must be installed on your system
|
||||
*** but wx-config script couldn't be found.
|
||||
|
||||
*** Please check that wx-config is in path, the directory
|
||||
*** where wxWindows libraries are installed (returned by
|
||||
*** 'wx-config --libs' command) is in LD_LIBRARY_PATH or
|
||||
*** equivalent variable and wxWindows version is 2.3.4 or above.
|
||||
])
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
|
||||
CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
|
||||
LDFLAGS="$LDFLAGS $WX_LIBS"
|
||||
|
||||
WXWIDGETS_CFLAGS=""
|
||||
WXWIDGETS_LIBS=""
|
||||
fi
|
||||
|
||||
if test "x$enable_gtk" = "xyes" ; then
|
||||
@@ -96,18 +140,112 @@ PLUGINS_LIBS=
|
||||
|
||||
if test "x$enable_perl" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/perl/lib_weechat_perl.a `perl -MExtUtils::Embed -e ldopts`"
|
||||
PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
|
||||
|
||||
AC_PATH_PROG(PERL, perl perl5)
|
||||
if test -z $PERL ; then
|
||||
AC_MSG_ERROR([
|
||||
*** Perl must be installed on your system
|
||||
*** but perl interpreter couldn't be found in path.
|
||||
|
||||
Please check that perl is in path, or install
|
||||
it with your software package manager.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for Perl headers files)
|
||||
|
||||
PERL_HEADER_TEST=`PT=perltest.c ; echo "#include <EXTERN.h>" > $PT; echo "#include <perl.h>" >> $PT; echo "#include <XSUB.h>" >> $PT ; echo "int main() { return 0; }" >> $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ccopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
|
||||
|
||||
if test "x$PERL_HEADER_TEST" = "x0" ; then
|
||||
PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Perl headers couldn't be found in your system.
|
||||
*** Try to install it with your software package manager.])
|
||||
fi
|
||||
AC_MSG_RESULT(found)
|
||||
|
||||
AC_MSG_CHECKING(for Perl library)
|
||||
|
||||
PERL_LIB_TEST=`PT=perltest.c ; echo "int main() { return 0; }" > $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ldopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
|
||||
|
||||
if test "x$PERL_LIB_TEST" = "x0" ; then
|
||||
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/perl/lib_weechat_perl.a `$PERL -MExtUtils::Embed -e ldopts`"
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Perl library couldn't be found in your system.
|
||||
*** Try to install it with your software package manager.])
|
||||
fi
|
||||
AC_MSG_RESULT(found)
|
||||
|
||||
AC_SUBST(PERL_CFLAGS)
|
||||
AC_DEFINE(PLUGIN_PERL)
|
||||
fi
|
||||
|
||||
if test "x$enable_python" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
|
||||
AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2)
|
||||
if test -z $PYTHON ; then
|
||||
AC_MSG_ERROR([
|
||||
*** Python must be installed on your system
|
||||
*** but python interpreter couldn't be found in path.
|
||||
|
||||
*** Please check that python is in path, or install
|
||||
*** it with your software package manager.])
|
||||
fi
|
||||
|
||||
PYTHON_SYSPREFIX=`$PYTHON -c 'import sys; print "%s" % sys.prefix'`
|
||||
PYTHON_VERSION=`$PYTHON -c 'import sys ; print sys.version[[:3]]'`
|
||||
PYTHON_INCLUDE="$PYTHON_SYSPREFIX/include/python$PYTHON_VERSION"
|
||||
|
||||
AC_MSG_CHECKING(for Python header files)
|
||||
if test -r "$PYTHON_INCLUDE/Python.h"; then
|
||||
PYTHON_CFLAGS=-I`$PYTHON -c "import distutils.sysconfig,string; print distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Python header files couldn't be found in your system.
|
||||
*** Try to install them with your software package manager.])
|
||||
fi
|
||||
AC_MSG_RESULT(found)
|
||||
|
||||
PYTHON_LIB="$PYTHON_SYSPREFIX/lib/python$PYTHON_VERSION/config"
|
||||
|
||||
AC_MSG_CHECKING(for Python library)
|
||||
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so" -o -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
|
||||
PYTHON_LFLAGS="-lpython$PYTHON_VERSION -lpthread -lutil"
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Python library couldn't be found in your system.
|
||||
*** Try to install it with your software package manager.])
|
||||
fi
|
||||
AC_MSG_RESULT(found)
|
||||
|
||||
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/python/lib_weechat_python.a $PYTHON_LFLAGS"
|
||||
AC_SUBST(PYTHON_CFLAGS)
|
||||
AC_DEFINE(PLUGIN_PYTHON)
|
||||
fi
|
||||
|
||||
if test "x$enable_plugins" = "xyes" ; then
|
||||
AC_DEFINE(PLUGINS)
|
||||
fi
|
||||
|
||||
AC_SUBST(PLUGINS_LIBS)
|
||||
|
||||
if test "x$enable_gnutls" = "xyes" ; then
|
||||
found_gnutls="no"
|
||||
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, 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_LIBS="-lgnutls"
|
||||
AC_SUBST(GNUTLS_LIBS)
|
||||
AC_DEFINE(HAVE_GNUTLS)
|
||||
else
|
||||
enable_gnutls="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
CFLAGS=`echo $CFLAGS | sed s/-g//g`
|
||||
if test "x$CFLAGS" = "x" ; then
|
||||
CFLAGS="-O2"
|
||||
@@ -122,14 +260,20 @@ if test "x$debug" = "x2" ; then
|
||||
AC_DEFINE(DEBUG)
|
||||
fi
|
||||
|
||||
dnl For FreeBSD
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
CFLAGS="$CFLAGS $CPPFLAGS"
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
src/Makefile
|
||||
src/common/Makefile
|
||||
src/irc/Makefile
|
||||
src/plugins/Makefile
|
||||
src/plugins/perl/Makefile
|
||||
src/plugins/python/Makefile
|
||||
src/gui/Makefile
|
||||
src/gui/curses/Makefile
|
||||
src/gui/wxwidgets/Makefile
|
||||
src/gui/gtk/Makefile
|
||||
src/gui/qt/Makefile
|
||||
intl/Makefile
|
||||
@@ -139,8 +283,11 @@ echo
|
||||
echo $PACKAGE $VERSION
|
||||
|
||||
listgui=
|
||||
if test "x$enable_curses" = "xyes" ; then
|
||||
listgui="$listgui Curses"
|
||||
if test "x$enable_ncurses" = "xyes" ; then
|
||||
listgui="$listgui ncurses"
|
||||
fi
|
||||
if test "x$enable_wxwidgets" = "xyes"; then
|
||||
listgui="$listgui WxWidgets"
|
||||
fi
|
||||
if test "x$enable_gtk" = "xyes" ; then
|
||||
listgui="$listgui Gtk+"
|
||||
@@ -150,16 +297,18 @@ if test "x$enable_qt" = "xyes" ; then
|
||||
fi
|
||||
|
||||
if test "x$listgui" = "x" ; then
|
||||
AC_MSG_ERROR([No interface specified... Please specify at least Curses, Gtk or Qt.])
|
||||
AC_MSG_ERROR([
|
||||
*** No interface specified...
|
||||
*** Please specify at least ncurses, WxWidgets, Gtk or Qt.])
|
||||
fi
|
||||
|
||||
msg_debug_compiler="No"
|
||||
msg_debug_verbose="No"
|
||||
msg_debug_compiler="no"
|
||||
msg_debug_verbose="no"
|
||||
if test "x$debug" = "x1" || test "x$debug" = "x2" ; then
|
||||
msg_debug_compiler="Yes"
|
||||
msg_debug_compiler="yes"
|
||||
fi
|
||||
if test "x$debug" = "x2" ; then
|
||||
msg_debug_verbose="Yes"
|
||||
msg_debug_verbose="yes"
|
||||
fi
|
||||
|
||||
echo
|
||||
@@ -169,6 +318,7 @@ echo Build with Plugin support..... : $enable_plugins
|
||||
echo Build with Perl support....... : $enable_perl
|
||||
echo Build with Python support..... : $enable_python
|
||||
echo Build with Ruby support....... : $enable_ruby
|
||||
echo Build with GNUtls support..... : $enable_gnutls
|
||||
echo
|
||||
echo Compile with debug info....... : $msg_debug_compiler
|
||||
echo Print debugging messages...... : $msg_debug_verbose
|
||||
|
||||
@@ -1,3 +1,36 @@
|
||||
weechat (0.1.2-2) unstable; urgency=low
|
||||
|
||||
* Patch src/gui/curse/gui-display.c to fix segfault
|
||||
when config file does not exists (Closes: #310589).
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Tue, 24 May 2005 20:55:02 +0200
|
||||
|
||||
weechat (0.1.2-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.1.2, see ChangeLog for detail.
|
||||
|
||||
-- Sebastien Helleu <flashcode@flashtux.org> Sat, 21 May 2005 08:00:00 +0200
|
||||
|
||||
weechat (0.1.1-2) unstable; urgency=low
|
||||
|
||||
* debian/control:
|
||||
- Add myself to uploaders.
|
||||
- Remove unecessary dependency on weechat-gtk (Closes: #308287).
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Tue, 10 May 2005 22:38:52 +0200
|
||||
|
||||
weechat (0.1.1-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.1.1, see ChangeLog for detail (closes: #306492)
|
||||
|
||||
-- Sebastien Helleu <flashcode@flashtux.org> Sat, 20 Mar 2005 08:00:00 +0200
|
||||
|
||||
weechat (0.1.0-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.1.0, see ChangeLog for detail.
|
||||
|
||||
-- Sebastien Helleu <flashcode@flashtux.org> Sat, 12 Feb 2005 12:00:00 +0200
|
||||
|
||||
weechat (0.0.9-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.0.9, see ChangeLog for detail.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
4
|
||||
@@ -1,13 +1,14 @@
|
||||
Source: weechat
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: FlashCode <flashcode@flashtux.org>
|
||||
Build-Depends: debhelper (>> 4.0.0), libncurses5 (>= 5.2.20020112a-7), perl (>= 5.6.0-16), libperl-dev
|
||||
Standards-Version: 3.5.8
|
||||
Maintainer: Sebastien Helleu <flashcode@flashtux.org>
|
||||
Uploaders: Julien Louis <ptitlouis@sysif.net>
|
||||
Build-Depends: debhelper (>> 4.0.4), libncurses5-dev (>= 5.2.20020112a-7), libperl-dev, python-dev
|
||||
Standards-Version: 3.6.1
|
||||
|
||||
Package: weechat
|
||||
Architecture: all
|
||||
Depends: ${shlibs:Depends}, weechat-common (= ${Source-Version}), weechat-curses (= ${Source-Version}), weechat-gtk (= ${Source-Version})
|
||||
Depends: weechat-common (= ${Source-Version}), weechat-curses (= ${Source-Version})
|
||||
Description: Fast, light and extensible IRC client
|
||||
WeeChat (Wee Enhanced Environment for Chat) is a fast and light IRC client
|
||||
for many operating systems. Everything can be done with a keyboard.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
This package was debianized by FlashCode <flashcode@flashtux.org> on
|
||||
Sat, 01 Jan 2005 13:00:00 +0200.
|
||||
Sat, 21 May 2005 08:00:00 +0200.
|
||||
|
||||
It was downloaded from http://weechat.flashtux.org/download
|
||||
|
||||
|
||||
+17
-15
@@ -14,7 +14,8 @@ endif
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
./configure --prefix=/usr --sysconfdir=/etc --enable-perl
|
||||
./configure --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man \
|
||||
--enable-perl --enable-python
|
||||
touch configure-stamp
|
||||
|
||||
|
||||
@@ -29,7 +30,7 @@ clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp configure-stamp
|
||||
-$(MAKE) clean
|
||||
-$(MAKE) distclean
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
@@ -40,32 +41,33 @@ install: build
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/weechat
|
||||
dh_install --sourcedir=debian/weechat
|
||||
install -o root -g root -m 755 src/gui/curses/weechat-curses $(CURDIR)/debian/weechat-curses/usr/bin
|
||||
#install -o root -g root -m 755 src/gui/gtk/weechat-gtk $(CURDIR)/debian/weechat-gtk/usr/bin
|
||||
# install -o root -g root -m 755 src/gui/gtk/weechat-gtk $(CURDIR)/debian/weechat-gtk/usr/bin
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
dh_testdir -pweechat-common
|
||||
dh_testroot -pweechat-common
|
||||
dh_testdir -pweechat-common -pweechat
|
||||
dh_testroot -pweechat-common -pweechat
|
||||
dh_installchangelogs ChangeLog -pweechat-common
|
||||
dh_installdocs -pweechat-common
|
||||
dh_installexamples -pweechat-common
|
||||
dh_compress -pweechat-common
|
||||
dh_fixperms -pweechat-common
|
||||
dh_installdeb -pweechat-common
|
||||
dh_shlibdeps -pweechat-common
|
||||
dh_gencontrol -pweechat-common
|
||||
dh_md5sums -pweechat-common
|
||||
dh_builddeb -pweechat-common
|
||||
dh_compress -pweechat-common -pweechat
|
||||
dh_link -pweechat usr/share/doc/weechat-common usr/share/doc/weechat
|
||||
dh_fixperms -pweechat-common -pweechat
|
||||
dh_installdeb -pweechat-common -pweechat
|
||||
dh_shlibdeps -pweechat-common -pweechat
|
||||
dh_gencontrol -pweechat-common -pweechat
|
||||
dh_md5sums -pweechat-common -pweechat
|
||||
dh_builddeb -pweechat-common -pweechat
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir -a
|
||||
dh_testroot -a
|
||||
dh_installchangelogs -a
|
||||
dh_installdocs -a
|
||||
# dh_installchangelogs -a
|
||||
# dh_installdocs -a
|
||||
dh_installman weechat-curses.1 -pweechat-curses
|
||||
dh_link -a
|
||||
dh_link -a usr/share/doc/weechat-common usr/share/doc/weechat-curses
|
||||
dh_strip -a
|
||||
dh_compress -a
|
||||
dh_fixperms -a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2003 FlashCode <flashcode@flashtux.org>
|
||||
# Copyright (c) 2003-2005 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
|
||||
@@ -15,15 +15,18 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
all: weechat_doc_fr.texi weechat_doc_en.texi weechat_doc_pt.texi
|
||||
all: weechat_doc_fr.texi weechat_doc_en.texi weechat_doc_pt.texi weechat_doc_es.texi
|
||||
export LANG=fr_FR && makeinfo --html --no-split --number-sections weechat_doc_fr.texi
|
||||
export LANG=fr_FR && makeinfo --no-headers --no-warn --no-split --number-sections weechat_doc_fr.texi >weechat_doc_fr.txt
|
||||
export LANG=en_EN && makeinfo --html --no-split --number-sections weechat_doc_en.texi
|
||||
export LANG=en_EN && makeinfo --no-headers --no-warn --no-split --number-sections weechat_doc_en.texi >weechat_doc_en.txt
|
||||
export LANG=es_ES && makeinfo --html --no-split --number-sections weechat_doc_es.texi
|
||||
export LANG=es_ES && makeinfo --no-headers --no-warn --no-split --number-sections weechat_doc_es.texi >weechat_doc_es.txt
|
||||
export LANG=pt_PT && makeinfo --html --no-split --number-sections weechat_doc_pt.texi
|
||||
export LANG=pt_PT && makeinfo --no-headers --no-warn --no-split --number-sections weechat_doc_pt.texi >weechat_doc_pt.txt
|
||||
export LANG=fr_FR && texi2pdf weechat_doc_fr.texi
|
||||
export LANG=en_EN && texi2pdf weechat_doc_en.texi
|
||||
export LANG=es_ES && texi2pdf weechat_doc_es.texi
|
||||
export LANG=pt_PT && texi2pdf weechat_doc_pt.texi
|
||||
|
||||
clean:
|
||||
|
||||
+938
-173
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+940
-174
File diff suppressed because it is too large
Load Diff
+1148
-52
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+14
-5
@@ -1,30 +1,39 @@
|
||||
./src/irc/irc-nick.c
|
||||
./src/irc/irc-server.c
|
||||
./src/irc/irc-channel.c
|
||||
./src/irc/irc.h
|
||||
./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.h
|
||||
./src/plugins/perl/wee-perl.c
|
||||
./src/plugins/perl/wee-perl.h
|
||||
./src/plugins/python/wee-python.c
|
||||
./src/plugins/python/wee-python.h
|
||||
./src/plugins/plugins.c
|
||||
./src/plugins/plugins.h
|
||||
./src/gui/curses/gui-input.c
|
||||
./src/gui/curses/gui-display.c
|
||||
./src/gui/gtk/gui-display.c
|
||||
./src/gui/gtk/gui-input.c
|
||||
./src/gui/gui.h
|
||||
./src/gui/gui-common.c
|
||||
./src/gui/gui.h
|
||||
./src/common/command.c
|
||||
./src/common/completion.c
|
||||
./src/common/history.c
|
||||
./src/common/weechat.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/weechat.c
|
||||
./src/common/weechat.h
|
||||
./src/common/weeconfig.c
|
||||
./src/common/weeconfig.h
|
||||
./src/common/weelist.c
|
||||
./src/common/weelist.h
|
||||
|
||||
+3931
File diff suppressed because it is too large
Load Diff
+1714
-1107
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user