mirror of
https://github.com/weechat/weechat.git
synced 2026-06-20 18:14:46 +02:00
Compare commits
111 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 150c5e9749 | |||
| 6bec96cd4d | |||
| 068284dd19 | |||
| 38a8c321c0 | |||
| 0094d143b3 | |||
| 530dc9fb67 | |||
| 96a69fd7f3 | |||
| 938915d387 | |||
| 25bbe3d284 | |||
| 9c7d05f605 | |||
| c953db4d64 | |||
| 9d6ca20478 | |||
| 7f4a213239 | |||
| e18f14e5d3 | |||
| 8f3455d0a9 | |||
| dfbea2850a | |||
| 8a299adb3b | |||
| a29416e352 | |||
| c346216e34 | |||
| da7df57b1a | |||
| 61fac4d49e | |||
| 4f5c1b6e09 | |||
| 2962a8e6c8 | |||
| 76263dc7cf | |||
| 554fa728ae | |||
| 5881048405 | |||
| c517253a72 | |||
| fe16f6d48f | |||
| f276fd9494 | |||
| 517de7ab94 | |||
| 06463e5937 | |||
| d80c8e9e57 | |||
| f74b280a1f | |||
| cd4f50c136 | |||
| 767e378c53 | |||
| 60503d9383 | |||
| 11321acb96 | |||
| 84b1a27265 | |||
| 51322e7917 | |||
| d256d72eef | |||
| 8a61b0eee0 | |||
| d4ecb032d4 | |||
| 3f946e304d | |||
| 97b6bbcb9e | |||
| 357edc193e | |||
| ace03b808d | |||
| 428cfbc297 | |||
| 02cd829c4c | |||
| 17973de52a | |||
| 364667f788 | |||
| 10d7c6c34a | |||
| 38fa7c93ac | |||
| 9e328d3fef | |||
| 312d8015f5 | |||
| 110aa59ca8 | |||
| 89b955c79e | |||
| 3d724fb634 | |||
| 29d0225e4a | |||
| 8416212077 | |||
| c36f08d7d7 | |||
| 1230735c5f | |||
| 77d7b703de | |||
| 60db73c19a | |||
| a9ca2987bb | |||
| 220308e1fa | |||
| 8166d15235 | |||
| 575525d965 | |||
| 6271304832 | |||
| bdf9eadf43 | |||
| 15ea11b57b | |||
| f3390da5e3 | |||
| eeff957278 | |||
| 1eac6d8fdd | |||
| 23696b44da | |||
| 63ffae72af | |||
| 376c8a29d6 | |||
| 8b1e3b9890 | |||
| 1b2c5571e6 | |||
| 4c6c367557 | |||
| 99ad719ab9 | |||
| a68a1f8192 | |||
| 930c40eae1 | |||
| 9238a37351 | |||
| a7c4c7237c | |||
| a9912cd266 | |||
| 1d07964d17 | |||
| 06bd0f9f0e | |||
| 4b1679900a | |||
| 99f03cd2a3 | |||
| 3d41a3fa2f | |||
| 089b167573 | |||
| fc2d9732e5 | |||
| 94a3b5e1ae | |||
| 6b12f19083 | |||
| 8a6d35cf12 | |||
| d286f3922c | |||
| 505b43d15b | |||
| 07a820ced6 | |||
| df6a41566b | |||
| 263606fffb | |||
| d4d065253e | |||
| 673e7680af | |||
| ad1120c84c | |||
| f2a78ebc16 | |||
| fef0932c1d | |||
| 96bd473887 | |||
| 89d107c1a9 | |||
| 54d4fc12a6 | |||
| 55125beee4 | |||
| a724278215 | |||
| e3799797ef |
@@ -1,12 +1,13 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
WeeChat known bugs, 2005-05-21
|
||||
WeeChat known bugs, 2005-09-24
|
||||
|
||||
- color display problems when term has white background
|
||||
- ./configure does not check that Ruby libraries are installed
|
||||
- ./configure does not check that Gtk 2.0 libraries are installed
|
||||
- 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
|
||||
- when many WeeChat are launched, log file is not properly written (cleared by
|
||||
each WeeChat at startup)
|
||||
- display problems with old Konsole versions (Kde terminal) (???)
|
||||
|
||||
@@ -1,9 +1,55 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2005-06-30
|
||||
ChangeLog - 2005-09-24
|
||||
|
||||
|
||||
Version 0.1.5 (2005-09-24):
|
||||
* added /ame command (send CTCP action to all channels of all
|
||||
connected servers)
|
||||
* added setting "irc_notice_as_pv" to see notices as pv
|
||||
* added nicks colors in setup file
|
||||
* fixed DCC bug: delete failed file only if really empty (on disk)
|
||||
* fixed IRC message parser bug
|
||||
* fixed scroll problem (screen moving when scrolling and new line
|
||||
displayed)
|
||||
* fixed infinite loop when scrolling back and displaying long lines
|
||||
* fixed crash when closing a buffer used by more than one window
|
||||
* added some missing IRC commands
|
||||
* fixed DCC display bug (now decodes string according to charset)
|
||||
* added /ignore and /unignore commands
|
||||
* fixed bug with strings comparison (str[n]casecmp) and some locales
|
||||
(like turkish), now using ASCII comparison (thanks to roktas)
|
||||
* signal SIGQUIT is now ignored
|
||||
* fixed refresh bug when one line is bigger than screen size
|
||||
* fixed look_nicklist_min_size and look_nicklist_max_size options
|
||||
* fixed refresh bug when changing channel modes
|
||||
* jump to next server now saves current channel buffer for each server
|
||||
* ctrl-up/ctrl-down keys added to call previous/next command in global
|
||||
history (common to all buffers)
|
||||
|
||||
Version 0.1.4 (2005-07-30):
|
||||
* join and part/quit prefixes (arrows) now displayed with different colors
|
||||
* added "irc_highlight" setting, to get highlight with any word
|
||||
* fixed auto-rejoin for channels with key
|
||||
* fixed /ctcp command (now any command/data allowed)
|
||||
* added /amsg command (send text to all channels of all connected servers)
|
||||
* fixed SIGSEGV handler (now write a core file by aborting program)
|
||||
* fixed statusbar & infobar background refresh problem with some systems
|
||||
* added color for private in hotlist (different than color for highlight)
|
||||
* added DCC resume and timeout
|
||||
* added function for Perl/Python to get DCC list
|
||||
* fixed FIFO pipe (command now authorized on a buffer not connected
|
||||
to an IRC server)
|
||||
* topic completion now decodes UTF-8 string
|
||||
* fixed bug with IRC URL on command line (irc://)
|
||||
* new keyboard management: keys are setup in config file, new command
|
||||
/key was added and some new default keys were added, alt-k key is
|
||||
used to grab key (useful for /key command)
|
||||
* added seconds in infobar time (optional thanks to new setting)
|
||||
* fixed some curses refreshs
|
||||
* channels auto-prefixed by "#" (if no prefix found) for /join command
|
||||
|
||||
Version 0.1.3 (2005-07-02):
|
||||
* proxy support (http, socks4, socks5) with authentification (http, socks5)
|
||||
and ipv6 support (client to proxy)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2005-05-21
|
||||
WeeChat FAQ, 2005-09-24
|
||||
=======================
|
||||
|
||||
Intended audience:
|
||||
@@ -50,8 +50,12 @@ 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, wxWidgets, Qt),
|
||||
* extensible with scripts (Perl, Python, Ruby),
|
||||
* many GUI (Curses, Gtk, wxWidgets, Qt)
|
||||
* nicklist available in all GUI
|
||||
* extensible with scripts (Perl, Python, Ruby)
|
||||
* horizontal and vertical window split
|
||||
* infobar highlight
|
||||
* FIFO pipe for remote control
|
||||
* developed from scratch (not based on any other IRC client)
|
||||
* multi-platform
|
||||
* 100% GPL and free
|
||||
@@ -83,7 +87,9 @@ A: You have to setup charset used for decoding, encoding, and internal WeeChat
|
||||
================================================================================
|
||||
Q: How can I customize key bindings?
|
||||
|
||||
A: Today you can't do that. This is planed for a future version.
|
||||
A: Key bindings are customizable with /key command.
|
||||
Default key Meta-k (usually Alt-k) lets you grab key code and insert it
|
||||
in input zone.
|
||||
|
||||
|
||||
2.5
|
||||
@@ -103,7 +109,7 @@ A: You can use /perl command to load scripts (default path is
|
||||
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
|
||||
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.
|
||||
@@ -189,5 +195,5 @@ A: There's many tasks to do (code, documentation, ...)
|
||||
================================================================================
|
||||
Q: Can I give money or other things to WeeChat developers?
|
||||
|
||||
A: Beer is welcome :)
|
||||
Otherwise Paypal account is: flashcode@free.fr (no limit for gifts :)
|
||||
A: You can give us money to help development.
|
||||
Details on http://weechat.flashtux.org/donate.php?lang=en
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2005-05-21
|
||||
WeeChat FAQ, 2005-09-24
|
||||
=======================
|
||||
|
||||
Public concerné :
|
||||
@@ -53,8 +53,12 @@ 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, wxWidgets, Qt),
|
||||
* extensible par des scripts (Perl, Python, Ruby),
|
||||
* plusieurs interfaces (Curses, Gtk, wxWidgets, Qt)
|
||||
* liste des pseudos disponible dans toutes les interfaces
|
||||
* extensible par des scripts (Perl, Python, Ruby)
|
||||
* découpage de la fenêtre horizontalement et verticalement
|
||||
* highlight dans la barre d'infos
|
||||
* tube FIFO pour contrôle à distance
|
||||
* développé à partir de zéro (non basé sur un quelconque client IRC)
|
||||
* multi-platformes
|
||||
* 100% GPL et libre
|
||||
@@ -87,8 +91,9 @@ R: Il faut configurer le charset utilis
|
||||
================================================================================
|
||||
Q: Comment puis-je configurer les raccourcis clavier ?
|
||||
|
||||
R: Aujourd'hui vous ne pouvez pas le faire. Ce sera possible dans une
|
||||
version future.
|
||||
R: Les raccourcis clavier sont modifiables avec la commande /key.
|
||||
La touche par défaut Meta-k (souvent Alt-k) permet de capturer le code
|
||||
d'une touche et de l'inclure dans la zone de saisie.
|
||||
|
||||
|
||||
2.5
|
||||
@@ -201,6 +206,5 @@ R: Il y a plusieurs choses
|
||||
================================================================================
|
||||
Q: Puis-je donner de l'argent ou d'autres choses aux développeurs WeeChat ?
|
||||
|
||||
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 :)
|
||||
R: Vous pouvez donner de l'argent pour aider le développement.
|
||||
Plus de détails sur http://weechat.flashtux.org/donate.php
|
||||
|
||||
+2
-4
@@ -15,9 +15,9 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
SUBDIRS = po intl src
|
||||
SUBDIRS = po doc intl src
|
||||
|
||||
EXTRA_DIST = config.rpath weechat-curses.1 BUGS FAQ FAQ.fr \
|
||||
EXTRA_DIST = config.rpath BUGS FAQ FAQ.fr \
|
||||
debian/changelog debian/control \
|
||||
debian/copyright \
|
||||
debian/rules debian/weechat-common.docs \
|
||||
@@ -25,6 +25,4 @@ EXTRA_DIST = config.rpath weechat-curses.1 BUGS FAQ FAQ.fr \
|
||||
debian/weechat-curses.install debian/weechat-gtk.dirs \
|
||||
debian/weechat-gtk.install
|
||||
|
||||
man_MANS = weechat-curses.1
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
* FlashCode, 2005-09-24
|
||||
|
||||
WeeChat 0.1.5 released.
|
||||
|
||||
* FlashCode, 2005-07-30
|
||||
|
||||
WeeChat 0.1.4 released.
|
||||
|
||||
* FlashCode, 2005-07-02
|
||||
|
||||
WeeChat 0.1.3 released.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
TODO - 2005-07-02
|
||||
TODO - 2005-09-24
|
||||
|
||||
Legend:
|
||||
# done
|
||||
@@ -10,7 +10,7 @@ Legend:
|
||||
? is this really necessary?
|
||||
|
||||
|
||||
v0.1.3:
|
||||
v0.1.6:
|
||||
------
|
||||
|
||||
* General:
|
||||
@@ -21,14 +21,13 @@ v0.1.3:
|
||||
+ 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)
|
||||
* WeeChat commands
|
||||
- be able to bind a key on more than one command
|
||||
- be able to make an alias running more than one command
|
||||
- host with "*" possible with /ignore command
|
||||
|
||||
* Configuration:
|
||||
# save buffer notify levels
|
||||
- be able to launch more than one command when connecting to server
|
||||
|
||||
|
||||
Future versions:
|
||||
@@ -38,22 +37,20 @@ Future versions:
|
||||
- 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
|
||||
nick/host
|
||||
- when we're away, WeeChat should log all the lines begenning by our nick.
|
||||
When we come back from our away it should print it to the current window
|
||||
- "/notify" and "/unnotify" command to be warn by WeeChat when a given
|
||||
nick/host connect to the given irc network
|
||||
|
||||
* WeeChat commands:
|
||||
- "/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")
|
||||
- "/last": command to look for text in previous messages
|
||||
- completion system for scripts arguments
|
||||
|
||||
* Interface:
|
||||
- color for nicks (except own nick) when nick colors are disabled
|
||||
- allow decode/encode charsets for servers or chan (not globally)
|
||||
- interpret special chars in messages (color & bold for example)
|
||||
- understand incomplete commands if unambigous (for example: /he for /help is ok)
|
||||
? Qt GUI
|
||||
@@ -61,6 +58,3 @@ Future versions:
|
||||
* Plugins:
|
||||
- Ruby plugin
|
||||
- "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts
|
||||
|
||||
* Configuration:
|
||||
- add key bindings to config file
|
||||
|
||||
+20
-6
@@ -19,10 +19,10 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(WeeChat, 0.1.3, flashcode@flashtux.org)
|
||||
AC_INIT(WeeChat, 0.1.5, flashcode@flashtux.org)
|
||||
AC_CONFIG_SRCDIR([src/common/weechat.c])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([weechat], [0.1.3])
|
||||
AM_INIT_AUTOMAKE([weechat], [0.1.5])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -30,7 +30,7 @@ AC_PROG_MAKE_SET
|
||||
AC_PROG_RANLIB
|
||||
|
||||
# Gettext
|
||||
ALL_LINGUAS="fr es"
|
||||
ALL_LINGUAS="fr es cs"
|
||||
AM_GNU_GETTEXT
|
||||
|
||||
# Checks for libraries.
|
||||
@@ -66,6 +66,7 @@ AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa mem
|
||||
AH_VERBATIM([PLUGINS], [#undef PLUGINS])
|
||||
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
|
||||
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
|
||||
AH_VERBATIM([PLUGIN_RUBY], [#undef PLUGIN_RUBY])
|
||||
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
|
||||
AH_VERBATIM([DEBUG], [#undef DEBUG])
|
||||
|
||||
@@ -75,12 +76,11 @@ AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (defau
|
||||
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(ruby, [ --enable-ruby Turn on Ruby plugins (default=no)],enable_ruby=$enableval,enable_ruby=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_ruby="no"
|
||||
RUBY_CFLAGS=
|
||||
|
||||
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
|
||||
AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
|
||||
@@ -88,7 +88,7 @@ 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_RUBY, test "$enable_ruby" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
|
||||
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
||||
|
||||
if test "x$enable_ncurses" = "xyes" ; then
|
||||
@@ -225,6 +225,18 @@ if test "x$enable_python" = "xyes" ; then
|
||||
AC_DEFINE(PLUGIN_PYTHON)
|
||||
fi
|
||||
|
||||
if test "x$enable_ruby" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
|
||||
# TODO: check that ruby lib and headers are installed
|
||||
|
||||
RUBY_CFLAGS=-I`ruby -rrbconfig -e "puts Config::CONFIG[['archdir']]"`
|
||||
RUBY_LFLAGS=-L`ruby -rrbconfig -e "puts Config::CONFIG[['archdir']]"` -lruby
|
||||
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/ruby/lib_weechat_ruby.a $RUBY_LFLAGS"
|
||||
AC_SUBST(RUBY_CFLAGS)
|
||||
AC_DEFINE(PLUGIN_RUBY)
|
||||
fi
|
||||
|
||||
if test "x$enable_plugins" = "xyes" ; then
|
||||
AC_DEFINE(PLUGINS)
|
||||
fi
|
||||
@@ -265,12 +277,14 @@ LIBS="$LIBS $INTLLIBS"
|
||||
CFLAGS="$CFLAGS $CPPFLAGS"
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
doc/Makefile
|
||||
src/Makefile
|
||||
src/common/Makefile
|
||||
src/irc/Makefile
|
||||
src/plugins/Makefile
|
||||
src/plugins/perl/Makefile
|
||||
src/plugins/python/Makefile
|
||||
src/plugins/ruby/Makefile
|
||||
src/gui/Makefile
|
||||
src/gui/curses/Makefile
|
||||
src/gui/wxwidgets/Makefile
|
||||
|
||||
Vendored
+34
@@ -1,3 +1,37 @@
|
||||
weechat (0.1.4-2) unstable; urgency=low
|
||||
|
||||
* Add autotools-dev to Build-Depends.
|
||||
* update autotools stuff automatically to always
|
||||
have up-to-date config.{guess,sub}
|
||||
* Update Build-Depends: libgnutls11-dev -> libgnutls-dev
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Mon, 1 Aug 2005 11:46:39 +0200
|
||||
|
||||
weechat (0.1.4-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Sat, 30 Jul 2005 16:26:55 +0200
|
||||
|
||||
weechat (0.1.3-2) unstable; urgency=low
|
||||
|
||||
* Update config.{guess,sub} to fix FTBFS on k*BSD (Closes: #316791)
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Fri, 8 Jul 2005 21:30:38 +0200
|
||||
|
||||
weechat (0.1.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Sat, 2 Jul 2005 20:06:29 +0200
|
||||
|
||||
weechat (0.1.2-3) unstable; urgency=low
|
||||
|
||||
* Apply patch against gui-display.c to fix curses color bug.
|
||||
* remove dh_install --sourcedir to allow builds on woody.
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Sun, 19 Jun 2005 22:37:11 +0200
|
||||
|
||||
weechat (0.1.2-2) unstable; urgency=low
|
||||
|
||||
* Patch src/gui/curse/gui-display.c to fix segfault
|
||||
|
||||
Vendored
+2
-2
@@ -3,8 +3,8 @@ Section: net
|
||||
Priority: optional
|
||||
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
|
||||
Build-Depends: debhelper (>> 4.0.0), libncurses5-dev (>= 5.2.20020112a-7), libperl-dev, python-dev, libgnutls-dev, autotools-dev
|
||||
Standards-Version: 3.6.2.1
|
||||
|
||||
Package: weechat
|
||||
Architecture: all
|
||||
|
||||
Vendored
+10
-5
@@ -15,7 +15,7 @@ configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
./configure --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man \
|
||||
--enable-perl --enable-python
|
||||
--infodir=\$${prefix}/share/info --enable-perl --enable-python
|
||||
touch configure-stamp
|
||||
|
||||
|
||||
@@ -31,6 +31,10 @@ clean:
|
||||
dh_testroot
|
||||
rm -f build-stamp configure-stamp
|
||||
-$(MAKE) distclean
|
||||
test -r /usr/share/misc/config.guess && \
|
||||
cp -f /usr/share/misc/config.guess config.guess
|
||||
test -r /usr/share/misc/config.sub && \
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
@@ -38,9 +42,9 @@ install: build
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
$(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
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
||||
dh_install
|
||||
# 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
|
||||
|
||||
|
||||
@@ -50,6 +54,7 @@ binary-indep: build install
|
||||
dh_testroot -pweechat-common -pweechat
|
||||
dh_installchangelogs ChangeLog -pweechat-common
|
||||
dh_installdocs -pweechat-common
|
||||
dh_installinfo -pweechat-common
|
||||
dh_installexamples -pweechat-common
|
||||
dh_compress -pweechat-common -pweechat
|
||||
dh_link -pweechat usr/share/doc/weechat-common usr/share/doc/weechat
|
||||
@@ -66,7 +71,7 @@ binary-arch: build install
|
||||
dh_testroot -a
|
||||
# dh_installchangelogs -a
|
||||
# dh_installdocs -a
|
||||
dh_installman weechat-curses.1 -pweechat-curses
|
||||
dh_installman doc/weechat-curses.1 -pweechat-curses
|
||||
dh_link -a usr/share/doc/weechat-common usr/share/doc/weechat-curses
|
||||
dh_strip -a
|
||||
dh_compress -a
|
||||
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
version=2
|
||||
http://weechat.flashtux.org/download/weechat-(\d.*)\.tar\.bz2
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
usr/share/locale
|
||||
debian/tmp/usr/share/locale/
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
usr/bin/weechat-curses
|
||||
debian/tmp/usr/bin/weechat-curses
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# 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
|
||||
#
|
||||
|
||||
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:
|
||||
rm -rf weechat_doc_*.aux weechat_doc_*.cp weechat_doc_*.fn \
|
||||
weechat_doc_*.html weechat_doc_*.ky weechat_doc_*.log \
|
||||
weechat_doc_*.pdf weechat_doc_*.pg weechat_doc_*.toc \
|
||||
weechat_doc_*.tp weechat_doc_*.txt weechat_doc_*.vr
|
||||
@@ -0,0 +1,28 @@
|
||||
# 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
|
||||
#
|
||||
|
||||
man_MANS = weechat-curses.1
|
||||
|
||||
info_TEXINFOS = weechat_doc_fr.texi weechat_doc_en.texi \
|
||||
weechat_doc_es.texi weechat_doc_pt.texi
|
||||
|
||||
#weechat_TEXINFOS = weechat_doc_fr.texi weechat_doc_en.texi \
|
||||
# weechat_doc_es.texi weechat_doc_pt.texi
|
||||
|
||||
AM_MAKEINFOHTMLFLAGS = --no-split --number-sections
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH WEECHAT 1 "July 2005" "FlashCode"
|
||||
.TH WEECHAT 1 "September 2005" "FlashCode"
|
||||
|
||||
.SH NAME
|
||||
weechat-curses \- Wee Enhanced Environment for Chat (Curses version)
|
||||
@@ -23,6 +23,10 @@ It is compliant with RFCs 1459, 2810, 2811, 2812, and 2813.
|
||||
.br
|
||||
display config file help (list of options)
|
||||
.TP
|
||||
.B \-f, \-\-key\-functions
|
||||
.br
|
||||
display internal functions for keys
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
.br
|
||||
display summary of options
|
||||
@@ -31,6 +35,10 @@ display summary of options
|
||||
.br
|
||||
display IRC commands
|
||||
.TP
|
||||
.B \-k, \-\-keys
|
||||
.br
|
||||
display default keys
|
||||
.TP
|
||||
.B \-l, \-\-license
|
||||
.br
|
||||
display program license
|
||||
+253
-29
@@ -35,9 +35,7 @@
|
||||
|
||||
@title WeeChat - User guide
|
||||
@subtitle Fast, light and extensible IRC client
|
||||
@subtitle Documentation for WeeChat v0.1.3 - July, 03 2005
|
||||
|
||||
@image{weechat_image}
|
||||
@subtitle Documentation for WeeChat v0.1.5 - September, 24 2005
|
||||
|
||||
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
|
||||
|
||||
@@ -150,7 +148,7 @@ Binary packages are available for these distributions:
|
||||
@itemize @bullet
|
||||
@item
|
||||
Debian (or any Debian compatible distribution)@*
|
||||
To install: @kbd{dpkg -i /path/weechat_x.y.z-1_i386.deb}
|
||||
To install: @kbd{apt-get install weechat-curses}
|
||||
@item
|
||||
Mandriva/Redhat (or any RPM compatible distribution)@*
|
||||
To install: @kbd{rpm -i /path/weechat-x.y.z-1.i386.rpm}
|
||||
@@ -220,6 +218,8 @@ Then follow instructions for source package - @xref{Source package}.
|
||||
@table @code
|
||||
@item -c, --config
|
||||
Display config file help (list of options)@*
|
||||
@item -f, --key-functions
|
||||
Display WeeChat internal functions for keys@*
|
||||
@item -h, --help
|
||||
Display help screen@*
|
||||
@item -i, --irc-commands
|
||||
@@ -280,6 +280,9 @@ Type: string (any string), default value: '[%H:%M:%S]'@*
|
||||
@item look_color_nicks
|
||||
Display nick names with different colors@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_color_nicks_number
|
||||
Number of colors to use for nicks colors@*
|
||||
Type: integer (values: between 1 and 10), default value: 10@*
|
||||
@item look_color_actions
|
||||
Display actions with different colors@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@@ -315,7 +318,10 @@ Enable info bar@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_infobar_timestamp
|
||||
Timestamp for time in infobar@*
|
||||
Type: string (any string), default value: '%B, %A %d %Y - %H:%M'@*
|
||||
Type: string (any string), default value: '%B, %A %d %Y'@*
|
||||
@item look_infobar_seconds
|
||||
Display seconds in infobar time@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_infobar_delay_highlight
|
||||
Delay (in seconds) for highlight messages in infobar (0 = disable highlight notifications in infobar)@*
|
||||
Type: integer (values: between 0 and 2147483647), default value: 7@*
|
||||
@@ -340,6 +346,12 @@ Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@item col_chat_prefix2
|
||||
Color for middle char of prefix@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@item col_chat_join
|
||||
Color for join arrow (prefix)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightgreen'@*
|
||||
@item col_chat_part
|
||||
Color for part/quit arrow (prefix)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightred'@*
|
||||
@item col_chat_nick
|
||||
Color for nicks in actions (chat window)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@@ -367,9 +379,12 @@ Type: color (Curses or Gtk color), default value: 'cyan'@*
|
||||
@item col_status_data_msg
|
||||
Color for window with new messages (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'yellow'@*
|
||||
@item col_status_private
|
||||
Color for window with private message (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_status_highlight
|
||||
Color for window with highlight (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightred'@*
|
||||
@item col_status_data_other
|
||||
Color for window with new data (not messages) (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@@ -382,6 +397,9 @@ Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_infobar
|
||||
Color for info bar text@*
|
||||
Type: color (Curses or Gtk color), default value: 'black'@*
|
||||
@item col_infobar_delimiters
|
||||
Color for infobar delimiters@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_infobar_highlight
|
||||
Color for info bar highlight notification@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@@ -430,6 +448,36 @@ Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_nick_self
|
||||
Color for local nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@item col_nick_color1
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'cyan'@*
|
||||
@item col_nick_color2
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'magenta'@*
|
||||
@item col_nick_color3
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'green'@*
|
||||
@item col_nick_color4
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'brown'@*
|
||||
@item col_nick_color5
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightblue'@*
|
||||
@item col_nick_color6
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@item col_nick_color7
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@item col_nick_color8
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_nick_color9
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightgreen'@*
|
||||
@item col_nick_color10
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_nick_private
|
||||
Color for other nick in private window@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@@ -496,6 +544,9 @@ Type: string (any string), default value: 'WeeChat %v'@*
|
||||
@item irc_default_msg_quit
|
||||
Default quit message ('%v' will be replaced by WeeChat version in string)@*
|
||||
Type: string (any string), default value: 'WeeChat %v'@*
|
||||
@item irc_notice_as_pv
|
||||
Display notices as private messages@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@item irc_away_check
|
||||
Interval between two checks for away (in minutes, 0 = never check)@*
|
||||
Type: integer (values: between 0 and 2147483647), default value: 0@*
|
||||
@@ -511,6 +562,9 @@ Type: integer (values: between 0 and 2147483647), default value: 5@*
|
||||
@item irc_fifo_pipe
|
||||
Create a FIFO pipe for remote control@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@item irc_highlight
|
||||
Comma separated list of words to highlight (case insensitive comparison)@*
|
||||
Type: string (any string), default value: ''@*
|
||||
@item dcc_auto_accept_files
|
||||
Automatically accept incoming dcc files@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@@ -608,7 +662,7 @@ Type: string (any string), default value: ''@*
|
||||
Delay (in seconds) after command was executed (example: give some time for authentication)@*
|
||||
Type: integer (values: between 0 and 5), default value: 0@*
|
||||
@item server_autojoin
|
||||
Comma separated list of channels to join when connected to server@*
|
||||
Comma separated list of channels to join when connected to server (example: "#chan1,#chan2,#chan3 #key1,#key2")@*
|
||||
Type: string (any string), default value: ''@*
|
||||
@item server_autorejoin
|
||||
Automatically rejoin channels when kicked@*
|
||||
@@ -668,12 +722,21 @@ Go to the beginning of command line@*
|
||||
@item End / Ctrl + E
|
||||
Go to the end of command line@*
|
||||
@*
|
||||
@item Ctrl + K
|
||||
Delete until end of line@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redraw whole window@*
|
||||
@*
|
||||
@item Ctrl + U
|
||||
Delete until beginning of line@*
|
||||
@*
|
||||
@item Ctrl + W
|
||||
Erase previous word of command line@*
|
||||
@*
|
||||
@item Backspace / Delete
|
||||
Erase previous / next char of command line@*
|
||||
@*
|
||||
@item Ctrl + Backspace / Ctrl + W
|
||||
Erase previous word of command line@*
|
||||
@*
|
||||
@item Tab
|
||||
Complete command or nick (@kbd{Tab} again: find next completion)@*
|
||||
@*
|
||||
@@ -686,6 +749,9 @@ Execute command or send message@*
|
||||
@item Up arrow / Down arrow
|
||||
Call again last commands/messages@*
|
||||
@*
|
||||
@item Ctrl + up arrow / Ctrl + down arrow
|
||||
Call again last commands/messages in global history@*
|
||||
@*
|
||||
@item PageUp / PageDown
|
||||
Show buffer history@*
|
||||
@*
|
||||
@@ -701,30 +767,48 @@ Remove last infobar message@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redraw whole window@*
|
||||
@*
|
||||
@item Alt + left arrow / Alt + right arrow
|
||||
Same as F5 / F6@*
|
||||
@*
|
||||
@item Alt + A
|
||||
Switch to next buffer with activity (with priority: highlight, message, other)@*
|
||||
@*
|
||||
@item Alt + D
|
||||
Display current DCC@*
|
||||
@item Alt + B
|
||||
Go to previous word@*
|
||||
@*
|
||||
@item Alt + R
|
||||
@item Alt + D
|
||||
Delete next word@*
|
||||
@*
|
||||
@item Alt + F
|
||||
Go to next word@*
|
||||
@*
|
||||
@item Alt + H
|
||||
Clear hotlist (activity notification on other buffers)@*
|
||||
@*
|
||||
@item Alt + S
|
||||
@item Alt + J then Alt + D
|
||||
Display current DCC@*
|
||||
@*
|
||||
@item Alt + J then Alt + L
|
||||
Switch to last buffer@*
|
||||
@*
|
||||
@item Alt + J then Alt + S
|
||||
Switch to server buffer@*
|
||||
@*
|
||||
@item Alt + X
|
||||
@item Alt + J then Alt + X
|
||||
Switch to first channel of next server (or server buffer if no channel is opened)@*
|
||||
@*
|
||||
@item Alt + digit (1-9)
|
||||
Switch to buffer by number@*
|
||||
@*
|
||||
@item Alt + J then number (01-99)
|
||||
Switch to buffer by number@*
|
||||
@*
|
||||
@item Alt + K
|
||||
Grab a key
|
||||
@*
|
||||
@item Alt + R
|
||||
Delete entire line@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@@ -785,11 +869,34 @@ display help about commands@*
|
||||
@*
|
||||
command: name of a WeeChat or IRC command@*
|
||||
@*
|
||||
@item ignore [mask [[type | command] [channel [server]]]]
|
||||
@*
|
||||
ignore IRC messages and/or hosts@*
|
||||
@*
|
||||
mask: nick or host mask to ignore@*
|
||||
type: type of message to ignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for ignore@*
|
||||
server: name of server for ignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /ignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item key [key function/command] [unbind key] [functions] [reset -yes]
|
||||
@*
|
||||
bind/unbind keys@*
|
||||
@*
|
||||
key: bind this key to an internal function or a command (beginning by "/")@*
|
||||
unbind: unbind a key (if "all", default bindings are restored)@*
|
||||
functions: list internal functions for key bindings@*
|
||||
reset: restore bindings to the default values and delete ALL personal binding (use carefully!)@*
|
||||
@*
|
||||
@item perl [load filename] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
list/load/unload Perl scripts@*
|
||||
@*
|
||||
filename: Perl script (file) to load@*
|
||||
@*
|
||||
Without argument, /perl command lists all loaded Perl scripts.@*
|
||||
@*
|
||||
@item python [load filename] | [autoload] | [reload] | [unload]
|
||||
@@ -797,8 +904,17 @@ Without argument, /perl command lists all loaded Perl scripts.@*
|
||||
list/load/unload Python scripts@*
|
||||
@*
|
||||
filename: Python script (file) to load@*
|
||||
@*
|
||||
Without argument, /python command lists all loaded Python scripts.@*
|
||||
@*
|
||||
@item ruby [load filename] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
list/load/unload Ruby scripts@*
|
||||
@*
|
||||
filename: Ruby script (file) to load@*
|
||||
@*
|
||||
Without argument, /ruby command lists all loaded Ruby scripts.@*
|
||||
@*
|
||||
@item server [servername] | [servername hostname port [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [del servername]
|
||||
@*
|
||||
list, add or remove servers@*
|
||||
@@ -834,6 +950,20 @@ remove an alias@*
|
||||
@*
|
||||
alias_name: name of alias to remove@*
|
||||
@*
|
||||
@item unignore [number | [mask [[type | command] [channel [server]]]]]
|
||||
@*
|
||||
unignore IRC messages and/or hosts@*
|
||||
@*
|
||||
number: # of ignore to unignore (number is displayed by list of ignore)@*
|
||||
mask: nick or host mask to unignore@*
|
||||
type: type of message to unignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for unignore@*
|
||||
server: name of server for unignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /unignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item window [list | splith | splitv | [merge [down | up | left | right | all]]]
|
||||
@*
|
||||
manage windows@*
|
||||
@@ -854,6 +984,18 @@ find information about the administrator of the server@*
|
||||
@*
|
||||
target: server@*
|
||||
@*
|
||||
@item ame message
|
||||
@*
|
||||
send a CTCP action to all channels of all connected servers@*
|
||||
@*
|
||||
message: message to send@*
|
||||
@*
|
||||
@item amsg text
|
||||
@*
|
||||
send message to all channels of all connected servers@*
|
||||
@*
|
||||
text: text to send@*
|
||||
@*
|
||||
@item away [-all] [message]
|
||||
@*
|
||||
toggle away status@*
|
||||
@@ -868,12 +1010,13 @@ bans nicks or hosts@*
|
||||
channel: channel for ban@*
|
||||
nickname: user or host to ban@*
|
||||
@*
|
||||
@item ctcp nickname type
|
||||
@item ctcp nickname type [arguments]
|
||||
@*
|
||||
send a ctcp message@*
|
||||
send a CTCP message (Client-To-Client Protocol)@*
|
||||
@*
|
||||
nickname: user to send ctcp to@*
|
||||
type: "action" or "version"@*
|
||||
nickname: user to send CTCP to@*
|
||||
type: CTCP type (examples: "version", "ping", ..)@*
|
||||
arguments: arguments for CTCP@*
|
||||
@*
|
||||
@item dcc action [nickname [file]]
|
||||
@*
|
||||
@@ -883,15 +1026,15 @@ action: 'send' (file) or 'chat' or 'close' (chat)@*
|
||||
nickname: nickname to send file or chat@*
|
||||
file: filename (on local host)@*
|
||||
@*
|
||||
@item dehalfop nickname [nickname]
|
||||
@item dehalfop [nickname [nickname]]
|
||||
@*
|
||||
removes half channel operator status from nickname(s)@*
|
||||
@*
|
||||
@item deop nickname [nickname]
|
||||
@item deop [nickname [nickname]]
|
||||
@*
|
||||
removes channel operator status from nickname(s)@*
|
||||
@*
|
||||
@item devoice nickname [nickname]
|
||||
@item devoice [nickname [nickname]]
|
||||
@*
|
||||
removes voice from nickname(s)@*
|
||||
@*
|
||||
@@ -899,7 +1042,7 @@ removes voice from nickname(s)@*
|
||||
@*
|
||||
shutdown the server@*
|
||||
@*
|
||||
@item halfop nickname [nickname]
|
||||
@item halfop [nickname [nickname]]
|
||||
@*
|
||||
gives half channel operator status to nickname(s)@*
|
||||
@*
|
||||
@@ -975,7 +1118,7 @@ target: server for forwarding request@*
|
||||
@*
|
||||
@item me message
|
||||
@*
|
||||
send a ctcp action to the current channel@*
|
||||
send a CTCP action to the current channel@*
|
||||
@*
|
||||
message: message to send@*
|
||||
@*
|
||||
@@ -1182,7 +1325,7 @@ gives the version info of nick or server (current or specified)@*
|
||||
server: server name@*
|
||||
nickname: nickname@*
|
||||
@*
|
||||
@item voice nickname [nickname]
|
||||
@item voice [nickname [nickname]]
|
||||
@*
|
||||
gives voice to nickname(s)@*
|
||||
@*
|
||||
@@ -1216,6 +1359,83 @@ target: reply should match this mask@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
Internal functions for keys:@*
|
||||
|
||||
@table @kbd
|
||||
@item return
|
||||
terminate line@*
|
||||
@item tab
|
||||
complete word@*
|
||||
@item backspace
|
||||
delete previous char@*
|
||||
@item delete
|
||||
delete next char@*
|
||||
@item delete_end_line
|
||||
delete until end of line@*
|
||||
@item delete_beginning_line
|
||||
delete until beginning of line@*
|
||||
@item delete_line
|
||||
delete entire line@*
|
||||
@item delete_previous_word
|
||||
delete previous word@*
|
||||
@item delete_next_word
|
||||
delete next word@*
|
||||
@item clipboard_paste
|
||||
paste current clipboard content@*
|
||||
@item transpose_chars
|
||||
transpose chars@*
|
||||
@item home
|
||||
go to beginning of line@*
|
||||
@item end
|
||||
go to end of line@*
|
||||
@item left
|
||||
move one char left@*
|
||||
@item previous_word
|
||||
move to previous word@*
|
||||
@item right
|
||||
move one char right@*
|
||||
@item next_word
|
||||
move to next word@*
|
||||
@item up
|
||||
call previous command in history@*
|
||||
@item up_global
|
||||
call previous command in global history@*
|
||||
@item down
|
||||
call next command in history@*
|
||||
@item down_global
|
||||
call next command in global history@*
|
||||
@item page_up
|
||||
scroll one page up@*
|
||||
@item page_down
|
||||
scroll one page down@*
|
||||
@item infobar_clear
|
||||
clear infobar@*
|
||||
@item nick_page_up
|
||||
scroll nicklist one page up@*
|
||||
@item nick_page_down
|
||||
scroll nicklist one page down@*
|
||||
@item nick_beginning
|
||||
display beginning of nicklist@*
|
||||
@item nick_end
|
||||
display end of nicklist@*
|
||||
@item refresh
|
||||
refresh screen@*
|
||||
@item jump_smart
|
||||
jump to buffer with activity@*
|
||||
@item jump_dcc
|
||||
jump to DCC buffer@*
|
||||
@item jump_last_buffer
|
||||
jump to last buffer@*
|
||||
@item jump_server
|
||||
jump to server buffer@*
|
||||
@item jump_next_server
|
||||
jump to next server@*
|
||||
@item hotlist_clear
|
||||
clear hotlist@*
|
||||
@item grab_key
|
||||
grab a key@*
|
||||
@end table
|
||||
|
||||
@node FIFO pipe, , WeeChat commands, Usage
|
||||
@section FIFO pipe
|
||||
|
||||
@@ -1234,15 +1454,19 @@ Some examples:
|
||||
@item @bullet{} change your nick on freenode to "mynick|out":
|
||||
@*
|
||||
@command{echo "freenode */nick mynick|out" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} display text on #weechat channel:
|
||||
@*
|
||||
@command{echo "freenode,#weechat *hello everybody!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} display text on current channel (buffer displayed by WeeChat):
|
||||
@*
|
||||
@command{echo "*hello!" >~/.weechat/weechat_fifo_12345}@*
|
||||
@command{echo "*hello!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@b{Warning:} this is dangerous and you should not do that except if you know what you do!
|
||||
@*
|
||||
@item @bullet{} send 2 commands to unload/reload Perl scripts (you have to separate them with \n):
|
||||
@*
|
||||
@command{echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345}
|
||||
@end table
|
||||
@*
|
||||
|
||||
+278
-53
@@ -30,14 +30,13 @@
|
||||
@c end tex
|
||||
|
||||
@documentlanguage es
|
||||
@documentencoding ISO-8859-1
|
||||
|
||||
@titlepage
|
||||
|
||||
@title WeeChat - Gui@'on de usuario.
|
||||
@subtitle Cliente IRC r@'apido, peque@~no y extensible
|
||||
@subtitle Documentaci@'on para WeeChat v0.1.3 - 03 de Julio de 2005
|
||||
|
||||
@image{weechat_image}
|
||||
@subtitle Documentaci@'on para WeeChat v0.1.5 - 24 de Septiembre de 2005
|
||||
|
||||
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
|
||||
|
||||
@@ -150,7 +149,7 @@ Los paquetes binarios est@'an disponibles para las siguientes distribuciones:
|
||||
@itemize @bullet
|
||||
@item
|
||||
Debian (o compatible con Debian)@*
|
||||
Para instalar WeeChat: @kbd{dpkg -i /direccion/weechat_x.y.z-1_i386.deb}
|
||||
Para instalar WeeChat: @kbd{apt-get install weechat-curses}
|
||||
@item
|
||||
Mandrake/Redhat (o cualquier distribuci@'on compatible con los paquetes RPM)@*
|
||||
Para instalar WeeChat: @kbd{rpm -i /direccion/weechat-x.y.z-1.i386.rpm}
|
||||
@@ -187,7 +186,7 @@ Adquiere los derechos de root e instala WeeChat:@*
|
||||
|
||||
Atenci@'on: Las fuentes CVS est@'an reservadas para usuarios con experiencia: Es posible que WeeChat no
|
||||
se instale o que se sea bastante inestable.
|
||||
¡Ya te he avisado!@*
|
||||
@exclamdown{}Ya te he avisado!@*
|
||||
|
||||
Para recuperar las fuentes CVS, escribe las l@'ineas siguientes:@*
|
||||
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
|
||||
@@ -221,6 +220,8 @@ Luego, lee las instructiones para Paquetes de fuentes - @xref{Paquetes de fuente
|
||||
@table @code
|
||||
@item -c, --config
|
||||
Obtener la ayuda del fichero de configuraci@'on (lista de opciones)@*
|
||||
@item -f, --key-functions
|
||||
Display WeeChat internal functions for keys@*
|
||||
@item -h, --help
|
||||
Obtener la ayuda@*
|
||||
@item -i, --irc-commands
|
||||
@@ -279,6 +280,9 @@ Typo: cadena (cualquier cadena), valor por defecto: '[%H:%M:%S]'@*
|
||||
@item look_color_nicks
|
||||
Mostrar nombres de usuario con colores diferentes@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@item look_color_nicks_number
|
||||
Number of colors to use for nicks colors@*
|
||||
Typo: entero (valores: entre 1 y 10), valor por defecto: 10@*
|
||||
@item look_color_actions
|
||||
Mostrar acciones con colores diferentes@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@@ -314,7 +318,10 @@ Activa la barra de informaci@'on@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@item look_infobar_timestamp
|
||||
Fecha y hora para las conversaciones guardadas@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: '%B, %A %d %Y - %H:%M'@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: '%B, %A %d %Y'@*
|
||||
@item look_infobar_seconds
|
||||
Mostrar segundos en la hora de la barra de herramientas@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@item look_infobar_delay_highlight
|
||||
Retraso (en segundos) para la notificaci@'on de mensajes en la barra de informaci@'on (0 = desactivar las notificaciones en la barra de informaci@'on)@*
|
||||
Typo: entero (valores: entre 0 y 2147483647), valor por defecto: 7@*
|
||||
@@ -339,6 +346,12 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'lightcyan'@*
|
||||
@item col_chat_prefix2
|
||||
Color para el car@'acter de en medio del prefijo@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'white'@*
|
||||
@item col_chat_join
|
||||
Color for join arrow (prefix)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightgreen'@*
|
||||
@item col_chat_part
|
||||
Color for part/quit arrow (prefix)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightred'@*
|
||||
@item col_chat_nick
|
||||
Color para los nombres de usuario en las acciones (ventana de conversaci@'on)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightcyan'@*
|
||||
@@ -366,9 +379,12 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'cyan'@*
|
||||
@item col_status_data_msg
|
||||
Color para una ventana con mensajes nuevos (barra de estado)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'yellow'@*
|
||||
@item col_status_private
|
||||
Color for window with private message (status bar)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_status_highlight
|
||||
Color para una ventana con resaltado (barra de estado)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightred'@*
|
||||
@item col_status_data_other
|
||||
Color para una ventana con nuevos datos (no mensajes) (barra de estado)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'default'@*
|
||||
@@ -381,6 +397,9 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@item col_infobar
|
||||
Color para el texto de la barra de informaci@'on@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'black'@*
|
||||
@item col_infobar_delimiters
|
||||
Color para los delimitadores de la barra de informaci@'on@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@item col_infobar_highlight
|
||||
Color para la notificaci@'on en la barra de informaci@'on@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'white'@*
|
||||
@@ -421,7 +440,7 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
Color para el s@'imbolo de voz@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'yellow'@*
|
||||
@item col_nick_more
|
||||
Color for '+' when scrolling nicks@*
|
||||
Color para '+' al desplazar nicks@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_nick_sep
|
||||
Color para el separador de alias@*
|
||||
@@ -429,6 +448,36 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@item col_nick_self
|
||||
Color para el alias local@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'white'@*
|
||||
@item col_nick_color1
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'cyan'@*
|
||||
@item col_nick_color2
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'magenta'@*
|
||||
@item col_nick_color3
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'green'@*
|
||||
@item col_nick_color4
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'brown'@*
|
||||
@item col_nick_color5
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightblue'@*
|
||||
@item col_nick_color6
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'default'@*
|
||||
@item col_nick_color7
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightcyan'@*
|
||||
@item col_nick_color8
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_nick_color9
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightgreen'@*
|
||||
@item col_nick_color10
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@item col_nick_private
|
||||
Color para el otro alias en la ventana privada@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'default'@*
|
||||
@@ -495,6 +544,9 @@ Typo: cadena (cualquier cadena), valor por defecto: 'WeeChat %v'@*
|
||||
@item irc_default_msg_quit
|
||||
Mensaje de fin por defecto ('%v' ser@'a reemplazado por la versi@'on de WeeChat en la cadena)@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: 'WeeChat %v'@*
|
||||
@item irc_notice_as_pv
|
||||
Display notices as private messages@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item irc_away_check
|
||||
Intervalo entre dos comprobaciones de ausencia (en minutos, 0 = no comprobar)@*
|
||||
Typo: entero (valores: entre 0 y 2147483647), valor por defecto: 0@*
|
||||
@@ -510,6 +562,9 @@ Typo: entero (valores: entre 0 y 2147483647), valor por defecto: 5@*
|
||||
@item irc_fifo_pipe
|
||||
Crea una tuber@'ia FIFO para control remoto@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item irc_highlight
|
||||
Comma separated list of words to highlight (case insensitive comparison)@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
@item dcc_auto_accept_files
|
||||
Aceptar autom@'aticamente los ficheros dcc entrantes@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@@ -541,10 +596,10 @@ Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
Utilizar un proxy para conectarse al servidor irc@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item proxy_type
|
||||
Proxy type (http (default), socks4, socks5)@*
|
||||
Tipo de proxy(http (por defecto), socks4, socks5)@*
|
||||
Typo: cadena (valores: 'http', 'socks4', 'socks5'), valor por defecto: 'http'@*
|
||||
@item proxy_ipv6
|
||||
Connect to proxy in ipv6@*
|
||||
Conectar al proxy en ipv6@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item proxy_address
|
||||
Direcci@'on del servidor proxy (IP o nombre de m@'aquina)@*
|
||||
@@ -553,7 +608,7 @@ Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
Puerto para conectarse al servidor proxy@*
|
||||
Typo: entero (valores: entre 0 y 65535), valor por defecto: 3128@*
|
||||
@item proxy_username
|
||||
Username for proxy server@*
|
||||
Nombre de usuario para el servidor proxy@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
@item proxy_password
|
||||
Contrase@~na para el servidor proxy@*
|
||||
@@ -577,10 +632,10 @@ Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
Puerto para conectarse al servidor@*
|
||||
Typo: entero (valores: entre 0 y 65535), valor por defecto: 6667@*
|
||||
@item server_ipv6
|
||||
Use IPv6 protocol for server communication@*
|
||||
Usar el protocolo IPv6 para la comunicaci@'on del servidor@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item server_ssl
|
||||
Use SSL for server communication@*
|
||||
Usar SSL para la comunicaci@'on del servidor@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item server_password
|
||||
Contrase@~na para el servidor IRC@*
|
||||
@@ -607,13 +662,13 @@ Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
Espera (en segundos) despu@'es de que el comando sea ejecutado (ejemplo: dar algo de tiempo para la autenticaci@'on)@*
|
||||
Typo: entero (valores: entre 0 y 5), valor por defecto: 0@*
|
||||
@item server_autojoin
|
||||
Lista de canales (separados por comas) a unirse cuando se conecte a un servidor@*
|
||||
Lista de canales (separados por comas) a unirse cuando se conecte a un servidor (ejemplo: "#chan1,#chan2,#chan3 #key1,#key2")@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
@item server_autorejoin
|
||||
Unirse de nuevo autom@'aticamente a los canales cuando sea expulsado@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@item server_notify_levels
|
||||
Comma separated list of notify levels for channels of this server (format: #channel:1,..)@*
|
||||
Lista separada por comas de niveles de notificaci@'on para canales de este servidor (formato: #canal:1,...)@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
@end table
|
||||
|
||||
@@ -667,12 +722,21 @@ Ir al inicio de la l@'inea de comandos@*
|
||||
@item Fin / Ctrl + E
|
||||
Ir al final de la l@'inea de comandos@*
|
||||
@*
|
||||
@item Ctrl + K
|
||||
Delete until end of line@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Refrescar toda la ventana@*
|
||||
@*
|
||||
@item Ctrl + U
|
||||
Delete until beginning of line@*
|
||||
@*
|
||||
@item Ctrl + W
|
||||
Borrar la palabra anterior en la l@'inea de comandos@*
|
||||
@*
|
||||
@item Backspace / Supr
|
||||
Borrar el caracter anterior / siguiente en la l@'inea de comandos@*
|
||||
@*
|
||||
@item Ctrl + Backspace / Ctrl + W
|
||||
Borrar la palabra anterior en la l@'inea de comandos@*
|
||||
@*
|
||||
@item Tab
|
||||
Completar el comando o el seud@'onimo (@kbd{Tab} de nuevo: encontrar la pr@'oxima autocompletaci@'on)@*
|
||||
@*
|
||||
@@ -685,6 +749,9 @@ Ejecutar la l@'inea de comandos o enviar el mensaje@*
|
||||
@item Flecha de arriba / Flecha de abajo
|
||||
Mostrar los @'ultimos comandos/mensajes@*
|
||||
@*
|
||||
@item Ctrl + up arrow / Ctrl + down arrow
|
||||
Call again last commands/messages in global history@*
|
||||
@*
|
||||
@item PageUp / PageDown
|
||||
Obtener el hist@'orico de la memoria temporal (buffer)@*
|
||||
@*
|
||||
@@ -700,30 +767,48 @@ Borrar el @'ultimo mensaje en la barra de informaciones@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Refrescar toda la ventana@*
|
||||
@*
|
||||
@item Alt + flecha izquierda / Alt + flecha derecha
|
||||
Como F5 / F6@*
|
||||
@*
|
||||
@item Alt + A
|
||||
Ir a la memoria temporal donde hay actividad (con el orden de prioridad siguiente: resaltado, mensaje, otros)@*
|
||||
@*
|
||||
@item Alt + D
|
||||
Obtener la lista de DCC actual@*
|
||||
@item Alt + B
|
||||
Go to previous word@*
|
||||
@*
|
||||
@item Alt + R
|
||||
@item Alt + D
|
||||
Delete next word@*
|
||||
@*
|
||||
@item Alt + F
|
||||
Go to next word@*
|
||||
@*
|
||||
@item Alt + H
|
||||
Borrar la 'hotlist' (notificaci@'on de actividad en otras memorias temporales)@*
|
||||
@*
|
||||
@item Alt + S
|
||||
@item Alt + J then Alt + D
|
||||
Obtener la lista de DCC actual@*
|
||||
@*
|
||||
@item Alt + J then Alt + L
|
||||
Switch to last buffer@*
|
||||
@*
|
||||
@item Alt + J then Alt + S
|
||||
Ir a la memoria temporal del servidor@*
|
||||
@*
|
||||
@item Alt + X
|
||||
@item Alt + J then Alt + X
|
||||
Ir al primer canal del servidor siguiente (o a la memoria temporal del servidor si ning@'un canal est@'a abierto)@*
|
||||
@*
|
||||
@item Alt + (1-9)
|
||||
Saltar a la memoria temporal con ese n@'umero@*
|
||||
@*
|
||||
@item Alt + J then number (01-99)
|
||||
Saltar a la memoria temporal con ese n@'umero@*
|
||||
@*
|
||||
@item Alt + K
|
||||
Grab a key
|
||||
@*
|
||||
@item Alt + R
|
||||
Delete entire line@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@@ -784,11 +869,34 @@ mostrar ayuda sobre los comandos@*
|
||||
@*
|
||||
comando: nombre de un comando de Weechat @'o de IRC@*
|
||||
@*
|
||||
@item ignore [mask [[type | command] [channel [server]]]]
|
||||
@*
|
||||
ignore IRC messages and/or hosts@*
|
||||
@*
|
||||
mask: nick or host mask to ignore@*
|
||||
type: type of message to ignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for ignore@*
|
||||
server: name of server for ignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /ignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item key [clave funci@'on/comando] [desatar clave] [funciones] [reset -yes]
|
||||
@*
|
||||
atar/desatar claves@*
|
||||
@*
|
||||
clave: ata esta clave a una funci@'on interna o a un comando (comenzando por "/ ")@*
|
||||
desatar: desata una clave(si "all", se restauran los anclajes por defecto)@*
|
||||
funciones: lista funciones internas para el anclaje de claves@*
|
||||
reset: restaura anclajes a los valores por defecto y elimina todos los anclajes personales (usar cuidadosamente)@*
|
||||
@*
|
||||
@item perl [load fichero] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
lista/carga/descarga de los Perl scripts@*
|
||||
@*
|
||||
fichero: Perl script (archivo) a cargar@*
|
||||
@*
|
||||
Sin argumentos, el comando /perl lista todos los Perl scripts cargados.@*
|
||||
@*
|
||||
@item python [load fichero] | [autoload] | [reload] | [unload]
|
||||
@@ -796,23 +904,32 @@ Sin argumentos, el comando /perl lista todos los Perl scripts cargados.@*
|
||||
lista/carga/descarga de los Python scripts@*
|
||||
@*
|
||||
fichero: Python script (archivo) a cargar@*
|
||||
@*
|
||||
Sin argumentos, el comando /python lista todos los Python scripts cargados.@*
|
||||
@*
|
||||
@item ruby [load fichero] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
lista/carga/descarga de los Ruby scripts@*
|
||||
@*
|
||||
fichero: Ruby script (archivo) a cargar@*
|
||||
@*
|
||||
Sin argumentos, el comando /ruby lista todos los Ruby scripts cargados.@*
|
||||
@*
|
||||
@item server [nombre_de_servidor] | [nombre_de_servidor nombre/IP puerto [-auto | -noauto] [-ipv6] [-ssl] [-pwd contrase@~na] [-nicks alias1 [alias2 [alias3]]] [-username nombre de usuario] [-realname nombre_real] [-command comando] [-autojoin canal[,canal]] ] | [del nombre_de_servidor]
|
||||
@*
|
||||
lista, a@~nade o elimina servidores@*
|
||||
@*
|
||||
servername: server name, for internal & display use@*
|
||||
hostname: name or IP address of server@*
|
||||
port: port for server (integer)@*
|
||||
ipv6: use IPv6 protocol@*
|
||||
ssl: use SSL protocol@*
|
||||
password: password for server@*
|
||||
nick1: first nick for server@*
|
||||
nick2: alternate nick for server@*
|
||||
nick3: second alternate nick for server@*
|
||||
username: user name@*
|
||||
realname: real name of user@*
|
||||
nombre_de_servidor: nombre del servidor, para uso interno y para mostrar@*
|
||||
nombre_de_anfitri@'on: nombre o direcci@'on IP del servidor@*
|
||||
puerto: puerto para el servidor (número entero)@*
|
||||
ipv6: utilizar protocolo IPv6@*
|
||||
ssl: utilizar protocolo SSL@*
|
||||
contrase@~na: contrase@~na para el servidor@*
|
||||
alias1: primer alias para el servidor@*
|
||||
alias2: alias alternativo para el servidor@*
|
||||
alias3: segundo alias alternativo para el servidor@*
|
||||
nombre_de_usuario: nombre de usuario@*
|
||||
nombre_real: nombre real del usuario@*
|
||||
@*
|
||||
@item save [archivo]
|
||||
@*
|
||||
@@ -833,6 +950,20 @@ eliminar un alias@*
|
||||
@*
|
||||
alias: nombre del alias a suprimir@*
|
||||
@*
|
||||
@item unignore [number | [mask [[type | command] [channel [server]]]]]
|
||||
@*
|
||||
unignore IRC messages and/or hosts@*
|
||||
@*
|
||||
number: # of ignore to unignore (number is displayed by list of ignore)@*
|
||||
mask: nick or host mask to unignore@*
|
||||
type: type of message to unignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for unignore@*
|
||||
server: name of server for unignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /unignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item window [list | splith | splitv | [merge [down | up | left | right | all]]]
|
||||
@*
|
||||
gesti@'on de ventanas@*
|
||||
@@ -853,6 +984,18 @@ encontrar informaci@'on sobre el administrador del servidor@*
|
||||
@*
|
||||
target: servidor objetivo@*
|
||||
@*
|
||||
@item ame mensaje
|
||||
@*
|
||||
send a CTCP action to all channels of all connected servers@*
|
||||
@*
|
||||
mensaje: mensaje a enviar@*
|
||||
@*
|
||||
@item amsg texto
|
||||
@*
|
||||
send message to all channels of all connected servers@*
|
||||
@*
|
||||
texto: texto a enviar@*
|
||||
@*
|
||||
@item away [-all] [mensaje]
|
||||
@*
|
||||
revertir el estado ausente@*
|
||||
@@ -867,12 +1010,13 @@ banea usuarios o m@'aquinas@*
|
||||
canal: canal en el que banear@*
|
||||
usuario: nombre de usuario o m@'aquina a banear@*
|
||||
@*
|
||||
@item ctcp usuario tipo
|
||||
@item ctcp nickname type [arguments]
|
||||
@*
|
||||
enviar un mensaje ctcp@*
|
||||
send a CTCP message (Client-To-Client Protocol)@*
|
||||
@*
|
||||
usuario: usuario a quien enviar el ctcp@*
|
||||
tipo: "action" @'o "version"@*
|
||||
nickname: user to send CTCP to@*
|
||||
type: CTCP type (examples: "version", "ping", ..)@*
|
||||
arguments: arguments for CTCP@*
|
||||
@*
|
||||
@item dcc acci@'on [usuario [fichero]]
|
||||
@*
|
||||
@@ -882,15 +1026,15 @@ acci@'on: 'send' (env@'io de archivo) @'o 'chat' (charla) @'o 'close' (cerrar ch
|
||||
usuario: nombre de usuario a quien enviar el archivo o la charla@*
|
||||
fichero: nombre del fichero (en la m@'aquina local)@*
|
||||
@*
|
||||
@item dehalfop pseudo [pseudo]
|
||||
@item dehalfop [pseudo [pseudo]]
|
||||
@*
|
||||
elimina el estado de media operador de canal a/a los usuario(s)@*
|
||||
@*
|
||||
@item deop pseudo [pseudo]
|
||||
@item deop [pseudo [pseudo]]
|
||||
@*
|
||||
elimina el estado de operador de canal a/a los usuario(s)@*
|
||||
@*
|
||||
@item devoice pseudo [pseudo]
|
||||
@item devoice [pseudo [pseudo]]
|
||||
@*
|
||||
elimina la voz a/a los usuario(s)@*
|
||||
@*
|
||||
@@ -898,7 +1042,7 @@ elimina la voz a/a los usuario(s)@*
|
||||
@*
|
||||
cerrar el servidor@*
|
||||
@*
|
||||
@item halfop pseudo [pseudo]
|
||||
@item halfop [pseudo [pseudo]]
|
||||
@*
|
||||
dar el estado de media operador de canal a/a los usuario(s)@*
|
||||
@*
|
||||
@@ -974,7 +1118,7 @@ objetivo: servidor al que remitir la consulta@*
|
||||
@*
|
||||
@item me mensaje
|
||||
@*
|
||||
enviar una acci@'on ctcp al canal actual@*
|
||||
enviar una acci@'on CTCP al canal actual@*
|
||||
@*
|
||||
mensaje: mensaje a enviar@*
|
||||
@*
|
||||
@@ -1025,8 +1169,8 @@ canal: nombre del canal@*
|
||||
@*
|
||||
cambiar el nombre de usuario actual@*
|
||||
@*
|
||||
-all: set new nickname for all connected servers@*
|
||||
nickname: new nickname@*
|
||||
-all: establece el nuevo nombre de usuario para todos los servidores conectados@*
|
||||
nickname: nuevo nombre de usuario@*
|
||||
@*
|
||||
@item notice usuario texto
|
||||
@*
|
||||
@@ -1181,7 +1325,7 @@ da la informaci@'on de versi@'on del usuario o servidor (actual o especificado)@
|
||||
servidor: nombre de servidor@*
|
||||
usuario: usuario@*
|
||||
@*
|
||||
@item voice pseudo [pseudo]
|
||||
@item voice [pseudo [pseudo]]
|
||||
@*
|
||||
da voz a/a los usuario(s)@*
|
||||
@*
|
||||
@@ -1215,6 +1359,83 @@ destinatario: la respuesta deber@'ia concordar con esta m@'ascara@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
Internal functions for keys:@*
|
||||
|
||||
@table @kbd
|
||||
@item return
|
||||
terminar l@'inea@*
|
||||
@item tab
|
||||
completar palabra@*
|
||||
@item backspace
|
||||
borrar el car@'acter anterior@*
|
||||
@item delete
|
||||
borrar el car@'acter siguiente@*
|
||||
@item delete_end_line
|
||||
borrar hasta fin de l@'inea@*
|
||||
@item delete_beginning_line
|
||||
borrar hasta principio de l@'inea@*
|
||||
@item delete_line
|
||||
borrar l@'inea entera@*
|
||||
@item delete_previous_word
|
||||
borrar la palabra anterior@*
|
||||
@item delete_next_word
|
||||
borrar la palabra siguiente@*
|
||||
@item clipboard_paste
|
||||
paste current clipboard content@*
|
||||
@item transpose_chars
|
||||
transpose chars@*
|
||||
@item home
|
||||
ir al principio de l@'inea@*
|
||||
@item end
|
||||
ir al final de l@'inea@*
|
||||
@item left
|
||||
mover un car@'acter a la izquierda@*
|
||||
@item previous_word
|
||||
mover a la palabra anterior@*
|
||||
@item right
|
||||
mover un car@'acter a la derecha@*
|
||||
@item next_word
|
||||
mover a la palabra siguiente@*
|
||||
@item up
|
||||
llamar al comando anterior en el historial@*
|
||||
@item up_global
|
||||
call previous command in global history@*
|
||||
@item down
|
||||
llamar al comando siguiente en el historial@*
|
||||
@item down_global
|
||||
call next command in global history@*
|
||||
@item page_up
|
||||
desplazarse una p@'agina hacia arriba@*
|
||||
@item page_down
|
||||
desplazarse una p@'agina hacia abajo@*
|
||||
@item infobar_clear
|
||||
limpiar barra de informaci@'on@*
|
||||
@item nick_page_up
|
||||
desplazar la lista de nicks una p@'agina hacia arriba@*
|
||||
@item nick_page_down
|
||||
desplazar la lista de nicks una p@'agina hacia abajo@*
|
||||
@item nick_beginning
|
||||
mostrar el principio de la lista de nicks@*
|
||||
@item nick_end
|
||||
mostrar el final de la lista de nicks@*
|
||||
@item refresh
|
||||
recargar la pantalla@*
|
||||
@item jump_smart
|
||||
saltar al búfer con actividad@*
|
||||
@item jump_dcc
|
||||
saltar al búfer DCC@*
|
||||
@item jump_last_buffer
|
||||
jump to last buffer@*
|
||||
@item jump_server
|
||||
saltar al búfer servidor@*
|
||||
@item jump_next_server
|
||||
saltar al servidor siguiente@*
|
||||
@item hotlist_clear
|
||||
limpiar hotlist@*
|
||||
@item grab_key
|
||||
grab a key@*
|
||||
@end table
|
||||
|
||||
@node Canal FIFO, , Comandos WeeChat, Uso
|
||||
@section Canal FIFO
|
||||
|
||||
@@ -1235,15 +1456,19 @@ Algunos ejemplos:
|
||||
@item @bullet{} cambiar el seud@'onimo en freenode por "mynick|out":
|
||||
@*
|
||||
@command{echo "freenode */nick mynick|out" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} escribir texto en el canal #weechat:
|
||||
@*
|
||||
@command{echo "freenode,#weechat *@exclamdown{}Hola a todos!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} escribir texto en el canal corriente (el que se puede visualizar en WeeChat actualmente)
|
||||
@*
|
||||
@command{echo "*¡Hola!" >~/.weechat/weechat_fifo_12345}@*
|
||||
@command{echo "*@exclamdown{}Hola!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@b{Advertencia:} esto es peligroso y no deber@'ias hacerlo.. salvo si lo que est@'as haciendo.
|
||||
@*
|
||||
@item @bullet{} enviar dos comandos para descargar y recargar los scripts Perl (tienes que separarlos con un \n):
|
||||
@*
|
||||
@command{echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345}
|
||||
@end table
|
||||
@*
|
||||
@@ -1370,7 +1595,7 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
|
||||
@code{@ @ @ @ weechat::print ("serveur=$_[0]\n");}@*
|
||||
@code{@ @ @ @ ($null, $canal, $mensaje) = split ":",$_[1],3;}@*
|
||||
@code{@ @ @ @ ($mascara, $null, $canal) = split " ", $canal;}@*
|
||||
@code{@ @ @ @ weechat::print ("mascara=$mascara, canal=$canal, mensaje=$mensaje\n");}@*
|
||||
@code{@ @ @ @ weechat::print ("masc=$mascara, canal=$canal, msj=$mensaje\n");}@*
|
||||
@code{@} }@*
|
||||
@*
|
||||
|
||||
@@ -1538,7 +1763,7 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
|
||||
@code{@ @ @ @ weechat.prnt("servidor="+servidor)}@*
|
||||
@code{@ @ @ @ null, canal, mensaje = string.split(args, ":", 2)}@*
|
||||
@code{@ @ @ @ mascara, null, canal = string.split(string.strip(canal), " ", 2)}@*
|
||||
@code{@ @ @ @ weechat.prnt("mascara="+mascara+", canal="+canal+", mensaje="+mensaje)}@*
|
||||
@code{@ @ @ @ weechat.prnt("masc="+mascara+", canal="+canal+", msj="+mensaje)}@*
|
||||
@*
|
||||
|
||||
@item
|
||||
@@ -1609,7 +1834,7 @@ Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
|
||||
@node Programas Ruby, , Programas Python, Extensiones
|
||||
@section Programas Ruby
|
||||
|
||||
¡No desarrollado!
|
||||
@exclamdown{}No desarrollado!
|
||||
|
||||
@c **************************** Autores / Soporte *****************************
|
||||
|
||||
|
||||
+260
-32
@@ -30,14 +30,13 @@
|
||||
@c end tex
|
||||
|
||||
@documentlanguage fr
|
||||
@documentencoding ISO-8859-1
|
||||
|
||||
@titlepage
|
||||
|
||||
@title WeeChat - Guide utilisateur
|
||||
@subtitle Client IRC rapide, l@'eger et extensible
|
||||
@subtitle Documentation pour WeeChat v0.1.3 - 03 Juillet 2005
|
||||
|
||||
@image{weechat_image}
|
||||
@subtitle Documentation pour WeeChat v0.1.5 - 24 Septembre 2005
|
||||
|
||||
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
|
||||
|
||||
@@ -149,7 +148,7 @@ Les paquets binaires sont disponibles pour les distributions suivantes :
|
||||
@itemize @bullet
|
||||
@item
|
||||
Debian (ou toute distribution compatible Debian)@*
|
||||
Pour installer : @kbd{dpkg -i /chemin/weechat_x.y.z-1_i386.deb}
|
||||
Pour installer : @kbd{apt-get install weechat-curses}
|
||||
@item
|
||||
Mandrake/Redhat (ou toute distribution compatible avec les RPM)@*
|
||||
Pour installer : @kbd{rpm -i /chemin/weechat-x.y.z-1.i386.rpm}
|
||||
@@ -222,6 +221,8 @@ Suivez alors les instructions du paquet sources - @xref{Paquet source}.
|
||||
Afficher l'aide sur le fichier de config (liste des options)@*
|
||||
@item -h, --help
|
||||
Afficher l'aide@*
|
||||
@item -f, --key-functions
|
||||
Afficher la liste des fonctions internes WeeChat pour les touches@*
|
||||
@item -i, --irc-commands
|
||||
Afficher la liste des commandes IRC@*
|
||||
@item -l, --license
|
||||
@@ -280,6 +281,9 @@ Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: '[%H:%M:%S]'@*
|
||||
@item look_color_nicks
|
||||
Afficher les utilisateurs avec diff@'erentes couleurs@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
|
||||
@item look_color_nicks_number
|
||||
Nombre de couleurs @`a utiliser pour les couleurs des pseudos@*
|
||||
Type: entier (valeurs: entre 1 et 10), valeur par d@'efaut: 10@*
|
||||
@item look_color_actions
|
||||
Afficher les actions avec diff@'erentes couleurs@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
|
||||
@@ -315,7 +319,10 @@ Active la barre d'infos@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
|
||||
@item look_infobar_timestamp
|
||||
Horodatage pour les conversations sauvegard@'ees@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: '%B, %A %d %Y - %H:%M'@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: '%B, %A %d %Y'@*
|
||||
@item look_infobar_seconds
|
||||
Afficher les secondes pour l'heure dans la barre d'infos@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
|
||||
@item look_infobar_delay_highlight
|
||||
D@'elai (en secondes) pour la notification des messages dans la barre d'infos (0 = d@'esactiver les notifications dans la barre d'infos)@*
|
||||
Type: entier (valeurs: entre 0 et 2147483647), valeur par d@'efaut: 7@*
|
||||
@@ -340,6 +347,12 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightcyan'@*
|
||||
@item col_chat_prefix2
|
||||
Couleur pour le caract@`ere du milieu du pr@'efixe@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'white'@*
|
||||
@item col_chat_join
|
||||
Couleur pour la fl@`eche du join (pr@'efixe)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightgreen'@*
|
||||
@item col_chat_part
|
||||
Couleur pour la fl@`eche du part/quit (pr@'efixe)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightred'@*
|
||||
@item col_chat_nick
|
||||
Couleur pour les noms d'utilisateurs dans les actions (fen@^etre de discussion)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightcyan'@*
|
||||
@@ -367,9 +380,12 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'cyan'@*
|
||||
@item col_status_data_msg
|
||||
Couleur pour une fen@^etre avec de nouvelles infos (barre de statut)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'yellow'@*
|
||||
@item col_status_private
|
||||
Couleur pour une fen@^etre avec un message priv@'e (barre de statut)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
@item col_status_highlight
|
||||
Couleur pour une fen@^etre avec un highlight (barre de statut)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightred'@*
|
||||
@item col_status_data_other
|
||||
Couleur pour une fen@^etre avec des nouvelles donn@'ees (pas des infos) (barre de statut)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'default'@*
|
||||
@@ -382,6 +398,9 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@item col_infobar
|
||||
Couleur pour la barre d'infos@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'black'@*
|
||||
@item col_infobar_delimiters
|
||||
Couleur pour les d@'elimiteurs de la barre d'infos@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@item col_infobar_highlight
|
||||
Couleur pour la notification dans la barre d'infos@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'white'@*
|
||||
@@ -430,6 +449,36 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@item col_nick_self
|
||||
Couleur pour le pseudo local@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'white'@*
|
||||
@item col_nick_color1
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'cyan'@*
|
||||
@item col_nick_color2
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'magenta'@*
|
||||
@item col_nick_color3
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'green'@*
|
||||
@item col_nick_color4
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'brown'@*
|
||||
@item col_nick_color5
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightblue'@*
|
||||
@item col_nick_color6
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'default'@*
|
||||
@item col_nick_color7
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightcyan'@*
|
||||
@item col_nick_color8
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
@item col_nick_color9
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightgreen'@*
|
||||
@item col_nick_color10
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@item col_nick_private
|
||||
Couleur pour l'autre pseudo dans la fen@^etre priv@'ee@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'default'@*
|
||||
@@ -496,6 +545,9 @@ Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: 'WeeChat %v'@*
|
||||
@item irc_default_msg_quit
|
||||
Message de fin par d@'efaut ('%v' sera remplac@'e par la version de WeeChat dans la cha@^ine)@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: 'WeeChat %v'@*
|
||||
@item irc_notice_as_pv
|
||||
Afficher les notices comme des messages priv@'es@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
|
||||
@item irc_away_check
|
||||
Intervalle entre deux v@'erifications des absences (en minutes, 0 = ne jemais v@'erifier)@*
|
||||
Type: entier (valeurs: entre 0 et 2147483647), valeur par d@'efaut: 0@*
|
||||
@@ -511,6 +563,9 @@ Type: entier (valeurs: entre 0 et 2147483647), valeur par d@'efaut: 5@*
|
||||
@item irc_fifo_pipe
|
||||
Cr@'eer un tube FIFO pour le contr@^ole @`a distance@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
|
||||
@item irc_highlight
|
||||
Liste des mots pour la notification (s@'epar@'es par des virgules, le comparaison ne tient pas compte de la casse)@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
|
||||
@item dcc_auto_accept_files
|
||||
Accepte automatiquement les fichiers dcc entrants@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
|
||||
@@ -608,7 +663,7 @@ Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
|
||||
D@'elai (en secondes) apr@`es ex@'ecution de la commande (exemple: donner du temps pour l'authentification)@*
|
||||
Type: entier (valeurs: entre 0 et 5), valeur par d@'efaut: 0@*
|
||||
@item server_autojoin
|
||||
Liste des canaux (s@'epar@'es par des virgules) @`a rejoindre lorsque connect@'e au serveur@*
|
||||
Liste des canaux (s@'epar@'es par des virgules) @`a rejoindre lorsque connect@'e au serveur (exemple: "#chan1,#chan2,#chan3 #key1,#key2")@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
|
||||
@item server_autorejoin
|
||||
Rejoindre automatiquement les canaux quand mis dehors@*
|
||||
@@ -668,12 +723,21 @@ Aller au d@'ebut de la ligne de commande@*
|
||||
@item End / Ctrl + E
|
||||
Aller @`a la fin de la ligne de commande@*
|
||||
@*
|
||||
@item Ctrl + K
|
||||
Efface jusqu'@`a la fin de la ligne@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
R@'eaffiche toute la fen@^etre@*
|
||||
@*
|
||||
@item Ctrl + U
|
||||
Efface jusqu'au d@'ebut de la ligne@*
|
||||
@*
|
||||
@item Ctrl + W
|
||||
Effacer le mot pr@'ec@'edent sur la ligne de commande@*
|
||||
@*
|
||||
@item Backspace / Delete
|
||||
Effacer le mot pr@'ec@'edent / suivant sur la ligne de commande@*
|
||||
@*
|
||||
@item Ctrl + Backspace / Ctrl + W
|
||||
Effacer le mot pr@'ec@'edent sur la ligne de commande@*
|
||||
@*
|
||||
@item Tab
|
||||
Compl@'eter la commande ou le pseudo (@kbd{Tab} @`a nouveau : trouver la compl@'etion suivante)@*
|
||||
@*
|
||||
@@ -686,6 +750,9 @@ Ex@'ecuter la commande ou envoyer le message@*
|
||||
@item Fl@`eche haut / Fl@`eche bas
|
||||
Rappeler les derni@`eres commandes/messages@*
|
||||
@*
|
||||
@item Ctrl + fl@`eche haut / Ctrl + fl@`eche bas
|
||||
Rappeler les derni@`eres commandes/messages dans l'historique global@*
|
||||
@*
|
||||
@item PageUp / PageDown
|
||||
Afficher l'historique du tampon@*
|
||||
@*
|
||||
@@ -701,30 +768,48 @@ Effacer le dernier message de la barre d'infos@*
|
||||
@item F11 / F12
|
||||
Faire d@'efiler la liste des pseudos@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
R@'eaffiche toute la fen@^etre@*
|
||||
@*
|
||||
@item Alt + fl@`eche gauche / Alt + fl@`eche droite
|
||||
Identique @`a F5 / F6@*
|
||||
@*
|
||||
@item Alt + A
|
||||
Sauter au tampon avec activit@'e (avec priorit@'e: highlight, message, autre)@*
|
||||
@*
|
||||
@item Alt + B
|
||||
Aller au mot pr@'ec@'edent@*
|
||||
@*
|
||||
@item Alt + D
|
||||
Effacer le mot suivant@*
|
||||
@*
|
||||
@item Alt + F
|
||||
Aller au mot suivant@*
|
||||
@*
|
||||
@item Alt + H
|
||||
Vide la hotlist (notification d'activit@'e sur les autres tampons)@*
|
||||
@*
|
||||
@item Alt + J puis Alt + D
|
||||
Afficher les DCC en cours@*
|
||||
@*
|
||||
@item Alt + R
|
||||
Vide la hotlist (notification d'activité sur les autres tampons)@*
|
||||
@item Alt + J puis Alt + L
|
||||
Sauter au dernier tampon@*
|
||||
@*
|
||||
@item Alt + S
|
||||
@item Alt + J puis Alt + S
|
||||
Sauter au tampon du serveur@*
|
||||
@*
|
||||
@item Alt + X
|
||||
Sauter au premier canal du serveur suivant (ou tampon du serveur si aucun canal ouvert)@*
|
||||
@*
|
||||
@item Alt + chiffre (1-9)
|
||||
Sauter au tampon avec ce num@'ero@*
|
||||
@*
|
||||
@item Alt + J then Alt + X
|
||||
Sauter au premier canal du serveur suivant (ou tampon du serveur si aucun canal ouvert)@*
|
||||
@*
|
||||
@item Alt + K
|
||||
Capturer une touche
|
||||
@*
|
||||
@item Alt + J puis nombre (01-99)
|
||||
Sauter au tampon avec ce num@'ero@*
|
||||
@*
|
||||
@item Alt + R
|
||||
Effacer la ligne enti@`ere@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Faire d@'efiler la liste des pseudos@*
|
||||
@*
|
||||
@@ -785,11 +870,34 @@ afficher l'aide sur les commandes@*
|
||||
@*
|
||||
commande: nom d'une commande WeeChat ou IRC@*
|
||||
@*
|
||||
@item ignore [masque [[type | commande] [canal [serveur]]]]
|
||||
@*
|
||||
ignorer des messages IRC et/ou des masques@*
|
||||
@*
|
||||
masque: pseudo ou masque @`a ignorer@*
|
||||
type: type de message @`a ignorer (action, ctcp, dcc, pv)@*
|
||||
commande: commande IRC@*
|
||||
canal: nom du canal pour le ignore@*
|
||||
serveur: nom du serveur pour le ignore@*
|
||||
@*
|
||||
Pour chaque param@`etre, '*' signifie tou(te)s.@*
|
||||
Sans param@`etre, la commande /ignore liste les ignore d@'efinis.@*
|
||||
@*
|
||||
@item key [touche fonction/commande] [unbind touche] [functions] [reset -yes]
|
||||
@*
|
||||
associer/lib@'erer des touches@*
|
||||
@*
|
||||
touche: associer cette touche @`a une fonction interne ou une commande (commen@,{c}ant par "/")@*
|
||||
unbind: supprimer l'association @`a une touche (si "all", toutes les associations de touches par d@'efaut sont restaur@'ees)@*
|
||||
functions: lister la liste des fonctions internes pour les associations de touches@*
|
||||
reset: restaur les touches aux valeurs par d@'efaut et supprime TOUTES les touches personnelles (utiliser avec pr@'ecaution !)@*
|
||||
@*
|
||||
@item perl [load fichier] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
liste/charge/d@'echarge des scripts Perl@*
|
||||
@*
|
||||
fichier: script Perl (fichier) @`a charger@*
|
||||
@*
|
||||
Sans param@`etre, la commande /perl liste tous les scripts Perl charg@'es.@*
|
||||
@*
|
||||
@item python [load fichier] | [autoload] | [reload] | [unload]
|
||||
@@ -797,8 +905,17 @@ Sans param@`etre, la commande /perl liste tous les scripts Perl charg@'es.@*
|
||||
liste/charge/d@'echarge des scripts Python@*
|
||||
@*
|
||||
fichier: script Python (fichier) @`a charger@*
|
||||
@*
|
||||
Sans param@`etre, la commande /python liste tous les scripts Python charg@'es.@*
|
||||
@*
|
||||
@item ruby [load fichier] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
liste/charge/d@'echarge des scripts Ruby@*
|
||||
@*
|
||||
fichier: script Ruby (fichier) @`a charger@*
|
||||
@*
|
||||
Sans param@`etre, la commande /ruby liste tous les scripts Ruby charg@'es.@*
|
||||
@*
|
||||
@item server [nom_serveur] | [nom_serveur nom/IP port [-auto | -noauto] [-ipv6] [-ssl] [-pwd mot_de_passe] [-nicks pseudo1 [pseudo2 [pseudo3]]] [-username nom_utilisateur] [-realname nom_r@'eel] [-command commande] [-autojoin canal[,canal]] ] | [del nom_serveur]
|
||||
@*
|
||||
liste, ajoute ou retire des serveurs@*
|
||||
@@ -834,6 +951,20 @@ supprimer un alias@*
|
||||
@*
|
||||
nom_alias: nom de l'alias @`a supprimer@*
|
||||
@*
|
||||
@item unignore [nombre | [masque [[type | commande] [canal [serveur]]]]]
|
||||
@*
|
||||
supprimer le ignore des messages IRC et/ou des masques@*
|
||||
@*
|
||||
nombre: num@'ero de ignore @`a supprimer (le nombre est affich@'e sur la liste des ignore)@*
|
||||
masque: pseudo ou masque @`a ignorer@*
|
||||
type: type de message @`a ignorer (action, ctcp, dcc, pv)@*
|
||||
commande: commande IRC@*
|
||||
canal: nom du canal pour le ignore@*
|
||||
serveur: nom du serveur pour le ignore@*
|
||||
@*
|
||||
Pour chaque param@`etre, '*' signifie tou(te)s.@*
|
||||
Sans param@`etre, /ignore liste les ignore d@'efinis.@*
|
||||
@*
|
||||
@item window [list | splith | splitv | [merge [down | up | left | right | all]]]
|
||||
@*
|
||||
gestion des fen@^etres@*
|
||||
@@ -854,6 +985,18 @@ trouver les informations sur l'administrateur du serveur@*
|
||||
@*
|
||||
cible: serveur@*
|
||||
@*
|
||||
@item ame message
|
||||
@*
|
||||
envoyer une action CTCP @`a tous les canaux de tous les serveurs connect@'es@*
|
||||
@*
|
||||
message: message @`a envoyer@*
|
||||
@*
|
||||
@item amsg texte
|
||||
@*
|
||||
envoyer un message @`a tous les canaux de tous les serveurs connect@'es@*
|
||||
@*
|
||||
texte: texte @`a envoyer@*
|
||||
@*
|
||||
@item away [-all] [message]
|
||||
@*
|
||||
basculer le statut absent@*
|
||||
@@ -868,12 +1011,13 @@ bannit des pseudos ou masques@*
|
||||
canal: nom du canal pour le bannissement@*
|
||||
pseudo: pseudo ou masque pour le bannissement@*
|
||||
@*
|
||||
@item ctcp pseudo type
|
||||
@item ctcp pseudo type [arguments]
|
||||
@*
|
||||
envoyer un message ctcp@*
|
||||
envoyer un message CTCP (Client-To-Client Protocol)@*
|
||||
@*
|
||||
pseudo: utilisateur pour envoyer le ctcp@*
|
||||
type: "action" ou "version"@*
|
||||
pseudo: utilisateur @`a qui envoyer le CTCP@*
|
||||
type: type de CTCP (exemples: "version", "ping", etc...)@*
|
||||
arguments: arguments pour le CTCP@*
|
||||
@*
|
||||
@item dcc action [pseudo [fichier]]
|
||||
@*
|
||||
@@ -883,15 +1027,15 @@ action: 'send' (envoi de fichier) ou 'chat' (discussion) ou 'close' (fermeture d
|
||||
pseudo: pseudo pour envoyer le fichier ou discuter@*
|
||||
fichier: nom du fichier (sur la machine locale)@*
|
||||
@*
|
||||
@item dehalfop pseudo [pseudo]
|
||||
@item dehalfop [pseudo [pseudo]]
|
||||
@*
|
||||
retire le statut de demi-op@'erateur du canal @`a/aux nick(s)@*
|
||||
@*
|
||||
@item deop pseudo [pseudo]
|
||||
@item deop [pseudo [pseudo]]
|
||||
@*
|
||||
retire le statut d'op@'erateur du canal @`a/aux nick(s)@*
|
||||
@*
|
||||
@item devoice pseudo [pseudo]
|
||||
@item devoice [pseudo [pseudo]]
|
||||
@*
|
||||
retire la voix du/des pseudo(s)@*
|
||||
@*
|
||||
@@ -899,7 +1043,7 @@ retire la voix du/des pseudo(s)@*
|
||||
@*
|
||||
arr@^eter le serveur@*
|
||||
@*
|
||||
@item halfop pseudo [pseudo]
|
||||
@item halfop [pseudo [pseudo]]
|
||||
@*
|
||||
donner le statut de demi-op@'erateur @`a un/des utilisateur(s)@*
|
||||
@*
|
||||
@@ -975,7 +1119,7 @@ cible: serveur pour faire suivre la requ@^ete@*
|
||||
@*
|
||||
@item me message
|
||||
@*
|
||||
envoyer une action ctcp au canal courant@*
|
||||
envoyer une action CTCP au canal courant@*
|
||||
@*
|
||||
message: message @`a envoyer@*
|
||||
@*
|
||||
@@ -1182,7 +1326,7 @@ retourne la version de l'utilisateur ou du serveur (courant ou sp@'ecifi@'e)@*
|
||||
serveur: nom du serveur@*
|
||||
pseudo: utilisateur@*
|
||||
@*
|
||||
@item voice pseudo [pseudo]
|
||||
@item voice [pseudo [pseudo]]
|
||||
@*
|
||||
donne la voix @`a/aux utilisateur(s)@*
|
||||
@*
|
||||
@@ -1216,6 +1360,83 @@ cible: la r@'eponse doit correspondre @`a ce masque@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
Fonctions internes pour les touches :@*
|
||||
|
||||
@table @kbd
|
||||
@item return
|
||||
terminer la ligne@*
|
||||
@item tab
|
||||
compl@'eter le mot@*
|
||||
@item backspace
|
||||
effacer le caract@`ere pr@'ec@'edent@*
|
||||
@item delete
|
||||
effacer le caract@`ere suivant@*
|
||||
@item delete_end_line
|
||||
effacer jusqu'@`a la fin de la ligne@*
|
||||
@item delete_beginning_line
|
||||
effacer jusqu'au d@'ebut de la ligne@*
|
||||
@item delete_line
|
||||
effacer la ligne enti@`ere@*
|
||||
@item delete_previous_word
|
||||
effacer le mot pr@'ec@'edent@*
|
||||
@item delete_next_word
|
||||
effacer le mot suivant@*
|
||||
@item clipboard_paste
|
||||
coller le contenu du presse-papier@*
|
||||
@item transpose_chars
|
||||
inverser les caract@`eres@*
|
||||
@item home
|
||||
aller au d@'ebut de la ligne@*
|
||||
@item end
|
||||
aller @`a la fin de la ligne@*
|
||||
@item left
|
||||
se d@'eplacer d'un caract@`ere @`a gauche@*
|
||||
@item previous_word
|
||||
se d@'eplacer au mot pr@'ec@'edent@*
|
||||
@item right
|
||||
se d@'eplacer d'un caract@`ere @`a droite@*
|
||||
@item next_word
|
||||
se d@'eplacer au mot suivant@*
|
||||
@item up
|
||||
appeler la commande pr@'ec@'edente dans l'historique@*
|
||||
@item up_global
|
||||
appeler la commande pr@'ec@'edente dans l'historique global@*
|
||||
@item down
|
||||
appeler la commande suivante dans l'historique@*
|
||||
@item down_global
|
||||
appeler la commande suivante dans l'historique global@*
|
||||
@item page_up
|
||||
faire d@'efiler d'une page vers le haut@*
|
||||
@item page_down
|
||||
faire d@'efiler d'une page vers le bas@*
|
||||
@item infobar_clear
|
||||
effacer la barre d'infos@*
|
||||
@item nick_page_up
|
||||
faire d@'efiler la liste des pseudos d'une page vers le haut@*
|
||||
@item nick_page_down
|
||||
faire d@'efiler la liste des pseudos d'une page vers le bas@*
|
||||
@item nick_beginning
|
||||
afficher le d@'ebut de la liste des pseudos@*
|
||||
@item nick_end
|
||||
afficher la fin de la liste des pseudos@*
|
||||
@item refresh
|
||||
rafraichir l'@'ecran@*
|
||||
@item jump_smart
|
||||
sauter au tampon avec de l'activit@'e@*
|
||||
@item jump_dcc
|
||||
sauter au tampon DCC@*
|
||||
@item jump_last_buffer
|
||||
sauter au dernier tampon@*
|
||||
@item jump_server
|
||||
sauter au tampon du serveur@*
|
||||
@item jump_next_server
|
||||
sauter au prochain serveur@*
|
||||
@item hotlist_clear
|
||||
effacer la liste d'activit@'e@*
|
||||
@item grab_key
|
||||
capturer une touche@*
|
||||
@end table
|
||||
|
||||
@node Tube FIFO, , Commandes WeeChat, Utilisation
|
||||
@section Tube FIFO
|
||||
|
||||
@@ -1235,14 +1456,21 @@ serveur doit l'@^etre aussi.@*
|
||||
Quelques exemples :
|
||||
@table @asis
|
||||
@item @bullet{} changement du pseudo sur freenode en "pseudo|absent":
|
||||
@*
|
||||
@command{echo "freenode */nick pseudo|absent" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} affichage de texte sur le canal #weechat :
|
||||
@*
|
||||
@command{echo "freenode,#weechat *bonjour tout le monde !" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} affichage de texte sur le canal courant (le tampon affich@'e par WeeChat):
|
||||
@command{echo "*bonjour !" >~/.weechat/weechat_fifo_12345}@*
|
||||
@*
|
||||
@command{echo "*bonjour !" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@b{Attention :} ceci est dangereux et vous ne devriez pas le faire sauf si vous savez ce que vous faites !
|
||||
@item @bullet{} envoyer deux commandes pour décharger/recharger les scripts Perl (vous devez les séparer par \n):
|
||||
@*
|
||||
@item @bullet{} envoyer deux commandes pour d@'echarger/recharger les scripts Perl (vous devez les s@'eparer par \n):
|
||||
@*
|
||||
@command{echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345}
|
||||
@end table
|
||||
@*
|
||||
@@ -1370,7 +1598,7 @@ RFC 2812 : @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
|
||||
@code{@ @ @ @ weechat::print ("serveur=$_[0]\n");}@*
|
||||
@code{@ @ @ @ ($null, $canal, $message) = split ":",$_[1],3;}@*
|
||||
@code{@ @ @ @ ($masque, $null, $canal) = split " ", $canal;}@*
|
||||
@code{@ @ @ @ weechat::print ("masque=$masque, canal=$canal, message=$message\n");}@*
|
||||
@code{@ @ @ @ weechat::print ("masque=$masque, canal=$canal, msg=$message\n");}@*
|
||||
@code{@} }@*
|
||||
@*
|
||||
|
||||
|
||||
+255
-30
@@ -30,14 +30,13 @@
|
||||
@c end tex
|
||||
|
||||
@documentlanguage pt
|
||||
@documentencoding ISO-8859-1
|
||||
|
||||
@titlepage
|
||||
|
||||
@title WeeChat - Guia do Utilizador
|
||||
@subtitle Cliente de IRC rapido, leve e extencivel
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.3 - 03 de Julho de 2005
|
||||
|
||||
@image{weechat_image}
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.5 - 24 de Setembro de 2005
|
||||
|
||||
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
|
||||
|
||||
@@ -148,7 +147,7 @@ Os pacotes bin@'arios est@'ao dispon@'iveis para as seguintes distribui@,{c}@~oe
|
||||
@itemize @bullet
|
||||
@item
|
||||
Debian (ou compat@'ivel)@*
|
||||
Instala@,{c}@~ao : @kbd{dpkg -i /chemin/weechat_x.y.z-1_i386.deb}
|
||||
Instala@,{c}@~ao : @kbd{apt-get install weechat-curses}
|
||||
@item
|
||||
Mandrake/Redhat (ou outra distro compat@'ivel com RPMs)@*
|
||||
Instala@,{c}@~ao : @kbd{rpm -i /chemin/weechat-x.y.z-1.i386.rpm}
|
||||
@@ -218,6 +217,8 @@ Segue agora as instru@,{c}@~oes para compilar o c@'odigo fonte - @xref{Codigo Fo
|
||||
@table @code
|
||||
@item -c, --config
|
||||
Mostrar da lima dos config da exposi@,{c}@~ao (lista das op@,{c}@~oes)
|
||||
@item -f, --key-functions
|
||||
Display WeeChat internal functions for keys@*
|
||||
@item -h, --help
|
||||
Mostrar a ajuda@*
|
||||
@item -i, --irc-commands
|
||||
@@ -277,6 +278,9 @@ Type: string (any string), default value: '[%H:%M:%S]'@*
|
||||
@item look_color_nicks
|
||||
Display nick names with different colors@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_color_nicks_number
|
||||
Number of colors to use for nicks colors@*
|
||||
Type: integer (values: between 1 and 10), default value: 10@*
|
||||
@item look_color_actions
|
||||
Display actions with different colors@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@@ -312,7 +316,10 @@ Enable info bar@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_infobar_timestamp
|
||||
Timestamp for time in infobar@*
|
||||
Type: string (any string), default value: '%B, %A %d %Y - %H:%M'@*
|
||||
Type: string (any string), default value: '%B, %A %d %Y'@*
|
||||
@item look_infobar_seconds
|
||||
Display seconds in infobar time@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_infobar_delay_highlight
|
||||
Delay (in seconds) for highlight messages in infobar (0 = disable highlight notifications in infobar)@*
|
||||
Type: integer (values: between 0 and 2147483647), default value: 7@*
|
||||
@@ -337,6 +344,12 @@ Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@item col_chat_prefix2
|
||||
Color for middle char of prefix@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@item col_chat_join
|
||||
Color for join arrow (prefix)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightgreen'@*
|
||||
@item col_chat_part
|
||||
Color for part/quit arrow (prefix)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightred'@*
|
||||
@item col_chat_nick
|
||||
Color for nicks in actions (chat window)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@@ -364,9 +377,12 @@ Type: color (Curses or Gtk color), default value: 'cyan'@*
|
||||
@item col_status_data_msg
|
||||
Color for window with new messages (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'yellow'@*
|
||||
@item col_status_private
|
||||
Color for window with private message (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_status_highlight
|
||||
Color for window with highlight (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightred'@*
|
||||
@item col_status_data_other
|
||||
Color for window with new data (not messages) (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@@ -379,6 +395,9 @@ Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_infobar
|
||||
Color for info bar text@*
|
||||
Type: color (Curses or Gtk color), default value: 'black'@*
|
||||
@item col_infobar_delimiters
|
||||
Color for infobar delimiters@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_infobar_highlight
|
||||
Color for info bar highlight notification@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@@ -427,6 +446,36 @@ Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_nick_self
|
||||
Color for local nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@item col_nick_color1
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'cyan'@*
|
||||
@item col_nick_color2
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'magenta'@*
|
||||
@item col_nick_color3
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'green'@*
|
||||
@item col_nick_color4
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'brown'@*
|
||||
@item col_nick_color5
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightblue'@*
|
||||
@item col_nick_color6
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@item col_nick_color7
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@item col_nick_color8
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_nick_color9
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightgreen'@*
|
||||
@item col_nick_color10
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_nick_private
|
||||
Color for other nick in private window@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@@ -493,6 +542,9 @@ Type: string (any string), default value: 'WeeChat %v'@*
|
||||
@item irc_default_msg_quit
|
||||
Default quit message ('%v' will be replaced by WeeChat version in string)@*
|
||||
Type: string (any string), default value: 'WeeChat %v'@*
|
||||
@item irc_notice_as_pv
|
||||
Display notices as private messages@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@item irc_away_check
|
||||
Interval between two checks for away (in minutes, 0 = never check)@*
|
||||
Type: integer (values: between 0 and 2147483647), default value: 0@*
|
||||
@@ -508,6 +560,9 @@ Type: integer (values: between 0 and 2147483647), default value: 5@*
|
||||
@item irc_fifo_pipe
|
||||
Create a FIFO pipe for remote control@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@item irc_highlight
|
||||
Comma separated list of words to highlight (case insensitive comparison)@*
|
||||
Type: string (any string), default value: ''@*
|
||||
@item dcc_auto_accept_files
|
||||
Automatically accept incoming dcc files@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@@ -605,7 +660,7 @@ Type: string (any string), default value: ''@*
|
||||
Delay (in seconds) after command was executed (example: give some time for authentication)@*
|
||||
Type: integer (values: between 0 and 5), default value: 0@*
|
||||
@item server_autojoin
|
||||
Comma separated list of channels to join when connected to server@*
|
||||
Comma separated list of channels to join when connected to server (example: "#chan1,#chan2,#chan3 #key1,#key2")@*
|
||||
Type: string (any string), default value: ''@*
|
||||
@item server_autorejoin
|
||||
Automatically rejoin channels when kicked@*
|
||||
@@ -665,12 +720,21 @@ Ir para o in@'icio da linha de comando@*
|
||||
@item End / Ctrl + E
|
||||
Ir para o fim da linha de comando@*
|
||||
@*
|
||||
@item Ctrl + K
|
||||
Delete until end of line@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redesenhe a janela inteira@*
|
||||
@*
|
||||
@item Ctrl + U
|
||||
Delete until beginning of line@*
|
||||
@*
|
||||
@item Ctrl + W
|
||||
Apagar a palavra anterior na linha de comando
|
||||
@*
|
||||
@item Backspace / Delete
|
||||
Apagar o caractere anterior / seguinte na linha de comando@*
|
||||
@*
|
||||
@item Ctrl + Backspace / Ctrl + W
|
||||
Apagar a palavra anterior na linha de comando
|
||||
@*
|
||||
@item Tab
|
||||
Completar o comando ou o nick (@kbd{Tab} novamente : encontrar a pr@'oxima sugest@~ao)@*
|
||||
@*
|
||||
@@ -683,6 +747,9 @@ Executa o comando ou envia a mensagem@*
|
||||
@item Seta para cima / Seta para baixo
|
||||
Repetir os ultimos comandos/mensagens@*
|
||||
@*
|
||||
@item Ctrl + up arrow / Ctrl + down arrow
|
||||
Call again last commands/messages in global history@*
|
||||
@*
|
||||
@item PageUp / PageDown
|
||||
Navegar no hist@'orico da janela@*
|
||||
@*
|
||||
@@ -698,30 +765,48 @@ Apagar a @'ultima mensagem da barra do info@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redesenhe a janela inteira@*
|
||||
@*
|
||||
@item Alt + Seta da esquerda / Alt + Seta da direita
|
||||
Identico a F5 / F6@*
|
||||
@*
|
||||
@item Alt + A
|
||||
Comute ao amortecedor seguinte com atividade (com prioridade: destaque, mensagem, outra)@*
|
||||
@*
|
||||
@item Alt + D
|
||||
Exposi@,{c}@~ao DCC atual@*
|
||||
@item Alt + B
|
||||
Go to previous word@*
|
||||
@*
|
||||
@item Alt + R
|
||||
@item Alt + D
|
||||
Delete next word@*
|
||||
@*
|
||||
@item Alt + F
|
||||
Go to next word@*
|
||||
@*
|
||||
@item Alt + H
|
||||
Hotlist desobstru@'ido (notifica@,{c}@~ao da atividade em outros amortecedores)@*
|
||||
@*
|
||||
@item Alt + S
|
||||
@item Alt + J then Alt + D
|
||||
Exposi@,{c}@~ao DCC atual@*
|
||||
@*
|
||||
@item Alt + J then Alt + L
|
||||
Switch to last buffer@*
|
||||
@*
|
||||
@item Alt + J then Alt + S
|
||||
Comute ao amortecedor do servidor@*
|
||||
@*
|
||||
@item Alt + X
|
||||
@item Alt + J then Alt + X
|
||||
Comute @`a primeira canaleta do servidor seguinte (ou do amortecedor do servidor se nenhuma canaleta for aberta)@*
|
||||
@*
|
||||
@item Alt + d@'igito (1-9)
|
||||
Comute ao amortecedor pelo n@'umero@*
|
||||
@*
|
||||
@item Alt + J then number (01-99)
|
||||
Comute ao amortecedor pelo n@'umero@*
|
||||
@*
|
||||
@item Alt + K
|
||||
Grab a key
|
||||
@*
|
||||
@item Alt + R
|
||||
Delete entire line@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@@ -782,11 +867,34 @@ display help about commands@*
|
||||
@*
|
||||
command: name of a WeeChat or IRC command@*
|
||||
@*
|
||||
@item ignore [mask [[type | command] [channel [server]]]]
|
||||
@*
|
||||
ignore IRC messages and/or hosts@*
|
||||
@*
|
||||
mask: nick or host mask to ignore@*
|
||||
type: type of message to ignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for ignore@*
|
||||
server: name of server for ignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /ignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item key [key function/command] [unbind key] [functions] [reset -yes]
|
||||
@*
|
||||
bind/unbind keys@*
|
||||
@*
|
||||
key: bind this key to an internal function or a command (beginning by "/")@*
|
||||
unbind: unbind a key (if "all", default bindings are restored)@*
|
||||
functions: list internal functions for key bindings@*
|
||||
reset: restore bindings to the default values and delete ALL personal binding (use carefully!)@*
|
||||
@*
|
||||
@item perl [load filename] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
list/load/unload Perl scripts@*
|
||||
@*
|
||||
filename: Perl script (file) to load@*
|
||||
@*
|
||||
Without argument, /perl command lists all loaded Perl scripts.@*
|
||||
@*
|
||||
@item python [load filename] | [autoload] | [reload] | [unload]
|
||||
@@ -794,8 +902,17 @@ Without argument, /perl command lists all loaded Perl scripts.@*
|
||||
list/load/unload Python scripts@*
|
||||
@*
|
||||
filename: Python script (file) to load@*
|
||||
@*
|
||||
Without argument, /python command lists all loaded Python scripts.@*
|
||||
@*
|
||||
@item ruby [load filename] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
list/load/unload Ruby scripts@*
|
||||
@*
|
||||
filename: Ruby script (file) to load@*
|
||||
@*
|
||||
Without argument, /ruby command lists all loaded Ruby scripts.@*
|
||||
@*
|
||||
@item server [servername] | [servername hostname port [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [del servername]
|
||||
@*
|
||||
list, add or remove servers@*
|
||||
@@ -831,6 +948,20 @@ remove an alias@*
|
||||
@*
|
||||
alias_name: name of alias to remove@*
|
||||
@*
|
||||
@item unignore [number | [mask [[type | command] [channel [server]]]]]
|
||||
@*
|
||||
unignore IRC messages and/or hosts@*
|
||||
@*
|
||||
number: # of ignore to unignore (number is displayed by list of ignore)@*
|
||||
mask: nick or host mask to unignore@*
|
||||
type: type of message to unignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for unignore@*
|
||||
server: name of server for unignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /unignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item window [list | splith | splitv | [merge [down | up | left | right | all]]]
|
||||
@*
|
||||
manage windows@*
|
||||
@@ -851,6 +982,18 @@ find information about the administrator of the server@*
|
||||
@*
|
||||
target: server@*
|
||||
@*
|
||||
@item ame message
|
||||
@*
|
||||
send a CTCP action to all channels of all connected servers@*
|
||||
@*
|
||||
message: message to send@*
|
||||
@*
|
||||
@item amsg text
|
||||
@*
|
||||
send message to all channels of all connected servers@*
|
||||
@*
|
||||
text: text to send@*
|
||||
@*
|
||||
@item away [-all] [message]
|
||||
@*
|
||||
toggle away status@*
|
||||
@@ -865,12 +1008,13 @@ bans nicks or hosts@*
|
||||
channel: channel for ban@*
|
||||
nickname: user or host to ban@*
|
||||
@*
|
||||
@item ctcp nickname type
|
||||
@item ctcp nickname type [arguments]
|
||||
@*
|
||||
send a ctcp message@*
|
||||
send a CTCP message (Client-To-Client Protocol)@*
|
||||
@*
|
||||
nickname: user to send ctcp to@*
|
||||
type: "action" or "version"@*
|
||||
nickname: user to send CTCP to@*
|
||||
type: CTCP type (examples: "version", "ping", ..)@*
|
||||
arguments: arguments for CTCP@*
|
||||
@*
|
||||
@item dcc action [nickname [file]]
|
||||
@*
|
||||
@@ -880,15 +1024,15 @@ action: 'send' (file) or 'chat' or 'close' (chat)@*
|
||||
nickname: nickname to send file or chat@*
|
||||
file: filename (on local host)@*
|
||||
@*
|
||||
@item dehalfop nickname [nickname]
|
||||
@item dehalfop [nickname [nickname]]
|
||||
@*
|
||||
removes half channel operator status from nickname(s)@*
|
||||
@*
|
||||
@item deop nickname [nickname]
|
||||
@item deop [nickname [nickname]]
|
||||
@*
|
||||
removes channel operator status from nickname(s)@*
|
||||
@*
|
||||
@item devoice nickname [nickname]
|
||||
@item devoice [nickname [nickname]]
|
||||
@*
|
||||
removes voice from nickname(s)@*
|
||||
@*
|
||||
@@ -896,7 +1040,7 @@ removes voice from nickname(s)@*
|
||||
@*
|
||||
shutdown the server@*
|
||||
@*
|
||||
@item halfop nickname [nickname]
|
||||
@item halfop [nickname [nickname]]
|
||||
@*
|
||||
gives half channel operator status to nickname(s)@*
|
||||
@*
|
||||
@@ -972,7 +1116,7 @@ target: server for forwarding request@*
|
||||
@*
|
||||
@item me message
|
||||
@*
|
||||
send a ctcp action to the current channel@*
|
||||
send a CTCP action to the current channel@*
|
||||
@*
|
||||
message: message to send@*
|
||||
@*
|
||||
@@ -1179,7 +1323,7 @@ gives the version info of nick or server (current or specified)@*
|
||||
server: server name@*
|
||||
nickname: nickname@*
|
||||
@*
|
||||
@item voice nickname [nickname]
|
||||
@item voice [nickname [nickname]]
|
||||
@*
|
||||
gives voice to nickname(s)@*
|
||||
@*
|
||||
@@ -1213,6 +1357,83 @@ target: reply should match this mask@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
Internal functions for keys:@*
|
||||
|
||||
@table @kbd
|
||||
@item return
|
||||
terminate line@*
|
||||
@item tab
|
||||
complete word@*
|
||||
@item backspace
|
||||
delete previous char@*
|
||||
@item delete
|
||||
delete next char@*
|
||||
@item delete_end_line
|
||||
delete until end of line@*
|
||||
@item delete_beginning_line
|
||||
delete until beginning of line@*
|
||||
@item delete_line
|
||||
delete entire line@*
|
||||
@item delete_previous_word
|
||||
delete previous word@*
|
||||
@item delete_next_word
|
||||
delete next word@*
|
||||
@item clipboard_paste
|
||||
paste current clipboard content@*
|
||||
@item transpose_chars
|
||||
transpose chars@*
|
||||
@item home
|
||||
go to beginning of line@*
|
||||
@item end
|
||||
go to end of line@*
|
||||
@item left
|
||||
move one char left@*
|
||||
@item previous_word
|
||||
move to previous word@*
|
||||
@item right
|
||||
move one char right@*
|
||||
@item next_word
|
||||
move to next word@*
|
||||
@item up
|
||||
call previous command in history@*
|
||||
@item up_global
|
||||
call previous command in global history@*
|
||||
@item down
|
||||
call next command in history@*
|
||||
@item down_global
|
||||
call next command in global history@*
|
||||
@item page_up
|
||||
scroll one page up@*
|
||||
@item page_down
|
||||
scroll one page down@*
|
||||
@item infobar_clear
|
||||
clear infobar@*
|
||||
@item nick_page_up
|
||||
scroll nicklist one page up@*
|
||||
@item nick_page_down
|
||||
scroll nicklist one page down@*
|
||||
@item nick_beginning
|
||||
display beginning of nicklist@*
|
||||
@item nick_end
|
||||
display end of nicklist@*
|
||||
@item refresh
|
||||
refresh screen@*
|
||||
@item jump_smart
|
||||
jump to buffer with activity@*
|
||||
@item jump_dcc
|
||||
jump to DCC buffer@*
|
||||
@item jump_last_buffer
|
||||
jump to last buffer@*
|
||||
@item jump_server
|
||||
jump to server buffer@*
|
||||
@item jump_next_server
|
||||
jump to next server@*
|
||||
@item hotlist_clear
|
||||
clear hotlist@*
|
||||
@item grab_key
|
||||
grab a key@*
|
||||
@end table
|
||||
|
||||
@node FIFO pipe, , Comandos do WeeChat, Utilizacao
|
||||
@section FIFO pipe
|
||||
|
||||
@@ -1231,15 +1452,19 @@ Some examples:
|
||||
@item @bullet{} change your nick on freenode to "mynick|out":
|
||||
@*
|
||||
@command{echo "freenode */nick mynick|out" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} display text on #weechat channel:
|
||||
@*
|
||||
@command{echo "freenode,#weechat *hello everybody!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} display text on current channel (buffer displayed by WeeChat):
|
||||
@*
|
||||
@command{echo "*hello!" >~/.weechat/weechat_fifo_12345}@*
|
||||
@command{echo "*hello!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@b{Warning:} this is dangerous and you should not do that except if you know what you do!
|
||||
@*
|
||||
@item @bullet{} send 2 commands to unload/reload Perl scripts (you have to separate them with \n):
|
||||
@*
|
||||
@command{echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345}
|
||||
@end table
|
||||
@*
|
||||
@@ -1526,7 +1751,7 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
|
||||
@code{@ @ @ @ weechat.prnt("server="+server)}@*
|
||||
@code{@ @ @ @ null, channel, message = string.split(args, ":", 2)}@*
|
||||
@code{@ @ @ @ hostmask, null, channel = string.split(string.strip(channel), " ", 2)}@*
|
||||
@code{@ @ @ @ weechat.prnt("host="+hostmask+", channel="+channel+", message="+message)}@*
|
||||
@code{@ @ @ @ weechat.prnt("host="+hostmask+", chan="+channel+", msg="+message)}@*
|
||||
@*
|
||||
|
||||
@item
|
||||
|
||||
Binary file not shown.
@@ -6,11 +6,14 @@
|
||||
./src/irc/irc-send.c
|
||||
./src/irc/irc-recv.c
|
||||
./src/irc/irc-dcc.c
|
||||
./src/irc/irc-ignore.c
|
||||
./src/irc/irc.h
|
||||
./src/plugins/perl/wee-perl.c
|
||||
./src/plugins/perl/wee-perl.h
|
||||
./src/plugins/python/wee-python.c
|
||||
./src/plugins/python/wee-python.h
|
||||
./src/plugins/ruby/wee-ruby.c
|
||||
./src/plugins/ruby/wee-ruby.h
|
||||
./src/plugins/plugins.c
|
||||
./src/plugins/plugins.h
|
||||
./src/gui/curses/gui-input.c
|
||||
@@ -18,6 +21,7 @@
|
||||
./src/gui/gtk/gui-display.c
|
||||
./src/gui/gtk/gui-input.c
|
||||
./src/gui/gui-common.c
|
||||
./src/gui/gui-keyboard.c
|
||||
./src/gui/gui.h
|
||||
./src/common/command.c
|
||||
./src/common/command.h
|
||||
|
||||
+1367
-899
File diff suppressed because it is too large
Load Diff
+584
-98
File diff suppressed because it is too large
Load Diff
@@ -69,12 +69,17 @@ 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 void weechat_cmd_ignore_display (char *, t_irc_ignore *);
|
||||
extern int weechat_cmd_ignore (int, char **);
|
||||
extern int weechat_cmd_key (char *);
|
||||
extern int weechat_cmd_perl (int, char **);
|
||||
extern int weechat_cmd_python (int, char **);
|
||||
extern int weechat_cmd_ruby (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_unignore (int, char **);
|
||||
extern int weechat_cmd_unset (char *);
|
||||
extern int weechat_cmd_window (int, char **);
|
||||
|
||||
|
||||
+184
-60
@@ -102,7 +102,8 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
int i, j;
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
char *pos, option_name[256];
|
||||
t_irc_nick *ptr_nick;
|
||||
char *pos, option_name[256], *string;
|
||||
t_weechat_alias *ptr_alias;
|
||||
t_config_option *option;
|
||||
void *option_value;
|
||||
@@ -111,13 +112,13 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
/* WeeChat internal commands */
|
||||
|
||||
/* no completion for some commands */
|
||||
if ((strcasecmp (completion->base_command, "server") == 0)
|
||||
|| (strcasecmp (completion->base_command, "save") == 0))
|
||||
if ((ascii_strcasecmp (completion->base_command, "server") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "save") == 0))
|
||||
{
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "alias") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "alias") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
for (ptr_list = index_commands; ptr_list; ptr_list = ptr_list->next_weelist)
|
||||
@@ -128,7 +129,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "buffer") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "buffer") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -145,7 +146,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
"notify");
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "clear") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "clear") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -153,8 +154,8 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
"-all");
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "connect") == 0)
|
||||
|| (strcasecmp (completion->base_command, "disconnect") == 0))
|
||||
if ((ascii_strcasecmp (completion->base_command, "connect") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "disconnect") == 0))
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
@@ -173,7 +174,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "debug") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "debug") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -183,7 +184,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "help") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "help") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
for (i = 0; weechat_commands[i].command_name; i++)
|
||||
@@ -201,8 +202,118 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (((strcasecmp (completion->base_command, "perl") == 0)
|
||||
|| (strcasecmp (completion->base_command, "python") == 0))
|
||||
if (ascii_strcasecmp (completion->base_command, "ignore") == 0)
|
||||
{
|
||||
/* arg 1: nicks of current channel and "*" */
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"*");
|
||||
if (channel)
|
||||
{
|
||||
if (((t_irc_channel *)channel)->type == CHAT_CHANNEL)
|
||||
{
|
||||
for (ptr_nick = ((t_irc_channel *)channel)->nicks; ptr_nick;
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
ptr_nick->nick);
|
||||
}
|
||||
}
|
||||
if (((t_irc_channel *)channel)->type == CHAT_PRIVATE)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_channel *)channel)->name);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* arg 2: type / command and "*" */
|
||||
if (completion->base_command_arg == 2)
|
||||
{
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"*");
|
||||
i = 0;
|
||||
while (ignore_types[i])
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
ignore_types[i]);
|
||||
i++;
|
||||
}
|
||||
i = 0;
|
||||
while (irc_commands[i].command_name)
|
||||
{
|
||||
if (irc_commands[i].recv_function)
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
irc_commands[i].command_name);
|
||||
i++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* arg 3: channel and "*" */
|
||||
if (completion->base_command_arg == 3)
|
||||
{
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"*");
|
||||
if (((t_irc_channel *)channel)->type == CHAT_CHANNEL)
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_channel *)channel)->name);
|
||||
return;
|
||||
}
|
||||
|
||||
/* arg 4: server */
|
||||
if (completion->base_command_arg == 4)
|
||||
{
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"*");
|
||||
if (SERVER(gui_current_window->buffer))
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
SERVER(gui_current_window->buffer)->name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (ascii_strcasecmp (completion->base_command, "key") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"unbind");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"functions");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"reset");
|
||||
return;
|
||||
}
|
||||
if (completion->base_command_arg == 2)
|
||||
{
|
||||
i = 0;
|
||||
while (gui_key_functions[i].function_name)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
gui_key_functions[i].function_name);
|
||||
i++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (((ascii_strcasecmp (completion->base_command, "perl") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "python") == 0))
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -219,13 +330,14 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
"unload");
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "set") == 0)
|
||||
if (ascii_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))
|
||||
if ((i != CONFIG_SECTION_KEYS) && (i != CONFIG_SECTION_ALIAS)
|
||||
&& (i != CONFIG_SECTION_IGNORE) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
{
|
||||
@@ -307,9 +419,11 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
pos[0] = ' ';
|
||||
}
|
||||
}
|
||||
else
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "unalias") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "unalias") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
for (ptr_alias = weechat_alias; ptr_alias; ptr_alias = ptr_alias->next_alias)
|
||||
@@ -320,7 +434,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "window") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "window") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
@@ -366,33 +480,33 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
/* 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))
|
||||
if ((ascii_strcasecmp (completion->base_command, "admin") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "die") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "info") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "join") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "links") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "list") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "lusers") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "motd") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "oper") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "rehash") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "restart") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "service") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "servlist") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "squery") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "squit") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "stats") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "summon") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "time") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "trace") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "users") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "wallops") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "who") == 0))
|
||||
{
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "away") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "away") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
if (cfg_irc_default_msg_away && cfg_irc_default_msg_away[0])
|
||||
@@ -401,18 +515,21 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
cfg_irc_default_msg_away);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "ctcp") == 0)
|
||||
if ((ascii_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,
|
||||
"ping");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"version");
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "dcc") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "dcc") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -426,7 +543,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
"close");
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "invite") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "invite") == 0)
|
||||
{
|
||||
/* arg1: nickname */
|
||||
if (completion->base_command_arg == 1)
|
||||
@@ -452,30 +569,30 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "kick") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "kick") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "kill") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "kill") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "me") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "me") == 0)
|
||||
{
|
||||
completion->context = COMPLETION_NICK;
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "notice") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "notice") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "part") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "part") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
if (cfg_irc_default_msg_part && cfg_irc_default_msg_part[0])
|
||||
@@ -484,13 +601,13 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
cfg_irc_default_msg_part);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "query") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "query") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "quit") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "quit") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
if (cfg_irc_default_msg_quit && cfg_irc_default_msg_quit[0])
|
||||
@@ -499,7 +616,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
cfg_irc_default_msg_quit);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "topic") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "topic") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
@@ -507,9 +624,16 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
|| !((t_irc_channel *)channel)->topic[0])
|
||||
completion_stop (completion);
|
||||
else
|
||||
{
|
||||
string = weechat_convert_encoding (cfg_look_charset_decode,
|
||||
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
|
||||
cfg_look_charset_internal : local_charset,
|
||||
((t_irc_channel *)channel)->topic);
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_channel *)channel)->topic);
|
||||
string);
|
||||
free (string);
|
||||
}
|
||||
}
|
||||
else
|
||||
completion_stop (completion);
|
||||
@@ -676,7 +800,7 @@ completion_command (t_completion *completion)
|
||||
other_completion = 0;
|
||||
for (ptr_weelist = index_commands; ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_weelist->data, completion->base_word + 1, length) == 0)
|
||||
if (ascii_strncasecmp (ptr_weelist->data, completion->base_word + 1, length) == 0)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
@@ -684,7 +808,7 @@ completion_command (t_completion *completion)
|
||||
for (ptr_weelist2 = ptr_weelist->next_weelist; ptr_weelist2;
|
||||
ptr_weelist2 = ptr_weelist2->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_weelist2->data,
|
||||
if (ascii_strncasecmp (ptr_weelist2->data,
|
||||
completion->base_word + 1, length) == 0)
|
||||
other_completion++;
|
||||
}
|
||||
@@ -698,7 +822,7 @@ completion_command (t_completion *completion)
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
(ascii_strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
word_found_seen = 1;
|
||||
}
|
||||
if (completion->word_found)
|
||||
@@ -724,7 +848,7 @@ completion_command_arg (t_completion *completion, t_irc_channel *channel)
|
||||
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 (ascii_strncasecmp (ptr_weelist->data, completion->base_word, length) == 0)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
@@ -732,7 +856,7 @@ completion_command_arg (t_completion *completion, t_irc_channel *channel)
|
||||
for (ptr_weelist2 = ptr_weelist->next_weelist; ptr_weelist2;
|
||||
ptr_weelist2 = ptr_weelist2->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_weelist2->data,
|
||||
if (ascii_strncasecmp (ptr_weelist2->data,
|
||||
completion->base_word, length) == 0)
|
||||
other_completion++;
|
||||
}
|
||||
@@ -746,7 +870,7 @@ completion_command_arg (t_completion *completion, t_irc_channel *channel)
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
(ascii_strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
word_found_seen = 1;
|
||||
}
|
||||
if (completion->word_found)
|
||||
@@ -780,7 +904,7 @@ completion_nick (t_completion *completion, t_irc_channel *channel)
|
||||
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)
|
||||
if (ascii_strncasecmp (ptr_nick->nick, completion->base_word, length) == 0)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
@@ -788,7 +912,7 @@ completion_nick (t_completion *completion, t_irc_channel *channel)
|
||||
for (ptr_nick2 = ptr_nick->next_nick; ptr_nick2;
|
||||
ptr_nick2 = ptr_nick2->next_nick)
|
||||
{
|
||||
if (strncasecmp (ptr_nick2->nick,
|
||||
if (ascii_strncasecmp (ptr_nick2->nick,
|
||||
completion->base_word, length) == 0)
|
||||
other_completion++;
|
||||
}
|
||||
@@ -802,7 +926,7 @@ completion_nick (t_completion *completion, t_irc_channel *channel)
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(strcasecmp (ptr_nick->nick, completion->word_found) == 0))
|
||||
(ascii_strcasecmp (ptr_nick->nick, completion->word_found) == 0))
|
||||
word_found_seen = 1;
|
||||
}
|
||||
if (completion->word_found)
|
||||
|
||||
+3
-19
@@ -112,16 +112,8 @@ fifo_exec (char *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;
|
||||
}
|
||||
ptr_buffer = (gui_current_window->buffer->has_input) ? gui_current_window->buffer : gui_buffers;
|
||||
ptr_server = SERVER(ptr_buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -172,20 +164,12 @@ fifo_exec (char *text)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
ptr_buffer = gui_buffers;
|
||||
}
|
||||
|
||||
user_command (ptr_server, ptr_buffer, pos_msg);
|
||||
|
||||
+32
-32
@@ -17,7 +17,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* history.c: memorize and call again commands or text */
|
||||
/* history.c: memorize commands or text */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -33,10 +33,10 @@
|
||||
#include "../gui/gui.h"
|
||||
|
||||
|
||||
t_history *history_general = NULL;
|
||||
t_history *history_general_last = NULL;
|
||||
t_history *history_general_ptr = NULL;
|
||||
int num_history_general = 0;
|
||||
t_history *history_global = NULL;
|
||||
t_history *history_global_last = NULL;
|
||||
t_history *history_global_ptr = NULL;
|
||||
int num_history_global = 0;
|
||||
|
||||
|
||||
/*
|
||||
@@ -74,7 +74,7 @@ history_add (void *buffer, char *string)
|
||||
{
|
||||
t_history *new_history, *ptr_history;
|
||||
|
||||
/* add history to general history */
|
||||
/* add history to global history */
|
||||
new_history = (t_history *)malloc (sizeof (t_history));
|
||||
if (new_history)
|
||||
{
|
||||
@@ -82,26 +82,26 @@ history_add (void *buffer, char *string)
|
||||
if (cfg_log_hide_nickserv_pwd)
|
||||
history_hide_password (new_history->text);
|
||||
|
||||
if (history_general)
|
||||
history_general->prev_history = new_history;
|
||||
if (history_global)
|
||||
history_global->prev_history = new_history;
|
||||
else
|
||||
history_general_last = new_history;
|
||||
new_history->next_history = history_general;
|
||||
history_global_last = new_history;
|
||||
new_history->next_history = history_global;
|
||||
new_history->prev_history = NULL;
|
||||
history_general = new_history;
|
||||
num_history_general++;
|
||||
history_global = new_history;
|
||||
num_history_global++;
|
||||
|
||||
/* remove one command if necessary */
|
||||
if ((cfg_history_max_commands > 0)
|
||||
&& (num_history_general > cfg_history_max_commands))
|
||||
&& (num_history_global > cfg_history_max_commands))
|
||||
{
|
||||
ptr_history = history_general_last->prev_history;
|
||||
history_general_last->prev_history->next_history = NULL;
|
||||
if (history_general_last->text)
|
||||
free (history_general_last->text);
|
||||
free (history_general_last);
|
||||
history_general_last = ptr_history;
|
||||
num_history_general--;
|
||||
ptr_history = history_global_last->prev_history;
|
||||
history_global_last->prev_history->next_history = NULL;
|
||||
if (history_global_last->text)
|
||||
free (history_global_last->text);
|
||||
free (history_global_last);
|
||||
history_global_last = ptr_history;
|
||||
num_history_global--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,26 +138,26 @@ history_add (void *buffer, char *string)
|
||||
}
|
||||
|
||||
/*
|
||||
* history_general_free: free general history
|
||||
* history_global_free: free global history
|
||||
*/
|
||||
|
||||
void
|
||||
history_general_free ()
|
||||
history_global_free ()
|
||||
{
|
||||
t_history *ptr_history;
|
||||
|
||||
while (history_general)
|
||||
while (history_global)
|
||||
{
|
||||
ptr_history = history_general->next_history;
|
||||
if (history_general->text)
|
||||
free (history_general->text);
|
||||
free (history_general);
|
||||
history_general = ptr_history;
|
||||
ptr_history = history_global->next_history;
|
||||
if (history_global->text)
|
||||
free (history_global->text);
|
||||
free (history_global);
|
||||
history_global = ptr_history;
|
||||
}
|
||||
history_general = NULL;
|
||||
history_general_last = NULL;
|
||||
history_general_ptr = NULL;
|
||||
num_history_general = 0;
|
||||
history_global = NULL;
|
||||
history_global_last = NULL;
|
||||
history_global_ptr = NULL;
|
||||
num_history_global = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,8 +30,12 @@ struct t_history
|
||||
t_history *prev_history; /* link to previous text/command */
|
||||
};
|
||||
|
||||
extern t_history *history_global;
|
||||
extern t_history *history_global_last;
|
||||
extern t_history *history_global_ptr;
|
||||
|
||||
extern void history_add (void *, char *);
|
||||
extern void history_general_free ();
|
||||
extern void history_global_free ();
|
||||
extern void history_buffer_free (void *);
|
||||
|
||||
#endif /* history.h */
|
||||
|
||||
@@ -23,12 +23,17 @@
|
||||
|
||||
#include "../irc/irc.h"
|
||||
|
||||
#define HOTLIST_LOW 0
|
||||
#define HOTLIST_MSG 1
|
||||
#define HOTLIST_PRIVATE 2
|
||||
#define HOTLIST_HIGHLIGHT 3
|
||||
|
||||
typedef struct t_weechat_hotlist t_weechat_hotlist;
|
||||
|
||||
struct t_weechat_hotlist
|
||||
{
|
||||
int priority; /* 0=crappy msg (join/part), 1=msg, */
|
||||
/* 2=nick highlight */
|
||||
/* 2=pv, 3=nick highlight */
|
||||
t_gui_buffer *buffer; /* associated buffer */
|
||||
t_weechat_hotlist *prev_hotlist; /* link to previous hotlist */
|
||||
t_weechat_hotlist *next_hotlist; /* link to next hotlist */
|
||||
|
||||
+157
-34
@@ -83,6 +83,78 @@ gnutls_certificate_credentials gnutls_xcred; /* gnutls client credentials */
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* ascii_strcasecmp: locale and case independent string comparison
|
||||
*/
|
||||
|
||||
int
|
||||
ascii_strcasecmp (char *string1, char *string2)
|
||||
{
|
||||
int c1, c2;
|
||||
|
||||
if (!string1 || !string2)
|
||||
return (string1) ? 1 : ((string2) ? -1 : 0);
|
||||
|
||||
while (string1[0] && string2[0])
|
||||
{
|
||||
c1 = (int)((unsigned char) string1[0]);
|
||||
c2 = (int)((unsigned char) string2[0]);
|
||||
|
||||
if ((c1 >= 'A') && (c1 <= 'Z'))
|
||||
c1 += ('a' - 'A');
|
||||
|
||||
if ((c2 >= 'A') && (c2 <= 'Z'))
|
||||
c2 += ('a' - 'A');
|
||||
|
||||
if ((c1 - c2) != 0)
|
||||
return c1 - c2;
|
||||
|
||||
string1++;
|
||||
string2++;
|
||||
}
|
||||
|
||||
return (string1[0]) ? 1 : ((string2[0]) ? -1 : 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* ascii_strncasecmp: locale and case independent string comparison
|
||||
* with max length
|
||||
*/
|
||||
|
||||
int
|
||||
ascii_strncasecmp (char *string1, char *string2, int max)
|
||||
{
|
||||
int c1, c2, count;
|
||||
|
||||
if (!string1 || !string2)
|
||||
return (string1) ? 1 : ((string2) ? -1 : 0);
|
||||
|
||||
count = 0;
|
||||
while ((count < max) && string1[0] && string2[0])
|
||||
{
|
||||
c1 = (int)((unsigned char) string1[0]);
|
||||
c2 = (int)((unsigned char) string2[0]);
|
||||
|
||||
if ((c1 >= 'A') && (c1 <= 'Z'))
|
||||
c1 += ('a' - 'A');
|
||||
|
||||
if ((c2 >= 'A') && (c2 <= 'Z'))
|
||||
c2 += ('a' - 'A');
|
||||
|
||||
if ((c1 - c2) != 0)
|
||||
return c1 - c2;
|
||||
|
||||
string1++;
|
||||
string2++;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count >= max)
|
||||
return 0;
|
||||
else
|
||||
return (string1[0]) ? 1 : ((string2[0]) ? -1 : 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_log_printf: displays a message in WeeChat log (~/.weechat/weechat.log)
|
||||
*/
|
||||
@@ -131,7 +203,7 @@ weechat_convert_encoding (char *from_code, char *to_code, char *string)
|
||||
size_t inbytesleft, outbytesleft;
|
||||
|
||||
if (from_code && from_code[0] && to_code && to_code[0]
|
||||
&& (strcasecmp(from_code, to_code) != 0))
|
||||
&& (ascii_strcasecmp(from_code, to_code) != 0))
|
||||
{
|
||||
cd = iconv_open (to_code, from_code);
|
||||
if (cd == (iconv_t)(-1))
|
||||
@@ -250,7 +322,7 @@ void wee_display_config_options ()
|
||||
break;
|
||||
}
|
||||
printf (_(" . description: %s\n\n"),
|
||||
gettext (weechat_options[i][j].long_description));
|
||||
_(weechat_options[i][j].long_description));
|
||||
j++;
|
||||
}
|
||||
}
|
||||
@@ -313,6 +385,48 @@ void wee_display_commands (int weechat_cmd, int irc_cmd)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_display_key_functions: display WeeChat key functions
|
||||
*/
|
||||
|
||||
void wee_display_key_functions ()
|
||||
{
|
||||
int i;
|
||||
|
||||
printf (_("Internal key functions:\n"));
|
||||
printf ("\n");
|
||||
i = 0;
|
||||
while (gui_key_functions[i].function_name)
|
||||
{
|
||||
printf ("* %s: %s\n",
|
||||
gui_key_functions[i].function_name,
|
||||
_(gui_key_functions[i].description));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_display_keys: display WeeChat default keys
|
||||
*/
|
||||
|
||||
void wee_display_keys ()
|
||||
{
|
||||
t_gui_key *ptr_key;
|
||||
char *expanded_name;
|
||||
|
||||
printf (_("%s default keys:\n"), PACKAGE_NAME);
|
||||
printf ("\n");
|
||||
for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
|
||||
{
|
||||
expanded_name = gui_key_get_expanded_name (ptr_key->key);
|
||||
printf ("* %s => %s\n",
|
||||
(expanded_name) ? expanded_name : ptr_key->key,
|
||||
(ptr_key->function) ? gui_key_function_search_by_ptr (ptr_key->function) : ptr_key->command);
|
||||
if (expanded_name)
|
||||
free (expanded_name);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_parse_args: parse command line args
|
||||
*/
|
||||
@@ -331,40 +445,52 @@ wee_parse_args (int argc, char *argv[])
|
||||
|| (strcmp (argv[i], "--config") == 0))
|
||||
{
|
||||
wee_display_config_options ();
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS, 0);
|
||||
}
|
||||
else if ((strcmp (argv[i], "-f") == 0)
|
||||
|| (strcmp (argv[i], "--key-functions") == 0))
|
||||
{
|
||||
wee_display_key_functions ();
|
||||
wee_shutdown (EXIT_SUCCESS, 0);
|
||||
}
|
||||
else if ((strcmp (argv[i], "-h") == 0)
|
||||
|| (strcmp (argv[i], "--help") == 0))
|
||||
{
|
||||
printf ("\n" WEE_USAGE1, argv[0], argv[0]);
|
||||
printf ("%s", WEE_USAGE2);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS, 0);
|
||||
}
|
||||
if ((strcmp (argv[i], "-i") == 0)
|
||||
else if ((strcmp (argv[i], "-i") == 0)
|
||||
|| (strcmp (argv[i], "--irc-commands") == 0))
|
||||
{
|
||||
wee_display_commands (0, 1);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS, 0);
|
||||
}
|
||||
else if ((strcmp (argv[i], "-k") == 0)
|
||||
|| (strcmp (argv[i], "--keys") == 0))
|
||||
{
|
||||
wee_display_keys ();
|
||||
wee_shutdown (EXIT_SUCCESS, 0);
|
||||
}
|
||||
else if ((strcmp (argv[i], "-l") == 0)
|
||||
|| (strcmp (argv[i], "--license") == 0))
|
||||
{
|
||||
printf ("\n%s%s", WEE_LICENSE);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS, 0);
|
||||
}
|
||||
else if ((strcmp (argv[i], "-v") == 0)
|
||||
|| (strcmp (argv[i], "--version") == 0))
|
||||
{
|
||||
printf (PACKAGE_VERSION "\n");
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS, 0);
|
||||
}
|
||||
if ((strcmp (argv[i], "-w") == 0)
|
||||
else if ((strcmp (argv[i], "-w") == 0)
|
||||
|| (strcmp (argv[i], "--weechat-commands") == 0))
|
||||
{
|
||||
wee_display_commands (1, 0);
|
||||
wee_shutdown (EXIT_SUCCESS);
|
||||
wee_shutdown (EXIT_SUCCESS, 0);
|
||||
}
|
||||
else if ((strncasecmp (argv[i], "irc", 3) == 0))
|
||||
else if ((ascii_strncasecmp (argv[i], "irc", 3) == 0))
|
||||
{
|
||||
if (server_init_with_url (argv[i], &server_tmp) < 0)
|
||||
{
|
||||
@@ -438,7 +564,7 @@ wee_create_home_dirs ()
|
||||
{
|
||||
fprintf (stderr, _("%s unable to get HOME directory\n"),
|
||||
WEECHAT_ERROR);
|
||||
wee_shutdown (EXIT_FAILURE);
|
||||
wee_shutdown (EXIT_FAILURE, 0);
|
||||
}
|
||||
dir_length = strlen (ptr_home) + 10;
|
||||
weechat_home =
|
||||
@@ -447,7 +573,7 @@ wee_create_home_dirs ()
|
||||
{
|
||||
fprintf (stderr, _("%s not enough memory for home directory\n"),
|
||||
WEECHAT_ERROR);
|
||||
wee_shutdown (EXIT_FAILURE);
|
||||
wee_shutdown (EXIT_FAILURE, 0);
|
||||
}
|
||||
snprintf (weechat_home, dir_length, "%s%s.weechat", ptr_home,
|
||||
DIR_SEPARATOR);
|
||||
@@ -457,7 +583,7 @@ wee_create_home_dirs ()
|
||||
{
|
||||
fprintf (stderr, _("%s unable to create ~/.weechat directory\n"),
|
||||
WEECHAT_ERROR);
|
||||
wee_shutdown (EXIT_FAILURE);
|
||||
wee_shutdown (EXIT_FAILURE, 0);
|
||||
}
|
||||
|
||||
dir_length = strlen (weechat_home) + 64;
|
||||
@@ -527,11 +653,11 @@ wee_init_vars ()
|
||||
msgq_last_msg = NULL;
|
||||
|
||||
/* init gnutls */
|
||||
#ifdef HAVE_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
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -615,7 +741,7 @@ wee_gui_shutdown ()
|
||||
*/
|
||||
|
||||
void
|
||||
wee_shutdown (int return_code)
|
||||
wee_shutdown (int return_code, int crash)
|
||||
{
|
||||
fifo_remove ();
|
||||
if (weechat_home)
|
||||
@@ -626,12 +752,15 @@ wee_shutdown (int return_code)
|
||||
free (local_charset);
|
||||
alias_free_all ();
|
||||
|
||||
#ifdef HAVE_GNUTLS
|
||||
#ifdef HAVE_GNUTLS
|
||||
gnutls_certificate_free_credentials (gnutls_xcred);
|
||||
gnutls_global_deinit();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
exit (return_code);
|
||||
if (crash)
|
||||
abort();
|
||||
else
|
||||
exit (return_code);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -715,23 +844,15 @@ wee_dump (int crash)
|
||||
wee_log_printf ("\n");
|
||||
gui_buffer_print_log (ptr_buffer);
|
||||
}
|
||||
|
||||
wee_log_printf ("\n");
|
||||
ignore_print_log ();
|
||||
|
||||
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
|
||||
*/
|
||||
@@ -747,7 +868,7 @@ my_sigsegv ()
|
||||
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);
|
||||
wee_shutdown (EXIT_FAILURE, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -767,10 +888,12 @@ main (int argc, char *argv[])
|
||||
local_charset = strdup (nl_langinfo (CODESET));
|
||||
#endif
|
||||
|
||||
signal (SIGINT, my_sigint); /* ignore SIGINT signal */
|
||||
signal (SIGINT, SIG_IGN); /* ignore SIGINT signal */
|
||||
signal (SIGQUIT, SIG_IGN); /* ignore SIGQUIT 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 */
|
||||
gui_key_init (); /* init keyboard (default key bindings) */
|
||||
wee_parse_args (argc, argv); /* parse command line args */
|
||||
wee_create_home_dirs (); /* create WeeChat directories */
|
||||
wee_init_log (); /* init log file */
|
||||
@@ -805,7 +928,7 @@ main (int argc, char *argv[])
|
||||
(void) config_write (NULL); /* save config file */
|
||||
command_index_free (); /* free commands index */
|
||||
wee_gui_shutdown (); /* shut down WeeChat GUI */
|
||||
wee_shutdown (EXIT_SUCCESS); /* quit WeeChat (oh no, why?) */
|
||||
wee_shutdown (EXIT_SUCCESS, 0); /* quit WeeChat (oh no, why?) */
|
||||
|
||||
return EXIT_SUCCESS; /* make gcc happy (never executed) */
|
||||
}
|
||||
|
||||
@@ -90,8 +90,10 @@
|
||||
|
||||
#define WEE_USAGE2 \
|
||||
" -c, --config display config file options\n" \
|
||||
" -h, --help this help screen\n" \
|
||||
" -f, --key-functions display WeeChat internal functions for keys\n" \
|
||||
" -h, --help this help\n" \
|
||||
" -i, --irc-commands display IRC commands\n" \
|
||||
" -k, --keys display WeeChat default keys\n" \
|
||||
" -l, --license display WeeChat license\n" \
|
||||
" -v, --version display WeeChat version\n" \
|
||||
" -w, --weechat-commands display WeeChat commands\n\n"
|
||||
@@ -116,10 +118,12 @@ extern char *local_charset;
|
||||
extern gnutls_certificate_credentials gnutls_xcred;
|
||||
#endif
|
||||
|
||||
extern int ascii_strcasecmp (char *, char *);
|
||||
extern int ascii_strncasecmp (char *, char *, int);
|
||||
extern void wee_log_printf (char *, ...);
|
||||
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);
|
||||
extern void wee_shutdown (int, int);
|
||||
|
||||
#endif /* weechat.h */
|
||||
|
||||
+254
-45
@@ -53,7 +53,9 @@ t_config_section config_sections[CONFIG_NUMBER_SECTIONS] =
|
||||
{ CONFIG_SECTION_IRC, "irc" },
|
||||
{ CONFIG_SECTION_DCC, "dcc" },
|
||||
{ CONFIG_SECTION_PROXY, "proxy" },
|
||||
{ CONFIG_SECTION_KEYS, "keys" },
|
||||
{ CONFIG_SECTION_ALIAS, "alias" },
|
||||
{ CONFIG_SECTION_IGNORE, "ignore" },
|
||||
{ CONFIG_SECTION_SERVER, "server" }
|
||||
};
|
||||
|
||||
@@ -68,6 +70,7 @@ char *cfg_look_charset_encode;
|
||||
char *cfg_look_charset_internal;
|
||||
char *cfg_look_buffer_timestamp;
|
||||
int cfg_look_color_nicks;
|
||||
int cfg_look_color_nicks_number;
|
||||
int cfg_look_color_actions;
|
||||
int cfg_look_remove_colors_from_msgs;
|
||||
int cfg_look_nicklist;
|
||||
@@ -82,6 +85,7 @@ char *cfg_look_no_nickname;
|
||||
char *cfg_look_completor;
|
||||
int cfg_look_infobar;
|
||||
char *cfg_look_infobar_timestamp;
|
||||
int cfg_look_infobar_seconds;
|
||||
int cfg_look_infobar_delay_highlight;
|
||||
|
||||
t_config_option weechat_options_look[] =
|
||||
@@ -121,6 +125,10 @@ t_config_option weechat_options_look[] =
|
||||
N_("display nick names with different colors"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_color_nicks, NULL, config_change_noop },
|
||||
{ "look_color_nicks_number", N_("number of colors to use for nicks colors"),
|
||||
N_("number of colors to use for nicks colors"),
|
||||
OPTION_TYPE_INT, 1, 10, 10,
|
||||
NULL, NULL, &cfg_look_color_nicks_number, NULL, config_change_nicks_colors },
|
||||
{ "look_color_actions", N_("display actions with different colors"),
|
||||
N_("display actions with different colors"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
@@ -170,7 +178,11 @@ t_config_option weechat_options_look[] =
|
||||
{ "look_infobar_timestamp", N_("timestamp for time in infobar"),
|
||||
N_("timestamp for time in infobar"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"%B, %A %d %Y - %H:%M", NULL, NULL, &cfg_look_infobar_timestamp, config_change_buffer_content },
|
||||
"%B, %A %d %Y", NULL, NULL, &cfg_look_infobar_timestamp, config_change_buffer_content },
|
||||
{ "look_infobar_seconds", N_("display seconds in infobar time"),
|
||||
N_("display seconds in infobar time"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_infobar_seconds, NULL, config_change_buffer_content },
|
||||
{ "look_infobar_delay_highlight", N_("delay (in seconds) for highlight messages in infobar"),
|
||||
N_("delay (in seconds) for highlight messages in infobar "
|
||||
"(0 = disable highlight notifications in infobar)"),
|
||||
@@ -188,6 +200,8 @@ int cfg_col_chat_time;
|
||||
int cfg_col_chat_time_sep;
|
||||
int cfg_col_chat_prefix1;
|
||||
int cfg_col_chat_prefix2;
|
||||
int cfg_col_chat_join;
|
||||
int cfg_col_chat_part;
|
||||
int cfg_col_chat_nick;
|
||||
int cfg_col_chat_host;
|
||||
int cfg_col_chat_channel;
|
||||
@@ -197,11 +211,13 @@ int cfg_col_chat_bg;
|
||||
int cfg_col_status;
|
||||
int cfg_col_status_delimiters;
|
||||
int cfg_col_status_data_msg;
|
||||
int cfg_col_status_data_private;
|
||||
int cfg_col_status_data_highlight;
|
||||
int cfg_col_status_data_other;
|
||||
int cfg_col_status_more;
|
||||
int cfg_col_status_bg;
|
||||
int cfg_col_infobar;
|
||||
int cfg_col_infobar_delimiters;
|
||||
int cfg_col_infobar_highlight;
|
||||
int cfg_col_infobar_bg;
|
||||
int cfg_col_input;
|
||||
@@ -218,6 +234,7 @@ int cfg_col_nick_voice;
|
||||
int cfg_col_nick_more;
|
||||
int cfg_col_nick_sep;
|
||||
int cfg_col_nick_self;
|
||||
int cfg_col_nick_colors[COLOR_WIN_NICK_NUMBER];
|
||||
int cfg_col_nick_private;
|
||||
int cfg_col_nick_bg;
|
||||
int cfg_col_dcc_selected;
|
||||
@@ -260,6 +277,14 @@ t_config_option weechat_options_colors[] =
|
||||
N_("color for middle char of prefix"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"white", NULL, &cfg_col_chat_prefix2, NULL, &config_change_color },
|
||||
{ "col_chat_join", N_("color for join arrow (prefix)"),
|
||||
N_("color for join arrow (prefix)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightgreen", NULL, &cfg_col_chat_join, NULL, &config_change_color },
|
||||
{ "col_chat_part", N_("color for part/quit arrow (prefix)"),
|
||||
N_("color for part/quit arrow (prefix)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightred", NULL, &cfg_col_chat_part, NULL, &config_change_color },
|
||||
{ "col_chat_nick", N_("color for nicks in actions"),
|
||||
N_("color for nicks in actions (chat window)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -298,10 +323,14 @@ t_config_option weechat_options_colors[] =
|
||||
N_("color for window with new messages (status bar)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"yellow", NULL, &cfg_col_status_data_msg, NULL, &config_change_color },
|
||||
{ "col_status_private", N_("color for window with private message"),
|
||||
N_("color for window with private message (status bar)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightmagenta", NULL, &cfg_col_status_data_private, NULL, &config_change_color },
|
||||
{ "col_status_highlight", N_("color for window with highlight"),
|
||||
N_("color for window with highlight (status bar)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightmagenta", NULL, &cfg_col_status_data_highlight, NULL, &config_change_color },
|
||||
"lightred", NULL, &cfg_col_status_data_highlight, NULL, &config_change_color },
|
||||
{ "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,
|
||||
@@ -320,6 +349,10 @@ t_config_option weechat_options_colors[] =
|
||||
N_("color for info bar text"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"black", NULL, &cfg_col_infobar, NULL, &config_change_color },
|
||||
{ "col_infobar_delimiters", N_("color for infobar delimiters"),
|
||||
N_("color for infobar delimiters"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"blue", NULL, &cfg_col_infobar_delimiters, NULL, &config_change_color },
|
||||
{ "col_infobar_highlight", N_("color for info bar highlight notification"),
|
||||
N_("color for info bar highlight notification"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -388,6 +421,46 @@ t_config_option weechat_options_colors[] =
|
||||
N_("color for local nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"white", NULL, &cfg_col_nick_self, NULL, &config_change_color },
|
||||
{ "col_nick_color1", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"cyan", NULL, &cfg_col_nick_colors[0], NULL, &config_change_color },
|
||||
{ "col_nick_color2", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"magenta", NULL, &cfg_col_nick_colors[1], NULL, &config_change_color },
|
||||
{ "col_nick_color3", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"green", NULL, &cfg_col_nick_colors[2], NULL, &config_change_color },
|
||||
{ "col_nick_color4", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"brown", NULL, &cfg_col_nick_colors[3], NULL, &config_change_color },
|
||||
{ "col_nick_color5", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightblue", NULL, &cfg_col_nick_colors[4], NULL, &config_change_color },
|
||||
{ "col_nick_color6", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"default", NULL, &cfg_col_nick_colors[5], NULL, &config_change_color },
|
||||
{ "col_nick_color7", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightcyan", NULL, &cfg_col_nick_colors[6], NULL, &config_change_color },
|
||||
{ "col_nick_color8", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightmagenta", NULL, &cfg_col_nick_colors[7], NULL, &config_change_color },
|
||||
{ "col_nick_color9", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightgreen", NULL, &cfg_col_nick_colors[8], NULL, &config_change_color },
|
||||
{ "col_nick_color10", N_("color for nick"),
|
||||
N_("color for nick"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"blue", NULL, &cfg_col_nick_colors[9], NULL, &config_change_color },
|
||||
{ "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,
|
||||
@@ -496,11 +569,13 @@ 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_notice_as_pv;
|
||||
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;
|
||||
char *cfg_irc_highlight;
|
||||
|
||||
t_config_option weechat_options_irc[] =
|
||||
{ { "irc_display_away", N_("display message to all channels when away"),
|
||||
@@ -519,6 +594,10 @@ t_config_option weechat_options_irc[] =
|
||||
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_notice_as_pv", N_("display notices as private messages"),
|
||||
N_("display notices as private messages"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
|
||||
NULL, NULL, &cfg_irc_notice_as_pv, NULL, 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,
|
||||
@@ -539,6 +618,10 @@ t_config_option weechat_options_irc[] =
|
||||
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 },
|
||||
{ "irc_highlight", N_("list of words to highlight"),
|
||||
N_("comma separated list of words to highlight (case insensitive comparison)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &cfg_irc_highlight, config_change_noop },
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -708,7 +791,7 @@ t_config_option weechat_options_server[] =
|
||||
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"),
|
||||
N_("comma separated list of channels to join when connected to server (example: \"#chan1,#chan2,#chan3 #key1,#key2\")"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
"", NULL, NULL, &(cfg_server.autojoin), NULL },
|
||||
{ "server_autorejoin", N_("automatically rejoin channels when kicked"),
|
||||
@@ -727,7 +810,7 @@ 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_irc, weechat_options_dcc,
|
||||
weechat_options_proxy, NULL, weechat_options_server
|
||||
weechat_options_proxy, NULL, NULL, NULL, weechat_options_server
|
||||
};
|
||||
|
||||
|
||||
@@ -744,7 +827,7 @@ get_pos_array_values (char **array, char *string)
|
||||
i = 0;
|
||||
while (array[i])
|
||||
{
|
||||
if (strcasecmp (array[i], string) == 0)
|
||||
if (ascii_strcasecmp (array[i], string) == 0)
|
||||
return i;
|
||||
i++;
|
||||
}
|
||||
@@ -763,7 +846,8 @@ config_get_section (t_config_option *ptr_option)
|
||||
|
||||
for (i = 0; i < CONFIG_NUMBER_SECTIONS; i++)
|
||||
{
|
||||
if ((i != CONFIG_SECTION_ALIAS) && (i != CONFIG_SECTION_SERVER))
|
||||
if ((i != CONFIG_SECTION_KEYS) && (i != CONFIG_SECTION_ALIAS)
|
||||
&& (i != CONFIG_SECTION_IGNORE) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
{
|
||||
@@ -826,7 +910,41 @@ config_change_buffer_content ()
|
||||
void
|
||||
config_change_color ()
|
||||
{
|
||||
t_gui_window *ptr_win;
|
||||
|
||||
gui_init_colors ();
|
||||
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
|
||||
gui_redraw_buffer (ptr_win->buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
* config_change_nicks_colors: called when number of nicks color changed
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_nicks_colors ()
|
||||
{
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (ptr_server->is_connected)
|
||||
{
|
||||
for (ptr_channel = ptr_server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
for (ptr_nick = ptr_channel->nicks; ptr_nick;
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
if (ptr_nick->color != COLOR_WIN_NICK_SELF)
|
||||
ptr_nick->color = nick_find_color (ptr_nick);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -894,9 +1012,9 @@ config_option_set_value (t_config_option *option, char *value)
|
||||
switch (option->option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
if (strcasecmp (value, "on") == 0)
|
||||
if (ascii_strcasecmp (value, "on") == 0)
|
||||
*(option->ptr_int) = BOOL_TRUE;
|
||||
else if (strcasecmp (value, "off") == 0)
|
||||
else if (ascii_strcasecmp (value, "off") == 0)
|
||||
*(option->ptr_int) = BOOL_FALSE;
|
||||
else
|
||||
return -1;
|
||||
@@ -933,43 +1051,43 @@ config_option_set_value (t_config_option *option, char *value)
|
||||
void *
|
||||
config_get_server_option_ptr (t_irc_server *server, char *option_name)
|
||||
{
|
||||
if (strcasecmp (option_name, "server_name") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_name") == 0)
|
||||
return (void *)(&server->name);
|
||||
if (strcasecmp (option_name, "server_autoconnect") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_autoconnect") == 0)
|
||||
return (void *)(&server->autoconnect);
|
||||
if (strcasecmp (option_name, "server_autoreconnect") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_autoreconnect") == 0)
|
||||
return (void *)(&server->autoreconnect);
|
||||
if (strcasecmp (option_name, "server_autoreconnect_delay") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_autoreconnect_delay") == 0)
|
||||
return (void *)(&server->autoreconnect_delay);
|
||||
if (strcasecmp (option_name, "server_address") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_address") == 0)
|
||||
return (void *)(&server->address);
|
||||
if (strcasecmp (option_name, "server_port") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_port") == 0)
|
||||
return (void *)(&server->port);
|
||||
if (strcasecmp (option_name, "server_ipv6") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_ipv6") == 0)
|
||||
return (void *)(&server->ipv6);
|
||||
if (strcasecmp (option_name, "server_ssl") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_ssl") == 0)
|
||||
return (void *)(&server->ssl);
|
||||
if (strcasecmp (option_name, "server_password") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_password") == 0)
|
||||
return (void *)(&server->password);
|
||||
if (strcasecmp (option_name, "server_nick1") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_nick1") == 0)
|
||||
return (void *)(&server->nick1);
|
||||
if (strcasecmp (option_name, "server_nick2") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_nick2") == 0)
|
||||
return (void *)(&server->nick2);
|
||||
if (strcasecmp (option_name, "server_nick3") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_nick3") == 0)
|
||||
return (void *)(&server->nick3);
|
||||
if (strcasecmp (option_name, "server_username") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_username") == 0)
|
||||
return (void *)(&server->username);
|
||||
if (strcasecmp (option_name, "server_realname") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_realname") == 0)
|
||||
return (void *)(&server->realname);
|
||||
if (strcasecmp (option_name, "server_command") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_command") == 0)
|
||||
return (void *)(&server->command);
|
||||
if (strcasecmp (option_name, "server_command_delay") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_command_delay") == 0)
|
||||
return (void *)(&server->command_delay);
|
||||
if (strcasecmp (option_name, "server_autojoin") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_autojoin") == 0)
|
||||
return (void *)(&server->autojoin);
|
||||
if (strcasecmp (option_name, "server_autorejoin") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_autorejoin") == 0)
|
||||
return (void *)(&server->autorejoin);
|
||||
if (strcasecmp (option_name, "server_notify_levels") == 0)
|
||||
if (ascii_strcasecmp (option_name, "server_notify_levels") == 0)
|
||||
return (void *)(&server->notify_levels);
|
||||
/* option not found */
|
||||
return NULL;
|
||||
@@ -999,7 +1117,7 @@ config_set_server_value (t_irc_server *server, char *option_name,
|
||||
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)
|
||||
if (ascii_strcasecmp (weechat_options[CONFIG_SECTION_SERVER][i].option_name, option_name) == 0)
|
||||
{
|
||||
ptr_option = &weechat_options[CONFIG_SECTION_SERVER][i];
|
||||
break;
|
||||
@@ -1011,9 +1129,9 @@ config_set_server_value (t_irc_server *server, char *option_name,
|
||||
switch (ptr_option->option_type)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
if (strcasecmp (value, "on") == 0)
|
||||
if (ascii_strcasecmp (value, "on") == 0)
|
||||
*((int *)(ptr_data)) = BOOL_TRUE;
|
||||
else if (strcasecmp (value, "off") == 0)
|
||||
else if (ascii_strcasecmp (value, "off") == 0)
|
||||
*((int *)(ptr_data)) = BOOL_FALSE;
|
||||
else
|
||||
return -2;
|
||||
@@ -1057,12 +1175,13 @@ config_option_search (char *option_name)
|
||||
|
||||
for (i = 0; i < CONFIG_NUMBER_SECTIONS; i++)
|
||||
{
|
||||
if ((i != CONFIG_SECTION_ALIAS) && (i != CONFIG_SECTION_SERVER))
|
||||
if ((i != CONFIG_SECTION_KEYS) && (i != CONFIG_SECTION_ALIAS)
|
||||
&& (i != CONFIG_SECTION_IGNORE) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
{
|
||||
/* if option found, return pointer */
|
||||
if (strcasecmp (weechat_options[i][j].option_name, option_name) == 0)
|
||||
if (ascii_strcasecmp (weechat_options[i][j].option_name, option_name) == 0)
|
||||
return &weechat_options[i][j];
|
||||
}
|
||||
}
|
||||
@@ -1220,7 +1339,8 @@ config_default_values ()
|
||||
|
||||
for (i = 0; i < CONFIG_NUMBER_SECTIONS; i++)
|
||||
{
|
||||
if ((i != CONFIG_SECTION_ALIAS) && (i != CONFIG_SECTION_SERVER))
|
||||
if ((i != CONFIG_SECTION_KEYS) && (i != CONFIG_SECTION_ALIAS)
|
||||
&& (i != CONFIG_SECTION_IGNORE) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
{
|
||||
@@ -1375,11 +1495,40 @@ config_read ()
|
||||
if (pos2 != NULL)
|
||||
pos2[0] = '\0';
|
||||
|
||||
if (section == CONFIG_SECTION_ALIAS)
|
||||
if (section == CONFIG_SECTION_KEYS)
|
||||
{
|
||||
if (pos[0])
|
||||
{
|
||||
/* bind key (overwrite any binding with same key) */
|
||||
gui_key_bind (line, pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* unbin key if no value given */
|
||||
gui_key_unbind (line);
|
||||
}
|
||||
}
|
||||
else if (section == CONFIG_SECTION_ALIAS)
|
||||
{
|
||||
/* create new alias */
|
||||
if (alias_new (line, pos))
|
||||
weelist_add (&index_commands, &last_index_command, line);
|
||||
}
|
||||
else if (section == CONFIG_SECTION_IGNORE)
|
||||
{
|
||||
/* create new ignore */
|
||||
if (ascii_strcasecmp (line, "ignore") != 0)
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid option \"%s\"\n"),
|
||||
WEECHAT_WARNING, filename, line_number, line);
|
||||
else
|
||||
{
|
||||
if (!ignore_add_from_config (pos))
|
||||
gui_printf (NULL,
|
||||
_("%s %s, line %d: invalid ignore options \"%s\"\n"),
|
||||
WEECHAT_WARNING, filename, line_number, pos);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
option_number = -1;
|
||||
@@ -1493,6 +1642,8 @@ config_create_default ()
|
||||
time_t current_time;
|
||||
struct passwd *my_passwd;
|
||||
char *realname, *pos;
|
||||
t_gui_key *ptr_key;
|
||||
char *expanded_name, *function_name;
|
||||
|
||||
filename_length = strlen (weechat_home) + 64;
|
||||
filename =
|
||||
@@ -1520,7 +1671,8 @@ config_create_default ()
|
||||
|
||||
for (i = 0; i < CONFIG_NUMBER_SECTIONS; i++)
|
||||
{
|
||||
if ((i != CONFIG_SECTION_ALIAS) && (i != CONFIG_SECTION_SERVER))
|
||||
if ((i != CONFIG_SECTION_KEYS) && (i != CONFIG_SECTION_ALIAS)
|
||||
&& (i != CONFIG_SECTION_IGNORE) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
fprintf (file, "\n[%s]\n", config_sections[i].section_name);
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
@@ -1550,8 +1702,28 @@ config_create_default ()
|
||||
}
|
||||
}
|
||||
|
||||
/* default key bindings */
|
||||
fprintf (file, "\n[keys]\n");
|
||||
for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
|
||||
{
|
||||
expanded_name = gui_key_get_expanded_name (ptr_key->key);
|
||||
if (ptr_key->function)
|
||||
{
|
||||
function_name = gui_key_function_search_by_ptr (ptr_key->function);
|
||||
if (function_name)
|
||||
fprintf (file, "%s=%s\n",
|
||||
(expanded_name) ? expanded_name : ptr_key->key,
|
||||
function_name);
|
||||
}
|
||||
else
|
||||
fprintf (file, "%s=%s\n",
|
||||
(expanded_name) ? expanded_name : ptr_key->key,
|
||||
ptr_key->command);
|
||||
if (expanded_name)
|
||||
free (expanded_name);
|
||||
}
|
||||
|
||||
/* default aliases */
|
||||
/* TODO: remove comments when missing commands will be ok */
|
||||
fprintf (file, "\n[alias]\n");
|
||||
fprintf (file, "SAY=msg *\n");
|
||||
fprintf (file, "BYE=quit\n");
|
||||
@@ -1560,26 +1732,26 @@ config_create_default ()
|
||||
fprintf (file, "C=clear\n");
|
||||
fprintf (file, "CL=clear\n");
|
||||
fprintf (file, "CLOSE=buffer close\n");
|
||||
fprintf (file, "# CHAT=dcc chat\n");
|
||||
fprintf (file, "# GET=dcc get\n");
|
||||
fprintf (file, "# IG=ignore\n");
|
||||
fprintf (file, "CHAT=dcc chat\n");
|
||||
fprintf (file, "IG=ignore\n");
|
||||
fprintf (file, "J=join\n");
|
||||
fprintf (file, "K=kick\n");
|
||||
fprintf (file, "# KB=kickban\n");
|
||||
fprintf (file, "# KN=knockout\n");
|
||||
fprintf (file, "KB=kickban\n");
|
||||
fprintf (file, "LEAVE=part\n");
|
||||
fprintf (file, "M=msg\n");
|
||||
fprintf (file, "# MUB=unban *\n");
|
||||
fprintf (file, "MUB=unban *\n");
|
||||
fprintf (file, "N=names\n");
|
||||
fprintf (file, "Q=query\n");
|
||||
fprintf (file, "T=topic\n");
|
||||
fprintf (file, "# UB=unban\n");
|
||||
fprintf (file, "# UNIG=unignore\n");
|
||||
fprintf (file, "UB=unban\n");
|
||||
fprintf (file, "UNIG=unignore\n");
|
||||
fprintf (file, "W=who\n");
|
||||
fprintf (file, "WC=part\n");
|
||||
fprintf (file, "WI=whois\n");
|
||||
fprintf (file, "WW=whowas\n");
|
||||
|
||||
/* no ignore by default */
|
||||
|
||||
/* default server is freenode */
|
||||
fprintf (file, "\n[server]\n");
|
||||
fprintf (file, "server_name=freenode\n");
|
||||
@@ -1658,6 +1830,9 @@ config_write (char *config_name)
|
||||
time_t current_time;
|
||||
t_irc_server *ptr_server;
|
||||
t_weechat_alias *ptr_alias;
|
||||
t_irc_ignore *ptr_ignore;
|
||||
t_gui_key *ptr_key;
|
||||
char *expanded_name, *function_name;
|
||||
|
||||
if (config_name)
|
||||
filename = strdup (config_name);
|
||||
@@ -1690,7 +1865,8 @@ config_write (char *config_name)
|
||||
|
||||
for (i = 0; i < CONFIG_NUMBER_SECTIONS; i++)
|
||||
{
|
||||
if ((i != CONFIG_SECTION_ALIAS) && (i != CONFIG_SECTION_SERVER))
|
||||
if ((i != CONFIG_SECTION_KEYS) && (i != CONFIG_SECTION_ALIAS)
|
||||
&& (i != CONFIG_SECTION_IGNORE) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
fprintf (file, "\n[%s]\n", config_sections[i].section_name);
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
@@ -1737,6 +1913,27 @@ config_write (char *config_name)
|
||||
}
|
||||
}
|
||||
|
||||
/* keys section */
|
||||
fprintf (file, "\n[keys]\n");
|
||||
for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
|
||||
{
|
||||
expanded_name = gui_key_get_expanded_name (ptr_key->key);
|
||||
if (ptr_key->function)
|
||||
{
|
||||
function_name = gui_key_function_search_by_ptr (ptr_key->function);
|
||||
if (function_name)
|
||||
fprintf (file, "%s=%s\n",
|
||||
(expanded_name) ? expanded_name : ptr_key->key,
|
||||
function_name);
|
||||
}
|
||||
else
|
||||
fprintf (file, "%s=%s\n",
|
||||
(expanded_name) ? expanded_name : ptr_key->key,
|
||||
ptr_key->command);
|
||||
if (expanded_name)
|
||||
free (expanded_name);
|
||||
}
|
||||
|
||||
/* alias section */
|
||||
fprintf (file, "\n[alias]\n");
|
||||
for (ptr_alias = weechat_alias; ptr_alias;
|
||||
@@ -1746,6 +1943,18 @@ config_write (char *config_name)
|
||||
ptr_alias->alias_name, ptr_alias->alias_command + 1);
|
||||
}
|
||||
|
||||
/* ignore section */
|
||||
fprintf (file, "\n[ignore]\n");
|
||||
for (ptr_ignore = irc_ignore; ptr_ignore;
|
||||
ptr_ignore = ptr_ignore->next_ignore)
|
||||
{
|
||||
fprintf (file, "ignore=%s,%s,%s,%s\n",
|
||||
ptr_ignore->mask,
|
||||
ptr_ignore->type,
|
||||
ptr_ignore->channel_name,
|
||||
ptr_ignore->server_name);
|
||||
}
|
||||
|
||||
/* server section */
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
|
||||
+15
-3
@@ -33,9 +33,11 @@
|
||||
#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 CONFIG_SECTION_KEYS 7
|
||||
#define CONFIG_SECTION_ALIAS 8
|
||||
#define CONFIG_SECTION_IGNORE 9
|
||||
#define CONFIG_SECTION_SERVER 10
|
||||
#define CONFIG_NUMBER_SECTIONS 11
|
||||
|
||||
#define OPTION_TYPE_BOOLEAN 1 /* values: on/off */
|
||||
#define OPTION_TYPE_INT 2 /* values: from min to max */
|
||||
@@ -85,6 +87,7 @@ 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_nicks_number;
|
||||
extern int cfg_look_color_actions;
|
||||
extern int cfg_look_remove_colors_from_msgs;
|
||||
extern int cfg_look_nicklist;
|
||||
@@ -97,6 +100,7 @@ extern char *cfg_look_no_nickname;
|
||||
extern char *cfg_look_completor;
|
||||
extern int cfg_look_infobar;
|
||||
extern char *cfg_look_infobar_timestamp;
|
||||
extern int cfg_look_infobar_seconds;
|
||||
extern int cfg_look_infobar_delay_highlight;
|
||||
|
||||
extern int cfg_col_title;
|
||||
@@ -106,6 +110,8 @@ extern int cfg_col_chat_time;
|
||||
extern int cfg_col_chat_time_sep;
|
||||
extern int cfg_col_chat_prefix1;
|
||||
extern int cfg_col_chat_prefix2;
|
||||
extern int cfg_col_chat_join;
|
||||
extern int cfg_col_chat_part;
|
||||
extern int cfg_col_chat_nick;
|
||||
extern int cfg_col_chat_host;
|
||||
extern int cfg_col_chat_channel;
|
||||
@@ -115,11 +121,13 @@ extern int cfg_col_chat_bg;
|
||||
extern int cfg_col_status;
|
||||
extern int cfg_col_status_delimiters;
|
||||
extern int cfg_col_status_data_msg;
|
||||
extern int cfg_col_status_data_private;
|
||||
extern int cfg_col_status_data_highlight;
|
||||
extern int cfg_col_status_data_other;
|
||||
extern int cfg_col_status_more;
|
||||
extern int cfg_col_status_bg;
|
||||
extern int cfg_col_infobar;
|
||||
extern int cfg_col_infobar_delimiters;
|
||||
extern int cfg_col_infobar_highlight;
|
||||
extern int cfg_col_infobar_bg;
|
||||
extern int cfg_col_input;
|
||||
@@ -136,6 +144,7 @@ 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_colors[COLOR_WIN_NICK_NUMBER];
|
||||
extern int cfg_col_nick_private;
|
||||
extern int cfg_col_nick_bg;
|
||||
extern int cfg_col_dcc_selected;
|
||||
@@ -161,11 +170,13 @@ 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_notice_as_pv;
|
||||
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 char *cfg_irc_highlight;
|
||||
|
||||
extern int cfg_dcc_auto_accept_files;
|
||||
extern int cfg_dcc_auto_accept_chats;
|
||||
@@ -195,6 +206,7 @@ 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_nicks_colors ();
|
||||
extern void config_change_away_check ();
|
||||
extern void config_change_fifo_pipe ();
|
||||
extern void config_change_notify_levels ();
|
||||
|
||||
@@ -42,7 +42,7 @@ weelist_search (t_weelist *weelist, char *data)
|
||||
|
||||
for (ptr_weelist = weelist; ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (strcasecmp (data, ptr_weelist->data) == 0)
|
||||
if (ascii_strcasecmp (data, ptr_weelist->data) == 0)
|
||||
return ptr_weelist;
|
||||
}
|
||||
/* word not found in list */
|
||||
@@ -60,7 +60,7 @@ weelist_find_pos (t_weelist *weelist, char *data)
|
||||
|
||||
for (ptr_weelist = weelist; ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (strcasecmp (data, ptr_weelist->data) < 0)
|
||||
if (ascii_strcasecmp (data, ptr_weelist->data) < 0)
|
||||
return ptr_weelist;
|
||||
}
|
||||
/* position not found, best position is at the end */
|
||||
|
||||
@@ -20,6 +20,7 @@ INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
noinst_LIBRARIES = lib_weechat_gui_common.a
|
||||
|
||||
lib_weechat_gui_common_a_SOURCES = gui-common.c \
|
||||
gui-keyboard.c \
|
||||
gui.h
|
||||
|
||||
if GUI_NCURSES
|
||||
|
||||
@@ -19,7 +19,7 @@ INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
|
||||
bin_PROGRAMS = weechat-curses
|
||||
|
||||
weechat_curses_LDADD = ../lib_weechat_gui_common.a \
|
||||
weechat_curses_LDADD = ../gui-common.o ../gui-keyboard.o \
|
||||
../../common/lib_weechat_main.a \
|
||||
../../irc/lib_weechat_irc.a \
|
||||
$(NCURSES_LIBS) \
|
||||
@@ -27,4 +27,4 @@ weechat_curses_LDADD = ../lib_weechat_gui_common.a \
|
||||
$(GNUTLS_LIBS)
|
||||
|
||||
weechat_curses_SOURCES = gui-display.c \
|
||||
gui-input.c
|
||||
gui-input.c
|
||||
|
||||
+437
-299
File diff suppressed because it is too large
Load Diff
+186
-634
@@ -41,649 +41,193 @@
|
||||
#include "../../common/fifo.h"
|
||||
#include "../../irc/irc.h"
|
||||
|
||||
#define KEY_ESCAPE 27
|
||||
|
||||
/*
|
||||
* gui_read_keyb: read keyboard line
|
||||
* gui_input_default_key_bindings: create default key bindings
|
||||
*/
|
||||
|
||||
void
|
||||
gui_read_keyb ()
|
||||
gui_input_default_key_bindings ()
|
||||
{
|
||||
int i;
|
||||
char key_str[32], command[32];
|
||||
|
||||
/* keys binded with internal functions */
|
||||
gui_key_bind ( /* RC */ "ctrl-M", "return");
|
||||
gui_key_bind ( /* RC */ "ctrl-J", "return");
|
||||
gui_key_bind ( /* tab */ "ctrl-I", "tab");
|
||||
gui_key_bind ( /* basckp */ "ctrl-H", "backspace");
|
||||
gui_key_bind ( /* basckp */ "ctrl-?", "backspace");
|
||||
gui_key_bind ( /* del */ "meta2-3~", "delete");
|
||||
gui_key_bind ( /* ^K */ "ctrl-K", "delete_end_line");
|
||||
gui_key_bind ( /* ^U */ "ctrl-U", "delete_beginning_line");
|
||||
gui_key_bind ( /* ^W */ "ctrl-W", "delete_previous_word");
|
||||
gui_key_bind ( /* ^Y */ "ctrl-Y", "clipboard_paste");
|
||||
gui_key_bind ( /* ^T */ "ctrl-T", "transpose_chars");
|
||||
gui_key_bind ( /* home */ "meta2-1~", "home");
|
||||
gui_key_bind ( /* home */ "meta2-H", "home");
|
||||
gui_key_bind ( /* home */ "meta2-7~", "home");
|
||||
gui_key_bind ( /* ^A */ "ctrl-A", "home");
|
||||
gui_key_bind ( /* end */ "meta2-4~", "end");
|
||||
gui_key_bind ( /* end */ "meta2-F", "end");
|
||||
gui_key_bind ( /* end */ "meta2-8~", "end");
|
||||
gui_key_bind ( /* ^E */ "ctrl-E", "end");
|
||||
gui_key_bind ( /* left */ "meta2-D", "left");
|
||||
gui_key_bind ( /* right */ "meta2-C", "right");
|
||||
gui_key_bind ( /* up */ "meta2-A", "up");
|
||||
gui_key_bind ( /* ^up */ "meta-Oa", "up_global");
|
||||
gui_key_bind ( /* down */ "meta2-B", "down");
|
||||
gui_key_bind ( /* ^down */ "meta-Ob", "down_global");
|
||||
gui_key_bind ( /* pgup */ "meta2-5~", "page_up");
|
||||
gui_key_bind ( /* pgdn */ "meta2-6~", "page_down");
|
||||
gui_key_bind ( /* F10 */ "meta2-21~", "infobar_clear");
|
||||
gui_key_bind ( /* F11 */ "meta2-23~", "nick_page_up");
|
||||
gui_key_bind ( /* F12 */ "meta2-24~", "nick_page_down");
|
||||
gui_key_bind ( /* m-F11 */ "meta-meta2-1~", "nick_beginning");
|
||||
gui_key_bind ( /* m-F12 */ "meta-meta2-4~", "nick_end");
|
||||
gui_key_bind ( /* ^L */ "ctrl-L", "refresh");
|
||||
gui_key_bind ( /* m-a */ "meta-a", "jump_smart");
|
||||
gui_key_bind ( /* m-b */ "meta-b", "previous_word");
|
||||
gui_key_bind ( /* ^left */ "meta-Od", "previous_word");
|
||||
gui_key_bind ( /* m-d */ "meta-d", "delete_next_word");
|
||||
gui_key_bind ( /* m-f */ "meta-f", "next_word");
|
||||
gui_key_bind ( /* ^right */ "meta-Oc", "next_word");
|
||||
gui_key_bind ( /* m-h */ "meta-h", "hotlist_clear");
|
||||
gui_key_bind ( /* m-j,m-d */ "meta-jmeta-d", "jump_dcc");
|
||||
gui_key_bind ( /* m-j,m-l */ "meta-jmeta-l", "jump_last_buffer");
|
||||
gui_key_bind ( /* m-j,m-s */ "meta-jmeta-s", "jump_server");
|
||||
gui_key_bind ( /* m-j,m-x */ "meta-jmeta-x", "jump_next_server");
|
||||
gui_key_bind ( /* m-k */ "meta-k", "grab_key");
|
||||
gui_key_bind ( /* m-r */ "meta-r", "delete_line");
|
||||
|
||||
/* keys binded with commands */
|
||||
gui_key_bind ( /* m-left */ "meta-meta2-D", "/buffer -1");
|
||||
gui_key_bind ( /* F5 */ "meta2-15~", "/buffer -1");
|
||||
gui_key_bind ( /* m-right */ "meta-meta2-C", "/buffer +1");
|
||||
gui_key_bind ( /* F6 */ "meta2-17~", "/buffer +1");
|
||||
gui_key_bind ( /* F7 */ "meta2-18~", "/window -1");
|
||||
gui_key_bind ( /* F8 */ "meta2-19~", "/window +1");
|
||||
gui_key_bind ( /* m-0 */ "meta-0", "/buffer 10");
|
||||
gui_key_bind ( /* m-1 */ "meta-1", "/buffer 1");
|
||||
gui_key_bind ( /* m-2 */ "meta-2", "/buffer 2");
|
||||
gui_key_bind ( /* m-3 */ "meta-3", "/buffer 3");
|
||||
gui_key_bind ( /* m-4 */ "meta-4", "/buffer 4");
|
||||
gui_key_bind ( /* m-5 */ "meta-5", "/buffer 5");
|
||||
gui_key_bind ( /* m-6 */ "meta-6", "/buffer 6");
|
||||
gui_key_bind ( /* m-7 */ "meta-7", "/buffer 7");
|
||||
gui_key_bind ( /* m-8 */ "meta-8", "/buffer 8");
|
||||
gui_key_bind ( /* m-9 */ "meta-9", "/buffer 9");
|
||||
|
||||
/* bind meta-j + {01..99} to switch to buffers # > 10 */
|
||||
for (i = 1; i < 100; i++)
|
||||
{
|
||||
sprintf (key_str, "meta-j%02d", i);
|
||||
sprintf (command, "/buffer %d", i);
|
||||
gui_key_bind (key_str, command);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_input_grab_end: insert grabbed key in input buffer
|
||||
*/
|
||||
|
||||
void
|
||||
gui_input_grab_end ()
|
||||
{
|
||||
char *expanded_key;
|
||||
|
||||
/* get expanded name (for example: ^U => ctrl-u) */
|
||||
expanded_key = gui_key_get_expanded_name (gui_key_buffer);
|
||||
|
||||
if (expanded_key)
|
||||
{
|
||||
if (gui_current_window->buffer->has_input)
|
||||
{
|
||||
gui_input_insert_string (gui_current_window, expanded_key, -1);
|
||||
gui_current_window->buffer->input_buffer_pos += strlen (expanded_key);
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 1);
|
||||
}
|
||||
free (expanded_key);
|
||||
}
|
||||
|
||||
/* end grab mode */
|
||||
gui_key_grab = 0;
|
||||
gui_key_grab_count = 0;
|
||||
gui_key_buffer[0] = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_input_read: read keyboard chars
|
||||
*/
|
||||
|
||||
void
|
||||
gui_input_read ()
|
||||
{
|
||||
int key, i;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_dcc *ptr_dcc, *ptr_dcc_next;
|
||||
char new_char[3], *decoded_string;
|
||||
t_irc_dcc *dcc_selected;
|
||||
|
||||
key = getch ();
|
||||
if (key != ERR)
|
||||
char key_str[32];
|
||||
|
||||
i = 0;
|
||||
/* do not loop too much here (for example when big paste was made),
|
||||
to read also socket & co */
|
||||
while (i < 8)
|
||||
{
|
||||
switch (key)
|
||||
if (gui_key_grab && (gui_key_grab_count > 10))
|
||||
gui_input_grab_end ();
|
||||
|
||||
key = getch ();
|
||||
|
||||
if (key == ERR)
|
||||
{
|
||||
/* resize event */
|
||||
case KEY_RESIZE:
|
||||
gui_curses_resize_handler ();
|
||||
break;
|
||||
/* inactive function keys */
|
||||
case KEY_F(1):
|
||||
case KEY_F(2):
|
||||
case KEY_F(3):
|
||||
case KEY_F(4):
|
||||
case KEY_F(9):
|
||||
break;
|
||||
/* previous buffer in window */
|
||||
case KEY_F(5):
|
||||
gui_switch_to_previous_buffer (gui_current_window);
|
||||
break;
|
||||
/* next buffer in window */
|
||||
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);
|
||||
break;
|
||||
/* 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:
|
||||
if (gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (dcc_list)
|
||||
{
|
||||
if (gui_current_window->dcc_selected
|
||||
&& ((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_irc_dcc *)(gui_current_window->dcc_first))->prev_dcc;
|
||||
gui_current_window->dcc_selected =
|
||||
((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);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gui_current_window->buffer->ptr_history)
|
||||
{
|
||||
gui_current_window->buffer->ptr_history =
|
||||
gui_current_window->buffer->ptr_history->next_history;
|
||||
if (!gui_current_window->buffer->ptr_history)
|
||||
gui_current_window->buffer->ptr_history =
|
||||
gui_current_window->buffer->history;
|
||||
}
|
||||
else
|
||||
gui_current_window->buffer->ptr_history =
|
||||
gui_current_window->buffer->history;
|
||||
if (gui_current_window->buffer->ptr_history)
|
||||
{
|
||||
gui_current_window->buffer->input_buffer_size =
|
||||
strlen (gui_current_window->buffer->ptr_history->text);
|
||||
gui_optimize_input_buffer_size (gui_current_window->buffer);
|
||||
gui_current_window->buffer->input_buffer_pos =
|
||||
gui_current_window->buffer->input_buffer_size;
|
||||
strcpy (gui_current_window->buffer->input_buffer,
|
||||
gui_current_window->buffer->ptr_history->text);
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* cursor down */
|
||||
case KEY_DOWN:
|
||||
if (gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (dcc_list)
|
||||
{
|
||||
if (!gui_current_window->dcc_selected
|
||||
|| ((t_irc_dcc *)(gui_current_window->dcc_selected))->next_dcc)
|
||||
{
|
||||
if (gui_current_window->dcc_last_displayed
|
||||
&& (gui_current_window->dcc_selected ==
|
||||
gui_current_window->dcc_last_displayed))
|
||||
{
|
||||
if (gui_current_window->dcc_first)
|
||||
gui_current_window->dcc_first =
|
||||
((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_irc_dcc *)(gui_current_window->dcc_selected))->next_dcc;
|
||||
else
|
||||
gui_current_window->dcc_selected =
|
||||
dcc_list->next_dcc;
|
||||
gui_draw_buffer_chat (gui_current_window->buffer, 1);
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gui_current_window->buffer->ptr_history)
|
||||
{
|
||||
gui_current_window->buffer->ptr_history =
|
||||
gui_current_window->buffer->ptr_history->prev_history;
|
||||
if (gui_current_window->buffer->ptr_history)
|
||||
gui_current_window->buffer->input_buffer_size =
|
||||
strlen (gui_current_window->buffer->ptr_history->text);
|
||||
else
|
||||
gui_current_window->buffer->input_buffer_size = 0;
|
||||
gui_optimize_input_buffer_size (gui_current_window->buffer);
|
||||
gui_current_window->buffer->input_buffer_pos =
|
||||
gui_current_window->buffer->input_buffer_size;
|
||||
if (gui_current_window->buffer->ptr_history)
|
||||
strcpy (gui_current_window->buffer->input_buffer,
|
||||
gui_current_window->buffer->ptr_history->text);
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* cursor left */
|
||||
case KEY_LEFT:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (gui_current_window->buffer->input_buffer_pos > 0)
|
||||
{
|
||||
gui_current_window->buffer->input_buffer_pos--;
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* cursor right */
|
||||
case KEY_RIGHT:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (gui_current_window->buffer->input_buffer_pos <
|
||||
gui_current_window->buffer->input_buffer_size)
|
||||
{
|
||||
gui_current_window->buffer->input_buffer_pos++;
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* home key or Control + A */
|
||||
case KEY_HOME:
|
||||
case 0x01:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (gui_current_window->buffer->input_buffer_pos > 0)
|
||||
{
|
||||
gui_current_window->buffer->input_buffer_pos = 0;
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* end key or Control + E */
|
||||
case KEY_END:
|
||||
case 0x05:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (gui_current_window->buffer->input_buffer_pos <
|
||||
gui_current_window->buffer->input_buffer_size)
|
||||
{
|
||||
gui_current_window->buffer->input_buffer_pos =
|
||||
gui_current_window->buffer->input_buffer_size;
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* page up */
|
||||
case KEY_PPAGE:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_page_up (gui_current_window);
|
||||
break;
|
||||
/* page down */
|
||||
case KEY_NPAGE:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_page_down (gui_current_window);
|
||||
break;
|
||||
/* erase before cursor and move cursor to the left */
|
||||
case 127:
|
||||
case KEY_BACKSPACE:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (gui_current_window->buffer->input_buffer_pos > 0)
|
||||
{
|
||||
i = gui_current_window->buffer->input_buffer_pos-1;
|
||||
while (gui_current_window->buffer->input_buffer[i])
|
||||
{
|
||||
gui_current_window->buffer->input_buffer[i] =
|
||||
gui_current_window->buffer->input_buffer[i+1];
|
||||
i++;
|
||||
}
|
||||
gui_current_window->buffer->input_buffer_size--;
|
||||
gui_current_window->buffer->input_buffer_pos--;
|
||||
gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_size] = '\0';
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
gui_optimize_input_buffer_size (gui_current_window->buffer);
|
||||
gui_current_window->buffer->completion.position = -1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* Control + Backspace or Control + W */
|
||||
case 0x08:
|
||||
case 0x17:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_delete_previous_word (gui_current_window->buffer);
|
||||
break;
|
||||
/* Control + L */
|
||||
case 0x0C:
|
||||
gui_curses_resize_handler ();
|
||||
break;
|
||||
/* erase char under cursor */
|
||||
case KEY_DC:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (gui_current_window->buffer->input_buffer_pos <
|
||||
gui_current_window->buffer->input_buffer_size)
|
||||
{
|
||||
i = gui_current_window->buffer->input_buffer_pos;
|
||||
while (gui_current_window->buffer->input_buffer[i])
|
||||
{
|
||||
gui_current_window->buffer->input_buffer[i] =
|
||||
gui_current_window->buffer->input_buffer[i+1];
|
||||
i++;
|
||||
}
|
||||
gui_current_window->buffer->input_buffer_size--;
|
||||
gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_size] = '\0';
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
gui_optimize_input_buffer_size (gui_current_window->buffer);
|
||||
gui_current_window->buffer->completion.position = -1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* Tab : completion */
|
||||
case '\t':
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
completion_search (&(gui_current_window->buffer->completion),
|
||||
CHANNEL(gui_current_window->buffer),
|
||||
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 */
|
||||
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--)
|
||||
gui_current_window->buffer->input_buffer[i] =
|
||||
gui_current_window->buffer->input_buffer[i -
|
||||
gui_current_window->buffer->completion.diff_size];
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = gui_current_window->buffer->completion.position_replace +
|
||||
strlen (gui_current_window->buffer->completion.word_found);
|
||||
i < gui_current_window->buffer->input_buffer_size; i++)
|
||||
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,
|
||||
gui_current_window->buffer->completion.word_found,
|
||||
strlen (gui_current_window->buffer->completion.word_found));
|
||||
gui_current_window->buffer->input_buffer_pos =
|
||||
gui_current_window->buffer->completion.position_replace +
|
||||
strlen (gui_current_window->buffer->completion.word_found);
|
||||
|
||||
/* 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.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);
|
||||
if (gui_current_window->buffer->completion.position >= 0)
|
||||
gui_current_window->buffer->completion.position++;
|
||||
gui_current_window->buffer->input_buffer_pos++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 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);
|
||||
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);
|
||||
if (gui_current_window->buffer->completion.position >= 0)
|
||||
gui_current_window->buffer->completion.position++;
|
||||
gui_current_window->buffer->input_buffer_pos++;
|
||||
}
|
||||
}
|
||||
gui_draw_buffer_input (gui_current_window->buffer, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* escape code (for control-key) */
|
||||
case KEY_ESCAPE:
|
||||
if ((key = getch()) != ERR)
|
||||
{
|
||||
/*gui_printf (gui_current_window->buffer,
|
||||
"[Debug] key pressed = %d, hex = %02X, octal = %o\n", key, key, key);*/
|
||||
switch (key)
|
||||
{
|
||||
/* Alt + left arrow */
|
||||
case KEY_LEFT:
|
||||
gui_switch_to_previous_buffer (gui_current_window);
|
||||
break;
|
||||
/* Alt + right arrow */
|
||||
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 = getch()) != ERR)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* Alt-number: jump to window by number */
|
||||
case 48: /* Alt-0 */
|
||||
case 49: /* Alt-1 */
|
||||
case 50: /* Alt-2 */
|
||||
case 51: /* Alt-3 */
|
||||
case 52: /* Alt-4 */
|
||||
case 53: /* Alt-5 */
|
||||
case 54: /* Alt-6 */
|
||||
case 55: /* Alt-7 */
|
||||
case 56: /* Alt-8 */
|
||||
case 57: /* Alt-9 */
|
||||
gui_switch_to_buffer_by_number (gui_current_window, (key == 48) ? 10 : key - 48);
|
||||
break;
|
||||
/* Alt-A: jump to buffer with activity */
|
||||
case 'a':
|
||||
case 'A':
|
||||
if (hotlist)
|
||||
{
|
||||
if (!hotlist_initial_buffer)
|
||||
hotlist_initial_buffer = gui_current_window->buffer;
|
||||
gui_switch_to_buffer (gui_current_window, hotlist->buffer);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hotlist_initial_buffer)
|
||||
{
|
||||
gui_switch_to_buffer (gui_current_window, hotlist_initial_buffer);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
hotlist_initial_buffer = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* Alt-D: jump to DCC buffer */
|
||||
case 'd':
|
||||
case 'D':
|
||||
if (gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (buffer_before_dcc)
|
||||
{
|
||||
gui_switch_to_buffer (gui_current_window,
|
||||
buffer_before_dcc);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer_before_dcc = gui_current_window->buffer;
|
||||
gui_switch_to_dcc_buffer ();
|
||||
}
|
||||
break;
|
||||
/* Alt-R: clear hotlist */
|
||||
case 'r':
|
||||
case 'R':
|
||||
if (hotlist)
|
||||
{
|
||||
hotlist_free_all ();
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
hotlist_initial_buffer = gui_current_window->buffer;
|
||||
break;
|
||||
/* Alt-S: jump to server buffer */
|
||||
case 's':
|
||||
case 'S':
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
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':
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* send command/message */
|
||||
case '\n':
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
{
|
||||
if (gui_current_window->buffer->input_buffer_size > 0)
|
||||
{
|
||||
gui_current_window->buffer->input_buffer[gui_current_window->buffer->input_buffer_size] = '\0';
|
||||
history_add (gui_current_window->buffer, gui_current_window->buffer->input_buffer);
|
||||
gui_current_window->buffer->input_buffer_size = 0;
|
||||
gui_current_window->buffer->input_buffer_pos = 0;
|
||||
gui_current_window->buffer->input_buffer_1st_display = 0;
|
||||
gui_current_window->buffer->completion.position = -1;
|
||||
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)
|
||||
{
|
||||
ptr_buffer->input_buffer[0] = '\0';
|
||||
gui_draw_buffer_input (ptr_buffer, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* other key => add to input buffer */
|
||||
default:
|
||||
if (gui_current_window->buffer->dcc)
|
||||
{
|
||||
dcc_selected = (gui_current_window->dcc_selected) ?
|
||||
(t_irc_dcc *) gui_current_window->dcc_selected : dcc_list;
|
||||
switch (key)
|
||||
{
|
||||
/* accept DCC */
|
||||
case 'a':
|
||||
case 'A':
|
||||
if (dcc_selected
|
||||
&& (DCC_IS_RECV(dcc_selected->status))
|
||||
&& (dcc_selected->status == DCC_WAITING))
|
||||
{
|
||||
dcc_accept (dcc_selected);
|
||||
}
|
||||
break;
|
||||
/* cancel DCC */
|
||||
case 'c':
|
||||
case 'C':
|
||||
if (dcc_selected
|
||||
&& (!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':
|
||||
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_ENDED(dcc_selected->status)))
|
||||
{
|
||||
if (dcc_selected->next_dcc)
|
||||
gui_current_window->dcc_selected = dcc_selected->next_dcc;
|
||||
else
|
||||
gui_current_window->dcc_selected = NULL;
|
||||
dcc_free (dcc_selected);
|
||||
gui_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*gui_printf (gui_current_window->buffer,
|
||||
"[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,
|
||||
(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;
|
||||
if (gui_key_grab && (gui_key_grab_count > 0))
|
||||
gui_input_grab_end ();
|
||||
break;
|
||||
}
|
||||
|
||||
if (key == KEY_RESIZE)
|
||||
{
|
||||
gui_curses_resize_handler ();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (key < 32)
|
||||
{
|
||||
key_str[0] = '^';
|
||||
key_str[1] = (char) key + '@';
|
||||
key_str[2] = '\0';
|
||||
}
|
||||
else if (key == 127)
|
||||
{
|
||||
key_str[0] = '^';
|
||||
key_str[1] = '?';
|
||||
key_str[2] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (key > 0xff)
|
||||
{
|
||||
key_str[0] = (char) (key >> 8);
|
||||
key_str[1] = (char) (key & 0xff);
|
||||
key_str[2] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
key_str[0] = (char) key;
|
||||
key_str[1] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp (key_str, "^") == 0)
|
||||
{
|
||||
key_str[1] = '^';
|
||||
key_str[2] = '\0';
|
||||
}
|
||||
|
||||
/*gui_printf (gui_current_window->buffer, "gui_input_read: key = %s (%d)\n", key_str, key);*/
|
||||
|
||||
if (gui_key_pressed (key_str) != 0)
|
||||
gui_input_insert_char (gui_current_window, key);
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -723,6 +267,14 @@ gui_main_loop ()
|
||||
{
|
||||
old_sec = local_time->tm_sec;
|
||||
|
||||
if (cfg_look_infobar_seconds)
|
||||
{
|
||||
gui_draw_buffer_infobar_time (gui_current_window->buffer);
|
||||
wmove (gui_current_window->win_input,
|
||||
0, gui_current_window->win_input_x);
|
||||
wrefresh (gui_current_window->win_input);
|
||||
}
|
||||
|
||||
/* infobar count down */
|
||||
if (gui_infobar && gui_infobar->remaining_time > 0)
|
||||
{
|
||||
@@ -807,7 +359,7 @@ gui_main_loop ()
|
||||
{
|
||||
if (FD_ISSET (STDIN_FILENO, &read_fd))
|
||||
{
|
||||
gui_read_keyb ();
|
||||
gui_input_read ();
|
||||
}
|
||||
if ((weechat_fifo != -1) && (FD_ISSET (weechat_fifo, &read_fd)))
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ gui_assign_color (int *color, char *color_name)
|
||||
i = 0;
|
||||
while (gui_colors[i].name)
|
||||
{
|
||||
if (strcasecmp (gui_colors[i].name, color_name) == 0)
|
||||
if (ascii_strcasecmp (gui_colors[i].name, color_name) == 0)
|
||||
{
|
||||
*color = gui_colors[i].color;
|
||||
return 1;
|
||||
@@ -114,7 +114,7 @@ gui_get_color_by_name (char *color_name)
|
||||
i = 0;
|
||||
while (gui_colors[i].name)
|
||||
{
|
||||
if (strcasecmp (gui_colors[i].name, color_name) == 0)
|
||||
if (ascii_strcasecmp (gui_colors[i].name, color_name) == 0)
|
||||
return gui_colors[i].color;
|
||||
i++;
|
||||
}
|
||||
|
||||
+1129
-107
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,563 @@
|
||||
/*
|
||||
* 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-keyboard: keyboard functions (GUI independant) */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "../common/weechat.h"
|
||||
#include "gui.h"
|
||||
#include "../common/command.h"
|
||||
|
||||
|
||||
t_gui_key *gui_keys = NULL;
|
||||
t_gui_key *last_gui_key = NULL;
|
||||
|
||||
char gui_key_buffer[128];
|
||||
int gui_key_grab = 0;
|
||||
int gui_key_grab_count = 0;
|
||||
|
||||
t_gui_key_function gui_key_functions[] =
|
||||
{ { "return", gui_input_return,
|
||||
N_("terminate line") },
|
||||
{ "tab", gui_input_tab,
|
||||
N_("complete word") },
|
||||
{ "backspace", gui_input_backspace,
|
||||
N_("delete previous char") },
|
||||
{ "delete", gui_input_delete,
|
||||
N_("delete next char") },
|
||||
{ "delete_end_line", gui_input_delete_end_of_line,
|
||||
N_("delete until end of line") },
|
||||
{ "delete_beginning_line", gui_input_delete_begin_of_line,
|
||||
N_("delete until beginning of line") },
|
||||
{ "delete_line", gui_input_delete_line,
|
||||
N_("delete entire line") },
|
||||
{ "delete_previous_word", gui_input_delete_previous_word,
|
||||
N_("delete previous word") },
|
||||
{ "delete_next_word", gui_input_delete_next_word,
|
||||
N_("delete next word") },
|
||||
{ "clipboard_paste", gui_input_clipboard_paste,
|
||||
N_("paste current clipboard content") },
|
||||
{ "transpose_chars", gui_input_transpose_chars,
|
||||
N_("transpose chars") },
|
||||
{ "home", gui_input_home,
|
||||
N_("go to beginning of line") },
|
||||
{ "end", gui_input_end,
|
||||
N_("go to end of line") },
|
||||
{ "left", gui_input_left,
|
||||
N_("move one char left") },
|
||||
{ "previous_word", gui_input_previous_word,
|
||||
N_("move to previous word") },
|
||||
{ "right", gui_input_right,
|
||||
N_("move one char right") },
|
||||
{ "next_word", gui_input_next_word,
|
||||
N_("move to next word") },
|
||||
{ "up", gui_input_up,
|
||||
N_("call previous command in history") },
|
||||
{ "up_global", gui_input_up_global,
|
||||
N_("call previous command in global history") },
|
||||
{ "down", gui_input_down,
|
||||
N_("call next command in history") },
|
||||
{ "down_global", gui_input_down_global,
|
||||
N_("call next command in global history") },
|
||||
{ "page_up", gui_input_page_up,
|
||||
N_("scroll one page up") },
|
||||
{ "page_down", gui_input_page_down,
|
||||
N_("scroll one page down") },
|
||||
{ "infobar_clear", gui_input_infobar_clear,
|
||||
N_("clear infobar") },
|
||||
{ "nick_page_up", gui_input_nick_page_up,
|
||||
N_("scroll nicklist one page up") },
|
||||
{ "nick_page_down", gui_input_nick_page_down,
|
||||
N_("scroll nicklist one page down") },
|
||||
{ "nick_beginning", gui_input_nick_beginning,
|
||||
N_("display beginning of nicklist") },
|
||||
{ "nick_end", gui_input_nick_end,
|
||||
N_("display end of nicklist") },
|
||||
{ "refresh", gui_curses_resize_handler,
|
||||
N_("refresh screen") },
|
||||
{ "jump_smart", gui_input_jump_smart,
|
||||
N_("jump to buffer with activity") },
|
||||
{ "jump_dcc", gui_input_jump_dcc,
|
||||
N_("jump to DCC buffer") },
|
||||
{ "jump_last_buffer", gui_input_jump_last_buffer,
|
||||
N_("jump to last buffer") },
|
||||
{ "jump_server", gui_input_jump_server,
|
||||
N_("jump to server buffer") },
|
||||
{ "jump_next_server", gui_input_jump_next_server,
|
||||
N_("jump to next server") },
|
||||
{ "hotlist_clear", gui_input_hotlist_clear,
|
||||
N_("clear hotlist") },
|
||||
{ "grab_key", gui_input_grab_key,
|
||||
N_("grab a key") },
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* gui_key_init: init keyboard (create default key bindings)
|
||||
*/
|
||||
|
||||
void
|
||||
gui_key_init ()
|
||||
{
|
||||
gui_key_buffer[0] = '\0';
|
||||
gui_key_grab = 0;
|
||||
gui_key_grab_count = 0;
|
||||
|
||||
gui_input_default_key_bindings ();
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_init_show: init "show mode"
|
||||
*/
|
||||
|
||||
void
|
||||
gui_key_init_grab ()
|
||||
{
|
||||
gui_key_grab = 1;
|
||||
gui_key_grab_count = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_get_internal_code: get internal code from user key name
|
||||
* for example: return "^R" for "ctrl-R"
|
||||
*/
|
||||
|
||||
char *
|
||||
gui_key_get_internal_code (char *key)
|
||||
{
|
||||
char *result;
|
||||
|
||||
if ((result = (char *) malloc (strlen (key) + 1)))
|
||||
{
|
||||
result[0] = '\0';
|
||||
while (key[0])
|
||||
{
|
||||
if (ascii_strncasecmp (key, "meta2-", 6) == 0)
|
||||
{
|
||||
strcat (result, "^[[");
|
||||
key += 6;
|
||||
}
|
||||
if (ascii_strncasecmp (key, "meta-", 5) == 0)
|
||||
{
|
||||
strcat (result, "^[");
|
||||
key += 5;
|
||||
}
|
||||
else if (ascii_strncasecmp (key, "ctrl-", 5) == 0)
|
||||
{
|
||||
strcat (result, "^");
|
||||
key += 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
strncat (result, key, 1);
|
||||
key++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_get_expanded_name: get expanded name from internal key code
|
||||
* for example: return "ctrl-R" for "^R"
|
||||
*/
|
||||
|
||||
char *
|
||||
gui_key_get_expanded_name (char *key)
|
||||
{
|
||||
char *result;
|
||||
|
||||
if ((result = (char *) malloc ((strlen (key) * 5) + 1)))
|
||||
{
|
||||
result[0] = '\0';
|
||||
while (key[0])
|
||||
{
|
||||
if (ascii_strncasecmp (key, "^[[", 3) == 0)
|
||||
{
|
||||
strcat (result, "meta2-");
|
||||
key += 3;
|
||||
}
|
||||
if (ascii_strncasecmp (key, "^[", 2) == 0)
|
||||
{
|
||||
strcat (result, "meta-");
|
||||
key += 2;
|
||||
}
|
||||
else if ((key[0] == '^') && (key[1]))
|
||||
{
|
||||
strcat (result, "ctrl-");
|
||||
key++;
|
||||
}
|
||||
else
|
||||
{
|
||||
strncat (result, key, 1);
|
||||
key++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_find_pos: find position for a key (for sorting keys list)
|
||||
*/
|
||||
|
||||
t_gui_key *
|
||||
gui_key_find_pos (t_gui_key *key)
|
||||
{
|
||||
t_gui_key *ptr_key;
|
||||
|
||||
for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
|
||||
{
|
||||
if (ascii_strcasecmp (key->key, ptr_key->key) < 0)
|
||||
return ptr_key;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_insert_sorted: insert key into sorted list
|
||||
*/
|
||||
|
||||
void
|
||||
gui_key_insert_sorted (t_gui_key *key)
|
||||
{
|
||||
t_gui_key *pos_key;
|
||||
|
||||
if (gui_keys)
|
||||
{
|
||||
pos_key = gui_key_find_pos (key);
|
||||
|
||||
if (pos_key)
|
||||
{
|
||||
/* insert key into the list (before key found) */
|
||||
key->prev_key = pos_key->prev_key;
|
||||
key->next_key = pos_key;
|
||||
if (pos_key->prev_key)
|
||||
pos_key->prev_key->next_key = key;
|
||||
else
|
||||
gui_keys = key;
|
||||
pos_key->prev_key = key;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* add key to the end */
|
||||
key->prev_key = last_gui_key;
|
||||
key->next_key = NULL;
|
||||
last_gui_key->next_key = key;
|
||||
last_gui_key = key;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
key->prev_key = NULL;
|
||||
key->next_key = NULL;
|
||||
gui_keys = key;
|
||||
last_gui_key = key;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_new: add a new key in keys list
|
||||
*/
|
||||
|
||||
t_gui_key *
|
||||
gui_key_new (char *key, char *command, void *function)
|
||||
{
|
||||
t_gui_key *new_key;
|
||||
char *internal_code;
|
||||
|
||||
if ((new_key = (t_gui_key *) malloc (sizeof (t_gui_key))))
|
||||
{
|
||||
internal_code = gui_key_get_internal_code (key);
|
||||
new_key->key = (internal_code) ? strdup (internal_code) : strdup (key);
|
||||
if (internal_code)
|
||||
free (internal_code);
|
||||
new_key->command = (command) ? strdup (command) : NULL;
|
||||
new_key->function = function;
|
||||
gui_key_insert_sorted (new_key);
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
|
||||
return new_key;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_search: search a key
|
||||
*/
|
||||
|
||||
t_gui_key *
|
||||
gui_key_search (char *key)
|
||||
{
|
||||
t_gui_key *ptr_key;
|
||||
|
||||
for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
|
||||
{
|
||||
if (ascii_strcasecmp (ptr_key->key, key) == 0)
|
||||
return ptr_key;
|
||||
}
|
||||
|
||||
/* key not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_cmp: compares 2 keys
|
||||
*/
|
||||
|
||||
int
|
||||
gui_key_cmp (char *key, char *search)
|
||||
{
|
||||
while (search[0])
|
||||
{
|
||||
if (toupper(key[0]) != toupper(search[0]))
|
||||
return search[0] - key[0];
|
||||
key++;
|
||||
search++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_search_part: search a key (maybe part of string)
|
||||
*/
|
||||
|
||||
t_gui_key *
|
||||
gui_key_search_part (char *key)
|
||||
{
|
||||
t_gui_key *ptr_key;
|
||||
|
||||
for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
|
||||
{
|
||||
if (gui_key_cmp (ptr_key->key, key) == 0)
|
||||
return ptr_key;
|
||||
}
|
||||
|
||||
/* key not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_function_search_by_name: search a function by name
|
||||
*/
|
||||
|
||||
void *
|
||||
gui_key_function_search_by_name (char *name)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (gui_key_functions[i].function_name)
|
||||
{
|
||||
if (ascii_strcasecmp (gui_key_functions[i].function_name, name) == 0)
|
||||
return gui_key_functions[i].function;
|
||||
i++;
|
||||
}
|
||||
|
||||
/* function not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_function_search_by_ptr: search a function by pointer
|
||||
*/
|
||||
|
||||
char *
|
||||
gui_key_function_search_by_ptr (void *function)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (gui_key_functions[i].function_name)
|
||||
{
|
||||
if (gui_key_functions[i].function == function)
|
||||
return gui_key_functions[i].function_name;
|
||||
i++;
|
||||
}
|
||||
|
||||
/* function not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_bind: bind a key to a function (command or special function)
|
||||
*/
|
||||
|
||||
t_gui_key *
|
||||
gui_key_bind (char *key, char *command)
|
||||
{
|
||||
t_gui_key_function *ptr_function;
|
||||
t_gui_key *new_key;
|
||||
|
||||
if (!key || !command)
|
||||
{
|
||||
wee_log_printf (_("%s unable to bind key \"%s\"\n"),
|
||||
WEECHAT_ERROR, key);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr_function = NULL;
|
||||
if (command[0] != '/')
|
||||
{
|
||||
ptr_function = gui_key_function_search_by_name (command);
|
||||
if (!ptr_function)
|
||||
{
|
||||
wee_log_printf (_("%s unable to bind key \"%s\" (invalid function name: \"%s\")\n"),
|
||||
WEECHAT_ERROR, key, command);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
gui_key_unbind (key);
|
||||
|
||||
new_key = gui_key_new (key,
|
||||
(ptr_function) ? NULL : command,
|
||||
ptr_function);
|
||||
if (!new_key)
|
||||
{
|
||||
wee_log_printf (_("%s not enough memory for key binding\n"),
|
||||
WEECHAT_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return new_key;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_unbind: remove a key binding
|
||||
*/
|
||||
|
||||
int
|
||||
gui_key_unbind (char *key)
|
||||
{
|
||||
t_gui_key *ptr_key;
|
||||
char *internal_code;
|
||||
|
||||
internal_code = gui_key_get_internal_code (key);
|
||||
|
||||
ptr_key = gui_key_search ((internal_code) ? internal_code : key);
|
||||
if (ptr_key)
|
||||
gui_key_free (ptr_key);
|
||||
|
||||
if (internal_code)
|
||||
free (internal_code);
|
||||
|
||||
return (ptr_key != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_pressed: treat new key pressed
|
||||
* return: 1 if key should be added to input buffer
|
||||
* 0 otherwise
|
||||
*/
|
||||
|
||||
int
|
||||
gui_key_pressed (char *key_str)
|
||||
{
|
||||
int first_key;
|
||||
t_gui_key *ptr_key;
|
||||
|
||||
/* add key to buffer */
|
||||
first_key = (gui_key_buffer[0] == '\0');
|
||||
strcat (gui_key_buffer, key_str);
|
||||
|
||||
/* if we are in "show mode", increase counter and return */
|
||||
if (gui_key_grab)
|
||||
{
|
||||
gui_key_grab_count++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* look for key combo in key table */
|
||||
ptr_key = gui_key_search_part (gui_key_buffer);
|
||||
if (ptr_key)
|
||||
{
|
||||
if (ascii_strcasecmp (ptr_key->key, gui_key_buffer) == 0)
|
||||
{
|
||||
/* exact combo found => execute function or command */
|
||||
gui_key_buffer[0] = '\0';
|
||||
if (ptr_key->command)
|
||||
user_command (SERVER(gui_current_window->buffer),
|
||||
gui_current_window->buffer,
|
||||
ptr_key->command);
|
||||
else
|
||||
(void)(ptr_key->function)(gui_current_window);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
gui_key_buffer[0] = '\0';
|
||||
|
||||
/* if this is first key and not found (even partial) => return 1
|
||||
else return 0 (= silently discard sequence of bad keys) */
|
||||
return first_key;
|
||||
}
|
||||
|
||||
/*
|
||||
* key_free: delete a key binding
|
||||
*/
|
||||
|
||||
void
|
||||
gui_key_free (t_gui_key *key)
|
||||
{
|
||||
/* free memory */
|
||||
if (key->key)
|
||||
free (key->key);
|
||||
if (key->command)
|
||||
free (key->command);
|
||||
|
||||
/* remove key from keys list */
|
||||
if (key->prev_key)
|
||||
key->prev_key->next_key = key->next_key;
|
||||
if (key->next_key)
|
||||
key->next_key->prev_key = key->prev_key;
|
||||
if (gui_keys == key)
|
||||
gui_keys = key->next_key;
|
||||
if (last_gui_key == key)
|
||||
last_gui_key = key->prev_key;
|
||||
|
||||
free (key);
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_key_free_all: delete all key bindings
|
||||
*/
|
||||
|
||||
void
|
||||
gui_key_free_all ()
|
||||
{
|
||||
while (gui_keys)
|
||||
gui_key_free (gui_keys);
|
||||
}
|
||||
+143
-57
@@ -26,50 +26,54 @@
|
||||
|
||||
#define INPUT_BUFFER_BLOCK_SIZE 256
|
||||
|
||||
#define NUM_COLORS 50
|
||||
#define NUM_COLORS 54
|
||||
#define COLOR_WIN_TITLE 1
|
||||
#define COLOR_WIN_CHAT 2
|
||||
#define COLOR_WIN_CHAT_TIME 3
|
||||
#define COLOR_WIN_CHAT_TIME_SEP 4
|
||||
#define COLOR_WIN_CHAT_PREFIX1 5
|
||||
#define COLOR_WIN_CHAT_PREFIX2 6
|
||||
#define COLOR_WIN_CHAT_NICK 7
|
||||
#define COLOR_WIN_CHAT_HOST 8
|
||||
#define COLOR_WIN_CHAT_CHANNEL 9
|
||||
#define COLOR_WIN_CHAT_DARK 10
|
||||
#define COLOR_WIN_CHAT_HIGHLIGHT 11
|
||||
#define COLOR_WIN_STATUS 12
|
||||
#define COLOR_WIN_STATUS_DELIMITERS 13
|
||||
#define COLOR_WIN_STATUS_DATA_MSG 14
|
||||
#define COLOR_WIN_STATUS_DATA_HIGHLIGHT 15
|
||||
#define COLOR_WIN_STATUS_DATA_OTHER 16
|
||||
#define COLOR_WIN_STATUS_MORE 17
|
||||
#define COLOR_WIN_INFOBAR 18
|
||||
#define COLOR_WIN_INFOBAR_HIGHLIGHT 19
|
||||
#define COLOR_WIN_INPUT 20
|
||||
#define COLOR_WIN_INPUT_CHANNEL 21
|
||||
#define COLOR_WIN_INPUT_NICK 22
|
||||
#define COLOR_WIN_NICK 23
|
||||
#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_CHAT_JOIN 7
|
||||
#define COLOR_WIN_CHAT_PART 8
|
||||
#define COLOR_WIN_CHAT_NICK 9
|
||||
#define COLOR_WIN_CHAT_HOST 10
|
||||
#define COLOR_WIN_CHAT_CHANNEL 11
|
||||
#define COLOR_WIN_CHAT_DARK 12
|
||||
#define COLOR_WIN_CHAT_HIGHLIGHT 13
|
||||
#define COLOR_WIN_STATUS 14
|
||||
#define COLOR_WIN_STATUS_DELIMITERS 15
|
||||
#define COLOR_WIN_STATUS_DATA_MSG 16
|
||||
#define COLOR_WIN_STATUS_DATA_PRIVATE 17
|
||||
#define COLOR_WIN_STATUS_DATA_HIGHLIGHT 18
|
||||
#define COLOR_WIN_STATUS_DATA_OTHER 19
|
||||
#define COLOR_WIN_STATUS_MORE 20
|
||||
#define COLOR_WIN_INFOBAR 21
|
||||
#define COLOR_WIN_INFOBAR_DELIMITERS 22
|
||||
#define COLOR_WIN_INFOBAR_HIGHLIGHT 23
|
||||
#define COLOR_WIN_INPUT 24
|
||||
#define COLOR_WIN_INPUT_CHANNEL 25
|
||||
#define COLOR_WIN_INPUT_NICK 26
|
||||
#define COLOR_WIN_NICK 27
|
||||
#define COLOR_WIN_NICK_AWAY 28
|
||||
#define COLOR_WIN_NICK_CHANOWNER 29
|
||||
#define COLOR_WIN_NICK_CHANADMIN 30
|
||||
#define COLOR_WIN_NICK_OP 31
|
||||
#define COLOR_WIN_NICK_HALFOP 32
|
||||
#define COLOR_WIN_NICK_VOICE 33
|
||||
#define COLOR_WIN_NICK_MORE 34
|
||||
#define COLOR_WIN_NICK_SEP 35
|
||||
#define COLOR_WIN_NICK_SELF 36
|
||||
#define COLOR_WIN_NICK_PRIVATE 37
|
||||
#define COLOR_WIN_NICK_FIRST 38
|
||||
#define COLOR_WIN_NICK_LAST 47
|
||||
#define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1)
|
||||
#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 COLOR_DCC_SELECTED 48
|
||||
#define COLOR_DCC_WAITING 49
|
||||
#define COLOR_DCC_CONNECTING 50
|
||||
#define COLOR_DCC_ACTIVE 51
|
||||
#define COLOR_DCC_DONE 52
|
||||
#define COLOR_DCC_FAILED 53
|
||||
#define COLOR_DCC_ABORTED 54
|
||||
|
||||
#define SERVER(buffer) ((t_irc_server *)(buffer->server))
|
||||
#define CHANNEL(buffer) ((t_irc_channel *)(buffer->channel))
|
||||
@@ -102,6 +106,9 @@
|
||||
#define NOTIFY_LEVEL_MAX 3
|
||||
#define NOTIFY_LEVEL_DEFAULT NOTIFY_LEVEL_MAX
|
||||
|
||||
#define KEY_SHOW_MODE_DISPLAY 1
|
||||
#define KEY_SHOW_MODE_BIND 2
|
||||
|
||||
typedef struct t_gui_message t_gui_message;
|
||||
|
||||
struct t_gui_message
|
||||
@@ -178,6 +185,7 @@ struct t_gui_buffer
|
||||
FILE *log_file; /* for logging buffer to file */
|
||||
|
||||
/* inupt buffer */
|
||||
int has_input; /* = 1 if buffer has input (DCC has not)*/
|
||||
char *input_buffer; /* input buffer */
|
||||
int input_buffer_alloc; /* input buffer: allocated size in mem */
|
||||
int input_buffer_size; /* buffer size (user input length) */
|
||||
@@ -193,6 +201,9 @@ struct t_gui_buffer
|
||||
t_history *ptr_history; /* current command in history */
|
||||
int num_history; /* number of commands in history */
|
||||
|
||||
/* channel buffer before jumping to next server */
|
||||
t_gui_buffer *old_channel_buffer; /* only used for server buffer */
|
||||
|
||||
/* link to previous/next buffer */
|
||||
t_gui_buffer *prev_buffer; /* link to previous buffer */
|
||||
t_gui_buffer *next_buffer; /* link to next buffer */
|
||||
@@ -219,6 +230,9 @@ struct t_gui_window
|
||||
int win_nick_height; /* height of nick window */
|
||||
int win_nick_start; /* # of 1st nick for display (scroll) */
|
||||
|
||||
/* input window settings */
|
||||
int win_input_x; /* position of cursor in input window */
|
||||
|
||||
/* windows for Curses GUI */
|
||||
void *win_title; /* title window */
|
||||
void *win_chat; /* chat window (example: channel) */
|
||||
@@ -246,12 +260,34 @@ struct t_gui_window
|
||||
t_gui_buffer *buffer; /* buffer currently displayed in window */
|
||||
|
||||
int first_line_displayed; /* = 1 if first line is displayed */
|
||||
int sub_lines; /* if > 0 then do not display until end */
|
||||
t_gui_line *start_line; /* pointer to line if scrolling */
|
||||
int start_line_pos; /* position in first line displayed */
|
||||
|
||||
t_gui_window *prev_window; /* link to previous window */
|
||||
t_gui_window *next_window; /* link to next window */
|
||||
};
|
||||
|
||||
typedef struct t_gui_key t_gui_key;
|
||||
|
||||
struct t_gui_key
|
||||
{
|
||||
char *key; /* key combo (ex: a, ^W, ^W^C, meta-a) */
|
||||
char *command; /* associated command (may be NULL) */
|
||||
void (*function)(t_gui_window *);
|
||||
/* associated function (if cmd is NULL) */
|
||||
t_gui_key *prev_key; /* link to previous key */
|
||||
t_gui_key *next_key; /* link to next key */
|
||||
};
|
||||
|
||||
typedef struct t_gui_key_function t_gui_key_function;
|
||||
|
||||
struct t_gui_key_function
|
||||
{
|
||||
char *function_name; /* name of function */
|
||||
void (*function)(); /* associated function */
|
||||
char *description; /* description of function */
|
||||
};
|
||||
|
||||
/* variables */
|
||||
|
||||
extern int gui_init_ok;
|
||||
@@ -264,8 +300,15 @@ extern t_gui_buffer *gui_buffers;
|
||||
extern t_gui_buffer *last_gui_buffer;
|
||||
extern t_gui_buffer *buffer_before_dcc;
|
||||
extern t_gui_infobar *gui_infobar;
|
||||
extern t_gui_key *gui_keys;
|
||||
extern t_gui_key *last_gui_key;
|
||||
extern t_gui_key_function gui_key_functions[];
|
||||
extern char gui_key_buffer[128];
|
||||
extern int gui_key_grab;
|
||||
extern int gui_key_grab_count;
|
||||
extern char *gui_input_clipboard;
|
||||
|
||||
/* GUI independent functions */
|
||||
/* GUI independent functions: windows & buffers */
|
||||
|
||||
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);
|
||||
@@ -277,17 +320,63 @@ extern void gui_infobar_remove ();
|
||||
extern void gui_buffer_free (t_gui_buffer *, int);
|
||||
extern t_gui_line *gui_new_line (t_gui_buffer *);
|
||||
extern t_gui_message *gui_new_message (t_gui_buffer *);
|
||||
extern void gui_optimize_input_buffer_size (t_gui_buffer *);
|
||||
extern void gui_delete_previous_word (t_gui_buffer *);
|
||||
extern void gui_move_previous_word (t_gui_buffer *);
|
||||
extern void gui_move_next_word (t_gui_buffer *);
|
||||
extern void gui_buffer_insert_string (t_gui_buffer *, char *, int);
|
||||
extern void gui_input_clipboard_copy (char *, int);
|
||||
extern void gui_input_clipboard_paste (t_gui_window *);
|
||||
extern void gui_input_insert_string (t_gui_window *, char *, int);
|
||||
extern void gui_input_insert_char (t_gui_window *, int);
|
||||
extern void gui_input_return (t_gui_window *);
|
||||
extern void gui_input_tab (t_gui_window *);
|
||||
extern void gui_input_backspace (t_gui_window *);
|
||||
extern void gui_input_delete (t_gui_window *);
|
||||
extern void gui_input_delete_previous_word (t_gui_window *);
|
||||
extern void gui_input_delete_next_word (t_gui_window *);
|
||||
extern void gui_input_delete_begin_of_line (t_gui_window *);
|
||||
extern void gui_input_delete_end_of_line (t_gui_window *);
|
||||
extern void gui_input_delete_line (t_gui_window *);
|
||||
extern void gui_input_transpose_chars (t_gui_window *);
|
||||
extern void gui_input_home (t_gui_window *);
|
||||
extern void gui_input_end (t_gui_window *);
|
||||
extern void gui_input_left (t_gui_window *);
|
||||
extern void gui_input_previous_word (t_gui_window *);
|
||||
extern void gui_input_right (t_gui_window *);
|
||||
extern void gui_input_next_word (t_gui_window *);
|
||||
extern void gui_input_up (t_gui_window *);
|
||||
extern void gui_input_up_global (t_gui_window *);
|
||||
extern void gui_input_down (t_gui_window *);
|
||||
extern void gui_input_down_global (t_gui_window *);
|
||||
extern void gui_input_jump_smart (t_gui_window *);
|
||||
extern void gui_input_jump_dcc (t_gui_window *);
|
||||
extern void gui_input_jump_last_buffer (t_gui_window *);
|
||||
extern void gui_input_jump_server (t_gui_window *);
|
||||
extern void gui_input_jump_next_server (t_gui_window *);
|
||||
extern void gui_input_hotlist_clear (t_gui_window *);
|
||||
extern void gui_input_infobar_clear (t_gui_window *);
|
||||
extern void gui_input_grab_key (t_gui_window *);
|
||||
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_switch_to_dcc_buffer (t_gui_window *);
|
||||
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 */
|
||||
/* GUI independent functions: keys */
|
||||
|
||||
extern void gui_key_init ();
|
||||
extern void gui_key_init_grab ();
|
||||
extern char *gui_key_get_internal_code (char *);
|
||||
extern char *gui_key_get_expanded_name (char *);
|
||||
extern void *gui_key_function_search_by_name (char *);
|
||||
extern char *gui_key_function_search_by_ptr (void *);
|
||||
extern t_gui_key *gui_key_bind (char *, char *);
|
||||
extern int gui_key_unbind (char *);
|
||||
extern int gui_key_pressed (char *);
|
||||
extern void gui_key_free (t_gui_key *);
|
||||
extern void gui_key_free_all ();
|
||||
|
||||
/* GUI dependant functions: display */
|
||||
|
||||
extern int gui_assign_color (int *, char *);
|
||||
extern int gui_get_color_by_name (char *);
|
||||
@@ -298,22 +387,18 @@ extern void gui_draw_buffer_title (t_gui_buffer *, int);
|
||||
extern void gui_draw_buffer_chat (t_gui_buffer *, int);
|
||||
extern void gui_draw_buffer_nick (t_gui_buffer *, int);
|
||||
extern void gui_draw_buffer_status (t_gui_buffer *, int);
|
||||
extern void gui_draw_buffer_infobar_time (t_gui_buffer *);
|
||||
extern void gui_draw_buffer_infobar (t_gui_buffer *, int);
|
||||
extern void gui_draw_buffer_input (t_gui_buffer *, int);
|
||||
extern void gui_redraw_buffer (t_gui_buffer *);
|
||||
extern void gui_switch_to_buffer (t_gui_window *, t_gui_buffer *);
|
||||
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 (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 t_gui_buffer *gui_get_dcc_buffer (t_gui_window *);
|
||||
extern void gui_input_page_up (t_gui_window *);
|
||||
extern void gui_input_page_down (t_gui_window *);
|
||||
extern void gui_input_nick_beginning (t_gui_window *);
|
||||
extern void gui_input_nick_end (t_gui_window *);
|
||||
extern void gui_input_nick_page_up (t_gui_window *);
|
||||
extern void gui_input_nick_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 *);
|
||||
@@ -330,6 +415,7 @@ extern void gui_set_window_title ();
|
||||
extern void gui_init ();
|
||||
extern void gui_end ();
|
||||
extern void gui_printf_type_color (/*@null@*/ t_gui_buffer *, int, int, char *, ...);
|
||||
extern void gui_input_default_key_bindings ();
|
||||
extern void gui_main_loop ();
|
||||
|
||||
#endif /* gui.h */
|
||||
|
||||
@@ -27,4 +27,5 @@ lib_weechat_irc_a_SOURCES = irc.h \
|
||||
irc-channel.c \
|
||||
irc-nick.c \
|
||||
irc-dcc.c \
|
||||
irc-ignore.c \
|
||||
irc-display.c
|
||||
|
||||
+17
-11
@@ -90,7 +90,15 @@ void
|
||||
channel_free (t_irc_server *server, t_irc_channel *channel)
|
||||
{
|
||||
t_irc_channel *new_channels;
|
||||
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
/* remove channel from queue */
|
||||
if (server->last_channel == channel)
|
||||
server->last_channel = channel->prev_channel;
|
||||
@@ -104,14 +112,6 @@ 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)
|
||||
@@ -143,11 +143,14 @@ t_irc_channel *
|
||||
channel_search (t_irc_server *server, char *channel_name)
|
||||
{
|
||||
t_irc_channel *ptr_channel;
|
||||
|
||||
|
||||
if (!server || !channel_name)
|
||||
return NULL;
|
||||
|
||||
for (ptr_channel = server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if (strcasecmp (ptr_channel->name, channel_name) == 0)
|
||||
if (ascii_strcasecmp (ptr_channel->name, channel_name) == 0)
|
||||
return ptr_channel;
|
||||
}
|
||||
return NULL;
|
||||
@@ -162,6 +165,9 @@ string_is_channel (char *string)
|
||||
{
|
||||
char first_char[2];
|
||||
|
||||
if (!string)
|
||||
return 0;
|
||||
|
||||
first_char[0] = string[0];
|
||||
first_char[1] = '\0';
|
||||
return (strpbrk (first_char, CHANNEL_PREFIX)) ? 1 : 0;
|
||||
|
||||
+146
-107
@@ -35,6 +35,14 @@ t_irc_command irc_commands[] =
|
||||
N_("[target]"),
|
||||
N_("target: server"),
|
||||
0, 1, 1, NULL, irc_cmd_send_admin, NULL },
|
||||
{ "ame", N_("send a CTCP action to all channels of all connected servers"),
|
||||
N_("message"),
|
||||
N_("message: message to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_ame, NULL },
|
||||
{ "amsg", N_("send message to all channels of all connected servers"),
|
||||
N_("text"),
|
||||
N_("text: text to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_amsg, NULL },
|
||||
{ "away", N_("toggle away status"),
|
||||
N_("[-all] [message]"),
|
||||
N_("-all: toggle away status on all connected servers\n"
|
||||
@@ -42,11 +50,14 @@ t_irc_command irc_commands[] =
|
||||
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"),
|
||||
N_("channel: channel for ban\n"
|
||||
"nickname: 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\""),
|
||||
{ "ctcp", N_("send a CTCP message (Client-To-Client Protocol)"),
|
||||
N_("nickname type [arguments]"),
|
||||
N_("nickname: user to send CTCP to\n"
|
||||
"type: CTCP type (examples: \"version\", \"ping\", ..)\n"
|
||||
"arguments: arguments for CTCP"),
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_ctcp, NULL },
|
||||
{ "dcc", N_("starts DCC (file or chat) or close chat"),
|
||||
N_("action [nickname [file]]"),
|
||||
@@ -55,28 +66,29 @@ t_irc_command irc_commands[] =
|
||||
"file: filename (on local host)"),
|
||||
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 },
|
||||
N_("[nickname [nickname]]"), "",
|
||||
0, MAX_ARGS, 1, irc_cmd_send_dehalfop, NULL, NULL },
|
||||
{ "deop", N_("removes channel operator status from nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, MAX_ARGS, 1, irc_cmd_send_deop, NULL, NULL },
|
||||
N_("[nickname [nickname]]"), "",
|
||||
0, MAX_ARGS, 1, irc_cmd_send_deop, NULL, NULL },
|
||||
{ "devoice", N_("removes voice from nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, MAX_ARGS, 1, irc_cmd_send_devoice, NULL, NULL },
|
||||
N_("[nickname [nickname]]"), "",
|
||||
0, 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 },
|
||||
N_("[nickname [nickname]]"), "",
|
||||
0, MAX_ARGS, 1, irc_cmd_send_halfop, NULL, NULL },
|
||||
{ "info", N_("get information describing the server"),
|
||||
N_("[target]"),
|
||||
N_("target: server name"),
|
||||
0, 1, 1, NULL, irc_cmd_send_info, NULL },
|
||||
{ "invite", N_("invite a nick on a channel"),
|
||||
N_("nickname channel"),
|
||||
N_("nickname: nick to invite\nchannel: channel to invite"),
|
||||
N_("nickname: nick to invite\n"
|
||||
"channel: channel to invite"),
|
||||
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 ...]"),
|
||||
@@ -84,19 +96,25 @@ t_irc_command irc_commands[] =
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_ison, NULL },
|
||||
{ "join", N_("join a channel"),
|
||||
N_("channel[,channel] [key[,key]]"),
|
||||
N_("channel: channel name to join\nkey: key to join the channel"),
|
||||
N_("channel: channel name to join\n"
|
||||
"key: key to join the channel"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_join, irc_cmd_recv_join },
|
||||
{ "kick", N_("forcibly remove a user from a channel"),
|
||||
N_("[channel] nickname [comment]"),
|
||||
N_("channel: channel where user is\nnickname: nickname to kick\ncomment: comment for kick"),
|
||||
N_("channel: channel where user is\n"
|
||||
"nickname: nickname to kick\n"
|
||||
"comment: 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"),
|
||||
N_("channel: channel where user is\n"
|
||||
"nickname: nickname to kick and ban\n"
|
||||
"comment: 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"),
|
||||
N_("nickname: nickname\n"
|
||||
"comment: comment for kill"),
|
||||
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_("[[server] server_mask]"),
|
||||
@@ -112,7 +130,7 @@ t_irc_command irc_commands[] =
|
||||
N_("mask: servers matching the mask only\n"
|
||||
"target: server for forwarding request"),
|
||||
0, 2, 1, NULL, irc_cmd_send_lusers, NULL },
|
||||
{ "me", N_("send a ctcp action to the current channel"),
|
||||
{ "me", N_("send a CTCP action to the current channel"),
|
||||
N_("message"),
|
||||
N_("message: message to send"),
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_me, NULL },
|
||||
@@ -145,8 +163,8 @@ t_irc_command irc_commands[] =
|
||||
0, 1, 1, NULL, irc_cmd_send_motd, NULL },
|
||||
{ "msg", N_("send message to a nick or channel"),
|
||||
N_("receiver[,receiver] text"),
|
||||
N_("receiver: nick or channel (may be mask, '*' = current channel)"
|
||||
"\ntext: text to send"),
|
||||
N_("receiver: nick or channel (may be mask, '*' = current channel)\n"
|
||||
"text: text to send"),
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_msg, NULL },
|
||||
{ "names", N_("list nicknames on channels"),
|
||||
N_("[channel[,channel]]"), N_("channel: channel name"),
|
||||
@@ -167,24 +185,26 @@ t_irc_command irc_commands[] =
|
||||
N_("user/password: used to get privileges on current IRC server"),
|
||||
2, 2, 1, NULL, irc_cmd_send_oper, NULL },
|
||||
{ "part", N_("leave a channel"),
|
||||
N_("[channel[,channel]] [part_message]"), N_("channel: channel name to leave\n"
|
||||
"part_message: part message (displayed to other users)"),
|
||||
N_("[channel[,channel]] [part_message]"),
|
||||
N_("channel: channel name to leave\n"
|
||||
"part_message: part message (displayed to other users)"),
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_part, irc_cmd_recv_part },
|
||||
{ "ping", N_("ping server"),
|
||||
N_("server1 [server2]"),
|
||||
N_("server1: server to ping\nserver2: forward ping to this server"),
|
||||
1, 2, 1, NULL, irc_cmd_send_ping, irc_cmd_recv_ping },
|
||||
{ "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"),
|
||||
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, irc_cmd_recv_pong },
|
||||
{ "privmsg", N_("message received"),
|
||||
"", "",
|
||||
0, 0, 1, NULL, NULL, irc_cmd_recv_privmsg },
|
||||
{ "query", N_("send a private message to a nick"),
|
||||
N_("nickname [text]"),
|
||||
N_("nickname: nickname for private conversation"
|
||||
"\ntext: text to send"),
|
||||
N_("nickname: nickname for private conversation\n"
|
||||
"text: text to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_query, NULL },
|
||||
{ "quit", N_("close all connections & quit"),
|
||||
N_("[quit_message]"),
|
||||
@@ -206,14 +226,17 @@ t_irc_command irc_commands[] =
|
||||
"type: reserved for future usage"),
|
||||
6, 6, 1, NULL, irc_cmd_send_service, NULL },
|
||||
{ "servlist", N_("list services currently connected to the network"),
|
||||
N_("[mask [type]]"), N_("mask: list only services matching this mask\n"
|
||||
"type: list only services of this type"),
|
||||
N_("[mask [type]]"),
|
||||
N_("mask: list only services matching this mask\n"
|
||||
"type: list only services of this type"),
|
||||
0, 2, 1, NULL, irc_cmd_send_servlist, NULL },
|
||||
{ "squery", N_("deliver a message to a service"),
|
||||
N_("service text"), N_("service: name of service\ntext: text to send"),
|
||||
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 comment"), 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]]"),
|
||||
@@ -222,21 +245,24 @@ t_irc_command irc_commands[] =
|
||||
{ "summon", N_("give users who are on a host running an IRC server a message "
|
||||
"asking them to please join IRC"),
|
||||
N_("user [target [channel]]"),
|
||||
N_("user: username\ntarget: server name\nchannel: channel name"),
|
||||
N_("user: username\ntarget: server name\n"
|
||||
"channel: channel name"),
|
||||
1, 3, 1, NULL, irc_cmd_send_summon, NULL },
|
||||
{ "time", N_("query local time from server"),
|
||||
N_("[target]"), N_("target: query time from specified server"),
|
||||
0, 1, 1, NULL, irc_cmd_send_time, NULL },
|
||||
{ "topic", N_("get/set channel topic"),
|
||||
N_("[channel] [topic]"), N_("channel: channel name\ntopic: new topic for channel "
|
||||
"(if topic is \"-delete\" then topic is deleted)"),
|
||||
N_("[channel] [topic]"),
|
||||
N_("channel: channel name\ntopic: new topic for channel "
|
||||
"(if topic is \"-delete\" then topic is deleted)"),
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_topic, irc_cmd_recv_topic },
|
||||
{ "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"),
|
||||
N_("channel: channel for unban\n"
|
||||
"nickname: 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"),
|
||||
@@ -245,104 +271,115 @@ t_irc_command irc_commands[] =
|
||||
N_("[target]"), N_("target: server"),
|
||||
0, 1, 1, NULL, irc_cmd_send_users, NULL },
|
||||
{ "version", N_("gives the version info of nick or server (current or specified)"),
|
||||
N_("[server | nickname]"), N_("server: server name\nnickname: nickname"),
|
||||
N_("[server | nickname]"),
|
||||
N_("server: server name\n"
|
||||
"nickname: nickname"),
|
||||
0, 1, 1, NULL, irc_cmd_send_version, NULL },
|
||||
{ "voice", N_("gives voice to nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, MAX_ARGS, 1, irc_cmd_send_voice, NULL, NULL },
|
||||
N_("[nickname [nickname]]"), "",
|
||||
0, 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_("[mask [\"o\"]]"),
|
||||
N_("mask: only information which match this mask\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"
|
||||
"nickname: nickname (may be a mask)"),
|
||||
N_("[server] nickname[,nickname]"),
|
||||
N_("server: server name\n"
|
||||
"nickname: nickname (may be a mask)"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_whois, NULL },
|
||||
{ "whowas", N_("ask for information about a nickname which no longer exists"),
|
||||
N_("nickname [,nickname [,nickname ...]] [count [target]]"),
|
||||
N_("nickname: nickname to search\ncount: number of replies to return "
|
||||
"(full search if negative number)\n"
|
||||
"target: reply should match this mask"),
|
||||
N_("nickname: nickname to search\n"
|
||||
"count: number of replies to return (full search if negative number)\n"
|
||||
"target: reply should match this mask"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_whowas, NULL },
|
||||
{ "001", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "002", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "003", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "004", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_004 },
|
||||
{ "005", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "212", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "219", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "250", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "251", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "252", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "253", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "254", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "255", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "256", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "257", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "258", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "259", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "260", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "261", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "262", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "263", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "264", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "265", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "266", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "267", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "268", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "269", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "301", N_("away message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_301 },
|
||||
{ "302", N_("userhost"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_302 },
|
||||
{ "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 },
|
||||
{ "001", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "002", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "003", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "004", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_004 },
|
||||
{ "005", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "020", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "042", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "212", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "219", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "221", N_("user mode string"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_221 },
|
||||
{ "250", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "251", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "252", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "253", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "254", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "255", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "256", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "257", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "258", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "259", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "260", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "261", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "262", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "263", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "264", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "265", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "266", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "267", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "268", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "269", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "301", N_("away message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_301 },
|
||||
{ "302", N_("userhost"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_302 },
|
||||
{ "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_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 },
|
||||
{ "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_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 },
|
||||
{ "320", N_("whois (identified user)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_320 },
|
||||
{ "321", N_("/list start"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_321 },
|
||||
{ "322", N_("channel (for /list)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_322 },
|
||||
{ "323", N_("/list end"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_323 },
|
||||
{ "324", N_("channel mode"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_324 },
|
||||
{ "329", "???", "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_329 },
|
||||
{ "331", N_("no topic for channel"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_331 },
|
||||
{ "321", N_("/list start"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_321 },
|
||||
{ "322", N_("channel (for /list)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_322 },
|
||||
{ "323", N_("/list end"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_323 },
|
||||
{ "324", N_("channel mode"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_324 },
|
||||
{ "329", "???", "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_329 },
|
||||
{ "331", N_("no topic for channel"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_331 },
|
||||
{ "332", N_("topic of channel"),
|
||||
N_("channel :topic"),
|
||||
N_("channel: name of channel\ntopic: topic of the channel"),
|
||||
N_("channel: name of channel\n"
|
||||
"topic: topic of the channel"),
|
||||
2, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_332 },
|
||||
{ "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 },
|
||||
{ "344", N_("channel reop"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_344 },
|
||||
{ "345", N_("end of channel reop list"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_345 },
|
||||
{ "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"),
|
||||
N_("channel :[[@|+]nick ...]"),
|
||||
N_("channel: name of channel\nnick: nick on the channel"),
|
||||
N_("channel: name of channel\n"
|
||||
"nick: nick on the channel"),
|
||||
2, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_353 },
|
||||
{ "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 },
|
||||
{ "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 },
|
||||
{ "373", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "374", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "375", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "376", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "391", N_("server local time"), "", "", 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 },
|
||||
{ "373", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "374", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "375", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "376", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "391", N_("server local time"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "401", N_("no such nick/channel"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "402", N_("no such server"),
|
||||
@@ -355,8 +392,6 @@ t_irc_command irc_commands[] =
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "406", N_("was no such nick"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "406", N_("was no such nick"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "407", N_("was no such nick"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "409", N_("no origin"),
|
||||
@@ -435,6 +470,8 @@ 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 },
|
||||
{ "484", N_("your connection is restricted!"),
|
||||
"", "", 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"),
|
||||
@@ -443,6 +480,8 @@ t_irc_command irc_commands[] =
|
||||
"", "", 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 },
|
||||
{ "505", N_("a server message"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_server_msg },
|
||||
{ "671", N_("whois (secure connection)"),
|
||||
"", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_671 },
|
||||
{ NULL, NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
+385
-126
@@ -34,6 +34,8 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include "../common/weechat.h"
|
||||
#include "irc.h"
|
||||
@@ -55,14 +57,144 @@ char *dcc_status_string[] = /* strings for DCC status */
|
||||
void
|
||||
dcc_redraw (int highlight)
|
||||
{
|
||||
gui_redraw_buffer (gui_get_dcc_buffer ());
|
||||
gui_redraw_buffer (gui_get_dcc_buffer (gui_current_window));
|
||||
if (highlight)
|
||||
{
|
||||
hotlist_add (highlight, gui_get_dcc_buffer ());
|
||||
hotlist_add (highlight, gui_get_dcc_buffer (gui_current_window));
|
||||
gui_draw_buffer_status (gui_current_window->buffer, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* dcc_search: search a DCC
|
||||
*/
|
||||
|
||||
t_irc_dcc *
|
||||
dcc_search (t_irc_server *server, int type, int status, int port)
|
||||
{
|
||||
t_irc_dcc *ptr_dcc;
|
||||
|
||||
for (ptr_dcc = dcc_list; ptr_dcc; ptr_dcc = ptr_dcc->next_dcc)
|
||||
{
|
||||
if ((ptr_dcc->server == server)
|
||||
&& (ptr_dcc->type == type)
|
||||
&& (ptr_dcc->status = status)
|
||||
&& (ptr_dcc->port == port))
|
||||
return ptr_dcc;
|
||||
}
|
||||
|
||||
/* DCC not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* dcc_file_is_resumable: check if a file can be used for resuming a download
|
||||
*/
|
||||
|
||||
int
|
||||
dcc_file_is_resumable (t_irc_dcc *ptr_dcc, char *filename)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
if (!cfg_dcc_auto_resume)
|
||||
return 0;
|
||||
|
||||
if (access (filename, W_OK) == 0)
|
||||
{
|
||||
if (stat (filename, &st) != -1)
|
||||
{
|
||||
if ((unsigned long) st.st_size < ptr_dcc->size)
|
||||
{
|
||||
ptr_dcc->start_resume = (unsigned long) st.st_size;
|
||||
ptr_dcc->pos = st.st_size;
|
||||
ptr_dcc->last_check_pos = st.st_size;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* not resumable */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* dcc_find_filename: find local filename for a DCC
|
||||
* if type if file/recv, add a suffix (like .1) if needed
|
||||
* if download is resumable, set "start_resume" to good value
|
||||
*/
|
||||
|
||||
void
|
||||
dcc_find_filename (t_irc_dcc *ptr_dcc)
|
||||
{
|
||||
char *ptr_home, *filename2;
|
||||
|
||||
ptr_home = getenv ("HOME");
|
||||
ptr_dcc->local_filename = (char *) malloc (strlen (cfg_dcc_download_path) +
|
||||
strlen (ptr_dcc->nick) +
|
||||
strlen (ptr_dcc->filename) +
|
||||
((cfg_dcc_download_path[0] == '~') ?
|
||||
strlen (ptr_home) : 0) +
|
||||
4);
|
||||
if (!ptr_dcc->local_filename)
|
||||
return;
|
||||
|
||||
if (cfg_dcc_download_path[0] == '~')
|
||||
{
|
||||
strcpy (ptr_dcc->local_filename, ptr_home);
|
||||
strcat (ptr_dcc->local_filename, cfg_dcc_download_path + 1);
|
||||
}
|
||||
else
|
||||
strcpy (ptr_dcc->local_filename, cfg_dcc_download_path);
|
||||
if (ptr_dcc->local_filename[strlen (ptr_dcc->local_filename) - 1] != DIR_SEPARATOR_CHAR)
|
||||
strcat (ptr_dcc->local_filename, DIR_SEPARATOR);
|
||||
strcat (ptr_dcc->local_filename, ptr_dcc->nick);
|
||||
strcat (ptr_dcc->local_filename, ".");
|
||||
strcat (ptr_dcc->local_filename, ptr_dcc->filename);
|
||||
|
||||
/* file already exists? */
|
||||
if (access (ptr_dcc->local_filename, F_OK) == 0)
|
||||
{
|
||||
if (dcc_file_is_resumable (ptr_dcc, ptr_dcc->local_filename))
|
||||
return;
|
||||
|
||||
/* if auto rename is not set, then abort DCC */
|
||||
if (!cfg_dcc_auto_rename)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
return;
|
||||
}
|
||||
|
||||
filename2 = (char *) malloc (strlen (ptr_dcc->local_filename) + 16);
|
||||
if (!filename2)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
return;
|
||||
}
|
||||
ptr_dcc->filename_suffix = 0;
|
||||
do
|
||||
{
|
||||
ptr_dcc->filename_suffix++;
|
||||
sprintf (filename2, "%s.%d",
|
||||
ptr_dcc->local_filename,
|
||||
ptr_dcc->filename_suffix);
|
||||
if (access (filename2, F_OK) == 0)
|
||||
{
|
||||
if (dcc_file_is_resumable (ptr_dcc, filename2))
|
||||
break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
while (1);
|
||||
|
||||
free (ptr_dcc->local_filename);
|
||||
ptr_dcc->local_filename = strdup (filename2);
|
||||
free (filename2);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* dcc_calculate_speed: calculate DCC speed (for files only)
|
||||
*/
|
||||
@@ -81,7 +213,7 @@ dcc_calculate_speed (t_irc_dcc *ptr_dcc, int ended)
|
||||
elapsed = local_time - ptr_dcc->start_transfer;
|
||||
if (elapsed == 0)
|
||||
elapsed = 1;
|
||||
ptr_dcc->bytes_per_sec = ptr_dcc->pos / elapsed;
|
||||
ptr_dcc->bytes_per_sec = (ptr_dcc->pos - ptr_dcc->start_resume) / elapsed;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -103,6 +235,8 @@ int
|
||||
dcc_connect (t_irc_dcc *ptr_dcc)
|
||||
{
|
||||
struct sockaddr_in addr;
|
||||
struct hostent *hostent;
|
||||
char *ip4;
|
||||
|
||||
if (ptr_dcc->type == DCC_CHAT_SEND)
|
||||
ptr_dcc->status = DCC_WAITING;
|
||||
@@ -115,12 +249,12 @@ dcc_connect (t_irc_dcc *ptr_dcc)
|
||||
if (ptr_dcc->sock == -1)
|
||||
return 0;
|
||||
}
|
||||
if (fcntl (ptr_dcc->sock, F_SETFL, O_NONBLOCK) == -1)
|
||||
return 0;
|
||||
|
||||
|
||||
/* for sending (chat or file), listen to socket for a connection */
|
||||
if (DCC_IS_SEND(ptr_dcc->type))
|
||||
{
|
||||
{
|
||||
if (fcntl (ptr_dcc->sock, F_SETFL, O_NONBLOCK) == -1)
|
||||
return 0;
|
||||
if (listen (ptr_dcc->sock, 1) == -1)
|
||||
return 0;
|
||||
if (fcntl (ptr_dcc->sock, F_SETFL, 0) == -1)
|
||||
@@ -130,11 +264,32 @@ dcc_connect (t_irc_dcc *ptr_dcc)
|
||||
/* for receiving (chat or file), connect to listening host */
|
||||
if (DCC_IS_RECV(ptr_dcc->type))
|
||||
{
|
||||
memset (&addr, 0, sizeof (addr));
|
||||
addr.sin_port = htons (ptr_dcc->port);
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_addr.s_addr = htonl (ptr_dcc->addr);
|
||||
connect (ptr_dcc->sock, (struct sockaddr *) &addr, sizeof (addr));
|
||||
if (fcntl (ptr_dcc->sock, F_SETFL, O_NONBLOCK) == -1)
|
||||
return 0;
|
||||
if (cfg_proxy_use)
|
||||
{
|
||||
memset (&addr, 0, sizeof (addr));
|
||||
addr.sin_addr.s_addr = htonl (ptr_dcc->addr);
|
||||
ip4 = inet_ntoa(addr.sin_addr);
|
||||
|
||||
memset (&addr, 0, sizeof (addr));
|
||||
addr.sin_port = htons (cfg_proxy_port);
|
||||
addr.sin_family = AF_INET;
|
||||
if ((hostent = gethostbyname (cfg_proxy_address)) == NULL)
|
||||
return 0;
|
||||
memcpy(&(addr.sin_addr),*(hostent->h_addr_list), sizeof(struct in_addr));
|
||||
connect (ptr_dcc->sock, (struct sockaddr *) &addr, sizeof (addr));
|
||||
if (pass_proxy(ptr_dcc->sock, ip4, ptr_dcc->port, ptr_dcc->server->username) == -1)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset (&addr, 0, sizeof (addr));
|
||||
addr.sin_port = htons (ptr_dcc->port);
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_addr.s_addr = htonl (ptr_dcc->addr);
|
||||
connect (ptr_dcc->sock, (struct sockaddr *) &addr, sizeof (addr));
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -179,10 +334,11 @@ void
|
||||
dcc_close (t_irc_dcc *ptr_dcc, int status)
|
||||
{
|
||||
t_gui_buffer *ptr_buffer;
|
||||
struct stat st;
|
||||
|
||||
ptr_dcc->status = status;
|
||||
|
||||
if (status == DCC_DONE)
|
||||
if ((status == DCC_DONE) || (status == DCC_ABORTED) || (status == DCC_FAILED))
|
||||
{
|
||||
if (DCC_IS_FILE(ptr_dcc->type))
|
||||
{
|
||||
@@ -192,20 +348,25 @@ dcc_close (t_irc_dcc *ptr_dcc, int status)
|
||||
COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s",
|
||||
ptr_dcc->filename);
|
||||
gui_printf (ptr_dcc->server->buffer, _(" (local filename: "));
|
||||
gui_printf_color (ptr_dcc->server->buffer,
|
||||
COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s",
|
||||
ptr_dcc->local_filename);
|
||||
if (ptr_dcc->local_filename)
|
||||
{
|
||||
gui_printf (ptr_dcc->server->buffer, _(" (local filename: "));
|
||||
gui_printf_color (ptr_dcc->server->buffer,
|
||||
COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s",
|
||||
ptr_dcc->local_filename);
|
||||
gui_printf (ptr_dcc->server->buffer, ")");
|
||||
}
|
||||
if (ptr_dcc->type == DCC_FILE_SEND)
|
||||
gui_printf (ptr_dcc->server->buffer, _(") sent to "));
|
||||
gui_printf (ptr_dcc->server->buffer, _(" sent to "));
|
||||
else
|
||||
gui_printf (ptr_dcc->server->buffer, _(") received from "));
|
||||
gui_printf (ptr_dcc->server->buffer, _(" received from "));
|
||||
gui_printf_color (ptr_dcc->server->buffer,
|
||||
COLOR_WIN_CHAT_NICK,
|
||||
"%s",
|
||||
ptr_dcc->nick);
|
||||
gui_printf (ptr_dcc->server->buffer, _(": ok!\n"));
|
||||
gui_printf (ptr_dcc->server->buffer,
|
||||
(status == DCC_DONE) ? _(": ok!\n") : _(": FAILED\n"));
|
||||
}
|
||||
}
|
||||
if (status == DCC_ABORTED)
|
||||
@@ -229,6 +390,21 @@ dcc_close (t_irc_dcc *ptr_dcc, int status)
|
||||
}
|
||||
}
|
||||
|
||||
/* remove empty file if received file failed and nothing was transfered */
|
||||
if (((status == DCC_FAILED) || (status == DCC_ABORTED))
|
||||
&& DCC_IS_FILE(ptr_dcc->type)
|
||||
&& DCC_IS_RECV(ptr_dcc->type)
|
||||
&& ptr_dcc->local_filename
|
||||
&& ptr_dcc->pos == 0)
|
||||
{
|
||||
/* erase file only if really empty on disk */
|
||||
if (stat (ptr_dcc->local_filename, &st) != -1)
|
||||
{
|
||||
if ((unsigned long) st.st_size == 0)
|
||||
unlink (ptr_dcc->local_filename);
|
||||
}
|
||||
}
|
||||
|
||||
if (DCC_IS_CHAT(ptr_dcc->type))
|
||||
channel_remove_dcc (ptr_dcc);
|
||||
|
||||
@@ -262,7 +438,7 @@ dcc_channel_for_chat (t_irc_dcc *ptr_dcc)
|
||||
"(maybe private buffer has already DCC CHAT?)\n"),
|
||||
WEECHAT_ERROR);
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -281,18 +457,16 @@ dcc_channel_for_chat (t_irc_dcc *ptr_dcc)
|
||||
}
|
||||
|
||||
/*
|
||||
* dcc_accept: accepts a DCC file or chat request
|
||||
* dcc_recv_connect_init: connect to sender and init file or chat
|
||||
*/
|
||||
|
||||
void
|
||||
dcc_accept (t_irc_dcc *ptr_dcc)
|
||||
dcc_recv_connect_init (t_irc_dcc *ptr_dcc)
|
||||
{
|
||||
char *ptr_home, *filename2;
|
||||
|
||||
if (!dcc_connect (ptr_dcc))
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -301,68 +475,15 @@ dcc_accept (t_irc_dcc *ptr_dcc)
|
||||
/* DCC file => look for local filename and open it in writing mode */
|
||||
if (DCC_IS_FILE(ptr_dcc->type))
|
||||
{
|
||||
ptr_home = getenv ("HOME");
|
||||
ptr_dcc->local_filename = (char *) malloc (strlen (cfg_dcc_download_path) +
|
||||
strlen (ptr_dcc->nick) +
|
||||
strlen (ptr_dcc->filename) +
|
||||
((cfg_dcc_download_path[0] == '~') ?
|
||||
strlen (ptr_home) : 0) +
|
||||
4);
|
||||
if (!ptr_dcc->local_filename)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
}
|
||||
if (cfg_dcc_download_path[0] == '~')
|
||||
{
|
||||
strcpy (ptr_dcc->local_filename, ptr_home);
|
||||
strcat (ptr_dcc->local_filename, cfg_dcc_download_path + 1);
|
||||
}
|
||||
if (ptr_dcc->start_resume > 0)
|
||||
ptr_dcc->file = open (ptr_dcc->local_filename,
|
||||
O_APPEND | O_WRONLY | O_NONBLOCK);
|
||||
else
|
||||
strcpy (ptr_dcc->local_filename, cfg_dcc_download_path);
|
||||
if (ptr_dcc->local_filename[strlen (ptr_dcc->local_filename) - 1] != DIR_SEPARATOR_CHAR)
|
||||
strcat (ptr_dcc->local_filename, DIR_SEPARATOR);
|
||||
strcat (ptr_dcc->local_filename, ptr_dcc->nick);
|
||||
strcat (ptr_dcc->local_filename, ".");
|
||||
strcat (ptr_dcc->local_filename, ptr_dcc->filename);
|
||||
|
||||
/* file already exists? */
|
||||
if (access (ptr_dcc->local_filename, F_OK) == 0)
|
||||
{
|
||||
/* if auto rename is not set, then abort DCC */
|
||||
if (!cfg_dcc_auto_rename)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
}
|
||||
|
||||
filename2 = (char *) malloc (strlen (ptr_dcc->local_filename) + 16);
|
||||
if (!filename2)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
}
|
||||
ptr_dcc->filename_suffix = 0;
|
||||
do
|
||||
{
|
||||
ptr_dcc->filename_suffix++;
|
||||
sprintf (filename2, "%s.%d",
|
||||
ptr_dcc->local_filename,
|
||||
ptr_dcc->filename_suffix);
|
||||
}
|
||||
while (access (filename2, F_OK) == 0);
|
||||
|
||||
free (ptr_dcc->local_filename);
|
||||
ptr_dcc->local_filename = strdup (filename2);
|
||||
free (filename2);
|
||||
}
|
||||
ptr_dcc->file = open (ptr_dcc->local_filename,
|
||||
O_CREAT | O_TRUNC | O_WRONLY | O_NONBLOCK,
|
||||
0644);
|
||||
ptr_dcc->file = open (ptr_dcc->local_filename,
|
||||
O_CREAT | O_TRUNC | O_WRONLY | O_NONBLOCK,
|
||||
0644);
|
||||
ptr_dcc->start_transfer = time (NULL);
|
||||
ptr_dcc->last_check_time = time (NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -370,7 +491,94 @@ dcc_accept (t_irc_dcc *ptr_dcc)
|
||||
dcc_channel_for_chat (ptr_dcc);
|
||||
}
|
||||
}
|
||||
dcc_redraw (1);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
|
||||
/*
|
||||
* dcc_accept: accepts a DCC file or chat request
|
||||
*/
|
||||
|
||||
void
|
||||
dcc_accept (t_irc_dcc *ptr_dcc)
|
||||
{
|
||||
if (DCC_IS_FILE(ptr_dcc->type) && (ptr_dcc->start_resume > 0))
|
||||
{
|
||||
ptr_dcc->status = DCC_CONNECTING;
|
||||
server_sendf (ptr_dcc->server,
|
||||
(strchr (ptr_dcc->filename, ' ')) ?
|
||||
"PRIVMSG %s :\01DCC RESUME \"%s\" %d %u\01\r\n" :
|
||||
"PRIVMSG %s :\01DCC RESUME %s %d %u\01\r\n",
|
||||
ptr_dcc->nick, ptr_dcc->filename,
|
||||
ptr_dcc->port, ptr_dcc->start_resume);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
else
|
||||
dcc_recv_connect_init (ptr_dcc);
|
||||
}
|
||||
|
||||
/*
|
||||
* dcc_accept_resume: accepts a resume and inform the receiver
|
||||
*/
|
||||
|
||||
void
|
||||
dcc_accept_resume (t_irc_server *server, char *filename, int port,
|
||||
unsigned long pos_start)
|
||||
{
|
||||
t_irc_dcc *ptr_dcc;
|
||||
|
||||
ptr_dcc = dcc_search (server, DCC_FILE_SEND, DCC_CONNECTING, port);
|
||||
if (ptr_dcc)
|
||||
{
|
||||
ptr_dcc->pos = pos_start;
|
||||
ptr_dcc->ack = pos_start;
|
||||
ptr_dcc->start_resume = pos_start;
|
||||
ptr_dcc->last_check_pos = pos_start;
|
||||
server_sendf (ptr_dcc->server,
|
||||
(strchr (ptr_dcc->filename, ' ')) ?
|
||||
"PRIVMSG %s :\01DCC ACCEPT \"%s\" %d %u\01\r\n" :
|
||||
"PRIVMSG %s :\01DCC ACCEPT %s %d %u\01\r\n",
|
||||
ptr_dcc->nick, ptr_dcc->filename,
|
||||
ptr_dcc->port, ptr_dcc->start_resume);
|
||||
|
||||
irc_display_prefix (ptr_dcc->server->buffer, PREFIX_INFO);
|
||||
gui_printf (ptr_dcc->server->buffer, _("DCC: file "));
|
||||
gui_printf_color (ptr_dcc->server->buffer,
|
||||
COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s ",
|
||||
ptr_dcc->filename);
|
||||
gui_printf (ptr_dcc->server->buffer, _("resumed at position %u\n"),
|
||||
ptr_dcc->start_resume);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
else
|
||||
gui_printf (server->buffer,
|
||||
_("%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found or ended\n"),
|
||||
WEECHAT_ERROR, filename, port, pos_start);
|
||||
}
|
||||
|
||||
/*
|
||||
* dcc_start_resume: called when "DCC ACCEPT" is received (resume accepted by sender)
|
||||
*/
|
||||
|
||||
void
|
||||
dcc_start_resume (t_irc_server *server, char *filename, int port,
|
||||
unsigned long pos_start)
|
||||
{
|
||||
t_irc_dcc *ptr_dcc;
|
||||
|
||||
ptr_dcc = dcc_search (server, DCC_FILE_RECV, DCC_CONNECTING, port);
|
||||
if (ptr_dcc)
|
||||
{
|
||||
ptr_dcc->pos = pos_start;
|
||||
ptr_dcc->ack = pos_start;
|
||||
ptr_dcc->start_resume = pos_start;
|
||||
ptr_dcc->last_check_pos = pos_start;
|
||||
dcc_recv_connect_init (ptr_dcc);
|
||||
}
|
||||
else
|
||||
gui_printf (server->buffer,
|
||||
_("%s can't resume file \"%s\" (port: %d, start position: %u): DCC not found or ended\n"),
|
||||
WEECHAT_ERROR, filename, port, pos_start);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -410,14 +618,20 @@ dcc_add (t_irc_server *server, int type, unsigned long addr, int port, char *nic
|
||||
new_dcc->filename = strdup (_("DCC chat"));
|
||||
else
|
||||
new_dcc->filename = (filename) ? strdup (filename) : NULL;
|
||||
new_dcc->local_filename = (local_filename) ? strdup (local_filename) : NULL;
|
||||
new_dcc->local_filename = NULL;
|
||||
new_dcc->filename_suffix = -1;
|
||||
new_dcc->size = size;
|
||||
new_dcc->pos = 0;
|
||||
new_dcc->ack = 0;
|
||||
new_dcc->last_check_time = 0;
|
||||
new_dcc->start_resume = 0;
|
||||
new_dcc->last_check_time = time (NULL);
|
||||
new_dcc->last_check_pos = 0;
|
||||
new_dcc->bytes_per_sec = 0;
|
||||
new_dcc->last_activity = time (NULL);
|
||||
if (local_filename)
|
||||
new_dcc->local_filename = strdup (local_filename);
|
||||
else
|
||||
dcc_find_filename (new_dcc);
|
||||
new_dcc->prev_dcc = NULL;
|
||||
new_dcc->next_dcc = dcc_list;
|
||||
if (dcc_list)
|
||||
@@ -443,6 +657,7 @@ dcc_add (t_irc_server *server, int type, unsigned long addr, int port, char *nic
|
||||
gui_printf (server->buffer, ", ");
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT_CHANNEL, "%lu", size);
|
||||
gui_printf (server->buffer, _(" bytes\n"));
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
if (type == DCC_FILE_SEND)
|
||||
{
|
||||
@@ -456,6 +671,7 @@ dcc_add (t_irc_server *server, int type, unsigned long addr, int port, char *nic
|
||||
gui_printf (server->buffer, "), ");
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT_CHANNEL, "%lu", size);
|
||||
gui_printf (server->buffer, _(" bytes\n"));
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
if (type == DCC_CHAT_RECV)
|
||||
{
|
||||
@@ -467,12 +683,40 @@ dcc_add (t_irc_server *server, int type, unsigned long addr, int port, char *nic
|
||||
"%d.%d.%d.%d",
|
||||
addr >> 24, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT_DARK, ")\n");
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
if (type == DCC_CHAT_SEND)
|
||||
{
|
||||
irc_display_prefix (server->buffer, PREFIX_INFO);
|
||||
gui_printf (server->buffer, _("Sending DCC chat request to "));
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT_NICK, "%s\n", nick);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
|
||||
if (DCC_IS_FILE(type) && (!new_dcc->local_filename))
|
||||
{
|
||||
dcc_close (new_dcc, DCC_FAILED);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (DCC_IS_FILE(type) && (new_dcc->start_resume > 0))
|
||||
{
|
||||
irc_display_prefix (new_dcc->server->buffer, PREFIX_INFO);
|
||||
gui_printf (new_dcc->server->buffer, _("DCC: file "));
|
||||
gui_printf_color (new_dcc->server->buffer,
|
||||
COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s",
|
||||
new_dcc->filename);
|
||||
gui_printf (new_dcc->server->buffer, _(" (local filename: "));
|
||||
gui_printf_color (new_dcc->server->buffer,
|
||||
COLOR_WIN_CHAT_CHANNEL,
|
||||
"%s",
|
||||
new_dcc->local_filename);
|
||||
gui_printf (new_dcc->server->buffer, ") ");
|
||||
gui_printf (new_dcc->server->buffer, _("will be resumed at position %u\n"),
|
||||
new_dcc->start_resume);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
|
||||
/* connect if needed and redraw DCC buffer */
|
||||
@@ -481,6 +725,7 @@ dcc_add (t_irc_server *server, int type, unsigned long addr, int port, char *nic
|
||||
if (!dcc_connect (new_dcc))
|
||||
{
|
||||
dcc_close (new_dcc, DCC_FAILED);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -489,7 +734,7 @@ dcc_add (t_irc_server *server, int type, unsigned long addr, int port, char *nic
|
||||
|| ( (type == DCC_FILE_RECV) && (cfg_dcc_auto_accept_files) ) )
|
||||
dcc_accept (new_dcc);
|
||||
else
|
||||
dcc_redraw (2);
|
||||
dcc_redraw (HOTLIST_PRIVATE);
|
||||
gui_draw_buffer_status (gui_current_window->buffer, 0);
|
||||
|
||||
return new_dcc;
|
||||
@@ -518,9 +763,9 @@ dcc_send_request (t_irc_server *server, int type, char *nick, char *filename)
|
||||
if (type == DCC_FILE_SEND)
|
||||
{
|
||||
/* add home if filename not beginning with '/' (not for Win32) */
|
||||
#ifdef _WIN32
|
||||
#ifdef _WIN32
|
||||
filename2 = strdup (filename);
|
||||
#else
|
||||
#else
|
||||
if (filename[0] == '/')
|
||||
filename2 = strdup (filename);
|
||||
else
|
||||
@@ -550,7 +795,7 @@ dcc_send_request (t_irc_server *server, int type, char *nick, char *filename)
|
||||
strcat (filename2, DIR_SEPARATOR);
|
||||
strcat (filename2, filename);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* check if file exists */
|
||||
if (stat (filename2, &st) == -1)
|
||||
@@ -705,11 +950,11 @@ dcc_chat_sendf (t_irc_dcc *ptr_dcc, char *fmt, ...)
|
||||
buffer[sizeof (buffer) - 1] = '\0';
|
||||
if ((size_buf < 0) || (size_buf > (int) (sizeof (buffer) - 1)))
|
||||
size_buf = strlen (buffer);
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG
|
||||
buffer[size_buf - 2] = '\0';
|
||||
gui_printf (ptr_dcc->server->buffer, "[DEBUG] Sending to remote host (DCC CHAT) >>> %s\n", buffer);
|
||||
buffer[size_buf - 2] = '\r';
|
||||
#endif
|
||||
#endif
|
||||
buf2 = weechat_convert_encoding ((cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
|
||||
cfg_look_charset_internal : local_charset,
|
||||
cfg_look_charset_encode,
|
||||
@@ -786,7 +1031,7 @@ dcc_chat_recv (t_irc_dcc *ptr_dcc)
|
||||
gui_printf_type_color (ptr_dcc->channel->buffer,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "<");
|
||||
if (strstr (ptr_buf, ptr_dcc->server->nick))
|
||||
if (irc_is_highlight (ptr_buf, ptr_dcc->server->nick))
|
||||
{
|
||||
gui_printf_type_color (ptr_dcc->channel->buffer,
|
||||
MSG_TYPE_NICK | MSG_TYPE_HIGHLIGHT,
|
||||
@@ -821,7 +1066,7 @@ dcc_chat_recv (t_irc_dcc *ptr_dcc)
|
||||
else
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_ABORTED);
|
||||
dcc_redraw (1);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -844,6 +1089,17 @@ dcc_handle ()
|
||||
|
||||
for (ptr_dcc = dcc_list; ptr_dcc; ptr_dcc = ptr_dcc->next_dcc)
|
||||
{
|
||||
/* check DCC timeout */
|
||||
if (DCC_IS_FILE(ptr_dcc->type) && !DCC_ENDED(ptr_dcc->status))
|
||||
{
|
||||
if ((cfg_dcc_timeout != 0) && (time (NULL) > ptr_dcc->last_activity + cfg_dcc_timeout))
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr_dcc->status == DCC_CONNECTING)
|
||||
{
|
||||
if (ptr_dcc->type == DCC_FILE_SEND)
|
||||
@@ -858,6 +1114,7 @@ dcc_handle ()
|
||||
{
|
||||
if (FD_ISSET (ptr_dcc->sock, &read_fd))
|
||||
{
|
||||
ptr_dcc->last_activity = time (NULL);
|
||||
length = sizeof (addr);
|
||||
sock = accept (ptr_dcc->sock, (struct sockaddr *) &addr, &length);
|
||||
close (ptr_dcc->sock);
|
||||
@@ -865,21 +1122,21 @@ dcc_handle ()
|
||||
if (sock < 0)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
ptr_dcc->sock = sock;
|
||||
if (fcntl (ptr_dcc->sock, F_SETFL, O_NONBLOCK) == -1)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
ptr_dcc->addr = ntohl (addr.sin_addr.s_addr);
|
||||
ptr_dcc->status = DCC_ACTIVE;
|
||||
ptr_dcc->file = open (ptr_dcc->local_filename, O_RDONLY | O_NONBLOCK, 0644);
|
||||
ptr_dcc->start_transfer = time (NULL);
|
||||
dcc_redraw (1);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -906,19 +1163,19 @@ dcc_handle ()
|
||||
if (sock < 0)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
ptr_dcc->sock = sock;
|
||||
if (fcntl (ptr_dcc->sock, F_SETFL, O_NONBLOCK) == -1)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
ptr_dcc->addr = ntohl (addr.sin_addr.s_addr);
|
||||
ptr_dcc->status = DCC_ACTIVE;
|
||||
dcc_redraw (1);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
dcc_channel_for_chat (ptr_dcc);
|
||||
}
|
||||
}
|
||||
@@ -949,16 +1206,17 @@ dcc_handle ()
|
||||
if (num_read == 0)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (write (ptr_dcc->file, buffer, num_read) == -1)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
ptr_dcc->last_activity = time (NULL);
|
||||
ptr_dcc->pos += (unsigned long) num_read;
|
||||
pos = htonl (ptr_dcc->pos);
|
||||
send (ptr_dcc->sock, (char *) &pos, 4, 0);
|
||||
@@ -966,10 +1224,10 @@ dcc_handle ()
|
||||
if (ptr_dcc->pos >= ptr_dcc->size)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_DONE);
|
||||
dcc_redraw (1);
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
}
|
||||
else
|
||||
dcc_redraw (0);
|
||||
dcc_redraw (HOTLIST_LOW);
|
||||
}
|
||||
}
|
||||
if (ptr_dcc->type == DCC_FILE_SEND)
|
||||
@@ -982,8 +1240,8 @@ dcc_handle ()
|
||||
"max is %d.\n"),
|
||||
sizeof (buffer));
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
if (ptr_dcc->pos > ptr_dcc->ack)
|
||||
{
|
||||
@@ -994,11 +1252,11 @@ dcc_handle ()
|
||||
if (num_read == 0)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
if (num_read < 4)
|
||||
return;
|
||||
continue;
|
||||
recv (ptr_dcc->sock, (char *) &pos, 4, 0);
|
||||
ptr_dcc->ack = ntohl (pos);
|
||||
|
||||
@@ -1006,8 +1264,8 @@ dcc_handle ()
|
||||
&& (ptr_dcc->ack >= ptr_dcc->size))
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_DONE);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1018,19 +1276,20 @@ dcc_handle ()
|
||||
if (num_read < 1)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
num_sent = send (ptr_dcc->sock, buffer, num_read, 0);
|
||||
if (num_sent < 0)
|
||||
{
|
||||
dcc_close (ptr_dcc, DCC_FAILED);
|
||||
dcc_redraw (1);
|
||||
return;
|
||||
dcc_redraw (HOTLIST_MSG);
|
||||
continue;
|
||||
}
|
||||
ptr_dcc->last_activity = time (NULL);
|
||||
ptr_dcc->pos += (unsigned long) num_sent;
|
||||
dcc_calculate_speed (ptr_dcc, 0);
|
||||
dcc_redraw (0);
|
||||
dcc_redraw (HOTLIST_LOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,14 @@ irc_display_prefix (t_gui_buffer *buffer, char *prefix)
|
||||
gui_printf_type_color (buffer, type, COLOR_WIN_CHAT_PREFIX1, "%c ", prefix[2]);
|
||||
}
|
||||
else
|
||||
gui_printf_color (buffer, COLOR_WIN_CHAT_PREFIX1, "%s ", prefix);
|
||||
{
|
||||
if (strcmp (prefix, PREFIX_JOIN) == 0)
|
||||
gui_printf_color (buffer, COLOR_WIN_CHAT_JOIN, "%s ", prefix);
|
||||
else if (strcmp (prefix, PREFIX_PART) == 0)
|
||||
gui_printf_color (buffer, COLOR_WIN_CHAT_PART, "%s ", prefix);
|
||||
else
|
||||
gui_printf_color (buffer, COLOR_WIN_CHAT_PREFIX1, "%s ", prefix);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,475 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* irc-ignore.c: manages IRC ignore list */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../common/weechat.h"
|
||||
#include "irc.h"
|
||||
#include "../common/command.h"
|
||||
|
||||
|
||||
char *ignore_types[] =
|
||||
{ IGNORE_ACTION, IGNORE_CTCP, IGNORE_DCC, IGNORE_PRIVATE, NULL };
|
||||
|
||||
t_irc_ignore *irc_ignore = NULL;
|
||||
t_irc_ignore *last_irc_ignore = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* ignore_check_mask: returns 1 is mask1 and mask2 are the same host
|
||||
* anyone or both strings may have user and/or host after
|
||||
*/
|
||||
|
||||
int
|
||||
ignore_check_mask (char *mask1, char *mask2)
|
||||
{
|
||||
char *m1, *m2, *pos;
|
||||
int match;
|
||||
|
||||
if (!mask1 || !mask1[0] || !mask2 || !mask2[0])
|
||||
return 0;
|
||||
|
||||
m1 = strdup (mask1);
|
||||
m2 = strdup (mask2);
|
||||
|
||||
pos = strchr (m1, '!');
|
||||
if (!pos)
|
||||
{
|
||||
/* remove '!' from m2 */
|
||||
pos = strchr (m2, '!');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
pos = strchr (m2, '!');
|
||||
if (!pos)
|
||||
{
|
||||
/* remove '!' from m1 */
|
||||
pos = strchr (m1, '!');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
|
||||
/* TODO: use regexp to match both masks */
|
||||
match = ascii_strcasecmp (m1, m2);
|
||||
|
||||
free (m1);
|
||||
free (m2);
|
||||
|
||||
return (match == 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_match: check if pointed ignore matches with arguments
|
||||
*/
|
||||
|
||||
int
|
||||
ignore_match (t_irc_ignore *ptr_ignore, char *mask, char *type, char *channel_name, char *server_name)
|
||||
{
|
||||
/* check mask */
|
||||
if ((strcmp (mask, "*") != 0) && (strcmp (ptr_ignore->mask, "*") != 0)
|
||||
&& (!ignore_check_mask (ptr_ignore->mask, mask)))
|
||||
return 0;
|
||||
|
||||
/* mask is matching, go on with type */
|
||||
if ((strcmp (type, "*") != 0) && (strcmp (ptr_ignore->type, "*") != 0)
|
||||
&& (ascii_strcasecmp (ptr_ignore->type, type) != 0))
|
||||
return 0;
|
||||
|
||||
/* mask and type matching, go on with server */
|
||||
if (server_name && server_name[0])
|
||||
{
|
||||
if ((strcmp (server_name, "*") != 0) && (strcmp (ptr_ignore->server_name, "*") != 0)
|
||||
&& (ascii_strcasecmp (ptr_ignore->server_name, server_name) != 0))
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcmp (ptr_ignore->server_name, "*") != 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* mask, type and server matching, go on with channel */
|
||||
if (channel_name && channel_name[0])
|
||||
{
|
||||
if ((strcmp (channel_name, "*") != 0) && (strcmp (ptr_ignore->channel_name, "*") != 0)
|
||||
&& (ascii_strcasecmp (ptr_ignore->channel_name, channel_name) != 0))
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcmp (ptr_ignore->channel_name, "*") != 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* all is matching => we find a ignore! */
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_check: check if an ignore is set for arguments
|
||||
* returns 1 if at least one ignore exists (message should NOT be displayed)
|
||||
* 0 if no ignore found (message will be displayed)
|
||||
*/
|
||||
|
||||
int
|
||||
ignore_check (char *mask, char *type, char *channel_name, char *server_name)
|
||||
{
|
||||
t_irc_ignore *ptr_ignore;
|
||||
|
||||
if (!mask || !mask[0] || !type || !type[0])
|
||||
return 0;
|
||||
|
||||
for (ptr_ignore = irc_ignore; ptr_ignore;
|
||||
ptr_ignore = ptr_ignore->next_ignore)
|
||||
{
|
||||
if (ignore_match (ptr_ignore, mask, type, channel_name, server_name))
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* no ignore found */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_search: search for an ignore
|
||||
*/
|
||||
|
||||
t_irc_ignore *
|
||||
ignore_search (char *mask, char *type, char *channel_name, char *server_name)
|
||||
{
|
||||
t_irc_ignore *ptr_ignore;
|
||||
|
||||
for (ptr_ignore = irc_ignore; ptr_ignore;
|
||||
ptr_ignore = ptr_ignore->next_ignore)
|
||||
{
|
||||
if ((ascii_strcasecmp (ptr_ignore->mask, mask) == 0)
|
||||
&& (ascii_strcasecmp (ptr_ignore->type, type) == 0)
|
||||
&& (ascii_strcasecmp (ptr_ignore->channel_name, channel_name) == 0)
|
||||
&& (ascii_strcasecmp (ptr_ignore->server_name, server_name) == 0))
|
||||
return ptr_ignore;
|
||||
}
|
||||
|
||||
/* ignore not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_add: add an ignore in list
|
||||
*/
|
||||
|
||||
t_irc_ignore *
|
||||
ignore_add (char *mask, char *type, char *channel_name, char *server_name)
|
||||
{
|
||||
int i, type_index;
|
||||
t_irc_command *command_ptr;
|
||||
t_irc_ignore *new_ignore;
|
||||
|
||||
if (!mask || !mask[0] || !type || !type[0] || !channel_name || !channel_name[0]
|
||||
|| !server_name || !server_name[0])
|
||||
{
|
||||
gui_printf (NULL,
|
||||
_("%s too few arguments for ignore\n"),
|
||||
WEECHAT_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
wee_log_printf ("Adding ignore: mask:'%s', type:'%s', channel:'%s', server:'%s'\n",
|
||||
mask, type, channel_name, server_name);
|
||||
#endif
|
||||
|
||||
type_index = -1;
|
||||
command_ptr = NULL;
|
||||
|
||||
if ((strcmp (mask, "*") == 0) && (strcmp (type, "*") == 0))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s mask or type/command should be non generic value for ignore\n"),
|
||||
WEECHAT_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ignore_search (mask, type, channel_name, server_name))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s ignore already exists\n"),
|
||||
WEECHAT_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (strcmp (type, "*") != 0)
|
||||
{
|
||||
/* look for type in pre-defined ignore types */
|
||||
for (i = 0; ignore_types[i]; i++)
|
||||
{
|
||||
if (ascii_strcasecmp (type, ignore_types[i]) == 0)
|
||||
{
|
||||
type_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* not a pre-defined ignore type, so it MUST be an IRC command */
|
||||
if (type_index < 0)
|
||||
{
|
||||
for (i = 0; irc_commands[i].command_name; i++)
|
||||
{
|
||||
if (irc_commands[i].recv_function &&
|
||||
(ascii_strcasecmp (type, irc_commands[i].command_name) == 0))
|
||||
{
|
||||
command_ptr = &irc_commands[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* not a pre-defined command and not an IRC command => error */
|
||||
if ((type_index < 0) && (!command_ptr))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s unknown type or IRC command \"%s\" for ignore\n"),
|
||||
WEECHAT_ERROR, type);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* create new ignore */
|
||||
new_ignore = (t_irc_ignore *) malloc (sizeof (t_irc_ignore));
|
||||
if (new_ignore)
|
||||
{
|
||||
new_ignore->mask = strdup (mask);
|
||||
new_ignore->type = strdup (type);
|
||||
new_ignore->server_name = strdup (server_name);
|
||||
new_ignore->channel_name = strdup (channel_name);
|
||||
|
||||
/* add new ignore to queue */
|
||||
new_ignore->prev_ignore = last_irc_ignore;
|
||||
new_ignore->next_ignore = NULL;
|
||||
if (irc_ignore)
|
||||
last_irc_ignore->next_ignore = new_ignore;
|
||||
else
|
||||
irc_ignore = new_ignore;
|
||||
last_irc_ignore = new_ignore;
|
||||
}
|
||||
else
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s not enough memory to create ignore\n"),
|
||||
WEECHAT_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return new_ignore;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_add_from_config: add an ignore to list, read from config file
|
||||
* (comma serparated values)
|
||||
*/
|
||||
|
||||
t_irc_ignore *
|
||||
ignore_add_from_config (char *string)
|
||||
{
|
||||
t_irc_ignore *new_ignore;
|
||||
char *string2;
|
||||
char *pos_mask, *pos_type, *pos_channel, *pos_server;
|
||||
|
||||
if (!string || !string[0])
|
||||
return NULL;
|
||||
|
||||
new_ignore = NULL;
|
||||
string2 = strdup (string);
|
||||
|
||||
pos_mask = string2;
|
||||
pos_type = strchr (pos_mask, ',');
|
||||
if (pos_type)
|
||||
{
|
||||
pos_type[0] = '\0';
|
||||
pos_type++;
|
||||
pos_channel = strchr (pos_type, ',');
|
||||
if (pos_channel)
|
||||
{
|
||||
pos_channel[0] = '\0';
|
||||
pos_channel++;
|
||||
pos_server = strchr (pos_channel, ',');
|
||||
if (pos_server)
|
||||
{
|
||||
pos_server[0] = '\0';
|
||||
pos_server++;
|
||||
new_ignore = ignore_add (pos_mask, pos_type, pos_channel, pos_server);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
free (string2);
|
||||
return new_ignore;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_free: free an ignore
|
||||
*/
|
||||
|
||||
void
|
||||
ignore_free (t_irc_ignore *ptr_ignore)
|
||||
{
|
||||
t_irc_ignore *new_irc_ignore;
|
||||
|
||||
/* free data */
|
||||
if (ptr_ignore->mask)
|
||||
free (ptr_ignore->mask);
|
||||
if (ptr_ignore->type)
|
||||
free (ptr_ignore->type);
|
||||
if (ptr_ignore->channel_name)
|
||||
free (ptr_ignore->channel_name);
|
||||
if (ptr_ignore->server_name)
|
||||
free (ptr_ignore->server_name);
|
||||
|
||||
/* remove ignore from queue */
|
||||
if (last_irc_ignore == ptr_ignore)
|
||||
last_irc_ignore = ptr_ignore->prev_ignore;
|
||||
if (ptr_ignore->prev_ignore)
|
||||
{
|
||||
(ptr_ignore->prev_ignore)->next_ignore = ptr_ignore->next_ignore;
|
||||
new_irc_ignore = irc_ignore;
|
||||
}
|
||||
else
|
||||
new_irc_ignore = ptr_ignore->next_ignore;
|
||||
|
||||
if (ptr_ignore->next_ignore)
|
||||
(ptr_ignore->next_ignore)->prev_ignore = ptr_ignore->prev_ignore;
|
||||
|
||||
free (ptr_ignore);
|
||||
irc_ignore = new_irc_ignore;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_free_all: free all ignores
|
||||
*/
|
||||
|
||||
void
|
||||
ignore_free_all ()
|
||||
{
|
||||
while (irc_ignore)
|
||||
ignore_free (irc_ignore);
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_search_free: search and free ignore(s)
|
||||
* return: number of ignore found and deleted
|
||||
* 0 if no ignore found
|
||||
*/
|
||||
|
||||
int
|
||||
ignore_search_free (char *mask, char *type, char *channel_name, char *server_name)
|
||||
{
|
||||
int found;
|
||||
t_irc_ignore *ptr_ignore, *next_ignore;
|
||||
|
||||
found = 0;
|
||||
ptr_ignore = irc_ignore;
|
||||
while (ptr_ignore)
|
||||
{
|
||||
if (ignore_match (ptr_ignore, mask, type, channel_name, server_name))
|
||||
{
|
||||
found++;
|
||||
if (found == 1)
|
||||
gui_printf (NULL, "\n");
|
||||
irc_display_prefix (NULL, PREFIX_INFO);
|
||||
weechat_cmd_ignore_display (_("Removing ignore:"), ptr_ignore);
|
||||
next_ignore = ptr_ignore->next_ignore;
|
||||
ignore_free (ptr_ignore);
|
||||
ptr_ignore = next_ignore;
|
||||
}
|
||||
else
|
||||
ptr_ignore = ptr_ignore->next_ignore;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_search_free_by_number: search and free ignore(s) by number
|
||||
* return: 1 if ignore found and deleted
|
||||
* 0 if ignore not found
|
||||
*/
|
||||
|
||||
int
|
||||
ignore_search_free_by_number (int number)
|
||||
{
|
||||
int i;
|
||||
t_irc_ignore *ptr_ignore;
|
||||
|
||||
if (number < 1)
|
||||
return 0;
|
||||
|
||||
i = 0;
|
||||
for (ptr_ignore = irc_ignore; ptr_ignore;
|
||||
ptr_ignore = ptr_ignore->next_ignore)
|
||||
{
|
||||
i++;
|
||||
if (i == number)
|
||||
{
|
||||
gui_printf (NULL, "\n");
|
||||
irc_display_prefix (NULL, PREFIX_INFO);
|
||||
weechat_cmd_ignore_display (_("Removing ignore:"), ptr_ignore);
|
||||
ignore_free (ptr_ignore);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* ignore number not found */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore_print_log: print ignore list in log (usually for crash dump)
|
||||
*/
|
||||
|
||||
void
|
||||
ignore_print_log ()
|
||||
{
|
||||
t_irc_ignore *ptr_ignore;
|
||||
|
||||
wee_log_printf ("[ignore list]\n");
|
||||
|
||||
for (ptr_ignore = irc_ignore; ptr_ignore;
|
||||
ptr_ignore = ptr_ignore->next_ignore)
|
||||
{
|
||||
wee_log_printf ("\n");
|
||||
wee_log_printf (" -> ignore at 0x%X:\n", ptr_ignore);
|
||||
wee_log_printf (" mask. . . . . . . : %s\n", ptr_ignore->mask);
|
||||
wee_log_printf (" type. . . . . . . : %s\n", ptr_ignore->type);
|
||||
wee_log_printf (" channel_name. . . : %s\n", ptr_ignore->channel_name);
|
||||
wee_log_printf (" server_name . . . : %s\n", ptr_ignore->server_name);
|
||||
wee_log_printf (" prev_ignore . . . : 0x%X\n", ptr_ignore->prev_ignore);
|
||||
wee_log_printf (" next_ignore . . . : 0x%X\n", ptr_ignore->next_ignore);
|
||||
}
|
||||
}
|
||||
+12
-9
@@ -30,10 +30,11 @@
|
||||
|
||||
#include "../common/weechat.h"
|
||||
#include "irc.h"
|
||||
#include "../common/weeconfig.h"
|
||||
|
||||
|
||||
/*
|
||||
* nick_find_color: find a color for a nick (less used will be better!)
|
||||
* nick_find_color: find a color for a nick (according to nick letters)
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -46,7 +47,7 @@ nick_find_color (t_irc_nick *nick)
|
||||
{
|
||||
color += (int)(nick->nick[i]);
|
||||
}
|
||||
color = (color % COLOR_WIN_NICK_NUMBER);
|
||||
color = (color % cfg_look_color_nicks_number);
|
||||
|
||||
return COLOR_WIN_NICK_FIRST + color;
|
||||
}
|
||||
@@ -87,12 +88,11 @@ nick_compare (t_irc_nick *nick1, t_irc_nick *nick2)
|
||||
score1 = nick_score_for_sort (nick1);
|
||||
score2 = nick_score_for_sort (nick2);
|
||||
|
||||
comp = strcasecmp(nick1->nick, nick2->nick);
|
||||
comp = ascii_strcasecmp (nick1->nick, nick2->nick);
|
||||
if (comp > 0)
|
||||
score1++;
|
||||
else
|
||||
if (comp < 0)
|
||||
score2++;
|
||||
if (comp < 0)
|
||||
score2++;
|
||||
|
||||
/* nick1 > nick2 */
|
||||
if (score1 > score2)
|
||||
@@ -202,7 +202,7 @@ nick_new (t_irc_channel *channel, char *nick_name,
|
||||
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)
|
||||
if (ascii_strcasecmp (new_nick->nick, SERVER(channel->buffer)->nick) == 0)
|
||||
new_nick->color = COLOR_WIN_NICK_SELF;
|
||||
else
|
||||
new_nick->color = nick_find_color (new_nick);
|
||||
@@ -315,11 +315,14 @@ t_irc_nick *
|
||||
nick_search (t_irc_channel *channel, char *nickname)
|
||||
{
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
|
||||
if (!nickname)
|
||||
return NULL;
|
||||
|
||||
for (ptr_nick = channel->nicks; ptr_nick;
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
if (strcasecmp (ptr_nick->nick, nickname) == 0)
|
||||
if (ascii_strcasecmp (ptr_nick->nick, nickname) == 0)
|
||||
return ptr_nick;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
+2014
-1221
File diff suppressed because it is too large
Load Diff
+193
-44
@@ -29,6 +29,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <sys/utsname.h>
|
||||
@@ -81,6 +82,102 @@ irc_cmd_send_admin (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_ame: send a ctcp action to all channels of all connected servers
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_ame (t_irc_server *server, char *arguments)
|
||||
{
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) server;
|
||||
|
||||
gui_add_hotlist = 0;
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (ptr_server->is_connected)
|
||||
{
|
||||
for (ptr_channel = ptr_server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if (ptr_channel->type == CHAT_CHANNEL)
|
||||
{
|
||||
server_sendf (ptr_server, "PRIVMSG %s :\01ACTION %s\01\r\n",
|
||||
ptr_channel->name,
|
||||
(arguments && arguments[0]) ? arguments : "");
|
||||
irc_display_prefix (ptr_channel->buffer, PREFIX_ACTION_ME);
|
||||
gui_printf_color (ptr_channel->buffer,
|
||||
COLOR_WIN_CHAT_NICK, "%s", ptr_server->nick);
|
||||
gui_printf_color (ptr_channel->buffer,
|
||||
COLOR_WIN_CHAT, " %s\n",
|
||||
(arguments && arguments[0]) ? arguments : "");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
gui_add_hotlist = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_amsg: send message to all channels of all connected servers
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_amsg (t_irc_server *server, char *arguments)
|
||||
{
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) server;
|
||||
|
||||
if (arguments)
|
||||
{
|
||||
gui_add_hotlist = 0;
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (ptr_server->is_connected)
|
||||
{
|
||||
for (ptr_channel = ptr_server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if (ptr_channel->type == CHAT_CHANNEL)
|
||||
{
|
||||
server_sendf (ptr_server, "PRIVMSG %s :%s\r\n",
|
||||
ptr_channel->name, arguments);
|
||||
ptr_nick = nick_search (ptr_channel, ptr_server->nick);
|
||||
if (ptr_nick)
|
||||
{
|
||||
irc_display_nick (ptr_channel->buffer, ptr_nick, NULL,
|
||||
MSG_TYPE_NICK, 1, 1, 0);
|
||||
gui_printf_color (ptr_channel->buffer,
|
||||
COLOR_WIN_CHAT, "%s\n", arguments);
|
||||
}
|
||||
else
|
||||
{
|
||||
irc_display_prefix (ptr_server->buffer, PREFIX_ERROR);
|
||||
gui_printf (ptr_server->buffer,
|
||||
_("%s cannot find nick for sending message\n"),
|
||||
WEECHAT_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
gui_add_hotlist = 1;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_away: toggle away status
|
||||
*/
|
||||
@@ -274,53 +371,67 @@ irc_cmd_send_ban (t_irc_server *server, char *arguments)
|
||||
int
|
||||
irc_cmd_send_ctcp (t_irc_server *server, char *arguments)
|
||||
{
|
||||
char *pos, *pos2;
|
||||
char *pos_type, *pos_args, *pos;
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
|
||||
pos = strchr (arguments, ' ');
|
||||
if (pos)
|
||||
pos_type = strchr (arguments, ' ');
|
||||
if (pos_type)
|
||||
{
|
||||
pos[0] = '\0';
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
pos2 = strchr (pos, ' ');
|
||||
if (pos2)
|
||||
pos_type[0] = '\0';
|
||||
pos_type++;
|
||||
while (pos_type[0] == ' ')
|
||||
pos_type++;
|
||||
pos_args = strchr (pos_type, ' ');
|
||||
if (pos_args)
|
||||
{
|
||||
pos2[0] = '\0';
|
||||
pos2++;
|
||||
while (pos2[0] == ' ')
|
||||
pos2++;
|
||||
pos_args[0] = '\0';
|
||||
pos_args++;
|
||||
while (pos_args[0] == ' ')
|
||||
pos_args++;
|
||||
}
|
||||
else
|
||||
pos2 = NULL;
|
||||
pos_args = NULL;
|
||||
|
||||
if (strcasecmp (pos, "version") == 0)
|
||||
pos = pos_type;
|
||||
while (pos[0])
|
||||
{
|
||||
if (pos2)
|
||||
server_sendf (server, "PRIVMSG %s :\01VERSION %s\01\r\n",
|
||||
arguments, pos2);
|
||||
else
|
||||
server_sendf (server, "PRIVMSG %s :\01VERSION\01\r\n",
|
||||
arguments);
|
||||
pos[0] = toupper (pos[0]);
|
||||
pos++;
|
||||
}
|
||||
if (strcasecmp (pos, "action") == 0)
|
||||
{
|
||||
if (pos2)
|
||||
server_sendf (server, "PRIVMSG %s :\01ACTION %s\01\r\n",
|
||||
arguments, pos2);
|
||||
else
|
||||
server_sendf (server, "PRIVMSG %s :\01ACTION\01\r\n",
|
||||
arguments);
|
||||
}
|
||||
if (strcasecmp (pos, "ping") == 0)
|
||||
|
||||
irc_display_prefix (server->buffer, PREFIX_SERVER);
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT, "CTCP");
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT_DARK, "(");
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT_NICK, "%s", arguments);
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT_DARK, ")");
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT, ": ");
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT_CHANNEL, "%s", pos_type);
|
||||
|
||||
if ((ascii_strcasecmp (pos_type, "ping") == 0) && (!pos_args))
|
||||
{
|
||||
gettimeofday (&tv, &tz);
|
||||
server_sendf (server, "PRIVMSG %s :\01PING %d %d\01\r\n",
|
||||
arguments, tv.tv_sec, tv.tv_usec);
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT, " %d %d\n",
|
||||
tv.tv_sec, tv.tv_usec);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pos_args)
|
||||
{
|
||||
server_sendf (server, "PRIVMSG %s :\01%s %s\01\r\n",
|
||||
arguments, pos_type, pos_args);
|
||||
gui_printf_color (server->buffer, COLOR_WIN_CHAT, " %s\n",
|
||||
pos_args);
|
||||
}
|
||||
else
|
||||
{
|
||||
server_sendf (server, "PRIVMSG %s :\01%s\01\r\n",
|
||||
arguments, pos_type);
|
||||
gui_printf (server->buffer, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -381,7 +492,7 @@ irc_cmd_send_dcc (t_irc_server *server, char *arguments)
|
||||
|
||||
dcc_send_request (server, DCC_CHAT_SEND, pos_nick, NULL);
|
||||
}
|
||||
else if (strcasecmp (arguments, "close") == 0)
|
||||
else if (ascii_strcasecmp (arguments, "close") == 0)
|
||||
{
|
||||
if (BUFFER_IS_PRIVATE(gui_current_window->buffer) &&
|
||||
CHANNEL(gui_current_window->buffer)->dcc_chat)
|
||||
@@ -414,10 +525,17 @@ irc_cmd_send_dehalfop (t_irc_server *server, int argc, char **argv)
|
||||
|
||||
if (BUFFER_IS_CHANNEL(gui_current_window->buffer))
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
if (argc == 0)
|
||||
server_sendf (server, "MODE %s -h %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
server->nick);
|
||||
else
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
server_sendf (server, "MODE %s -h %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -440,10 +558,17 @@ irc_cmd_send_deop (t_irc_server *server, int argc, char **argv)
|
||||
|
||||
if (BUFFER_IS_CHANNEL(gui_current_window->buffer))
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
if (argc == 0)
|
||||
server_sendf (server, "MODE %s -o %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
server->nick);
|
||||
else
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
server_sendf (server, "MODE %s -o %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -466,10 +591,17 @@ irc_cmd_send_devoice (t_irc_server *server, int argc, char **argv)
|
||||
|
||||
if (BUFFER_IS_CHANNEL(gui_current_window->buffer))
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
if (argc == 0)
|
||||
server_sendf (server, "MODE %s -v %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
server->nick);
|
||||
else
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
server_sendf (server, "MODE %s -v %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -507,10 +639,17 @@ irc_cmd_send_halfop (t_irc_server *server, int argc, char **argv)
|
||||
|
||||
if (BUFFER_IS_CHANNEL(gui_current_window->buffer))
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
if (argc == 0)
|
||||
server_sendf (server, "MODE %s +h %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
server->nick);
|
||||
else
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
server_sendf (server, "MODE %s +h %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -580,7 +719,10 @@ irc_cmd_send_ison (t_irc_server *server, char *arguments)
|
||||
int
|
||||
irc_cmd_send_join (t_irc_server *server, char *arguments)
|
||||
{
|
||||
server_sendf (server, "JOIN %s\r\n", arguments);
|
||||
if (string_is_channel (arguments))
|
||||
server_sendf (server, "JOIN %s\r\n", arguments);
|
||||
else
|
||||
server_sendf (server, "JOIN #%s\r\n", arguments);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1690,10 +1832,17 @@ irc_cmd_send_voice (t_irc_server *server, int argc, char **argv)
|
||||
|
||||
if (BUFFER_IS_CHANNEL(gui_current_window->buffer))
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
if (argc == 0)
|
||||
server_sendf (server, "MODE %s +v %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
server->nick);
|
||||
else
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
server_sendf (server, "MODE %s +v %s\r\n",
|
||||
CHANNEL(gui_current_window->buffer)->name,
|
||||
argv[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+286
-254
@@ -150,7 +150,7 @@ server_init_with_url (char *irc_url, t_irc_server *server)
|
||||
else
|
||||
return -1;
|
||||
|
||||
url = strdup (irc_url);
|
||||
url = strdup (pos);
|
||||
pos_server = strchr (url, '@');
|
||||
if (pos_server)
|
||||
{
|
||||
@@ -161,13 +161,13 @@ server_init_with_url (char *irc_url, t_irc_server *server)
|
||||
free (url);
|
||||
return -1;
|
||||
}
|
||||
pos2 = strchr (pos, ':');
|
||||
pos2 = strchr (url, ':');
|
||||
if (pos2)
|
||||
{
|
||||
pos2[0] = '\0';
|
||||
server->password = strdup (pos2 + 1);
|
||||
}
|
||||
server->nick1 = strdup (pos);
|
||||
server->nick1 = strdup (url);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -182,7 +182,7 @@ server_init_with_url (char *irc_url, t_irc_server *server)
|
||||
free (url);
|
||||
return -1;
|
||||
}
|
||||
pos_server = url + 6;
|
||||
pos_server = url;
|
||||
}
|
||||
if (!pos_server[0])
|
||||
{
|
||||
@@ -523,6 +523,42 @@ server_msgq_add_msg (t_irc_server *server, char *msg)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* server_msgq_add_unterminated: add an unterminated message to queue
|
||||
*/
|
||||
|
||||
void
|
||||
server_msgq_add_unterminated (t_irc_server *server, char *string)
|
||||
{
|
||||
if (server->unterminated_message)
|
||||
{
|
||||
server->unterminated_message =
|
||||
(char *) realloc (server->unterminated_message,
|
||||
strlen (server->unterminated_message) +
|
||||
strlen (string) + 1);
|
||||
if (!server->unterminated_message)
|
||||
{
|
||||
irc_display_prefix (server->buffer, PREFIX_ERROR);
|
||||
gui_printf (server->buffer,
|
||||
_("%s not enough memory for received IRC message\n"),
|
||||
WEECHAT_ERROR);
|
||||
}
|
||||
else
|
||||
strcat (server->unterminated_message, string);
|
||||
}
|
||||
else
|
||||
{
|
||||
server->unterminated_message = strdup (string);
|
||||
if (!server->unterminated_message)
|
||||
{
|
||||
irc_display_prefix (server->buffer, PREFIX_ERROR);
|
||||
gui_printf (server->buffer,
|
||||
_("%s not enough memory for received IRC message\n"),
|
||||
WEECHAT_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* server_msgq_add_buffer: explode received buffer, creating queued messages
|
||||
*/
|
||||
@@ -543,44 +579,27 @@ server_msgq_add_buffer (t_irc_server *server, char *buffer)
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = strstr (buffer, "\n");
|
||||
if (pos)
|
||||
pos = strstr (buffer, "\r");
|
||||
if (pos && !pos[1])
|
||||
{
|
||||
pos[0] = '\0';
|
||||
server_msgq_add_msg (server, buffer);
|
||||
buffer = pos + 1;
|
||||
server_msgq_add_unterminated (server, buffer);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (server->unterminated_message)
|
||||
pos = strstr (buffer, "\n");
|
||||
if (pos)
|
||||
{
|
||||
server->unterminated_message =
|
||||
(char *) realloc (server->unterminated_message,
|
||||
strlen (server->unterminated_message) +
|
||||
strlen (buffer) + 1);
|
||||
if (!server->unterminated_message)
|
||||
{
|
||||
irc_display_prefix (server->buffer, PREFIX_ERROR);
|
||||
gui_printf (server->buffer,
|
||||
_("%s not enough memory for received IRC message\n"),
|
||||
WEECHAT_ERROR);
|
||||
}
|
||||
else
|
||||
strcat (server->unterminated_message, buffer);
|
||||
pos[0] = '\0';
|
||||
server_msgq_add_msg (server, buffer);
|
||||
buffer = pos + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
server->unterminated_message = strdup (buffer);
|
||||
if (!server->unterminated_message)
|
||||
{
|
||||
irc_display_prefix (server->buffer, PREFIX_ERROR);
|
||||
gui_printf (server->buffer,
|
||||
_("%s not enough memory for received IRC message\n"),
|
||||
WEECHAT_ERROR);
|
||||
}
|
||||
server_msgq_add_unterminated (server, buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -663,8 +682,8 @@ server_msgq_flush ()
|
||||
case -3:
|
||||
irc_display_prefix (recv_msgq->server->buffer, PREFIX_ERROR);
|
||||
gui_printf (recv_msgq->server->buffer,
|
||||
_("%s Unknown command: cmd=%s, args=%s\n"),
|
||||
WEECHAT_WARNING, command, args);
|
||||
_("%s Unknown command: cmd=%s, host=%s, args=%s\n"),
|
||||
WEECHAT_WARNING, command, host, args);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -900,12 +919,12 @@ void
|
||||
convbase64_8x3_to_6x4(char *from, char* to)
|
||||
{
|
||||
|
||||
unsigned char base64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
unsigned char base64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
to[0] = base64_table [ (from[0] & 0xfc) >> 2 ];
|
||||
to[1] = base64_table [ ((from[0] & 0x03) << 4) + ((from[1] & 0xf0) >> 4) ];
|
||||
to[2] = base64_table [ ((from[1] & 0x0f) << 2) + ((from[2] & 0xc0) >> 6) ];
|
||||
to[3] = base64_table [ from[2] & 0x3f ];
|
||||
to[0] = base64_table [ (from[0] & 0xfc) >> 2 ];
|
||||
to[1] = base64_table [ ((from[0] & 0x03) << 4) + ((from[1] & 0xf0) >> 4) ];
|
||||
to[2] = base64_table [ ((from[1] & 0x0f) << 2) + ((from[2] & 0xc0) >> 6) ];
|
||||
to[3] = base64_table [ from[2] & 0x3f ];
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -916,91 +935,92 @@ void
|
||||
base64encode(char *from, char *to)
|
||||
{
|
||||
|
||||
char *f, *t;
|
||||
int from_len;
|
||||
char *f, *t;
|
||||
int from_len;
|
||||
|
||||
from_len = strlen(from);
|
||||
from_len = strlen(from);
|
||||
|
||||
f = from;
|
||||
t = to;
|
||||
f = from;
|
||||
t = to;
|
||||
|
||||
while(from_len >= 3)
|
||||
while(from_len >= 3)
|
||||
{
|
||||
convbase64_8x3_to_6x4(f, t);
|
||||
f += 3 * sizeof(*f);
|
||||
t += 4 * sizeof(*t);
|
||||
from_len -= 3;
|
||||
convbase64_8x3_to_6x4(f, t);
|
||||
f += 3 * sizeof(*f);
|
||||
t += 4 * sizeof(*t);
|
||||
from_len -= 3;
|
||||
}
|
||||
|
||||
if (from_len > 0)
|
||||
if (from_len > 0)
|
||||
{
|
||||
char rest[3] = { 0, 0, 0 };
|
||||
switch(from_len)
|
||||
char rest[3] = { 0, 0, 0 };
|
||||
switch(from_len)
|
||||
{
|
||||
case 1 :
|
||||
rest[0] = f[0];
|
||||
convbase64_8x3_to_6x4(rest, t);
|
||||
t[2] = t[3] = '=';
|
||||
break;
|
||||
rest[0] = f[0];
|
||||
convbase64_8x3_to_6x4(rest, t);
|
||||
t[2] = t[3] = '=';
|
||||
break;
|
||||
case 2 :
|
||||
rest[0] = f[0];
|
||||
rest[1] = f[1];
|
||||
convbase64_8x3_to_6x4(rest, t);
|
||||
t[3] = '=';
|
||||
break;
|
||||
rest[0] = f[0];
|
||||
rest[1] = f[1];
|
||||
convbase64_8x3_to_6x4(rest, t);
|
||||
t[3] = '=';
|
||||
break;
|
||||
}
|
||||
t[4] = 0;
|
||||
t[4] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* pass_httpproxy: establish connection/authentification to an http proxy
|
||||
* return :
|
||||
* - 0 if connexion throw proxy was successful
|
||||
* - 1 if connexion fails
|
||||
* return :
|
||||
* - 0 if connexion throw proxy was successful
|
||||
* - 1 if connexion fails
|
||||
*/
|
||||
|
||||
int
|
||||
pass_httpproxy(t_irc_server *server)
|
||||
pass_httpproxy(int sock, char *address, int port)
|
||||
{
|
||||
|
||||
char buffer[256];
|
||||
char authbuf[128]; // seems to be enougth to store username + password
|
||||
char authbuf_base64[196]; // enougth to store base64 encoded authbuf
|
||||
int n, m;
|
||||
char buffer[256];
|
||||
char authbuf[128]; // seems to be enougth to store username + password
|
||||
char authbuf_base64[196]; // enougth to store base64 encoded authbuf
|
||||
int n, m;
|
||||
|
||||
if (strlen(cfg_proxy_username) > 0)
|
||||
if (strlen(cfg_proxy_username) > 0)
|
||||
{
|
||||
// authentification
|
||||
snprintf(authbuf, sizeof(authbuf), "%s:%s", cfg_proxy_username, cfg_proxy_password);
|
||||
base64encode(authbuf, authbuf_base64);
|
||||
n = snprintf(buffer, sizeof(buffer), "CONNECT %s:%d HTTP/1.0\r\nProxy-Authorization: Basic %s\r\n\r\n", server->address, server->port, authbuf_base64);
|
||||
// authentification
|
||||
snprintf(authbuf, sizeof(authbuf), "%s:%s", cfg_proxy_username, cfg_proxy_password);
|
||||
base64encode(authbuf, authbuf_base64);
|
||||
n = snprintf(buffer, sizeof(buffer), "CONNECT %s:%d HTTP/1.0\r\nProxy-Authorization: Basic %s\r\n\r\n", address, port, authbuf_base64);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// no authentification
|
||||
n = snprintf(buffer, sizeof(buffer), "CONNECT %s:%d HTTP/1.0\r\n\r\n", server->address, server->port);
|
||||
// no authentification
|
||||
n = snprintf(buffer, sizeof(buffer), "CONNECT %s:%d HTTP/1.0\r\n\r\n", address, port);
|
||||
}
|
||||
|
||||
m = send (server->sock, buffer, n, 0);
|
||||
if (n != m)
|
||||
return 1;
|
||||
m = send (sock, buffer, n, 0);
|
||||
if (n != m)
|
||||
return 1;
|
||||
|
||||
n = recv(server->sock, buffer, sizeof(buffer), 0);
|
||||
n = recv(sock, buffer, sizeof(buffer), 0);
|
||||
|
||||
/* success result must be like : "HTTP/1.0 200 OK" */
|
||||
if (n < 12)
|
||||
return 1;
|
||||
/* success result must be like : "HTTP/1.0 200 OK" */
|
||||
if (n < 12)
|
||||
return 1;
|
||||
|
||||
if (memcmp (buffer, "HTTP/", 5) || memcmp (buffer + 9, "200", 3))
|
||||
return 1;
|
||||
if (memcmp (buffer, "HTTP/", 5) || memcmp (buffer + 9, "200", 3))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* resolve: resolve hostname on its IP address
|
||||
* (works with ipv4 and ipv6)
|
||||
* return :
|
||||
* return :
|
||||
* - 0 if resolution was successful
|
||||
* - 1 if resolution fails
|
||||
*/
|
||||
@@ -1042,207 +1062,210 @@ resolve (char *hostname, char *ip, int *version)
|
||||
|
||||
/*
|
||||
* pass_socks4proxy: establish connection/authentification throw a socks4 proxy
|
||||
* return :
|
||||
* - 0 if connexion throw proxy was successful
|
||||
* - 1 if connexion fails
|
||||
* return :
|
||||
* - 0 if connexion throw proxy was successful
|
||||
* - 1 if connexion fails
|
||||
*/
|
||||
|
||||
int
|
||||
pass_socks4proxy(t_irc_server *server)
|
||||
pass_socks4proxy(int sock, char *address, int port, char *username)
|
||||
{
|
||||
/*
|
||||
* socks4 protocol is explain here:
|
||||
* http://archive.socks.permeo.com/protocol/socks4.protocol
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* socks4 protocol is explain here:
|
||||
* http://archive.socks.permeo.com/protocol/socks4.protocol
|
||||
*
|
||||
*/
|
||||
|
||||
struct s_socks4
|
||||
{
|
||||
char version; /* 1 byte */ /* socks version : 4 or 5 */
|
||||
char method; /* 1 byte */ /* socks method : connect (1) or bind (2) */
|
||||
unsigned short port; /* 2 bytes */ /* destination port */
|
||||
unsigned long address; /* 4 bytes */ /* destination address */
|
||||
char user[64]; /* username (64 characters seems to be enought) */
|
||||
} socks4;
|
||||
unsigned char buffer[24];
|
||||
char ip_addr[NI_MAXHOST];
|
||||
struct s_socks4
|
||||
{
|
||||
char version; /* 1 byte */ /* socks version : 4 or 5 */
|
||||
char method; /* 1 byte */ /* socks method : connect (1) or bind (2) */
|
||||
unsigned short port; /* 2 bytes */ /* destination port */
|
||||
unsigned long address; /* 4 bytes */ /* destination address */
|
||||
char user[64]; /* username (64 characters seems to be enought) */
|
||||
} socks4;
|
||||
unsigned char buffer[24];
|
||||
char ip_addr[NI_MAXHOST];
|
||||
|
||||
socks4.version = 4;
|
||||
socks4.method = 1;
|
||||
socks4.port = htons (server->port);
|
||||
resolve(server->address, ip_addr, NULL);
|
||||
socks4.address = inet_addr (ip_addr);
|
||||
strncpy (socks4.user, server->username, sizeof(socks4.user) - 1);
|
||||
socks4.version = 4;
|
||||
socks4.method = 1;
|
||||
socks4.port = htons (port);
|
||||
resolve(address, ip_addr, NULL);
|
||||
socks4.address = inet_addr (ip_addr);
|
||||
strncpy (socks4.user, username, sizeof(socks4.user) - 1);
|
||||
|
||||
send (server->sock, (char *) &socks4, 8 + strlen(socks4.user) + 1, 0);
|
||||
recv (server->sock, buffer, sizeof(buffer), 0);
|
||||
send (sock, (char *) &socks4, 8 + strlen(socks4.user) + 1, 0);
|
||||
recv (sock, buffer, sizeof(buffer), 0);
|
||||
|
||||
if (buffer[0] == 0 && buffer[1] == 90)
|
||||
return 0;
|
||||
if (buffer[0] == 0 && buffer[1] == 90)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* pass_socks5proxy: establish connection/authentification throw a socks5 proxy
|
||||
* return :
|
||||
* - 0 if connexion throw proxy was successful
|
||||
* - 1 if connexion fails
|
||||
* return :
|
||||
* - 0 if connexion throw proxy was successful
|
||||
* - 1 if connexion fails
|
||||
*/
|
||||
|
||||
int
|
||||
pass_socks5proxy(t_irc_server *server)
|
||||
pass_socks5proxy(int sock, char *address, int port)
|
||||
{
|
||||
/*
|
||||
* socks5 protocol is explained in RFC 1928
|
||||
* socks5 authentication with username/pass is explained in RFC 1929
|
||||
*/
|
||||
/*
|
||||
* socks5 protocol is explained in RFC 1928
|
||||
* socks5 authentication with username/pass is explained in RFC 1929
|
||||
*/
|
||||
|
||||
struct s_sock5
|
||||
{
|
||||
char version; /* 1 byte */ /* socks version : 4 or 5 */
|
||||
char nmethods; /* 1 byte */ /* size in byte(s) of field 'method', here 1 byte */
|
||||
char method; /* 1-255 bytes */ /* socks method : noauth (0), auth(user/pass) (2), ... */
|
||||
} socks5;
|
||||
unsigned char buffer[288];
|
||||
int username_len, password_len, addr_len, addr_buffer_len;
|
||||
unsigned char *addr_buffer;
|
||||
|
||||
socks5.version = 5;
|
||||
socks5.nmethods = 1;
|
||||
|
||||
if (strlen(cfg_proxy_username) > 0)
|
||||
/* with authentication */
|
||||
socks5.method = 2;
|
||||
else
|
||||
/* without authentication */
|
||||
socks5.method = 0;
|
||||
|
||||
send (server->sock, (char *) &socks5, sizeof(socks5), 0);
|
||||
/* server socks5 must respond with 2 bytes */
|
||||
if (recv (server->sock, buffer, 2, 0) != 2)
|
||||
return 1;
|
||||
|
||||
if (strlen(cfg_proxy_username) > 0)
|
||||
struct s_sock5
|
||||
{
|
||||
/* with authentication */
|
||||
/* -> socks server must respond with :
|
||||
* - socks version (buffer[0]) = 5 => socks5
|
||||
* - socks method (buffer[1]) = 2 => authentication
|
||||
*/
|
||||
char version; /* 1 byte */ /* socks version : 4 or 5 */
|
||||
char nmethods; /* 1 byte */ /* size in byte(s) of field 'method', here 1 byte */
|
||||
char method; /* 1-255 bytes */ /* socks method : noauth (0), auth(user/pass) (2), ... */
|
||||
} socks5;
|
||||
unsigned char buffer[288];
|
||||
int username_len, password_len, addr_len, addr_buffer_len;
|
||||
unsigned char *addr_buffer;
|
||||
|
||||
socks5.version = 5;
|
||||
socks5.nmethods = 1;
|
||||
|
||||
if (strlen(cfg_proxy_username) > 0)
|
||||
/* with authentication */
|
||||
socks5.method = 2;
|
||||
else
|
||||
/* without authentication */
|
||||
socks5.method = 0;
|
||||
|
||||
send (sock, (char *) &socks5, sizeof(socks5), 0);
|
||||
/* server socks5 must respond with 2 bytes */
|
||||
if (recv (sock, buffer, 2, 0) != 2)
|
||||
return 1;
|
||||
|
||||
if (strlen(cfg_proxy_username) > 0)
|
||||
{
|
||||
/* with authentication */
|
||||
/* -> socks server must respond with :
|
||||
* - socks version (buffer[0]) = 5 => socks5
|
||||
* - socks method (buffer[1]) = 2 => authentication
|
||||
*/
|
||||
|
||||
//if (!(buffer[0] == 5 && buffer[1] == 2))
|
||||
if (buffer[0] != 5 || buffer[1] != 2)
|
||||
return 1;
|
||||
//if (!(buffer[0] == 5 && buffer[1] == 2))
|
||||
if (buffer[0] != 5 || buffer[1] != 2)
|
||||
return 1;
|
||||
|
||||
/* authentication as in RFC 1929 */
|
||||
username_len = strlen(cfg_proxy_username);
|
||||
password_len = strlen(cfg_proxy_password);
|
||||
/* authentication as in RFC 1929 */
|
||||
username_len = strlen(cfg_proxy_username);
|
||||
password_len = strlen(cfg_proxy_password);
|
||||
|
||||
/* make username/password buffer */
|
||||
buffer[0] = 1;
|
||||
buffer[1] = (unsigned char) username_len;
|
||||
memcpy(buffer + 2, cfg_proxy_username, username_len);
|
||||
buffer[2 + username_len] = (unsigned char) password_len;
|
||||
memcpy(buffer + 3 + username_len, cfg_proxy_password, password_len);
|
||||
/* make username/password buffer */
|
||||
buffer[0] = 1;
|
||||
buffer[1] = (unsigned char) username_len;
|
||||
memcpy(buffer + 2, cfg_proxy_username, username_len);
|
||||
buffer[2 + username_len] = (unsigned char) password_len;
|
||||
memcpy(buffer + 3 + username_len, cfg_proxy_password, password_len);
|
||||
|
||||
send (server->sock, buffer, 3 + username_len + password_len, 0);
|
||||
send (sock, buffer, 3 + username_len + password_len, 0);
|
||||
|
||||
/* server socks5 must respond with 2 bytes */
|
||||
if (recv (server->sock, buffer, 2, 0) != 2)
|
||||
return 1;
|
||||
/* server socks5 must respond with 2 bytes */
|
||||
if (recv (sock, buffer, 2, 0) != 2)
|
||||
return 1;
|
||||
|
||||
/* buffer[1] = auth state, must be 0 for success */
|
||||
if (buffer[1] != 0)
|
||||
return 1;
|
||||
/* buffer[1] = auth state, must be 0 for success */
|
||||
if (buffer[1] != 0)
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* without authentication */
|
||||
/* -> socks server must respond with :
|
||||
* - socks version (buffer[0]) = 5 => socks5
|
||||
* - socks method (buffer[1]) = 0 => no authentication
|
||||
*/
|
||||
if (!(buffer[0] == 5 && buffer[1] == 0))
|
||||
return 1;
|
||||
/* without authentication */
|
||||
/* -> socks server must respond with :
|
||||
* - socks version (buffer[0]) = 5 => socks5
|
||||
* - socks method (buffer[1]) = 0 => no authentication
|
||||
*/
|
||||
if (!(buffer[0] == 5 && buffer[1] == 0))
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* authentication successful then giving address/port to connect */
|
||||
addr_len = strlen(server->address);
|
||||
addr_buffer_len = 4 + 1 + addr_len + 2;
|
||||
addr_buffer = (unsigned char *) malloc ( addr_buffer_len * sizeof(*addr_buffer));
|
||||
if (!addr_buffer)
|
||||
return 1;
|
||||
addr_buffer[0] = 5; /* version 5 */
|
||||
addr_buffer[1] = 1; /* command: 1 for connect */
|
||||
addr_buffer[2] = 0; /* reserved */
|
||||
addr_buffer[3] = 3; /* address type : ipv4 (1), domainname (3), ipv6 (4) */
|
||||
addr_buffer[4] = (unsigned char) addr_len;
|
||||
memcpy (addr_buffer + 5, server->address, addr_len); /* server address */
|
||||
*((unsigned short *) (addr_buffer + 5 + addr_len)) = htons (server->port); /* server port */
|
||||
/* authentication successful then giving address/port to connect */
|
||||
addr_len = strlen(address);
|
||||
addr_buffer_len = 4 + 1 + addr_len + 2;
|
||||
addr_buffer = (unsigned char *) malloc ( addr_buffer_len * sizeof(*addr_buffer));
|
||||
if (!addr_buffer)
|
||||
return 1;
|
||||
addr_buffer[0] = 5; /* version 5 */
|
||||
addr_buffer[1] = 1; /* command: 1 for connect */
|
||||
addr_buffer[2] = 0; /* reserved */
|
||||
addr_buffer[3] = 3; /* address type : ipv4 (1), domainname (3), ipv6 (4) */
|
||||
addr_buffer[4] = (unsigned char) addr_len;
|
||||
memcpy (addr_buffer + 5, address, addr_len); /* server address */
|
||||
*((unsigned short *) (addr_buffer + 5 + addr_len)) = htons (port); /* server port */
|
||||
|
||||
send (server->sock, addr_buffer, addr_buffer_len, 0);
|
||||
free(addr_buffer);
|
||||
send (sock, addr_buffer, addr_buffer_len, 0);
|
||||
free(addr_buffer);
|
||||
|
||||
/* dialog with proxy server */
|
||||
if (recv (server->sock, buffer, 4, 0) != 4)
|
||||
return 1;
|
||||
/* dialog with proxy server */
|
||||
if (recv (sock, buffer, 4, 0) != 4)
|
||||
return 1;
|
||||
|
||||
if (!(buffer[0] == 5 && buffer[1] == 0))
|
||||
return 1;
|
||||
if (!(buffer[0] == 5 && buffer[1] == 0))
|
||||
return 1;
|
||||
|
||||
switch(buffer[3]) {
|
||||
/* buffer[3] = address type */
|
||||
case 1 :
|
||||
/* ipv4
|
||||
* server socks return server bound address and port
|
||||
* address of 4 bytes and port of 2 bytes (= 6 bytes)
|
||||
*/
|
||||
if (recv (server->sock, buffer, 6, 0) != 6)
|
||||
return 1;
|
||||
break;
|
||||
case 3:
|
||||
/* domainname
|
||||
* server socks return server bound address and port
|
||||
*/
|
||||
/* reading address length */
|
||||
if (recv (server->sock, buffer, 1, 0) != 1)
|
||||
return 1;
|
||||
addr_len = buffer[0];
|
||||
/* reading address + port = addr_len + 2 */
|
||||
if (recv (server->sock, buffer, addr_len + 2, 0) != (addr_len + 2))
|
||||
return 1;
|
||||
break;
|
||||
case 4 :
|
||||
/* ipv6
|
||||
* server socks return server bound address and port
|
||||
* address of 16 bytes and port of 2 bytes (= 18 bytes)
|
||||
*/
|
||||
if (recv (server->sock, buffer, 18, 0) != 18)
|
||||
return 1;
|
||||
break;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
switch(buffer[3]) {
|
||||
/* buffer[3] = address type */
|
||||
case 1 :
|
||||
/* ipv4
|
||||
* server socks return server bound address and port
|
||||
* address of 4 bytes and port of 2 bytes (= 6 bytes)
|
||||
*/
|
||||
if (recv (sock, buffer, 6, 0) != 6)
|
||||
return 1;
|
||||
break;
|
||||
case 3:
|
||||
/* domainname
|
||||
* server socks return server bound address and port
|
||||
*/
|
||||
/* reading address length */
|
||||
if (recv (sock, buffer, 1, 0) != 1)
|
||||
return 1;
|
||||
addr_len = buffer[0];
|
||||
/* reading address + port = addr_len + 2 */
|
||||
if (recv (sock, buffer, addr_len + 2, 0) != (addr_len + 2))
|
||||
return 1;
|
||||
break;
|
||||
case 4 :
|
||||
/* ipv6
|
||||
* server socks return server bound address and port
|
||||
* address of 16 bytes and port of 2 bytes (= 18 bytes)
|
||||
*/
|
||||
if (recv (sock, buffer, 18, 0) != 18)
|
||||
return 1;
|
||||
break;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* pass_proxy: establish connection/authentification to a proxy
|
||||
* return :
|
||||
* - 0 if connexion throw proxy was successful
|
||||
* - 1 if connexion fails
|
||||
* return :
|
||||
* - 0 if connexion throw proxy was successful
|
||||
* - 1 if connexion fails
|
||||
*/
|
||||
int
|
||||
pass_proxy(t_irc_server *server)
|
||||
{
|
||||
if (strcmp(cfg_proxy_type_values[cfg_proxy_type], "http") == 0)
|
||||
return pass_httpproxy(server);
|
||||
if (strcmp(cfg_proxy_type_values[cfg_proxy_type], "socks4") == 0)
|
||||
return pass_socks4proxy(server);
|
||||
if (strcmp(cfg_proxy_type_values[cfg_proxy_type], "socks5") == 0)
|
||||
return pass_socks5proxy(server);
|
||||
|
||||
return 1;
|
||||
int
|
||||
pass_proxy(int sock, char *address, int port, char *username)
|
||||
{
|
||||
if (strcmp(cfg_proxy_type_values[cfg_proxy_type], "http") == 0)
|
||||
return pass_httpproxy(sock, address, port);
|
||||
if (strcmp(cfg_proxy_type_values[cfg_proxy_type], "socks4") == 0)
|
||||
return pass_socks4proxy(sock, address, port, username);
|
||||
if (strcmp(cfg_proxy_type_values[cfg_proxy_type], "socks5") == 0)
|
||||
return pass_socks5proxy(sock, address, port);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1291,7 +1314,7 @@ server_child (t_irc_server *server)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (pass_proxy(server))
|
||||
if (pass_proxy(server->sock, server->address, server->port, server->username))
|
||||
{
|
||||
write(server->child_write, "4", 1);
|
||||
freeaddrinfo (res);
|
||||
@@ -1426,7 +1449,10 @@ server_connect (t_irc_server *server)
|
||||
server->child_write = child_pipe[1];
|
||||
|
||||
/* create socket and set options */
|
||||
server->sock = socket ((server->ipv6) ? AF_INET6 : AF_INET, SOCK_STREAM, 0);
|
||||
if (cfg_proxy_use)
|
||||
server->sock = socket ((cfg_proxy_ipv6) ? AF_INET6 : AF_INET, SOCK_STREAM, 0);
|
||||
else
|
||||
server->sock = socket ((server->ipv6) ? AF_INET6 : AF_INET, SOCK_STREAM, 0);
|
||||
if (server->sock == -1)
|
||||
{
|
||||
irc_display_prefix (server->buffer, PREFIX_ERROR);
|
||||
@@ -1583,6 +1609,9 @@ server_search (char *servername)
|
||||
{
|
||||
t_irc_server *ptr_server;
|
||||
|
||||
if (!servername)
|
||||
return NULL;
|
||||
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
@@ -1621,6 +1650,9 @@ server_name_already_exists (char *name)
|
||||
{
|
||||
t_irc_server *ptr_server;
|
||||
|
||||
if (!name)
|
||||
return 0;
|
||||
|
||||
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (strcmp (ptr_server->name, name) == 0)
|
||||
|
||||
+109
-61
@@ -98,7 +98,7 @@ struct t_irc_nick
|
||||
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 is_halfop; /* half operator privileges? */
|
||||
int has_voice; /* nick has voice? */
|
||||
int is_away; /* = 1 if nick is away, otherwise 0 */
|
||||
int color; /* color for nickname in chat window */
|
||||
@@ -166,10 +166,10 @@ struct t_irc_server
|
||||
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
|
||||
#ifdef HAVE_GNUTLS
|
||||
int ssl_connected; /* = 1 if connected with SSL */
|
||||
gnutls_session gnutls_sess; /* gnutls session (only if SSL is used) */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
char *unterminated_message; /* beginning of a message in input buf */
|
||||
char *nick; /* current nickname */
|
||||
@@ -203,7 +203,7 @@ struct t_irc_command
|
||||
/* function called when user enters cmd */
|
||||
int (*cmd_function_1arg)(t_irc_server *, char *);
|
||||
/* function called when user enters cmd */
|
||||
int (*recv_function)(t_irc_server *, char *, char *);
|
||||
int (*recv_function)(t_irc_server *, char *, char *, char *);
|
||||
/* function called when cmd is received */
|
||||
};
|
||||
|
||||
@@ -218,7 +218,7 @@ struct t_irc_message
|
||||
t_irc_message *next_message; /* link to next message */
|
||||
};
|
||||
|
||||
/* DCC */
|
||||
/* DCC types */
|
||||
|
||||
typedef struct t_irc_dcc t_irc_dcc;
|
||||
|
||||
@@ -242,13 +242,39 @@ struct t_irc_dcc
|
||||
unsigned long size; /* file size */
|
||||
unsigned long pos; /* number of bytes received/sent */
|
||||
unsigned long ack; /* number of bytes received OK */
|
||||
unsigned long start_resume; /* start of resume (in bytes) */
|
||||
time_t last_check_time; /* last time we looked at bytes sent/rcv*/
|
||||
unsigned long last_check_pos; /* bytes sent/recv at last check */
|
||||
unsigned long bytes_per_sec; /* bytes per second */
|
||||
time_t last_activity; /* time of last byte received/sent */
|
||||
t_irc_dcc *prev_dcc; /* link to previous dcc file/chat */
|
||||
t_irc_dcc *next_dcc; /* link to next dcc file/chat */
|
||||
};
|
||||
|
||||
/* ignore types */
|
||||
|
||||
/* pre-defined ignore types, all other types are made with IRC commands */
|
||||
/* for example: part join quit notice invite ... */
|
||||
|
||||
#define IGNORE_ACTION "action"
|
||||
#define IGNORE_CTCP "ctcp"
|
||||
#define IGNORE_DCC "dcc"
|
||||
#define IGNORE_PRIVATE "pv"
|
||||
|
||||
typedef struct t_irc_ignore t_irc_ignore;
|
||||
|
||||
struct t_irc_ignore
|
||||
{
|
||||
char *mask; /* nickname or mask */
|
||||
char *type; /* type of ignore */
|
||||
char *channel_name; /* name of channel, "*" == all */
|
||||
char *server_name; /* name of server, "*" == all */
|
||||
t_irc_ignore *prev_ignore; /* pointer to previous ignore */
|
||||
t_irc_ignore *next_ignore; /* pointer to next ignore */
|
||||
};
|
||||
|
||||
/* variables */
|
||||
|
||||
extern t_irc_command irc_commands[];
|
||||
extern t_irc_server *irc_servers;
|
||||
extern t_irc_message *recv_msgq, *msgq_last_msg;
|
||||
@@ -256,6 +282,9 @@ extern int check_away;
|
||||
extern t_irc_dcc *dcc_list;
|
||||
extern char *dcc_status_string[6];
|
||||
extern char *channel_modes;
|
||||
extern char *ignore_types[];
|
||||
extern t_irc_ignore *irc_ignore;
|
||||
extern t_irc_ignore *irc_last_ignore;
|
||||
|
||||
/* server functions (irc-server.c) */
|
||||
|
||||
@@ -288,11 +317,11 @@ 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 pass_httpproxy(int, char*, int);
|
||||
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);
|
||||
extern int pass_socks4proxy(int, char*, int, char*);
|
||||
extern int pass_socks5proxy(int, char*, int);
|
||||
extern int pass_proxy(int, char*, int, char*);
|
||||
|
||||
/* channel functions (irc-channel.c) */
|
||||
|
||||
@@ -313,6 +342,7 @@ extern void channel_print_log (t_irc_channel *);
|
||||
|
||||
/* nick functions (irc-nick.c) */
|
||||
|
||||
extern int nick_find_color (t_irc_nick *);
|
||||
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 *);
|
||||
@@ -330,6 +360,8 @@ 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 void dcc_accept_resume (t_irc_server *, char *, int, unsigned long);
|
||||
extern void dcc_start_resume (t_irc_server *, char *, int, unsigned long);
|
||||
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 *);
|
||||
@@ -347,10 +379,13 @@ extern void irc_display_server (t_irc_server *ptr_server);
|
||||
|
||||
/* IRC protocol (irc-commands.c) */
|
||||
|
||||
extern int irc_is_highlight (char *, char *);
|
||||
extern int irc_recv_command (t_irc_server *, char *, char *, char *, char *);
|
||||
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_ame (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_amsg (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 *);
|
||||
@@ -408,57 +443,70 @@ extern int irc_cmd_send_who (t_irc_server *, char *);
|
||||
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 *);
|
||||
extern int irc_cmd_recv_server_reply (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_topic (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_001 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_004 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_301 (t_irc_server *, char *, char *);
|
||||
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 *);
|
||||
extern int irc_cmd_recv_320 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_321 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_322 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_323 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_324 (t_irc_server *, char *, char *);
|
||||
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 *);
|
||||
extern int irc_cmd_recv_error (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_invite (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_join (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_kick (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_kill (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_mode (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_nick (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_notice (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_part (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_ping (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_pong (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_privmsg (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_quit (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_server_msg (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_server_reply (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_topic (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_001 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_004 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_221 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_301 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_302 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_303 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_305 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_306 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_307 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_311 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_312 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_313 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_314 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_315 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_317 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_318 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_319 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_320 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_321 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_322 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_323 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_324 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_329 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_331 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_332 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_333 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_341 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_344 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_345 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_351 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_352 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_353 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_365 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_366 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_367 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_368 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_433 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_438 (t_irc_server *, char *, char *, char *);
|
||||
extern int irc_cmd_recv_671 (t_irc_server *, char *, char *, char *);
|
||||
|
||||
/* ignore functions (irc-ignore.c) */
|
||||
|
||||
extern int ignore_check (char *, char *, char *, char *);
|
||||
extern t_irc_ignore *ignore_add (char *, char *, char *, char *);
|
||||
extern t_irc_ignore *ignore_add_from_config (char *);
|
||||
extern void ignore_free_all ();
|
||||
extern int ignore_search_free (char *, char *, char *, char *);
|
||||
extern int ignore_search_free_by_number (int);
|
||||
extern void ignore_print_log ();
|
||||
|
||||
#endif /* irc.h */
|
||||
|
||||
@@ -25,12 +25,11 @@ if PLUGIN_PYTHON
|
||||
python_dir = python
|
||||
endif
|
||||
|
||||
# if PLUGIN_RUBY
|
||||
# ruby_dir = ruby
|
||||
# endif
|
||||
if PLUGIN_RUBY
|
||||
ruby_dir = ruby
|
||||
endif
|
||||
|
||||
# SUBDIRS = $(perl_dir) $(python_dir) $(ruby_dir)
|
||||
SUBDIRS = $(perl_dir) $(python_dir)
|
||||
SUBDIRS = $(perl_dir) $(python_dir) $(ruby_dir)
|
||||
|
||||
noinst_LIBRARIES = lib_weechat_plugins.a
|
||||
|
||||
|
||||
+58
-35
@@ -73,7 +73,7 @@ static XS (XS_IRC_register)
|
||||
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)
|
||||
if (ascii_strcasecmp (ptr_perl_script->name, name) == 0)
|
||||
{
|
||||
perl_script_found = ptr_perl_script;
|
||||
break;
|
||||
@@ -182,12 +182,12 @@ static XS (XS_IRC_print_with_channel)
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (!server || (strcasecmp (ptr_server->name, server)) == 0)
|
||||
if (!server || (ascii_strcasecmp (ptr_server->name, server)) == 0)
|
||||
{
|
||||
for (ptr_channel = ptr_server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if (strcasecmp (ptr_channel->name, channel) == 0)
|
||||
if (ascii_strcasecmp (ptr_channel->name, channel) == 0)
|
||||
{
|
||||
ptr_buffer = ptr_channel->buffer;
|
||||
break;
|
||||
@@ -260,7 +260,7 @@ static XS (XS_IRC_command)
|
||||
command = SvPV (ST (1), integer);
|
||||
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (strcasecmp (ptr_server->name, server) == 0)
|
||||
if (ascii_strcasecmp (ptr_server->name, server) == 0)
|
||||
break;
|
||||
}
|
||||
if (!ptr_server)
|
||||
@@ -354,7 +354,7 @@ static XS (XS_IRC_add_command_handler)
|
||||
|
||||
static XS (XS_IRC_get_info)
|
||||
{
|
||||
char *arg, *info = NULL, *server;
|
||||
char *arg, *info = NULL, *server_name;
|
||||
t_irc_server *ptr_server;
|
||||
int integer;
|
||||
dXSARGS;
|
||||
@@ -364,13 +364,9 @@ static XS (XS_IRC_get_info)
|
||||
|
||||
if (items == 2)
|
||||
{
|
||||
server = SvPV (ST (0), integer);
|
||||
server_name = SvPV (ST (0), integer);
|
||||
arg = SvPV (ST (1), integer);
|
||||
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (strcasecmp (ptr_server->name, server) == 0)
|
||||
break;
|
||||
}
|
||||
ptr_server = server_search (server_name);
|
||||
if (!ptr_server)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
@@ -385,33 +381,32 @@ static XS (XS_IRC_get_info)
|
||||
arg = SvPV (ST (0), integer);
|
||||
}
|
||||
|
||||
if (ptr_server && arg)
|
||||
if (arg)
|
||||
{
|
||||
|
||||
if ( (strcasecmp (arg, "0") == 0) || (strcasecmp (arg, "version") == 0) )
|
||||
if ( (ascii_strcasecmp (arg, "0") == 0) || (ascii_strcasecmp (arg, "version") == 0) )
|
||||
{
|
||||
info = PACKAGE_STRING;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "1") == 0) || (strcasecmp (arg, "nick") == 0) )
|
||||
else if ( ptr_server && ( (ascii_strcasecmp (arg, "1") == 0) || (ascii_strcasecmp (arg, "nick") == 0) ) )
|
||||
{
|
||||
if (ptr_server->nick)
|
||||
info = ptr_server->nick;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "2") == 0) || (strcasecmp (arg, "channel") == 0) )
|
||||
else if ( (ascii_strcasecmp (arg, "2") == 0) || (ascii_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) )
|
||||
else if ( ptr_server && ( (ascii_strcasecmp (arg, "3") == 0) || (ascii_strcasecmp (arg, "server") == 0) ) )
|
||||
{
|
||||
if (ptr_server->name)
|
||||
info = ptr_server->name;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "4") == 0) || (strcasecmp (arg, "weechatdir") == 0) )
|
||||
else if ( (ascii_strcasecmp (arg, "4") == 0) || (ascii_strcasecmp (arg, "weechatdir") == 0) )
|
||||
{
|
||||
info = weechat_home;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "5") == 0) || (strcasecmp (arg, "away") == 0) )
|
||||
else if ( ptr_server && ( (ascii_strcasecmp (arg, "5") == 0) || (ascii_strcasecmp (arg, "away") == 0) ) )
|
||||
{
|
||||
XST_mIV (0, SERVER(gui_current_window->buffer)->is_away);
|
||||
XSRETURN (1);
|
||||
@@ -453,7 +448,7 @@ static XS (XS_weechat_register)
|
||||
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)
|
||||
if (ascii_strcasecmp (ptr_perl_script->name, name) == 0)
|
||||
{
|
||||
perl_script_found = ptr_perl_script;
|
||||
break;
|
||||
@@ -721,51 +716,79 @@ static XS (XS_weechat_get_info)
|
||||
{
|
||||
server_name = SvPV (ST (1), integer);
|
||||
ptr_server = server_search (server_name);
|
||||
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;
|
||||
}
|
||||
}
|
||||
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) )
|
||||
if ( (ascii_strcasecmp (arg, "0") == 0) || (ascii_strcasecmp (arg, "version") == 0) )
|
||||
{
|
||||
info = PACKAGE_STRING;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "1") == 0) || (strcasecmp (arg, "nick") == 0) )
|
||||
else if ( ptr_server && ( (ascii_strcasecmp (arg, "1") == 0) || (ascii_strcasecmp (arg, "nick") == 0) ) )
|
||||
{
|
||||
if (ptr_server->nick)
|
||||
info = ptr_server->nick;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "2") == 0) || (strcasecmp (arg, "channel") == 0) )
|
||||
else if ( (ascii_strcasecmp (arg, "2") == 0) || (ascii_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) )
|
||||
else if ( ptr_server && ( (ascii_strcasecmp (arg, "3") == 0) || (ascii_strcasecmp (arg, "server") == 0) ) )
|
||||
{
|
||||
if (ptr_server->name)
|
||||
info = ptr_server->name;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "4") == 0) || (strcasecmp (arg, "weechatdir") == 0) )
|
||||
else if ( (ascii_strcasecmp (arg, "4") == 0) || (ascii_strcasecmp (arg, "weechatdir") == 0) )
|
||||
{
|
||||
info = weechat_home;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "5") == 0) || (strcasecmp (arg, "away") == 0) )
|
||||
else if ( ptr_server && ( (ascii_strcasecmp (arg, "5") == 0) || (ascii_strcasecmp (arg, "away") == 0) ) )
|
||||
{
|
||||
XST_mIV (0, SERVER(gui_current_window->buffer)->is_away);
|
||||
XSRETURN (1);
|
||||
return;
|
||||
}
|
||||
else if ( (ascii_strcasecmp (arg, "100") == 0) || (ascii_strcasecmp (arg, "dccs") == 0) )
|
||||
{
|
||||
int nItems = 0;
|
||||
t_irc_dcc *p = dcc_list;
|
||||
|
||||
POPs;
|
||||
if (items == 2)
|
||||
POPs;
|
||||
|
||||
for(; p; p = p->next_dcc)
|
||||
{
|
||||
HV *infohash = (HV *) sv_2mortal((SV *) newHV());
|
||||
hv_store (infohash, "address32", 9, newSViv(p->addr), 0);
|
||||
hv_store (infohash, "cps", 3, newSViv(p->bytes_per_sec), 0);
|
||||
hv_store (infohash, "remote_file", 11, newSVpv(p->filename, 0), 0);
|
||||
hv_store (infohash, "local_file", 10, newSVpv(p->local_filename, 0), 0);
|
||||
hv_store (infohash, "nick", 4, newSVpv(p->nick, 0), 0);
|
||||
hv_store (infohash, "port", 4, newSViv(p->port), 0);
|
||||
hv_store (infohash, "pos", 3, newSVnv(p->pos), 0);
|
||||
hv_store (infohash, "size", 4, newSVnv(p->size), 0);
|
||||
hv_store (infohash, "status", 6, newSViv(p->status), 0);
|
||||
hv_store (infohash, "type", 4, newSViv(p->type), 0);
|
||||
|
||||
XPUSHs(newRV((SV *) infohash));
|
||||
++nItems;
|
||||
}
|
||||
XSRETURN(nItems);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info)
|
||||
XST_mPV (0, info);
|
||||
|
||||
+81
-41
@@ -43,6 +43,10 @@
|
||||
#include "python/wee-python.h"
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_RUBY
|
||||
#include "ruby/wee-ruby.h"
|
||||
#endif
|
||||
|
||||
|
||||
char *plugin_name[3] = { "Perl", "Python", "Ruby" };
|
||||
|
||||
@@ -115,15 +119,20 @@ plugin_auto_load (int plugin_type, char *directory)
|
||||
void
|
||||
plugin_init ()
|
||||
{
|
||||
#ifdef PLUGIN_PERL
|
||||
#ifdef PLUGIN_PERL
|
||||
wee_perl_init();
|
||||
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_PYTHON
|
||||
#ifdef PLUGIN_PYTHON
|
||||
wee_python_init();
|
||||
plugin_auto_load (PLUGIN_TYPE_PYTHON, "python/autoload");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_RUBY
|
||||
wee_ruby_init();
|
||||
plugin_auto_load (PLUGIN_TYPE_RUBY, "ruby/autoload");
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -133,28 +142,30 @@ plugin_init ()
|
||||
void
|
||||
plugin_load (int plugin_type, char *filename)
|
||||
{
|
||||
#ifdef PLUGINS
|
||||
#ifdef PLUGINS
|
||||
switch (plugin_type)
|
||||
{
|
||||
case PLUGIN_TYPE_PERL:
|
||||
#ifdef PLUGIN_PERL
|
||||
#ifdef PLUGIN_PERL
|
||||
wee_perl_load (filename);
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case PLUGIN_TYPE_PYTHON:
|
||||
#ifdef PLUGIN_PYTHON
|
||||
#ifdef PLUGIN_PYTHON
|
||||
wee_python_load (filename);
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case PLUGIN_TYPE_RUBY:
|
||||
/* TODO: load Ruby script */
|
||||
#ifdef PLUGIN_RUBY
|
||||
wee_ruby_load (filename);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#else
|
||||
#else
|
||||
/* make gcc happy */
|
||||
(void) plugin_type;
|
||||
(void) filename;
|
||||
#endif
|
||||
#endif /* PLUGINS */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -170,7 +181,7 @@ plugin_handler_search (t_plugin_handler *plugin_handlers, char *name)
|
||||
ptr_plugin_handler = ptr_plugin_handler->next_handler)
|
||||
{
|
||||
/* handler found */
|
||||
if (strcasecmp (ptr_plugin_handler->name, name) == 0)
|
||||
if (ascii_strcasecmp (ptr_plugin_handler->name, name) == 0)
|
||||
return ptr_plugin_handler;
|
||||
}
|
||||
/* handler not found */
|
||||
@@ -292,15 +303,15 @@ plugin_handler_free_all_type (t_plugin_handler **plugin_handlers,
|
||||
void
|
||||
plugin_event_msg (char *irc_command, char *server, char *arguments)
|
||||
{
|
||||
#ifdef PLUGINS
|
||||
#ifdef PLUGINS
|
||||
t_plugin_handler *ptr_plugin_handler;
|
||||
|
||||
for (ptr_plugin_handler = plugin_msg_handlers; ptr_plugin_handler;
|
||||
ptr_plugin_handler = ptr_plugin_handler->next_handler)
|
||||
{
|
||||
if (strcasecmp (ptr_plugin_handler->name, irc_command) == 0)
|
||||
if (ascii_strcasecmp (ptr_plugin_handler->name, irc_command) == 0)
|
||||
{
|
||||
#ifdef PLUGIN_PERL
|
||||
#ifdef PLUGIN_PERL
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PERL)
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
@@ -310,8 +321,8 @@ plugin_event_msg (char *irc_command, char *server, char *arguments)
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef PLUGIN_PYTHON
|
||||
#endif
|
||||
#ifdef PLUGIN_PYTHON
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
@@ -321,15 +332,26 @@ plugin_event_msg (char *irc_command, char *server, char *arguments)
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef PLUGIN_RUBY
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_RUBY)
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
{
|
||||
ptr_plugin_handler->running = 1;
|
||||
wee_ruby_exec (ptr_plugin_handler->function_name, server, arguments);
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else
|
||||
/* make gcc happy */
|
||||
(void) irc_command;
|
||||
(void) arguments;
|
||||
(void) server;
|
||||
#endif
|
||||
#endif /* PLUGINS */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -339,15 +361,15 @@ plugin_event_msg (char *irc_command, char *server, char *arguments)
|
||||
int
|
||||
plugin_exec_command (char *user_command, char *server, char *arguments)
|
||||
{
|
||||
#ifdef PLUGINS
|
||||
#ifdef PLUGINS
|
||||
t_plugin_handler *ptr_plugin_handler;
|
||||
|
||||
for (ptr_plugin_handler = plugin_cmd_handlers; ptr_plugin_handler;
|
||||
ptr_plugin_handler = ptr_plugin_handler->next_handler)
|
||||
{
|
||||
if (strcasecmp (ptr_plugin_handler->name, user_command) == 0)
|
||||
if (ascii_strcasecmp (ptr_plugin_handler->name, user_command) == 0)
|
||||
{
|
||||
#ifdef PLUGIN_PERL
|
||||
#ifdef PLUGIN_PERL
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PERL)
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
@@ -357,8 +379,8 @@ plugin_exec_command (char *user_command, char *server, char *arguments)
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef PLUGIN_PYTHON
|
||||
#endif
|
||||
#ifdef PLUGIN_PYTHON
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_PYTHON)
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
@@ -368,18 +390,29 @@ plugin_exec_command (char *user_command, char *server, char *arguments)
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef PLUGIN_RUBY
|
||||
if (ptr_plugin_handler->plugin_type == PLUGIN_TYPE_RUBY)
|
||||
{
|
||||
if (ptr_plugin_handler->running == 0)
|
||||
{
|
||||
ptr_plugin_handler->running = 1;
|
||||
wee_ruby_exec (ptr_plugin_handler->function_name, server, arguments);
|
||||
ptr_plugin_handler->running = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* command executed */
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else
|
||||
/* make gcc happy */
|
||||
(void) user_command;
|
||||
(void) arguments;
|
||||
(void) server;
|
||||
#endif
|
||||
#endif /* PLUGINS */
|
||||
|
||||
/* no command executed */
|
||||
return 0;
|
||||
@@ -453,30 +486,33 @@ plugin_unload (int plugin_type, char *scriptname)
|
||||
/* make gcc happy */
|
||||
(void) scriptname;
|
||||
|
||||
#ifdef PLUGINS
|
||||
#ifdef PLUGINS
|
||||
switch (plugin_type)
|
||||
{
|
||||
case PLUGIN_TYPE_PERL:
|
||||
#ifdef PLUGIN_PERL
|
||||
#ifdef PLUGIN_PERL
|
||||
/* unload one Perl script is not allowed */
|
||||
wee_perl_end ();
|
||||
wee_perl_init ();
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case PLUGIN_TYPE_PYTHON:
|
||||
#ifdef PLUGIN_PYTHON
|
||||
#ifdef PLUGIN_PYTHON
|
||||
wee_python_end ();
|
||||
wee_python_init ();
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case PLUGIN_TYPE_RUBY:
|
||||
/* TODO: unload Ruby scripts */
|
||||
#ifdef PLUGIN_RUBY
|
||||
wee_ruby_end ();
|
||||
wee_ruby_init ();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#else
|
||||
#else
|
||||
/* make gcc happy */
|
||||
(void) plugin_type;
|
||||
#endif
|
||||
#endif /* PLUGINS */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -489,11 +525,15 @@ plugin_end ()
|
||||
plugin_handler_free_all (&plugin_msg_handlers, &last_plugin_msg_handler);
|
||||
plugin_handler_free_all (&plugin_cmd_handlers, &last_plugin_cmd_handler);
|
||||
|
||||
#ifdef PLUGIN_PERL
|
||||
#ifdef PLUGIN_PERL
|
||||
wee_perl_end();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_PYTHON
|
||||
#ifdef PLUGIN_PYTHON
|
||||
wee_python_end();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_RUBY
|
||||
wee_ruby_end();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -67,6 +67,10 @@ extern t_plugin_script *perl_scripts;
|
||||
extern t_plugin_script *python_scripts;
|
||||
#endif
|
||||
|
||||
#ifdef PLUGIN_RUBY
|
||||
extern t_plugin_script *ruby_scripts;
|
||||
#endif
|
||||
|
||||
extern void plugin_auto_load (int, char *);
|
||||
extern void plugin_init ();
|
||||
extern void plugin_load (int, char *);
|
||||
|
||||
@@ -66,7 +66,7 @@ wee_python_register (PyObject *self, PyObject *args)
|
||||
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)
|
||||
if (ascii_strcasecmp (ptr_python_script->name, name) == 0)
|
||||
{
|
||||
python_script_found = ptr_python_script;
|
||||
break;
|
||||
@@ -321,7 +321,7 @@ wee_python_get_info (PyObject *self, PyObject *args)
|
||||
{
|
||||
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (strcasecmp (ptr_server->name, server) == 0)
|
||||
if (ascii_strcasecmp (ptr_server->name, server) == 0)
|
||||
break;
|
||||
}
|
||||
if (!ptr_server)
|
||||
@@ -330,38 +330,87 @@ wee_python_get_info (PyObject *self, PyObject *args)
|
||||
gui_printf (NULL,
|
||||
_("%s error: server not found for \"%s\" function\n"),
|
||||
"Python", "get_info");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr_server && arg)
|
||||
{
|
||||
if ( (strcasecmp (arg, "0") == 0) || (strcasecmp (arg, "version") == 0) )
|
||||
if ( (ascii_strcasecmp (arg, "0") == 0) || (ascii_strcasecmp (arg, "version") == 0) )
|
||||
{
|
||||
info = PACKAGE_STRING;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "1") == 0) || (strcasecmp (arg, "nick") == 0) )
|
||||
else if ( (ascii_strcasecmp (arg, "1") == 0) || (ascii_strcasecmp (arg, "nick") == 0) )
|
||||
{
|
||||
if (ptr_server->nick)
|
||||
info = ptr_server->nick;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "2") == 0) || (strcasecmp (arg, "channel") == 0) )
|
||||
else if ( (ascii_strcasecmp (arg, "2") == 0) || (ascii_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) )
|
||||
else if ( (ascii_strcasecmp (arg, "3") == 0) || (ascii_strcasecmp (arg, "server") == 0) )
|
||||
{
|
||||
if (ptr_server->name)
|
||||
info = ptr_server->name;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "4") == 0) || (strcasecmp (arg, "weechatdir") == 0) )
|
||||
else if ( (ascii_strcasecmp (arg, "4") == 0) || (ascii_strcasecmp (arg, "weechatdir") == 0) )
|
||||
{
|
||||
info = weechat_home;
|
||||
}
|
||||
else if ( (strcasecmp (arg, "5") == 0) || (strcasecmp (arg, "away") == 0) )
|
||||
else if ( (ascii_strcasecmp (arg, "5") == 0) || (ascii_strcasecmp (arg, "away") == 0) )
|
||||
{
|
||||
return Py_BuildValue ("i", SERVER(gui_current_window->buffer)->is_away);
|
||||
}
|
||||
else if ( (ascii_strcasecmp (arg, "100") == 0) || (ascii_strcasecmp (arg, "dccs") == 0) )
|
||||
{
|
||||
t_irc_dcc *p = dcc_list;
|
||||
int nbdccs = 0;
|
||||
|
||||
for(; p; p = p->next_dcc)
|
||||
nbdccs++;
|
||||
|
||||
if (nbdccs == 0)
|
||||
return Py_None;
|
||||
|
||||
PyObject *list = PyList_New(nbdccs);
|
||||
|
||||
if (!list)
|
||||
return Py_None;
|
||||
|
||||
PyObject *listvalue;
|
||||
|
||||
int pos = 0;
|
||||
for(; p; p = p->next_dcc)
|
||||
{
|
||||
listvalue = Py_BuildValue("{s:k,s:k,s:s,s:s,s:s,s:i,s:k,s:k,s:i,s:i}",
|
||||
"address32", p->addr,
|
||||
"cps", p->bytes_per_sec,
|
||||
"remote_file", p->filename,
|
||||
"local_file", p->local_filename,
|
||||
"nick", p->nick,
|
||||
"port", p->port,
|
||||
"pos", p->pos,
|
||||
"size", p->size,
|
||||
"status", p->status,
|
||||
"type", p->type);
|
||||
if (listvalue)
|
||||
{
|
||||
if (PyList_SetItem(list, pos, listvalue) != 0)
|
||||
{
|
||||
PyMem_Free(listvalue);
|
||||
PyMem_Free(list);
|
||||
return Py_None;
|
||||
}
|
||||
}
|
||||
else
|
||||
return Py_None;
|
||||
pos++;
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
if (info)
|
||||
return Py_BuildValue ("s", info);
|
||||
|
||||
@@ -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\" $(RUBY_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib_weechat_ruby.a
|
||||
|
||||
lib_weechat_ruby_a_SOURCES = wee-ruby.h \
|
||||
wee-ruby.c
|
||||
@@ -0,0 +1,607 @@
|
||||
/*
|
||||
* 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-ruby.c: Ruby plugin support for WeeChat */
|
||||
|
||||
|
||||
#include <ruby.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#undef _
|
||||
#include "../../common/weechat.h"
|
||||
#include "../plugins.h"
|
||||
#include "wee-ruby.h"
|
||||
#include "../../common/command.h"
|
||||
#include "../../irc/irc.h"
|
||||
#include "../../gui/gui.h"
|
||||
|
||||
|
||||
t_plugin_script *ruby_scripts = NULL;
|
||||
t_plugin_script *last_ruby_script = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* register: startup function for all WeeChat Ruby scripts
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
wee_ruby_register (VALUE class, VALUE name, VALUE version, VALUE shutdown_func, VALUE description)
|
||||
{
|
||||
char *c_name, *c_version, *c_shutdown_func, *c_description;
|
||||
t_plugin_script *ptr_ruby_script, *ruby_script_found, *new_ruby_script;
|
||||
|
||||
if (NIL_P (name) || NIL_P (version) || NIL_P (shutdown_func) || NIL_P (description))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Ruby", "register");
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
Check_Type (name, T_STRING);
|
||||
Check_Type (version, T_STRING);
|
||||
Check_Type (shutdown_func, T_STRING);
|
||||
Check_Type (description, T_STRING);
|
||||
|
||||
c_name = STR2CSTR (name);
|
||||
c_version = STR2CSTR (version);
|
||||
c_shutdown_func = STR2CSTR (shutdown_func);
|
||||
c_description = STR2CSTR (description);
|
||||
|
||||
ruby_script_found = NULL;
|
||||
for (ptr_ruby_script = ruby_scripts; ptr_ruby_script;
|
||||
ptr_ruby_script = ptr_ruby_script->next_script)
|
||||
{
|
||||
if (ascii_strcasecmp (ptr_ruby_script->name, c_name) == 0)
|
||||
{
|
||||
ruby_script_found = ptr_ruby_script;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ruby_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"),
|
||||
"Ruby", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* registering script */
|
||||
new_ruby_script = (t_plugin_script *)malloc (sizeof (t_plugin_script));
|
||||
if (new_ruby_script)
|
||||
{
|
||||
new_ruby_script->name = strdup (c_name);
|
||||
new_ruby_script->version = strdup (c_version);
|
||||
new_ruby_script->shutdown_func = strdup (c_shutdown_func);
|
||||
new_ruby_script->description = strdup (c_description);
|
||||
|
||||
/* add new script to list */
|
||||
new_ruby_script->prev_script = last_ruby_script;
|
||||
new_ruby_script->next_script = NULL;
|
||||
if (ruby_scripts)
|
||||
last_ruby_script->next_script = new_ruby_script;
|
||||
else
|
||||
ruby_scripts = new_ruby_script;
|
||||
last_ruby_script = new_ruby_script;
|
||||
|
||||
wee_log_printf (_("Registered %s script: \"%s\", version %s (%s)\n"),
|
||||
"Ruby", c_name, c_version, c_description);
|
||||
}
|
||||
else
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: unable to load script \"%s\" (not enough memory)\n"),
|
||||
"Ruby", c_name);
|
||||
}
|
||||
}
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
/*
|
||||
* print: print message into a buffer (current or specified one)
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
wee_ruby_print (VALUE class, VALUE message, VALUE channel_name, VALUE server_name)
|
||||
{
|
||||
char *c_message, *c_channel_name, *c_server_name;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
|
||||
c_message = NULL;
|
||||
c_channel_name = NULL;
|
||||
c_server_name = NULL;
|
||||
|
||||
if (NIL_P (message))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Ruby", "print");
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
Check_Type (message, T_STRING);
|
||||
if (!NIL_P (channel_name))
|
||||
Check_Type (channel_name, T_STRING);
|
||||
if (!NIL_P (server_name))
|
||||
Check_Type (server_name, T_STRING);
|
||||
|
||||
c_message = STR2CSTR (message);
|
||||
if (!NIL_P (channel_name))
|
||||
c_channel_name = STR2CSTR (channel_name);
|
||||
if (!NIL_P (server_name))
|
||||
c_server_name = STR2CSTR (server_name);
|
||||
|
||||
ptr_buffer = plugin_find_buffer (c_server_name, c_channel_name);
|
||||
if (ptr_buffer)
|
||||
{
|
||||
irc_display_prefix (ptr_buffer, PREFIX_PLUGIN);
|
||||
gui_printf (ptr_buffer, "%s\n", c_message);
|
||||
return INT2FIX (1);
|
||||
}
|
||||
|
||||
/* buffer not found */
|
||||
return INT2FIX (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* print_infobar: print message to infobar
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
wee_ruby_print_infobar (VALUE class, VALUE delay, VALUE message)
|
||||
{
|
||||
int c_delay;
|
||||
char *c_message;
|
||||
|
||||
c_delay = 1;
|
||||
c_message = NULL;
|
||||
|
||||
if (NIL_P (delay) || NIL_P (message))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Ruby", "print_infobar");
|
||||
return Qfalse;
|
||||
}
|
||||
|
||||
Check_Type (delay, T_FIXNUM);
|
||||
Check_Type (message, T_STRING);
|
||||
|
||||
c_delay = FIX2INT (delay);
|
||||
c_message = STR2CSTR (message);
|
||||
|
||||
gui_infobar_printf (delay, COLOR_WIN_INFOBAR, c_message);
|
||||
|
||||
return Qtrue;
|
||||
}
|
||||
|
||||
/*
|
||||
* command: send command to server
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
wee_ruby_command (VALUE class, VALUE command, VALUE channel_name, VALUE server_name)
|
||||
{
|
||||
char *c_command, *c_channel_name, *c_server_name;
|
||||
t_gui_buffer *ptr_buffer;
|
||||
|
||||
c_command = NULL;
|
||||
c_channel_name = NULL;
|
||||
c_server_name = NULL;
|
||||
|
||||
if (NIL_P (command))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Ruby", "command");
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
Check_Type (command, T_STRING);
|
||||
if (!NIL_P (channel_name))
|
||||
Check_Type (channel_name, T_STRING);
|
||||
if (!NIL_P (server_name))
|
||||
Check_Type (server_name, T_STRING);
|
||||
|
||||
c_command = STR2CSTR (command);
|
||||
if (!NIL_P (channel_name))
|
||||
c_channel_name = STR2CSTR (channel_name);
|
||||
if (!NIL_P (server_name))
|
||||
c_server_name = STR2CSTR (server_name);
|
||||
|
||||
ptr_buffer = plugin_find_buffer (c_server_name, c_channel_name);
|
||||
if (ptr_buffer)
|
||||
{
|
||||
user_command (SERVER(ptr_buffer), ptr_buffer, c_command);
|
||||
return INT2FIX (1);
|
||||
}
|
||||
|
||||
/* buffer not found */
|
||||
return INT2FIX (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* add_message_handler: add handler for messages
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
wee_ruby_add_message_handler (VALUE class, VALUE message, VALUE function)
|
||||
{
|
||||
char *c_message, *c_function;
|
||||
|
||||
if (NIL_P (message) || NIL_P (function))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Ruby", "add_message_handler");
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
Check_Type (message, T_STRING);
|
||||
Check_Type (function, T_STRING);
|
||||
|
||||
c_message = STR2CSTR (message);
|
||||
c_function = STR2CSTR (function);
|
||||
|
||||
plugin_handler_add (&plugin_msg_handlers, &last_plugin_msg_handler,
|
||||
PLUGIN_TYPE_RUBY, c_message, c_function);
|
||||
|
||||
return Qtrue;
|
||||
}
|
||||
|
||||
/*
|
||||
* add_command_handler: define/redefines commands
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
wee_ruby_add_command_handler (VALUE class, VALUE name, VALUE function)
|
||||
{
|
||||
char *c_name, *c_function;
|
||||
t_plugin_handler *ptr_plugin_handler;
|
||||
|
||||
if (NIL_P (name) || NIL_P (function))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Ruby", "add_command_handler");
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
Check_Type (name, T_STRING);
|
||||
Check_Type (function, T_STRING);
|
||||
|
||||
c_name = STR2CSTR (name);
|
||||
c_function = STR2CSTR (function);
|
||||
|
||||
if (!weelist_search (index_commands, c_name))
|
||||
weelist_add (&index_commands, &last_index_command, c_name);
|
||||
|
||||
ptr_plugin_handler = plugin_handler_search (plugin_cmd_handlers, c_name);
|
||||
if (ptr_plugin_handler)
|
||||
{
|
||||
free (ptr_plugin_handler->function_name);
|
||||
ptr_plugin_handler->function_name = strdup (c_function);
|
||||
}
|
||||
else
|
||||
plugin_handler_add (&plugin_cmd_handlers, &last_plugin_cmd_handler,
|
||||
PLUGIN_TYPE_PYTHON, c_name, c_function);
|
||||
|
||||
return Qtrue;
|
||||
}
|
||||
|
||||
/*
|
||||
* get_info: get various infos
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
wee_ruby_get_info (VALUE class, VALUE arg, VALUE server_name)
|
||||
{
|
||||
char *c_arg, *info, *c_server_name;
|
||||
t_irc_server *ptr_server;
|
||||
|
||||
if (NIL_P (arg))
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: wrong parameters for \"%s\" function\n"),
|
||||
"Ruby", "get_info");
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
Check_Type (arg, T_STRING);
|
||||
if (!NIL_P (server_name))
|
||||
Check_Type (server_name, T_STRING);
|
||||
|
||||
c_arg = STR2CSTR (arg);
|
||||
if (!NIL_P (server_name))
|
||||
c_server_name = STR2CSTR (server_name);
|
||||
|
||||
if (c_server_name == NULL)
|
||||
{
|
||||
ptr_server = SERVER(gui_current_window->buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (ascii_strcasecmp (ptr_server->name, c_server_name) == 0)
|
||||
break;
|
||||
}
|
||||
if (!ptr_server)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: server not found for \"%s\" function\n"),
|
||||
"Ruby", "get_info");
|
||||
return Qnil;
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr_server && c_arg)
|
||||
{
|
||||
if ( (ascii_strcasecmp (c_arg, "0") == 0) || (ascii_strcasecmp (c_arg, "version") == 0) )
|
||||
{
|
||||
info = PACKAGE_STRING;
|
||||
}
|
||||
else if ( (ascii_strcasecmp (c_arg, "1") == 0) || (ascii_strcasecmp (c_arg, "nick") == 0) )
|
||||
{
|
||||
if (ptr_server->nick)
|
||||
info = ptr_server->nick;
|
||||
}
|
||||
else if ( (ascii_strcasecmp (c_arg, "2") == 0) || (ascii_strcasecmp (c_arg, "channel") == 0) )
|
||||
{
|
||||
if (BUFFER_IS_CHANNEL (gui_current_window->buffer))
|
||||
info = CHANNEL (gui_current_window->buffer)->name;
|
||||
}
|
||||
else if ( (ascii_strcasecmp (c_arg, "3") == 0) || (ascii_strcasecmp (c_arg, "server") == 0) )
|
||||
{
|
||||
if (ptr_server->name)
|
||||
info = ptr_server->name;
|
||||
}
|
||||
else if ( (ascii_strcasecmp (c_arg, "4") == 0) || (ascii_strcasecmp (c_arg, "weechatdir") == 0) )
|
||||
{
|
||||
info = weechat_home;
|
||||
}
|
||||
else if ( (ascii_strcasecmp (c_arg, "5") == 0) || (ascii_strcasecmp (c_arg, "away") == 0) )
|
||||
{
|
||||
return INT2FIX (SERVER(gui_current_window->buffer)->is_away);
|
||||
}
|
||||
else if ( (ascii_strcasecmp (c_arg, "100") == 0) || (ascii_strcasecmp (c_arg, "dccs") == 0) )
|
||||
{
|
||||
/* TODO: build dcc list */
|
||||
}
|
||||
|
||||
if (info)
|
||||
return rb_str_new2 (info);
|
||||
else
|
||||
return rb_str_new2 ("");
|
||||
}
|
||||
|
||||
return INT2FIX (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Ruby subroutines
|
||||
*/
|
||||
|
||||
/*
|
||||
* wee_ruby_init: initialize Ruby interface for WeeChat
|
||||
*/
|
||||
|
||||
void
|
||||
wee_ruby_init ()
|
||||
{
|
||||
|
||||
/* TODO: init Ruby environment */
|
||||
/* ruby_init ();
|
||||
if ()
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("%s error: error while launching interpreter\n"),
|
||||
"Ruby");
|
||||
}
|
||||
else
|
||||
{
|
||||
wee_log_printf (_("Loading %s module \"weechat\"\n"), "Ruby");
|
||||
}*/
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_ruby_search: search a (loaded) Ruby script by name
|
||||
*/
|
||||
|
||||
t_plugin_script *
|
||||
wee_ruby_search (char *name)
|
||||
{
|
||||
t_plugin_script *ptr_ruby_script;
|
||||
|
||||
for (ptr_ruby_script = ruby_scripts; ptr_ruby_script;
|
||||
ptr_ruby_script = ptr_ruby_script->next_script)
|
||||
{
|
||||
if (strcmp (ptr_ruby_script->name, name) == 0)
|
||||
return ptr_ruby_script;
|
||||
}
|
||||
|
||||
/* script not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_ruby_exec: execute a Ruby script
|
||||
*/
|
||||
|
||||
int
|
||||
wee_ruby_exec (char *function, char *server, char *arguments)
|
||||
{
|
||||
/* TODO: exec Ruby script */
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_ruby_load: load a Ruby script
|
||||
*/
|
||||
|
||||
int
|
||||
wee_ruby_load (char *filename)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
/* TODO: load & exec Ruby script */
|
||||
gui_printf (NULL, "Ruby scripts not developed!\n");
|
||||
/* execute Ruby script */
|
||||
/*wee_log_printf (_("Loading %s script \"%s\"\n"), "Ruby", filename);
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("Loading %s script \"%s\"\n"), "Ruby", filename);
|
||||
|
||||
if ((fp = fopen (filename, "r")) == NULL)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: error while opening file \"%s\"\n"),
|
||||
"Ruby", filename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (xxxxxxx (fp, filename) != 0)
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_ERROR);
|
||||
gui_printf (NULL,
|
||||
_("%s error: error while parsing file \"%s\"\n"),
|
||||
"Ruby", filename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fclose (fp);
|
||||
return 0;*/
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_ruby_script_free: free a Ruby script
|
||||
*/
|
||||
|
||||
void
|
||||
wee_ruby_script_free (t_plugin_script *ptr_ruby_script)
|
||||
{
|
||||
t_plugin_script *new_ruby_scripts;
|
||||
|
||||
/* remove script from list */
|
||||
if (last_ruby_script == ptr_ruby_script)
|
||||
last_ruby_script = ptr_ruby_script->prev_script;
|
||||
if (ptr_ruby_script->prev_script)
|
||||
{
|
||||
(ptr_ruby_script->prev_script)->next_script = ptr_ruby_script->next_script;
|
||||
new_ruby_scripts = ruby_scripts;
|
||||
}
|
||||
else
|
||||
new_ruby_scripts = ptr_ruby_script->next_script;
|
||||
|
||||
if (ptr_ruby_script->next_script)
|
||||
(ptr_ruby_script->next_script)->prev_script = ptr_ruby_script->prev_script;
|
||||
|
||||
/* free data */
|
||||
if (ptr_ruby_script->name)
|
||||
free (ptr_ruby_script->name);
|
||||
if (ptr_ruby_script->version)
|
||||
free (ptr_ruby_script->version);
|
||||
if (ptr_ruby_script->shutdown_func)
|
||||
free (ptr_ruby_script->shutdown_func);
|
||||
if (ptr_ruby_script->description)
|
||||
free (ptr_ruby_script->description);
|
||||
free (ptr_ruby_script);
|
||||
ruby_scripts = new_ruby_scripts;
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_ruby_unload: unload a Ruby script
|
||||
*/
|
||||
|
||||
void
|
||||
wee_ruby_unload (t_plugin_script *ptr_ruby_script)
|
||||
{
|
||||
if (ptr_ruby_script)
|
||||
{
|
||||
wee_log_printf (_("Unloading %s script \"%s\"\n"),
|
||||
"Ruby", ptr_ruby_script->name);
|
||||
|
||||
/* call shutdown callback function */
|
||||
if (ptr_ruby_script->shutdown_func[0])
|
||||
wee_ruby_exec (ptr_ruby_script->shutdown_func, "", "");
|
||||
wee_ruby_script_free (ptr_ruby_script);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_ruby_unload_all: unload all Ruby scripts
|
||||
*/
|
||||
|
||||
void
|
||||
wee_ruby_unload_all ()
|
||||
{
|
||||
wee_log_printf (_("Unloading all %s scripts...\n"), "Ruby");
|
||||
while (ruby_scripts)
|
||||
wee_ruby_unload (ruby_scripts);
|
||||
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("%s scripts unloaded\n"), "Ruby");
|
||||
}
|
||||
|
||||
/*
|
||||
* wee_ruby_end: shutdown Ruby interface
|
||||
*/
|
||||
|
||||
void
|
||||
wee_ruby_end ()
|
||||
{
|
||||
/* unload all scripts */
|
||||
wee_ruby_unload_all ();
|
||||
|
||||
/* free all handlers */
|
||||
plugin_handler_free_all_type (&plugin_msg_handlers,
|
||||
&last_plugin_msg_handler,
|
||||
PLUGIN_TYPE_RUBY);
|
||||
plugin_handler_free_all_type (&plugin_cmd_handlers,
|
||||
&last_plugin_cmd_handler,
|
||||
PLUGIN_TYPE_RUBY);
|
||||
|
||||
/* TODO: free Ruby interpreter */
|
||||
/* free Ruby interpreter */
|
||||
/* xxxxx ();
|
||||
if ()
|
||||
{
|
||||
irc_display_prefix (NULL, PREFIX_PLUGIN);
|
||||
gui_printf (NULL, _("%s error: error while freeing interpreter\n"),
|
||||
"Ruby");
|
||||
}*/
|
||||
}
|
||||
@@ -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_RUBY_H
|
||||
#define __WEECHAT_RUBY_H 1
|
||||
|
||||
#include "../plugins.h"
|
||||
|
||||
extern void wee_ruby_init ();
|
||||
extern t_plugin_script *wee_ruby_search (char *);
|
||||
extern int wee_ruby_exec (char *, char *, char *);
|
||||
extern int wee_ruby_load (char *);
|
||||
extern void wee_ruby_unload (t_plugin_script *);
|
||||
extern void wee_ruby_unload_all ();
|
||||
extern void wee_ruby_end ();
|
||||
|
||||
#endif /* wee-ruby.h */
|
||||
+8
-4
@@ -1,5 +1,5 @@
|
||||
%define name weechat
|
||||
%define version 0.1.3
|
||||
%define version 0.1.5
|
||||
%define release 1
|
||||
|
||||
Name: %{name}
|
||||
@@ -26,12 +26,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||
./configure --enable-perl --enable-python
|
||||
make DESTDIR="$RPM_BUILD_ROOT" LOCALRPM="local"
|
||||
|
||||
%install
|
||||
%install
|
||||
make DESTDIR="$RPM_BUILD_ROOT" LOCALRPM="local" install
|
||||
|
||||
%find_lang %name
|
||||
|
||||
%clean
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}.lang
|
||||
@@ -40,7 +40,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/local/man/man1/weechat-curses.1*
|
||||
/usr/local/bin/weechat-curses
|
||||
|
||||
%changelog
|
||||
%changelog
|
||||
* Sat Sep 24 2005 FlashCode <flashcode@flashtux.org> 0.1.5-1
|
||||
- Released version 0.1.5
|
||||
* Sat Jul 30 2005 FlashCode <flashcode@flashtux.org> 0.1.4-1
|
||||
- Released version 0.1.4
|
||||
* 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
|
||||
|
||||
+3
-2
@@ -1,12 +1,13 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
WeeChat known bugs, 2005-05-21
|
||||
WeeChat known bugs, 2005-09-24
|
||||
|
||||
- color display problems when term has white background
|
||||
- ./configure does not check that Ruby libraries are installed
|
||||
- ./configure does not check that Gtk 2.0 libraries are installed
|
||||
- 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
|
||||
- when many WeeChat are launched, log file is not properly written (cleared by
|
||||
each WeeChat at startup)
|
||||
- display problems with old Konsole versions (Kde terminal) (???)
|
||||
|
||||
+47
-1
@@ -1,9 +1,55 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2005-06-30
|
||||
ChangeLog - 2005-09-24
|
||||
|
||||
|
||||
Version 0.1.5 (2005-09-24):
|
||||
* added /ame command (send CTCP action to all channels of all
|
||||
connected servers)
|
||||
* added setting "irc_notice_as_pv" to see notices as pv
|
||||
* added nicks colors in setup file
|
||||
* fixed DCC bug: delete failed file only if really empty (on disk)
|
||||
* fixed IRC message parser bug
|
||||
* fixed scroll problem (screen moving when scrolling and new line
|
||||
displayed)
|
||||
* fixed infinite loop when scrolling back and displaying long lines
|
||||
* fixed crash when closing a buffer used by more than one window
|
||||
* added some missing IRC commands
|
||||
* fixed DCC display bug (now decodes string according to charset)
|
||||
* added /ignore and /unignore commands
|
||||
* fixed bug with strings comparison (str[n]casecmp) and some locales
|
||||
(like turkish), now using ASCII comparison (thanks to roktas)
|
||||
* signal SIGQUIT is now ignored
|
||||
* fixed refresh bug when one line is bigger than screen size
|
||||
* fixed look_nicklist_min_size and look_nicklist_max_size options
|
||||
* fixed refresh bug when changing channel modes
|
||||
* jump to next server now saves current channel buffer for each server
|
||||
* ctrl-up/ctrl-down keys added to call previous/next command in global
|
||||
history (common to all buffers)
|
||||
|
||||
Version 0.1.4 (2005-07-30):
|
||||
* join and part/quit prefixes (arrows) now displayed with different colors
|
||||
* added "irc_highlight" setting, to get highlight with any word
|
||||
* fixed auto-rejoin for channels with key
|
||||
* fixed /ctcp command (now any command/data allowed)
|
||||
* added /amsg command (send text to all channels of all connected servers)
|
||||
* fixed SIGSEGV handler (now write a core file by aborting program)
|
||||
* fixed statusbar & infobar background refresh problem with some systems
|
||||
* added color for private in hotlist (different than color for highlight)
|
||||
* added DCC resume and timeout
|
||||
* added function for Perl/Python to get DCC list
|
||||
* fixed FIFO pipe (command now authorized on a buffer not connected
|
||||
to an IRC server)
|
||||
* topic completion now decodes UTF-8 string
|
||||
* fixed bug with IRC URL on command line (irc://)
|
||||
* new keyboard management: keys are setup in config file, new command
|
||||
/key was added and some new default keys were added, alt-k key is
|
||||
used to grab key (useful for /key command)
|
||||
* added seconds in infobar time (optional thanks to new setting)
|
||||
* fixed some curses refreshs
|
||||
* channels auto-prefixed by "#" (if no prefix found) for /join command
|
||||
|
||||
Version 0.1.3 (2005-07-02):
|
||||
* proxy support (http, socks4, socks5) with authentification (http, socks5)
|
||||
and ipv6 support (client to proxy)
|
||||
|
||||
+13
-7
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2005-05-21
|
||||
WeeChat FAQ, 2005-09-24
|
||||
=======================
|
||||
|
||||
Intended audience:
|
||||
@@ -50,8 +50,12 @@ 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, wxWidgets, Qt),
|
||||
* extensible with scripts (Perl, Python, Ruby),
|
||||
* many GUI (Curses, Gtk, wxWidgets, Qt)
|
||||
* nicklist available in all GUI
|
||||
* extensible with scripts (Perl, Python, Ruby)
|
||||
* horizontal and vertical window split
|
||||
* infobar highlight
|
||||
* FIFO pipe for remote control
|
||||
* developed from scratch (not based on any other IRC client)
|
||||
* multi-platform
|
||||
* 100% GPL and free
|
||||
@@ -83,7 +87,9 @@ A: You have to setup charset used for decoding, encoding, and internal WeeChat
|
||||
================================================================================
|
||||
Q: How can I customize key bindings?
|
||||
|
||||
A: Today you can't do that. This is planed for a future version.
|
||||
A: Key bindings are customizable with /key command.
|
||||
Default key Meta-k (usually Alt-k) lets you grab key code and insert it
|
||||
in input zone.
|
||||
|
||||
|
||||
2.5
|
||||
@@ -103,7 +109,7 @@ A: You can use /perl command to load scripts (default path is
|
||||
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
|
||||
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.
|
||||
@@ -189,5 +195,5 @@ A: There's many tasks to do (code, documentation, ...)
|
||||
================================================================================
|
||||
Q: Can I give money or other things to WeeChat developers?
|
||||
|
||||
A: Beer is welcome :)
|
||||
Otherwise Paypal account is: flashcode@free.fr (no limit for gifts :)
|
||||
A: You can give us money to help development.
|
||||
Details on http://weechat.flashtux.org/donate.php?lang=en
|
||||
|
||||
+12
-8
@@ -1,4 +1,4 @@
|
||||
WeeChat FAQ, 2005-05-21
|
||||
WeeChat FAQ, 2005-09-24
|
||||
=======================
|
||||
|
||||
Public concerné :
|
||||
@@ -53,8 +53,12 @@ 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, wxWidgets, Qt),
|
||||
* extensible par des scripts (Perl, Python, Ruby),
|
||||
* plusieurs interfaces (Curses, Gtk, wxWidgets, Qt)
|
||||
* liste des pseudos disponible dans toutes les interfaces
|
||||
* extensible par des scripts (Perl, Python, Ruby)
|
||||
* découpage de la fenêtre horizontalement et verticalement
|
||||
* highlight dans la barre d'infos
|
||||
* tube FIFO pour contrôle à distance
|
||||
* développé à partir de zéro (non basé sur un quelconque client IRC)
|
||||
* multi-platformes
|
||||
* 100% GPL et libre
|
||||
@@ -87,8 +91,9 @@ R: Il faut configurer le charset utilis
|
||||
================================================================================
|
||||
Q: Comment puis-je configurer les raccourcis clavier ?
|
||||
|
||||
R: Aujourd'hui vous ne pouvez pas le faire. Ce sera possible dans une
|
||||
version future.
|
||||
R: Les raccourcis clavier sont modifiables avec la commande /key.
|
||||
La touche par défaut Meta-k (souvent Alt-k) permet de capturer le code
|
||||
d'une touche et de l'inclure dans la zone de saisie.
|
||||
|
||||
|
||||
2.5
|
||||
@@ -201,6 +206,5 @@ R: Il y a plusieurs choses
|
||||
================================================================================
|
||||
Q: Puis-je donner de l'argent ou d'autres choses aux développeurs WeeChat ?
|
||||
|
||||
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 :)
|
||||
R: Vous pouvez donner de l'argent pour aider le développement.
|
||||
Plus de détails sur http://weechat.flashtux.org/donate.php
|
||||
|
||||
+2
-4
@@ -15,9 +15,9 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
SUBDIRS = po intl src
|
||||
SUBDIRS = po doc intl src
|
||||
|
||||
EXTRA_DIST = config.rpath weechat-curses.1 BUGS FAQ FAQ.fr \
|
||||
EXTRA_DIST = config.rpath BUGS FAQ FAQ.fr \
|
||||
debian/changelog debian/control \
|
||||
debian/copyright \
|
||||
debian/rules debian/weechat-common.docs \
|
||||
@@ -25,6 +25,4 @@ EXTRA_DIST = config.rpath weechat-curses.1 BUGS FAQ FAQ.fr \
|
||||
debian/weechat-curses.install debian/weechat-gtk.dirs \
|
||||
debian/weechat-gtk.install
|
||||
|
||||
man_MANS = weechat-curses.1
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
* FlashCode, 2005-09-24
|
||||
|
||||
WeeChat 0.1.5 released.
|
||||
|
||||
* FlashCode, 2005-07-30
|
||||
|
||||
WeeChat 0.1.4 released.
|
||||
|
||||
* FlashCode, 2005-07-02
|
||||
|
||||
WeeChat 0.1.3 released.
|
||||
|
||||
+9
-15
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
TODO - 2005-07-02
|
||||
TODO - 2005-09-24
|
||||
|
||||
Legend:
|
||||
# done
|
||||
@@ -10,7 +10,7 @@ Legend:
|
||||
? is this really necessary?
|
||||
|
||||
|
||||
v0.1.3:
|
||||
v0.1.6:
|
||||
------
|
||||
|
||||
* General:
|
||||
@@ -21,14 +21,13 @@ v0.1.3:
|
||||
+ 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)
|
||||
* WeeChat commands
|
||||
- be able to bind a key on more than one command
|
||||
- be able to make an alias running more than one command
|
||||
- host with "*" possible with /ignore command
|
||||
|
||||
* Configuration:
|
||||
# save buffer notify levels
|
||||
- be able to launch more than one command when connecting to server
|
||||
|
||||
|
||||
Future versions:
|
||||
@@ -38,22 +37,20 @@ Future versions:
|
||||
- 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
|
||||
nick/host
|
||||
- when we're away, WeeChat should log all the lines begenning by our nick.
|
||||
When we come back from our away it should print it to the current window
|
||||
- "/notify" and "/unnotify" command to be warn by WeeChat when a given
|
||||
nick/host connect to the given irc network
|
||||
|
||||
* WeeChat commands:
|
||||
- "/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")
|
||||
- "/last": command to look for text in previous messages
|
||||
- completion system for scripts arguments
|
||||
|
||||
* Interface:
|
||||
- color for nicks (except own nick) when nick colors are disabled
|
||||
- allow decode/encode charsets for servers or chan (not globally)
|
||||
- interpret special chars in messages (color & bold for example)
|
||||
- understand incomplete commands if unambigous (for example: /he for /help is ok)
|
||||
? Qt GUI
|
||||
@@ -61,6 +58,3 @@ Future versions:
|
||||
* Plugins:
|
||||
- Ruby plugin
|
||||
- "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts
|
||||
|
||||
* Configuration:
|
||||
- add key bindings to config file
|
||||
|
||||
+20
-6
@@ -19,10 +19,10 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(WeeChat, 0.1.3, flashcode@flashtux.org)
|
||||
AC_INIT(WeeChat, 0.1.5, flashcode@flashtux.org)
|
||||
AC_CONFIG_SRCDIR([src/common/weechat.c])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([weechat], [0.1.3])
|
||||
AM_INIT_AUTOMAKE([weechat], [0.1.5])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -30,7 +30,7 @@ AC_PROG_MAKE_SET
|
||||
AC_PROG_RANLIB
|
||||
|
||||
# Gettext
|
||||
ALL_LINGUAS="fr es"
|
||||
ALL_LINGUAS="fr es cs"
|
||||
AM_GNU_GETTEXT
|
||||
|
||||
# Checks for libraries.
|
||||
@@ -66,6 +66,7 @@ AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa mem
|
||||
AH_VERBATIM([PLUGINS], [#undef PLUGINS])
|
||||
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
|
||||
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
|
||||
AH_VERBATIM([PLUGIN_RUBY], [#undef PLUGIN_RUBY])
|
||||
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
|
||||
AH_VERBATIM([DEBUG], [#undef DEBUG])
|
||||
|
||||
@@ -75,12 +76,11 @@ AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (defau
|
||||
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(ruby, [ --enable-ruby Turn on Ruby plugins (default=no)],enable_ruby=$enableval,enable_ruby=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_ruby="no"
|
||||
RUBY_CFLAGS=
|
||||
|
||||
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
|
||||
AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
|
||||
@@ -88,7 +88,7 @@ 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_RUBY, test "$enable_ruby" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
|
||||
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
||||
|
||||
if test "x$enable_ncurses" = "xyes" ; then
|
||||
@@ -225,6 +225,18 @@ if test "x$enable_python" = "xyes" ; then
|
||||
AC_DEFINE(PLUGIN_PYTHON)
|
||||
fi
|
||||
|
||||
if test "x$enable_ruby" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
|
||||
# TODO: check that ruby lib and headers are installed
|
||||
|
||||
RUBY_CFLAGS=-I`ruby -rrbconfig -e "puts Config::CONFIG[['archdir']]"`
|
||||
RUBY_LFLAGS=-L`ruby -rrbconfig -e "puts Config::CONFIG[['archdir']]"` -lruby
|
||||
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/ruby/lib_weechat_ruby.a $RUBY_LFLAGS"
|
||||
AC_SUBST(RUBY_CFLAGS)
|
||||
AC_DEFINE(PLUGIN_RUBY)
|
||||
fi
|
||||
|
||||
if test "x$enable_plugins" = "xyes" ; then
|
||||
AC_DEFINE(PLUGINS)
|
||||
fi
|
||||
@@ -265,12 +277,14 @@ LIBS="$LIBS $INTLLIBS"
|
||||
CFLAGS="$CFLAGS $CPPFLAGS"
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
doc/Makefile
|
||||
src/Makefile
|
||||
src/common/Makefile
|
||||
src/irc/Makefile
|
||||
src/plugins/Makefile
|
||||
src/plugins/perl/Makefile
|
||||
src/plugins/python/Makefile
|
||||
src/plugins/ruby/Makefile
|
||||
src/gui/Makefile
|
||||
src/gui/curses/Makefile
|
||||
src/gui/wxwidgets/Makefile
|
||||
|
||||
@@ -1,3 +1,37 @@
|
||||
weechat (0.1.4-2) unstable; urgency=low
|
||||
|
||||
* Add autotools-dev to Build-Depends.
|
||||
* update autotools stuff automatically to always
|
||||
have up-to-date config.{guess,sub}
|
||||
* Update Build-Depends: libgnutls11-dev -> libgnutls-dev
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Mon, 1 Aug 2005 11:46:39 +0200
|
||||
|
||||
weechat (0.1.4-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Sat, 30 Jul 2005 16:26:55 +0200
|
||||
|
||||
weechat (0.1.3-2) unstable; urgency=low
|
||||
|
||||
* Update config.{guess,sub} to fix FTBFS on k*BSD (Closes: #316791)
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Fri, 8 Jul 2005 21:30:38 +0200
|
||||
|
||||
weechat (0.1.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Sat, 2 Jul 2005 20:06:29 +0200
|
||||
|
||||
weechat (0.1.2-3) unstable; urgency=low
|
||||
|
||||
* Apply patch against gui-display.c to fix curses color bug.
|
||||
* remove dh_install --sourcedir to allow builds on woody.
|
||||
|
||||
-- Julien Louis <ptitlouis@sysif.net> Sun, 19 Jun 2005 22:37:11 +0200
|
||||
|
||||
weechat (0.1.2-2) unstable; urgency=low
|
||||
|
||||
* Patch src/gui/curse/gui-display.c to fix segfault
|
||||
|
||||
@@ -3,8 +3,8 @@ Section: net
|
||||
Priority: optional
|
||||
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
|
||||
Build-Depends: debhelper (>> 4.0.0), libncurses5-dev (>= 5.2.20020112a-7), libperl-dev, python-dev, libgnutls-dev, autotools-dev
|
||||
Standards-Version: 3.6.2.1
|
||||
|
||||
Package: weechat
|
||||
Architecture: all
|
||||
|
||||
+10
-5
@@ -15,7 +15,7 @@ configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
./configure --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man \
|
||||
--enable-perl --enable-python
|
||||
--infodir=\$${prefix}/share/info --enable-perl --enable-python
|
||||
touch configure-stamp
|
||||
|
||||
|
||||
@@ -31,6 +31,10 @@ clean:
|
||||
dh_testroot
|
||||
rm -f build-stamp configure-stamp
|
||||
-$(MAKE) distclean
|
||||
test -r /usr/share/misc/config.guess && \
|
||||
cp -f /usr/share/misc/config.guess config.guess
|
||||
test -r /usr/share/misc/config.sub && \
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
@@ -38,9 +42,9 @@ install: build
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
$(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
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
||||
dh_install
|
||||
# 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
|
||||
|
||||
|
||||
@@ -50,6 +54,7 @@ binary-indep: build install
|
||||
dh_testroot -pweechat-common -pweechat
|
||||
dh_installchangelogs ChangeLog -pweechat-common
|
||||
dh_installdocs -pweechat-common
|
||||
dh_installinfo -pweechat-common
|
||||
dh_installexamples -pweechat-common
|
||||
dh_compress -pweechat-common -pweechat
|
||||
dh_link -pweechat usr/share/doc/weechat-common usr/share/doc/weechat
|
||||
@@ -66,7 +71,7 @@ binary-arch: build install
|
||||
dh_testroot -a
|
||||
# dh_installchangelogs -a
|
||||
# dh_installdocs -a
|
||||
dh_installman weechat-curses.1 -pweechat-curses
|
||||
dh_installman doc/weechat-curses.1 -pweechat-curses
|
||||
dh_link -a usr/share/doc/weechat-common usr/share/doc/weechat-curses
|
||||
dh_strip -a
|
||||
dh_compress -a
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
version=2
|
||||
http://weechat.flashtux.org/download/weechat-(\d.*)\.tar\.bz2
|
||||
@@ -1 +1 @@
|
||||
usr/share/locale
|
||||
debian/tmp/usr/share/locale/
|
||||
|
||||
@@ -1 +1 @@
|
||||
usr/bin/weechat-curses
|
||||
debian/tmp/usr/bin/weechat-curses
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# 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
|
||||
#
|
||||
|
||||
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:
|
||||
rm -rf weechat_doc_*.aux weechat_doc_*.cp weechat_doc_*.fn \
|
||||
weechat_doc_*.html weechat_doc_*.ky weechat_doc_*.log \
|
||||
weechat_doc_*.pdf weechat_doc_*.pg weechat_doc_*.toc \
|
||||
weechat_doc_*.tp weechat_doc_*.txt weechat_doc_*.vr
|
||||
@@ -0,0 +1,28 @@
|
||||
# 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
|
||||
#
|
||||
|
||||
man_MANS = weechat-curses.1
|
||||
|
||||
info_TEXINFOS = weechat_doc_fr.texi weechat_doc_en.texi \
|
||||
weechat_doc_es.texi weechat_doc_pt.texi
|
||||
|
||||
#weechat_TEXINFOS = weechat_doc_fr.texi weechat_doc_en.texi \
|
||||
# weechat_doc_es.texi weechat_doc_pt.texi
|
||||
|
||||
AM_MAKEINFOHTMLFLAGS = --no-split --number-sections
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH WEECHAT 1 "July 2005" "FlashCode"
|
||||
.TH WEECHAT 1 "September 2005" "FlashCode"
|
||||
|
||||
.SH NAME
|
||||
weechat-curses \- Wee Enhanced Environment for Chat (Curses version)
|
||||
@@ -23,6 +23,10 @@ It is compliant with RFCs 1459, 2810, 2811, 2812, and 2813.
|
||||
.br
|
||||
display config file help (list of options)
|
||||
.TP
|
||||
.B \-f, \-\-key\-functions
|
||||
.br
|
||||
display internal functions for keys
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
.br
|
||||
display summary of options
|
||||
@@ -31,6 +35,10 @@ display summary of options
|
||||
.br
|
||||
display IRC commands
|
||||
.TP
|
||||
.B \-k, \-\-keys
|
||||
.br
|
||||
display default keys
|
||||
.TP
|
||||
.B \-l, \-\-license
|
||||
.br
|
||||
display program license
|
||||
+253
-29
@@ -35,9 +35,7 @@
|
||||
|
||||
@title WeeChat - User guide
|
||||
@subtitle Fast, light and extensible IRC client
|
||||
@subtitle Documentation for WeeChat v0.1.3 - July, 03 2005
|
||||
|
||||
@image{weechat_image}
|
||||
@subtitle Documentation for WeeChat v0.1.5 - September, 24 2005
|
||||
|
||||
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
|
||||
|
||||
@@ -150,7 +148,7 @@ Binary packages are available for these distributions:
|
||||
@itemize @bullet
|
||||
@item
|
||||
Debian (or any Debian compatible distribution)@*
|
||||
To install: @kbd{dpkg -i /path/weechat_x.y.z-1_i386.deb}
|
||||
To install: @kbd{apt-get install weechat-curses}
|
||||
@item
|
||||
Mandriva/Redhat (or any RPM compatible distribution)@*
|
||||
To install: @kbd{rpm -i /path/weechat-x.y.z-1.i386.rpm}
|
||||
@@ -220,6 +218,8 @@ Then follow instructions for source package - @xref{Source package}.
|
||||
@table @code
|
||||
@item -c, --config
|
||||
Display config file help (list of options)@*
|
||||
@item -f, --key-functions
|
||||
Display WeeChat internal functions for keys@*
|
||||
@item -h, --help
|
||||
Display help screen@*
|
||||
@item -i, --irc-commands
|
||||
@@ -280,6 +280,9 @@ Type: string (any string), default value: '[%H:%M:%S]'@*
|
||||
@item look_color_nicks
|
||||
Display nick names with different colors@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_color_nicks_number
|
||||
Number of colors to use for nicks colors@*
|
||||
Type: integer (values: between 1 and 10), default value: 10@*
|
||||
@item look_color_actions
|
||||
Display actions with different colors@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@@ -315,7 +318,10 @@ Enable info bar@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_infobar_timestamp
|
||||
Timestamp for time in infobar@*
|
||||
Type: string (any string), default value: '%B, %A %d %Y - %H:%M'@*
|
||||
Type: string (any string), default value: '%B, %A %d %Y'@*
|
||||
@item look_infobar_seconds
|
||||
Display seconds in infobar time@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_infobar_delay_highlight
|
||||
Delay (in seconds) for highlight messages in infobar (0 = disable highlight notifications in infobar)@*
|
||||
Type: integer (values: between 0 and 2147483647), default value: 7@*
|
||||
@@ -340,6 +346,12 @@ Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@item col_chat_prefix2
|
||||
Color for middle char of prefix@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@item col_chat_join
|
||||
Color for join arrow (prefix)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightgreen'@*
|
||||
@item col_chat_part
|
||||
Color for part/quit arrow (prefix)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightred'@*
|
||||
@item col_chat_nick
|
||||
Color for nicks in actions (chat window)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@@ -367,9 +379,12 @@ Type: color (Curses or Gtk color), default value: 'cyan'@*
|
||||
@item col_status_data_msg
|
||||
Color for window with new messages (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'yellow'@*
|
||||
@item col_status_private
|
||||
Color for window with private message (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_status_highlight
|
||||
Color for window with highlight (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightred'@*
|
||||
@item col_status_data_other
|
||||
Color for window with new data (not messages) (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@@ -382,6 +397,9 @@ Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_infobar
|
||||
Color for info bar text@*
|
||||
Type: color (Curses or Gtk color), default value: 'black'@*
|
||||
@item col_infobar_delimiters
|
||||
Color for infobar delimiters@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_infobar_highlight
|
||||
Color for info bar highlight notification@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@@ -430,6 +448,36 @@ Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_nick_self
|
||||
Color for local nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@item col_nick_color1
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'cyan'@*
|
||||
@item col_nick_color2
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'magenta'@*
|
||||
@item col_nick_color3
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'green'@*
|
||||
@item col_nick_color4
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'brown'@*
|
||||
@item col_nick_color5
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightblue'@*
|
||||
@item col_nick_color6
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@item col_nick_color7
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@item col_nick_color8
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_nick_color9
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightgreen'@*
|
||||
@item col_nick_color10
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_nick_private
|
||||
Color for other nick in private window@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@@ -496,6 +544,9 @@ Type: string (any string), default value: 'WeeChat %v'@*
|
||||
@item irc_default_msg_quit
|
||||
Default quit message ('%v' will be replaced by WeeChat version in string)@*
|
||||
Type: string (any string), default value: 'WeeChat %v'@*
|
||||
@item irc_notice_as_pv
|
||||
Display notices as private messages@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@item irc_away_check
|
||||
Interval between two checks for away (in minutes, 0 = never check)@*
|
||||
Type: integer (values: between 0 and 2147483647), default value: 0@*
|
||||
@@ -511,6 +562,9 @@ Type: integer (values: between 0 and 2147483647), default value: 5@*
|
||||
@item irc_fifo_pipe
|
||||
Create a FIFO pipe for remote control@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@item irc_highlight
|
||||
Comma separated list of words to highlight (case insensitive comparison)@*
|
||||
Type: string (any string), default value: ''@*
|
||||
@item dcc_auto_accept_files
|
||||
Automatically accept incoming dcc files@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@@ -608,7 +662,7 @@ Type: string (any string), default value: ''@*
|
||||
Delay (in seconds) after command was executed (example: give some time for authentication)@*
|
||||
Type: integer (values: between 0 and 5), default value: 0@*
|
||||
@item server_autojoin
|
||||
Comma separated list of channels to join when connected to server@*
|
||||
Comma separated list of channels to join when connected to server (example: "#chan1,#chan2,#chan3 #key1,#key2")@*
|
||||
Type: string (any string), default value: ''@*
|
||||
@item server_autorejoin
|
||||
Automatically rejoin channels when kicked@*
|
||||
@@ -668,12 +722,21 @@ Go to the beginning of command line@*
|
||||
@item End / Ctrl + E
|
||||
Go to the end of command line@*
|
||||
@*
|
||||
@item Ctrl + K
|
||||
Delete until end of line@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redraw whole window@*
|
||||
@*
|
||||
@item Ctrl + U
|
||||
Delete until beginning of line@*
|
||||
@*
|
||||
@item Ctrl + W
|
||||
Erase previous word of command line@*
|
||||
@*
|
||||
@item Backspace / Delete
|
||||
Erase previous / next char of command line@*
|
||||
@*
|
||||
@item Ctrl + Backspace / Ctrl + W
|
||||
Erase previous word of command line@*
|
||||
@*
|
||||
@item Tab
|
||||
Complete command or nick (@kbd{Tab} again: find next completion)@*
|
||||
@*
|
||||
@@ -686,6 +749,9 @@ Execute command or send message@*
|
||||
@item Up arrow / Down arrow
|
||||
Call again last commands/messages@*
|
||||
@*
|
||||
@item Ctrl + up arrow / Ctrl + down arrow
|
||||
Call again last commands/messages in global history@*
|
||||
@*
|
||||
@item PageUp / PageDown
|
||||
Show buffer history@*
|
||||
@*
|
||||
@@ -701,30 +767,48 @@ Remove last infobar message@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redraw whole window@*
|
||||
@*
|
||||
@item Alt + left arrow / Alt + right arrow
|
||||
Same as F5 / F6@*
|
||||
@*
|
||||
@item Alt + A
|
||||
Switch to next buffer with activity (with priority: highlight, message, other)@*
|
||||
@*
|
||||
@item Alt + D
|
||||
Display current DCC@*
|
||||
@item Alt + B
|
||||
Go to previous word@*
|
||||
@*
|
||||
@item Alt + R
|
||||
@item Alt + D
|
||||
Delete next word@*
|
||||
@*
|
||||
@item Alt + F
|
||||
Go to next word@*
|
||||
@*
|
||||
@item Alt + H
|
||||
Clear hotlist (activity notification on other buffers)@*
|
||||
@*
|
||||
@item Alt + S
|
||||
@item Alt + J then Alt + D
|
||||
Display current DCC@*
|
||||
@*
|
||||
@item Alt + J then Alt + L
|
||||
Switch to last buffer@*
|
||||
@*
|
||||
@item Alt + J then Alt + S
|
||||
Switch to server buffer@*
|
||||
@*
|
||||
@item Alt + X
|
||||
@item Alt + J then Alt + X
|
||||
Switch to first channel of next server (or server buffer if no channel is opened)@*
|
||||
@*
|
||||
@item Alt + digit (1-9)
|
||||
Switch to buffer by number@*
|
||||
@*
|
||||
@item Alt + J then number (01-99)
|
||||
Switch to buffer by number@*
|
||||
@*
|
||||
@item Alt + K
|
||||
Grab a key
|
||||
@*
|
||||
@item Alt + R
|
||||
Delete entire line@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@@ -785,11 +869,34 @@ display help about commands@*
|
||||
@*
|
||||
command: name of a WeeChat or IRC command@*
|
||||
@*
|
||||
@item ignore [mask [[type | command] [channel [server]]]]
|
||||
@*
|
||||
ignore IRC messages and/or hosts@*
|
||||
@*
|
||||
mask: nick or host mask to ignore@*
|
||||
type: type of message to ignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for ignore@*
|
||||
server: name of server for ignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /ignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item key [key function/command] [unbind key] [functions] [reset -yes]
|
||||
@*
|
||||
bind/unbind keys@*
|
||||
@*
|
||||
key: bind this key to an internal function or a command (beginning by "/")@*
|
||||
unbind: unbind a key (if "all", default bindings are restored)@*
|
||||
functions: list internal functions for key bindings@*
|
||||
reset: restore bindings to the default values and delete ALL personal binding (use carefully!)@*
|
||||
@*
|
||||
@item perl [load filename] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
list/load/unload Perl scripts@*
|
||||
@*
|
||||
filename: Perl script (file) to load@*
|
||||
@*
|
||||
Without argument, /perl command lists all loaded Perl scripts.@*
|
||||
@*
|
||||
@item python [load filename] | [autoload] | [reload] | [unload]
|
||||
@@ -797,8 +904,17 @@ Without argument, /perl command lists all loaded Perl scripts.@*
|
||||
list/load/unload Python scripts@*
|
||||
@*
|
||||
filename: Python script (file) to load@*
|
||||
@*
|
||||
Without argument, /python command lists all loaded Python scripts.@*
|
||||
@*
|
||||
@item ruby [load filename] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
list/load/unload Ruby scripts@*
|
||||
@*
|
||||
filename: Ruby script (file) to load@*
|
||||
@*
|
||||
Without argument, /ruby command lists all loaded Ruby scripts.@*
|
||||
@*
|
||||
@item server [servername] | [servername hostname port [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [del servername]
|
||||
@*
|
||||
list, add or remove servers@*
|
||||
@@ -834,6 +950,20 @@ remove an alias@*
|
||||
@*
|
||||
alias_name: name of alias to remove@*
|
||||
@*
|
||||
@item unignore [number | [mask [[type | command] [channel [server]]]]]
|
||||
@*
|
||||
unignore IRC messages and/or hosts@*
|
||||
@*
|
||||
number: # of ignore to unignore (number is displayed by list of ignore)@*
|
||||
mask: nick or host mask to unignore@*
|
||||
type: type of message to unignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for unignore@*
|
||||
server: name of server for unignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /unignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item window [list | splith | splitv | [merge [down | up | left | right | all]]]
|
||||
@*
|
||||
manage windows@*
|
||||
@@ -854,6 +984,18 @@ find information about the administrator of the server@*
|
||||
@*
|
||||
target: server@*
|
||||
@*
|
||||
@item ame message
|
||||
@*
|
||||
send a CTCP action to all channels of all connected servers@*
|
||||
@*
|
||||
message: message to send@*
|
||||
@*
|
||||
@item amsg text
|
||||
@*
|
||||
send message to all channels of all connected servers@*
|
||||
@*
|
||||
text: text to send@*
|
||||
@*
|
||||
@item away [-all] [message]
|
||||
@*
|
||||
toggle away status@*
|
||||
@@ -868,12 +1010,13 @@ bans nicks or hosts@*
|
||||
channel: channel for ban@*
|
||||
nickname: user or host to ban@*
|
||||
@*
|
||||
@item ctcp nickname type
|
||||
@item ctcp nickname type [arguments]
|
||||
@*
|
||||
send a ctcp message@*
|
||||
send a CTCP message (Client-To-Client Protocol)@*
|
||||
@*
|
||||
nickname: user to send ctcp to@*
|
||||
type: "action" or "version"@*
|
||||
nickname: user to send CTCP to@*
|
||||
type: CTCP type (examples: "version", "ping", ..)@*
|
||||
arguments: arguments for CTCP@*
|
||||
@*
|
||||
@item dcc action [nickname [file]]
|
||||
@*
|
||||
@@ -883,15 +1026,15 @@ action: 'send' (file) or 'chat' or 'close' (chat)@*
|
||||
nickname: nickname to send file or chat@*
|
||||
file: filename (on local host)@*
|
||||
@*
|
||||
@item dehalfop nickname [nickname]
|
||||
@item dehalfop [nickname [nickname]]
|
||||
@*
|
||||
removes half channel operator status from nickname(s)@*
|
||||
@*
|
||||
@item deop nickname [nickname]
|
||||
@item deop [nickname [nickname]]
|
||||
@*
|
||||
removes channel operator status from nickname(s)@*
|
||||
@*
|
||||
@item devoice nickname [nickname]
|
||||
@item devoice [nickname [nickname]]
|
||||
@*
|
||||
removes voice from nickname(s)@*
|
||||
@*
|
||||
@@ -899,7 +1042,7 @@ removes voice from nickname(s)@*
|
||||
@*
|
||||
shutdown the server@*
|
||||
@*
|
||||
@item halfop nickname [nickname]
|
||||
@item halfop [nickname [nickname]]
|
||||
@*
|
||||
gives half channel operator status to nickname(s)@*
|
||||
@*
|
||||
@@ -975,7 +1118,7 @@ target: server for forwarding request@*
|
||||
@*
|
||||
@item me message
|
||||
@*
|
||||
send a ctcp action to the current channel@*
|
||||
send a CTCP action to the current channel@*
|
||||
@*
|
||||
message: message to send@*
|
||||
@*
|
||||
@@ -1182,7 +1325,7 @@ gives the version info of nick or server (current or specified)@*
|
||||
server: server name@*
|
||||
nickname: nickname@*
|
||||
@*
|
||||
@item voice nickname [nickname]
|
||||
@item voice [nickname [nickname]]
|
||||
@*
|
||||
gives voice to nickname(s)@*
|
||||
@*
|
||||
@@ -1216,6 +1359,83 @@ target: reply should match this mask@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
Internal functions for keys:@*
|
||||
|
||||
@table @kbd
|
||||
@item return
|
||||
terminate line@*
|
||||
@item tab
|
||||
complete word@*
|
||||
@item backspace
|
||||
delete previous char@*
|
||||
@item delete
|
||||
delete next char@*
|
||||
@item delete_end_line
|
||||
delete until end of line@*
|
||||
@item delete_beginning_line
|
||||
delete until beginning of line@*
|
||||
@item delete_line
|
||||
delete entire line@*
|
||||
@item delete_previous_word
|
||||
delete previous word@*
|
||||
@item delete_next_word
|
||||
delete next word@*
|
||||
@item clipboard_paste
|
||||
paste current clipboard content@*
|
||||
@item transpose_chars
|
||||
transpose chars@*
|
||||
@item home
|
||||
go to beginning of line@*
|
||||
@item end
|
||||
go to end of line@*
|
||||
@item left
|
||||
move one char left@*
|
||||
@item previous_word
|
||||
move to previous word@*
|
||||
@item right
|
||||
move one char right@*
|
||||
@item next_word
|
||||
move to next word@*
|
||||
@item up
|
||||
call previous command in history@*
|
||||
@item up_global
|
||||
call previous command in global history@*
|
||||
@item down
|
||||
call next command in history@*
|
||||
@item down_global
|
||||
call next command in global history@*
|
||||
@item page_up
|
||||
scroll one page up@*
|
||||
@item page_down
|
||||
scroll one page down@*
|
||||
@item infobar_clear
|
||||
clear infobar@*
|
||||
@item nick_page_up
|
||||
scroll nicklist one page up@*
|
||||
@item nick_page_down
|
||||
scroll nicklist one page down@*
|
||||
@item nick_beginning
|
||||
display beginning of nicklist@*
|
||||
@item nick_end
|
||||
display end of nicklist@*
|
||||
@item refresh
|
||||
refresh screen@*
|
||||
@item jump_smart
|
||||
jump to buffer with activity@*
|
||||
@item jump_dcc
|
||||
jump to DCC buffer@*
|
||||
@item jump_last_buffer
|
||||
jump to last buffer@*
|
||||
@item jump_server
|
||||
jump to server buffer@*
|
||||
@item jump_next_server
|
||||
jump to next server@*
|
||||
@item hotlist_clear
|
||||
clear hotlist@*
|
||||
@item grab_key
|
||||
grab a key@*
|
||||
@end table
|
||||
|
||||
@node FIFO pipe, , WeeChat commands, Usage
|
||||
@section FIFO pipe
|
||||
|
||||
@@ -1234,15 +1454,19 @@ Some examples:
|
||||
@item @bullet{} change your nick on freenode to "mynick|out":
|
||||
@*
|
||||
@command{echo "freenode */nick mynick|out" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} display text on #weechat channel:
|
||||
@*
|
||||
@command{echo "freenode,#weechat *hello everybody!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} display text on current channel (buffer displayed by WeeChat):
|
||||
@*
|
||||
@command{echo "*hello!" >~/.weechat/weechat_fifo_12345}@*
|
||||
@command{echo "*hello!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@b{Warning:} this is dangerous and you should not do that except if you know what you do!
|
||||
@*
|
||||
@item @bullet{} send 2 commands to unload/reload Perl scripts (you have to separate them with \n):
|
||||
@*
|
||||
@command{echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345}
|
||||
@end table
|
||||
@*
|
||||
|
||||
+278
-53
@@ -30,14 +30,13 @@
|
||||
@c end tex
|
||||
|
||||
@documentlanguage es
|
||||
@documentencoding ISO-8859-1
|
||||
|
||||
@titlepage
|
||||
|
||||
@title WeeChat - Gui@'on de usuario.
|
||||
@subtitle Cliente IRC r@'apido, peque@~no y extensible
|
||||
@subtitle Documentaci@'on para WeeChat v0.1.3 - 03 de Julio de 2005
|
||||
|
||||
@image{weechat_image}
|
||||
@subtitle Documentaci@'on para WeeChat v0.1.5 - 24 de Septiembre de 2005
|
||||
|
||||
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
|
||||
|
||||
@@ -150,7 +149,7 @@ Los paquetes binarios est@'an disponibles para las siguientes distribuciones:
|
||||
@itemize @bullet
|
||||
@item
|
||||
Debian (o compatible con Debian)@*
|
||||
Para instalar WeeChat: @kbd{dpkg -i /direccion/weechat_x.y.z-1_i386.deb}
|
||||
Para instalar WeeChat: @kbd{apt-get install weechat-curses}
|
||||
@item
|
||||
Mandrake/Redhat (o cualquier distribuci@'on compatible con los paquetes RPM)@*
|
||||
Para instalar WeeChat: @kbd{rpm -i /direccion/weechat-x.y.z-1.i386.rpm}
|
||||
@@ -187,7 +186,7 @@ Adquiere los derechos de root e instala WeeChat:@*
|
||||
|
||||
Atenci@'on: Las fuentes CVS est@'an reservadas para usuarios con experiencia: Es posible que WeeChat no
|
||||
se instale o que se sea bastante inestable.
|
||||
¡Ya te he avisado!@*
|
||||
@exclamdown{}Ya te he avisado!@*
|
||||
|
||||
Para recuperar las fuentes CVS, escribe las l@'ineas siguientes:@*
|
||||
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
|
||||
@@ -221,6 +220,8 @@ Luego, lee las instructiones para Paquetes de fuentes - @xref{Paquetes de fuente
|
||||
@table @code
|
||||
@item -c, --config
|
||||
Obtener la ayuda del fichero de configuraci@'on (lista de opciones)@*
|
||||
@item -f, --key-functions
|
||||
Display WeeChat internal functions for keys@*
|
||||
@item -h, --help
|
||||
Obtener la ayuda@*
|
||||
@item -i, --irc-commands
|
||||
@@ -279,6 +280,9 @@ Typo: cadena (cualquier cadena), valor por defecto: '[%H:%M:%S]'@*
|
||||
@item look_color_nicks
|
||||
Mostrar nombres de usuario con colores diferentes@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@item look_color_nicks_number
|
||||
Number of colors to use for nicks colors@*
|
||||
Typo: entero (valores: entre 1 y 10), valor por defecto: 10@*
|
||||
@item look_color_actions
|
||||
Mostrar acciones con colores diferentes@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@@ -314,7 +318,10 @@ Activa la barra de informaci@'on@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@item look_infobar_timestamp
|
||||
Fecha y hora para las conversaciones guardadas@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: '%B, %A %d %Y - %H:%M'@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: '%B, %A %d %Y'@*
|
||||
@item look_infobar_seconds
|
||||
Mostrar segundos en la hora de la barra de herramientas@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@item look_infobar_delay_highlight
|
||||
Retraso (en segundos) para la notificaci@'on de mensajes en la barra de informaci@'on (0 = desactivar las notificaciones en la barra de informaci@'on)@*
|
||||
Typo: entero (valores: entre 0 y 2147483647), valor por defecto: 7@*
|
||||
@@ -339,6 +346,12 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'lightcyan'@*
|
||||
@item col_chat_prefix2
|
||||
Color para el car@'acter de en medio del prefijo@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'white'@*
|
||||
@item col_chat_join
|
||||
Color for join arrow (prefix)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightgreen'@*
|
||||
@item col_chat_part
|
||||
Color for part/quit arrow (prefix)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightred'@*
|
||||
@item col_chat_nick
|
||||
Color para los nombres de usuario en las acciones (ventana de conversaci@'on)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightcyan'@*
|
||||
@@ -366,9 +379,12 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'cyan'@*
|
||||
@item col_status_data_msg
|
||||
Color para una ventana con mensajes nuevos (barra de estado)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'yellow'@*
|
||||
@item col_status_private
|
||||
Color for window with private message (status bar)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_status_highlight
|
||||
Color para una ventana con resaltado (barra de estado)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightred'@*
|
||||
@item col_status_data_other
|
||||
Color para una ventana con nuevos datos (no mensajes) (barra de estado)@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'default'@*
|
||||
@@ -381,6 +397,9 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@item col_infobar
|
||||
Color para el texto de la barra de informaci@'on@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'black'@*
|
||||
@item col_infobar_delimiters
|
||||
Color para los delimitadores de la barra de informaci@'on@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@item col_infobar_highlight
|
||||
Color para la notificaci@'on en la barra de informaci@'on@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'white'@*
|
||||
@@ -421,7 +440,7 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
Color para el s@'imbolo de voz@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'yellow'@*
|
||||
@item col_nick_more
|
||||
Color for '+' when scrolling nicks@*
|
||||
Color para '+' al desplazar nicks@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_nick_sep
|
||||
Color para el separador de alias@*
|
||||
@@ -429,6 +448,36 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@item col_nick_self
|
||||
Color para el alias local@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'white'@*
|
||||
@item col_nick_color1
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'cyan'@*
|
||||
@item col_nick_color2
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'magenta'@*
|
||||
@item col_nick_color3
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'green'@*
|
||||
@item col_nick_color4
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'brown'@*
|
||||
@item col_nick_color5
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightblue'@*
|
||||
@item col_nick_color6
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'default'@*
|
||||
@item col_nick_color7
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightcyan'@*
|
||||
@item col_nick_color8
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_nick_color9
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightgreen'@*
|
||||
@item col_nick_color10
|
||||
Color for nick@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@item col_nick_private
|
||||
Color para el otro alias en la ventana privada@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'default'@*
|
||||
@@ -495,6 +544,9 @@ Typo: cadena (cualquier cadena), valor por defecto: 'WeeChat %v'@*
|
||||
@item irc_default_msg_quit
|
||||
Mensaje de fin por defecto ('%v' ser@'a reemplazado por la versi@'on de WeeChat en la cadena)@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: 'WeeChat %v'@*
|
||||
@item irc_notice_as_pv
|
||||
Display notices as private messages@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item irc_away_check
|
||||
Intervalo entre dos comprobaciones de ausencia (en minutos, 0 = no comprobar)@*
|
||||
Typo: entero (valores: entre 0 y 2147483647), valor por defecto: 0@*
|
||||
@@ -510,6 +562,9 @@ Typo: entero (valores: entre 0 y 2147483647), valor por defecto: 5@*
|
||||
@item irc_fifo_pipe
|
||||
Crea una tuber@'ia FIFO para control remoto@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item irc_highlight
|
||||
Comma separated list of words to highlight (case insensitive comparison)@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
@item dcc_auto_accept_files
|
||||
Aceptar autom@'aticamente los ficheros dcc entrantes@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@@ -541,10 +596,10 @@ Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
Utilizar un proxy para conectarse al servidor irc@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item proxy_type
|
||||
Proxy type (http (default), socks4, socks5)@*
|
||||
Tipo de proxy(http (por defecto), socks4, socks5)@*
|
||||
Typo: cadena (valores: 'http', 'socks4', 'socks5'), valor por defecto: 'http'@*
|
||||
@item proxy_ipv6
|
||||
Connect to proxy in ipv6@*
|
||||
Conectar al proxy en ipv6@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item proxy_address
|
||||
Direcci@'on del servidor proxy (IP o nombre de m@'aquina)@*
|
||||
@@ -553,7 +608,7 @@ Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
Puerto para conectarse al servidor proxy@*
|
||||
Typo: entero (valores: entre 0 y 65535), valor por defecto: 3128@*
|
||||
@item proxy_username
|
||||
Username for proxy server@*
|
||||
Nombre de usuario para el servidor proxy@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
@item proxy_password
|
||||
Contrase@~na para el servidor proxy@*
|
||||
@@ -577,10 +632,10 @@ Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
Puerto para conectarse al servidor@*
|
||||
Typo: entero (valores: entre 0 y 65535), valor por defecto: 6667@*
|
||||
@item server_ipv6
|
||||
Use IPv6 protocol for server communication@*
|
||||
Usar el protocolo IPv6 para la comunicaci@'on del servidor@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item server_ssl
|
||||
Use SSL for server communication@*
|
||||
Usar SSL para la comunicaci@'on del servidor@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
|
||||
@item server_password
|
||||
Contrase@~na para el servidor IRC@*
|
||||
@@ -607,13 +662,13 @@ Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
Espera (en segundos) despu@'es de que el comando sea ejecutado (ejemplo: dar algo de tiempo para la autenticaci@'on)@*
|
||||
Typo: entero (valores: entre 0 y 5), valor por defecto: 0@*
|
||||
@item server_autojoin
|
||||
Lista de canales (separados por comas) a unirse cuando se conecte a un servidor@*
|
||||
Lista de canales (separados por comas) a unirse cuando se conecte a un servidor (ejemplo: "#chan1,#chan2,#chan3 #key1,#key2")@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
@item server_autorejoin
|
||||
Unirse de nuevo autom@'aticamente a los canales cuando sea expulsado@*
|
||||
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
|
||||
@item server_notify_levels
|
||||
Comma separated list of notify levels for channels of this server (format: #channel:1,..)@*
|
||||
Lista separada por comas de niveles de notificaci@'on para canales de este servidor (formato: #canal:1,...)@*
|
||||
Typo: cadena (cualquier cadena), valor por defecto: ''@*
|
||||
@end table
|
||||
|
||||
@@ -667,12 +722,21 @@ Ir al inicio de la l@'inea de comandos@*
|
||||
@item Fin / Ctrl + E
|
||||
Ir al final de la l@'inea de comandos@*
|
||||
@*
|
||||
@item Ctrl + K
|
||||
Delete until end of line@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Refrescar toda la ventana@*
|
||||
@*
|
||||
@item Ctrl + U
|
||||
Delete until beginning of line@*
|
||||
@*
|
||||
@item Ctrl + W
|
||||
Borrar la palabra anterior en la l@'inea de comandos@*
|
||||
@*
|
||||
@item Backspace / Supr
|
||||
Borrar el caracter anterior / siguiente en la l@'inea de comandos@*
|
||||
@*
|
||||
@item Ctrl + Backspace / Ctrl + W
|
||||
Borrar la palabra anterior en la l@'inea de comandos@*
|
||||
@*
|
||||
@item Tab
|
||||
Completar el comando o el seud@'onimo (@kbd{Tab} de nuevo: encontrar la pr@'oxima autocompletaci@'on)@*
|
||||
@*
|
||||
@@ -685,6 +749,9 @@ Ejecutar la l@'inea de comandos o enviar el mensaje@*
|
||||
@item Flecha de arriba / Flecha de abajo
|
||||
Mostrar los @'ultimos comandos/mensajes@*
|
||||
@*
|
||||
@item Ctrl + up arrow / Ctrl + down arrow
|
||||
Call again last commands/messages in global history@*
|
||||
@*
|
||||
@item PageUp / PageDown
|
||||
Obtener el hist@'orico de la memoria temporal (buffer)@*
|
||||
@*
|
||||
@@ -700,30 +767,48 @@ Borrar el @'ultimo mensaje en la barra de informaciones@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Refrescar toda la ventana@*
|
||||
@*
|
||||
@item Alt + flecha izquierda / Alt + flecha derecha
|
||||
Como F5 / F6@*
|
||||
@*
|
||||
@item Alt + A
|
||||
Ir a la memoria temporal donde hay actividad (con el orden de prioridad siguiente: resaltado, mensaje, otros)@*
|
||||
@*
|
||||
@item Alt + D
|
||||
Obtener la lista de DCC actual@*
|
||||
@item Alt + B
|
||||
Go to previous word@*
|
||||
@*
|
||||
@item Alt + R
|
||||
@item Alt + D
|
||||
Delete next word@*
|
||||
@*
|
||||
@item Alt + F
|
||||
Go to next word@*
|
||||
@*
|
||||
@item Alt + H
|
||||
Borrar la 'hotlist' (notificaci@'on de actividad en otras memorias temporales)@*
|
||||
@*
|
||||
@item Alt + S
|
||||
@item Alt + J then Alt + D
|
||||
Obtener la lista de DCC actual@*
|
||||
@*
|
||||
@item Alt + J then Alt + L
|
||||
Switch to last buffer@*
|
||||
@*
|
||||
@item Alt + J then Alt + S
|
||||
Ir a la memoria temporal del servidor@*
|
||||
@*
|
||||
@item Alt + X
|
||||
@item Alt + J then Alt + X
|
||||
Ir al primer canal del servidor siguiente (o a la memoria temporal del servidor si ning@'un canal est@'a abierto)@*
|
||||
@*
|
||||
@item Alt + (1-9)
|
||||
Saltar a la memoria temporal con ese n@'umero@*
|
||||
@*
|
||||
@item Alt + J then number (01-99)
|
||||
Saltar a la memoria temporal con ese n@'umero@*
|
||||
@*
|
||||
@item Alt + K
|
||||
Grab a key
|
||||
@*
|
||||
@item Alt + R
|
||||
Delete entire line@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@@ -784,11 +869,34 @@ mostrar ayuda sobre los comandos@*
|
||||
@*
|
||||
comando: nombre de un comando de Weechat @'o de IRC@*
|
||||
@*
|
||||
@item ignore [mask [[type | command] [channel [server]]]]
|
||||
@*
|
||||
ignore IRC messages and/or hosts@*
|
||||
@*
|
||||
mask: nick or host mask to ignore@*
|
||||
type: type of message to ignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for ignore@*
|
||||
server: name of server for ignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /ignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item key [clave funci@'on/comando] [desatar clave] [funciones] [reset -yes]
|
||||
@*
|
||||
atar/desatar claves@*
|
||||
@*
|
||||
clave: ata esta clave a una funci@'on interna o a un comando (comenzando por "/ ")@*
|
||||
desatar: desata una clave(si "all", se restauran los anclajes por defecto)@*
|
||||
funciones: lista funciones internas para el anclaje de claves@*
|
||||
reset: restaura anclajes a los valores por defecto y elimina todos los anclajes personales (usar cuidadosamente)@*
|
||||
@*
|
||||
@item perl [load fichero] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
lista/carga/descarga de los Perl scripts@*
|
||||
@*
|
||||
fichero: Perl script (archivo) a cargar@*
|
||||
@*
|
||||
Sin argumentos, el comando /perl lista todos los Perl scripts cargados.@*
|
||||
@*
|
||||
@item python [load fichero] | [autoload] | [reload] | [unload]
|
||||
@@ -796,23 +904,32 @@ Sin argumentos, el comando /perl lista todos los Perl scripts cargados.@*
|
||||
lista/carga/descarga de los Python scripts@*
|
||||
@*
|
||||
fichero: Python script (archivo) a cargar@*
|
||||
@*
|
||||
Sin argumentos, el comando /python lista todos los Python scripts cargados.@*
|
||||
@*
|
||||
@item ruby [load fichero] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
lista/carga/descarga de los Ruby scripts@*
|
||||
@*
|
||||
fichero: Ruby script (archivo) a cargar@*
|
||||
@*
|
||||
Sin argumentos, el comando /ruby lista todos los Ruby scripts cargados.@*
|
||||
@*
|
||||
@item server [nombre_de_servidor] | [nombre_de_servidor nombre/IP puerto [-auto | -noauto] [-ipv6] [-ssl] [-pwd contrase@~na] [-nicks alias1 [alias2 [alias3]]] [-username nombre de usuario] [-realname nombre_real] [-command comando] [-autojoin canal[,canal]] ] | [del nombre_de_servidor]
|
||||
@*
|
||||
lista, a@~nade o elimina servidores@*
|
||||
@*
|
||||
servername: server name, for internal & display use@*
|
||||
hostname: name or IP address of server@*
|
||||
port: port for server (integer)@*
|
||||
ipv6: use IPv6 protocol@*
|
||||
ssl: use SSL protocol@*
|
||||
password: password for server@*
|
||||
nick1: first nick for server@*
|
||||
nick2: alternate nick for server@*
|
||||
nick3: second alternate nick for server@*
|
||||
username: user name@*
|
||||
realname: real name of user@*
|
||||
nombre_de_servidor: nombre del servidor, para uso interno y para mostrar@*
|
||||
nombre_de_anfitri@'on: nombre o direcci@'on IP del servidor@*
|
||||
puerto: puerto para el servidor (número entero)@*
|
||||
ipv6: utilizar protocolo IPv6@*
|
||||
ssl: utilizar protocolo SSL@*
|
||||
contrase@~na: contrase@~na para el servidor@*
|
||||
alias1: primer alias para el servidor@*
|
||||
alias2: alias alternativo para el servidor@*
|
||||
alias3: segundo alias alternativo para el servidor@*
|
||||
nombre_de_usuario: nombre de usuario@*
|
||||
nombre_real: nombre real del usuario@*
|
||||
@*
|
||||
@item save [archivo]
|
||||
@*
|
||||
@@ -833,6 +950,20 @@ eliminar un alias@*
|
||||
@*
|
||||
alias: nombre del alias a suprimir@*
|
||||
@*
|
||||
@item unignore [number | [mask [[type | command] [channel [server]]]]]
|
||||
@*
|
||||
unignore IRC messages and/or hosts@*
|
||||
@*
|
||||
number: # of ignore to unignore (number is displayed by list of ignore)@*
|
||||
mask: nick or host mask to unignore@*
|
||||
type: type of message to unignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for unignore@*
|
||||
server: name of server for unignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /unignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item window [list | splith | splitv | [merge [down | up | left | right | all]]]
|
||||
@*
|
||||
gesti@'on de ventanas@*
|
||||
@@ -853,6 +984,18 @@ encontrar informaci@'on sobre el administrador del servidor@*
|
||||
@*
|
||||
target: servidor objetivo@*
|
||||
@*
|
||||
@item ame mensaje
|
||||
@*
|
||||
send a CTCP action to all channels of all connected servers@*
|
||||
@*
|
||||
mensaje: mensaje a enviar@*
|
||||
@*
|
||||
@item amsg texto
|
||||
@*
|
||||
send message to all channels of all connected servers@*
|
||||
@*
|
||||
texto: texto a enviar@*
|
||||
@*
|
||||
@item away [-all] [mensaje]
|
||||
@*
|
||||
revertir el estado ausente@*
|
||||
@@ -867,12 +1010,13 @@ banea usuarios o m@'aquinas@*
|
||||
canal: canal en el que banear@*
|
||||
usuario: nombre de usuario o m@'aquina a banear@*
|
||||
@*
|
||||
@item ctcp usuario tipo
|
||||
@item ctcp nickname type [arguments]
|
||||
@*
|
||||
enviar un mensaje ctcp@*
|
||||
send a CTCP message (Client-To-Client Protocol)@*
|
||||
@*
|
||||
usuario: usuario a quien enviar el ctcp@*
|
||||
tipo: "action" @'o "version"@*
|
||||
nickname: user to send CTCP to@*
|
||||
type: CTCP type (examples: "version", "ping", ..)@*
|
||||
arguments: arguments for CTCP@*
|
||||
@*
|
||||
@item dcc acci@'on [usuario [fichero]]
|
||||
@*
|
||||
@@ -882,15 +1026,15 @@ acci@'on: 'send' (env@'io de archivo) @'o 'chat' (charla) @'o 'close' (cerrar ch
|
||||
usuario: nombre de usuario a quien enviar el archivo o la charla@*
|
||||
fichero: nombre del fichero (en la m@'aquina local)@*
|
||||
@*
|
||||
@item dehalfop pseudo [pseudo]
|
||||
@item dehalfop [pseudo [pseudo]]
|
||||
@*
|
||||
elimina el estado de media operador de canal a/a los usuario(s)@*
|
||||
@*
|
||||
@item deop pseudo [pseudo]
|
||||
@item deop [pseudo [pseudo]]
|
||||
@*
|
||||
elimina el estado de operador de canal a/a los usuario(s)@*
|
||||
@*
|
||||
@item devoice pseudo [pseudo]
|
||||
@item devoice [pseudo [pseudo]]
|
||||
@*
|
||||
elimina la voz a/a los usuario(s)@*
|
||||
@*
|
||||
@@ -898,7 +1042,7 @@ elimina la voz a/a los usuario(s)@*
|
||||
@*
|
||||
cerrar el servidor@*
|
||||
@*
|
||||
@item halfop pseudo [pseudo]
|
||||
@item halfop [pseudo [pseudo]]
|
||||
@*
|
||||
dar el estado de media operador de canal a/a los usuario(s)@*
|
||||
@*
|
||||
@@ -974,7 +1118,7 @@ objetivo: servidor al que remitir la consulta@*
|
||||
@*
|
||||
@item me mensaje
|
||||
@*
|
||||
enviar una acci@'on ctcp al canal actual@*
|
||||
enviar una acci@'on CTCP al canal actual@*
|
||||
@*
|
||||
mensaje: mensaje a enviar@*
|
||||
@*
|
||||
@@ -1025,8 +1169,8 @@ canal: nombre del canal@*
|
||||
@*
|
||||
cambiar el nombre de usuario actual@*
|
||||
@*
|
||||
-all: set new nickname for all connected servers@*
|
||||
nickname: new nickname@*
|
||||
-all: establece el nuevo nombre de usuario para todos los servidores conectados@*
|
||||
nickname: nuevo nombre de usuario@*
|
||||
@*
|
||||
@item notice usuario texto
|
||||
@*
|
||||
@@ -1181,7 +1325,7 @@ da la informaci@'on de versi@'on del usuario o servidor (actual o especificado)@
|
||||
servidor: nombre de servidor@*
|
||||
usuario: usuario@*
|
||||
@*
|
||||
@item voice pseudo [pseudo]
|
||||
@item voice [pseudo [pseudo]]
|
||||
@*
|
||||
da voz a/a los usuario(s)@*
|
||||
@*
|
||||
@@ -1215,6 +1359,83 @@ destinatario: la respuesta deber@'ia concordar con esta m@'ascara@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
Internal functions for keys:@*
|
||||
|
||||
@table @kbd
|
||||
@item return
|
||||
terminar l@'inea@*
|
||||
@item tab
|
||||
completar palabra@*
|
||||
@item backspace
|
||||
borrar el car@'acter anterior@*
|
||||
@item delete
|
||||
borrar el car@'acter siguiente@*
|
||||
@item delete_end_line
|
||||
borrar hasta fin de l@'inea@*
|
||||
@item delete_beginning_line
|
||||
borrar hasta principio de l@'inea@*
|
||||
@item delete_line
|
||||
borrar l@'inea entera@*
|
||||
@item delete_previous_word
|
||||
borrar la palabra anterior@*
|
||||
@item delete_next_word
|
||||
borrar la palabra siguiente@*
|
||||
@item clipboard_paste
|
||||
paste current clipboard content@*
|
||||
@item transpose_chars
|
||||
transpose chars@*
|
||||
@item home
|
||||
ir al principio de l@'inea@*
|
||||
@item end
|
||||
ir al final de l@'inea@*
|
||||
@item left
|
||||
mover un car@'acter a la izquierda@*
|
||||
@item previous_word
|
||||
mover a la palabra anterior@*
|
||||
@item right
|
||||
mover un car@'acter a la derecha@*
|
||||
@item next_word
|
||||
mover a la palabra siguiente@*
|
||||
@item up
|
||||
llamar al comando anterior en el historial@*
|
||||
@item up_global
|
||||
call previous command in global history@*
|
||||
@item down
|
||||
llamar al comando siguiente en el historial@*
|
||||
@item down_global
|
||||
call next command in global history@*
|
||||
@item page_up
|
||||
desplazarse una p@'agina hacia arriba@*
|
||||
@item page_down
|
||||
desplazarse una p@'agina hacia abajo@*
|
||||
@item infobar_clear
|
||||
limpiar barra de informaci@'on@*
|
||||
@item nick_page_up
|
||||
desplazar la lista de nicks una p@'agina hacia arriba@*
|
||||
@item nick_page_down
|
||||
desplazar la lista de nicks una p@'agina hacia abajo@*
|
||||
@item nick_beginning
|
||||
mostrar el principio de la lista de nicks@*
|
||||
@item nick_end
|
||||
mostrar el final de la lista de nicks@*
|
||||
@item refresh
|
||||
recargar la pantalla@*
|
||||
@item jump_smart
|
||||
saltar al búfer con actividad@*
|
||||
@item jump_dcc
|
||||
saltar al búfer DCC@*
|
||||
@item jump_last_buffer
|
||||
jump to last buffer@*
|
||||
@item jump_server
|
||||
saltar al búfer servidor@*
|
||||
@item jump_next_server
|
||||
saltar al servidor siguiente@*
|
||||
@item hotlist_clear
|
||||
limpiar hotlist@*
|
||||
@item grab_key
|
||||
grab a key@*
|
||||
@end table
|
||||
|
||||
@node Canal FIFO, , Comandos WeeChat, Uso
|
||||
@section Canal FIFO
|
||||
|
||||
@@ -1235,15 +1456,19 @@ Algunos ejemplos:
|
||||
@item @bullet{} cambiar el seud@'onimo en freenode por "mynick|out":
|
||||
@*
|
||||
@command{echo "freenode */nick mynick|out" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} escribir texto en el canal #weechat:
|
||||
@*
|
||||
@command{echo "freenode,#weechat *@exclamdown{}Hola a todos!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} escribir texto en el canal corriente (el que se puede visualizar en WeeChat actualmente)
|
||||
@*
|
||||
@command{echo "*¡Hola!" >~/.weechat/weechat_fifo_12345}@*
|
||||
@command{echo "*@exclamdown{}Hola!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@b{Advertencia:} esto es peligroso y no deber@'ias hacerlo.. salvo si lo que est@'as haciendo.
|
||||
@*
|
||||
@item @bullet{} enviar dos comandos para descargar y recargar los scripts Perl (tienes que separarlos con un \n):
|
||||
@*
|
||||
@command{echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345}
|
||||
@end table
|
||||
@*
|
||||
@@ -1370,7 +1595,7 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
|
||||
@code{@ @ @ @ weechat::print ("serveur=$_[0]\n");}@*
|
||||
@code{@ @ @ @ ($null, $canal, $mensaje) = split ":",$_[1],3;}@*
|
||||
@code{@ @ @ @ ($mascara, $null, $canal) = split " ", $canal;}@*
|
||||
@code{@ @ @ @ weechat::print ("mascara=$mascara, canal=$canal, mensaje=$mensaje\n");}@*
|
||||
@code{@ @ @ @ weechat::print ("masc=$mascara, canal=$canal, msj=$mensaje\n");}@*
|
||||
@code{@} }@*
|
||||
@*
|
||||
|
||||
@@ -1538,7 +1763,7 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
|
||||
@code{@ @ @ @ weechat.prnt("servidor="+servidor)}@*
|
||||
@code{@ @ @ @ null, canal, mensaje = string.split(args, ":", 2)}@*
|
||||
@code{@ @ @ @ mascara, null, canal = string.split(string.strip(canal), " ", 2)}@*
|
||||
@code{@ @ @ @ weechat.prnt("mascara="+mascara+", canal="+canal+", mensaje="+mensaje)}@*
|
||||
@code{@ @ @ @ weechat.prnt("masc="+mascara+", canal="+canal+", msj="+mensaje)}@*
|
||||
@*
|
||||
|
||||
@item
|
||||
@@ -1609,7 +1834,7 @@ Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
|
||||
@node Programas Ruby, , Programas Python, Extensiones
|
||||
@section Programas Ruby
|
||||
|
||||
¡No desarrollado!
|
||||
@exclamdown{}No desarrollado!
|
||||
|
||||
@c **************************** Autores / Soporte *****************************
|
||||
|
||||
|
||||
+260
-32
@@ -30,14 +30,13 @@
|
||||
@c end tex
|
||||
|
||||
@documentlanguage fr
|
||||
@documentencoding ISO-8859-1
|
||||
|
||||
@titlepage
|
||||
|
||||
@title WeeChat - Guide utilisateur
|
||||
@subtitle Client IRC rapide, l@'eger et extensible
|
||||
@subtitle Documentation pour WeeChat v0.1.3 - 03 Juillet 2005
|
||||
|
||||
@image{weechat_image}
|
||||
@subtitle Documentation pour WeeChat v0.1.5 - 24 Septembre 2005
|
||||
|
||||
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
|
||||
|
||||
@@ -149,7 +148,7 @@ Les paquets binaires sont disponibles pour les distributions suivantes :
|
||||
@itemize @bullet
|
||||
@item
|
||||
Debian (ou toute distribution compatible Debian)@*
|
||||
Pour installer : @kbd{dpkg -i /chemin/weechat_x.y.z-1_i386.deb}
|
||||
Pour installer : @kbd{apt-get install weechat-curses}
|
||||
@item
|
||||
Mandrake/Redhat (ou toute distribution compatible avec les RPM)@*
|
||||
Pour installer : @kbd{rpm -i /chemin/weechat-x.y.z-1.i386.rpm}
|
||||
@@ -222,6 +221,8 @@ Suivez alors les instructions du paquet sources - @xref{Paquet source}.
|
||||
Afficher l'aide sur le fichier de config (liste des options)@*
|
||||
@item -h, --help
|
||||
Afficher l'aide@*
|
||||
@item -f, --key-functions
|
||||
Afficher la liste des fonctions internes WeeChat pour les touches@*
|
||||
@item -i, --irc-commands
|
||||
Afficher la liste des commandes IRC@*
|
||||
@item -l, --license
|
||||
@@ -280,6 +281,9 @@ Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: '[%H:%M:%S]'@*
|
||||
@item look_color_nicks
|
||||
Afficher les utilisateurs avec diff@'erentes couleurs@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
|
||||
@item look_color_nicks_number
|
||||
Nombre de couleurs @`a utiliser pour les couleurs des pseudos@*
|
||||
Type: entier (valeurs: entre 1 et 10), valeur par d@'efaut: 10@*
|
||||
@item look_color_actions
|
||||
Afficher les actions avec diff@'erentes couleurs@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
|
||||
@@ -315,7 +319,10 @@ Active la barre d'infos@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
|
||||
@item look_infobar_timestamp
|
||||
Horodatage pour les conversations sauvegard@'ees@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: '%B, %A %d %Y - %H:%M'@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: '%B, %A %d %Y'@*
|
||||
@item look_infobar_seconds
|
||||
Afficher les secondes pour l'heure dans la barre d'infos@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
|
||||
@item look_infobar_delay_highlight
|
||||
D@'elai (en secondes) pour la notification des messages dans la barre d'infos (0 = d@'esactiver les notifications dans la barre d'infos)@*
|
||||
Type: entier (valeurs: entre 0 et 2147483647), valeur par d@'efaut: 7@*
|
||||
@@ -340,6 +347,12 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightcyan'@*
|
||||
@item col_chat_prefix2
|
||||
Couleur pour le caract@`ere du milieu du pr@'efixe@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'white'@*
|
||||
@item col_chat_join
|
||||
Couleur pour la fl@`eche du join (pr@'efixe)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightgreen'@*
|
||||
@item col_chat_part
|
||||
Couleur pour la fl@`eche du part/quit (pr@'efixe)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightred'@*
|
||||
@item col_chat_nick
|
||||
Couleur pour les noms d'utilisateurs dans les actions (fen@^etre de discussion)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightcyan'@*
|
||||
@@ -367,9 +380,12 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'cyan'@*
|
||||
@item col_status_data_msg
|
||||
Couleur pour une fen@^etre avec de nouvelles infos (barre de statut)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'yellow'@*
|
||||
@item col_status_private
|
||||
Couleur pour une fen@^etre avec un message priv@'e (barre de statut)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
@item col_status_highlight
|
||||
Couleur pour une fen@^etre avec un highlight (barre de statut)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightred'@*
|
||||
@item col_status_data_other
|
||||
Couleur pour une fen@^etre avec des nouvelles donn@'ees (pas des infos) (barre de statut)@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'default'@*
|
||||
@@ -382,6 +398,9 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@item col_infobar
|
||||
Couleur pour la barre d'infos@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'black'@*
|
||||
@item col_infobar_delimiters
|
||||
Couleur pour les d@'elimiteurs de la barre d'infos@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@item col_infobar_highlight
|
||||
Couleur pour la notification dans la barre d'infos@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'white'@*
|
||||
@@ -430,6 +449,36 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@item col_nick_self
|
||||
Couleur pour le pseudo local@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'white'@*
|
||||
@item col_nick_color1
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'cyan'@*
|
||||
@item col_nick_color2
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'magenta'@*
|
||||
@item col_nick_color3
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'green'@*
|
||||
@item col_nick_color4
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'brown'@*
|
||||
@item col_nick_color5
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightblue'@*
|
||||
@item col_nick_color6
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'default'@*
|
||||
@item col_nick_color7
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightcyan'@*
|
||||
@item col_nick_color8
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
@item col_nick_color9
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightgreen'@*
|
||||
@item col_nick_color10
|
||||
Couleur pour le pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@item col_nick_private
|
||||
Couleur pour l'autre pseudo dans la fen@^etre priv@'ee@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'default'@*
|
||||
@@ -496,6 +545,9 @@ Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: 'WeeChat %v'@*
|
||||
@item irc_default_msg_quit
|
||||
Message de fin par d@'efaut ('%v' sera remplac@'e par la version de WeeChat dans la cha@^ine)@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: 'WeeChat %v'@*
|
||||
@item irc_notice_as_pv
|
||||
Afficher les notices comme des messages priv@'es@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
|
||||
@item irc_away_check
|
||||
Intervalle entre deux v@'erifications des absences (en minutes, 0 = ne jemais v@'erifier)@*
|
||||
Type: entier (valeurs: entre 0 et 2147483647), valeur par d@'efaut: 0@*
|
||||
@@ -511,6 +563,9 @@ Type: entier (valeurs: entre 0 et 2147483647), valeur par d@'efaut: 5@*
|
||||
@item irc_fifo_pipe
|
||||
Cr@'eer un tube FIFO pour le contr@^ole @`a distance@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
|
||||
@item irc_highlight
|
||||
Liste des mots pour la notification (s@'epar@'es par des virgules, le comparaison ne tient pas compte de la casse)@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
|
||||
@item dcc_auto_accept_files
|
||||
Accepte automatiquement les fichiers dcc entrants@*
|
||||
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
|
||||
@@ -608,7 +663,7 @@ Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
|
||||
D@'elai (en secondes) apr@`es ex@'ecution de la commande (exemple: donner du temps pour l'authentification)@*
|
||||
Type: entier (valeurs: entre 0 et 5), valeur par d@'efaut: 0@*
|
||||
@item server_autojoin
|
||||
Liste des canaux (s@'epar@'es par des virgules) @`a rejoindre lorsque connect@'e au serveur@*
|
||||
Liste des canaux (s@'epar@'es par des virgules) @`a rejoindre lorsque connect@'e au serveur (exemple: "#chan1,#chan2,#chan3 #key1,#key2")@*
|
||||
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
|
||||
@item server_autorejoin
|
||||
Rejoindre automatiquement les canaux quand mis dehors@*
|
||||
@@ -668,12 +723,21 @@ Aller au d@'ebut de la ligne de commande@*
|
||||
@item End / Ctrl + E
|
||||
Aller @`a la fin de la ligne de commande@*
|
||||
@*
|
||||
@item Ctrl + K
|
||||
Efface jusqu'@`a la fin de la ligne@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
R@'eaffiche toute la fen@^etre@*
|
||||
@*
|
||||
@item Ctrl + U
|
||||
Efface jusqu'au d@'ebut de la ligne@*
|
||||
@*
|
||||
@item Ctrl + W
|
||||
Effacer le mot pr@'ec@'edent sur la ligne de commande@*
|
||||
@*
|
||||
@item Backspace / Delete
|
||||
Effacer le mot pr@'ec@'edent / suivant sur la ligne de commande@*
|
||||
@*
|
||||
@item Ctrl + Backspace / Ctrl + W
|
||||
Effacer le mot pr@'ec@'edent sur la ligne de commande@*
|
||||
@*
|
||||
@item Tab
|
||||
Compl@'eter la commande ou le pseudo (@kbd{Tab} @`a nouveau : trouver la compl@'etion suivante)@*
|
||||
@*
|
||||
@@ -686,6 +750,9 @@ Ex@'ecuter la commande ou envoyer le message@*
|
||||
@item Fl@`eche haut / Fl@`eche bas
|
||||
Rappeler les derni@`eres commandes/messages@*
|
||||
@*
|
||||
@item Ctrl + fl@`eche haut / Ctrl + fl@`eche bas
|
||||
Rappeler les derni@`eres commandes/messages dans l'historique global@*
|
||||
@*
|
||||
@item PageUp / PageDown
|
||||
Afficher l'historique du tampon@*
|
||||
@*
|
||||
@@ -701,30 +768,48 @@ Effacer le dernier message de la barre d'infos@*
|
||||
@item F11 / F12
|
||||
Faire d@'efiler la liste des pseudos@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
R@'eaffiche toute la fen@^etre@*
|
||||
@*
|
||||
@item Alt + fl@`eche gauche / Alt + fl@`eche droite
|
||||
Identique @`a F5 / F6@*
|
||||
@*
|
||||
@item Alt + A
|
||||
Sauter au tampon avec activit@'e (avec priorit@'e: highlight, message, autre)@*
|
||||
@*
|
||||
@item Alt + B
|
||||
Aller au mot pr@'ec@'edent@*
|
||||
@*
|
||||
@item Alt + D
|
||||
Effacer le mot suivant@*
|
||||
@*
|
||||
@item Alt + F
|
||||
Aller au mot suivant@*
|
||||
@*
|
||||
@item Alt + H
|
||||
Vide la hotlist (notification d'activit@'e sur les autres tampons)@*
|
||||
@*
|
||||
@item Alt + J puis Alt + D
|
||||
Afficher les DCC en cours@*
|
||||
@*
|
||||
@item Alt + R
|
||||
Vide la hotlist (notification d'activité sur les autres tampons)@*
|
||||
@item Alt + J puis Alt + L
|
||||
Sauter au dernier tampon@*
|
||||
@*
|
||||
@item Alt + S
|
||||
@item Alt + J puis Alt + S
|
||||
Sauter au tampon du serveur@*
|
||||
@*
|
||||
@item Alt + X
|
||||
Sauter au premier canal du serveur suivant (ou tampon du serveur si aucun canal ouvert)@*
|
||||
@*
|
||||
@item Alt + chiffre (1-9)
|
||||
Sauter au tampon avec ce num@'ero@*
|
||||
@*
|
||||
@item Alt + J then Alt + X
|
||||
Sauter au premier canal du serveur suivant (ou tampon du serveur si aucun canal ouvert)@*
|
||||
@*
|
||||
@item Alt + K
|
||||
Capturer une touche
|
||||
@*
|
||||
@item Alt + J puis nombre (01-99)
|
||||
Sauter au tampon avec ce num@'ero@*
|
||||
@*
|
||||
@item Alt + R
|
||||
Effacer la ligne enti@`ere@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Faire d@'efiler la liste des pseudos@*
|
||||
@*
|
||||
@@ -785,11 +870,34 @@ afficher l'aide sur les commandes@*
|
||||
@*
|
||||
commande: nom d'une commande WeeChat ou IRC@*
|
||||
@*
|
||||
@item ignore [masque [[type | commande] [canal [serveur]]]]
|
||||
@*
|
||||
ignorer des messages IRC et/ou des masques@*
|
||||
@*
|
||||
masque: pseudo ou masque @`a ignorer@*
|
||||
type: type de message @`a ignorer (action, ctcp, dcc, pv)@*
|
||||
commande: commande IRC@*
|
||||
canal: nom du canal pour le ignore@*
|
||||
serveur: nom du serveur pour le ignore@*
|
||||
@*
|
||||
Pour chaque param@`etre, '*' signifie tou(te)s.@*
|
||||
Sans param@`etre, la commande /ignore liste les ignore d@'efinis.@*
|
||||
@*
|
||||
@item key [touche fonction/commande] [unbind touche] [functions] [reset -yes]
|
||||
@*
|
||||
associer/lib@'erer des touches@*
|
||||
@*
|
||||
touche: associer cette touche @`a une fonction interne ou une commande (commen@,{c}ant par "/")@*
|
||||
unbind: supprimer l'association @`a une touche (si "all", toutes les associations de touches par d@'efaut sont restaur@'ees)@*
|
||||
functions: lister la liste des fonctions internes pour les associations de touches@*
|
||||
reset: restaur les touches aux valeurs par d@'efaut et supprime TOUTES les touches personnelles (utiliser avec pr@'ecaution !)@*
|
||||
@*
|
||||
@item perl [load fichier] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
liste/charge/d@'echarge des scripts Perl@*
|
||||
@*
|
||||
fichier: script Perl (fichier) @`a charger@*
|
||||
@*
|
||||
Sans param@`etre, la commande /perl liste tous les scripts Perl charg@'es.@*
|
||||
@*
|
||||
@item python [load fichier] | [autoload] | [reload] | [unload]
|
||||
@@ -797,8 +905,17 @@ Sans param@`etre, la commande /perl liste tous les scripts Perl charg@'es.@*
|
||||
liste/charge/d@'echarge des scripts Python@*
|
||||
@*
|
||||
fichier: script Python (fichier) @`a charger@*
|
||||
@*
|
||||
Sans param@`etre, la commande /python liste tous les scripts Python charg@'es.@*
|
||||
@*
|
||||
@item ruby [load fichier] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
liste/charge/d@'echarge des scripts Ruby@*
|
||||
@*
|
||||
fichier: script Ruby (fichier) @`a charger@*
|
||||
@*
|
||||
Sans param@`etre, la commande /ruby liste tous les scripts Ruby charg@'es.@*
|
||||
@*
|
||||
@item server [nom_serveur] | [nom_serveur nom/IP port [-auto | -noauto] [-ipv6] [-ssl] [-pwd mot_de_passe] [-nicks pseudo1 [pseudo2 [pseudo3]]] [-username nom_utilisateur] [-realname nom_r@'eel] [-command commande] [-autojoin canal[,canal]] ] | [del nom_serveur]
|
||||
@*
|
||||
liste, ajoute ou retire des serveurs@*
|
||||
@@ -834,6 +951,20 @@ supprimer un alias@*
|
||||
@*
|
||||
nom_alias: nom de l'alias @`a supprimer@*
|
||||
@*
|
||||
@item unignore [nombre | [masque [[type | commande] [canal [serveur]]]]]
|
||||
@*
|
||||
supprimer le ignore des messages IRC et/ou des masques@*
|
||||
@*
|
||||
nombre: num@'ero de ignore @`a supprimer (le nombre est affich@'e sur la liste des ignore)@*
|
||||
masque: pseudo ou masque @`a ignorer@*
|
||||
type: type de message @`a ignorer (action, ctcp, dcc, pv)@*
|
||||
commande: commande IRC@*
|
||||
canal: nom du canal pour le ignore@*
|
||||
serveur: nom du serveur pour le ignore@*
|
||||
@*
|
||||
Pour chaque param@`etre, '*' signifie tou(te)s.@*
|
||||
Sans param@`etre, /ignore liste les ignore d@'efinis.@*
|
||||
@*
|
||||
@item window [list | splith | splitv | [merge [down | up | left | right | all]]]
|
||||
@*
|
||||
gestion des fen@^etres@*
|
||||
@@ -854,6 +985,18 @@ trouver les informations sur l'administrateur du serveur@*
|
||||
@*
|
||||
cible: serveur@*
|
||||
@*
|
||||
@item ame message
|
||||
@*
|
||||
envoyer une action CTCP @`a tous les canaux de tous les serveurs connect@'es@*
|
||||
@*
|
||||
message: message @`a envoyer@*
|
||||
@*
|
||||
@item amsg texte
|
||||
@*
|
||||
envoyer un message @`a tous les canaux de tous les serveurs connect@'es@*
|
||||
@*
|
||||
texte: texte @`a envoyer@*
|
||||
@*
|
||||
@item away [-all] [message]
|
||||
@*
|
||||
basculer le statut absent@*
|
||||
@@ -868,12 +1011,13 @@ bannit des pseudos ou masques@*
|
||||
canal: nom du canal pour le bannissement@*
|
||||
pseudo: pseudo ou masque pour le bannissement@*
|
||||
@*
|
||||
@item ctcp pseudo type
|
||||
@item ctcp pseudo type [arguments]
|
||||
@*
|
||||
envoyer un message ctcp@*
|
||||
envoyer un message CTCP (Client-To-Client Protocol)@*
|
||||
@*
|
||||
pseudo: utilisateur pour envoyer le ctcp@*
|
||||
type: "action" ou "version"@*
|
||||
pseudo: utilisateur @`a qui envoyer le CTCP@*
|
||||
type: type de CTCP (exemples: "version", "ping", etc...)@*
|
||||
arguments: arguments pour le CTCP@*
|
||||
@*
|
||||
@item dcc action [pseudo [fichier]]
|
||||
@*
|
||||
@@ -883,15 +1027,15 @@ action: 'send' (envoi de fichier) ou 'chat' (discussion) ou 'close' (fermeture d
|
||||
pseudo: pseudo pour envoyer le fichier ou discuter@*
|
||||
fichier: nom du fichier (sur la machine locale)@*
|
||||
@*
|
||||
@item dehalfop pseudo [pseudo]
|
||||
@item dehalfop [pseudo [pseudo]]
|
||||
@*
|
||||
retire le statut de demi-op@'erateur du canal @`a/aux nick(s)@*
|
||||
@*
|
||||
@item deop pseudo [pseudo]
|
||||
@item deop [pseudo [pseudo]]
|
||||
@*
|
||||
retire le statut d'op@'erateur du canal @`a/aux nick(s)@*
|
||||
@*
|
||||
@item devoice pseudo [pseudo]
|
||||
@item devoice [pseudo [pseudo]]
|
||||
@*
|
||||
retire la voix du/des pseudo(s)@*
|
||||
@*
|
||||
@@ -899,7 +1043,7 @@ retire la voix du/des pseudo(s)@*
|
||||
@*
|
||||
arr@^eter le serveur@*
|
||||
@*
|
||||
@item halfop pseudo [pseudo]
|
||||
@item halfop [pseudo [pseudo]]
|
||||
@*
|
||||
donner le statut de demi-op@'erateur @`a un/des utilisateur(s)@*
|
||||
@*
|
||||
@@ -975,7 +1119,7 @@ cible: serveur pour faire suivre la requ@^ete@*
|
||||
@*
|
||||
@item me message
|
||||
@*
|
||||
envoyer une action ctcp au canal courant@*
|
||||
envoyer une action CTCP au canal courant@*
|
||||
@*
|
||||
message: message @`a envoyer@*
|
||||
@*
|
||||
@@ -1182,7 +1326,7 @@ retourne la version de l'utilisateur ou du serveur (courant ou sp@'ecifi@'e)@*
|
||||
serveur: nom du serveur@*
|
||||
pseudo: utilisateur@*
|
||||
@*
|
||||
@item voice pseudo [pseudo]
|
||||
@item voice [pseudo [pseudo]]
|
||||
@*
|
||||
donne la voix @`a/aux utilisateur(s)@*
|
||||
@*
|
||||
@@ -1216,6 +1360,83 @@ cible: la r@'eponse doit correspondre @`a ce masque@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
Fonctions internes pour les touches :@*
|
||||
|
||||
@table @kbd
|
||||
@item return
|
||||
terminer la ligne@*
|
||||
@item tab
|
||||
compl@'eter le mot@*
|
||||
@item backspace
|
||||
effacer le caract@`ere pr@'ec@'edent@*
|
||||
@item delete
|
||||
effacer le caract@`ere suivant@*
|
||||
@item delete_end_line
|
||||
effacer jusqu'@`a la fin de la ligne@*
|
||||
@item delete_beginning_line
|
||||
effacer jusqu'au d@'ebut de la ligne@*
|
||||
@item delete_line
|
||||
effacer la ligne enti@`ere@*
|
||||
@item delete_previous_word
|
||||
effacer le mot pr@'ec@'edent@*
|
||||
@item delete_next_word
|
||||
effacer le mot suivant@*
|
||||
@item clipboard_paste
|
||||
coller le contenu du presse-papier@*
|
||||
@item transpose_chars
|
||||
inverser les caract@`eres@*
|
||||
@item home
|
||||
aller au d@'ebut de la ligne@*
|
||||
@item end
|
||||
aller @`a la fin de la ligne@*
|
||||
@item left
|
||||
se d@'eplacer d'un caract@`ere @`a gauche@*
|
||||
@item previous_word
|
||||
se d@'eplacer au mot pr@'ec@'edent@*
|
||||
@item right
|
||||
se d@'eplacer d'un caract@`ere @`a droite@*
|
||||
@item next_word
|
||||
se d@'eplacer au mot suivant@*
|
||||
@item up
|
||||
appeler la commande pr@'ec@'edente dans l'historique@*
|
||||
@item up_global
|
||||
appeler la commande pr@'ec@'edente dans l'historique global@*
|
||||
@item down
|
||||
appeler la commande suivante dans l'historique@*
|
||||
@item down_global
|
||||
appeler la commande suivante dans l'historique global@*
|
||||
@item page_up
|
||||
faire d@'efiler d'une page vers le haut@*
|
||||
@item page_down
|
||||
faire d@'efiler d'une page vers le bas@*
|
||||
@item infobar_clear
|
||||
effacer la barre d'infos@*
|
||||
@item nick_page_up
|
||||
faire d@'efiler la liste des pseudos d'une page vers le haut@*
|
||||
@item nick_page_down
|
||||
faire d@'efiler la liste des pseudos d'une page vers le bas@*
|
||||
@item nick_beginning
|
||||
afficher le d@'ebut de la liste des pseudos@*
|
||||
@item nick_end
|
||||
afficher la fin de la liste des pseudos@*
|
||||
@item refresh
|
||||
rafraichir l'@'ecran@*
|
||||
@item jump_smart
|
||||
sauter au tampon avec de l'activit@'e@*
|
||||
@item jump_dcc
|
||||
sauter au tampon DCC@*
|
||||
@item jump_last_buffer
|
||||
sauter au dernier tampon@*
|
||||
@item jump_server
|
||||
sauter au tampon du serveur@*
|
||||
@item jump_next_server
|
||||
sauter au prochain serveur@*
|
||||
@item hotlist_clear
|
||||
effacer la liste d'activit@'e@*
|
||||
@item grab_key
|
||||
capturer une touche@*
|
||||
@end table
|
||||
|
||||
@node Tube FIFO, , Commandes WeeChat, Utilisation
|
||||
@section Tube FIFO
|
||||
|
||||
@@ -1235,14 +1456,21 @@ serveur doit l'@^etre aussi.@*
|
||||
Quelques exemples :
|
||||
@table @asis
|
||||
@item @bullet{} changement du pseudo sur freenode en "pseudo|absent":
|
||||
@*
|
||||
@command{echo "freenode */nick pseudo|absent" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} affichage de texte sur le canal #weechat :
|
||||
@*
|
||||
@command{echo "freenode,#weechat *bonjour tout le monde !" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} affichage de texte sur le canal courant (le tampon affich@'e par WeeChat):
|
||||
@command{echo "*bonjour !" >~/.weechat/weechat_fifo_12345}@*
|
||||
@*
|
||||
@command{echo "*bonjour !" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@b{Attention :} ceci est dangereux et vous ne devriez pas le faire sauf si vous savez ce que vous faites !
|
||||
@item @bullet{} envoyer deux commandes pour décharger/recharger les scripts Perl (vous devez les séparer par \n):
|
||||
@*
|
||||
@item @bullet{} envoyer deux commandes pour d@'echarger/recharger les scripts Perl (vous devez les s@'eparer par \n):
|
||||
@*
|
||||
@command{echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345}
|
||||
@end table
|
||||
@*
|
||||
@@ -1370,7 +1598,7 @@ RFC 2812 : @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
|
||||
@code{@ @ @ @ weechat::print ("serveur=$_[0]\n");}@*
|
||||
@code{@ @ @ @ ($null, $canal, $message) = split ":",$_[1],3;}@*
|
||||
@code{@ @ @ @ ($masque, $null, $canal) = split " ", $canal;}@*
|
||||
@code{@ @ @ @ weechat::print ("masque=$masque, canal=$canal, message=$message\n");}@*
|
||||
@code{@ @ @ @ weechat::print ("masque=$masque, canal=$canal, msg=$message\n");}@*
|
||||
@code{@} }@*
|
||||
@*
|
||||
|
||||
|
||||
+255
-30
@@ -30,14 +30,13 @@
|
||||
@c end tex
|
||||
|
||||
@documentlanguage pt
|
||||
@documentencoding ISO-8859-1
|
||||
|
||||
@titlepage
|
||||
|
||||
@title WeeChat - Guia do Utilizador
|
||||
@subtitle Cliente de IRC rapido, leve e extencivel
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.3 - 03 de Julho de 2005
|
||||
|
||||
@image{weechat_image}
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.5 - 24 de Setembro de 2005
|
||||
|
||||
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
|
||||
|
||||
@@ -148,7 +147,7 @@ Os pacotes bin@'arios est@'ao dispon@'iveis para as seguintes distribui@,{c}@~oe
|
||||
@itemize @bullet
|
||||
@item
|
||||
Debian (ou compat@'ivel)@*
|
||||
Instala@,{c}@~ao : @kbd{dpkg -i /chemin/weechat_x.y.z-1_i386.deb}
|
||||
Instala@,{c}@~ao : @kbd{apt-get install weechat-curses}
|
||||
@item
|
||||
Mandrake/Redhat (ou outra distro compat@'ivel com RPMs)@*
|
||||
Instala@,{c}@~ao : @kbd{rpm -i /chemin/weechat-x.y.z-1.i386.rpm}
|
||||
@@ -218,6 +217,8 @@ Segue agora as instru@,{c}@~oes para compilar o c@'odigo fonte - @xref{Codigo Fo
|
||||
@table @code
|
||||
@item -c, --config
|
||||
Mostrar da lima dos config da exposi@,{c}@~ao (lista das op@,{c}@~oes)
|
||||
@item -f, --key-functions
|
||||
Display WeeChat internal functions for keys@*
|
||||
@item -h, --help
|
||||
Mostrar a ajuda@*
|
||||
@item -i, --irc-commands
|
||||
@@ -277,6 +278,9 @@ Type: string (any string), default value: '[%H:%M:%S]'@*
|
||||
@item look_color_nicks
|
||||
Display nick names with different colors@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_color_nicks_number
|
||||
Number of colors to use for nicks colors@*
|
||||
Type: integer (values: between 1 and 10), default value: 10@*
|
||||
@item look_color_actions
|
||||
Display actions with different colors@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@@ -312,7 +316,10 @@ Enable info bar@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_infobar_timestamp
|
||||
Timestamp for time in infobar@*
|
||||
Type: string (any string), default value: '%B, %A %d %Y - %H:%M'@*
|
||||
Type: string (any string), default value: '%B, %A %d %Y'@*
|
||||
@item look_infobar_seconds
|
||||
Display seconds in infobar time@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
|
||||
@item look_infobar_delay_highlight
|
||||
Delay (in seconds) for highlight messages in infobar (0 = disable highlight notifications in infobar)@*
|
||||
Type: integer (values: between 0 and 2147483647), default value: 7@*
|
||||
@@ -337,6 +344,12 @@ Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@item col_chat_prefix2
|
||||
Color for middle char of prefix@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@item col_chat_join
|
||||
Color for join arrow (prefix)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightgreen'@*
|
||||
@item col_chat_part
|
||||
Color for part/quit arrow (prefix)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightred'@*
|
||||
@item col_chat_nick
|
||||
Color for nicks in actions (chat window)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@@ -364,9 +377,12 @@ Type: color (Curses or Gtk color), default value: 'cyan'@*
|
||||
@item col_status_data_msg
|
||||
Color for window with new messages (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'yellow'@*
|
||||
@item col_status_private
|
||||
Color for window with private message (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_status_highlight
|
||||
Color for window with highlight (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightred'@*
|
||||
@item col_status_data_other
|
||||
Color for window with new data (not messages) (status bar)@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@@ -379,6 +395,9 @@ Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_infobar
|
||||
Color for info bar text@*
|
||||
Type: color (Curses or Gtk color), default value: 'black'@*
|
||||
@item col_infobar_delimiters
|
||||
Color for infobar delimiters@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_infobar_highlight
|
||||
Color for info bar highlight notification@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@@ -427,6 +446,36 @@ Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_nick_self
|
||||
Color for local nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'white'@*
|
||||
@item col_nick_color1
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'cyan'@*
|
||||
@item col_nick_color2
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'magenta'@*
|
||||
@item col_nick_color3
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'green'@*
|
||||
@item col_nick_color4
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'brown'@*
|
||||
@item col_nick_color5
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightblue'@*
|
||||
@item col_nick_color6
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@item col_nick_color7
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightcyan'@*
|
||||
@item col_nick_color8
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_nick_color9
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightgreen'@*
|
||||
@item col_nick_color10
|
||||
Color for nick@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@item col_nick_private
|
||||
Color for other nick in private window@*
|
||||
Type: color (Curses or Gtk color), default value: 'default'@*
|
||||
@@ -493,6 +542,9 @@ Type: string (any string), default value: 'WeeChat %v'@*
|
||||
@item irc_default_msg_quit
|
||||
Default quit message ('%v' will be replaced by WeeChat version in string)@*
|
||||
Type: string (any string), default value: 'WeeChat %v'@*
|
||||
@item irc_notice_as_pv
|
||||
Display notices as private messages@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@item irc_away_check
|
||||
Interval between two checks for away (in minutes, 0 = never check)@*
|
||||
Type: integer (values: between 0 and 2147483647), default value: 0@*
|
||||
@@ -508,6 +560,9 @@ Type: integer (values: between 0 and 2147483647), default value: 5@*
|
||||
@item irc_fifo_pipe
|
||||
Create a FIFO pipe for remote control@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@item irc_highlight
|
||||
Comma separated list of words to highlight (case insensitive comparison)@*
|
||||
Type: string (any string), default value: ''@*
|
||||
@item dcc_auto_accept_files
|
||||
Automatically accept incoming dcc files@*
|
||||
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
|
||||
@@ -605,7 +660,7 @@ Type: string (any string), default value: ''@*
|
||||
Delay (in seconds) after command was executed (example: give some time for authentication)@*
|
||||
Type: integer (values: between 0 and 5), default value: 0@*
|
||||
@item server_autojoin
|
||||
Comma separated list of channels to join when connected to server@*
|
||||
Comma separated list of channels to join when connected to server (example: "#chan1,#chan2,#chan3 #key1,#key2")@*
|
||||
Type: string (any string), default value: ''@*
|
||||
@item server_autorejoin
|
||||
Automatically rejoin channels when kicked@*
|
||||
@@ -665,12 +720,21 @@ Ir para o in@'icio da linha de comando@*
|
||||
@item End / Ctrl + E
|
||||
Ir para o fim da linha de comando@*
|
||||
@*
|
||||
@item Ctrl + K
|
||||
Delete until end of line@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redesenhe a janela inteira@*
|
||||
@*
|
||||
@item Ctrl + U
|
||||
Delete until beginning of line@*
|
||||
@*
|
||||
@item Ctrl + W
|
||||
Apagar a palavra anterior na linha de comando
|
||||
@*
|
||||
@item Backspace / Delete
|
||||
Apagar o caractere anterior / seguinte na linha de comando@*
|
||||
@*
|
||||
@item Ctrl + Backspace / Ctrl + W
|
||||
Apagar a palavra anterior na linha de comando
|
||||
@*
|
||||
@item Tab
|
||||
Completar o comando ou o nick (@kbd{Tab} novamente : encontrar a pr@'oxima sugest@~ao)@*
|
||||
@*
|
||||
@@ -683,6 +747,9 @@ Executa o comando ou envia a mensagem@*
|
||||
@item Seta para cima / Seta para baixo
|
||||
Repetir os ultimos comandos/mensagens@*
|
||||
@*
|
||||
@item Ctrl + up arrow / Ctrl + down arrow
|
||||
Call again last commands/messages in global history@*
|
||||
@*
|
||||
@item PageUp / PageDown
|
||||
Navegar no hist@'orico da janela@*
|
||||
@*
|
||||
@@ -698,30 +765,48 @@ Apagar a @'ultima mensagem da barra do info@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redesenhe a janela inteira@*
|
||||
@*
|
||||
@item Alt + Seta da esquerda / Alt + Seta da direita
|
||||
Identico a F5 / F6@*
|
||||
@*
|
||||
@item Alt + A
|
||||
Comute ao amortecedor seguinte com atividade (com prioridade: destaque, mensagem, outra)@*
|
||||
@*
|
||||
@item Alt + D
|
||||
Exposi@,{c}@~ao DCC atual@*
|
||||
@item Alt + B
|
||||
Go to previous word@*
|
||||
@*
|
||||
@item Alt + R
|
||||
@item Alt + D
|
||||
Delete next word@*
|
||||
@*
|
||||
@item Alt + F
|
||||
Go to next word@*
|
||||
@*
|
||||
@item Alt + H
|
||||
Hotlist desobstru@'ido (notifica@,{c}@~ao da atividade em outros amortecedores)@*
|
||||
@*
|
||||
@item Alt + S
|
||||
@item Alt + J then Alt + D
|
||||
Exposi@,{c}@~ao DCC atual@*
|
||||
@*
|
||||
@item Alt + J then Alt + L
|
||||
Switch to last buffer@*
|
||||
@*
|
||||
@item Alt + J then Alt + S
|
||||
Comute ao amortecedor do servidor@*
|
||||
@*
|
||||
@item Alt + X
|
||||
@item Alt + J then Alt + X
|
||||
Comute @`a primeira canaleta do servidor seguinte (ou do amortecedor do servidor se nenhuma canaleta for aberta)@*
|
||||
@*
|
||||
@item Alt + d@'igito (1-9)
|
||||
Comute ao amortecedor pelo n@'umero@*
|
||||
@*
|
||||
@item Alt + J then number (01-99)
|
||||
Comute ao amortecedor pelo n@'umero@*
|
||||
@*
|
||||
@item Alt + K
|
||||
Grab a key
|
||||
@*
|
||||
@item Alt + R
|
||||
Delete entire line@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@@ -782,11 +867,34 @@ display help about commands@*
|
||||
@*
|
||||
command: name of a WeeChat or IRC command@*
|
||||
@*
|
||||
@item ignore [mask [[type | command] [channel [server]]]]
|
||||
@*
|
||||
ignore IRC messages and/or hosts@*
|
||||
@*
|
||||
mask: nick or host mask to ignore@*
|
||||
type: type of message to ignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for ignore@*
|
||||
server: name of server for ignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /ignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item key [key function/command] [unbind key] [functions] [reset -yes]
|
||||
@*
|
||||
bind/unbind keys@*
|
||||
@*
|
||||
key: bind this key to an internal function or a command (beginning by "/")@*
|
||||
unbind: unbind a key (if "all", default bindings are restored)@*
|
||||
functions: list internal functions for key bindings@*
|
||||
reset: restore bindings to the default values and delete ALL personal binding (use carefully!)@*
|
||||
@*
|
||||
@item perl [load filename] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
list/load/unload Perl scripts@*
|
||||
@*
|
||||
filename: Perl script (file) to load@*
|
||||
@*
|
||||
Without argument, /perl command lists all loaded Perl scripts.@*
|
||||
@*
|
||||
@item python [load filename] | [autoload] | [reload] | [unload]
|
||||
@@ -794,8 +902,17 @@ Without argument, /perl command lists all loaded Perl scripts.@*
|
||||
list/load/unload Python scripts@*
|
||||
@*
|
||||
filename: Python script (file) to load@*
|
||||
@*
|
||||
Without argument, /python command lists all loaded Python scripts.@*
|
||||
@*
|
||||
@item ruby [load filename] | [autoload] | [reload] | [unload]
|
||||
@*
|
||||
list/load/unload Ruby scripts@*
|
||||
@*
|
||||
filename: Ruby script (file) to load@*
|
||||
@*
|
||||
Without argument, /ruby command lists all loaded Ruby scripts.@*
|
||||
@*
|
||||
@item server [servername] | [servername hostname port [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [del servername]
|
||||
@*
|
||||
list, add or remove servers@*
|
||||
@@ -831,6 +948,20 @@ remove an alias@*
|
||||
@*
|
||||
alias_name: name of alias to remove@*
|
||||
@*
|
||||
@item unignore [number | [mask [[type | command] [channel [server]]]]]
|
||||
@*
|
||||
unignore IRC messages and/or hosts@*
|
||||
@*
|
||||
number: # of ignore to unignore (number is displayed by list of ignore)@*
|
||||
mask: nick or host mask to unignore@*
|
||||
type: type of message to unignore (action, ctcp, dcc, pv)@*
|
||||
command: IRC command@*
|
||||
channel: name of channel for unignore@*
|
||||
server: name of server for unignore@*
|
||||
@*
|
||||
For each argument, '*' means all.@*
|
||||
Without argument, /unignore command lists all defined ignore.@*
|
||||
@*
|
||||
@item window [list | splith | splitv | [merge [down | up | left | right | all]]]
|
||||
@*
|
||||
manage windows@*
|
||||
@@ -851,6 +982,18 @@ find information about the administrator of the server@*
|
||||
@*
|
||||
target: server@*
|
||||
@*
|
||||
@item ame message
|
||||
@*
|
||||
send a CTCP action to all channels of all connected servers@*
|
||||
@*
|
||||
message: message to send@*
|
||||
@*
|
||||
@item amsg text
|
||||
@*
|
||||
send message to all channels of all connected servers@*
|
||||
@*
|
||||
text: text to send@*
|
||||
@*
|
||||
@item away [-all] [message]
|
||||
@*
|
||||
toggle away status@*
|
||||
@@ -865,12 +1008,13 @@ bans nicks or hosts@*
|
||||
channel: channel for ban@*
|
||||
nickname: user or host to ban@*
|
||||
@*
|
||||
@item ctcp nickname type
|
||||
@item ctcp nickname type [arguments]
|
||||
@*
|
||||
send a ctcp message@*
|
||||
send a CTCP message (Client-To-Client Protocol)@*
|
||||
@*
|
||||
nickname: user to send ctcp to@*
|
||||
type: "action" or "version"@*
|
||||
nickname: user to send CTCP to@*
|
||||
type: CTCP type (examples: "version", "ping", ..)@*
|
||||
arguments: arguments for CTCP@*
|
||||
@*
|
||||
@item dcc action [nickname [file]]
|
||||
@*
|
||||
@@ -880,15 +1024,15 @@ action: 'send' (file) or 'chat' or 'close' (chat)@*
|
||||
nickname: nickname to send file or chat@*
|
||||
file: filename (on local host)@*
|
||||
@*
|
||||
@item dehalfop nickname [nickname]
|
||||
@item dehalfop [nickname [nickname]]
|
||||
@*
|
||||
removes half channel operator status from nickname(s)@*
|
||||
@*
|
||||
@item deop nickname [nickname]
|
||||
@item deop [nickname [nickname]]
|
||||
@*
|
||||
removes channel operator status from nickname(s)@*
|
||||
@*
|
||||
@item devoice nickname [nickname]
|
||||
@item devoice [nickname [nickname]]
|
||||
@*
|
||||
removes voice from nickname(s)@*
|
||||
@*
|
||||
@@ -896,7 +1040,7 @@ removes voice from nickname(s)@*
|
||||
@*
|
||||
shutdown the server@*
|
||||
@*
|
||||
@item halfop nickname [nickname]
|
||||
@item halfop [nickname [nickname]]
|
||||
@*
|
||||
gives half channel operator status to nickname(s)@*
|
||||
@*
|
||||
@@ -972,7 +1116,7 @@ target: server for forwarding request@*
|
||||
@*
|
||||
@item me message
|
||||
@*
|
||||
send a ctcp action to the current channel@*
|
||||
send a CTCP action to the current channel@*
|
||||
@*
|
||||
message: message to send@*
|
||||
@*
|
||||
@@ -1179,7 +1323,7 @@ gives the version info of nick or server (current or specified)@*
|
||||
server: server name@*
|
||||
nickname: nickname@*
|
||||
@*
|
||||
@item voice nickname [nickname]
|
||||
@item voice [nickname [nickname]]
|
||||
@*
|
||||
gives voice to nickname(s)@*
|
||||
@*
|
||||
@@ -1213,6 +1357,83 @@ target: reply should match this mask@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
Internal functions for keys:@*
|
||||
|
||||
@table @kbd
|
||||
@item return
|
||||
terminate line@*
|
||||
@item tab
|
||||
complete word@*
|
||||
@item backspace
|
||||
delete previous char@*
|
||||
@item delete
|
||||
delete next char@*
|
||||
@item delete_end_line
|
||||
delete until end of line@*
|
||||
@item delete_beginning_line
|
||||
delete until beginning of line@*
|
||||
@item delete_line
|
||||
delete entire line@*
|
||||
@item delete_previous_word
|
||||
delete previous word@*
|
||||
@item delete_next_word
|
||||
delete next word@*
|
||||
@item clipboard_paste
|
||||
paste current clipboard content@*
|
||||
@item transpose_chars
|
||||
transpose chars@*
|
||||
@item home
|
||||
go to beginning of line@*
|
||||
@item end
|
||||
go to end of line@*
|
||||
@item left
|
||||
move one char left@*
|
||||
@item previous_word
|
||||
move to previous word@*
|
||||
@item right
|
||||
move one char right@*
|
||||
@item next_word
|
||||
move to next word@*
|
||||
@item up
|
||||
call previous command in history@*
|
||||
@item up_global
|
||||
call previous command in global history@*
|
||||
@item down
|
||||
call next command in history@*
|
||||
@item down_global
|
||||
call next command in global history@*
|
||||
@item page_up
|
||||
scroll one page up@*
|
||||
@item page_down
|
||||
scroll one page down@*
|
||||
@item infobar_clear
|
||||
clear infobar@*
|
||||
@item nick_page_up
|
||||
scroll nicklist one page up@*
|
||||
@item nick_page_down
|
||||
scroll nicklist one page down@*
|
||||
@item nick_beginning
|
||||
display beginning of nicklist@*
|
||||
@item nick_end
|
||||
display end of nicklist@*
|
||||
@item refresh
|
||||
refresh screen@*
|
||||
@item jump_smart
|
||||
jump to buffer with activity@*
|
||||
@item jump_dcc
|
||||
jump to DCC buffer@*
|
||||
@item jump_last_buffer
|
||||
jump to last buffer@*
|
||||
@item jump_server
|
||||
jump to server buffer@*
|
||||
@item jump_next_server
|
||||
jump to next server@*
|
||||
@item hotlist_clear
|
||||
clear hotlist@*
|
||||
@item grab_key
|
||||
grab a key@*
|
||||
@end table
|
||||
|
||||
@node FIFO pipe, , Comandos do WeeChat, Utilizacao
|
||||
@section FIFO pipe
|
||||
|
||||
@@ -1231,15 +1452,19 @@ Some examples:
|
||||
@item @bullet{} change your nick on freenode to "mynick|out":
|
||||
@*
|
||||
@command{echo "freenode */nick mynick|out" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} display text on #weechat channel:
|
||||
@*
|
||||
@command{echo "freenode,#weechat *hello everybody!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@item @bullet{} display text on current channel (buffer displayed by WeeChat):
|
||||
@*
|
||||
@command{echo "*hello!" >~/.weechat/weechat_fifo_12345}@*
|
||||
@command{echo "*hello!" >~/.weechat/weechat_fifo_12345}
|
||||
@*
|
||||
@b{Warning:} this is dangerous and you should not do that except if you know what you do!
|
||||
@*
|
||||
@item @bullet{} send 2 commands to unload/reload Perl scripts (you have to separate them with \n):
|
||||
@*
|
||||
@command{echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345}
|
||||
@end table
|
||||
@*
|
||||
@@ -1526,7 +1751,7 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
|
||||
@code{@ @ @ @ weechat.prnt("server="+server)}@*
|
||||
@code{@ @ @ @ null, channel, message = string.split(args, ":", 2)}@*
|
||||
@code{@ @ @ @ hostmask, null, channel = string.split(string.strip(channel), " ", 2)}@*
|
||||
@code{@ @ @ @ weechat.prnt("host="+hostmask+", channel="+channel+", message="+message)}@*
|
||||
@code{@ @ @ @ weechat.prnt("host="+hostmask+", chan="+channel+", msg="+message)}@*
|
||||
@*
|
||||
|
||||
@item
|
||||
|
||||
Binary file not shown.
@@ -6,11 +6,14 @@
|
||||
./src/irc/irc-send.c
|
||||
./src/irc/irc-recv.c
|
||||
./src/irc/irc-dcc.c
|
||||
./src/irc/irc-ignore.c
|
||||
./src/irc/irc.h
|
||||
./src/plugins/perl/wee-perl.c
|
||||
./src/plugins/perl/wee-perl.h
|
||||
./src/plugins/python/wee-python.c
|
||||
./src/plugins/python/wee-python.h
|
||||
./src/plugins/ruby/wee-ruby.c
|
||||
./src/plugins/ruby/wee-ruby.h
|
||||
./src/plugins/plugins.c
|
||||
./src/plugins/plugins.h
|
||||
./src/gui/curses/gui-input.c
|
||||
@@ -18,6 +21,7 @@
|
||||
./src/gui/gtk/gui-display.c
|
||||
./src/gui/gtk/gui-input.c
|
||||
./src/gui/gui-common.c
|
||||
./src/gui/gui-keyboard.c
|
||||
./src/gui/gui.h
|
||||
./src/common/command.c
|
||||
./src/common/command.h
|
||||
|
||||
+4389
File diff suppressed because it is too large
Load Diff
+1445
-943
File diff suppressed because it is too large
Load Diff
+1428
-906
File diff suppressed because it is too large
Load Diff
+1367
-899
File diff suppressed because it is too large
Load Diff
+584
-98
File diff suppressed because it is too large
Load Diff
@@ -69,12 +69,17 @@ 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 void weechat_cmd_ignore_display (char *, t_irc_ignore *);
|
||||
extern int weechat_cmd_ignore (int, char **);
|
||||
extern int weechat_cmd_key (char *);
|
||||
extern int weechat_cmd_perl (int, char **);
|
||||
extern int weechat_cmd_python (int, char **);
|
||||
extern int weechat_cmd_ruby (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_unignore (int, char **);
|
||||
extern int weechat_cmd_unset (char *);
|
||||
extern int weechat_cmd_window (int, char **);
|
||||
|
||||
|
||||
+184
-60
@@ -102,7 +102,8 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
int i, j;
|
||||
t_irc_server *ptr_server;
|
||||
t_irc_channel *ptr_channel;
|
||||
char *pos, option_name[256];
|
||||
t_irc_nick *ptr_nick;
|
||||
char *pos, option_name[256], *string;
|
||||
t_weechat_alias *ptr_alias;
|
||||
t_config_option *option;
|
||||
void *option_value;
|
||||
@@ -111,13 +112,13 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
/* WeeChat internal commands */
|
||||
|
||||
/* no completion for some commands */
|
||||
if ((strcasecmp (completion->base_command, "server") == 0)
|
||||
|| (strcasecmp (completion->base_command, "save") == 0))
|
||||
if ((ascii_strcasecmp (completion->base_command, "server") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "save") == 0))
|
||||
{
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "alias") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "alias") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
for (ptr_list = index_commands; ptr_list; ptr_list = ptr_list->next_weelist)
|
||||
@@ -128,7 +129,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "buffer") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "buffer") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -145,7 +146,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
"notify");
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "clear") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "clear") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -153,8 +154,8 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
"-all");
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "connect") == 0)
|
||||
|| (strcasecmp (completion->base_command, "disconnect") == 0))
|
||||
if ((ascii_strcasecmp (completion->base_command, "connect") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "disconnect") == 0))
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
@@ -173,7 +174,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "debug") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "debug") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -183,7 +184,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "help") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "help") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
for (i = 0; weechat_commands[i].command_name; i++)
|
||||
@@ -201,8 +202,118 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (((strcasecmp (completion->base_command, "perl") == 0)
|
||||
|| (strcasecmp (completion->base_command, "python") == 0))
|
||||
if (ascii_strcasecmp (completion->base_command, "ignore") == 0)
|
||||
{
|
||||
/* arg 1: nicks of current channel and "*" */
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"*");
|
||||
if (channel)
|
||||
{
|
||||
if (((t_irc_channel *)channel)->type == CHAT_CHANNEL)
|
||||
{
|
||||
for (ptr_nick = ((t_irc_channel *)channel)->nicks; ptr_nick;
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
ptr_nick->nick);
|
||||
}
|
||||
}
|
||||
if (((t_irc_channel *)channel)->type == CHAT_PRIVATE)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_channel *)channel)->name);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* arg 2: type / command and "*" */
|
||||
if (completion->base_command_arg == 2)
|
||||
{
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"*");
|
||||
i = 0;
|
||||
while (ignore_types[i])
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
ignore_types[i]);
|
||||
i++;
|
||||
}
|
||||
i = 0;
|
||||
while (irc_commands[i].command_name)
|
||||
{
|
||||
if (irc_commands[i].recv_function)
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
irc_commands[i].command_name);
|
||||
i++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* arg 3: channel and "*" */
|
||||
if (completion->base_command_arg == 3)
|
||||
{
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"*");
|
||||
if (((t_irc_channel *)channel)->type == CHAT_CHANNEL)
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_channel *)channel)->name);
|
||||
return;
|
||||
}
|
||||
|
||||
/* arg 4: server */
|
||||
if (completion->base_command_arg == 4)
|
||||
{
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"*");
|
||||
if (SERVER(gui_current_window->buffer))
|
||||
weelist_add(&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
SERVER(gui_current_window->buffer)->name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (ascii_strcasecmp (completion->base_command, "key") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"unbind");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"functions");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"reset");
|
||||
return;
|
||||
}
|
||||
if (completion->base_command_arg == 2)
|
||||
{
|
||||
i = 0;
|
||||
while (gui_key_functions[i].function_name)
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
gui_key_functions[i].function_name);
|
||||
i++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (((ascii_strcasecmp (completion->base_command, "perl") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "python") == 0))
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -219,13 +330,14 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
"unload");
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "set") == 0)
|
||||
if (ascii_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))
|
||||
if ((i != CONFIG_SECTION_KEYS) && (i != CONFIG_SECTION_ALIAS)
|
||||
&& (i != CONFIG_SECTION_IGNORE) && (i != CONFIG_SECTION_SERVER))
|
||||
{
|
||||
for (j = 0; weechat_options[i][j].option_name; j++)
|
||||
{
|
||||
@@ -307,9 +419,11 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
pos[0] = ' ';
|
||||
}
|
||||
}
|
||||
else
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "unalias") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "unalias") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
for (ptr_alias = weechat_alias; ptr_alias; ptr_alias = ptr_alias->next_alias)
|
||||
@@ -320,7 +434,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "window") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "window") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
@@ -366,33 +480,33 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
/* 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))
|
||||
if ((ascii_strcasecmp (completion->base_command, "admin") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "die") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "info") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "join") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "links") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "list") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "lusers") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "motd") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "oper") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "rehash") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "restart") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "service") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "servlist") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "squery") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "squit") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "stats") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "summon") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "time") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "trace") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "users") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "wallops") == 0)
|
||||
|| (ascii_strcasecmp (completion->base_command, "who") == 0))
|
||||
{
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "away") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "away") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
if (cfg_irc_default_msg_away && cfg_irc_default_msg_away[0])
|
||||
@@ -401,18 +515,21 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
cfg_irc_default_msg_away);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "ctcp") == 0)
|
||||
if ((ascii_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,
|
||||
"ping");
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
"version");
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "dcc") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "dcc") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
weelist_add (&completion->completion_list,
|
||||
@@ -426,7 +543,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
"close");
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "invite") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "invite") == 0)
|
||||
{
|
||||
/* arg1: nickname */
|
||||
if (completion->base_command_arg == 1)
|
||||
@@ -452,30 +569,30 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "kick") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "kick") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "kill") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "kill") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "me") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "me") == 0)
|
||||
{
|
||||
completion->context = COMPLETION_NICK;
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "notice") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "notice") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "part") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "part") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
if (cfg_irc_default_msg_part && cfg_irc_default_msg_part[0])
|
||||
@@ -484,13 +601,13 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
cfg_irc_default_msg_part);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "query") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "query") == 0)
|
||||
{
|
||||
if (completion->base_command_arg != 1)
|
||||
completion_stop (completion);
|
||||
return;
|
||||
}
|
||||
if ((strcasecmp (completion->base_command, "quit") == 0)
|
||||
if ((ascii_strcasecmp (completion->base_command, "quit") == 0)
|
||||
&& (completion->base_command_arg == 1))
|
||||
{
|
||||
if (cfg_irc_default_msg_quit && cfg_irc_default_msg_quit[0])
|
||||
@@ -499,7 +616,7 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
cfg_irc_default_msg_quit);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp (completion->base_command, "topic") == 0)
|
||||
if (ascii_strcasecmp (completion->base_command, "topic") == 0)
|
||||
{
|
||||
if (completion->base_command_arg == 1)
|
||||
{
|
||||
@@ -507,9 +624,16 @@ completion_build_list (t_completion *completion, void *channel)
|
||||
|| !((t_irc_channel *)channel)->topic[0])
|
||||
completion_stop (completion);
|
||||
else
|
||||
{
|
||||
string = weechat_convert_encoding (cfg_look_charset_decode,
|
||||
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
|
||||
cfg_look_charset_internal : local_charset,
|
||||
((t_irc_channel *)channel)->topic);
|
||||
weelist_add (&completion->completion_list,
|
||||
&completion->last_completion,
|
||||
((t_irc_channel *)channel)->topic);
|
||||
string);
|
||||
free (string);
|
||||
}
|
||||
}
|
||||
else
|
||||
completion_stop (completion);
|
||||
@@ -676,7 +800,7 @@ completion_command (t_completion *completion)
|
||||
other_completion = 0;
|
||||
for (ptr_weelist = index_commands; ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_weelist->data, completion->base_word + 1, length) == 0)
|
||||
if (ascii_strncasecmp (ptr_weelist->data, completion->base_word + 1, length) == 0)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
@@ -684,7 +808,7 @@ completion_command (t_completion *completion)
|
||||
for (ptr_weelist2 = ptr_weelist->next_weelist; ptr_weelist2;
|
||||
ptr_weelist2 = ptr_weelist2->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_weelist2->data,
|
||||
if (ascii_strncasecmp (ptr_weelist2->data,
|
||||
completion->base_word + 1, length) == 0)
|
||||
other_completion++;
|
||||
}
|
||||
@@ -698,7 +822,7 @@ completion_command (t_completion *completion)
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
(ascii_strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
word_found_seen = 1;
|
||||
}
|
||||
if (completion->word_found)
|
||||
@@ -724,7 +848,7 @@ completion_command_arg (t_completion *completion, t_irc_channel *channel)
|
||||
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 (ascii_strncasecmp (ptr_weelist->data, completion->base_word, length) == 0)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
@@ -732,7 +856,7 @@ completion_command_arg (t_completion *completion, t_irc_channel *channel)
|
||||
for (ptr_weelist2 = ptr_weelist->next_weelist; ptr_weelist2;
|
||||
ptr_weelist2 = ptr_weelist2->next_weelist)
|
||||
{
|
||||
if (strncasecmp (ptr_weelist2->data,
|
||||
if (ascii_strncasecmp (ptr_weelist2->data,
|
||||
completion->base_word, length) == 0)
|
||||
other_completion++;
|
||||
}
|
||||
@@ -746,7 +870,7 @@ completion_command_arg (t_completion *completion, t_irc_channel *channel)
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
(ascii_strcasecmp (ptr_weelist->data, completion->word_found) == 0))
|
||||
word_found_seen = 1;
|
||||
}
|
||||
if (completion->word_found)
|
||||
@@ -780,7 +904,7 @@ completion_nick (t_completion *completion, t_irc_channel *channel)
|
||||
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)
|
||||
if (ascii_strncasecmp (ptr_nick->nick, completion->base_word, length) == 0)
|
||||
{
|
||||
if ((!completion->word_found) || word_found_seen)
|
||||
{
|
||||
@@ -788,7 +912,7 @@ completion_nick (t_completion *completion, t_irc_channel *channel)
|
||||
for (ptr_nick2 = ptr_nick->next_nick; ptr_nick2;
|
||||
ptr_nick2 = ptr_nick2->next_nick)
|
||||
{
|
||||
if (strncasecmp (ptr_nick2->nick,
|
||||
if (ascii_strncasecmp (ptr_nick2->nick,
|
||||
completion->base_word, length) == 0)
|
||||
other_completion++;
|
||||
}
|
||||
@@ -802,7 +926,7 @@ completion_nick (t_completion *completion, t_irc_channel *channel)
|
||||
other_completion++;
|
||||
}
|
||||
if (completion->word_found &&
|
||||
(strcasecmp (ptr_nick->nick, completion->word_found) == 0))
|
||||
(ascii_strcasecmp (ptr_nick->nick, completion->word_found) == 0))
|
||||
word_found_seen = 1;
|
||||
}
|
||||
if (completion->word_found)
|
||||
|
||||
@@ -112,16 +112,8 @@ fifo_exec (char *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;
|
||||
}
|
||||
ptr_buffer = (gui_current_window->buffer->has_input) ? gui_current_window->buffer : gui_buffers;
|
||||
ptr_server = SERVER(ptr_buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -172,20 +164,12 @@ fifo_exec (char *text)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
ptr_buffer = gui_buffers;
|
||||
}
|
||||
|
||||
user_command (ptr_server, ptr_buffer, pos_msg);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* history.c: memorize and call again commands or text */
|
||||
/* history.c: memorize commands or text */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -33,10 +33,10 @@
|
||||
#include "../gui/gui.h"
|
||||
|
||||
|
||||
t_history *history_general = NULL;
|
||||
t_history *history_general_last = NULL;
|
||||
t_history *history_general_ptr = NULL;
|
||||
int num_history_general = 0;
|
||||
t_history *history_global = NULL;
|
||||
t_history *history_global_last = NULL;
|
||||
t_history *history_global_ptr = NULL;
|
||||
int num_history_global = 0;
|
||||
|
||||
|
||||
/*
|
||||
@@ -74,7 +74,7 @@ history_add (void *buffer, char *string)
|
||||
{
|
||||
t_history *new_history, *ptr_history;
|
||||
|
||||
/* add history to general history */
|
||||
/* add history to global history */
|
||||
new_history = (t_history *)malloc (sizeof (t_history));
|
||||
if (new_history)
|
||||
{
|
||||
@@ -82,26 +82,26 @@ history_add (void *buffer, char *string)
|
||||
if (cfg_log_hide_nickserv_pwd)
|
||||
history_hide_password (new_history->text);
|
||||
|
||||
if (history_general)
|
||||
history_general->prev_history = new_history;
|
||||
if (history_global)
|
||||
history_global->prev_history = new_history;
|
||||
else
|
||||
history_general_last = new_history;
|
||||
new_history->next_history = history_general;
|
||||
history_global_last = new_history;
|
||||
new_history->next_history = history_global;
|
||||
new_history->prev_history = NULL;
|
||||
history_general = new_history;
|
||||
num_history_general++;
|
||||
history_global = new_history;
|
||||
num_history_global++;
|
||||
|
||||
/* remove one command if necessary */
|
||||
if ((cfg_history_max_commands > 0)
|
||||
&& (num_history_general > cfg_history_max_commands))
|
||||
&& (num_history_global > cfg_history_max_commands))
|
||||
{
|
||||
ptr_history = history_general_last->prev_history;
|
||||
history_general_last->prev_history->next_history = NULL;
|
||||
if (history_general_last->text)
|
||||
free (history_general_last->text);
|
||||
free (history_general_last);
|
||||
history_general_last = ptr_history;
|
||||
num_history_general--;
|
||||
ptr_history = history_global_last->prev_history;
|
||||
history_global_last->prev_history->next_history = NULL;
|
||||
if (history_global_last->text)
|
||||
free (history_global_last->text);
|
||||
free (history_global_last);
|
||||
history_global_last = ptr_history;
|
||||
num_history_global--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,26 +138,26 @@ history_add (void *buffer, char *string)
|
||||
}
|
||||
|
||||
/*
|
||||
* history_general_free: free general history
|
||||
* history_global_free: free global history
|
||||
*/
|
||||
|
||||
void
|
||||
history_general_free ()
|
||||
history_global_free ()
|
||||
{
|
||||
t_history *ptr_history;
|
||||
|
||||
while (history_general)
|
||||
while (history_global)
|
||||
{
|
||||
ptr_history = history_general->next_history;
|
||||
if (history_general->text)
|
||||
free (history_general->text);
|
||||
free (history_general);
|
||||
history_general = ptr_history;
|
||||
ptr_history = history_global->next_history;
|
||||
if (history_global->text)
|
||||
free (history_global->text);
|
||||
free (history_global);
|
||||
history_global = ptr_history;
|
||||
}
|
||||
history_general = NULL;
|
||||
history_general_last = NULL;
|
||||
history_general_ptr = NULL;
|
||||
num_history_general = 0;
|
||||
history_global = NULL;
|
||||
history_global_last = NULL;
|
||||
history_global_ptr = NULL;
|
||||
num_history_global = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,8 +30,12 @@ struct t_history
|
||||
t_history *prev_history; /* link to previous text/command */
|
||||
};
|
||||
|
||||
extern t_history *history_global;
|
||||
extern t_history *history_global_last;
|
||||
extern t_history *history_global_ptr;
|
||||
|
||||
extern void history_add (void *, char *);
|
||||
extern void history_general_free ();
|
||||
extern void history_global_free ();
|
||||
extern void history_buffer_free (void *);
|
||||
|
||||
#endif /* history.h */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user