1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-19 01:24:46 +02:00

Compare commits

...

155 Commits

Author SHA1 Message Date
Sebastien Helleu 150c5e9749 Version 0.1.5 2005-09-24 11:35:13 +00:00
Sebastien Helleu 6bec96cd4d Replaced gettext with macro "_" 2005-09-23 21:49:02 +00:00
Sebastien Helleu 068284dd19 Added /ame command (send CTCP action to all channels of all connected servers) 2005-09-23 09:57:45 +00:00
Sebastien Helleu 38a8c321c0 Added czech translations 2005-09-22 17:22:30 +00:00
Sebastien Helleu 0094d143b3 Updated doc 2005-09-22 14:20:17 +00:00
Sebastien Helleu 530dc9fb67 Added setting "irc_notice_as_pv" to see notices as pv 2005-09-22 08:21:53 +00:00
Sebastien Helleu 96a69fd7f3 Updated doc 2005-09-21 08:34:48 +00:00
Sebastien Helleu 938915d387 Added nicks colors in setup file 2005-09-20 17:44:44 +00:00
Sebastien Helleu 25bbe3d284 Fixed DCC bug: delete failed file only if really empty (on disk) 2005-09-20 16:14:04 +00:00
Sebastien Helleu 9c7d05f605 Fixed IRC message parser bug 2005-09-15 14:02:38 +00:00
Sebastien Helleu c953db4d64 Fixed window swtich functions (was changing windows buffer and should not) 2005-09-15 13:07:52 +00:00
Sebastien Helleu 9d6ca20478 Fixed window switch functions and bug when line is removed and that a window uses this line at scroll start point 2005-09-15 11:36:50 +00:00
Sebastien Helleu 7f4a213239 Fixed scroll problem (screen moving when scrolling and new line displayed) 2005-09-15 08:21:36 +00:00
Sebastien Helleu e18f14e5d3 One bug removed! 2005-09-14 08:59:49 +00:00
Sebastien Helleu 8f3455d0a9 Fixed infinite loop when scrolling back and displaying long lines 2005-09-14 08:39:14 +00:00
Sebastien Helleu dfbea2850a Fixed minor refresh bug in buffer clear function 2005-09-13 17:10:18 +00:00
Sebastien Helleu 8a299adb3b Fixed crash when closing a buffer used by more than one window 2005-09-13 17:04:34 +00:00
Sebastien Helleu a29416e352 Updated TODO 2005-09-13 07:00:33 +00:00
Sebastien Helleu c346216e34 Added missing "return 0" in handler for IRC command 221 2005-09-11 16:39:37 +00:00
Sebastien Helleu da7df57b1a Added global history keys (ctrl+up/down) 2005-09-11 16:30:51 +00:00
Sebastien Helleu 61fac4d49e Updated bugs 2005-09-11 14:32:07 +00:00
Sebastien Helleu 4f5c1b6e09 Updated Czech translations 2005-09-11 13:54:44 +00:00
Sebastien Helleu 2962a8e6c8 Added IRC commands: 042, 344, 345, 484 2005-09-10 08:53:35 +00:00
Sebastien Helleu 76263dc7cf Added IRC command "221" 2005-09-07 14:17:10 +00:00
Sebastien Helleu 554fa728ae Fixed command "331" ("no topic set for channel") 2005-09-07 10:16:00 +00:00
Sebastien Helleu 5881048405 Fixed DCC display bug (now decodes strings according to charset) 2005-09-07 10:14:07 +00:00
Sebastien Helleu c517253a72 Updated doc 2005-09-05 15:52:16 +00:00
Sebastien Helleu fe16f6d48f Added czech translation file 2005-09-04 19:21:30 +00:00
Sebastien Helleu f276fd9494 Fixed bug with nick change 2005-09-04 13:39:24 +00:00
Sebastien Helleu 517de7ab94 Removed nick color in nicklist when away and away check for nicks is disabled (= 0) 2005-09-04 13:20:56 +00:00
Sebastien Helleu 06463e5937 Added /ignore and /unignore commands 2005-09-04 12:55:25 +00:00
Sebastien Helleu d80c8e9e57 Fixed bug with strings comparison (str[n]casecmp) and some locales (like turkish), now using ASCII comparison 2005-09-03 12:37:20 +00:00
Sebastien Helleu f74b280a1f Added "505" IRC command 2005-09-02 08:17:17 +00:00
Sebastien Helleu cd4f50c136 Signal SIGQUIT is now ignored 2005-09-02 08:16:52 +00:00
Sebastien Helleu 767e378c53 Set non blockant socket for dcc connection (as it was made before) 2005-08-26 22:32:02 +00:00
Sebastien Helleu 60503d9383 Added command "020" 2005-08-22 11:43:43 +00:00
Sebastien Helleu 11321acb96 Added Ruby plugins skeleton 2005-08-21 16:32:48 +00:00
Sebastien Helleu 84b1a27265 Fixed empty private buffer when unknown CTCP is received 2005-08-21 09:49:58 +00:00
Sebastien Helleu 51322e7917 Fixed refresh bug when one line is bigger than screen size 2005-08-17 16:54:05 +00:00
Sebastien Helleu d256d72eef Fixed look_nicklist_min_size and look_nicklist_max_size options 2005-08-16 21:01:32 +00:00
Sebastien Helleu 8a61b0eee0 Updated TODO 2005-08-16 19:33:58 +00:00
Sebastien Helleu d4ecb032d4 Added example in server_autojoin description 2005-08-16 15:03:44 +00:00
Sebastien Helleu 3f946e304d Added completion for internal functions with /key command 2005-08-16 15:02:01 +00:00
Sebastien Helleu 97b6bbcb9e Revert code for irc_cmd_send_join function code (to prevent lag when sending
many /join commands to IRC server)
2005-08-15 21:52:15 +00:00
Sebastien Helleu 357edc193e Fixed bug and memory leak in irc_cmd_send_join function 2005-08-14 06:56:45 +00:00
Emmanuel Bouthenot ace03b808d add half (due to dcc) dcc support with proxies (only in ipv4 ) 2005-08-04 19:01:29 +00:00
Emmanuel Bouthenot 428cfbc297 fix an error in socket() while using ipv6 proxy 2005-08-03 19:18:28 +00:00
Julien Louis 02cd829c4c Update debian stuff 2005-08-01 19:54:39 +00:00
Emmanuel Bouthenot 17973de52a fix a stupid error about previous commit 2005-08-01 09:11:29 +00:00
Emmanuel Bouthenot 364667f788 improve support of keys when joining channel and with server autojoin 2005-07-31 23:01:14 +00:00
Sebastien Helleu 10d7c6c34a Fixed refrech bug when changing channel modes 2005-07-31 12:29:49 +00:00
Sebastien Helleu 38fa7c93ac Jump to next server now saves current channel buffer for each server 2005-07-31 11:32:28 +00:00
Sebastien Helleu 9e328d3fef ctrl-up/ctrl-down keys added to call previous/next command in global history (common to all buffers) 2005-07-30 18:41:48 +00:00
Sebastien Helleu 312d8015f5 Version 0.1.5-cvs 2005-07-30 09:05:09 +00:00
Sebastien Helleu 110aa59ca8 Version 0.1.4 2005-07-30 09:04:09 +00:00
Sebastien Helleu 89b955c79e Version 0.1.4 2005-07-30 08:28:43 +00:00
Sebastien Helleu 3d724fb634 Join and part/quit prefixes (arrows) now displayed with different colors 2005-07-22 08:11:39 +00:00
Sebastien Helleu 29d0225e4a Fixed CTCP ACTION bug and now replies to CTCP PING on channels 2005-07-20 15:04:49 +00:00
Sebastien Helleu 8416212077 Updated TODO 2005-07-20 13:49:33 +00:00
Sebastien Helleu c36f08d7d7 Highlights with "irc_highlight" setting now case insensitive 2005-07-19 19:50:10 +00:00
Sebastien Helleu 1230735c5f Added "irc_highlight" setting, fixed crash when doing /part on an active DCC chat buffer 2005-07-19 17:35:51 +00:00
Sebastien Helleu 77d7b703de Fixed typo (wrong accent) 2005-07-19 14:17:08 +00:00
Sebastien Helleu 60db73c19a Updated translations 2005-07-19 12:20:40 +00:00
Sebastien Helleu a9ca2987bb Commands /halfop, /voice, /deop, /dehalfop, /devoice are ok for self nick (no arg) 2005-07-19 12:19:06 +00:00
Sebastien Helleu 220308e1fa Fixed hotlist for privates: now quit message is displayed as part/join/quit, not standard message 2005-07-19 10:17:17 +00:00
Sebastien Helleu 8166d15235 Fixed auto-rejoin for channels with key 2005-07-19 09:46:23 +00:00
Sebastien Helleu 575525d965 Reverted to previous code 2005-07-18 09:30:55 +00:00
Emmanuel Bouthenot 6271304832 change signatures in proxy functions 2005-07-17 23:10:17 +00:00
Sebastien Helleu bdf9eadf43 Fixed /ctcp command (now any command/data allowed) 2005-07-17 11:03:00 +00:00
Julien Louis 15ea11b57b Update path of weechat-curses.1 manpages in debian/rules 2005-07-17 08:59:27 +00:00
Sebastien Helleu f3390da5e3 Previous behaviour restored for key "^" (now inserted in buffer) 2005-07-17 00:15:48 +00:00
Sebastien Helleu eeff957278 Added /amsg command (send text to all channels of all connected servers) 2005-07-17 00:02:40 +00:00
Sebastien Helleu 1eac6d8fdd Added /amsg command (send text to all channels of all connected servers) 2005-07-16 23:26:01 +00:00
Sebastien Helleu 23696b44da Documentation is now included in source package and installed with standard process 2005-07-16 22:46:01 +00:00
Sebastien Helleu 63ffae72af Image not used any more in pdf version of doc 2005-07-16 22:44:06 +00:00
Sebastien Helleu 376c8a29d6 Makefile replaced by Makefile.am 2005-07-16 22:40:42 +00:00
Sebastien Helleu 8b1e3b9890 Man page moved to doc/ directory 2005-07-16 22:38:49 +00:00
Julien Louis 1b2c5571e6 Add @documentencoding macro to enable localized info files 2005-07-16 16:51:59 +00:00
Sebastien Helleu 4c6c367557 - added alt-j + alt-l key (switch to last buffer)
- added message for +q mode changing on a nick
2005-07-16 12:37:30 +00:00
Sebastien Helleu 99ad719ab9 Fixed segfault when switching to DCC buffer 2005-07-16 11:32:23 +00:00
Sebastien Helleu a68a1f8192 Added alt-k key to grab a key and insert result into input buffer 2005-07-16 11:14:47 +00:00
Julien Louis 930c40eae1 Sync debian packaging with actual version 2005-07-16 08:58:23 +00:00
Sebastien Helleu 9238a37351 Fixed minor typos 2005-07-15 12:16:14 +00:00
Sebastien Helleu a7c4c7237c Added control in clipboard copy function 2005-07-14 16:35:59 +00:00
Sebastien Helleu a9912cd266 - fixed SIGSEGV handler (now write a core file by aborting program)
- fixed statusbar & infobar background refresh problem with some systems
2005-07-14 07:04:45 +00:00
Sebastien Helleu 1d07964d17 Added color for private in hotlist (different than color for highlight) 2005-07-13 17:40:20 +00:00
Sebastien Helleu 06bd0f9f0e Special chars (between 01 and 31 decimal) not displayed any more on buffers (replaced by spaces) 2005-07-13 16:40:42 +00:00
Sebastien Helleu 4b1679900a Setting "dcc_auto_resume" now used, and fixed address & pos conversion to unsigned long for DCC 2005-07-13 16:39:49 +00:00
Sebastien Helleu 99f03cd2a3 Added DCC resume 2005-07-13 16:24:47 +00:00
Emmanuel Bouthenot 3d41a3fa2f correct bugs in clipboard management 2005-07-13 08:32:02 +00:00
Emmanuel Bouthenot 089b167573 close bug when using delete_end_line in empty line 2005-07-13 07:33:29 +00:00
Sebastien Helleu fc2d9732e5 When DCC failed, do not display local filename if transfer failed before starting 2005-07-12 19:28:09 +00:00
Sebastien Helleu 94a3b5e1ae Added message on server buffer when DCC file transfer failed (or was aborted) 2005-07-12 17:17:37 +00:00
Sebastien Helleu 6b12f19083 - added DCC timeout
- fixed FIFO pipe (command now authorized on a buffer not connected to an IRC server)
- fixed Perl bug with info reading functions
2005-07-12 17:05:01 +00:00
Emmanuel Bouthenot 8a6d35cf12 change return type from tuple to list for get_info('dccs') feature 2005-07-12 14:58:42 +00:00
Emmanuel Bouthenot d286f3922c adding getinfo feature about dccs 2005-07-12 14:46:44 +00:00
Emmanuel Bouthenot 505b43d15b add some gui_input features : clipboard and a 'translate_chars' function 2005-07-12 10:06:10 +00:00
Sebastien Helleu 07a820ced6 Added function for Perl/Python to get DCC list 2005-07-12 08:35:58 +00:00
Sebastien Helleu df6a41566b Updated spanish translation 2005-07-12 08:20:25 +00:00
Sebastien Helleu 263606fffb Updated TODO 2005-07-11 15:05:10 +00:00
Sebastien Helleu d4d065253e Topic completion now decodes UTF-8 string 2005-07-11 14:34:20 +00:00
Sebastien Helleu 673e7680af Fixed bug with IRC URL on command line (irc://) 2005-07-11 12:14:57 +00:00
Sebastien Helleu ad1120c84c Updated doc with new kayboard management 2005-07-09 22:23:41 +00:00
Sebastien Helleu f2a78ebc16 Updated TODO 2005-07-09 22:01:26 +00:00
Sebastien Helleu fef0932c1d Changed two shortcuts (jump to server and jump to next server, now prefixed by meta-j) 2005-07-09 17:50:04 +00:00
Sebastien Helleu 96bd473887 Internal functions descriptions for keys are now displayed and translated 2005-07-09 17:08:26 +00:00
Sebastien Helleu 89d107c1a9 Fixed typo on a color number 2005-07-09 15:58:54 +00:00
Sebastien Helleu 54d4fc12a6 - new keyboard management: keys are setup in config file, new command /key was added and some new default keys were added
- added seconds in infobar time (optional with new config flag)
- fixed some curses refreshs
2005-07-09 15:30:51 +00:00
Sebastien Helleu 55125beee4 Channels auto-prefixed by "#" (if no prefix found) for /join command 2005-07-06 07:13:03 +00:00
Julien Louis a724278215 Update packaging stuff 2005-07-04 04:50:59 +00:00
Sebastien Helleu e3799797ef Version 0.1.4-cvs 2005-07-02 18:22:40 +00:00
Sebastien Helleu b738f4c8aa Version 0.1.3 2005-07-02 17:21:50 +00:00
Sebastien Helleu 6f3b6d9e50 Version 0.1.3 2005-07-02 17:03:23 +00:00
Sebastien Helleu def35c5a66 Updated doc 2005-07-02 16:07:52 +00:00
Sebastien Helleu da4ee1a6ee Added tests after getaddrinfo function 2005-07-02 16:01:02 +00:00
Sebastien Helleu 7c31dd9189 gnutls lib now optional, configure goes on if lib is not found 2005-07-02 15:59:44 +00:00
Sebastien Helleu dbad2a0206 Translated some messages and added calls to freeaddrinfo() function 2005-06-30 20:16:07 +00:00
Emmanuel Bouthenot ec1d57063c - proxy support (http, socks4, socks5) with authentification for http, socks5 2005-06-30 19:22:01 +00:00
Sebastien Helleu 5bd56f86c6 * commands from users outside channel now authorized (if special user or channel without "n" flag)
* completion added for config option (with /set command)
2005-06-30 12:55:36 +00:00
Sebastien Helleu 2fab4da03d Updated TODO with SSL and IPv6 2005-06-28 08:33:13 +00:00
Sebastien Helleu c69c77507c Added IPv6 and SSL options for command line IRC url 2005-06-28 08:24:43 +00:00
Sebastien Helleu b330ec3dae Added IPv6 support 2005-06-27 16:27:31 +00:00
Sebastien Helleu ae8f8a5700 gnutls code compiled according to pre-processor var HAVE_GNUTLS 2005-06-22 21:08:21 +00:00
Julien Louis 5e8b47f187 * Add --disable-gnutls option to turn off gnutls support
* Remove wxwidgets checks when --enable-wxwidgets arg is not given
2005-06-22 18:50:24 +00:00
Sebastien Helleu f4abd0bf59 Added certificate management in SSL (connection now ok with SSL server) 2005-06-21 08:05:58 +00:00
Sebastien Helleu abe7e08147 kill command now received and displayed 2005-06-20 14:04:17 +00:00
Sebastien Helleu 4e9193a943 Added SSL support with gnutls lib 2005-06-19 20:55:10 +00:00
Julien Louis bbd373c44d Update debian/changelog 2005-06-19 19:44:01 +00:00
Sebastien Helleu 6b011234cf Added kolter and ptitlouis 2005-06-19 15:51:22 +00:00
Sebastien Helleu 71a76ada48 Channel notify levels are saved in config file 2005-06-19 14:22:11 +00:00
Sebastien Helleu a7ddb89076 Updated README 2005-06-18 20:27:05 +00:00
Sebastien Helleu 6fe262c131 File automatically updated 2005-06-18 11:44:37 +00:00
Julien Louis 0a32bc5326 Fix wrong debhelper version dependency. 2005-06-18 09:38:59 +00:00
Sebastien Helleu 70fe8e9472 part message now accepts %v (replaced by WeeChat version), like quit message 2005-06-18 09:28:16 +00:00
Julien Louis b0310b6e78 Set debhelper compatibility to avoid warnings during package build 2005-06-18 09:25:30 +00:00
Julien Louis 8218316502 Sync with official debian package 2005-06-18 08:42:08 +00:00
Emmanuel Bouthenot d00c99f292 errors while loading perl scripts are now displayed in server buffer (instead of current buffer) 2005-06-16 17:02:37 +00:00
Emmanuel Bouthenot f72e5952f2 in python scripts, all messages written in stdin and stderr are redirect in server window 2005-06-16 16:52:17 +00:00
Emmanuel Bouthenot ebf5f9e66d in python scripts, all messages written in stdin and stderr are redirect in server window 2005-06-16 16:41:41 +00:00
Emmanuel Bouthenot 7330dc862a fix a filename error while loading a python script manually 2005-06-16 16:38:36 +00:00
Sebastien Helleu 9eb1422bb7 Fixed plugins "print" and "prnt" functions: now ok for writing on server buffers 2005-06-16 11:02:19 +00:00
Sebastien Helleu d86a783b6a Fixed color problem with new libcurses version 2005-06-15 17:17:45 +00:00
Sebastien Helleu 5b3f96dace Display message content when nick is not found for an incoming "PRIVMSG" message 2005-06-15 17:16:35 +00:00
Emmanuel Bouthenot 821c2e87c8 update examples in python API 2005-06-05 12:54:31 +00:00
Sebastien Helleu 1de7b52aa2 Fixed crash when using alt-S or alt-X keys on DCC buffer (alt-D) 2005-05-31 15:09:54 +00:00
Sebastien Helleu 4d4a667094 Fixed crash when using alt-S or alt-X keys on DCC buffer (alt-D) 2005-05-31 07:55:17 +00:00
Emmanuel Bouthenot 0eb3d45582 Fix python library detection on FreeBSD 2005-05-29 15:15:12 +00:00
Sebastien Helleu 7c63a73999 Added cast to prevent problems with AMD64 where size_t is not int 2005-05-29 07:20:15 +00:00
Sebastien Helleu 2ab3467c05 Added cast for away time display (to prevent problems with *BSD, where time_t is int and not long int) 2005-05-29 06:46:01 +00:00
Emmanuel Bouthenot 37d74c4941 Fix perl headers and library detection on various systems 2005-05-24 15:14:54 +00:00
Sebastien Helleu 01186c6c8b Fixed startup crash when weechat config file is not found 2005-05-24 14:10:56 +00:00
Emmanuel Bouthenot 29ffe7e0d8 Remove unused $PERL_LIB var due to an impoved libperl detection 2005-05-23 21:52:53 +00:00
Emmanuel Bouthenot a8619181b7 Fix libperl and libpython detection 2005-05-23 21:45:50 +00:00
Julien Louis 5a90270a79 Fix configure args handling 2005-05-22 17:40:25 +00:00
Sebastien Helleu 3900a0f5ae Version 0.1.3-cvs 2005-05-22 16:12:24 +00:00
144 changed files with 43072 additions and 14450 deletions
+556 -546
View File
File diff suppressed because it is too large Load Diff
+27 -9
View File
@@ -1,16 +1,34 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
Developer:
---------
Developers:
----------
* General code
FlashCode <flashcode@flashtux.org>
Web : http://weechat.flashtux.org
IRC : nick is "FlashCode" @ irc.freenode.net
Jabber: flashcode@jabber.org
ICQ : 160677660
AIM : FlashCode AIM
Yahoo : FlashCode_Y
* Python plugin
Kolter <kolter@free.fr>
Web : http://kolter.free.fr
IRC : nick is "kolter" @ irc.freenode.net
Jabber: kolter@jabber.org
Debian packager:
---------------
Julien Louis <ptitlouis@sysif.net>
IRC : nicks are "ptitlouis" or "tioui" @ irc.freenode.net
Jabber: ptitlouis@amessage.info
FlashCode <flashcode@flashtux.org>
Web : http://weechat.flashtux.org
IRC : nick is "FlashCode" @ irc.freenode.net
Jabber: flashcode@jabber.org
ICQ : 160677660
AIM : FlashCode AIM
Yahoo : FlashCode_Y
Testers:
-------
+3 -2
View File
@@ -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) (???)
+71 -1
View File
@@ -1,9 +1,79 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2005-05-21
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)
* completion added for config option (with /set command)
* commands from users outside channel now authorized (if special user or
channel without "n" flag)
* added IPv6 support
* kill command now received and displayed
* added SSL support
* channel notify levels are saved in config file (new option
"server_notify_levels" for server sections)
* part message now accepts %v (replaced by WeeChat version), like quit message
* errors while loading perl scripts are now displayed in server buffer
(instead of current buffer)
* in python scripts, all messages written in stdin and stderr are redirected
in server buffer
* fix a filename error while loading a python script manually
* fixed plugins "print" and "prnt" functions: now ok for writing on server
buffers
* fixed color problem with new libcurses version
* fixed crash when using Alt-S or Alt-X on DCC buffer (Alt-D)
* fixed startup crash when config file (~/.weechat/weechat.rc) is not found
* improved Perl/Python libs detection for ./configure script
Version 0.1.2 (2005-05-21):
* added Python plugin support, improved Perl interface (and now Perl/Python
libraries are checked by configure script)
+13 -7
View File
@@ -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
View File
@@ -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
View File
@@ -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
+12
View File
@@ -1,6 +1,18 @@
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.
* FlashCode, 2005-05-21
WeeChat 0.1.2 released.
+3 -3
View File
@@ -14,7 +14,7 @@ Features
* small, fast and very light
* customizable and extensible with scripts (Perl, Python, Ruby) (2)
* compliant with RFC 1459,2810,2811,2812,2813
* developed from scratch (not based on any other IRC client, except for look ;)
* developed from scratch
* multi-platform (GNU/Linux, *BSD, Windows & other) (3)
* 100% GPL & free
@@ -44,5 +44,5 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
(1) only Curses interface is available today
(2) only Perl interface is available today
(3) only GNU/Linux version is available today
(2) only Perl and Python interfaces are available today
(3) only GNU/Linux and *BSD versions are available today
+10 -28
View File
@@ -1,7 +1,7 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
TODO - 2005-05-21
TODO - 2005-09-24
Legend:
# done
@@ -10,69 +10,51 @@ Legend:
? is this really necessary?
v0.1.2:
v0.1.6:
------
* General:
+ Windows version
+ Solaris version
# *BSD version
# Mac OS X version
* IRC protocol:
- customizable CTCP version reply
* Interface:
# nicklist scroll keys
+ Gtk GUI
+ internationalization (traduce WeeChat in many languages)
* TCP/IP communication:
- SSL support
* 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:
- add key bindings to config file
* Plugins:
# Python plugin
# "/python load" and "/python unload" commands to (un)load Python scripts
- be able to launch more than one command when connecting to server
Future versions:
---------------
* IRC protocol:
- customizable CTCP version reply
- complete "/list" command: add regexp search, display only channels that
match regexp
- "/ignore" and "/unignore" commands: hide all that is write by a given
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:
- "/reload" command: reload the WeeChat's config file
- "/highlight" command: highlight a given word when it appears on
channels/privates
- "/completion" command: do shortcuts (for example when we type "u"
in the text bar it send it to the server as "you")
- "/exec" command: execute a command as if we was in shell
and show us the output on the current window. An option to exec
like -o could send the output to the server, on the current
channel/private
- "/last": command to look for text in previous messages
- 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
* TCP/IP communication:
- proxy support
- IPv6 protocol implementation
* Plugins:
- Ruby plugin
- "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts
+77 -30
View File
@@ -19,10 +19,10 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.56)
AC_INIT(WeeChat, 0.1.2, 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.2])
AM_INIT_AUTOMAKE([weechat], [0.1.5])
# Checks for programs.
AC_PROG_CC
@@ -30,15 +30,12 @@ AC_PROG_MAKE_SET
AC_PROG_RANLIB
# Gettext
ALL_LINGUAS="fr es"
ALL_LINGUAS="fr es cs"
AM_GNU_GETTEXT
# Checks for libraries.
AC_CHECK_LIB([ncurses], [initscr], LIBNCURSES_FOUND=1, LIBNCURSES_FOUND=0)
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG(2.3.4, wxWin=1)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h libintl.h limits.h locale.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/types.h unistd.h pwd.h errno.h])
@@ -69,19 +66,21 @@ 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])
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],,enable_ncurses=yes)
AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (default=no)],enable_wxwidgets=yes,enable_wxwidgets=no)
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=yes,enable_gtk=no)
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=yes,enable_qt=no)
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=yes,enable_perl=no)
AC_ARG_ENABLE(python, [ --enable-python Turn on Python plugins (default=no)],enable_python=yes,enable_python=no)
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0)
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],enable_ncurses=$enableval,enable_ncurses=yes)
AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (default=no)],enable_wxwidgets=$enableval,enable_wxwidgets=no)
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=$enableval,enable_gtk=no)
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=$enableval,enable_qt=no)
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=$enableval,enable_perl=no)
AC_ARG_ENABLE(python, [ --enable-python Turn on Python plugins (default=no)],enable_python=$enableval,enable_python=no)
AC_ARG_ENABLE(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")
@@ -89,7 +88,8 @@ 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
if test "$LIBNCURSES_FOUND" = "0" ; then
@@ -102,6 +102,9 @@ if test "x$enable_ncurses" = "xyes" ; then
fi
if test "x$enable_wxwidgets" = "xyes" ; then
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG(2.3.4, wxWin=1)
if test "$wxWin" != 1; then
AC_MSG_ERROR([
*** wxWindows must be installed on your system
@@ -138,7 +141,7 @@ PLUGINS_LIBS=
if test "x$enable_perl" = "xyes" ; then
enable_plugins="yes"
AC_PATH_PROG(PERL, perl)
AC_PATH_PROG(PERL, perl perl5)
if test -z $PERL ; then
AC_MSG_ERROR([
*** Perl must be installed on your system
@@ -148,19 +151,32 @@ Please check that perl is in path, or install
it with your software package manager.])
fi
AC_MSG_CHECKING(for Perl library)
PERL_LIB=`$PERL -e 'use Config; print "$Config{installprefix}/lib/$Config{libperl}"'`
AC_MSG_CHECKING(for Perl headers files)
if test -r "$PERL_LIB"; then
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/perl/lib_weechat_perl.a `perl -MExtUtils::Embed -e ldopts`"
PERL_HEADER_TEST=`PT=perltest.c ; echo "#include <EXTERN.h>" > $PT; echo "#include <perl.h>" >> $PT; echo "#include <XSUB.h>" >> $PT ; echo "int main() { return 0; }" >> $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ccopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
if test "x$PERL_HEADER_TEST" = "x0" ; then
PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
else
AC_MSG_ERROR([
*** Perl headers couldn't be found in your system.
*** Try to install it with your software package manager.])
fi
AC_MSG_RESULT(found)
AC_MSG_CHECKING(for Perl library)
PERL_LIB_TEST=`PT=perltest.c ; echo "int main() { return 0; }" > $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ldopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
if test "x$PERL_LIB_TEST" = "x0" ; then
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/perl/lib_weechat_perl.a `$PERL -MExtUtils::Embed -e ldopts`"
else
AC_MSG_ERROR([
*** Perl library couldn't be found in your system.
*** Try to install it with your software package manager.])
fi
AC_MSG_RESULT(found)
PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
AC_SUBST(PERL_CFLAGS)
AC_DEFINE(PLUGIN_PERL)
fi
@@ -168,7 +184,7 @@ fi
if test "x$enable_python" = "xyes" ; then
enable_plugins="yes"
AC_PATH_PROG(PYTHON, python)
AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2)
if test -z $PYTHON ; then
AC_MSG_ERROR([
*** Python must be installed on your system
@@ -178,11 +194,13 @@ if test "x$enable_python" = "xyes" ; then
*** it with your software package manager.])
fi
PYTHON_INCLUDE=`$PYTHON -c 'import sys ; print "%s/include/python%s" % (sys.prefix, sys.version[[:3]])'`
PYTHON_SYSPREFIX=`$PYTHON -c 'import sys; print "%s" % sys.prefix'`
PYTHON_VERSION=`$PYTHON -c 'import sys ; print sys.version[[:3]]'`
PYTHON_INCLUDE="$PYTHON_SYSPREFIX/include/python$PYTHON_VERSION"
AC_MSG_CHECKING(for Python header files)
if test -r "$PYTHON_INCLUDE/Python.h"; then
PYTHON_CFLAGS=`$PYTHON -c "import distutils.sysconfig,string; print ' -I' + distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
PYTHON_CFLAGS=-I`$PYTHON -c "import distutils.sysconfig,string; print distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
else
AC_MSG_ERROR([
*** Python header files couldn't be found in your system.
@@ -190,12 +208,11 @@ if test "x$enable_python" = "xyes" ; then
fi
AC_MSG_RESULT(found)
PYTHON_LIB=`$PYTHON -c 'import sys; print "%s/lib/python%s/config" % (sys.prefix, sys.version[[:3]])'`
PYTHON_VERSION=`$PYTHON -c 'import sys ; print sys.version[[0:3]]'`
PYTHON_LIB="$PYTHON_SYSPREFIX/lib/python$PYTHON_VERSION/config"
AC_MSG_CHECKING(for Python library)
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so" -a -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then
PYTHON_LFLAGS=`$PYTHON -c "import distutils.sysconfig,string; print string.join(distutils.sysconfig.get_config_vars('LINKFORSHARED', 'BLDLIBRARY', 'SHLIBS'))"`
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so" -o -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
PYTHON_LFLAGS="-lpython$PYTHON_VERSION -lpthread -lutil"
else
AC_MSG_ERROR([
*** Python library couldn't be found in your system.
@@ -208,12 +225,39 @@ 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
AC_SUBST(PLUGINS_LIBS)
if test "x$enable_gnutls" = "xyes" ; then
found_gnutls="no"
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[
*** libgnutls was not found. You may want to get it from
*** ftp://ftp.gnutls.org/pub/gnutls/
*** WeeChat will be built without GnuTLS support.]]))
if test "x$found_gnutls" = "xyes" ; then
GNUTLS_LIBS="-lgnutls"
AC_SUBST(GNUTLS_LIBS)
AC_DEFINE(HAVE_GNUTLS)
else
enable_gnutls="no"
fi
fi
CFLAGS=`echo $CFLAGS | sed s/-g//g`
if test "x$CFLAGS" = "x" ; then
CFLAGS="-O2"
@@ -233,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
@@ -286,6 +332,7 @@ echo Build with Plugin support..... : $enable_plugins
echo Build with Perl support....... : $enable_perl
echo Build with Python support..... : $enable_python
echo Build with Ruby support....... : $enable_ruby
echo Build with GNUtls support..... : $enable_gnutls
echo
echo Compile with debug info....... : $msg_debug_compiler
echo Print debugging messages...... : $msg_debug_verbose
+41
View File
@@ -1,3 +1,44 @@
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
when config file does not exists (Closes: #310589).
-- Julien Louis <ptitlouis@sysif.net> Tue, 24 May 2005 20:55:02 +0200
weechat (0.1.2-1) unstable; urgency=low
* WeeChat version 0.1.2, see ChangeLog for detail.
+1
View File
@@ -0,0 +1 @@
4
+2 -2
View File
@@ -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.0), libncurses5-dev (>= 5.2.20020112a-7), perl (>= 5.6.0-16), libperl-dev, python2.3 (>= 2.3), 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
View File
@@ -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
+2
View File
@@ -0,0 +1,2 @@
version=2
http://weechat.flashtux.org/download/weechat-(\d.*)\.tar\.bz2
+1 -1
View File
@@ -1 +1 @@
usr/share/locale
debian/tmp/usr/share/locale/
+1 -1
View File
@@ -1 +1 @@
usr/bin/weechat-curses
debian/tmp/usr/bin/weechat-curses
-36
View File
@@ -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
+28
View File
@@ -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 "May 2005" "FlashCode"
.TH WEECHAT 1 "September 2005" "FlashCode"
.SH NAME
weechat-curses \- Wee Enhanced Environment for Chat (Curses version)
@@ -23,10 +23,22 @@ 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
.TP
.B \-i, \-\-irc\-commands
.br
display IRC commands
.TP
.B \-k, \-\-keys
.br
display default keys
.TP
.B \-l, \-\-license
.br
display program license
@@ -34,12 +46,16 @@ display program license
.B \-v, \-\-version
.br
display WeeChat version
.TP
.B \-w, \-\-weechat\-commands
.br
display WeeChat commands
.SH URL
WeeChat can use an URL (Uniform Resource Locator) to automatically connect
to an IRC server. These are in the following form:
.TP
.B irc://[[nickname][:password]@]server[:port][/[#&+!]channel]
.B irc[6][s]://[[nickname][:password]@]server[:port][/[#&+!]channel[,channel...]]
.TP
Exemple to join WeeChat channel support with nick "FlashCode":
irc://FlashCode@irc.freenode.net/weechat
+404 -166
View File
@@ -35,9 +35,7 @@
@title WeeChat - User guide
@subtitle Fast, light and extensible IRC client
@subtitle Documentation for WeeChat v0.1.2 - May, 21 2005
@image{weechat_image}
@subtitle Documentation for WeeChat v0.1.5 - September, 24 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -84,27 +82,27 @@ version 2 or higher.
@node Description, Pre-requisites, Introduction, Introduction
@section Description
WeeChat (Wee Enhanced Environment for Chat) is a free IRC client, fast and light,
designed for many operating systems.@*
WeeChat (Wee Enhanced Environment for Chat) is a free IRC client, fast and light,
designed for many operating systems.@*
@*
Main features are:
Main features are:
@itemize @minus
@item
multi-servers connection
@item
many GUI (Graphical User Interface): Curses, Gtk and Qt
@item
small, fast and light
@item
customizable and extensible with scripts
@item
compliant with RFCs 1459, 2810, 2811, 2812, and 2813
@item
multi-platform (Gnu/Linux, *BSD, Windows and other)
@item
@item
multi-servers connection (with SSL, IPv6, proxy)
@item
many GUI: Curses, wxWidgets, Gtk and Qt
@item
small, fast and light
@item
customizable and extensible with scripts
@item
compliant with RFCs 1459, 2810, 2811, 2812, and 2813
@item
multi-platform (Gnu/Linux, *BSD, MacOS X, Windows and other)
@item
100% GPL, free software
@end itemize
@end itemize
@*
WeeChat homepage is here:@*
@uref{http://weechat.flashtux.org}@*
@@ -116,20 +114,20 @@ In order to install WeeChat, you @b{need}:@*
@itemize @bullet
@item
A running Gnu/Linux system (with compiler tools for source package)
A running Gnu/Linux system (with compiler tools for source package)
@item
"root" privileges (to install WeeChat)
@item
According to GUI, one of the following libraries:
@itemize @minus
@item
Curses: ncurses library,
@item
Gtk: *** GUI not developed ***,
@item
Qt: *** GUI not developed ***,
According to GUI, one of the following libraries:
@itemize @minus
@item
Curses: ncurses library,
@item
Gtk: *** GUI not developed ***,
@item
Qt: *** GUI not developed ***,
@end itemize
@end itemize
@end itemize
@c ******************************* Installation *******************************
@@ -139,31 +137,31 @@ Qt: *** GUI not developed ***,
@menu
* Binary package::
* Source package::
* Source package::
* CVS sources::
@end menu
@node Binary package, Source package, Installation, Installation
@section Binary package
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}
@item
Mandrake/Redhat (or any RPM compatible distribution)@*
To install: @kbd{rpm -i /path/weechat-x.y.z-1.i386.rpm}
@item
Gentoo@*
To install: @kbd{emerge weechat}
@item
*BSD (not available!)
@item
Slackware (not available!)
@item
Windows (not available!)
@end itemize
Binary packages are available for these distributions:
@itemize @bullet
@item
Debian (or any Debian compatible distribution)@*
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}
@item
Gentoo@*
To install: @kbd{emerge weechat}
@item
*BSD (not available!)
@item
Slackware (not available!)
@item
Windows (not available!)
@end itemize
where x.y.z is the version (for example 0.0.1)
@*
@@ -176,27 +174,27 @@ All you have to do is to run in a console or a terminal:@*
@kbd{make}@*
Nota: to build only some interfaces, you can give parameters
to ./configure, type @kbd{./configure --help} for help about options.@*
Then get root privileges and install WeeChat:@*
@kbd{su}@*
(enter root password)@*
@kbd{make install}@*
Then get root privileges and install WeeChat:@*
@kbd{su}@*
(enter root password)@*
@kbd{make install}@*
@node CVS sources, , Source package, Installation
@section CVS sources
Warning: CVS sources are for advanced users: it may not compile or not be stable.
You're warned!@*
To get CVS sources, issue these commands:@*
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
@kbd{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat co weechat}@*
(when prompted for a password, just press Enter key)@*
Warning: CVS sources are for advanced users: it may not compile or not be stable.
You're warned!@*
To get CVS sources, issue these commands:@*
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
@kbd{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat co weechat}@*
(when prompted for a password, just press Enter key)@*
Execute this script:@*
@kbd{./autogen.sh}@*
Then follow instructions for source package - @xref{Source package}.
Then follow instructions for source package - @xref{Source package}.
@c ********************************** Usage ***********************************
@@ -206,40 +204,47 @@ Then follow instructions for source package - @xref{Source package}.
@menu
* Run WeeChat::
* Config file::
* Key bindings::
* Config file::
* Key bindings::
* WeeChat commands::
* FIFO pipe::
@end menu
@node Run WeeChat, Config file, Usage, Usage
@section Run WeeChat
@subsection Command line parameters
@subsection Command line parameters
@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
Display IRC commands list@*
@item -l, --license
Display WeeChat license@*
@item -v, --version
@item -v, --version
Display WeeChat version@*
@end table
@subsection Run WeeChat
Just issue this command to run WeeChat:@*
@item -w, --weechat-commands
Display WeeChat commands list@*
@end table
@subsection Run WeeChat
Just issue this command to run WeeChat:@*
@kbd{weechat-curses} (for Curses front-end)@*
or @kbd{weechat-wxwidgets} (for wxWidgets front-end)@*
or @kbd{weechat-gtk} (for Gtk front-end)@*
or @kbd{weechat-qt} (for Qt front-end)@*
When you run WeeChat for the first time, a default configuration file is
created, with default options.@*
The default configuration file is: ~/.weechat/weechat.rc@*
You can edit this file at your convenience to configure WeeChat, or you can
or @kbd{weechat-qt} (for Qt front-end)@*
When you run WeeChat for the first time, a default configuration file is
created, with default options.@*
The default configuration file is: ~/.weechat/weechat.rc@*
You can edit this file at your convenience to configure WeeChat, or you can
set parameters with @kbd{/set} command in WeeChat - @xref{WeeChat commands}.
@node Config file, Key bindings, Run WeeChat, Usage
@@ -248,7 +253,6 @@ set parameters with @kbd{/set} command in WeeChat - @xref{WeeChat commands}.
List of options for config file:@*
@table @kbd
@item look_set_title
Set title for window (terminal for Curses GUI) with name & version@*
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
@@ -276,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'@*
@@ -311,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@*
@@ -336,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'@*
@@ -363,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'@*
@@ -378,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'@*
@@ -426,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'@*
@@ -488,10 +540,13 @@ Default message when away@*
Type: string (any string), default value: 'away'@*
@item irc_default_msg_part
Default part message (leaving channel)@*
Type: string (any string), default value: ''@*
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@*
@@ -507,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'@*
@@ -537,12 +595,21 @@ Type: boolean (values: 'on' or 'off'), default value: 'on'@*
@item proxy_use
Use a proxy server to connect to irc server@*
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
@item proxy_type
Proxy type (http (default), socks4, socks5)@*
Type: string (values: 'http', 'socks4', 'socks5'), default value: 'http'@*
@item proxy_ipv6
Connect to proxy in ipv6@*
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
@item proxy_address
Proxy server address (IP or hostname)@*
Type: string (any string), default value: ''@*
@item proxy_port
Port for connecting to proxy server@*
Type: integer (values: between 0 and 65535), default value: 1080@*
Type: integer (values: between 0 and 65535), default value: 3128@*
@item proxy_username
Username for proxy server@*
Type: string (any string), default value: ''@*
@item proxy_password
Password for proxy server@*
Type: string (any string), default value: ''@*
@@ -564,6 +631,12 @@ Type: string (any string), default value: ''@*
@item server_port
Port for connecting to server@*
Type: integer (values: between 0 and 65535), default value: 6667@*
@item server_ipv6
Use IPv6 protocol for server communication@*
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
@item server_ssl
Use SSL for server communication@*
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
@item server_password
Password for IRC server@*
Type: string (any string), default value: ''@*
@@ -589,12 +662,14 @@ 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@*
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
@item server_notify_levels
Comma separated list of notify levels for channels of this server (format: #channel:1,..)@*
Type: string (any string), default value: ''@*
@end table
Colors for Curses GUI are:@*
@@ -633,11 +708,11 @@ Colors for Curses GUI are:@*
@node Key bindings, WeeChat commands, Config file, Usage
@section Key bindings
@table @kbd
@item Left arrow / Right arrow
Go to previous / next char in command line@*
@*
@*
@item Ctrl + left arrow / Ctrl + right arrow
Go to previous / next word in command line@*
@*
@@ -647,28 +722,40 @@ Go to the beginning of command line@*
@item End / Ctrl + E
Go to the end of command line@*
@*
@item Backspace / Delete
Erase previous / next char of command line@*
@*
@item Ctrl + Backspace / Ctrl + W
@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 Tab
@*
@item Backspace / Delete
Erase previous / next char of command line@*
@*
@item Tab
Complete command or nick (@kbd{Tab} again: find next completion)@*
@*
@item Any char
Insert char to cursor position in the command line@*
@*
@item Enter
@*
@item Any char
Insert char to cursor position in the command line@*
@*
@item Enter
Execute command or send message@*
@*
@item Up arrow / Down arrow
Call again last commands/messages@*
@*
@item PageUp / PageDown
@*
@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@*
@*
@item F5 / F6
@item F5 / F6
Switch to previous / next buffer@*
@*
@item F7 / F8
@@ -680,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
@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@*
@*
@@ -715,7 +820,6 @@ Scroll nicklist@*
WeeChat internal commands:@*
@table @kbd
@item alias [alias_name [command [arguments]]
@*
create an alias for a command@*
@@ -765,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]
@@ -777,15 +904,26 @@ 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 server [servername] | [servername hostname port [-auto | -noauto] [-pwd password] [-nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [del servername]
@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@*
@*
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@*
@@ -812,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@*
@@ -821,19 +973,29 @@ splith: split current window horizontally@*
splitv: split current window vertically@*
merge: merge window with another@*
@*
@end table
IRC commands:@*
@table @kbd
@item admin [target]
@*
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@*
@@ -848,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]]
@*
@@ -863,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)@*
@*
@@ -879,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)@*
@*
@@ -955,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@*
@*
@@ -1162,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)@*
@*
@@ -1194,7 +1357,83 @@ nickname: nickname to search@*
count: number of replies to return (full search if negative number)@*
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
@@ -1215,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
@*
@@ -1443,7 +1686,7 @@ List all Python scripts: @kbd{/python}@*
@itemize @bullet
@item
@command{weechat.register ( name, version, shutdown_function, description );}@*
@command{weechat.register ( name, version, shutdown_function, description )}@*
@*
This is first function to call in Python script.@*
All Python scripts for WeeChat should call this function.@*
@@ -1459,11 +1702,11 @@ unloaded (optional parameter, empty string means nothing is called at the end)
@end itemize
@*
@emph{Example:}@*
@code{weechat.register ("sample", "1.0", "sample_end", "Sample script!");}@*
@code{weechat.register ("sample", "1.0", "sample_end", "Sample script!")}@*
@*
@item
@command{weechat.prnt ( message, [channel, [server]] );}@*
@command{weechat.prnt ( message, [channel, [server]] )}@*
@*
Print message in a channel.@*
@@ -1475,13 +1718,13 @@ Print message in a channel.@*
@end itemize
@*
@emph{Examples:}@*
@code{weechat.prnt ("message");}@*
@code{weechat.prnt ("message", "#weechat");}@*
@code{weechat.prnt ("message", "#weechat", "freenode");}@*
@code{weechat.prnt ("message")}@*
@code{weechat.prnt ("message", "#weechat")}@*
@code{weechat.prnt ("message", "#weechat", "freenode")}@*
@*
@item
@command{weechat.print_infobar ( delay, message );}@*
@command{weechat.print_infobar ( delay, message )}@*
@*
Print message in infobar.@*
@@ -1493,11 +1736,11 @@ Print message in infobar.@*
@end itemize
@*
@emph{Example:}@*
@code{weechat.print_infobar (5, "message");}@*
@code{weechat.print_infobar (5, "message")}@*
@*
@item
@command{weechat.add_message_handler ( name, function );}@*
@command{weechat.add_message_handler ( name, function )}@*
@*
Attach a Python function to an IRC message.@*
Function will be called each time IRC message will be received.@*
@@ -1512,18 +1755,16 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@end itemize
@*
@emph{Example:}@*
@code{weechat.add_message_handler ("privmsg", my_function);}@*
@code{sub my_function}@*
@code{@{ }@*
@code{@ @ @ @ weechat.print ("server=$_[0]\n");}@*
@code{@ @ @ @ ($null, $channel, $message) = split ":",$_[1],3;}@*
@code{@ @ @ @ ($hostmask, $null, $channel) = split " ", $channel;}@*
@code{@ @ @ @ weechat.prnt ("host=$hostmask, chan=$channel, msg=$message\n");}@*
@code{@} }@*
@code{weechat.add_message_handler ("privmsg", my_function)}@*
@code{def my_function(server, args):}@*
@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)}@*
@*
@item
@command{weechat.add_command_handler ( name, function );}@*
@command{weechat.add_command_handler ( name, function )}@*
@*
Create new WeeChat command, linked with Python function.@*
Function will be called when user will launch command with @kbd{/name}.@*
@@ -1538,16 +1779,13 @@ available until your Python script will be unloaded.
@end itemize
@*
@emph{Example:}@*
@code{weechat.add_command_handler ("command", my_command);}@*
@code{sub my_command}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt("Server: $_[0], arguments: $_[1]\n");}@*
@code{@ @ @ @ return 0;}@*
@code{@} }@*
@code{weechat.add_command_handler ("command", my_command)}@*
@code{def my_command(server, args):}@*
@code{@ @ @ @ weechat.prnt("server:"+server+" arguments:"+args)}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] );}@*
@command{weechat.command ( command, [channel, [server]] )}@*
@*
Execute a command or send a message to a channel.@*
@@ -1559,14 +1797,14 @@ Execute a command or send a message to a channel.@*
@end itemize
@*
@emph{Examples:}@*
@code{weechat.command ("hello world!");}@*
@code{weechat.command ("/kick toto please leave this chan", "#weechat");}@*
@code{weechat.command ("/nick newnick", "", "freenode");}@*
@code{weechat.command ("hello world!")}@*
@code{weechat.command ("/kick toto please leave this chan", "#weechat")}@*
@code{weechat.command ("/nick newnick", "", "freenode")}@*
@*
@item
@command{weechat.get_info ( name, [server] );}@*
@command{weechat.get_info ( name, [server] )}@*
@*
Get various info about WeeChat, server or user.@*
@@ -1585,8 +1823,8 @@ Get various info about WeeChat, server or user.@*
@end itemize
@*
@emph{Examples:}@*
@code{$version = weechat.get_info("version");}@*
@code{$nick = weechat.get_info("nick", "freenode");}@*
@code{$version = weechat.get_info("version")}@*
@code{$nick = weechat.get_info("nick", "freenode")}@*
@*
@end itemize
@@ -1665,7 +1903,7 @@ Look for WeeChat support page for detail:@*
@node Copyright, , Get support, Authors / Support
@section Copyright
This manual documents WeeChat IRC client, it is part of WeeChat.@*
This manual documents WeeChat IRC client, it is part of WeeChat.@*
Copyright @copyright{} 2005 FlashCode
<@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>@*
+319 -81
View File
@@ -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.2 - 21 de mayo 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}>
@@ -90,9 +89,9 @@ dise@~nado para diferentes sistemas operativos.@*
Las caracter@'isticas principales son las siguientes:
@itemize @minus
@item
conexi@'on multi-servidores
conexi@'on multi-servidores (con SSL, IPv6, proxy)
@item
m@'ultiples interfaces: Curses, Gtk y Qt
m@'ultiples interfaces: Curses, wxWidgets, Gtk y Qt
@item
peque@~no, r@'apido y ligero.
@item
@@ -100,7 +99,7 @@ parametrizable y extensible mediante guiones (scripts)
@item
conforme a las RFCs 1459, 2810, 2811, 2812, y 2813
@item
multi-plataforma (Gnu/Linux, *BSD, Windows y otros sistemas operativos)
multi-plataforma (Gnu/Linux, *BSD, MacOS X, Windows y otros sistemas operativos)
@item
100% GPL, con Licencia Libre
@end itemize
@@ -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,18 +220,25 @@ 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
Display IRC commands list@*
@item -l, --license
Obtener la licencia de WeeChat@*
@item -v, --version
Obtener la versi@'on de WeeChat@*
@item -w, --weechat-commands
Display WeeChat commands list@*
@end table
@subsection Lanzar WeeChat
Para ejecutar WeeChat, basta escribir la l@'inea siguiente:@*
@kbd{weechat-curses} (para el interfaz con Curses)@*
o @kbd{weechat-wxwidgets} (para el interfaz con wxWidgets)@*
o @kbd{weechat-gtk} (para el interfaz con Gtk)@*
o @kbd{weechat-qt} (para el interfaz con Qt)@*
@@ -247,7 +253,6 @@ Puedes editarlo para configurar WeeChat con las opciones deseadas, o tambi@'en p
Enumeraci@'on de las opciones del fichero de configuraci@'on:@*
@table @kbd
@item look_set_title
Define el t@'itulo de la ventana (el terminal para la interfaz Curses) con el nombre y la versi@'on@*
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
@@ -275,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'@*
@@ -310,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@*
@@ -335,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'@*
@@ -362,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'@*
@@ -377,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'@*
@@ -417,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@*
@@ -425,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'@*
@@ -487,10 +540,13 @@ Mensaje por defecto para el estado ausente@*
Typo: cadena (cualquier cadena), valor por defecto: 'away'@*
@item irc_default_msg_part
Mensaje por defecto de salida (saliendo de un canal)@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
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@*
@@ -506,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'@*
@@ -536,12 +595,21 @@ Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
@item proxy_use
Utilizar un proxy para conectarse al servidor irc@*
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
@item proxy_type
Tipo de proxy(http (por defecto), socks4, socks5)@*
Typo: cadena (valores: 'http', 'socks4', 'socks5'), valor por defecto: 'http'@*
@item proxy_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)@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
@item proxy_port
Puerto para conectarse al servidor proxy@*
Typo: entero (valores: entre 0 y 65535), valor por defecto: 1080@*
Typo: entero (valores: entre 0 y 65535), valor por defecto: 3128@*
@item proxy_username
Nombre de usuario para el servidor proxy@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
@item proxy_password
Contrase@~na para el servidor proxy@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
@@ -563,6 +631,12 @@ Typo: cadena (cualquier cadena), valor por defecto: ''@*
@item server_port
Puerto para conectarse al servidor@*
Typo: entero (valores: entre 0 y 65535), valor por defecto: 6667@*
@item server_ipv6
Usar el protocolo IPv6 para la comunicaci@'on del servidor@*
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
@item server_ssl
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@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
@@ -588,12 +662,14 @@ 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
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
Los colores para el interfaz Curses son:@*
@@ -630,7 +706,6 @@ Los colores para el interfaz Curses son:@*
@kbd{white}: blanco
@end itemize
@node Atajos de teclado, Comandos WeeChat, Ficheros de configuracion, Uso
@section Atajos de teclado
@@ -647,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)@*
@*
@@ -665,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)@*
@*
@@ -680,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@*
@*
@@ -715,7 +820,6 @@ Scroll nicklist@*
Comandos internos WeeChat:@*
@table @kbd
@item alias [nombre_alias [comando [argumentos]]
@*
crear un alias para un comando@*
@@ -765,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]
@@ -777,15 +904,26 @@ 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 server [nombre_de_servidor] | [nombre_de_servidor nombre/IP puerto [-auto | -noauto] [-pwd contrase@~na] [-nicks alias1 [alias2 [alias3]]] [-username nombre de usuario] [-realname nombre_real] [-command comando] [-autojoin canal[,canal]] ] | [del nombre_de_servidor]
@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@*
@*
nombre_de_servidor: nombre del servidor, para uso interno y para mostrar@*
nombre/IP: nombre o direcci@'on IP del servidor@*
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@*
@@ -812,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@*
@@ -821,19 +973,29 @@ splith: dividir la ventana actual horizontalmente@*
splitv: dividir la ventana actual verticalmente@*
merge: fusionar una ventana con otra@*
@*
@end table
Comandos IRC:@*
@table @kbd
@item admin [target]
@*
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@*
@@ -848,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]]
@*
@@ -863,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)@*
@*
@@ -879,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)@*
@*
@@ -955,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@*
@*
@@ -1006,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
@*
@@ -1162,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)@*
@*
@@ -1194,7 +1357,83 @@ usuario: nombre de usuario a buscar@*
número: número de respuestas a devolver (búsqueda completa si el número es negativo)@*
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
@@ -1217,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
@*
@@ -1352,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{@} }@*
@*
@@ -1445,7 +1688,7 @@ Listar los programas Python cargados: @kbd{/python}@*
@itemize @bullet
@item
@command{weechat.register ( nombre, versi@'on, funci@'on_final, descripci@'on );}@*
@command{weechat.register ( nombre, versi@'on, funci@'on_final, descripci@'on )}@*
@*
Es la primera funci@'on a la que llamar en el programa Python.@*
Todos los programas en Python para WeeChat deben llamar esta funci@'on.@*
@@ -1461,11 +1704,11 @@ tener un nombre distinto)
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...");}@*
@code{weechat.register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...")}@*
@*
@item
@command{weechat.prnt ( mensaje, [canal, [servidor]] );}@*
@command{weechat.prnt ( mensaje, [canal, [servidor]] )}@*
@*
Escribe un mensaje en un canal.@*
@@ -1477,29 +1720,29 @@ Escribe un mensaje en un canal.@*
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.prnt ("mensaje");}@*
@code{weechat.prnt ("mensaje", "#weechat");}@*
@code{weechat.prnt ("mensaje", "#weechat", "freenode");}@*
@code{weechat.prnt ("mensaje")}@*
@code{weechat.prnt ("mensaje", "#weechat")}@*
@code{weechat.prnt ("mensaje", "#weechat", "freenode")}@*
@*
@item
@command{weechat.print_infobar ( retraso, mensaje );}@*
@command{weechat.print_infobar ( retraso, mensaje )}@*
@*
Escribir un mensaje en la barra de informaciones.@*
@emph{Par@'ametros:}
@itemize @minus
@item @option{plazo}: periodo en segundo durante el cual se mostrar@'a el mensaje
@item @option{retraso}: periodo en segundo durante el cual se mostrar@'a el mensaje
(si es 0, el mensaje no se borrar@'a).
@item @option{message}: mensaje que se escribir@'a en la barra de informaciones.
@item @option{mensaje}: mensaje que se escribir@'a en la barra de informaciones.
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.print_infobar (5, "mensaje");}@*
@code{weechat.print_infobar (5, "mensaje")}@*
@*
@item
@command{weechat.add_message_handler ( nombre, funci@'on );}@*
@command{weechat.add_message_handler ( nombre, funci@'on )}@*
@*
Adjunta una funci@'on Python a un mensaje IRC.@*
Se llamar@'a a la funci@'on cada vez que el mensaje IRC se reciba.@*
@@ -1515,18 +1758,16 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.add_message_handler ("privmsg", mi_funcion);}@*
@code{sub mi_funcion}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt ("serveur=$_[0]\n");}@*
@code{@ @ @ @ ($null, $canal, $mensaje) = split ":",$_[1],3;}@*
@code{@ @ @ @ ($mascara, $null, $canal) = split " ", $canal;}@*
@code{@ @ @ @ weechat.prnt ("mascara=$mascara, canal=$canal, mensaje=$mensaje\n");}@*
@code{@} }@*
@code{weechat.add_message_handler ("privmsg", mi_funcion)}@*
@code{def mi_funcion(servidor, args):}@*
@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("masc="+mascara+", canal="+canal+", msj="+mensaje)}@*
@*
@item
@command{weechat.add_command_handler ( nombre, funci@'on );}@*
@command{weechat.add_command_handler ( nombre, funci@'on )}@*
@*
A@~nadir un nuevo comando WeeChat, con un enlace a una funci@'on en Python.@*
Se llamar@'a a la funci@'on cuando el usuario lance el comando con @kbd{/nombre}.@*
@@ -1541,16 +1782,13 @@ al antiguo comando si el script Python est@'a cargado.
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.add_command_handler ("comando", mi_comando);}@*
@code{sub mi_comando}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt("Servidor: $_[0], Par@'ametros: $_[1]\n");}@*
@code{@ @ @ @ return 0;}@*
@code{@} }@*
@code{weechat.add_command_handler ("comando", mi_comando)}@*
@code{def mi_comando(servidor, args):}@*
@code{@ @ @ @ weechat.prnt("Servidor:"+servidor+" Par@'ametros:"+args)}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] );}@*
@command{weechat.command ( command, [channel, [server]] )}@*
@*
Execute a command or send a message to a channel.@*
@@ -1562,13 +1800,13 @@ Execute a command or send a message to a channel.@*
@end itemize
@*
@emph{Examples:}@*
@code{weechat.command ("hello world!");}@*
@code{weechat.command ("/kick toto please leave this chan", "#weechat");}@*
@code{weechat.command ("/nick newnick", "", "freenode");}@*
@code{weechat.command ("hello world!")}@*
@code{weechat.command ("/kick toto please leave this chan", "#weechat")}@*
@code{weechat.command ("/nick newnick", "", "freenode")}@*
@*
@item
@command{weechat.get_info ( nombre, [servidor] );}@*
@command{weechat.get_info ( nombre, [servidor] )}@*
@*
Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
@@ -1587,8 +1825,8 @@ Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
@end itemize
@*
@emph{Ejemplos:}@*
@code{$version = weechat.get_info("version");}@*
@code{$nick = weechat.get_info("nick", "freenode");}@*
@code{$version = weechat.get_info("version")}@*
@code{$nick = weechat.get_info("nick", "freenode")}@*
@*
@end itemize
@@ -1596,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 *****************************
+411 -169
View File
@@ -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.2 - 21 Mai 2005
@image{weechat_image}
@subtitle Documentation pour WeeChat v0.1.5 - 24 Septembre 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -83,27 +82,27 @@ License version 2 ou plus.
@node Description, Pre-requis, Introduction, Introduction
@section Description
WeeChat (Wee Enhanced Environment for Chat) est un client IRC libre, rapide et l@'eger,
WeeChat (Wee Enhanced Environment for Chat) est un client IRC libre, rapide et l@'eger,
concu pour diff@'erents syst@`emes d'exploitation.@*
@*
Ses principales caract@'eristiques sont les suivantes :
@*
Ses principales caract@'eristiques sont les suivantes :
@itemize @minus
@item
connexion multi-serveurs
@item
plusieurs interfaces : Curses, Gtk et Qt
@item
petit, rapide et l@'eger
@item
param@'etrable et extensible avec des scripts
@item
conforme aux RFCs 1459, 2810, 2811, 2812, et 2813
@item
multi-plateformes (Gnu/Linux, *BSD, Windows et d'autres syst@`emes)
@item
@item
connexion multi-serveurs (avec SSL, IPv6, proxy)
@item
plusieurs interfaces : Curses, wxWidgets, Gtk et Qt
@item
petit, rapide et l@'eger
@item
param@'etrable et extensible avec des scripts
@item
conforme aux RFCs 1459, 2810, 2811, 2812, et 2813
@item
multi-plateformes (Gnu/Linux, *BSD, MacOS X, Windows et d'autres syst@`emes)
@item
100% GPL, logiciel libre
@end itemize
@end itemize
@*
La page d'accueil de WeeChat est ici :@*
@uref{http://weechat.flashtux.org}@*
@@ -115,20 +114,20 @@ Pour installer WeeChat, vous @b{devez} avoir :@*
@itemize @bullet
@item
Un syst@`eme Gnu/Linux (avec le compilateur et les outils associ@'es pour le paquet des sources)
Un syst@`eme Gnu/Linux (avec le compilateur et les outils associ@'es pour le paquet des sources)
@item
Droits "root" (pour installer WeeChat)
@item
Selon l'interface, une des biblioth@`eques suivantes :
@itemize @minus
@item
Curses: la librairie ncurses,
@item
Gtk: *** interface non d@'evelopp@'ee ***,
@item
Qt: *** interface non d@'evelopp@'ee ***,
Selon l'interface, une des biblioth@`eques suivantes :
@itemize @minus
@item
Curses: la librairie ncurses,
@item
Gtk: *** interface non d@'evelopp@'ee ***,
@item
Qt: *** interface non d@'evelopp@'ee ***,
@end itemize
@end itemize
@end itemize
@c ******************************* Installation *******************************
@@ -138,31 +137,31 @@ Qt: *** interface non d@'evelopp@'ee ***,
@menu
* Paquet binaire::
* Paquet source::
* Paquet source::
* Sources CVS::
@end menu
@node Paquet binaire, Paquet source, Installation, Installation
@section Paquet binaire
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}
@item
Mandrake/Redhat (ou toute distribution compatible avec les RPM)@*
Pour installer : @kbd{rpm -i /chemin/weechat-x.y.z-1.i386.rpm}
@item
Gentoo@*
Pour installer : @kbd{emerge weechat}
@item
*BSD (non disponible !)
@item
Slackware (non disponible !)
@item
Windows (non disponible !)
@end itemize
Les paquets binaires sont disponibles pour les distributions suivantes :
@itemize @bullet
@item
Debian (ou toute distribution compatible Debian)@*
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}
@item
Gentoo@*
Pour installer : @kbd{emerge weechat}
@item
*BSD (non disponible !)
@item
Slackware (non disponible !)
@item
Windows (non disponible !)
@end itemize
o@`u x.y.z est la version (par exemple 0.0.1)
@*
@@ -175,28 +174,28 @@ Tapez simplement dans une console ou un terminal :@*
@kbd{make}@*
Note: pour ne construire que certaines interfaces, vous pouvez passer des param@`etres
@`a ./configure, tapez @kbd{./configure --help} pour de l'aide sur ces options.@*
Obtenez les droits root et installez WeeChat :@*
@kbd{su}@*
(entrez le mot de passe de root)@*
@kbd{make install}@*
Obtenez les droits root et installez WeeChat :@*
@kbd{su}@*
(entrez le mot de passe de root)@*
@kbd{make install}@*
@node Sources CVS, , Paquet source, Installation
@section Sources CVS
@section Sources CVS
Attention: les sources CVS sont r@'eserv@'es aux utilisateurs avanc@'es : il se peut
que WeeChat ne compile pas et qu'il soit tr@`s instable.
Vous @^etes pr@'evenus !@*
Pour r@'ecup@'erer les sources CVS, tapez ces commandes :@*
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
@kbd{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat co weechat}@*
(lorsqu'un mot de passe est demand@'e, tapez simplement sur Entr@'ee)@*
que WeeChat ne compile pas et qu'il soit tr@`s instable.
Vous @^etes pr@'evenus !@*
Pour r@'ecup@'erer les sources CVS, tapez ces commandes :@*
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
@kbd{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat co weechat}@*
(lorsqu'un mot de passe est demand@'e, tapez simplement sur Entr@'ee)@*
Ex@'ecutez ce script :@*
@kbd{./autogen.sh}@*
Suivez alors les instructions du paquet sources - @xref{Paquet source}.
Suivez alors les instructions du paquet sources - @xref{Paquet source}.
@c ******************************* Utilisation ********************************
@@ -206,40 +205,47 @@ Suivez alors les instructions du paquet sources - @xref{Paquet source}.
@menu
* Lancer WeeChat::
* Fichier de configuration::
* Raccourcis clavier::
* Fichier de configuration::
* Raccourcis clavier::
* Commandes WeeChat::
* Tube FIFO::
@end menu
@node Lancer WeeChat, Fichier de configuration, Utilisation, Utilisation
@section Lancer WeeChat
@subsection Param@`etres de ligne de commande
@subsection Param@`etres de ligne de commande
@table @code
@item -c, --config
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
Afficher la licence de WeeChat@*
@item -v, --version
@item -v, --version
Afficher la version de WeeChat@*
@end table
@subsection Lancer WeeChat
Tapez simplement cette commande pour lancer WeeChat :@*
@item -w, --weechat-commands
Afficher la liste des commandes WeeChat@*
@end table
@subsection Lancer WeeChat
Tapez simplement cette commande pour lancer WeeChat :@*
@kbd{weechat-curses} (pour l'interface Curses)@*
ou @kbd{weechat-wxwidgets} (pour l'interface wxWidgets)@*
ou @kbd{weechat-gtk} (pour l'interface Gtk)@*
ou @kbd{weechat-qt} (pour l'interface Qt)@*
ou @kbd{weechat-qt} (pour l'interface Qt)@*
Lorsque vous lancez WeeChat pour la premi@`ere fois, un fichier de configuration
par d@'efaut est cr@'e@'e, avec les options par d@'efaut.@*
Le fichier de configuration par d@'efaut est : ~/.weechat/weechat.rc@*
Vous pouvez @'editer ce fichier pour configurer WeeChat @`a votre convenance, ou
par d@'efaut est cr@'e@'e, avec les options par d@'efaut.@*
Le fichier de configuration par d@'efaut est : ~/.weechat/weechat.rc@*
Vous pouvez @'editer ce fichier pour configurer WeeChat @`a votre convenance, ou
vous pouvez modifier les param@`etres dans WeeChat avec la commande @kbd{/set} - @xref{Commandes WeeChat}.
@node Fichier de configuration, Raccourcis clavier, Lancer WeeChat, Utilisation
@@ -248,7 +254,6 @@ vous pouvez modifier les param@`etres dans WeeChat avec la commande @kbd{/set} -
Liste des options du fichier de configuration :@*
@table @kbd
@item look_set_title
D@'efinit le titre de la fen@^etre (terminal pour l'interface Curses) avec le nom et la version@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
@@ -276,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'@*
@@ -311,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@*
@@ -336,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'@*
@@ -363,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'@*
@@ -378,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'@*
@@ -418,7 +441,7 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
Couleur pour le symbole voix@*
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'yellow'@*
@item col_nick_more
Color for '+' when scrolling nicks@*
Couleur pour les '+' lors du scroll sur les pseudos@*
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
@item col_nick_sep
Couleur pour le s@'eparateur de pseudo@*
@@ -426,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'@*
@@ -488,10 +541,13 @@ Message par d@'efaut pour l'absence@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: 'away'@*
@item irc_default_msg_part
Message par d@'efaut pour le part (quitte un canal)@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
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@*
@@ -507,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'@*
@@ -537,12 +596,21 @@ Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
@item proxy_use
Utiliser un proxy pour se connecter au serveur irc@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
@item proxy_type
Type de proxy (http (d@'efaut), socks4, socks5)@*
Type: cha@^ine (valeurs: 'http', 'socks4', 'socks5'), valeur par d@'efaut: 'http'@*
@item proxy_ipv6
Se connecter au proxy en ipv6@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
@item proxy_address
Adresse du serveur proxy (IP ou nom)@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@item proxy_port
Port pour se connecter au serveur proxy@*
Type: entier (valeurs: entre 0 et 65535), valeur par d@'efaut: 1080@*
Type: entier (valeurs: entre 0 et 65535), valeur par d@'efaut: 3128@*
@item proxy_username
Nom d'utilisateur pour le serveur proxy@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@item proxy_password
Mot de passe pour le serveur proxy@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@@ -564,6 +632,12 @@ Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@item server_port
Port pour se connecter au serveur@*
Type: entier (valeurs: entre 0 et 65535), valeur par d@'efaut: 6667@*
@item server_ipv6
Utiliser le protocole IPv6 pour la communication avec le serveur@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
@item server_ssl
Utiliser SSL pour la communication avec le serveur@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
@item server_password
Mot de passe pour le serveur IRC@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@@ -589,12 +663,14 @@ 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@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
@item server_notify_levels
Liste des niveaux de notifications (s@'epar@'es par des virgules) pour les canaux de ce serveur (format: #canal:1,..)@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@end table
Les couleurs pour l'interface Curses sont :@*
@@ -633,11 +709,11 @@ Les couleurs pour l'interface Curses sont :@*
@node Raccourcis clavier, Commandes WeeChat, Fichier de configuration, Utilisation
@section Raccourcis clavier
@table @kbd
@item Fl@`eche gauche / Fl@`eche droite
Aller au caract@`ere pr@'ec@'edent / suivant sur la ligne de commande@*
@*
@*
@item Ctrl + fl@`eche gauche / Ctrl + fl@`eche droite
Aller au mot pr@'ec@'edent / suivant sur la ligne de commande@*
@*
@@ -647,28 +723,40 @@ Aller au d@'ebut de la ligne de commande@*
@item End / Ctrl + E
Aller @`a la fin de la ligne de commande@*
@*
@item Backspace / Delete
Effacer le mot pr@'ec@'edent / suivant sur la ligne de commande@*
@*
@item Ctrl + Backspace / Ctrl + W
@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 Tab
@*
@item Backspace / Delete
Effacer le mot pr@'ec@'edent / suivant sur la ligne de commande@*
@*
@item Tab
Compl@'eter la commande ou le pseudo (@kbd{Tab} @`a nouveau : trouver la compl@'etion suivante)@*
@*
@item Tout caract@`ere
Ins@'erer le caract@`ere @`a la position du curseur sur la ligne de commande@*
@*
@item Entr@'ee
@*
@item Tout caract@`ere
Ins@'erer le caract@`ere @`a la position du curseur sur la ligne de commande@*
@*
@item Entr@'ee
Ex@'ecuter la commande ou envoyer le message@*
@*
@item Fl@`eche haut / Fl@`eche bas
Rappeler les derni@`eres commandes/messages@*
@*
@item PageUp / PageDown
@*
@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@*
@*
@item F5 / F6
@*
@item F5 / F6
Aller au tampon pr@'ec@'edent / suivant@*
@*
@item F7 / F8
@@ -680,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
@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@*
@*
@@ -715,7 +821,6 @@ Faire d@'efiler la liste des pseudos@*
Commandes internes WeeChat :@*
@table @kbd
@item alias [nom_alias [commande [param@`etres]]
@*
cr@'eer un alias pour une commande@*
@@ -765,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]
@@ -777,15 +905,26 @@ 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 server [nom_serveur] | [nom_serveur nom/IP port [-auto | -noauto] [-pwd mot_de_passe] [-nicks pseudo1 [pseudo2 [pseudo3]]] [-username nom_utilisateur] [-realname nom_r@'eel] [-command commande] [-autojoin canal[,canal]] ] | [del nom_serveur]
@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@*
@*
nom_serveur: nom du serveur, pour usage interne et affichage@*
nom/IP: nom ou adresse IP du serveur@*
port: port pour le serveur (nombre entier)@*
ipv6: utiliser le protocole IPv6@*
ssl: utiliser le protocole SSL@*
mot_de_passe: mot de passe pour le serveur@*
pseudo1: premier pseudo pour le serveur@*
pseudo2: pseudo alternatif pour le serveur@*
@@ -812,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@*
@@ -821,19 +974,29 @@ splith: @'eclate la fen@^etre en deux horizontalement@*
splitv: @'eclate la fen@^etre en deux verticalement@*
merge: fusionne la fen@^etre avec une autre@*
@*
@end table
Commandes IRC :@*
@table @kbd
@item admin [cible]
@*
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@*
@@ -848,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]]
@*
@@ -863,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)@*
@*
@@ -879,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)@*
@*
@@ -955,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@*
@*
@@ -1162,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)@*
@*
@@ -1194,7 +1358,83 @@ pseudo: pseudo @`a chercher@*
nombre: nombre de r@'eponses @`a retourner (recherche compl@`ete si nombre n@'egatif)@*
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
@@ -1216,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
@*
@@ -1351,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{@} }@*
@*
@@ -1444,7 +1691,7 @@ Lister les scripts Python charg@'es : @kbd{/python}@*
@itemize @bullet
@item
@command{weechat.register ( nom, version, fonction_de_fin, description );}@*
@command{weechat.register ( nom, version, fonction_de_fin, description )}@*
@*
C'est la premi@`ere fonction @`a appeler dans le script Python.@*
Tout script Python pour WeeChat doit appeler cette fonction.@*
@@ -1461,11 +1708,11 @@ de fonction @`a appeler)
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.register ("essai", "1.0", "fin_essai", "Script d'essai !");}@*
@code{weechat.register ("essai", "1.0", "fin_essai", "Script d'essai !")}@*
@*
@item
@command{weechat.prnt ( message, [canal, [serveur]] );}@*
@command{weechat.prnt ( message, [canal, [serveur]] )}@*
@*
Affiche un message dans un canal.@*
@@ -1477,13 +1724,13 @@ Affiche un message dans un canal.@*
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.prnt ("message");}@*
@code{weechat.prnt ("message", "#weechat");}@*
@code{weechat.prnt ("message", "#weechat", "freenode");}@*
@code{weechat.prnt ("message")}@*
@code{weechat.prnt ("message", "#weechat")}@*
@code{weechat.prnt ("message", "#weechat", "freenode")}@*
@*
@item
@command{weechat.print_infobar ( d@'elai, message );}@*
@command{weechat.print_infobar ( d@'elai, message )}@*
@*
Affiche un message dans la barre d'infos.@*
@@ -1495,11 +1742,11 @@ Affiche un message dans la barre d'infos.@*
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.print_infobar (5, "message");}@*
@code{weechat.print_infobar (5, "message")}@*
@*
@item
@command{weechat.add_message_handler ( nom, fonction );}@*
@command{weechat.add_message_handler ( nom, fonction )}@*
@*
Attache une fonction Python @`a un message IRC particulier.@*
La fonction sera appel@'ee @`a chaque fois que le message IRC sera re@,{c}u.@*
@@ -1515,18 +1762,16 @@ RFC 2812 : @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.add_message_handler ("privmsg", ma_fonction);}@*
@code{sub ma_fonction}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt ("serveur=$_[0]\n");}@*
@code{@ @ @ @ ($null, $canal, $message) = split ":",$_[1],3;}@*
@code{@ @ @ @ ($masque, $null, $canal) = split " ", $canal;}@*
@code{@ @ @ @ weechat.prnt ("masque=$masque, canal=$canal, message=$message\n");}@*
@code{@} }@*
@code{weechat.add_message_handler ("privmsg", ma_fonction)}@*
@code{def ma_fonction(serveur, args):}@*
@code{@ @ @ @ weechat.prnt("serveur="+serveur)}@*
@code{@ @ @ @ null, canal, message = string.split(args, ":", 2)}@*
@code{@ @ @ @ masque, null, canal = string.split(string.strip(canal), " ", 2)}@*
@code{@ @ @ @ weechat.prnt("masque="+masque+", canal="+canal+", message="+message)}@*
@*
@item
@command{weechat.add_command_handler ( nom, fonction );}@*
@command{weechat.add_command_handler ( nom, fonction )}@*
@*
Cr@'e@'e une nouvelle commande WeeChat, associ@'ee @`a une fonction Python.@*
La fonction sera appel@'ee lorsque l'utilisateur lancera la commande par @kbd{/nom}.@*
@@ -1541,16 +1786,13 @@ ne seront plus accessibles tant que le script Python sera charg@'e.
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.add_command_handler ("commande", ma_commande);}@*
@code{sub ma_commande}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt("Serveur: $_[0], param@`etres: $_[1]\n");}@*
@code{@ @ @ @ return 0;}@*
@code{@} }@*
@code{weechat.add_command_handler ("commande", ma_commande)}@*
@code{def ma_commande(serveur, args):}@*
@code{@ @ @ @ weechat.prnt("serveur:"+serveur+" param@`etres:"+args)}@*
@*
@item
@command{weechat.command ( commande, [canal, [serveur]] );}@*
@command{weechat.command ( commande, [canal, [serveur]] )}@*
@*
Ex@'ecute une commande ou envoie un message @'a un canal.@*
@@ -1562,13 +1804,13 @@ Ex@'ecute une commande ou envoie un message @'a un canal.@*
@end itemize
@*
@emph{Exemples :}@*
@code{weechat.command ("bonjour tout le monde !");}@*
@code{weechat.command ("/kick toto merci de quitter ce canal", "#weechat");}@*
@code{weechat.command ("/nick newnick", "", "freenode");}@*
@code{weechat.command ("bonjour tout le monde !")}@*
@code{weechat.command ("/kick toto merci de quitter ce canal", "#weechat")}@*
@code{weechat.command ("/nick newnick", "", "freenode")}@*
@*
@item
@command{weechat.get_info ( nom, [serveur] );}@*
@command{weechat.get_info ( nom, [serveur] )}@*
@*
Obtenir des informations vari@'ees sur WeeChat, le serveur ou l'utilisateur.@*
@@ -1587,8 +1829,8 @@ Obtenir des informations vari@'ees sur WeeChat, le serveur ou l'utilisateur.@*
@end itemize
@*
@emph{Exemples :}@*
@code{$version = weechat.get_info("version");}@*
@code{$nick = weechat.get_info("nick", "freenode");}@*
@code{$version = weechat.get_info("version")}@*
@code{$nick = weechat.get_info("nick", "freenode")}@*
@*
@end itemize
+1164 -51
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
+4
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+1532 -911
View File
File diff suppressed because it is too large Load Diff
+1545 -897
View File
File diff suppressed because it is too large Load Diff
+1576 -987
View File
File diff suppressed because it is too large Load Diff
+609 -103
View File
File diff suppressed because it is too large Load Diff
+5
View File
@@ -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 **);
+267 -73
View File
@@ -47,6 +47,7 @@ completion_init (t_completion *completion)
completion->base_command_arg = 0;
completion->position = -1;
completion->base_word = NULL;
completion->args = NULL;
completion->completion_list = NULL;
completion->last_completion = NULL;
@@ -67,6 +68,10 @@ completion_free (t_completion *completion)
free (completion->base_word);
completion->base_word = NULL;
if (completion->args)
free (completion->args);
completion->args = NULL;
while (completion->completion_list)
weelist_remove (&completion->completion_list,
&completion->last_completion,
@@ -97,19 +102,23 @@ completion_build_list (t_completion *completion, void *channel)
int i, j;
t_irc_server *ptr_server;
t_irc_channel *ptr_channel;
char 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;
char option_string[2048];
/* WeeChat internal commands */
/* no completion for some commands */
if ((strcasecmp (completion->base_command, "server") == 0)
|| (strcasecmp (completion->base_command, "save") == 0))
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)
@@ -120,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,
@@ -137,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,
@@ -145,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)
{
@@ -165,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,
@@ -175,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++)
@@ -193,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,
@@ -211,37 +330,100 @@ completion_build_list (t_completion *completion, void *channel)
"unload");
return;
}
if ((strcasecmp (completion->base_command, "set") == 0)
&& (completion->base_command_arg == 1))
if (ascii_strcasecmp (completion->base_command, "set") == 0)
{
for (i = 0; i < CONFIG_NUMBER_SECTIONS; i++)
if (completion->base_command_arg == 1)
{
if ((i != CONFIG_SECTION_ALIAS) && (i != CONFIG_SECTION_SERVER))
for (i = 0; i < CONFIG_NUMBER_SECTIONS; i++)
{
for (j = 0; weechat_options[i][j].option_name; j++)
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++)
{
weelist_add (&completion->completion_list,
&completion->last_completion,
weechat_options[i][j].option_name);
}
}
}
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
{
snprintf (option_name, sizeof (option_name), "%s.%s",
ptr_server->name,
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
weelist_add (&completion->completion_list,
&completion->last_completion,
weechat_options[i][j].option_name);
option_name);
}
}
}
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
else if (completion->base_command_arg == 3)
{
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
if (completion->args)
{
snprintf (option_name, sizeof (option_name), "%s.%s",
ptr_server->name,
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
weelist_add (&completion->completion_list,
&completion->last_completion,
option_name);
pos = strchr (completion->args, ' ');
if (pos)
pos[0] = '\0';
option = NULL;
option_value = NULL;
config_option_search_option_value (completion->args, &option, &option_value);
if (option && option_value)
{
switch (option->option_type)
{
case OPTION_TYPE_BOOLEAN:
if (option_value && (*((int *)(option_value))))
weelist_add (&completion->completion_list,
&completion->last_completion,
"on");
else
weelist_add (&completion->completion_list,
&completion->last_completion,
"off");
break;
case OPTION_TYPE_INT:
snprintf (option_string, sizeof (option_string) - 1,
"%d", (option_value) ? *((int *)(option_value)) : option->default_int);
weelist_add (&completion->completion_list,
&completion->last_completion,
option_string);
break;
case OPTION_TYPE_INT_WITH_STRING:
weelist_add (&completion->completion_list,
&completion->last_completion,
(option_value) ?
option->array_values[*((int *)(option_value))] :
option->array_values[option->default_int]);
break;
case OPTION_TYPE_COLOR:
weelist_add (&completion->completion_list,
&completion->last_completion,
(option_value) ?
gui_get_color_by_value (*((int *)(option_value))) :
option->default_string);
break;
case OPTION_TYPE_STRING:
weelist_add (&completion->completion_list,
&completion->last_completion,
(option_value) ?
*((char **)(option_value)) :
option->default_string);
break;
}
}
if (pos)
pos[0] = ' ';
}
}
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)
@@ -252,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)
{
@@ -298,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])
@@ -333,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,
@@ -358,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)
@@ -384,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])
@@ -416,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])
@@ -431,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)
{
@@ -439,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);
@@ -471,6 +663,8 @@ completion_find_context (t_completion *completion, void *channel, char *buffer,
command_arg++;
i++;
while ((i < pos) && (buffer[i] == ' ')) i++;
if (!completion->args)
completion->args = strdup (buffer + i);
}
else
i++;
@@ -606,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)
{
@@ -614,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++;
}
@@ -628,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)
@@ -654,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)
{
@@ -662,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++;
}
@@ -676,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)
@@ -710,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)
{
@@ -718,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++;
}
@@ -732,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)
+1
View File
@@ -39,6 +39,7 @@ struct t_completion
char *base_word; /* word to complete (when Tab was pressed) */
int base_word_pos; /* beggining of base word */
int position; /* position where Tab was pressed */
char *args; /* command line args (including base word) */
/* for command argument completion */
t_weelist *completion_list; /* data list for completion */
+3 -19
View File
@@ -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
View File
@@ -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;
}
+5 -1
View File
@@ -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 */
+6 -1
View File
@@ -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 */
+178 -33
View File
@@ -48,6 +48,10 @@
#include <time.h>
#include <signal.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
#endif
#ifdef HAVE_ICONV
#include <iconv.h>
#endif
@@ -70,10 +74,86 @@ int sigsegv = 0; /* SIGSEGV received?
char *weechat_home = NULL; /* WeeChat home dir. (example: /home/toto/.weechat) */
FILE *weechat_log_file = NULL; /* WeeChat log file (~/.weechat/weechat.log) */
char *local_charset = NULL; /* local charset, for example: ISO-8859-1 */
char *local_charset = NULL; /* local charset, for example: ISO-8859-1 */
int server_cmd_line; /* at least one server on WeeChat command line */
int server_cmd_line; /* at least one server on WeeChat command line */
#ifdef HAVE_GNUTLS
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)
@@ -123,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))
@@ -242,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++;
}
}
@@ -305,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
*/
@@ -323,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://", 6) == 0))
else if ((ascii_strncasecmp (argv[i], "irc", 3) == 0))
{
if (server_init_with_url (argv[i], &server_tmp) < 0)
{
@@ -369,9 +503,10 @@ wee_parse_args (int argc, char *argv[])
server_tmp.autoreconnect,
server_tmp.autoreconnect_delay,
1, server_tmp.address, server_tmp.port,
server_tmp.ipv6, server_tmp.ssl,
server_tmp.password, server_tmp.nick1,
server_tmp.nick2, server_tmp.nick3,
NULL, NULL, NULL, 0, server_tmp.autojoin, 1))
NULL, NULL, NULL, 0, server_tmp.autojoin, 1, NULL))
fprintf (stderr, _("%s unable to create server ('%s'), ignored\n"),
WEECHAT_WARNING, argv[i]);
server_destroy (&server_tmp);
@@ -429,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 =
@@ -438,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);
@@ -448,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;
@@ -516,6 +651,13 @@ wee_init_vars ()
/* init received messages queue */
recv_msgq = NULL;
msgq_last_msg = NULL;
/* init gnutls */
#ifdef HAVE_GNUTLS
gnutls_global_init ();
gnutls_certificate_allocate_credentials (&gnutls_xcred);
gnutls_certificate_set_x509_trust_file (gnutls_xcred, "ca.pem", GNUTLS_X509_FMT_PEM);
#endif
}
/*
@@ -599,7 +741,7 @@ wee_gui_shutdown ()
*/
void
wee_shutdown (int return_code)
wee_shutdown (int return_code, int crash)
{
fifo_remove ();
if (weechat_home)
@@ -609,7 +751,16 @@ wee_shutdown (int return_code)
if (local_charset)
free (local_charset);
alias_free_all ();
exit (return_code);
#ifdef HAVE_GNUTLS
gnutls_certificate_free_credentials (gnutls_xcred);
gnutls_global_deinit();
#endif
if (crash)
abort();
else
exit (return_code);
}
/*
@@ -693,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
*/
@@ -725,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);
}
/*
@@ -745,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 */
@@ -783,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) */
}
+15 -3
View File
@@ -28,6 +28,10 @@
#include <stdio.h>
#include <sys/time.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
#endif
#if defined(ENABLE_NLS) && !defined(_)
#include <locale.h>
#ifdef HAVE_LIBINTL_H
@@ -82,12 +86,14 @@
PACKAGE_STRING " (c) Copyright 2003-2005, compiled on " __DATE__ " " __TIME__ \
"\nDeveloped by FlashCode <flashcode@flashtux.org> - " WEECHAT_WEBSITE "\n\n" \
"Usage: %s [options ...]\n" \
" or: %s [irc://[nickname[:password]@]irc.example.org[:port][/channel] ...]\n\n"
" or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/channel][,channel[...]]\n\n"
#define WEE_USAGE2 \
" -c, --config 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"
@@ -108,10 +114,16 @@ extern int quit_weechat;
extern char *weechat_home;
extern char *local_charset;
#ifdef HAVE_GNUTLS
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 */
+388 -58
View File
@@ -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"),
@@ -514,11 +589,15 @@ t_config_option weechat_options_irc[] =
{ "irc_default_msg_part", N_("default part message (leaving channel)"),
N_("default part message (leaving channel)"),
OPTION_TYPE_STRING, 0, 0, 0,
"", NULL, NULL, &cfg_irc_default_msg_part, config_change_noop },
"WeeChat %v", NULL, NULL, &cfg_irc_default_msg_part, config_change_noop },
{ "irc_default_msg_quit", N_("default quit message"),
N_("default quit message ('%v' will be replaced by WeeChat version in string)"),
OPTION_TYPE_STRING, 0, 0, 0,
"WeeChat %v", NULL, NULL, &cfg_irc_default_msg_quit, config_change_noop },
{ "irc_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 }
};
@@ -597,8 +680,13 @@ t_config_option weechat_options_dcc[] =
/* config, proxy section */
int cfg_proxy_use;
int cfg_proxy_type;
int cfg_proxy_ipv6;
char *cfg_proxy_type_values[] =
{ "http", "socks4", "socks5", NULL };
char *cfg_proxy_address;
int cfg_proxy_port;
char *cfg_proxy_username;
char *cfg_proxy_password;
t_config_option weechat_options_proxy[] =
@@ -606,14 +694,26 @@ t_config_option weechat_options_proxy[] =
N_("use a proxy server to connect to irc server"),
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
NULL, NULL, &cfg_proxy_use, NULL, config_change_noop },
{ "proxy_type", N_("proxy type"),
N_("proxy type (http (default), socks4, socks5)"),
OPTION_TYPE_INT_WITH_STRING, 0, 0, 0,
"http", cfg_proxy_type_values, &cfg_proxy_type, NULL, config_change_noop },
{ "proxy_ipv6", N_("use ipv6 proxy"),
N_("connect to proxy in ipv6"),
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
NULL, NULL, &cfg_proxy_ipv6, NULL, config_change_noop },
{ "proxy_address", N_("proxy address"),
N_("proxy server address (IP or hostname)"),
OPTION_TYPE_STRING, 0, 0, 0,
"", NULL, NULL, &cfg_proxy_address, config_change_noop },
{ "proxy_port", N_("port for proxy"),
N_("port for connecting to proxy server"),
OPTION_TYPE_INT, 0, 65535, 1080,
OPTION_TYPE_INT, 0, 65535, 3128,
NULL, NULL, &cfg_proxy_port, NULL, config_change_noop },
{ "proxy_username", N_("proxy username"),
N_("username for proxy server"),
OPTION_TYPE_STRING, 0, 0, 0,
"", NULL, NULL, &cfg_proxy_username, config_change_noop },
{ "proxy_password", N_("proxy password"),
N_("password for proxy server"),
OPTION_TYPE_STRING, 0, 0, 0,
@@ -650,6 +750,14 @@ t_config_option weechat_options_server[] =
N_("port for connecting to server"),
OPTION_TYPE_INT, 0, 65535, 6667,
NULL, NULL, &(cfg_server.port), NULL, NULL },
{ "server_ipv6", N_("use IPv6 protocol for server communication"),
N_("use IPv6 protocol for server communication"),
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
NULL, NULL, &(cfg_server.ipv6), NULL, NULL },
{ "server_ssl", N_("use SSL for server communication"),
N_("use SSL for server communication"),
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
NULL, NULL, &(cfg_server.ssl), NULL, NULL },
{ "server_password", N_("server password"),
N_("password for IRC server"),
OPTION_TYPE_STRING, 0, 0, 0,
@@ -683,13 +791,17 @@ 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"),
N_("automatically rejoin channels when kicked"),
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
NULL, NULL, &(cfg_server.autorejoin), NULL, NULL },
{ "server_notify_levels", N_("notify levels for channels of this server"),
N_("comma separated list of notify levels for channels of this server (format: #channel:1,..)"),
OPTION_TYPE_STRING, 0, 0, 0,
"", NULL, NULL, &(cfg_server.notify_levels), config_change_notify_levels },
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
};
@@ -698,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
};
@@ -715,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++;
}
@@ -734,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++)
{
@@ -797,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);
}
}
}
}
}
/*
@@ -834,6 +981,23 @@ config_change_fifo_pipe ()
}
}
/*
* config_change_notify_levels: called when notify levels is changed for a server
*/
void
config_change_notify_levels ()
{
t_gui_buffer *ptr_buffer;
for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)
{
if (BUFFER_IS_CHANNEL(ptr_buffer) || BUFFER_IS_PRIVATE(ptr_buffer))
ptr_buffer->notify_level =
channel_get_notify_level (SERVER(ptr_buffer), CHANNEL(ptr_buffer));
}
}
/*
* config_option_set_value: set new value for an option
* return: 0 if success
@@ -848,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;
@@ -887,38 +1051,44 @@ 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_password") == 0)
if (ascii_strcasecmp (option_name, "server_ipv6") == 0)
return (void *)(&server->ipv6);
if (ascii_strcasecmp (option_name, "server_ssl") == 0)
return (void *)(&server->ssl);
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 (ascii_strcasecmp (option_name, "server_notify_levels") == 0)
return (void *)(&server->notify_levels);
/* option not found */
return NULL;
}
@@ -947,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;
@@ -959,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;
@@ -988,6 +1158,8 @@ config_set_server_value (t_irc_server *server, char *option_name,
*((char **)ptr_data) = strdup (value);
break;
}
if (ptr_option->handler_change != NULL)
(void) (ptr_option->handler_change());
return 0;
}
@@ -1003,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];
}
}
@@ -1017,6 +1190,72 @@ config_option_search (char *option_name)
return NULL;
}
/*
* config_option_search_option_value: look for type and value of an option
* (including server options)
* if option is not found, NULL is returned
*/
void
config_option_search_option_value (char *option_name, t_config_option **option,
void **option_value)
{
t_config_option *ptr_option;
t_irc_server *ptr_server;
int i;
void *ptr_value;
char *pos;
ptr_option = NULL;
ptr_value = NULL;
ptr_option = config_option_search (option_name);
if (!ptr_option)
{
pos = strchr (option_name, '.');
if (pos)
{
pos[0] = '\0';
ptr_server = server_search (option_name);
if (ptr_server)
{
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
{
if (strcmp (weechat_options[CONFIG_SECTION_SERVER][i].option_name,
pos + 1) == 0)
{
ptr_option = &weechat_options[CONFIG_SECTION_SERVER][i];
ptr_value = config_get_server_option_ptr (ptr_server, pos + 1);
break;
}
}
}
pos[0] = '.';
}
}
else
{
switch (ptr_option->option_type)
{
case OPTION_TYPE_BOOLEAN:
case OPTION_TYPE_INT:
case OPTION_TYPE_INT_WITH_STRING:
case OPTION_TYPE_COLOR:
ptr_value = (void *)(ptr_option->ptr_int);
break;
case OPTION_TYPE_STRING:
ptr_value = (void *)(ptr_option->ptr_string);
break;
}
}
if (ptr_option)
{
*option = ptr_option;
*option_value = ptr_value;
}
}
/*
* config_set_value: set new value for an option (found by name)
* return: 0 if success
@@ -1068,12 +1307,13 @@ config_allocate_server (char *filename, int line_number)
return 0;
}
if (!server_new (cfg_server.name,
cfg_server.autoconnect, cfg_server.autoreconnect,
cfg_server.autoreconnect_delay, 0, cfg_server.address, cfg_server.port,
cfg_server.password, cfg_server.nick1, cfg_server.nick2,
cfg_server.nick3, cfg_server.username, cfg_server.realname,
cfg_server.command, cfg_server.command_delay, cfg_server.autojoin,
cfg_server.autorejoin))
cfg_server.autoconnect, cfg_server.autoreconnect,
cfg_server.autoreconnect_delay, 0, cfg_server.address,
cfg_server.port, cfg_server.ipv6, cfg_server.ssl,
cfg_server.password, cfg_server.nick1, cfg_server.nick2,
cfg_server.nick3, cfg_server.username, cfg_server.realname,
cfg_server.command, cfg_server.command_delay, cfg_server.autojoin,
cfg_server.autorejoin, cfg_server.notify_levels))
{
server_free_all ();
gui_printf (NULL,
@@ -1099,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++)
{
@@ -1254,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;
@@ -1372,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 =
@@ -1399,13 +1671,10 @@ 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);
if (i == CONFIG_SECTION_PROXY)
fprintf (file,
"# WARNING!!! Options for section \"%s\" are not developed!\n",
config_sections[i].section_name);
for (j = 0; weechat_options[i][j].option_name; j++)
{
switch (weechat_options[i][j].option_type)
@@ -1433,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");
@@ -1443,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");
@@ -1471,6 +1760,8 @@ config_create_default ()
fprintf (file, "server_autoreconnect_delay=30\n");
fprintf (file, "server_address=irc.freenode.net\n");
fprintf (file, "server_port=6667\n");
fprintf (file, "server_ipv6=off\n");
fprintf (file, "server_ssl=off\n");
fprintf (file, "server_password=\n");
/* Get the user's name from /etc/passwd */
@@ -1539,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);
@@ -1571,13 +1865,10 @@ 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);
if (i == CONFIG_SECTION_PROXY)
fprintf (file,
"# WARNING!!! Options for section \"%s\" are not developed!\n",
config_sections[i].section_name);
for (j = 0; weechat_options[i][j].option_name; j++)
{
switch (weechat_options[i][j].option_type)
@@ -1622,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;
@@ -1631,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)
@@ -1647,6 +1971,10 @@ config_write (char *config_name)
ptr_server->autoreconnect_delay);
fprintf (file, "server_address=%s\n", ptr_server->address);
fprintf (file, "server_port=%d\n", ptr_server->port);
fprintf (file, "server_ipv6=%s\n",
(ptr_server->ipv6) ? "on" : "off");
fprintf (file, "server_ssl=%s\n",
(ptr_server->ssl) ? "on" : "off");
fprintf (file, "server_password=%s\n",
(ptr_server->password) ? ptr_server->password : "");
fprintf (file, "server_nick1=%s\n", ptr_server->nick1);
@@ -1661,6 +1989,8 @@ config_write (char *config_name)
(ptr_server->autojoin) ? ptr_server->autojoin : "");
fprintf (file, "server_autorejoin=%s\n",
(ptr_server->autorejoin) ? "on" : "off");
fprintf (file, "server_notify_levels=%s\n",
(ptr_server->notify_levels) ? ptr_server->notify_levels : "");
}
}
+21 -3
View File
@@ -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;
@@ -178,8 +189,12 @@ extern int cfg_dcc_auto_rename;
extern int cfg_dcc_auto_resume;
extern int cfg_proxy_use;
extern int cfg_proxy_type;
extern char *cfg_proxy_type_values[];
extern int cfg_proxy_ipv6;
extern char *cfg_proxy_address;
extern int cfg_proxy_port;
extern char *cfg_proxy_username;
extern char *cfg_proxy_password;
extern t_config_section config_sections [CONFIG_NUMBER_SECTIONS];
@@ -191,10 +206,13 @@ 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 ();
extern int config_option_set_value (t_config_option *, char *);
extern t_config_option *config_option_search (char *);
extern void config_option_search_option_value (char *, t_config_option **, void **);
extern int config_set_value (char *, char *);
extern void *config_get_server_option_ptr (t_irc_server *, char *);
extern int config_set_server_value (t_irc_server *, char *, char *);
+2 -2
View File
@@ -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 */
+1
View File
@@ -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
+4 -3
View File
@@ -19,11 +19,12 @@ 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) \
../../plugins/lib_weechat_plugins.a $(PLUGINS_LIBS)
../../plugins/lib_weechat_plugins.a $(PLUGINS_LIBS) \
$(GNUTLS_LIBS)
weechat_curses_SOURCES = gui-display.c \
gui-input.c
gui-input.c
File diff suppressed because it is too large Load Diff
+186 -628
View File
@@ -41,643 +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 (SERVER(gui_current_window->buffer)->buffer !=
gui_current_window->buffer)
{
gui_switch_to_buffer (gui_current_window,
SERVER(gui_current_window->buffer)->buffer);
gui_redraw_buffer (gui_current_window->buffer);
}
break;
/* Alt-X: jump to first channel/private of next server */
case 'x':
case 'X':
ptr_server = SERVER(gui_current_window->buffer)->next_server;
if (!ptr_server)
ptr_server = irc_servers;
while (ptr_server != SERVER(gui_current_window->buffer))
{
if (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++;
}
}
@@ -717,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)
{
@@ -801,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)))
{
+2 -2
View File
@@ -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++;
}
+1130 -108
View File
File diff suppressed because it is too large Load Diff
+563
View File
@@ -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);
}
+147 -57
View File
@@ -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))
@@ -98,6 +102,13 @@
#define gui_printf_nolog(buffer, fmt, argz...) \
gui_printf_type_color(buffer, MSG_TYPE_INFO | MSG_TYPE_NOLOG, -1, fmt, ##argz)
#define NOTIFY_LEVEL_MIN 0
#define NOTIFY_LEVEL_MAX 3
#define NOTIFY_LEVEL_DEFAULT NOTIFY_LEVEL_MAX
#define KEY_SHOW_MODE_DISPLAY 1
#define KEY_SHOW_MODE_BIND 2
typedef struct t_gui_message t_gui_message;
struct t_gui_message
@@ -174,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) */
@@ -189,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 */
@@ -215,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) */
@@ -242,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;
@@ -260,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);
@@ -273,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 *);
@@ -294,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 *);
@@ -326,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 */
+1
View File
@@ -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
+148 -11
View File
@@ -30,6 +30,7 @@
#include "../common/weechat.h"
#include "irc.h"
#include "../gui/gui.h"
char *channel_modes = "iklmnst";
@@ -89,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;
@@ -103,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)
@@ -142,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;
@@ -161,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;
@@ -262,6 +269,136 @@ channel_remove_dcc (t_irc_dcc *ptr_dcc)
}
}
/*
* channel_get_notify_level: get channel notify level
*/
int
channel_get_notify_level (t_irc_server *server, t_irc_channel *channel)
{
char *name, *pos, *pos2, notify;
if ((!server) || (!channel))
return NOTIFY_LEVEL_DEFAULT;
if ((!server->notify_levels) || (!server->notify_levels[0]))
return NOTIFY_LEVEL_DEFAULT;
name = (char *) malloc (strlen (channel->name) + 2);
strcpy (name, channel->name);
strcat (name, ":");
pos = strstr (server->notify_levels, name);
free (name);
if (!pos)
return NOTIFY_LEVEL_DEFAULT;
pos2 = pos + strlen (channel->name);
if (pos2[0] != ':')
return NOTIFY_LEVEL_DEFAULT;
pos2++;
if (!pos2[0])
return NOTIFY_LEVEL_DEFAULT;
notify = (int)(pos2[0] - '0');
if ((notify < NOTIFY_LEVEL_MIN) || (notify > NOTIFY_LEVEL_MAX))
return NOTIFY_LEVEL_DEFAULT;
else
return notify;
}
/*
* server_remove_notify_level: remove channel notify from list
*/
void
channel_remove_notify_level (t_irc_server *server, t_irc_channel *channel)
{
char *name, *pos, *pos2;
if ((!server) || (!channel))
return;
name = (char *) malloc (strlen (channel->name) + 2);
strcpy (name, channel->name);
strcat (name, ":");
pos = strstr (server->notify_levels, name);
free (name);
if (pos)
{
pos2 = pos + strlen (channel->name);
if (pos2[0] == ':')
{
pos2++;
if (pos2[0])
{
pos2++;
if (pos2[0] == ',')
pos2++;
if (!pos2[0] && (pos != server->notify_levels))
pos--;
strcpy (pos, pos2);
server->notify_levels = (char *) realloc (server->notify_levels,
strlen (server->notify_levels) + 1);
}
}
}
}
/*
* server_set_notify_level: set channel notify level
*/
void
channel_set_notify_level (t_irc_server *server, t_irc_channel *channel, int notify)
{
char *name, *pos, *pos2, level_string[2];
if ((!server) || (!channel))
return;
if (notify == NOTIFY_LEVEL_DEFAULT)
{
channel_remove_notify_level (server, channel);
return;
}
if (!server->notify_levels)
{
server->notify_levels = (char *) malloc (strlen (channel->name) + 3);
server->notify_levels[0] = '\0';
}
else
{
name = (char *) malloc (strlen (channel->name) + 2);
strcpy (name, channel->name);
strcat (name, ":");
pos = strstr (server->notify_levels, name);
free (name);
if (pos)
{
pos2 = pos + strlen (channel->name) + 1;
if (pos2[0])
{
pos2[0] = '0' + notify;
return;
}
}
/* realloc notify list to add channel */
server->notify_levels = (char *) realloc (server->notify_levels,
strlen (server->notify_levels) + 1 +
strlen (channel->name) + 2 + 1);
}
/* channel not in notify list => add it */
if (server->notify_levels[0])
strcat (server->notify_levels, ",");
strcat (server->notify_levels, channel->name);
strcat (server->notify_levels, ":");
level_string[0] = notify + '0';
level_string[1] = '\0';
strcat (server->notify_levels, level_string);
}
/*
* channel_print_log: print channel infos in log (usually for crash dump)
*/
+147 -108
View File
@@ -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,20 +96,26 @@ 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"),
2, MAX_ARGS, 1, NULL, irc_cmd_send_kill, NULL },
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]"),
N_("server: this server should answer the query\n"
@@ -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
View File
@@ -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);
}
}
}
+28 -9
View File
@@ -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);
}
}
/*
@@ -66,13 +73,14 @@ irc_display_prefix (t_gui_buffer *buffer, char *prefix)
*/
void
irc_display_nick (t_gui_buffer *buffer, t_irc_nick *nick, int message_type,
int display_around, int color_nick, int no_nickmode)
irc_display_nick (t_gui_buffer *buffer, t_irc_nick *nick, char *nickname,
int message_type, int display_around, int color_nick, int no_nickmode)
{
if (display_around)
gui_printf_type_color (buffer,
message_type, COLOR_WIN_CHAT_DARK, "<");
if (cfg_look_nickmode)
message_type, COLOR_WIN_CHAT_DARK,
(nick) ? "<" : ">");
if (nick && cfg_look_nickmode)
{
if (nick->is_chanowner)
gui_printf_type_color (buffer,
@@ -104,19 +112,20 @@ irc_display_nick (t_gui_buffer *buffer, t_irc_nick *nick, int message_type,
gui_printf_type_color (buffer,
message_type,
COLOR_WIN_CHAT_HIGHLIGHT,
"%s", nick->nick);
"%s", (nick) ? nick->nick : nickname);
else
gui_printf_type_color (buffer,
message_type,
(color_nick) ?
(nick && color_nick) ?
((cfg_look_color_nicks) ?
nick->color : COLOR_WIN_CHAT) :
COLOR_WIN_CHAT,
"%s", nick->nick);
"%s", (nick) ? nick->nick : nickname);
if (display_around)
gui_printf_type_color (buffer,
message_type, COLOR_WIN_CHAT_DARK, "> ");
message_type, COLOR_WIN_CHAT_DARK,
(nick) ? "> " : "< ");
}
/*
@@ -175,6 +184,12 @@ irc_display_server (t_irc_server *server)
gui_printf_color (NULL, COLOR_WIN_CHAT,
" server_port . . . . . . .: %d\n",
server->port);
gui_printf_color (NULL, COLOR_WIN_CHAT,
" server_ipv6 . . . . . . .: %s\n",
(server->ipv6) ? _("yes") : _("no"));
gui_printf_color (NULL, COLOR_WIN_CHAT,
" server_ssl . . . . . . . .: %s\n",
(server->ssl) ? _("yes") : _("no"));
gui_printf_color (NULL, COLOR_WIN_CHAT,
" server_password . . . . .: %s\n",
(server->password && server->password[0]) ?
@@ -202,4 +217,8 @@ irc_display_server (t_irc_server *server)
" server_autojoin . . . . .: %s\n",
(server->autojoin && server->autojoin[0]) ?
server->autojoin : "");
gui_printf_color (NULL, COLOR_WIN_CHAT,
" server_notify_levels . . .: %s\n",
(server->notify_levels && server->notify_levels[0]) ?
server->notify_levels : "");
}
+475
View File
@@ -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
View File
@@ -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;
+2076 -1222
View File
File diff suppressed because it is too large Load Diff
+221 -60
View File
@@ -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
*/
@@ -120,9 +217,9 @@ irc_cmd_send_away (t_irc_server *server, char *arguments)
{
snprintf (buffer, sizeof (buffer),
"is back (gone %.2ld:%.2ld:%.2ld)",
elapsed / 3600,
(elapsed / 60) % 60,
elapsed % 60);
(long int)(elapsed / 3600),
(long int)((elapsed / 60) % 60),
(long int)(elapsed % 60));
irc_send_me_all_channels (ptr_server, buffer);
}
}
@@ -160,9 +257,9 @@ irc_cmd_send_away (t_irc_server *server, char *arguments)
{
snprintf (buffer, sizeof (buffer),
"is back (gone %.2ld:%.2ld:%.2ld)",
elapsed / 3600,
(elapsed / 60) % 60,
elapsed % 60);
(long int)(elapsed / 3600),
(long int)((elapsed / 60) % 60),
(long int)(elapsed % 60));
irc_send_me_all_channels (server, buffer);
}
}
@@ -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;
}
@@ -876,7 +1018,7 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
ptr_nick = nick_search (ptr_channel, server->nick);
if (ptr_nick)
{
irc_display_nick (ptr_channel->buffer, ptr_nick,
irc_display_nick (ptr_channel->buffer, ptr_nick, NULL,
MSG_TYPE_NICK, 1, 1, 0);
gui_printf_type_color (ptr_channel->buffer,
MSG_TYPE_MSG,
@@ -901,7 +1043,7 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
ptr_nick = nick_search (ptr_channel, server->nick);
if (ptr_nick)
{
irc_display_nick (ptr_channel->buffer, ptr_nick,
irc_display_nick (ptr_channel->buffer, ptr_nick, NULL,
MSG_TYPE_NICK, 1, 1, 0);
gui_printf_type_color (ptr_channel->buffer,
MSG_TYPE_MSG,
@@ -1138,7 +1280,7 @@ irc_cmd_send_oper (t_irc_server *server, char *arguments)
int
irc_cmd_send_part (t_irc_server *server, char *arguments)
{
char *channel_name, *pos_args;
char *channel_name, *pos_args, *ptr_arg, *pos, buffer[4096];
t_irc_channel *ptr_channel;
if (arguments)
@@ -1192,16 +1334,28 @@ irc_cmd_send_part (t_irc_server *server, char *arguments)
pos_args = NULL;
}
if (pos_args)
server_sendf (server, "PART %s :%s\r\n", channel_name, pos_args);
else
ptr_arg = (pos_args) ? pos_args :
(cfg_irc_default_msg_part && cfg_irc_default_msg_part[0]) ?
cfg_irc_default_msg_part : NULL;
if (ptr_arg)
{
if (cfg_irc_default_msg_part && cfg_irc_default_msg_part[0])
server_sendf (server, "PART %s :%s\r\n",
channel_name, cfg_irc_default_msg_part);
pos = strstr (ptr_arg, "%v");
if (pos)
{
pos[0] = '\0';
snprintf (buffer, sizeof (buffer), "%s%s%s",
ptr_arg, PACKAGE_VERSION, pos + 2);
pos[0] = '%';
}
else
server_sendf (server, "PART %s\r\n", channel_name);
snprintf (buffer, sizeof (buffer), "%s",
ptr_arg);
server_sendf (server, "PART %s :%s\r\n",
channel_name, buffer);
}
else
server_sendf (server, "PART %s\r\n", channel_name);
return 0;
}
@@ -1678,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
{
+702 -99
View File
File diff suppressed because it is too large Load Diff
+138 -60
View File
@@ -21,9 +21,18 @@
#ifndef __WEECHAT_IRC_H
#define __WEECHAT_IRC_H 1
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
#endif
#include "../gui/gui.h"
/* prefixes for chat window */
@@ -89,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 */
@@ -137,23 +146,31 @@ struct t_irc_server
int command_line; /* server was given on command line */
char *address; /* address of server (IP or name) */
int port; /* port for server (6667 by default) */
int ipv6; /* use IPv6 protocol */
int ssl; /* SSL protocol */
char *password; /* password for server */
char *nick1; /* first nickname for the server */
char *nick2; /* alternate nickname */
char *nick3; /* 2nd alternate nickname */
char *username; /* user name */
char *realname; /* real name */
char *command; /* command to run once connected */
char *command; /* command to run once connected */
int command_delay; /* delay after execution of command */
char *autojoin; /* channels to automatically join */
char *autojoin; /* channels to automatically join */
int autorejoin; /* auto rejoin channels when kicked */
char *notify_levels; /* channels notify levels */
/* internal vars */
pid_t child_pid; /* pid of child process (connecting) */
int child_read; /* to read into child pipe */
int child_write; /* to write into child pipe */
int sock; /* socket for server */
int sock; /* socket for server (IPv4 or IPv6) */
int is_connected; /* 1 if WeeChat is connected to server */
#ifdef HAVE_GNUTLS
int ssl_connected; /* = 1 if connected with SSL */
gnutls_session gnutls_sess; /* gnutls session (only if SSL is used) */
#endif
char *unterminated_message; /* beginning of a message in input buf */
char *nick; /* current nickname */
time_t reconnect_start; /* this time + delay = reconnect time */
@@ -186,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 */
};
@@ -201,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;
@@ -225,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;
@@ -239,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) */
@@ -248,9 +294,9 @@ extern t_irc_server *server_alloc ();
extern void server_destroy (t_irc_server *);
extern void server_free (t_irc_server *);
extern void server_free_all ();
extern t_irc_server *server_new (char *, int, int, int, int, char *, int, char *,
extern t_irc_server *server_new (char *, int, int, int, int, char *, int, int, int,
char *, char *, char *, char *, char *, char *,
int, char *, int);
char *, int, char *, int, char *);
extern int server_send (t_irc_server *, char *, int);
extern void server_sendf (t_irc_server *, char *, ...);
extern void server_recv (t_irc_server *);
@@ -268,6 +314,15 @@ extern void server_check_away ();
extern void server_set_away (t_irc_server *, char *, int);
extern void server_print_log (t_irc_server *);
/* proxy functions (irc-server.c) */
extern void convbase64_8x3_to_6x4(char *from, char* to);
extern void base64encode(char *from, char *to);
extern int pass_httpproxy(int, char*, int);
extern int resolve(char *hostname, char *ip, int *version);
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) */
extern t_irc_channel *channel_new (t_irc_server *, int, char *, int);
@@ -280,10 +335,14 @@ extern void channel_check_away (t_irc_server *, t_irc_channel *);
extern void channel_set_away (t_irc_channel *, char *, int);
extern int channel_create_dcc (t_irc_dcc *);
extern void channel_remove_dcc (t_irc_dcc *);
extern int channel_get_notify_level (t_irc_server *, t_irc_channel *);
extern void channel_remove_notify_level (t_irc_server *, t_irc_channel *);
extern void channel_set_notify_level (t_irc_server *, t_irc_channel *, int);
extern void channel_print_log (t_irc_channel *);
/* nick functions (irc-nick.c) */
extern 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 *);
@@ -301,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 *);
@@ -311,17 +372,20 @@ extern void dcc_end ();
/* IRC display (irc-diplay.c) */
extern void irc_display_prefix (/*@null@*/ t_gui_buffer *, char *);
extern void irc_display_nick (t_gui_buffer *, t_irc_nick *, int, int, int, int);
extern void irc_display_nick (t_gui_buffer *, t_irc_nick *, char *, int, int, int, int);
extern void irc_display_mode (t_gui_buffer *, char *, char, char *, char *,
char *, char *);
extern void irc_display_server (t_irc_server *ptr_server);
/* IRC protocol (irc-commands.c) */
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 *);
@@ -379,56 +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_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 */
+4 -5
View File
@@ -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
+61 -38
View File
@@ -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);
@@ -832,19 +855,19 @@ wee_perl_init ()
" my $content = wee_perl_load_file ($filename);"
" if ($content eq \"__WEECHAT_ERROR__\")"
" {"
" weechat::print \"WeeChat Error: Perl script '$filename' not found.\\n\";"
" weechat::print \"WeeChat Error: Perl script '$filename' not found.\\n\", \"\";"
" return 1;"
" }"
" eval $content;"
" if ($@)"
" {"
" weechat::print \"WeeChat error: unable to load Perl script '$filename':\\n\";"
" weechat::print \"WeeChat error: unable to load Perl script '$filename':\\n\", \"\";"
" weechat::print \"$@\\n\";"
" return 2;"
" }"
" return 0;"
"}"
"$SIG{__WARN__} = sub { weechat::print \"$_[0]\n\"; };"
"$SIG{__WARN__} = sub { weechat::print \"$_[0]\n\", \"\"; };"
};
wee_log_printf (_("Loading %s module \"weechat\"\n"), "Perl");
+92 -44
View File
@@ -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;
@@ -424,9 +457,17 @@ plugin_find_buffer (char *server, char *channel)
}
else
{
ptr_buffer = gui_current_window->buffer;
if (ptr_buffer->dcc)
ptr_buffer = gui_buffers;
if (!channel)
{
ptr_buffer = gui_current_window->buffer;
if (ptr_buffer->dcc)
ptr_buffer = gui_buffers;
}
else
{
if (ptr_server)
ptr_buffer = ptr_server->buffer;
}
}
if (!ptr_buffer)
@@ -445,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 */
}
/*
@@ -481,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
}
+4
View File
@@ -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 *);
+84 -10
View File
@@ -58,7 +58,7 @@ wee_python_register (PyObject *self, PyObject *args)
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("%s error: wrong parameters for \"%s\" function\n"),
"Python", "print_with_channel");
"Python", "register");
return NULL;
}
@@ -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;
@@ -140,7 +140,7 @@ wee_python_print (PyObject *self, PyObject *args)
irc_display_prefix (NULL, PREFIX_ERROR);
gui_printf (NULL,
_("%s error: wrong parameters for \"%s\" function\n"),
"Python", "print");
"Python", "prnt");
return NULL;
}
@@ -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);
@@ -407,6 +456,31 @@ wee_python_init ()
{
wee_log_printf (_("Loading %s module \"weechat\"\n"), "Python");
Py_InitModule ("weechat", weechat_funcs);
if (PyRun_SimpleString (
"import weechat, sys, string\n"
"class weechatStdout:\n"
"\tdef write(self, str):\n"
"\t\tstr = string.strip(str)\n"
"\t\tif str != \"\":\n"
"\t\t\tweechat.prnt(\"Python stdout : \" + str, \"\")\n"
"class weechatStderr:\n"
"\tdef write(self, str):\n"
"\t\tstr = string.strip(str)\n"
"\t\tif str != \"\":\n"
"\t\t\tweechat.prnt(\"Python stderr : \" + str, \"\")\n"
"sys.stdout = weechatStdout()\n"
"sys.stderr = weechatStderr()\n"
) != 0)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL,
_("%s error: error while redirecting stdout and stderr\n"),
"Python");
}
}
}
+23
View File
@@ -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
+607
View File
@@ -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");
}*/
}
+34
View File
@@ -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 */
+11 -5
View File
@@ -1,5 +1,5 @@
%define name weechat
%define version 0.1.2
%define version 0.1.5
%define release 1
Name: %{name}
@@ -10,7 +10,7 @@ Source: http://weechat.flashtux.org/download/%{name}-%{version}.tar.gz
URL: http://weechat.flashtux.org
Group: Networking/IRC
BuildRoot: %{_tmppath}/%{name}-buildroot
Requires: perl, python
Requires: perl, python, libgnutls
License: GPL
%description
@@ -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,13 @@ 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
- Released version 0.1.2
* Sat Mar 20 2005 FlashCode <flashcode@flashtux.org> 0.1.1-1
+556 -546
View File
File diff suppressed because it is too large Load Diff
+27 -9
View File
@@ -1,16 +1,34 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
Developer:
---------
Developers:
----------
* General code
FlashCode <flashcode@flashtux.org>
Web : http://weechat.flashtux.org
IRC : nick is "FlashCode" @ irc.freenode.net
Jabber: flashcode@jabber.org
ICQ : 160677660
AIM : FlashCode AIM
Yahoo : FlashCode_Y
* Python plugin
Kolter <kolter@free.fr>
Web : http://kolter.free.fr
IRC : nick is "kolter" @ irc.freenode.net
Jabber: kolter@jabber.org
Debian packager:
---------------
Julien Louis <ptitlouis@sysif.net>
IRC : nicks are "ptitlouis" or "tioui" @ irc.freenode.net
Jabber: ptitlouis@amessage.info
FlashCode <flashcode@flashtux.org>
Web : http://weechat.flashtux.org
IRC : nick is "FlashCode" @ irc.freenode.net
Jabber: flashcode@jabber.org
ICQ : 160677660
AIM : FlashCode AIM
Yahoo : FlashCode_Y
Testers:
-------
+3 -2
View File
@@ -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) (???)
+71 -1
View File
@@ -1,9 +1,79 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2005-05-21
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)
* completion added for config option (with /set command)
* commands from users outside channel now authorized (if special user or
channel without "n" flag)
* added IPv6 support
* kill command now received and displayed
* added SSL support
* channel notify levels are saved in config file (new option
"server_notify_levels" for server sections)
* part message now accepts %v (replaced by WeeChat version), like quit message
* errors while loading perl scripts are now displayed in server buffer
(instead of current buffer)
* in python scripts, all messages written in stdin and stderr are redirected
in server buffer
* fix a filename error while loading a python script manually
* fixed plugins "print" and "prnt" functions: now ok for writing on server
buffers
* fixed color problem with new libcurses version
* fixed crash when using Alt-S or Alt-X on DCC buffer (Alt-D)
* fixed startup crash when config file (~/.weechat/weechat.rc) is not found
* improved Perl/Python libs detection for ./configure script
Version 0.1.2 (2005-05-21):
* added Python plugin support, improved Perl interface (and now Perl/Python
libraries are checked by configure script)
+13 -7
View File
@@ -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
View File
@@ -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
View File
@@ -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
+12
View File
@@ -1,6 +1,18 @@
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.
* FlashCode, 2005-05-21
WeeChat 0.1.2 released.
+3 -3
View File
@@ -14,7 +14,7 @@ Features
* small, fast and very light
* customizable and extensible with scripts (Perl, Python, Ruby) (2)
* compliant with RFC 1459,2810,2811,2812,2813
* developed from scratch (not based on any other IRC client, except for look ;)
* developed from scratch
* multi-platform (GNU/Linux, *BSD, Windows & other) (3)
* 100% GPL & free
@@ -44,5 +44,5 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
(1) only Curses interface is available today
(2) only Perl interface is available today
(3) only GNU/Linux version is available today
(2) only Perl and Python interfaces are available today
(3) only GNU/Linux and *BSD versions are available today
+10 -28
View File
@@ -1,7 +1,7 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
TODO - 2005-05-21
TODO - 2005-09-24
Legend:
# done
@@ -10,69 +10,51 @@ Legend:
? is this really necessary?
v0.1.2:
v0.1.6:
------
* General:
+ Windows version
+ Solaris version
# *BSD version
# Mac OS X version
* IRC protocol:
- customizable CTCP version reply
* Interface:
# nicklist scroll keys
+ Gtk GUI
+ internationalization (traduce WeeChat in many languages)
* TCP/IP communication:
- SSL support
* 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:
- add key bindings to config file
* Plugins:
# Python plugin
# "/python load" and "/python unload" commands to (un)load Python scripts
- be able to launch more than one command when connecting to server
Future versions:
---------------
* IRC protocol:
- customizable CTCP version reply
- complete "/list" command: add regexp search, display only channels that
match regexp
- "/ignore" and "/unignore" commands: hide all that is write by a given
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:
- "/reload" command: reload the WeeChat's config file
- "/highlight" command: highlight a given word when it appears on
channels/privates
- "/completion" command: do shortcuts (for example when we type "u"
in the text bar it send it to the server as "you")
- "/exec" command: execute a command as if we was in shell
and show us the output on the current window. An option to exec
like -o could send the output to the server, on the current
channel/private
- "/last": command to look for text in previous messages
- 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
* TCP/IP communication:
- proxy support
- IPv6 protocol implementation
* Plugins:
- Ruby plugin
- "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts
+77 -30
View File
@@ -19,10 +19,10 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.56)
AC_INIT(WeeChat, 0.1.2, 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.2])
AM_INIT_AUTOMAKE([weechat], [0.1.5])
# Checks for programs.
AC_PROG_CC
@@ -30,15 +30,12 @@ AC_PROG_MAKE_SET
AC_PROG_RANLIB
# Gettext
ALL_LINGUAS="fr es"
ALL_LINGUAS="fr es cs"
AM_GNU_GETTEXT
# Checks for libraries.
AC_CHECK_LIB([ncurses], [initscr], LIBNCURSES_FOUND=1, LIBNCURSES_FOUND=0)
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG(2.3.4, wxWin=1)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h libintl.h limits.h locale.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/types.h unistd.h pwd.h errno.h])
@@ -69,19 +66,21 @@ 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])
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],,enable_ncurses=yes)
AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (default=no)],enable_wxwidgets=yes,enable_wxwidgets=no)
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=yes,enable_gtk=no)
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=yes,enable_qt=no)
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=yes,enable_perl=no)
AC_ARG_ENABLE(python, [ --enable-python Turn on Python plugins (default=no)],enable_python=yes,enable_python=no)
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0)
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],enable_ncurses=$enableval,enable_ncurses=yes)
AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (default=no)],enable_wxwidgets=$enableval,enable_wxwidgets=no)
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=$enableval,enable_gtk=no)
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=$enableval,enable_qt=no)
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=$enableval,enable_perl=no)
AC_ARG_ENABLE(python, [ --enable-python Turn on Python plugins (default=no)],enable_python=$enableval,enable_python=no)
AC_ARG_ENABLE(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")
@@ -89,7 +88,8 @@ 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
if test "$LIBNCURSES_FOUND" = "0" ; then
@@ -102,6 +102,9 @@ if test "x$enable_ncurses" = "xyes" ; then
fi
if test "x$enable_wxwidgets" = "xyes" ; then
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG(2.3.4, wxWin=1)
if test "$wxWin" != 1; then
AC_MSG_ERROR([
*** wxWindows must be installed on your system
@@ -138,7 +141,7 @@ PLUGINS_LIBS=
if test "x$enable_perl" = "xyes" ; then
enable_plugins="yes"
AC_PATH_PROG(PERL, perl)
AC_PATH_PROG(PERL, perl perl5)
if test -z $PERL ; then
AC_MSG_ERROR([
*** Perl must be installed on your system
@@ -148,19 +151,32 @@ Please check that perl is in path, or install
it with your software package manager.])
fi
AC_MSG_CHECKING(for Perl library)
PERL_LIB=`$PERL -e 'use Config; print "$Config{installprefix}/lib/$Config{libperl}"'`
AC_MSG_CHECKING(for Perl headers files)
if test -r "$PERL_LIB"; then
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/perl/lib_weechat_perl.a `perl -MExtUtils::Embed -e ldopts`"
PERL_HEADER_TEST=`PT=perltest.c ; echo "#include <EXTERN.h>" > $PT; echo "#include <perl.h>" >> $PT; echo "#include <XSUB.h>" >> $PT ; echo "int main() { return 0; }" >> $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ccopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
if test "x$PERL_HEADER_TEST" = "x0" ; then
PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
else
AC_MSG_ERROR([
*** Perl headers couldn't be found in your system.
*** Try to install it with your software package manager.])
fi
AC_MSG_RESULT(found)
AC_MSG_CHECKING(for Perl library)
PERL_LIB_TEST=`PT=perltest.c ; echo "int main() { return 0; }" > $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ldopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
if test "x$PERL_LIB_TEST" = "x0" ; then
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/perl/lib_weechat_perl.a `$PERL -MExtUtils::Embed -e ldopts`"
else
AC_MSG_ERROR([
*** Perl library couldn't be found in your system.
*** Try to install it with your software package manager.])
fi
AC_MSG_RESULT(found)
PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
AC_SUBST(PERL_CFLAGS)
AC_DEFINE(PLUGIN_PERL)
fi
@@ -168,7 +184,7 @@ fi
if test "x$enable_python" = "xyes" ; then
enable_plugins="yes"
AC_PATH_PROG(PYTHON, python)
AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2)
if test -z $PYTHON ; then
AC_MSG_ERROR([
*** Python must be installed on your system
@@ -178,11 +194,13 @@ if test "x$enable_python" = "xyes" ; then
*** it with your software package manager.])
fi
PYTHON_INCLUDE=`$PYTHON -c 'import sys ; print "%s/include/python%s" % (sys.prefix, sys.version[[:3]])'`
PYTHON_SYSPREFIX=`$PYTHON -c 'import sys; print "%s" % sys.prefix'`
PYTHON_VERSION=`$PYTHON -c 'import sys ; print sys.version[[:3]]'`
PYTHON_INCLUDE="$PYTHON_SYSPREFIX/include/python$PYTHON_VERSION"
AC_MSG_CHECKING(for Python header files)
if test -r "$PYTHON_INCLUDE/Python.h"; then
PYTHON_CFLAGS=`$PYTHON -c "import distutils.sysconfig,string; print ' -I' + distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
PYTHON_CFLAGS=-I`$PYTHON -c "import distutils.sysconfig,string; print distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
else
AC_MSG_ERROR([
*** Python header files couldn't be found in your system.
@@ -190,12 +208,11 @@ if test "x$enable_python" = "xyes" ; then
fi
AC_MSG_RESULT(found)
PYTHON_LIB=`$PYTHON -c 'import sys; print "%s/lib/python%s/config" % (sys.prefix, sys.version[[:3]])'`
PYTHON_VERSION=`$PYTHON -c 'import sys ; print sys.version[[0:3]]'`
PYTHON_LIB="$PYTHON_SYSPREFIX/lib/python$PYTHON_VERSION/config"
AC_MSG_CHECKING(for Python library)
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so" -a -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then
PYTHON_LFLAGS=`$PYTHON -c "import distutils.sysconfig,string; print string.join(distutils.sysconfig.get_config_vars('LINKFORSHARED', 'BLDLIBRARY', 'SHLIBS'))"`
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so" -o -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
PYTHON_LFLAGS="-lpython$PYTHON_VERSION -lpthread -lutil"
else
AC_MSG_ERROR([
*** Python library couldn't be found in your system.
@@ -208,12 +225,39 @@ 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
AC_SUBST(PLUGINS_LIBS)
if test "x$enable_gnutls" = "xyes" ; then
found_gnutls="no"
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[
*** libgnutls was not found. You may want to get it from
*** ftp://ftp.gnutls.org/pub/gnutls/
*** WeeChat will be built without GnuTLS support.]]))
if test "x$found_gnutls" = "xyes" ; then
GNUTLS_LIBS="-lgnutls"
AC_SUBST(GNUTLS_LIBS)
AC_DEFINE(HAVE_GNUTLS)
else
enable_gnutls="no"
fi
fi
CFLAGS=`echo $CFLAGS | sed s/-g//g`
if test "x$CFLAGS" = "x" ; then
CFLAGS="-O2"
@@ -233,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
@@ -286,6 +332,7 @@ echo Build with Plugin support..... : $enable_plugins
echo Build with Perl support....... : $enable_perl
echo Build with Python support..... : $enable_python
echo Build with Ruby support....... : $enable_ruby
echo Build with GNUtls support..... : $enable_gnutls
echo
echo Compile with debug info....... : $msg_debug_compiler
echo Print debugging messages...... : $msg_debug_verbose
+41
View File
@@ -1,3 +1,44 @@
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
when config file does not exists (Closes: #310589).
-- Julien Louis <ptitlouis@sysif.net> Tue, 24 May 2005 20:55:02 +0200
weechat (0.1.2-1) unstable; urgency=low
* WeeChat version 0.1.2, see ChangeLog for detail.
+1
View File
@@ -0,0 +1 @@
4
+2 -2
View File
@@ -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.0), libncurses5-dev (>= 5.2.20020112a-7), perl (>= 5.6.0-16), libperl-dev, python2.3 (>= 2.3), 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
View File
@@ -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
+2
View File
@@ -0,0 +1,2 @@
version=2
http://weechat.flashtux.org/download/weechat-(\d.*)\.tar\.bz2
+1 -1
View File
@@ -1 +1 @@
usr/share/locale
debian/tmp/usr/share/locale/
+1 -1
View File
@@ -1 +1 @@
usr/bin/weechat-curses
debian/tmp/usr/bin/weechat-curses
-36
View File
@@ -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
+28
View File
@@ -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 "May 2005" "FlashCode"
.TH WEECHAT 1 "September 2005" "FlashCode"
.SH NAME
weechat-curses \- Wee Enhanced Environment for Chat (Curses version)
@@ -23,10 +23,22 @@ 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
.TP
.B \-i, \-\-irc\-commands
.br
display IRC commands
.TP
.B \-k, \-\-keys
.br
display default keys
.TP
.B \-l, \-\-license
.br
display program license
@@ -34,12 +46,16 @@ display program license
.B \-v, \-\-version
.br
display WeeChat version
.TP
.B \-w, \-\-weechat\-commands
.br
display WeeChat commands
.SH URL
WeeChat can use an URL (Uniform Resource Locator) to automatically connect
to an IRC server. These are in the following form:
.TP
.B irc://[[nickname][:password]@]server[:port][/[#&+!]channel]
.B irc[6][s]://[[nickname][:password]@]server[:port][/[#&+!]channel[,channel...]]
.TP
Exemple to join WeeChat channel support with nick "FlashCode":
irc://FlashCode@irc.freenode.net/weechat
+404 -166
View File
@@ -35,9 +35,7 @@
@title WeeChat - User guide
@subtitle Fast, light and extensible IRC client
@subtitle Documentation for WeeChat v0.1.2 - May, 21 2005
@image{weechat_image}
@subtitle Documentation for WeeChat v0.1.5 - September, 24 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -84,27 +82,27 @@ version 2 or higher.
@node Description, Pre-requisites, Introduction, Introduction
@section Description
WeeChat (Wee Enhanced Environment for Chat) is a free IRC client, fast and light,
designed for many operating systems.@*
WeeChat (Wee Enhanced Environment for Chat) is a free IRC client, fast and light,
designed for many operating systems.@*
@*
Main features are:
Main features are:
@itemize @minus
@item
multi-servers connection
@item
many GUI (Graphical User Interface): Curses, Gtk and Qt
@item
small, fast and light
@item
customizable and extensible with scripts
@item
compliant with RFCs 1459, 2810, 2811, 2812, and 2813
@item
multi-platform (Gnu/Linux, *BSD, Windows and other)
@item
@item
multi-servers connection (with SSL, IPv6, proxy)
@item
many GUI: Curses, wxWidgets, Gtk and Qt
@item
small, fast and light
@item
customizable and extensible with scripts
@item
compliant with RFCs 1459, 2810, 2811, 2812, and 2813
@item
multi-platform (Gnu/Linux, *BSD, MacOS X, Windows and other)
@item
100% GPL, free software
@end itemize
@end itemize
@*
WeeChat homepage is here:@*
@uref{http://weechat.flashtux.org}@*
@@ -116,20 +114,20 @@ In order to install WeeChat, you @b{need}:@*
@itemize @bullet
@item
A running Gnu/Linux system (with compiler tools for source package)
A running Gnu/Linux system (with compiler tools for source package)
@item
"root" privileges (to install WeeChat)
@item
According to GUI, one of the following libraries:
@itemize @minus
@item
Curses: ncurses library,
@item
Gtk: *** GUI not developed ***,
@item
Qt: *** GUI not developed ***,
According to GUI, one of the following libraries:
@itemize @minus
@item
Curses: ncurses library,
@item
Gtk: *** GUI not developed ***,
@item
Qt: *** GUI not developed ***,
@end itemize
@end itemize
@end itemize
@c ******************************* Installation *******************************
@@ -139,31 +137,31 @@ Qt: *** GUI not developed ***,
@menu
* Binary package::
* Source package::
* Source package::
* CVS sources::
@end menu
@node Binary package, Source package, Installation, Installation
@section Binary package
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}
@item
Mandrake/Redhat (or any RPM compatible distribution)@*
To install: @kbd{rpm -i /path/weechat-x.y.z-1.i386.rpm}
@item
Gentoo@*
To install: @kbd{emerge weechat}
@item
*BSD (not available!)
@item
Slackware (not available!)
@item
Windows (not available!)
@end itemize
Binary packages are available for these distributions:
@itemize @bullet
@item
Debian (or any Debian compatible distribution)@*
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}
@item
Gentoo@*
To install: @kbd{emerge weechat}
@item
*BSD (not available!)
@item
Slackware (not available!)
@item
Windows (not available!)
@end itemize
where x.y.z is the version (for example 0.0.1)
@*
@@ -176,27 +174,27 @@ All you have to do is to run in a console or a terminal:@*
@kbd{make}@*
Nota: to build only some interfaces, you can give parameters
to ./configure, type @kbd{./configure --help} for help about options.@*
Then get root privileges and install WeeChat:@*
@kbd{su}@*
(enter root password)@*
@kbd{make install}@*
Then get root privileges and install WeeChat:@*
@kbd{su}@*
(enter root password)@*
@kbd{make install}@*
@node CVS sources, , Source package, Installation
@section CVS sources
Warning: CVS sources are for advanced users: it may not compile or not be stable.
You're warned!@*
To get CVS sources, issue these commands:@*
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
@kbd{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat co weechat}@*
(when prompted for a password, just press Enter key)@*
Warning: CVS sources are for advanced users: it may not compile or not be stable.
You're warned!@*
To get CVS sources, issue these commands:@*
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
@kbd{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat co weechat}@*
(when prompted for a password, just press Enter key)@*
Execute this script:@*
@kbd{./autogen.sh}@*
Then follow instructions for source package - @xref{Source package}.
Then follow instructions for source package - @xref{Source package}.
@c ********************************** Usage ***********************************
@@ -206,40 +204,47 @@ Then follow instructions for source package - @xref{Source package}.
@menu
* Run WeeChat::
* Config file::
* Key bindings::
* Config file::
* Key bindings::
* WeeChat commands::
* FIFO pipe::
@end menu
@node Run WeeChat, Config file, Usage, Usage
@section Run WeeChat
@subsection Command line parameters
@subsection Command line parameters
@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
Display IRC commands list@*
@item -l, --license
Display WeeChat license@*
@item -v, --version
@item -v, --version
Display WeeChat version@*
@end table
@subsection Run WeeChat
Just issue this command to run WeeChat:@*
@item -w, --weechat-commands
Display WeeChat commands list@*
@end table
@subsection Run WeeChat
Just issue this command to run WeeChat:@*
@kbd{weechat-curses} (for Curses front-end)@*
or @kbd{weechat-wxwidgets} (for wxWidgets front-end)@*
or @kbd{weechat-gtk} (for Gtk front-end)@*
or @kbd{weechat-qt} (for Qt front-end)@*
When you run WeeChat for the first time, a default configuration file is
created, with default options.@*
The default configuration file is: ~/.weechat/weechat.rc@*
You can edit this file at your convenience to configure WeeChat, or you can
or @kbd{weechat-qt} (for Qt front-end)@*
When you run WeeChat for the first time, a default configuration file is
created, with default options.@*
The default configuration file is: ~/.weechat/weechat.rc@*
You can edit this file at your convenience to configure WeeChat, or you can
set parameters with @kbd{/set} command in WeeChat - @xref{WeeChat commands}.
@node Config file, Key bindings, Run WeeChat, Usage
@@ -248,7 +253,6 @@ set parameters with @kbd{/set} command in WeeChat - @xref{WeeChat commands}.
List of options for config file:@*
@table @kbd
@item look_set_title
Set title for window (terminal for Curses GUI) with name & version@*
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
@@ -276,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'@*
@@ -311,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@*
@@ -336,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'@*
@@ -363,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'@*
@@ -378,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'@*
@@ -426,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'@*
@@ -488,10 +540,13 @@ Default message when away@*
Type: string (any string), default value: 'away'@*
@item irc_default_msg_part
Default part message (leaving channel)@*
Type: string (any string), default value: ''@*
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@*
@@ -507,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'@*
@@ -537,12 +595,21 @@ Type: boolean (values: 'on' or 'off'), default value: 'on'@*
@item proxy_use
Use a proxy server to connect to irc server@*
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
@item proxy_type
Proxy type (http (default), socks4, socks5)@*
Type: string (values: 'http', 'socks4', 'socks5'), default value: 'http'@*
@item proxy_ipv6
Connect to proxy in ipv6@*
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
@item proxy_address
Proxy server address (IP or hostname)@*
Type: string (any string), default value: ''@*
@item proxy_port
Port for connecting to proxy server@*
Type: integer (values: between 0 and 65535), default value: 1080@*
Type: integer (values: between 0 and 65535), default value: 3128@*
@item proxy_username
Username for proxy server@*
Type: string (any string), default value: ''@*
@item proxy_password
Password for proxy server@*
Type: string (any string), default value: ''@*
@@ -564,6 +631,12 @@ Type: string (any string), default value: ''@*
@item server_port
Port for connecting to server@*
Type: integer (values: between 0 and 65535), default value: 6667@*
@item server_ipv6
Use IPv6 protocol for server communication@*
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
@item server_ssl
Use SSL for server communication@*
Type: boolean (values: 'on' or 'off'), default value: 'off'@*
@item server_password
Password for IRC server@*
Type: string (any string), default value: ''@*
@@ -589,12 +662,14 @@ 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@*
Type: boolean (values: 'on' or 'off'), default value: 'on'@*
@item server_notify_levels
Comma separated list of notify levels for channels of this server (format: #channel:1,..)@*
Type: string (any string), default value: ''@*
@end table
Colors for Curses GUI are:@*
@@ -633,11 +708,11 @@ Colors for Curses GUI are:@*
@node Key bindings, WeeChat commands, Config file, Usage
@section Key bindings
@table @kbd
@item Left arrow / Right arrow
Go to previous / next char in command line@*
@*
@*
@item Ctrl + left arrow / Ctrl + right arrow
Go to previous / next word in command line@*
@*
@@ -647,28 +722,40 @@ Go to the beginning of command line@*
@item End / Ctrl + E
Go to the end of command line@*
@*
@item Backspace / Delete
Erase previous / next char of command line@*
@*
@item Ctrl + Backspace / Ctrl + W
@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 Tab
@*
@item Backspace / Delete
Erase previous / next char of command line@*
@*
@item Tab
Complete command or nick (@kbd{Tab} again: find next completion)@*
@*
@item Any char
Insert char to cursor position in the command line@*
@*
@item Enter
@*
@item Any char
Insert char to cursor position in the command line@*
@*
@item Enter
Execute command or send message@*
@*
@item Up arrow / Down arrow
Call again last commands/messages@*
@*
@item PageUp / PageDown
@*
@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@*
@*
@item F5 / F6
@item F5 / F6
Switch to previous / next buffer@*
@*
@item F7 / F8
@@ -680,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
@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@*
@*
@@ -715,7 +820,6 @@ Scroll nicklist@*
WeeChat internal commands:@*
@table @kbd
@item alias [alias_name [command [arguments]]
@*
create an alias for a command@*
@@ -765,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]
@@ -777,15 +904,26 @@ 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 server [servername] | [servername hostname port [-auto | -noauto] [-pwd password] [-nicks nick1 [nick2 [nick3]]] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [del servername]
@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@*
@*
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@*
@@ -812,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@*
@@ -821,19 +973,29 @@ splith: split current window horizontally@*
splitv: split current window vertically@*
merge: merge window with another@*
@*
@end table
IRC commands:@*
@table @kbd
@item admin [target]
@*
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@*
@@ -848,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]]
@*
@@ -863,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)@*
@*
@@ -879,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)@*
@*
@@ -955,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@*
@*
@@ -1162,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)@*
@*
@@ -1194,7 +1357,83 @@ nickname: nickname to search@*
count: number of replies to return (full search if negative number)@*
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
@@ -1215,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
@*
@@ -1443,7 +1686,7 @@ List all Python scripts: @kbd{/python}@*
@itemize @bullet
@item
@command{weechat.register ( name, version, shutdown_function, description );}@*
@command{weechat.register ( name, version, shutdown_function, description )}@*
@*
This is first function to call in Python script.@*
All Python scripts for WeeChat should call this function.@*
@@ -1459,11 +1702,11 @@ unloaded (optional parameter, empty string means nothing is called at the end)
@end itemize
@*
@emph{Example:}@*
@code{weechat.register ("sample", "1.0", "sample_end", "Sample script!");}@*
@code{weechat.register ("sample", "1.0", "sample_end", "Sample script!")}@*
@*
@item
@command{weechat.prnt ( message, [channel, [server]] );}@*
@command{weechat.prnt ( message, [channel, [server]] )}@*
@*
Print message in a channel.@*
@@ -1475,13 +1718,13 @@ Print message in a channel.@*
@end itemize
@*
@emph{Examples:}@*
@code{weechat.prnt ("message");}@*
@code{weechat.prnt ("message", "#weechat");}@*
@code{weechat.prnt ("message", "#weechat", "freenode");}@*
@code{weechat.prnt ("message")}@*
@code{weechat.prnt ("message", "#weechat")}@*
@code{weechat.prnt ("message", "#weechat", "freenode")}@*
@*
@item
@command{weechat.print_infobar ( delay, message );}@*
@command{weechat.print_infobar ( delay, message )}@*
@*
Print message in infobar.@*
@@ -1493,11 +1736,11 @@ Print message in infobar.@*
@end itemize
@*
@emph{Example:}@*
@code{weechat.print_infobar (5, "message");}@*
@code{weechat.print_infobar (5, "message")}@*
@*
@item
@command{weechat.add_message_handler ( name, function );}@*
@command{weechat.add_message_handler ( name, function )}@*
@*
Attach a Python function to an IRC message.@*
Function will be called each time IRC message will be received.@*
@@ -1512,18 +1755,16 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@end itemize
@*
@emph{Example:}@*
@code{weechat.add_message_handler ("privmsg", my_function);}@*
@code{sub my_function}@*
@code{@{ }@*
@code{@ @ @ @ weechat.print ("server=$_[0]\n");}@*
@code{@ @ @ @ ($null, $channel, $message) = split ":",$_[1],3;}@*
@code{@ @ @ @ ($hostmask, $null, $channel) = split " ", $channel;}@*
@code{@ @ @ @ weechat.prnt ("host=$hostmask, chan=$channel, msg=$message\n");}@*
@code{@} }@*
@code{weechat.add_message_handler ("privmsg", my_function)}@*
@code{def my_function(server, args):}@*
@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)}@*
@*
@item
@command{weechat.add_command_handler ( name, function );}@*
@command{weechat.add_command_handler ( name, function )}@*
@*
Create new WeeChat command, linked with Python function.@*
Function will be called when user will launch command with @kbd{/name}.@*
@@ -1538,16 +1779,13 @@ available until your Python script will be unloaded.
@end itemize
@*
@emph{Example:}@*
@code{weechat.add_command_handler ("command", my_command);}@*
@code{sub my_command}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt("Server: $_[0], arguments: $_[1]\n");}@*
@code{@ @ @ @ return 0;}@*
@code{@} }@*
@code{weechat.add_command_handler ("command", my_command)}@*
@code{def my_command(server, args):}@*
@code{@ @ @ @ weechat.prnt("server:"+server+" arguments:"+args)}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] );}@*
@command{weechat.command ( command, [channel, [server]] )}@*
@*
Execute a command or send a message to a channel.@*
@@ -1559,14 +1797,14 @@ Execute a command or send a message to a channel.@*
@end itemize
@*
@emph{Examples:}@*
@code{weechat.command ("hello world!");}@*
@code{weechat.command ("/kick toto please leave this chan", "#weechat");}@*
@code{weechat.command ("/nick newnick", "", "freenode");}@*
@code{weechat.command ("hello world!")}@*
@code{weechat.command ("/kick toto please leave this chan", "#weechat")}@*
@code{weechat.command ("/nick newnick", "", "freenode")}@*
@*
@item
@command{weechat.get_info ( name, [server] );}@*
@command{weechat.get_info ( name, [server] )}@*
@*
Get various info about WeeChat, server or user.@*
@@ -1585,8 +1823,8 @@ Get various info about WeeChat, server or user.@*
@end itemize
@*
@emph{Examples:}@*
@code{$version = weechat.get_info("version");}@*
@code{$nick = weechat.get_info("nick", "freenode");}@*
@code{$version = weechat.get_info("version")}@*
@code{$nick = weechat.get_info("nick", "freenode")}@*
@*
@end itemize
@@ -1665,7 +1903,7 @@ Look for WeeChat support page for detail:@*
@node Copyright, , Get support, Authors / Support
@section Copyright
This manual documents WeeChat IRC client, it is part of WeeChat.@*
This manual documents WeeChat IRC client, it is part of WeeChat.@*
Copyright @copyright{} 2005 FlashCode
<@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>@*
+319 -81
View File
@@ -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.2 - 21 de mayo 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}>
@@ -90,9 +89,9 @@ dise@~nado para diferentes sistemas operativos.@*
Las caracter@'isticas principales son las siguientes:
@itemize @minus
@item
conexi@'on multi-servidores
conexi@'on multi-servidores (con SSL, IPv6, proxy)
@item
m@'ultiples interfaces: Curses, Gtk y Qt
m@'ultiples interfaces: Curses, wxWidgets, Gtk y Qt
@item
peque@~no, r@'apido y ligero.
@item
@@ -100,7 +99,7 @@ parametrizable y extensible mediante guiones (scripts)
@item
conforme a las RFCs 1459, 2810, 2811, 2812, y 2813
@item
multi-plataforma (Gnu/Linux, *BSD, Windows y otros sistemas operativos)
multi-plataforma (Gnu/Linux, *BSD, MacOS X, Windows y otros sistemas operativos)
@item
100% GPL, con Licencia Libre
@end itemize
@@ -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,18 +220,25 @@ 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
Display IRC commands list@*
@item -l, --license
Obtener la licencia de WeeChat@*
@item -v, --version
Obtener la versi@'on de WeeChat@*
@item -w, --weechat-commands
Display WeeChat commands list@*
@end table
@subsection Lanzar WeeChat
Para ejecutar WeeChat, basta escribir la l@'inea siguiente:@*
@kbd{weechat-curses} (para el interfaz con Curses)@*
o @kbd{weechat-wxwidgets} (para el interfaz con wxWidgets)@*
o @kbd{weechat-gtk} (para el interfaz con Gtk)@*
o @kbd{weechat-qt} (para el interfaz con Qt)@*
@@ -247,7 +253,6 @@ Puedes editarlo para configurar WeeChat con las opciones deseadas, o tambi@'en p
Enumeraci@'on de las opciones del fichero de configuraci@'on:@*
@table @kbd
@item look_set_title
Define el t@'itulo de la ventana (el terminal para la interfaz Curses) con el nombre y la versi@'on@*
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
@@ -275,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'@*
@@ -310,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@*
@@ -335,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'@*
@@ -362,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'@*
@@ -377,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'@*
@@ -417,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@*
@@ -425,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'@*
@@ -487,10 +540,13 @@ Mensaje por defecto para el estado ausente@*
Typo: cadena (cualquier cadena), valor por defecto: 'away'@*
@item irc_default_msg_part
Mensaje por defecto de salida (saliendo de un canal)@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
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@*
@@ -506,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'@*
@@ -536,12 +595,21 @@ Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@*
@item proxy_use
Utilizar un proxy para conectarse al servidor irc@*
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
@item proxy_type
Tipo de proxy(http (por defecto), socks4, socks5)@*
Typo: cadena (valores: 'http', 'socks4', 'socks5'), valor por defecto: 'http'@*
@item proxy_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)@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
@item proxy_port
Puerto para conectarse al servidor proxy@*
Typo: entero (valores: entre 0 y 65535), valor por defecto: 1080@*
Typo: entero (valores: entre 0 y 65535), valor por defecto: 3128@*
@item proxy_username
Nombre de usuario para el servidor proxy@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
@item proxy_password
Contrase@~na para el servidor proxy@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
@@ -563,6 +631,12 @@ Typo: cadena (cualquier cadena), valor por defecto: ''@*
@item server_port
Puerto para conectarse al servidor@*
Typo: entero (valores: entre 0 y 65535), valor por defecto: 6667@*
@item server_ipv6
Usar el protocolo IPv6 para la comunicaci@'on del servidor@*
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@*
@item server_ssl
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@*
Typo: cadena (cualquier cadena), valor por defecto: ''@*
@@ -588,12 +662,14 @@ 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
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
Los colores para el interfaz Curses son:@*
@@ -630,7 +706,6 @@ Los colores para el interfaz Curses son:@*
@kbd{white}: blanco
@end itemize
@node Atajos de teclado, Comandos WeeChat, Ficheros de configuracion, Uso
@section Atajos de teclado
@@ -647,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)@*
@*
@@ -665,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)@*
@*
@@ -680,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@*
@*
@@ -715,7 +820,6 @@ Scroll nicklist@*
Comandos internos WeeChat:@*
@table @kbd
@item alias [nombre_alias [comando [argumentos]]
@*
crear un alias para un comando@*
@@ -765,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]
@@ -777,15 +904,26 @@ 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 server [nombre_de_servidor] | [nombre_de_servidor nombre/IP puerto [-auto | -noauto] [-pwd contrase@~na] [-nicks alias1 [alias2 [alias3]]] [-username nombre de usuario] [-realname nombre_real] [-command comando] [-autojoin canal[,canal]] ] | [del nombre_de_servidor]
@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@*
@*
nombre_de_servidor: nombre del servidor, para uso interno y para mostrar@*
nombre/IP: nombre o direcci@'on IP del servidor@*
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@*
@@ -812,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@*
@@ -821,19 +973,29 @@ splith: dividir la ventana actual horizontalmente@*
splitv: dividir la ventana actual verticalmente@*
merge: fusionar una ventana con otra@*
@*
@end table
Comandos IRC:@*
@table @kbd
@item admin [target]
@*
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@*
@@ -848,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]]
@*
@@ -863,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)@*
@*
@@ -879,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)@*
@*
@@ -955,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@*
@*
@@ -1006,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
@*
@@ -1162,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)@*
@*
@@ -1194,7 +1357,83 @@ usuario: nombre de usuario a buscar@*
número: número de respuestas a devolver (búsqueda completa si el número es negativo)@*
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
@@ -1217,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
@*
@@ -1352,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{@} }@*
@*
@@ -1445,7 +1688,7 @@ Listar los programas Python cargados: @kbd{/python}@*
@itemize @bullet
@item
@command{weechat.register ( nombre, versi@'on, funci@'on_final, descripci@'on );}@*
@command{weechat.register ( nombre, versi@'on, funci@'on_final, descripci@'on )}@*
@*
Es la primera funci@'on a la que llamar en el programa Python.@*
Todos los programas en Python para WeeChat deben llamar esta funci@'on.@*
@@ -1461,11 +1704,11 @@ tener un nombre distinto)
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...");}@*
@code{weechat.register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...")}@*
@*
@item
@command{weechat.prnt ( mensaje, [canal, [servidor]] );}@*
@command{weechat.prnt ( mensaje, [canal, [servidor]] )}@*
@*
Escribe un mensaje en un canal.@*
@@ -1477,29 +1720,29 @@ Escribe un mensaje en un canal.@*
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.prnt ("mensaje");}@*
@code{weechat.prnt ("mensaje", "#weechat");}@*
@code{weechat.prnt ("mensaje", "#weechat", "freenode");}@*
@code{weechat.prnt ("mensaje")}@*
@code{weechat.prnt ("mensaje", "#weechat")}@*
@code{weechat.prnt ("mensaje", "#weechat", "freenode")}@*
@*
@item
@command{weechat.print_infobar ( retraso, mensaje );}@*
@command{weechat.print_infobar ( retraso, mensaje )}@*
@*
Escribir un mensaje en la barra de informaciones.@*
@emph{Par@'ametros:}
@itemize @minus
@item @option{plazo}: periodo en segundo durante el cual se mostrar@'a el mensaje
@item @option{retraso}: periodo en segundo durante el cual se mostrar@'a el mensaje
(si es 0, el mensaje no se borrar@'a).
@item @option{message}: mensaje que se escribir@'a en la barra de informaciones.
@item @option{mensaje}: mensaje que se escribir@'a en la barra de informaciones.
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.print_infobar (5, "mensaje");}@*
@code{weechat.print_infobar (5, "mensaje")}@*
@*
@item
@command{weechat.add_message_handler ( nombre, funci@'on );}@*
@command{weechat.add_message_handler ( nombre, funci@'on )}@*
@*
Adjunta una funci@'on Python a un mensaje IRC.@*
Se llamar@'a a la funci@'on cada vez que el mensaje IRC se reciba.@*
@@ -1515,18 +1758,16 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.add_message_handler ("privmsg", mi_funcion);}@*
@code{sub mi_funcion}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt ("serveur=$_[0]\n");}@*
@code{@ @ @ @ ($null, $canal, $mensaje) = split ":",$_[1],3;}@*
@code{@ @ @ @ ($mascara, $null, $canal) = split " ", $canal;}@*
@code{@ @ @ @ weechat.prnt ("mascara=$mascara, canal=$canal, mensaje=$mensaje\n");}@*
@code{@} }@*
@code{weechat.add_message_handler ("privmsg", mi_funcion)}@*
@code{def mi_funcion(servidor, args):}@*
@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("masc="+mascara+", canal="+canal+", msj="+mensaje)}@*
@*
@item
@command{weechat.add_command_handler ( nombre, funci@'on );}@*
@command{weechat.add_command_handler ( nombre, funci@'on )}@*
@*
A@~nadir un nuevo comando WeeChat, con un enlace a una funci@'on en Python.@*
Se llamar@'a a la funci@'on cuando el usuario lance el comando con @kbd{/nombre}.@*
@@ -1541,16 +1782,13 @@ al antiguo comando si el script Python est@'a cargado.
@end itemize
@*
@emph{Ejemplo:}@*
@code{weechat.add_command_handler ("comando", mi_comando);}@*
@code{sub mi_comando}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt("Servidor: $_[0], Par@'ametros: $_[1]\n");}@*
@code{@ @ @ @ return 0;}@*
@code{@} }@*
@code{weechat.add_command_handler ("comando", mi_comando)}@*
@code{def mi_comando(servidor, args):}@*
@code{@ @ @ @ weechat.prnt("Servidor:"+servidor+" Par@'ametros:"+args)}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] );}@*
@command{weechat.command ( command, [channel, [server]] )}@*
@*
Execute a command or send a message to a channel.@*
@@ -1562,13 +1800,13 @@ Execute a command or send a message to a channel.@*
@end itemize
@*
@emph{Examples:}@*
@code{weechat.command ("hello world!");}@*
@code{weechat.command ("/kick toto please leave this chan", "#weechat");}@*
@code{weechat.command ("/nick newnick", "", "freenode");}@*
@code{weechat.command ("hello world!")}@*
@code{weechat.command ("/kick toto please leave this chan", "#weechat")}@*
@code{weechat.command ("/nick newnick", "", "freenode")}@*
@*
@item
@command{weechat.get_info ( nombre, [servidor] );}@*
@command{weechat.get_info ( nombre, [servidor] )}@*
@*
Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
@@ -1587,8 +1825,8 @@ Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
@end itemize
@*
@emph{Ejemplos:}@*
@code{$version = weechat.get_info("version");}@*
@code{$nick = weechat.get_info("nick", "freenode");}@*
@code{$version = weechat.get_info("version")}@*
@code{$nick = weechat.get_info("nick", "freenode")}@*
@*
@end itemize
@@ -1596,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 *****************************
+411 -169
View File
@@ -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.2 - 21 Mai 2005
@image{weechat_image}
@subtitle Documentation pour WeeChat v0.1.5 - 24 Septembre 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -83,27 +82,27 @@ License version 2 ou plus.
@node Description, Pre-requis, Introduction, Introduction
@section Description
WeeChat (Wee Enhanced Environment for Chat) est un client IRC libre, rapide et l@'eger,
WeeChat (Wee Enhanced Environment for Chat) est un client IRC libre, rapide et l@'eger,
concu pour diff@'erents syst@`emes d'exploitation.@*
@*
Ses principales caract@'eristiques sont les suivantes :
@*
Ses principales caract@'eristiques sont les suivantes :
@itemize @minus
@item
connexion multi-serveurs
@item
plusieurs interfaces : Curses, Gtk et Qt
@item
petit, rapide et l@'eger
@item
param@'etrable et extensible avec des scripts
@item
conforme aux RFCs 1459, 2810, 2811, 2812, et 2813
@item
multi-plateformes (Gnu/Linux, *BSD, Windows et d'autres syst@`emes)
@item
@item
connexion multi-serveurs (avec SSL, IPv6, proxy)
@item
plusieurs interfaces : Curses, wxWidgets, Gtk et Qt
@item
petit, rapide et l@'eger
@item
param@'etrable et extensible avec des scripts
@item
conforme aux RFCs 1459, 2810, 2811, 2812, et 2813
@item
multi-plateformes (Gnu/Linux, *BSD, MacOS X, Windows et d'autres syst@`emes)
@item
100% GPL, logiciel libre
@end itemize
@end itemize
@*
La page d'accueil de WeeChat est ici :@*
@uref{http://weechat.flashtux.org}@*
@@ -115,20 +114,20 @@ Pour installer WeeChat, vous @b{devez} avoir :@*
@itemize @bullet
@item
Un syst@`eme Gnu/Linux (avec le compilateur et les outils associ@'es pour le paquet des sources)
Un syst@`eme Gnu/Linux (avec le compilateur et les outils associ@'es pour le paquet des sources)
@item
Droits "root" (pour installer WeeChat)
@item
Selon l'interface, une des biblioth@`eques suivantes :
@itemize @minus
@item
Curses: la librairie ncurses,
@item
Gtk: *** interface non d@'evelopp@'ee ***,
@item
Qt: *** interface non d@'evelopp@'ee ***,
Selon l'interface, une des biblioth@`eques suivantes :
@itemize @minus
@item
Curses: la librairie ncurses,
@item
Gtk: *** interface non d@'evelopp@'ee ***,
@item
Qt: *** interface non d@'evelopp@'ee ***,
@end itemize
@end itemize
@end itemize
@c ******************************* Installation *******************************
@@ -138,31 +137,31 @@ Qt: *** interface non d@'evelopp@'ee ***,
@menu
* Paquet binaire::
* Paquet source::
* Paquet source::
* Sources CVS::
@end menu
@node Paquet binaire, Paquet source, Installation, Installation
@section Paquet binaire
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}
@item
Mandrake/Redhat (ou toute distribution compatible avec les RPM)@*
Pour installer : @kbd{rpm -i /chemin/weechat-x.y.z-1.i386.rpm}
@item
Gentoo@*
Pour installer : @kbd{emerge weechat}
@item
*BSD (non disponible !)
@item
Slackware (non disponible !)
@item
Windows (non disponible !)
@end itemize
Les paquets binaires sont disponibles pour les distributions suivantes :
@itemize @bullet
@item
Debian (ou toute distribution compatible Debian)@*
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}
@item
Gentoo@*
Pour installer : @kbd{emerge weechat}
@item
*BSD (non disponible !)
@item
Slackware (non disponible !)
@item
Windows (non disponible !)
@end itemize
o@`u x.y.z est la version (par exemple 0.0.1)
@*
@@ -175,28 +174,28 @@ Tapez simplement dans une console ou un terminal :@*
@kbd{make}@*
Note: pour ne construire que certaines interfaces, vous pouvez passer des param@`etres
@`a ./configure, tapez @kbd{./configure --help} pour de l'aide sur ces options.@*
Obtenez les droits root et installez WeeChat :@*
@kbd{su}@*
(entrez le mot de passe de root)@*
@kbd{make install}@*
Obtenez les droits root et installez WeeChat :@*
@kbd{su}@*
(entrez le mot de passe de root)@*
@kbd{make install}@*
@node Sources CVS, , Paquet source, Installation
@section Sources CVS
@section Sources CVS
Attention: les sources CVS sont r@'eserv@'es aux utilisateurs avanc@'es : il se peut
que WeeChat ne compile pas et qu'il soit tr@`s instable.
Vous @^etes pr@'evenus !@*
Pour r@'ecup@'erer les sources CVS, tapez ces commandes :@*
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
@kbd{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat co weechat}@*
(lorsqu'un mot de passe est demand@'e, tapez simplement sur Entr@'ee)@*
que WeeChat ne compile pas et qu'il soit tr@`s instable.
Vous @^etes pr@'evenus !@*
Pour r@'ecup@'erer les sources CVS, tapez ces commandes :@*
@kbd{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat login}@*
@kbd{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/weechat co weechat}@*
(lorsqu'un mot de passe est demand@'e, tapez simplement sur Entr@'ee)@*
Ex@'ecutez ce script :@*
@kbd{./autogen.sh}@*
Suivez alors les instructions du paquet sources - @xref{Paquet source}.
Suivez alors les instructions du paquet sources - @xref{Paquet source}.
@c ******************************* Utilisation ********************************
@@ -206,40 +205,47 @@ Suivez alors les instructions du paquet sources - @xref{Paquet source}.
@menu
* Lancer WeeChat::
* Fichier de configuration::
* Raccourcis clavier::
* Fichier de configuration::
* Raccourcis clavier::
* Commandes WeeChat::
* Tube FIFO::
@end menu
@node Lancer WeeChat, Fichier de configuration, Utilisation, Utilisation
@section Lancer WeeChat
@subsection Param@`etres de ligne de commande
@subsection Param@`etres de ligne de commande
@table @code
@item -c, --config
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
Afficher la licence de WeeChat@*
@item -v, --version
@item -v, --version
Afficher la version de WeeChat@*
@end table
@subsection Lancer WeeChat
Tapez simplement cette commande pour lancer WeeChat :@*
@item -w, --weechat-commands
Afficher la liste des commandes WeeChat@*
@end table
@subsection Lancer WeeChat
Tapez simplement cette commande pour lancer WeeChat :@*
@kbd{weechat-curses} (pour l'interface Curses)@*
ou @kbd{weechat-wxwidgets} (pour l'interface wxWidgets)@*
ou @kbd{weechat-gtk} (pour l'interface Gtk)@*
ou @kbd{weechat-qt} (pour l'interface Qt)@*
ou @kbd{weechat-qt} (pour l'interface Qt)@*
Lorsque vous lancez WeeChat pour la premi@`ere fois, un fichier de configuration
par d@'efaut est cr@'e@'e, avec les options par d@'efaut.@*
Le fichier de configuration par d@'efaut est : ~/.weechat/weechat.rc@*
Vous pouvez @'editer ce fichier pour configurer WeeChat @`a votre convenance, ou
par d@'efaut est cr@'e@'e, avec les options par d@'efaut.@*
Le fichier de configuration par d@'efaut est : ~/.weechat/weechat.rc@*
Vous pouvez @'editer ce fichier pour configurer WeeChat @`a votre convenance, ou
vous pouvez modifier les param@`etres dans WeeChat avec la commande @kbd{/set} - @xref{Commandes WeeChat}.
@node Fichier de configuration, Raccourcis clavier, Lancer WeeChat, Utilisation
@@ -248,7 +254,6 @@ vous pouvez modifier les param@`etres dans WeeChat avec la commande @kbd{/set} -
Liste des options du fichier de configuration :@*
@table @kbd
@item look_set_title
D@'efinit le titre de la fen@^etre (terminal pour l'interface Curses) avec le nom et la version@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
@@ -276,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'@*
@@ -311,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@*
@@ -336,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'@*
@@ -363,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'@*
@@ -378,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'@*
@@ -418,7 +441,7 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
Couleur pour le symbole voix@*
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'yellow'@*
@item col_nick_more
Color for '+' when scrolling nicks@*
Couleur pour les '+' lors du scroll sur les pseudos@*
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
@item col_nick_sep
Couleur pour le s@'eparateur de pseudo@*
@@ -426,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'@*
@@ -488,10 +541,13 @@ Message par d@'efaut pour l'absence@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: 'away'@*
@item irc_default_msg_part
Message par d@'efaut pour le part (quitte un canal)@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
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@*
@@ -507,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'@*
@@ -537,12 +596,21 @@ Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
@item proxy_use
Utiliser un proxy pour se connecter au serveur irc@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
@item proxy_type
Type de proxy (http (d@'efaut), socks4, socks5)@*
Type: cha@^ine (valeurs: 'http', 'socks4', 'socks5'), valeur par d@'efaut: 'http'@*
@item proxy_ipv6
Se connecter au proxy en ipv6@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
@item proxy_address
Adresse du serveur proxy (IP ou nom)@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@item proxy_port
Port pour se connecter au serveur proxy@*
Type: entier (valeurs: entre 0 et 65535), valeur par d@'efaut: 1080@*
Type: entier (valeurs: entre 0 et 65535), valeur par d@'efaut: 3128@*
@item proxy_username
Nom d'utilisateur pour le serveur proxy@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@item proxy_password
Mot de passe pour le serveur proxy@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@@ -564,6 +632,12 @@ Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@item server_port
Port pour se connecter au serveur@*
Type: entier (valeurs: entre 0 et 65535), valeur par d@'efaut: 6667@*
@item server_ipv6
Utiliser le protocole IPv6 pour la communication avec le serveur@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
@item server_ssl
Utiliser SSL pour la communication avec le serveur@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'off'@*
@item server_password
Mot de passe pour le serveur IRC@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@@ -589,12 +663,14 @@ 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@*
Type: bool@'een (valeurs: 'on' ou 'off'), valeur par d@'efaut: 'on'@*
@item server_notify_levels
Liste des niveaux de notifications (s@'epar@'es par des virgules) pour les canaux de ce serveur (format: #canal:1,..)@*
Type: cha@^ine (toute cha@^ine), valeur par d@'efaut: ''@*
@end table
Les couleurs pour l'interface Curses sont :@*
@@ -633,11 +709,11 @@ Les couleurs pour l'interface Curses sont :@*
@node Raccourcis clavier, Commandes WeeChat, Fichier de configuration, Utilisation
@section Raccourcis clavier
@table @kbd
@item Fl@`eche gauche / Fl@`eche droite
Aller au caract@`ere pr@'ec@'edent / suivant sur la ligne de commande@*
@*
@*
@item Ctrl + fl@`eche gauche / Ctrl + fl@`eche droite
Aller au mot pr@'ec@'edent / suivant sur la ligne de commande@*
@*
@@ -647,28 +723,40 @@ Aller au d@'ebut de la ligne de commande@*
@item End / Ctrl + E
Aller @`a la fin de la ligne de commande@*
@*
@item Backspace / Delete
Effacer le mot pr@'ec@'edent / suivant sur la ligne de commande@*
@*
@item Ctrl + Backspace / Ctrl + W
@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 Tab
@*
@item Backspace / Delete
Effacer le mot pr@'ec@'edent / suivant sur la ligne de commande@*
@*
@item Tab
Compl@'eter la commande ou le pseudo (@kbd{Tab} @`a nouveau : trouver la compl@'etion suivante)@*
@*
@item Tout caract@`ere
Ins@'erer le caract@`ere @`a la position du curseur sur la ligne de commande@*
@*
@item Entr@'ee
@*
@item Tout caract@`ere
Ins@'erer le caract@`ere @`a la position du curseur sur la ligne de commande@*
@*
@item Entr@'ee
Ex@'ecuter la commande ou envoyer le message@*
@*
@item Fl@`eche haut / Fl@`eche bas
Rappeler les derni@`eres commandes/messages@*
@*
@item PageUp / PageDown
@*
@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@*
@*
@item F5 / F6
@*
@item F5 / F6
Aller au tampon pr@'ec@'edent / suivant@*
@*
@item F7 / F8
@@ -680,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
@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@*
@*
@@ -715,7 +821,6 @@ Faire d@'efiler la liste des pseudos@*
Commandes internes WeeChat :@*
@table @kbd
@item alias [nom_alias [commande [param@`etres]]
@*
cr@'eer un alias pour une commande@*
@@ -765,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]
@@ -777,15 +905,26 @@ 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 server [nom_serveur] | [nom_serveur nom/IP port [-auto | -noauto] [-pwd mot_de_passe] [-nicks pseudo1 [pseudo2 [pseudo3]]] [-username nom_utilisateur] [-realname nom_r@'eel] [-command commande] [-autojoin canal[,canal]] ] | [del nom_serveur]
@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@*
@*
nom_serveur: nom du serveur, pour usage interne et affichage@*
nom/IP: nom ou adresse IP du serveur@*
port: port pour le serveur (nombre entier)@*
ipv6: utiliser le protocole IPv6@*
ssl: utiliser le protocole SSL@*
mot_de_passe: mot de passe pour le serveur@*
pseudo1: premier pseudo pour le serveur@*
pseudo2: pseudo alternatif pour le serveur@*
@@ -812,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@*
@@ -821,19 +974,29 @@ splith: @'eclate la fen@^etre en deux horizontalement@*
splitv: @'eclate la fen@^etre en deux verticalement@*
merge: fusionne la fen@^etre avec une autre@*
@*
@end table
Commandes IRC :@*
@table @kbd
@item admin [cible]
@*
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@*
@@ -848,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]]
@*
@@ -863,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)@*
@*
@@ -879,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)@*
@*
@@ -955,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@*
@*
@@ -1162,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)@*
@*
@@ -1194,7 +1358,83 @@ pseudo: pseudo @`a chercher@*
nombre: nombre de r@'eponses @`a retourner (recherche compl@`ete si nombre n@'egatif)@*
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
@@ -1216,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
@*
@@ -1351,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{@} }@*
@*
@@ -1444,7 +1691,7 @@ Lister les scripts Python charg@'es : @kbd{/python}@*
@itemize @bullet
@item
@command{weechat.register ( nom, version, fonction_de_fin, description );}@*
@command{weechat.register ( nom, version, fonction_de_fin, description )}@*
@*
C'est la premi@`ere fonction @`a appeler dans le script Python.@*
Tout script Python pour WeeChat doit appeler cette fonction.@*
@@ -1461,11 +1708,11 @@ de fonction @`a appeler)
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.register ("essai", "1.0", "fin_essai", "Script d'essai !");}@*
@code{weechat.register ("essai", "1.0", "fin_essai", "Script d'essai !")}@*
@*
@item
@command{weechat.prnt ( message, [canal, [serveur]] );}@*
@command{weechat.prnt ( message, [canal, [serveur]] )}@*
@*
Affiche un message dans un canal.@*
@@ -1477,13 +1724,13 @@ Affiche un message dans un canal.@*
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.prnt ("message");}@*
@code{weechat.prnt ("message", "#weechat");}@*
@code{weechat.prnt ("message", "#weechat", "freenode");}@*
@code{weechat.prnt ("message")}@*
@code{weechat.prnt ("message", "#weechat")}@*
@code{weechat.prnt ("message", "#weechat", "freenode")}@*
@*
@item
@command{weechat.print_infobar ( d@'elai, message );}@*
@command{weechat.print_infobar ( d@'elai, message )}@*
@*
Affiche un message dans la barre d'infos.@*
@@ -1495,11 +1742,11 @@ Affiche un message dans la barre d'infos.@*
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.print_infobar (5, "message");}@*
@code{weechat.print_infobar (5, "message")}@*
@*
@item
@command{weechat.add_message_handler ( nom, fonction );}@*
@command{weechat.add_message_handler ( nom, fonction )}@*
@*
Attache une fonction Python @`a un message IRC particulier.@*
La fonction sera appel@'ee @`a chaque fois que le message IRC sera re@,{c}u.@*
@@ -1515,18 +1762,16 @@ RFC 2812 : @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.add_message_handler ("privmsg", ma_fonction);}@*
@code{sub ma_fonction}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt ("serveur=$_[0]\n");}@*
@code{@ @ @ @ ($null, $canal, $message) = split ":",$_[1],3;}@*
@code{@ @ @ @ ($masque, $null, $canal) = split " ", $canal;}@*
@code{@ @ @ @ weechat.prnt ("masque=$masque, canal=$canal, message=$message\n");}@*
@code{@} }@*
@code{weechat.add_message_handler ("privmsg", ma_fonction)}@*
@code{def ma_fonction(serveur, args):}@*
@code{@ @ @ @ weechat.prnt("serveur="+serveur)}@*
@code{@ @ @ @ null, canal, message = string.split(args, ":", 2)}@*
@code{@ @ @ @ masque, null, canal = string.split(string.strip(canal), " ", 2)}@*
@code{@ @ @ @ weechat.prnt("masque="+masque+", canal="+canal+", message="+message)}@*
@*
@item
@command{weechat.add_command_handler ( nom, fonction );}@*
@command{weechat.add_command_handler ( nom, fonction )}@*
@*
Cr@'e@'e une nouvelle commande WeeChat, associ@'ee @`a une fonction Python.@*
La fonction sera appel@'ee lorsque l'utilisateur lancera la commande par @kbd{/nom}.@*
@@ -1541,16 +1786,13 @@ ne seront plus accessibles tant que le script Python sera charg@'e.
@end itemize
@*
@emph{Exemple :}@*
@code{weechat.add_command_handler ("commande", ma_commande);}@*
@code{sub ma_commande}@*
@code{@{ }@*
@code{@ @ @ @ weechat.prnt("Serveur: $_[0], param@`etres: $_[1]\n");}@*
@code{@ @ @ @ return 0;}@*
@code{@} }@*
@code{weechat.add_command_handler ("commande", ma_commande)}@*
@code{def ma_commande(serveur, args):}@*
@code{@ @ @ @ weechat.prnt("serveur:"+serveur+" param@`etres:"+args)}@*
@*
@item
@command{weechat.command ( commande, [canal, [serveur]] );}@*
@command{weechat.command ( commande, [canal, [serveur]] )}@*
@*
Ex@'ecute une commande ou envoie un message @'a un canal.@*
@@ -1562,13 +1804,13 @@ Ex@'ecute une commande ou envoie un message @'a un canal.@*
@end itemize
@*
@emph{Exemples :}@*
@code{weechat.command ("bonjour tout le monde !");}@*
@code{weechat.command ("/kick toto merci de quitter ce canal", "#weechat");}@*
@code{weechat.command ("/nick newnick", "", "freenode");}@*
@code{weechat.command ("bonjour tout le monde !")}@*
@code{weechat.command ("/kick toto merci de quitter ce canal", "#weechat")}@*
@code{weechat.command ("/nick newnick", "", "freenode")}@*
@*
@item
@command{weechat.get_info ( nom, [serveur] );}@*
@command{weechat.get_info ( nom, [serveur] )}@*
@*
Obtenir des informations vari@'ees sur WeeChat, le serveur ou l'utilisateur.@*
@@ -1587,8 +1829,8 @@ Obtenir des informations vari@'ees sur WeeChat, le serveur ou l'utilisateur.@*
@end itemize
@*
@emph{Exemples :}@*
@code{$version = weechat.get_info("version");}@*
@code{$nick = weechat.get_info("nick", "freenode");}@*
@code{$version = weechat.get_info("version")}@*
@code{$nick = weechat.get_info("nick", "freenode")}@*
@*
@end itemize
File diff suppressed because it is too large Load Diff
Binary file not shown.
+4
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More