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

Compare commits

...

151 Commits

Author SHA1 Message Date
Sebastien Helleu dfea9b208c Version 0.2.5 2007-06-07 15:13:15 +00:00
Sebastien Helleu 263f15cf2e Fixed french XML files for doc 2007-06-07 14:32:46 +00:00
Sebastien Helleu 36f0aab4d4 Fixed QUOTE command: now allowed when socket is ok (even if IRC connection to server is not ok) (bug #20113) 2007-06-07 13:26:54 +00:00
Sebastien Helleu 1f77a51ddc Updated czech translations 2007-06-06 11:39:33 +00:00
Sebastien Helleu c96eea0f54 Updated russian translations 2007-06-06 10:58:45 +00:00
Sebastien Helleu 87fa5c8b52 Updated translations 2007-06-06 10:35:16 +00:00
Sebastien Helleu 6f83c33ed9 Added missing IRC commands 378 and 379 (bug #20091) 2007-06-06 10:13:25 +00:00
Sebastien Helleu 23ff266816 Added missing IRC command 327 2007-06-06 09:08:00 +00:00
Sebastien Helleu 8affe52ee4 Fixed hotlist when exiting search mode: current buffer is removed from hotlist 2007-06-05 21:31:43 +00:00
Sebastien Helleu 162565466e Fixed german XML files for doc 2007-06-05 21:21:53 +00:00
Sebastien Helleu a2384b3514 Updated some XML files for doc 2007-06-05 20:13:53 +00:00
Sebastien Helleu 219621b8cc Updated czech translations 2007-06-05 20:12:24 +00:00
Sebastien Helleu a3d7bcf804 Updated russian translations 2007-06-05 20:10:09 +00:00
Sebastien Helleu 8978b9c4b9 Added "weechat.log" name in error message when WeeChat log file is locked 2007-06-05 14:00:47 +00:00
Sebastien Helleu b605e52d0f Updated german doc 2007-06-01 13:47:46 +00:00
Sebastien Helleu c554ed2da5 Updated german translations 2007-06-01 13:44:39 +00:00
Julien Louis dde12565e7 Fix libintl.h issue on FreeBSD 2007-05-26 19:15:46 +00:00
Sebastien Helleu 34e220df56 Fixed bug with PART command parsing (":" not skipped, problem with some IRC servers) 2007-05-25 16:49:25 +00:00
Sebastien Helleu 537e1781a6 Fixed nick completion bug: now self nick is always at the end of completion list 2007-05-24 12:59:16 +00:00
Sebastien Helleu d66bfc2458 Added "%M" for completion with nicks of current server (nicks on open channels) (task #6931) 2007-05-24 12:43:18 +00:00
Sebastien Helleu fb3fd5b0eb Improved key bindings: now possible to bind a key on many commands, separated by semicolon (task #5444) 2007-05-23 16:07:31 +00:00
Sebastien Helleu c0762e3b13 Updated russian translations 2007-05-23 12:47:47 +00:00
Sebastien Helleu 4519707904 Fixed minor typo in translations 2007-05-23 11:50:28 +00:00
Sebastien Helleu 30e194e41f Updated translations 2007-05-23 08:08:21 +00:00
Sebastien Helleu 5e4f45e2a2 Improved IRC long message split: use word boundary (task #6685) 2007-05-22 16:37:11 +00:00
Sebastien Helleu e339e9020d Fixed "%C" completion: now completes with all channels of all servers 2007-05-22 14:46:59 +00:00
Sebastien Helleu 5332d2ba27 Removed ":" for unknown IRC commands before arguments (bug #19929) 2007-05-22 13:11:58 +00:00
Sebastien Helleu 058c026e10 Fixed bug with "/buffer query_name", added server and channel completion for /buffer command (bug #19928) 2007-05-22 13:02:39 +00:00
Julien Louis dd79c6b8bf Only check ncurses.h if ncursesw/ncurses.h is not found
Signed-off-by: Julien Louis <ptitlouis@sysif.net>
2007-05-21 22:26:17 +00:00
Julien Louis e867f2dd35 Fix ncurses detection.
We now provide a FindNcurses.cmake to find the library used
and we define the right cpp variable when we compile the curses gui.

Signed-off-by: Julien Louis <ptitlouis@sysif.net>
2007-05-21 22:20:13 +00:00
Sebastien Helleu ba468f2234 Added cmake for weechat compile (patch #5943) 2007-05-21 21:46:51 +00:00
Sebastien Helleu 6c67b97fb7 Added date.xml.in, file needed by cmake 2007-05-21 16:58:37 +00:00
Sebastien Helleu 9f5d99f57e Added cmake for weechat compile 2007-05-21 16:30:04 +00:00
Sebastien Helleu c79becdc85 Removed compile warning in Perl script plugin 2007-05-21 16:11:27 +00:00
Sebastien Helleu 7405588a6e Updated man page 2007-05-21 16:09:24 +00:00
Sebastien Helleu 4061f0641d Fixed IRC mode parsing when receiving modes with arguments (bug #19902) 2007-05-20 10:41:51 +00:00
Sebastien Helleu 5787acad2c Fixed crash with IRC JOIN malformed message (bug #19891) 2007-05-18 09:13:25 +00:00
Sebastien Helleu 5e29f17620 Updated script urlgrab.py 2007-05-18 06:35:52 +00:00
Sebastien Helleu 4950d462d0 Minor cleanup in german doc: removed some unneeded spaces 2007-05-15 07:48:43 +00:00
Sebastien Helleu 20b567c3df Added charset plugin in doc 2007-05-14 21:09:08 +00:00
Sebastien Helleu d395846fb7 Removed "prefix" data for server info in plugin API (oups, why did I add that ?) 2007-05-11 15:04:56 +00:00
Sebastien Helleu bee62989f6 Code cleanup: renamed IRC functions to have uniform name (with prefix based on source name), moved some functions 2007-05-11 14:59:12 +00:00
Sebastien Helleu 7579529d94 Fixed bug with nick prefixes on some IRC servers (bug #19854) 2007-05-11 12:06:20 +00:00
Sebastien Helleu a8fc49bd79 Fixed IRC server message display, case insensitive test for nick in message 2007-05-11 10:13:38 +00:00
Sebastien Helleu d617f1d154 New version of awl.py 2007-05-11 08:22:39 +00:00
Sebastien Helleu 82b3f86c43 Fixed channel search for display of IRC error messages (case insensitive search for nick) 2007-05-11 08:17:57 +00:00
Sebastien Helleu 812ab4129f Added mpd.py script 2007-05-10 14:39:23 +00:00
Sebastien Helleu d6925c982e Fixed bug with PING answer: removed one colon at beginning of PONG arguments (bug #19846) 2007-05-10 09:22:28 +00:00
Sebastien Helleu c3e9858d55 Improved setup file save: now writes temporary file, then rename it (task #6847) 2007-05-09 16:43:01 +00:00
Sebastien Helleu 7290f0f1ab Fixed bug with $nick/$channel/$server variables in commands 2007-05-09 13:12:12 +00:00
Sebastien Helleu 0093bf0849 Updated french doc 2007-05-09 11:54:55 +00:00
Sebastien Helleu 3bf3f22928 Forget current nick when user manually disconnects from server 2007-05-09 11:14:59 +00:00
Sebastien Helleu 880e10b6d6 Fixed nick display in input window 2007-05-09 11:13:41 +00:00
Sebastien Helleu 054abdff85 Fixed bug with erroneous nickname when connecting to server (bug #19812), fixed display bugs in IRC error messages 2007-05-09 11:00:11 +00:00
Sebastien Helleu 860e9a08f3 Added forcenick.rb script 2007-05-04 12:33:38 +00:00
Sebastien Helleu 148e74d2c3 Added protocol priority for gnutls (patch #5915) 2007-05-04 09:48:33 +00:00
Julien Louis f5fadd9c12 Remove uneeded calls to the python interpreter.
Scripts are executed by an embedded interpreter.
2007-05-03 17:02:05 +00:00
Sebastien Helleu 0abe6f0322 Added channel admin mode '!' for some IRC servers 2007-05-02 09:41:19 +00:00
Sebastien Helleu c74cf01b63 Fixed bug with iso2022jp locale (bug #18719) 2007-05-02 09:19:35 +00:00
Sebastien Helleu eb2e8891cb Fixed string format bug when displaying string thru plugin script API 2007-04-25 08:41:29 +00:00
Sebastien Helleu 97a3d47650 Added /reconnect command (task #5448) 2007-04-24 12:18:36 +00:00
Sebastien Helleu 4ed02bbdcf Added "-all" option for /connect and /disconnect commands (task #6232) 2007-04-24 11:28:41 +00:00
Sebastien Helleu 63244d9a30 Added browse.rb script 2007-04-24 08:57:12 +00:00
Sebastien Helleu fcc885eff0 New version of ctcp.py 2007-04-24 08:56:27 +00:00
Sebastien Helleu 7feb775299 Nick completion: completes with self nick at the end of completion list 2007-04-15 08:04:53 +00:00
Sebastien Helleu 8da229fd9d Updated doc 2007-04-14 13:28:27 +00:00
Sebastien Helleu 398e056029 Removed debug message when highlight is forced by a plugin 2007-04-14 13:16:23 +00:00
Sebastien Helleu f30fb21175 Improved nick completion: completes with last speakers first (task #5896), fixed nick completion (bugs #19590 and #19589) 2007-04-14 13:14:05 +00:00
Sebastien Helleu a89ca83306 Fixed minor refresh bug with input when searching text 2007-04-04 14:23:33 +00:00
Sebastien Helleu 0e785fe106 Added color for input text not found in buffer history 2007-04-04 14:04:42 +00:00
Sebastien Helleu 3e6e347d13 Added question about copy/paste and nicklist in FAQ 2007-04-03 09:24:04 +00:00
Sebastien Helleu 8d014d66da Fixed USER message when connecting to IRC server (patch #5835) 2007-04-02 09:23:41 +00:00
Sebastien Helleu f07c42fff3 Version 0.2.5-cvs 2007-03-29 18:22:18 +00:00
Sebastien Helleu e0c6451b91 Version 0.2.4 2007-03-29 17:48:47 +00:00
Sebastien Helleu 29e879326d Added oldtopic.pl script 2007-03-29 12:55:28 +00:00
Sebastien Helleu e995453b9a Fixed typo in french quickstart guide 2007-03-29 12:45:04 +00:00
Sebastien Helleu bad4bd0bef Fixed color bug with IRC messages displayed by plugins (bug #19442) 2007-03-29 12:44:42 +00:00
Sebastien Helleu 0872e77872 Added response.py script 2007-03-28 20:15:30 +00:00
Sebastien Helleu 41b7aa0f93 Fixed czech translations 2007-03-28 07:40:04 +00:00
Sebastien Helleu a4bf839a30 Updated copyright date in english and french docs 2007-03-27 16:19:04 +00:00
Sebastien Helleu 1ff61b1745 Updated german doc 2007-03-27 16:18:33 +00:00
Sebastien Helleu 2d5e1474e3 Updated translations 2007-03-27 16:17:53 +00:00
Sebastien Helleu 57477f9da9 Fixed command parsing: now "/*" is not considered any more as a command (task #6684) 2007-03-27 11:06:50 +00:00
Sebastien Helleu 64bcd25692 Updated russian translations 2007-03-26 21:29:34 +00:00
Sebastien Helleu cd3f62d37e Fixed topic charset, now using channel charset if defined (bug #19386) 2007-03-25 14:13:21 +00:00
Sebastien Helleu 17989f8d71 Renamed log file for DCC chat (now <server>.dcc.<nick>.weechatlog) 2007-03-23 13:40:18 +00:00
Sebastien Helleu b498062fde Fixed crash when closing a pv if a DCC chat is open on same nick (bug #19147) 2007-03-23 13:39:23 +00:00
Sebastien Helleu 2096354ea8 Remove current buffer from hotlist when scrolling down and end of buffer is reached 2007-03-23 13:01:31 +00:00
Sebastien Helleu 1daa5061a9 Fixed bug with channel topic after reconnection (not erased) (bug #19384) 2007-03-22 13:26:50 +00:00
Sebastien Helleu 926932a20f Updated czech translations 2007-03-21 21:23:48 +00:00
Sebastien Helleu 6323e55ab4 Added current buffer in hotlist when scrolling up in buffer (task #6664) 2007-03-21 20:29:13 +00:00
Sebastien Helleu 0b6a91837c Fixed bug with text search and previous/next highlight (sometimes search came back to end of buffer) 2007-03-20 12:23:11 +00:00
Sebastien Helleu c988f0c473 Fixed minor bug in /upgrade command 2007-03-20 12:22:32 +00:00
Sebastien Helleu 7f0e0b5eea Added case-sensitive search in buffer, display marker for each line matching search 2007-03-20 10:18:25 +00:00
Sebastien Helleu 25bfda26e9 Fixed bug with explode_string / free_exploded_string when max_items > 0 2007-03-19 23:31:49 +00:00
Sebastien Helleu a584ef4261 Added weempd.py script 2007-03-17 12:51:25 +00:00
Sebastien Helleu 00935961e8 Updated russian translations 2007-03-17 12:37:16 +00:00
Sebastien Helleu e12a2c985c Updated ChangeLog 2007-03-16 15:28:09 +00:00
Sebastien Helleu 9a81c27e7d Replaced ctrl-S by ctrl-R for interactive and incremental search 2007-03-16 15:27:28 +00:00
Sebastien Helleu 0f0f7511d2 Added new key (ctrl-S) for interactive and incremental search in buffer history (task #6628) 2007-03-16 15:02:47 +00:00
Sebastien Helleu aa149dcfbc Fixed /topic completion when no topic set on current channel (bug #19322) 2007-03-16 11:49:58 +00:00
Sebastien Helleu 4d64128ef2 Improved password hiding, code cleanup (bug #19229) (new commit after savannah crash) 2007-03-16 08:40:10 +00:00
Sebastien Helleu 7d5ea81f93 Added away info on status bar for server buffer when look_one_server_buffer is ON (new commit after savannah crash) 2007-03-15 22:14:49 +00:00
Emmanuel Bouthenot 063744ef7d make arguments for function get_buffer_data() mandatory in plugins/scripts 2007-03-09 15:46:08 +00:00
Sebastien Helleu cfd2f57dd1 New version of amarok.py 2007-03-09 13:34:34 +00:00
Sebastien Helleu 8d60035951 New version of amarok.py 2007-03-07 10:55:09 +00:00
Sebastien Helleu ff2fdc14b7 New version of ctcp.py 2007-03-07 10:54:58 +00:00
Sebastien Helleu 8c6fa998f8 Updated translations 2007-03-07 08:38:40 +00:00
Sebastien Helleu 600fe4deb3 Updated doc 2007-03-06 19:21:32 +00:00
Sebastien Helleu 7b9ef6b56e Added new return code in plugin API to force highlight (for message handlers only) 2007-03-06 16:42:39 +00:00
Sebastien Helleu 00dd81761f Fixed bug with server buffer when "look_one_server_buffer" is ON and server buffer is moved to any number > 1 (bug #19219) 2007-03-06 14:37:43 +00:00
Sebastien Helleu 85db677423 Fixed /help command: displays plugin help for redefined commands (bug #19166) 2007-03-05 13:03:37 +00:00
Sebastien Helleu 70ebdc9808 Updated /help alias with $nick/$channel/$server (bug #19194) 2007-03-05 12:48:50 +00:00
Sebastien Helleu f8e31fa38f Prefix '/' disabled in commands (patch #5769) 2007-03-01 09:34:50 +00:00
Sebastien Helleu 018b440004 Fixed completion of redefined commands removed by plugins (bug #19176) 2007-03-01 09:06:04 +00:00
Sebastien Helleu f1fdc469c4 Fixed memory leaks in perl and python plugins (bug #19163) 2007-03-01 08:25:08 +00:00
Emmanuel Bouthenot 47db86b66a fix some memory leaks in perl plugin/script 2007-02-28 22:59:47 +00:00
Emmanuel Bouthenot 2ca6c6a3f1 fix some memory leaks in python plugin/script 2007-02-28 15:07:24 +00:00
Emmanuel Bouthenot 158d2c9934 bug fix and code cleanup in plugins/scripts 2007-02-27 22:22:56 +00:00
Sebastien Helleu 7758f02992 Updated catapult.py 2007-02-25 14:29:09 +00:00
Sebastien Helleu fef85af5cc Updated rbox.rb script 2007-02-24 23:34:14 +00:00
Sebastien Helleu 3fb1affd95 Added logurlsql.pl and rbox.rb scripts 2007-02-23 16:17:15 +00:00
Sebastien Helleu f5731322da Added awl.py script 2007-02-22 10:50:16 +00:00
Sebastien Helleu 1dc994e5f6 Added scripts last.fm.py and weexaile.py 2007-02-19 19:33:37 +00:00
Emmanuel Bouthenot 429167f032 fix the possibility to load a perl script even if it doesn't call register() function 2007-02-17 18:23:50 +00:00
Sebastien Helleu aba6e1257d Added "call" option to /key command, added new key function "insert" to insert text on command line (task #6468) 2007-02-12 17:39:34 +00:00
Sebastien Helleu 6d01968259 Fixed permissions on "dcc" and "logs" directories (bug #18978) 2007-02-06 21:33:48 +00:00
Sebastien Helleu fddd0416b9 Added event handlers in plugin list commands outputs (/plugin and script commands) 2007-02-05 22:47:12 +00:00
Sebastien Helleu 8e436c58cd Added event handler to plugin API 2007-02-05 22:18:33 +00:00
Sebastien Helleu 4713f94602 Added scots quickstart guide 2007-02-05 15:50:38 +00:00
Sebastien Helleu ef43b3e013 Added numeric argument for /clear command (buffer number) (patch #5372) 2007-02-03 08:49:23 +00:00
Sebastien Helleu 0e113ded09 Fixed typos in doc 2007-02-02 16:57:08 +00:00
Sebastien Helleu cd75488d0d Added mp3blaster.py script 2007-01-22 10:44:46 +00:00
Sebastien Helleu dc80d87b0e Fixed crash when /away command is issued with no server connection (bug #18839) 2007-01-21 11:54:45 +00:00
Sebastien Helleu 0213633fb8 New e-mail for author of xmms.pl 2007-01-19 13:35:16 +00:00
Sebastien Helleu fa833455ae Added amarok.py script 2007-01-19 13:34:09 +00:00
Sebastien Helleu 749fae7a75 Fixed crash when closing a buffer opened on many windows 2007-01-16 23:53:01 +00:00
Sebastien Helleu e99915e427 Fixed freeze with SSL server when disconnecting after connection loss (bug #18735) 2007-01-16 14:54:38 +00:00
Sebastien Helleu 22d0d47d2d Updated FAQ 2007-01-16 14:07:37 +00:00
Sebastien Helleu 0af26a3fb5 Version 0.2.4-cvs 2007-01-10 23:26:04 +00:00
Sebastien Helleu 6dacffe946 Version 0.2.3 2007-01-10 18:12:53 +00:00
Sebastien Helleu 3409d9a7e7 Fixed display bugs with nicklist at top/bottom when look_nicklist_separator is OFF (bug #18737) 2007-01-09 21:15:02 +00:00
Sebastien Helleu c14e090638 Fixed bug in topic display 2007-01-08 16:28:06 +00:00
Sebastien Helleu 1b348cf8ad Fixed again iconv 2007-01-08 16:10:02 +00:00
Sebastien Helleu 66161f5249 Fixed iconv problem, causing truncated words when using iso locale 2007-01-08 15:43:21 +00:00
Sebastien Helleu a1bbfb0129 Fixed topic scroll when topic has multi-bytes chars 2007-01-07 18:38:39 +00:00
Sebastien Helleu 428127cb71 Fixed typo in doc 2007-01-07 15:31:49 +00:00
Sebastien Helleu 029e539aba Fixed display bug in nicklist with cyrillic nick names 2007-01-07 10:06:58 +00:00
Sebastien Helleu 53acc07eb1 Fixed compilation problem with iconv under FreeBSD 2007-01-06 23:57:59 +00:00
Sebastien Helleu bbe2f9093c Fixed bugs with charset: now decodes/encodes nicks and channels in IRC messages (bug #18716) 2007-01-06 22:24:54 +00:00
Sebastien Helleu 09efc5333f Version 0.2.3-cvs 2007-01-06 00:33:42 +00:00
265 changed files with 37601 additions and 22616 deletions
+53
View File
@@ -0,0 +1,53 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
PROJECT(weechat)
SET(CMAKE_VERBOSE_MAKEFILE OFF)
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
SET(CMAKE_SKIP_RPATH ON)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W")
IF(PREFIX)
SET(CMAKE_INSTALL_PREFIX ${PREFIX} CACHE PATH "Install path prefix" FORCE)
ENDIF(PREFIX)
SET(VERSION 0.2.5-cvs)
SET(PKG_STRING "${PROJECT_NAME} ${VERSION}")
SET(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/weechat)
SET(SHAREDIR ${CMAKE_INSTALL_PREFIX}/share/weechat)
SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
STRING(REPLACE "\";\"" "\ " PKG_STRING ${PKG_STRING})
OPTION(DISABLE_NCURSES "Disable Ncurses interface")
OPTION(DISABLE_NLS "Disable Native Language Support")
OPTION(DISABLE_GNUTLS "Disable SSLv3/TLS connection support")
OPTION(DISABLE_PLUGINS "Disable Plugins support")
OPTION(DISABLE_PERL "Disable Perl scripting language")
OPTION(DISABLE_PYTHON "Disable Python scripting language")
OPTION(DISABLE_RUBY "Disable Ruby scripting language")
OPTION(DISABLE_LUA "Disable Lua scripting language")
OPTION(DISABLE_ASPELL "Disable Aspell plugin")
OPTION(DISABLE_CHARSET "Disable Charset plugin")
OPTION(DISABLE_DOC "Disable Doc")
ADD_SUBDIRECTORY( po )
ADD_SUBDIRECTORY( src )
IF(NOT DISABLE_DOC)
ADD_SUBDIRECTORY( doc )
ENDIF(NOT DISABLE_DOC)
CONFIGURE_FILE(config.h.cmake config.h @ONLY)
+85 -1
View File
@@ -1,9 +1,93 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2007-01-06
ChangeLog - 2007-06-07
Version 0.2.5 (2007-06-07):
* fixed QUOTE command: now allowed when socket is ok (even if IRC
connection to server is not ok) (bug #20113)
* added missing IRC commands (327, 378, 379) (bug #20091)
* fixed hotlist when exiting search mode: current buffer is removed from
hotlist
* added "%M" for completion with nicks of current server (nicks on open
channels) (task #6931)
* improved key bindings: now possible to bind a key on many commands,
separated by semicolon (task #5444)
* improved IRC long message split: use word boundary (task #6685)
* removed ":" for unknown IRC commands before arguments (bug #19929)
* fixed "%C" completion: now completes with all channels of all servers
* fixed bug with "/buffer query_name", added server and channel completion
for /buffer command (bug #19928)
* added cmake for weechat compile (patch #5943)
* fixed IRC mode parsing when receiving modes with arguments (bug #19902)
* fixed crash with IRC JOIN malformed message (bug #19891)
* fixed bug with nick prefixes on some IRC servers (bug #19854)
* improved setup file save: now writes temporary file, then rename it
(task #6847)
* fixed bug with $nick/$channel/$server variables in commands
* forget current nick when user manually disconnects from server
* fixed nick display in input window
* fixed bug with erroneous nickname when connecting to server (bug #19812)
* fixed display bugs in IRC error messages
* added protocol priority for gnutls (patch #5915)
* added channel admin mode '!' for some IRC servers
* fixed bug with iso2022jp locale (bug #18719)
* fixed string format bug when displaying string thru plugin script API
* added /reconnect command (task #5448)
* added "-all" option for /connect and /disconnect commands (task #6232)
* improved nick completion: completion with last speakers first and self
nick at the end; added option look_nick_completion_smart, enabled by
default (task #5896)
* fixed nick completion in command arguments (bug #19590)
* fixed possible crash with nick completion when a nick leaves channel
(bug #19589)
* added color for input text not found in buffer history
* fixed USER message when connecting to IRC server (patch #5835)
Version 0.2.4 (2007-03-29):
* fixed color bug with IRC messages displayed by plugins (bug #19442)
* fixed topic charset, now using channel charset if defined (bug #19386)
* renamed log file for DCC chat (now <server>.dcc.<nick>.weechatlog)
* fixed crash when closing a pv if a DCC chat is open on same nick
(bug #19147)
* fixed bug with channel topic after reconnection (not erased) (bug #19384)
* added current buffer in hotlist when scrolling up in buffer (task #6664)
* fixed bug with explode_string / free_exploded_string when max_items > 0
* added new key (ctrl-R) for interactive and incremental search in buffer
history (task #6628)
* fixed /topic completion when no topic set on current channel (bug #19322)
* improved password hiding, code cleanup (bug #19229)
* added new return code in plugin API to force highlight (for message
handlers only)
* fixed bug with server buffer when "look_one_server_buffer" is ON and
server buffer is moved to any number > 1 (bug #19219)
* fixed /help command: displays plugin help for redefined commands
(bug #19166)
* prefix '/' disabled in commands (patch #5769)
* fixed completion of redefined commands removed by plugins (bug #19176)
* fixed memory leaks in perl and python plugins (bug #19163)
* added "call" option to /key command, added new key function "insert" to
insert text on command line (task #6468)
* fixed permissions on "dcc" and "logs" directories (bug #18978)
* added event handler to plugin API
* added scots quickstart guide
* added numeric argument for /clear command (buffer number) (patch #5372)
* fixed crash when /away command is issued with no server connection
(bug #18839)
* fixed crash when closing a buffer opened on many windows
* fixed freeze with SSL server when disconnecting after connection loss
(bug #18735)
Version 0.2.3 (2007-01-10):
* fixed display bugs with nicklist at top/bottom when look_nicklist_separator
is OFF (bug #18737)
* fixed iconv problem, causing truncated words when using iso locale
* fixed topic scroll when topic has multi-bytes chars
* fixed compilation problem with iconv under FreeBSD
* fixed bugs with charset: now decodes/encodes nicks and channels in IRC
messages (bug #18716)
Version 0.2.2 (2007-01-06):
* fixed bug with status bar (missing refresh) when closing a buffer
* fixed bug with use of first buffer for a channel if not connected
+21 -5
View File
@@ -1,4 +1,4 @@
WeeChat FAQ, 2007-01-06
WeeChat FAQ, 2007-06-07
=======================
Intended audience:
@@ -87,10 +87,16 @@ A: A window is used when you split screen vertically or horizontally.
================================================================================
Q: I don't see some chars with accents, what can I do?
A: You have to setup charset used for decoding (ISO and UTF), encoding, and
internal WeeChat charset.
Internal charset should be empty value, except if WeeChat failed to
detect your locale.
A: For versions < 0.2.3, please upgrade to last stable version.
For versions >= 0.2.3 :
- check that weechat-curses is linked to libncursesw (warning: needed
on most distributions but not all) :
ldd /path/to/weechat-curses
- check charset line (on server buffer), you should see ISO-XXXXXX or
UTF-8 for terminal charset. If you see ANSI_X3.4-1968 or other values,
probably your locale is wrong.
- setup global decode value, for example:
/setp charset.global.decode = ISO-8859-15
2.5
@@ -173,6 +179,16 @@ A: Yes, you have to use python script shell.py (available on WeeChat
users, you can issue: /shell setenv LANG=en_US)
2.12
================================================================================
Q: With Curses GUI, how can I copy/paste text without pasting nicklist ?
A: You can use a terminal with rectangular selection (like rxvt-unicode,
konsole, ...).
Other solution is to move nicklist to top or bottom, for example:
/set look_nicklist_position = top
3.1
================================================================================
Q: How should I report bugs?
+24 -5
View File
@@ -1,4 +1,4 @@
WeeChat FAQ, 2007-01-06
WeeChat FAQ, 2007-06-07
=======================
Public concerné :
@@ -94,10 +94,17 @@ R: Une fen
================================================================================
Q: Je ne vois pas bien certains accents dans WeeChat, que faire ?
R: Il faut configurer le charset utilisé pour le décodage (ISO et UTF),
l'encodage ainsi que le charset interne à WeeChat.
Le charset interne à WeeChat doit être une valeur vide, sauf si WeeChat
n'arrive pas à déterminer votre locale.
R: Pour les versions < 0.2.3, merci d'installer la dernière version stable.
Pour les versions >= 0.2.3 :
- vérifiez que weechat-curses est lié avec libncursesw (attention:
nécessaire sur beaucoup de distributions, mais pas toutes) :
ldd /chemin/vers/weechat-curses
- vérifiez la ligne charset (sur le tampon serveur), vous devriez voir
ISO-XXXXXX ou UTF-8 pour le charset du terminal. Si vous voyez
ANSI_X3.4-1968 ou d'autres valeurs, votre locale est probablement
erronée.
- affectez la valeur pour le décodage global, par exemple :
/setp charset.global.decode = ISO-8859-15
2.5
@@ -181,6 +188,18 @@ R: Oui, il faut utiliser le script python shell.py (disponible sur le site
/shell setenv LANG=en_US)
2.12
================================================================================
Q: Avec l'interface Curses, comment puis-je copier/coller du texte sans
coller la liste des pseudos ?
R: Vous pouvez utiliser un terminal qui propose la sélection rectangulaire
(comme rxvt-unicode, konsole, etc...).
Une autre solution est de déplacer la liste des pseudos en haut ou en
bas, par exemple :
/set look_nicklist_position = top
3.1
================================================================================
Q: Comment dois-je reporter les bugs ?
+15
View File
@@ -1,6 +1,21 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
* FlashCode, 2007-06-07
WeeChat 0.2.5 released.
* FlashCode, 2007-03-29
WeeChat 0.2.4 released.
* FlashCode, 2007-01-10
WeeChat 0.2.3 released.
This version fixes several major bugs of version 0.2.2.
All users of version 0.2.2 should upgrade to this version.
* FlashCode, 2007-01-06
WeeChat 0.2.2 released.
+49
View File
@@ -0,0 +1,49 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# - Find Aspell
# This module finds if libaspell is installed and determines where
# the include files and libraries are.
#
# This code sets the following variables:
#
# ASPELL_INCLUDE_PATH = path to where aspell.h can be found
# ASPELL_LIBRARY = path to where libaspell.so* can be found
IF (ASPELL_FOUND)
# Already in cache, be silent
SET(ASPELL_FIND_QUIETLY TRUE)
ENDIF (ASPELL_FOUND)
FIND_PATH(ASPELL_INCLUDE_PATH
NAMES aspell.h
PATHS /usr/include /usr/local/include /usr/pkg/include
)
FIND_LIBRARY(ASPELL_LIBRARY
NAMES aspell aspell-15
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)
IF (ASPELL_INCLUDE_PATH AND ASPELL_LIBRARY)
SET(ASPELL_FOUND TRUE)
ENDIF (ASPELL_INCLUDE_PATH AND ASPELL_LIBRARY)
MARK_AS_ADVANCED(
ASPELL_INCLUDE_PATH
ASPELL_LIBRARY
)
+61
View File
@@ -0,0 +1,61 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# - Find Gettext
# This module finds if gettext is installed and determines where
# the include files and libraries are.
#
# This code sets the following variables:
#
# GETTEXT_FOUND = is gettext usable on system?
IF(GETTEXT_FOUND)
# Already in cache, be silent
SET(GETTEXT_FIND_QUIETLY TRUE)
ENDIF(GETTEXT_FOUND)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckLibraryExists)
INCLUDE(CheckFunctionExists)
FIND_PATH(LIBINTL_INCLUDE
NAMES libintl.h
PATH /usr/local/include /usr/pkg/include /usr/include
)
SET(CMAKE_REQUIRED_INCLUDES ${LIBINTL_INCLUDE})
CHECK_INCLUDE_FILES(libintl.h HAVE_LIBINTL_H)
IF(HAVE_LIBINTL_H)
CHECK_FUNCTION_EXISTS(dgettext LIBC_HAS_DGETTEXT)
IF(LIBC_HAS_DGETTEXT)
SET(GETTEXT_FOUND TRUE)
ELSE(LIBC_HAS_DGETTEXT)
FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl libintl
PATHS
/usr/local/lib
/usr/lib
)
IF(LIBINTL_LIBRARY)
CHECK_LIBRARY_EXISTS(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
IF(LIBINTL_HAS_DGETTEXT)
SET(GETTEXT_FOUND TRUE)
ENDIF(LIBINTL_HAS_DGETTEXT)
ENDIF(LIBINTL_LIBRARY)
ENDIF(LIBC_HAS_DGETTEXT)
ENDIF(HAVE_LIBINTL_H)
+70
View File
@@ -0,0 +1,70 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# - Find GnuTLS
# This module finds if libgnutls is installed and determines where
# the include files and libraries are.
#
# This code sets the following variables:
#
# GNUTLS_INCLUDE_PATH = path to where <gnutls/gnutls.h> can be found
# GNUTLS_LIBRARY = path to where libgnutls.so* can be found
# GNUTLS_CFLAGS = cflags to use to compile
# GNUTLS_LDFLAGS = ldflags to use to compile
IF(GNUTLS_INCLUDE_PATH AND GNUTLS_LIBRARY)
# Already in cache, be silent
set(GNUTLS_FIND_QUIETLY TRUE)
ENDIF(GNUTLS_INCLUDE_PATH AND GNUTLS_LIBRARY)
FIND_PROGRAM(GNUTLS_CONFIG_EXECUTABLE NAMES libgnutls-config)
EXECUTE_PROCESS(COMMAND ${GNUTLS_CONFIG_EXECUTABLE} --prefix
OUTPUT_VARIABLE GNUTLS_PREFIX
)
EXECUTE_PROCESS(COMMAND ${GNUTLS_CONFIG_EXECUTABLE} --cflags
OUTPUT_VARIABLE GNUTLS_CFLAGS
)
EXECUTE_PROCESS(COMMAND ${GNUTLS_CONFIG_EXECUTABLE} --libs
OUTPUT_VARIABLE GNUTLS_LDFLAGS
)
SET(GNUTLS_POSSIBLE_INCLUDE_PATH "${GNUTLS_PREFIX}/include")
SET(GNUTLS_POSSIBLE_LIB_DIR "${GNUTLS_PREFIX}/lib")
FIND_PATH(GNUTLS_INCLUDE_PATH
NAMES gnutls/gnutls.h
PATHS GNUTLS_POSSIBLE_INCLUDE_PATH
)
FIND_LIBRARY(GNUTLS_LIBRARY
NAMES gnutls
PATHS GNUTLS_POSSIBLE_LIB_DIR
)
IF (GNUTLS_INCLUDE_PATH AND GNUTLS_LIBRARY)
SET(GNUTLS_FOUND TRUE)
ENDIF (GNUTLS_INCLUDE_PATH AND GNUTLS_LIBRARY)
MARK_AS_ADVANCED(
GNUTLS_INCLUDE_PATH
GNUTLS_LIBRARY
GNUTLS_CFLAGS
GNUTLS_LDFLAGS
)
+80
View File
@@ -0,0 +1,80 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# - Find Iconv
# This module finds if libiconv is installed and determines where
# the include files and libraries are.
#
# This code sets the following variables:
#
# ICONV_INCLUDE_PATH = path to where <iconv.h> can be found
# ICONV_LIBRARY = path to where libiconv.so* can be found (on non glibc based systems)
#
# ICONV_FOUND = is iconv usable on system?
IF(ICONV_FOUND)
# Already in cache, be silent
set(ICONV_FIND_QUIETLY TRUE)
ENDIF(ICONV_FOUND)
FIND_PATH(ICONV_INCLUDE_PATH
NAMES iconv.h
PATHS /usr/include /usr/local/include /usr/pkg/include
)
FIND_LIBRARY(ICONV_LIBRARY
NAMES iconv
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)
IF(ICONV_INCLUDE_PATH)
IF(ICONV_LIBRARY)
STRING(REGEX REPLACE "/[^/]*$" "" ICONV_LIB_PATH "${ICONV_LIBRARY}")
CHECK_LIBRARY_EXISTS(iconv libiconv_open ${ICONV_LIB_PATH} ICONV_FOUND)
IF(NOT ICONV_FOUND)
CHECK_LIBRARY_EXISTS(iconv iconv_open ${ICONV_LIB_PATH} ICONV_FOUND)
ENDIF(NOT ICONV_FOUND)
ELSE(ICONV_LIBRARY)
CHECK_FUNCTION_EXISTS(iconv_open ICONV_FOUND)
ENDIF(ICONV_LIBRARY)
ENDIF(ICONV_INCLUDE_PATH)
include(CheckCSourceCompiles)
IF(ICONV_LIBRARY)
SET(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_PATH})
ENDIF(ICONV_LIBRARY)
SET(CMAKE_REQUIRED_FLAGS -Werror)
check_c_source_compiles("
#include <iconv.h>
int main(){
iconv_t conv = 0;
const char* in = 0;
size_t ilen = 0;
char* out = 0;
size_t olen = 0;
iconv(conv, &in, &ilen, &out, &olen);
return 0;
}
" ICONV_2ARG_IS_CONST)
MARK_AS_ADVANCED(
ICONV_INCLUDE_PATH
ICONV_LIBRARY
ICONV_FOUND
)
+82
View File
@@ -0,0 +1,82 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# - Find Lua
# This module finds if liblua is installed and determines where
# the include files and libraries are.
#
# This code sets the following variables:
#
# LUA_INCLUDE_PATH = path to where <lua.h> can be found
# LUA_LIBRARY = path to where liblua.so* (and liblualib.so* for lua <can be found (on non glibc based systems)
#
# LUA_FOUND = is liblua usable on system?
IF(LUA_FOUND)
# Already in cache, be silent
SET(LUA_FIND_QUIETLY TRUE)
ENDIF(LUA_FOUND)
FIND_PATH(
LUA51_INCLUDE_PATH lua.h
PATHS /usr/include /usr/local/include /usr/pkg/include
PATH_SUFFIXES lua51 lua5.1 lua-5.1
)
FIND_LIBRARY(
LUA51_LIBRARY NAMES lua51 lua5.1 lua-5.1
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)
IF(LUA51_INCLUDE_PATH AND LUA51_LIBRARY)
SET(LUA_INCLUDE_PATH "${LUA51_INCLUDE_PATH}")
SET(LUA_LIBRARY "${LUA51_LIBRARY}")
SET(LUA_VERSION "5.1")
SET(LUA_FOUND TRUE)
ELSE(LUA51_INCLUDE_PATH AND LUA51_LIBRARY)
FIND_PATH(
LUA50_INCLUDE_PATH lua.h
PATHS /usr/include /usr/local/include /usr/pkg/include
PATH_SUFFIXES lua50 lua5.0 lua-5.0 lua
)
FIND_LIBRARY(
LUA50_LIBRARY NAMES lua50 lua5.0 lua-5.0 lua
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)
FIND_LIBRARY(
LUALIB50_LIBRARY NAMES lualib50 lualib5.0 lualib-5.0 lualib
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)
IF(LUA50_INCLUDE_PATH AND LUA50_LIBRARY AND LUALIB50_LIBRARY)
SET(LUA_INCLUDE_PATH "${LUA50_INCLUDE_PATH}")
SET(LUA_LIBRARY "${LUA50_LIBRARY}")
SET(LUALIB_LIBRARY "${LUALIB50_LIBRARY}")
SET(LUA_VERSION "5.0")
SET(LUA_FOUND TRUE)
ENDIF(LUA50_INCLUDE_PATH AND LUA50_LIBRARY AND LUALIB50_LIBRARY)
ENDIF(LUA51_INCLUDE_PATH AND LUA51_LIBRARY)
MARK_AS_ADVANCED(
LUA_INCLUDE_PATH
LUA_LIBRARY
LUALIB_LIBRARY
# LUA_VERSION
)
+23
View File
@@ -0,0 +1,23 @@
IF(NCURSES_FOUND)
SET(NCURSES_FIND_QUIETLY TRUE)
ENDIF(NCURSES_FOUND)
FIND_PATH(NCURSES_INCLUDE_PATH
NAMES ncurses.h curses.h
PATHS /usr/include /usr/local/include /usr/pkg/include
)
FIND_LIBRARY(NCURSES_LIBRARY
NAMES ncursesw ncurses
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)
IF (NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY)
SET(NCURSES_FOUND TRUE)
ENDIF(NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY)
MARK_AS_ADVANCED(
NCURSES_INCLUDE_PATH
NCURSES_LIBRARY
)
+83
View File
@@ -0,0 +1,83 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# - Find Perl libraries
# This module finds if Perl is installed and determines where the include files
# and libraries are. It also determines what the name of the library is. This
# code sets the following variables:
#
# PERL_EXECUTABLE = full path to the perl binary
# PERL_INCLUDE_PATH = path to where perl.h can be found
# PERL_LIBRARY = path to where libperl.so* can be found
# PERL_CFLAGS = perl compiler options for compiling
# PERL_LFLAGS = perl compiler options for linking
IF(PERL_FOUND)
# Already in cache, be silent
SET(PERL_FIND_QUIETLY TRUE)
ENDIF(PERL_FOUND)
FIND_PROGRAM(PERL_EXECUTABLE
NAMES perl perl5
PATHS /usr/bin /usr/local/bin /usr/pkg/bin
)
IF(PERL_EXECUTABLE)
EXECUTE_PROCESS(
COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \"\$Config{archlibexp}/CORE\""
OUTPUT_VARIABLE PERL_INTERNAL_DIR
)
EXECUTE_PROCESS(
COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ccopts
OUTPUT_VARIABLE PERL_CFLAGS
)
EXECUTE_PROCESS(
COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ldopts
OUTPUT_VARIABLE PERL_LFLAGS
)
# remove the new lines from the output by replacing them with empty strings
STRING(REPLACE "\n" "" PERL_INTERNAL_DIR "${PERL_INTERNAL_DIR}")
STRING(REPLACE "\n" "" PERL_CFLAGS "${PERL_CFLAGS}")
STRING(REPLACE "\n" "" PERL_LFLAGS "${PERL_LFLAGS}")
FIND_PATH(PERL_INCLUDE_PATH
NAMES perl.h
PATHS ${PERL_INTERNAL_DIR}
)
FIND_LIBRARY(PERL_LIBRARY
NAMES perl
PATHS /usr/lib /usr/local/lib /usr/pkg/lib ${PERL_INTERNAL_DIR}
)
IF(PERL_LIBRARY AND PERL_INCLUDE_PATH)
SET(PERL_FOUND TRUE)
ENDIF(PERL_LIBRARY AND PERL_INCLUDE_PATH)
MARK_AS_ADVANCED(
PERL_EXECUTABLE
PERL_INCLUDE_PATH
PERL_LIBRARY
PERL_CFLAGS
PERL_LFLAGS
)
ENDIF(PERL_EXECUTABLE)
+80
View File
@@ -0,0 +1,80 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# - Find Python
# This module finds if Python is installed and determines where the include files
# and libraries are. It also determines what the name of the library is. This
# code sets the following variables:
#
# PYTHON_EXECUTABLE = full path to the python binary
# PYTHON_INCLUDE_PATH = path to where python.h can be found
# PYTHON_LIBRARY = path to where libpython.so* can be found
# PYTHON_LFLAGS = python compiler options for linking
IF(PYTHON_FOUND)
# Already in cache, be silent
SET(PYTHON_FIND_QUIETLY TRUE)
ENDIF(PYTHON_FOUND)
FIND_PROGRAM(PYTHON_EXECUTABLE
NAMES python python2.5 python2.4 python2.3 python2.2
PATHS /usr/bin /usr/local/bin /usr/pkg/bin
)
IF(PYTHON_EXECUTABLE)
EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print get_config_var('CONFINCLUDEPY')"
OUTPUT_VARIABLE PYTHON_INC_DIR
)
EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print get_config_var('LIBPL')"
OUTPUT_VARIABLE PYTHON_POSSIBLE_LIB_PATH
)
EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print get_config_var('LINKFORSHARED')"
OUTPUT_VARIABLE PYTHON_LFLAGS
)
# remove the new lines from the output by replacing them with empty strings
STRING(REPLACE "\n" "" PYTHON_INC_DIR "${PYTHON_INC_DIR}")
STRING(REPLACE "\n" "" PYTHON_POSSIBLE_LIB_PATH "${PYTHON_POSSIBLE_LIB_PATH}")
STRING(REPLACE "\n" "" PYTHON_LFLAGS "${PYTHON_LFLAGS}")
FIND_PATH(PYTHON_INCLUDE_PATH
NAMES Python.h
PATHS ${PYTHON_INC_DIR}
)
FIND_LIBRARY(PYTHON_LIBRARY
NAMES python python2.5 python2.4 python2.3 python2.2
PATHS ${PYTHON_POSSIBLE_LIB_PATH}
)
IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_PATH)
SET(PYTHON_FOUND TRUE)
ENDIF(PYTHON_LIBRARY AND PYTHON_INCLUDE_PATH)
MARK_AS_ADVANCED(
PYTHON_EXECUTABLE
PYTHON_INCLUDE_PATH
PYTHON_LIBRARY
PYTHON_LFLAGS
)
ENDIF(PYTHON_EXECUTABLE)
+78
View File
@@ -0,0 +1,78 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# - Find Ruby
# This module finds if Ruby is installed and determines where the include files
# and libraries are. It also determines what the name of the library is. This
# code sets the following variables:
#
# RUBY_EXECUTABLE = full path to the ruby binary
# RUBY_INCLUDE_PATH = path to where ruby.h can be found
# RUBY_LIBRARY = path to where libruby.so* can be found
IF(RUBY_FOUND)
# Already in cache, be silent
SET(RUBY_FIND_QUIETLY TRUE)
ENDIF(RUBY_FOUND)
FIND_PROGRAM(RUBY_EXECUTABLE
NAMES ruby ruby1.9 ruby19 ruby1.8 ruby18 ruby1.6 ruby16
PATHS /usr/bin /usr/local/bin /usr/pkg/bin
)
IF(RUBY_EXECUTABLE)
EXECUTE_PROCESS(
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['archdir']"
OUTPUT_VARIABLE RUBY_ARCH_DIR
)
EXECUTE_PROCESS(
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['libdir']"
OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH
)
EXECUTE_PROCESS(
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['rubylibdir']"
OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH
)
# remove the new lines from the output by replacing them with empty strings
STRING(REPLACE "\n" "" RUBY_ARCH_DIR "${RUBY_ARCH_DIR}")
STRING(REPLACE "\n" "" RUBY_POSSIBLE_LIB_PATH "${RUBY_POSSIBLE_LIB_PATH}")
STRING(REPLACE "\n" "" RUBY_RUBY_LIB_PATH "${RUBY_RUBY_LIB_PATH}")
FIND_PATH(RUBY_INCLUDE_PATH
NAMES ruby.h
PATHS ${RUBY_ARCH_DIR}
)
FIND_LIBRARY(RUBY_LIBRARY
NAMES ruby ruby1.6 ruby16 ruby1.8 ruby18 ruby1.9 ruby19
PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH}
)
IF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
SET(RUBY_FOUND TRUE)
ENDIF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
MARK_AS_ADVANCED(
RUBY_EXECUTABLE
RUBY_LIBRARY
RUBY_INCLUDE_PATH
)
ENDIF(RUBY_EXECUTABLE)
+29
View File
@@ -0,0 +1,29 @@
#cmakedefine HAVE_ARPA_INET_H
#cmakedefine HAVE_LIBINTL_H
#cmakedefine HAVE_LIMITS_H
#cmakedefine HAVE_LOCALE_H
#cmakedefine HAVE_NETDB_H
#cmakedefine HAVE_NETINET_IN_H
#cmakedefine HAVE_STDLIB_H
#cmakedefine HAVE_STRING_H
#cmakedefine HAVE_SYS_SOCKET_H
#cmakedefine HAVE_SYS_TIME_H
#cmakedefine HAVE_SYS_TYPES_H
#cmakedefine HAVE_UNISTD_H
#cmakedefine HAVE_PWD_H
#cmakedefine HAVE_ERRNO_H
#cmakedefine HAVE_REGEX_H
#cmakedefine HAVE_WCHAR_H
#cmakedefine HAVE_SYS_FILE_H
#cmakedefine HAVE_FLOCK
#cmakedefine HAVE_LANGINFO_CODESET
#cmakedefine HAVE_STRNDUP
#cmakedefine ICONV_2ARG_IS_CONST 1
#define PACKAGE_VERSION "@VERSION@"
#define PACKAGE "@PROJECT_NAME@"
#define PACKAGE_NAME "@PROJECT_NAME@"
#define PACKAGE_STRING "@PKG_STRING@"
#define WEECHAT_LIBDIR "@LIBDIR@"
#define WEECHAT_SHAREDIR "@SHAREDIR@"
#define LOCALEDIR "@LOCALEDIR@"
#define _GNU_SOURCE 1
+3 -2
View File
@@ -19,10 +19,10 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.56)
AC_INIT(WeeChat, 0.2.2, flashcode@flashtux.org)
AC_INIT(WeeChat, 0.2.5, flashcode@flashtux.org)
AC_CONFIG_SRCDIR([src/common/weechat.c])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([weechat], [0.2.2])
AM_INIT_AUTOMAKE([weechat], [0.2.5])
# Checks for programs
AC_PROG_CC
@@ -795,6 +795,7 @@ AC_OUTPUT([Makefile
doc/ru/Makefile
doc/pl/Makefile
doc/cs/Makefile
doc/sco/Makefile
src/Makefile
src/common/Makefile
src/irc/Makefile
+167
View File
@@ -0,0 +1,167 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
SET(DOC_LANGS
cs
de
en
fr
pl
ru
sco
)
FIND_PROGRAM(
COPY cp
PATHS /bin /usr/bin /usr/local/bin /usr/pkg/bin
)
FIND_PROGRAM(
XSLTPROC xsltproc
PATHS /bin /usr/bin /usr/local/bin /usr/pkg/bin
)
FIND_PROGRAM(
DBLATEX dblatex
PATHS /bin /usr/bin /usr/local/bin /usr/pkg/bin
)
FIND_FILE(DOC_XSL_PREFIX chunk.xsl PATHS
/usr/share/xml/docbook/stylesheet/nwalsh/
/usr/share/xml/docbook/xsl-stylesheets-1.69/
PATH_SUFFIXES html
DOC "Path to nwalsh xsl stylesheet"
)
STRING(REPLACE "/html/chunk.xsl" "" DOC_XSL_PREFIX "${DOC_XSL_PREFIX}")
IF(XSLTPROC AND DOC_XSL_PREFIX AND COPY)
SET(BUILD_HTML TRUE)
ENDIF(XSLTPROC AND DOC_XSL_PREFIX AND COPY)
IF(DBLATEX AND COPY)
SET(BUILD_PDF TRUE)
ENDIF(DBLATEX AND COPY)
IF(BUILD_HTML)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/weechat-html.xsl
@ONLY
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html-one.xsl.in
${CMAKE_CURRENT_BINARY_DIR}/weechat-html-one.xsl
@ONLY
)
ENDIF(BUILD_HTML)
IF(BUILD_HTML OR BUILD_PDF)
EXECUTE_PROCESS(
COMMAND date "+%F %T"
OUTPUT_VARIABLE DOC_DATE
)
STRING(REPLACE "\n" "" DOC_DATE "${DOC_DATE}")
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
${CMAKE_CURRENT_BINARY_DIR}/date.xml
@ONLY
)
FOREACH(dlang ${DOC_LANGS})
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml)
IF(BUILD_HTML)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang})
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}/index.html ${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang}/weechat.${dlang}.html
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/irc_commands.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/key_functions.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_commands.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_BINARY_DIR}/date.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/weechat-doc.css" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/weechat-doc.css" "${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang}"
COMMAND ${XSLTPROC} ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}/ ${CMAKE_CURRENT_BINARY_DIR}/weechat-html.xsl ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build/weechat.${dlang}.xml
COMMAND ${XSLTPROC} ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang}/weechat.${dlang}.html ${CMAKE_CURRENT_BINARY_DIR}/weechat-html-one.xsl ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build/weechat.${dlang}.xml
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/irc_commands.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/key_functions.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_commands.xml
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html-one.xsl.in
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html.xsl.in
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
${CMAKE_CURRENT_SOURCE_DIR}/weechat-doc.css
COMMENT "Building html doc (${dlang})"
)
ADD_CUSTOM_TARGET(doc-html-${dlang} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}/index.html)
ADD_CUSTOM_TARGET(doc-html-one-${dlang} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html-one/${dlang}/weechat.${dlang}.html)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/${dlang} DESTINATION share/doc/${PROJECT_NAME}/html)
ENDIF(BUILD_HTML)
IF(BUILD_PDF)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang})
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}/weechat.${dlang}.pdf
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/irc_commands.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/key_functions.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_commands.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_BINARY_DIR}/date.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${DBLATEX} ARGS -c ${CMAKE_CURRENT_SOURCE_DIR}/dblatex.conf -o ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}/weechat.${dlang}.pdf ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build/weechat.${dlang}.xml
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/irc_commands.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/key_functions.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_commands.xml
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
${CMAKE_CURRENT_SOURCE_DIR}/weechat-html-one.xsl.in
${CMAKE_CURRENT_SOURCE_DIR}/date.xml.in
COMMENT "Building pdf doc (${dlang})"
)
ADD_CUSTOM_TARGET(doc-pdf-${dlang} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}/weechat.${dlang}.pdf)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}/weechat.${dlang}.pdf DESTINATION share/doc/${PROJECT_NAME})
ENDIF(BUILD_PDF)
ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat.${dlang}.xml)
ENDFOREACH(dlang ${DOC_LANGS})
ENDIF(BUILD_HTML OR BUILD_PDF)
FOREACH(dlang ${DOC_LANGS})
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_quickstart.${dlang}.txt)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_quickstart.${dlang}.txt DESTINATION share/doc/${PROJECT_NAME})
ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/weechat_quickstart.${dlang}.txt)
ENDFOREACH(dlang ${DOC_LANGS})
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1 DESTINATION share/man/man1)
+1 -1
View File
@@ -15,7 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
SUBDIRS = . en fr de ru pl cs
SUBDIRS = . en fr de ru pl cs sco
man_MANS = weechat-curses.1
+1
View File
@@ -0,0 +1 @@
<pubdate>@DOC_DATE@</pubdate>
+16 -2
View File
@@ -194,6 +194,13 @@
<entry>'[]-^'</entry>
<entry>Zeichen, die bei der Nickvervollständigung ignoriert werden</entry>
</row>
<row>
<entry><option>look_nick_completion_smart</option></entry>
<entry>Boolean</entry>
<entry>eine beliebige Zeichenfolge</entry>
<entry>'on'</entry>
<entry>Intelligente vervollständigung der Nicknamen (vervollständigt zuerst mit dem letzten Nick, der einen angesprochen hat)</entry>
</row>
<row>
<entry><option>look_nick_complete_first</option></entry>
<entry>Boolean</entry>
@@ -304,7 +311,7 @@
<entry>Farbe</entry>
<entry>Curses- oder Gtk-Farben</entry>
<entry>'lightmagenta'</entry>
<entry>Color for '+' when scrolling topic</entry>
<entry>Farbe des '+' beim Scrolling des Topics</entry>
</row>
<row>
<entry><option>col_title_bg</option></entry>
@@ -551,6 +558,13 @@
<entry>'cyan'</entry>
<entry>Farbe des Trennzeichens in der Eingabezeile</entry>
</row>
<row>
<entry><option>col_input_text_not_found</option></entry>
<entry>Farbe</entry>
<entry>Curses- oder Gtk-Farben</entry>
<entry>'red'</entry>
<entry>Farbe für den Text nicht gefunden</entry>
</row>
<row>
<entry><option>col_input_bg</option></entry>
<entry>Farbe</entry>
@@ -906,7 +920,7 @@
<entry>Ganzzahl</entry>
<entry>zwischen 0 und 5</entry>
<entry>2</entry>
<entry>Anti-flood: # seconds between two user messages (0 = no anti-flood)</entry>
<entry>Anti-flood: # Sekunden zwischen zwei Benutzernachrichten (0 = kein anti-flood)</entry>
</row>
<row>
<entry><option>irc_fifo_pipe</option></entry>
+10 -2
View File
@@ -119,11 +119,11 @@
</row>
<row>
<entry><literal>scroll_topic_left</literal></entry>
<entry>scroll left topic</entry>
<entry>Topic nach links scrollen</entry>
</row>
<row>
<entry><literal>scroll_topic_right</literal></entry>
<entry>scroll right topic</entry>
<entry>Topic nach rechts scrollen</entry>
</row>
<row>
<entry><literal>nick_beginning</literal></entry>
@@ -197,3 +197,11 @@
<entry><literal>grab_key</literal></entry>
<entry>Tastencode ermitteln und einfügen</entry>
</row>
<row>
<entry><literal>insert</literal></entry>
<entry>füge eine Zeichenkette in der Befehlszeile ein</entry>
</row>
<row>
<entry><literal>search_text</literal></entry>
<entry>suche Text im Pufferverlauf</entry>
</row>
+484 -66
View File
@@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<bookinfo>
<title>WeeChat 0.2.2 - User guide</title>
<title>WeeChat 0.2.5 - User guide</title>
<subtitle>Schneller, leichter und erweiterbarer IRC Client</subtitle>
<author>
@@ -48,7 +48,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
&date.xml;
<copyright>
<year>2006</year>
<year>2007</year>
<holder>Sébastien Helleu</holder>
</copyright>
@@ -95,14 +95,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<!-- =========================== Introduction =========================== -->
<chapter id="chapIntroduction">
<title> Einführung </title>
<title>Einführung</title>
<para>
Dieses Kapitel beschreibt WeeChat und die Vorraussetzungen für die Installation.
</para>
<section id="secDescription">
<title> Beschreibung </title>
<title>Beschreibung</title>
<para>
WeeChat (Wee Enhanced Environment for Chat) ist ein freier
@@ -166,10 +166,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secPreRequis">
<title> Vorraussetzungen </title>
<title>Vorraussetzungen</title>
<para>
Um WeeChat zu installieren, werden <emphasis> gebraucht </emphasis>:
Um WeeChat zu installieren, werden <emphasis>gebraucht</emphasis>:
<itemizedlist>
<listitem>
<para>
@@ -224,7 +224,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</para>
<section id="secBinaryPackages">
<title> Binäre Pakete </title>
<title>Binäre Pakete</title>
<para>
Binäre Pakete sind für die folgenden Distributionen verfügbar:
@@ -257,7 +257,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secSourcePackage">
<title> Quellcode-Pakete </title>
<title>Quellcode-Pakete</title>
<para>
Alles was sie tun müssen, ist in einer Konsole oder einem Terminal aufzurufen:
@@ -303,7 +303,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<!-- ============================== Usage =============================== -->
<chapter id="chapUsage">
<title> Nutzung </title>
<title>Nutzung</title>
<para>
Dieses Kapitel erklärt, wie Weechat zu starten ist, die zu verwendenden
@@ -452,15 +452,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secKeyboardShortcuts">
<title> Tastenkombinationen </title>
<title>Tastenkombinationen</title>
<para>
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry> Tastenkombination </entry>
<entry> Wirkung </entry>
<entry>Tastenkombination</entry>
<entry>Wirkung</entry>
</row>
</thead>
<tbody>
@@ -512,6 +512,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Fenster neu aufbauen
</entry>
</row>
<row>
<entry>Strg + R</entry>
<entry>
Suche nach Text im Pufferverlauf
(zwei Mal: suche nach dem genauen Text)
</entry>
</row>
<row>
<entry>Strg + T</entry>
<entry>
@@ -565,12 +572,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<entry>Eingabe / Strg + J / Strg + M</entry>
<entry>
Führe ein Kommando aus oder sende eine Nachricht
(im Suchmodus: Suche anhalten)
</entry>
</row>
<row>
<entry>Hoch / Runter</entry>
<entry>
Rufe das letzte Kommando/die letzte Nachricht wieder auf
(im Suchmodus: suche rückwärts/vorwärts)
</entry>
</row>
<row>
@@ -587,19 +596,19 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</entry>
</row>
<row>
<entry>Alt + Seite hoch / Alt + Seite runter </entry>
<entry>Alt + Seite hoch / Alt + Seite runter</entry>
<entry>
Ein paar Zeilen hoch / runter im Verlauf des Buffers
</entry>
</row>
<row>
<entry> Alt + Pos1 / Alt + Ende </entry>
<entry>Alt + Pos1 / Alt + Ende</entry>
<entry>
Gehe zum Anfang / Ende des Puffers
</entry>
</row>
<row>
<entry> F5 / Alt + Links </entry>
<entry>F5 / Alt + Links</entry>
<entry>
Gehe zum vorherigen Puffer
</entry>
@@ -705,7 +714,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<row>
<entry>Alt + J dann Alt + X</entry>
<entry>
Schalte in den ersten Channel des nächsten Puffers
Schalte in den ersten Channel des nächsten Servers
(oder in den Server-Puffer wenn keine Channel offen ist)
</entry>
</row>
@@ -773,7 +782,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secCommandLine">
<title> Kommandozeile </title>
<title>Kommandozeile</title>
<para>
Die WeeChat Kommandozeile (am Ende des Fensters) lässt sie Nachrichten an einen
@@ -890,11 +899,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</row>
<row>
<entry>03</entry>
<entry>dunkles Grün </entry>
<entry>dunkles Grün</entry>
</row>
<row>
<entry>04</entry>
<entry>helles Rot </entry>
<entry>helles Rot</entry>
</row>
<row>
<entry>05</entry>
@@ -902,43 +911,43 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</row>
<row>
<entry>06</entry>
<entry> Magenta </entry>
<entry>Magenta</entry>
</row>
<row>
<entry>07</entry>
<entry> Orange </entry>
<entry>Orange</entry>
</row>
<row>
<entry>08</entry>
<entry> Gelb </entry>
<entry>Gelb</entry>
</row>
<row>
<entry>09</entry>
<entry> helles Grün</entry>
<entry>helles Grün</entry>
</row>
<row>
<entry>10</entry>
<entry> Cyan </entry>
<entry>Cyan</entry>
</row>
<row>
<entry>11</entry>
<entry> helles Cyan</entry>
<entry>helles Cyan</entry>
</row>
<row>
<entry>12</entry>
<entry> helles Blau </entry>
<entry>helles Blau</entry>
</row>
<row>
<entry>13</entry>
<entry> helles Magenta </entry>
<entry>helles Magenta</entry>
</row>
<row>
<entry>14</entry>
<entry> Grau </entry>
<entry>Grau</entry>
</row>
<row>
<entry>15</entry>
<entry> helles Grau (Weiss)</entry>
<entry>helles Grau (Weiss)</entry>
</row>
</tbody>
</tgroup>
@@ -955,14 +964,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secWeeChatIRCCommands">
<title>WeeChat / IRC Kommandos </title>
<title>WeeChat / IRC Kommandos</title>
<para>
Dieses Kapitel listet alle WeeChat- und IRC-Kommandos auf.
</para>
<section id="secWeeChatCommands">
<title> WeeChat Kommandos </title>
<title>WeeChat Kommandos</title>
<para>
&weechat_commands.xml;
@@ -971,15 +980,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secKeyFunctions">
<title> Funktionen </title>
<title>Funktionen</title>
<para>
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry> Funktion </entry>
<entry> Beschreibung </entry>
<entry>Funktion</entry>
<entry>Beschreibung</entry>
</row>
</thead>
<tbody>
@@ -994,7 +1003,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secIRCCommands">
<title> IRC Kommandos </title>
<title>IRC Kommandos</title>
<para>
&irc_commands.xml;
@@ -1005,7 +1014,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secConfigurationFile">
<title> Konfigurationsdatei </title>
<title>Konfigurationsdatei</title>
<para>
Liste der Optionen für die Konfigurationsdatei:
@@ -1013,11 +1022,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<tgroup cols="5">
<thead>
<row>
<entry> Option </entry>
<entry> Typ </entry>
<entry> Wert </entry>
<entry> Default </entry>
<entry> Beschreibung </entry>
<entry>Option</entry>
<entry>Typ</entry>
<entry>Wert</entry>
<entry>Default</entry>
<entry>Beschreibung</entry>
</row>
</thead>
<tbody>
@@ -1035,8 +1044,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<tgroup cols="2">
<thead>
<row>
<entry> Schlüsselwort </entry>
<entry> Farbe </entry>
<entry>Schlüsselwort</entry>
<entry>Farbe</entry>
</row>
</thead>
<tbody>
@@ -1046,59 +1055,59 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</row>
<row>
<entry><literal>black</literal></entry>
<entry> Schwarz </entry>
<entry>Schwarz</entry>
</row>
<row>
<entry><literal>red</literal></entry>
<entry> dunkles Rot </entry>
<entry>dunkles Rot</entry>
</row>
<row>
<entry><literal>lightred</literal></entry>
<entry> helles Rot </entry>
<entry>helles Rot</entry>
</row>
<row>
<entry><literal>green</literal></entry>
<entry> dunkles Grün </entry>
<entry>dunkles Grün</entry>
</row>
<row>
<entry><literal>lightgreen</literal></entry>
<entry> helles Grün </entry>
<entry>helles Grün</entry>
</row>
<row>
<entry><literal>brown</literal></entry>
<entry> Braun </entry>
<entry>Braun</entry>
</row>
<row>
<entry><literal>yellow</literal></entry>
<entry> Gelb </entry>
<entry>Gelb</entry>
</row>
<row>
<entry><literal>blue</literal></entry>
<entry> dunkles Blau </entry>
<entry>dunkles Blau</entry>
</row>
<row>
<entry><literal>lightblue</literal></entry>
<entry> helles Blau </entry>
<entry>helles Blau</entry>
</row>
<row>
<entry><literal>magenta</literal></entry>
<entry> dunkles Magenta </entry>
<entry>dunkles Magenta</entry>
</row>
<row>
<entry><literal>lightmagenta</literal></entry>
<entry> helles Magenta </entry>
<entry>helles Magenta</entry>
</row>
<row>
<entry><literal>cyan</literal></entry>
<entry> dunkles Cyan </entry>
<entry>dunkles Cyan</entry>
</row>
<row>
<entry><literal>lightcyan</literal></entry>
<entry> helles Cyan </entry>
<entry>helles Cyan</entry>
</row>
<row>
<entry><literal>white</literal></entry>
<entry> Weiss </entry>
<entry>Weiss</entry>
</row>
</tbody>
</tgroup>
@@ -1107,8 +1116,119 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secCharset">
<title>Zeichensatz Plugin</title>
<para>
Das Zeichensatz-Plugin ermöglicht das Ver- und Entschlüsseln von Daten
auf 3 Ebenen: Global, pro Server oder pro Channel.
Das Plugin ist optional, wird jedoch empfohlen: wenn es nicht geladen ist,
kann WeeChat nur UTF-8-Daten lesen und schreiben.
</para>
<para>
Das Zeichensatz-Plugin sollte beim Start von WeeChat automatisch geladen
werden.
Um sicherzustellen, dass das Plugin geladen wurde, versuchen Sie:
"<literal>/charset</literal>".
Wenn der Befehl nicht gefunden wird, laden Sie das Plugin manuell mit dem Befehl:
<screen>/plugin load charset</screen>
Wenn das Plugin nicht gefunden wird, kompilieren Sie WeeChat erneut mit Plugin-
und Zeichensatz-Support
</para>
<para>
Wenn das Zeichensatz-Plugin startet, zeigt es den Terminalzeichensatz
und den internen Zeichensatz an. Der Terminalzeichensatz hängt von
den LOCALE-Einstellungen ab, der interne ist UTF-8.
Zum Beispiel:
<screen>
-P- Charset plugin starting, terminal charset: ISO-8859-15 (WeeChat internal: UTF-8)
</screen>
</para>
<section id="secCharsetSettings">
<title>Einstellungen</title>
<itemizedlist>
<listitem>
<para>
Um den globalen Zeichensatz zum Kodieren und Dekodieren festzulegen, benutzen Sie den
"<literal>/setp</literal>" Befehl.
Zum Beispiel:
<screen>
/setp charset.global.decode = ISO-8859-15
/setp charset.global.encode = ISO-8859-15
</screen>
Wenn der Zeichensatz zum Dekodieren nicht gesetzt ist (z.B. beim ersten
Start des Plugins), wird es automatisch auf den Terminalzeichensatz
eingestellt (wenn es nicht UTF-8 ist) oder als Voreinstellung auf
"<literal>ISO-8859-1</literal>" gesetzt.
Der voreingestellte Enkodierungszeichensatz ist leer, so dass in der
Voreinstellung mit dem internen Zeichensatz (UTF-8) enkodiert wird.
</para>
</listitem>
<listitem>
<para>
Um den Serverzeichensatz festzulegen, benutzen Sie den
"<literal>/charset</literal>"-Befehl im Server-Puffer.
Wenn Sie nur einen Zeichensatz vorgeben, wird dieser automatisch
zum Enkodieren und Dekodieren verwendet.
Zum Beispiel:
<screen>/charset ISO-8859-15</screen>
Das ist gleichbedeutend mit:
<screen>
/charset decode ISO-8859-15
/charset encode ISO-8859-15
</screen>
</para>
</listitem>
<listitem>
<para>
Um den zeichensatz im Channel (oder einem privatem Chat) festzulegen,
müssen Sie den gleichen Befehl wie für den Server benutzen, jedoch in
dem Channel-Puffer (oder Query-Puffer)
</para>
</listitem>
</itemizedlist>
</section>
<section id="secCharsetFAQ">
<title>FAQ</title>
<para>
Wenn Sie Probleme mit den Zeichen oder dem Zeichensatz-Plugin haben:
<itemizedlist>
<listitem>
<para>
überprüfen Sie, ob weechat-curses zu libcursesw gelinkt ist
(Achtung: Wird bei den meisten, jedoch nicht bei allen Distributionen benötigt):
<screen>ldd /pfad/zu/weechat-curses</screen>
</para>
</listitem>
<listitem>
<para>
überprüfen Sie die Zeichensatz-Zeile im Server-Puffer, dort sollten ISO-XXXXXX
oder UTF-8 für den Terminal-Zeichensatz stehen. Wenn Sie dort ANSI_X3.4-1968
oder andere Werte sehen, sind Ihre LOCALES eventuell falsch eingestellt.
</para>
</listitem>
<listitem>
<para>
Setze die globalen Dekodier-Einstellungen, z.B.:
<screen>/setp charset.global.decode = ISO-8859-15</screen>
</para>
</listitem>
</itemizedlist>
</para>
</section>
</section>
<section id="secFIFOpipe">
<title> Remote-Schnittstelle (FIFO pipe) </title>
<title>Remote-Schnittstelle (FIFO pipe)</title>
<para>
Sie können WeeChat auch extern steuern, indem sie Kommandos oder Text
@@ -1215,7 +1335,7 @@ fi
</section>
<section id="secWriteAPlugin">
<title> Ein Plugin schreiben </title>
<title>Ein Plugin schreiben</title>
<para>
Das Plugin muss die Datei "weechat-plugin.h" einbinden (verfügbar
@@ -1232,7 +1352,7 @@ fi
<thead>
<row>
<entry>Variable</entry>
<entry> Beschreibung </entry>
<entry>Beschreibung</entry>
</row>
</thead>
<tbody>
@@ -2047,6 +2167,13 @@ plugin->log (plugin, "freenode", "#weechat", "test");
Plugins weitergegeben
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal>: Funktion
erfolgreich vervollständigt und eine Hervorhebung bei den
empfangenen Nachrichten eingebaut
</para>
</listitem>
</itemizedlist>
</para>
<para>
@@ -2153,7 +2280,7 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
</row>
<row>
<entry><literal>%C</literal></entry>
<entry>Channels des gegenwärtigen Servers</entry>
<entry>alle channels (inklusive Queries)</entry>
</row>
<row>
<entry><literal>%f</literal></entry>
@@ -2179,6 +2306,12 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
<entry><literal>%m</literal></entry>
<entry>Nicknamen des gegenwärtigen Servers</entry>
</row>
<row>
<entry><literal>%M</literal></entry>
<entry>
Nicks auf dem gegenwärtigen Server (in allen offenen Channeln)
</entry>
</row>
<row>
<entry><literal>%n</literal></entry>
<entry>Nicknamen des gegenwärtigen Channels</entry>
@@ -2511,6 +2644,119 @@ keyb_handler = plugin->keyboard_handler_add (plugin, &amp;my_keyb);
</para>
</section>
<section id="secAPI_event_handler_add">
<title>event_handler_add</title>
<para>
Prototyp:
<command>
t_plugin_handler *event_handler_add (t_weechat_plugin
*plugin, char *event, t_plugin_handler_func *function,
char *handler_args, void *handler_pointer)
</command>
</para>
<para>
Fügt einen Ereignishandler hinzu, der aufgerufen wird, wenn ein Ereignis eintritt.
</para>
<para>
Argumente:
<itemizedlist>
<listitem>
<para>
<option>plugin</option>: Zeiger auf Plugin-Strukture
</para>
</listitem>
<listitem>
<para>
<option>event</option> : Ereignis, siehe folgende Tabelle:
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Ereignis</entry>
<entry>Beschreibung</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>buffer_open</literal></entry>
<entry>ein Puffer wurde geöffnet</entry>
</row>
<row>
<entry><literal>buffer_close</literal></entry>
<entry>ein Puffer wurde geschlossen</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</listitem>
<listitem>
<para>
<option>function</option>: aufgerufene Funktion
</para>
<para>
Es wird folgender Prototyp verwendet:
<command>
int my_function (t_weechat_plugin *plugin,
int argc, char **argv,
char *handler_args, void *handler_pointer)
</command>
</para>
<para>
Argument argc wird auf 1 gesetzt, argv[0] ist die Nummer des Puffers, der
geöffnet oder geschlossen wird.
</para>
</listitem>
<listitem>
<para>
<option>handler_args</option>: Argument, die an die aufgerufene
Funktion übergeben werden
</para>
</listitem>
<listitem>
<para>
<option>handler_pointer</option>: Pointer, der an die aufgerufene
Funktion übergeben werden
</para>
</listitem>
</itemizedlist>
</para>
<para>
Rückgabewert: Pointer auf den neuen Ereignishandler.
</para>
<para>
Anmerkung: die aufgerufene Function muss einen der folgenden Werte zurückgeben:
<itemizedlist>
<listitem>
<para>
<literal>PLUGIN_RC_KO</literal>: Funktion fehlgeschlagen
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK</literal>: Funktion erfolgreich beendet
</para>
</listitem>
</itemizedlist>
</para>
<para>
Beispiel:
<screen>
int my_event (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
{
plugin->print (plugin, NULL, NULL, "my_event");
return PLUGIN_RC_OK;
}
...
t_plugin_handler *event_handler;
event_handler = plugin->event_handler_add (plugin, "buffer_open",
&amp;my_event);
</screen>
</para>
</section>
<section id="secAPI_handler_remove">
<title>handler_remove</title>
@@ -2887,6 +3133,12 @@ plugin->exec_command (plugin, "freenode", "#weechat", "hello");
<entry><literal>server</literal></entry>
<entry>Name des Servers</entry>
</row>
<row>
<entry><literal>type</literal></entry>
<entry>
Puffertyp: 0=standard, 1=DCC, 2=raw IRC data
</entry>
</row>
<row>
<entry><literal>away</literal></entry>
<entry>Status des "away"-Flags</entry>
@@ -2923,7 +3175,7 @@ plugin->exec_command (plugin, "freenode", "#weechat", "hello");
</row>
<row>
<entry><literal>weechat_libdir</literal></entry>
<entry>WeeChat-Systemverzeichnis (Bibliotheken) </entry>
<entry>WeeChat-Systemverzeichnis (Bibliotheken)</entry>
</row>
<row>
<entry><literal>weechat_sharedir</literal></entry>
@@ -4270,7 +4522,7 @@ else
<row>
<entry>int</entry>
<entry><literal>type</literal></entry>
<entry>Puffertyp: 0=standard, 1=dcc, 2=raw IRC data</entry>
<entry>Puffertyp: 0=standard, 1=DCC, 2=raw IRC data</entry>
</row>
<row>
<entry>int</entry>
@@ -5321,6 +5573,13 @@ end
an WeeChat noch an andere Plugins übergeben
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal>: Funktion
erfolgreich vervollständigt und eine Hervorhebung bei den
empfangenen Nachrichten eingebaut
</para>
</listitem>
</itemizedlist>
</para>
</section>
@@ -5630,7 +5889,7 @@ def my_keyboard(key, input_before, input_after):
# ruby
Weechat.add_keyboard_handler("my_keyboard")
def my_keyboard(server, input_before, input_after)
def my_keyboard(key, input_before, input_after)
Weechat.print("keyboard handler: key = '#{key}', " \
"input before = '#{input_before}' " \
"after = '#{input_after}'")
@@ -5639,7 +5898,7 @@ end
-- lua
weechat.add_keyboard_handler("my_keyboard")
function my_keyboard(server, input_before, input_after)
function my_keyboard(key, input_before, input_after)
weechat.print("keyboard handler: key = '"..key..
"', input before = '"..input_before..
"' after = '"..input_after.."'")
@@ -5664,6 +5923,104 @@ end
</para>
</section>
<section id="secScript_add_event_handler">
<title>add_event_handler</title>
<para>
Perl-Prototyp:
<command>
weechat::add_event_handler(event, function);
</command>
</para>
<para>
Python-Prototyp:
<command>
weechat.add_event_handler(event, function)
</command>
</para>
<para>
Ruby-Prototyp:
<command>
Weechat.add_event_handler(event, function)
</command>
</para>
<para>
Lua-Prototyp:
<command>
weechat.add_event_handler(event, function)
</command>
</para>
<para>
Fügt einen Ereignis-Handler hinzu, der beim Auftreten eines Ereignisses aufgerufen wird.
</para>
<para>
Argumente:
<itemizedlist>
<listitem>
<para>
<option>event</option> : Ereignis
(see <xref linkend="secAPI_event_handler_add" />)
</para>
</listitem>
<listitem>
<para>
<option>function</option>: aufgerufene Funktion
</para>
</listitem>
</itemizedlist>
</para>
<para>
Rückgabewerte: 1 bei Erfolg, 0 bei aufgetretenen Fehlern
</para>
<para>
Beispiele:
<screen>
# perl
weechat::add_event_handler("buffer_open", "my_event");
sub my_event
{
weechat::print("buffer open");
return weechat::PLUGIN_RC_OK;
}
# python
weechat.add_event_handler("buffer_open", "my_event")
def my_event():
weechat.prnt("buffer open")
return weechat.PLUGIN_RC_OK
# ruby
Weechat.add_event_handler("buffer_open", "my_event")
def my_event()
Weechat.print("buffer open")
return Weechat::PLUGIN_RC_OK
end
-- lua
weechat.add_event_handler("buffer_open", "my_event")
function my_event()
weechat.print("buffer open")
return weechat.PLUGIN_RC_OK()
end
</screen>
</para>
<para>
Bemerkung: aufgerufene Funktion muss einen der folgenden Werte zurückgeben:
<itemizedlist>
<listitem>
<para>
<literal>PLUGIN_RC_KO</literal>: Funktion fehlgeschlagen
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK</literal>: Funktion erfolgreich beendet
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section id="secScript_remove_handler">
<title>remove_handler</title>
@@ -5832,7 +6189,7 @@ weechat.remove_timer_handler("my_timer")
</itemizedlist>
</para>
<para>
Rückgabewert: 1 bei Erfolg, 0 wenn ein Fehler aufgetreten ist.
Rückgabewerte: 1 bei Erfolg, 0 wenn ein Fehler aufgetreten ist.
</para>
<para>
Beispiele:
@@ -5852,6 +6209,67 @@ weechat.remove_keyboard_handler("my_keyboard")
</para>
</section>
<section id="secScrip_remove_event_handler">
<title>remove_event_handler</title>
<para>
Perl-Prototyp:
<command>
weechat::remove_event_handler(function);
</command>
</para>
<para>
Python-Prototyp:
<command>
weechat.remove_event_handler(function)
</command>
</para>
<para>
Ruby-Prototyp:
<command>
Weechat.remove_event_handler(function)
</command>
</para>
<para>
Lua-Prototyp:
<command>
weechat.remove_event_handler(function)
</command>
</para>
<para>
Entfernt einen Ereignis-Handler.
</para>
<para>
Argumente:
<itemizedlist>
<listitem>
<para>
<option>function</option>: Funktion
</para>
</listitem>
</itemizedlist>
</para>
<para>
Rückgabewerte: 1 bei Erfolg, 0 wenn ein Fehler aufgetreten ist.
</para>
<para>
Beispiele:
<screen>
# perl
weechat::remove_event_handler("my_event");
# python
weechat.remove_event_handler("my_event")
# ruby
Weechat.remove_event_handler("my_event")
-- lua
weechat.remove_event_handler("my_event")
</screen>
</para>
</section>
<section id="secScript_add_modifier">
<title>add_modifier</title>
+24 -11
View File
@@ -15,7 +15,8 @@ Argumente: Argumente f
</programlisting>
<command>wird durch alle Argumente ersetzt.</command>
<programlisting>
<programlisting>Die Variablen $nick, $channel and $server werden durch den aktuellen Nick/Channel oder Server ersetzt.
</programlisting>
<command>buffer [Aktion [Argumente] | Nummer | [[Server] [Channel]]]</command>
<programlisting>
@@ -40,25 +41,28 @@ Befehl: auszuf
</programlisting>
<command>clear [-all]</command>
<command>clear [-all | Nummer]</command>
<programlisting>
Fenster leeren
-all: alle Fenster leeren
-all: lösche alle Puffer
Nummer: lösche den Puffer mit der angegebenen Nummer
</programlisting>
<command>connect [Servername]</command>
<command>connect [-all | Servername [Servername ...]]</command>
<programlisting>
mit einem Server verbinden
mit Server verbinden
Servername: Zielserver
-all: verbinde mit allen Servern
servername: Servername, mit dem verbunden werden soll
</programlisting>
<command>disconnect [Servername]</command>
<command>disconnect [-all | Servername [Servername ...]]</command>
<programlisting>
Serververbindung trennen
Serververbindung(en) trennen
Servername: Name des zu trennenden Servers
-all: Trenne von allen Servern
servername: Servername, von dem getrennt werden soll
</programlisting>
<command>dcc Aktion [Nickname [Datei]]</command>
@@ -108,13 +112,14 @@ Bei jedem Argument steht '*' f
Ohne Argumente listet /ignore alle definierten /ignore-Regeln auf.
</programlisting>
<command>key [Taste [Funktion/Befehl]] [unbind Taste] [functions] [reset -yes]</command>
<command>key [Taste [Funktion/Befehl]] [unbind Taste] [functions] [call Funktion ["Argumente"]] [reset -yes] </command>
<programlisting>
belegen/freigeben von Tasten
Taste: diese Taste mit einer internen Funktion oder einem Befehl, beginnend mit "/", belegen
Taste: diese Taste anzeigen oder mit einer internen Funktion oder einem Befehl, beginnend mit "/", belegen
unbind: Tastenbelegung aufheben
functions: interne Funktionen für Tastenbelegungen auflisten
call: rufe eine Funktion über ihren Namen auf (mit optionalen Argumenten)
reset: Standardbelegung wiederherstellen und entferne ALLE eigenen Belegungen (Vorsicht!)
</programlisting>
@@ -131,6 +136,14 @@ autoload: lade automatisch alle Plugins im System- oder Benutzerverzeichnis
Ohne Argument, listet /plugin alle geladenen Plugins auf.
</programlisting>
<command>reconnect [-all | Servername [Servername ...]]</command>
<programlisting>
mit einem Server oder mehreren Servern neu verbinden
-all: Verbinde mit allen Servern neu
servername: Servername, mit dem verbunden werden soll
</programlisting>
<command>server [Servername] | [Servername Hostname Port [-auto | -noauto] [-ipv6] [-ssl] [-pwd Passwort] [-nicks Nick1 Nick2 Nick3] [-username Benutzername] [-realname Name] [-command Befehl] [-autojoin Channel[,Channel]] ] | [del Servername]</command>
<programlisting>
+14
View File
@@ -194,6 +194,13 @@
<entry>'[]-^'</entry>
<entry>Chars ignored for nick completion</entry>
</row>
<row>
<entry><option>look_nick_completion_smart</option></entry>
<entry>boolean</entry>
<entry>'on' or 'off'</entry>
<entry>'on'</entry>
<entry>Smart completion for nicks (completes with last speakers first)</entry>
</row>
<row>
<entry><option>look_nick_complete_first</option></entry>
<entry>boolean</entry>
@@ -551,6 +558,13 @@
<entry>'cyan'</entry>
<entry>Color for input text (delimiters)</entry>
</row>
<row>
<entry><option>col_input_text_not_found</option></entry>
<entry>color</entry>
<entry>Curses or Gtk color</entry>
<entry>'red'</entry>
<entry>Color for text not found</entry>
</row>
<row>
<entry><option>col_input_bg</option></entry>
<entry>color</entry>
+8
View File
@@ -197,3 +197,11 @@
<entry><literal>grab_key</literal></entry>
<entry>grab a key</entry>
</row>
<row>
<entry><literal>insert</literal></entry>
<entry>insert a string in command line</entry>
</row>
<row>
<entry><literal>search_text</literal></entry>
<entry>search text in buffer history</entry>
</row>
+425 -8
View File
@@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<bookinfo>
<title>WeeChat 0.2.2 - User guide</title>
<title>WeeChat 0.2.5 - User guide</title>
<subtitle>Fast, light and extensible IRC client</subtitle>
<author>
@@ -48,7 +48,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
&date.xml;
<copyright>
<year>2006</year>
<year>2007</year>
<holder>Sébastien Helleu</holder>
</copyright>
@@ -508,6 +508,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Redraw whole window
</entry>
</row>
<row>
<entry>Ctrl + R</entry>
<entry>
Search for text in buffer history
(two times: search exact text)
</entry>
</row>
<row>
<entry>Ctrl + T</entry>
<entry>
@@ -561,12 +568,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<entry>Enter / Ctrl + J / Ctrl + M</entry>
<entry>
Execute command or send message
(in search mode: stop search)
</entry>
</row>
<row>
<entry>Up arrow / Down arrow</entry>
<entry>
Call again last commands/messages
Call again last commands/messages (in search mode: search
up/down)
</entry>
</row>
<row>
@@ -701,7 +710,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<row>
<entry>Alt + J then Alt + X</entry>
<entry>
Switch to first channel of next buffer
Switch to first channel of next server
(or server buffer if no channel is opened)
</entry>
</row>
@@ -1102,6 +1111,114 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</section>
<section id="secCharset">
<title>Charset plugin</title>
<para>
Charset plugin lets you encode or decode data using charsets, with 3
levels: global, by server, or by channel.
This plugin is optional, but recommended: if it's not loaded, WeeChat
can only read/write UTF-8 data.
</para>
<para>
Charset plugin should be autoloaded by WeeChat at startup.
To be sure plugin is loaded, try:
"<literal>/charset</literal>".
If command is not found, then load plugin with command:
<screen>/plugin load charset</screen>
If plugin is not found, then you should compile again WeeChat with
plugins and Charset support.
</para>
<para>
When Charset plugin starts, it displays terminal and internal charsets.
Terminal charset depends on your locale, and internal is UTF-8.
For example :
<screen>
-P- Charset plugin starting, terminal charset: ISO-8859-15 (WeeChat internal: UTF-8)
</screen>
</para>
<section id="secCharsetSettings">
<title>Settings</title>
<itemizedlist>
<listitem>
<para>
To set global decode and encode charsets, use
"<literal>/setp</literal>" command.
For example:
<screen>
/setp charset.global.decode = ISO-8859-15
/setp charset.global.encode = ISO-8859-15
</screen>
If global decode charset is not set (for example during first
load of Charset plugin), it will be automatically set to terminal
charset (if it's different from UTF-8), or by default to
"<literal>ISO-8859-1</literal>".
Default encode value is empty, so it sends by default with
internal charset (UTF-8).
</para>
</listitem>
<listitem>
<para>
To set server charset, use "<literal>/charset</literal>" command
on server buffer.
If you give only charset, then it will set "decode" and "encode"
values.
For example:
<screen>/charset ISO-8859-15</screen>
It's equivalent to:
<screen>
/charset decode ISO-8859-15
/charset encode ISO-8859-15
</screen>
</para>
</listitem>
<listitem>
<para>
To set channel (or private) charset, use same commands as server,
but on channel (or private) buffer.
</para>
</listitem>
</itemizedlist>
</section>
<section id="secCharsetFAQ">
<title>FAQ</title>
<para>
If you have problems with chars or accents using Charset plugin:
<itemizedlist>
<listitem>
<para>
check that weechat-curses is linked to libncursesw (warning:
needed on most distributions but not all) :
<screen>ldd /path/to/weechat-curses</screen>
</para>
</listitem>
<listitem>
<para>
check charset line (on server buffer), you should see
ISO-XXXXXX or UTF-8 for terminal charset. If you see
ANSI_X3.4-1968 or other values, probably your locale is wrong.
</para>
</listitem>
<listitem>
<para>
setup global decode value, for example:
<screen>/setp charset.global.decode = ISO-8859-15</screen>
</para>
</listitem>
</itemizedlist>
</para>
</section>
</section>
<section id="secFIFOpipe">
<title>FIFO pipe</title>
@@ -2060,6 +2177,13 @@ plugin->log (plugin, "freenode", "#weechat", "test");
will not be sent to WeeChat neither other plugins
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal>: function
successfully completed and make "highlight" on received
message
</para>
</listitem>
</itemizedlist>
</para>
<para>
@@ -2170,7 +2294,7 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
</row>
<row>
<entry><literal>%C</literal></entry>
<entry>channels of current server</entry>
<entry>all channels (including queries)</entry>
</row>
<row>
<entry><literal>%f</literal></entry>
@@ -2196,6 +2320,12 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
<entry><literal>%m</literal></entry>
<entry>nick on current server</entry>
</row>
<row>
<entry><literal>%M</literal></entry>
<entry>
nicks on current server (on all open channels)
</entry>
</row>
<row>
<entry><literal>%n</literal></entry>
<entry>nicks of current channel</entry>
@@ -2538,6 +2668,120 @@ keyb_handler = plugin->keyboard_handler_add (plugin, &amp;my_keyb);
</para>
</section>
<section id="secAPI_event_handler_add">
<title>event_handler_add</title>
<para>
Prototype:
<command>
t_plugin_handler *event_handler_add (t_weechat_plugin
*plugin, char *event, t_plugin_handler_func *function,
char *handler_args, void *handler_pointer)
</command>
</para>
<para>
Add an event handler, called when an event happens.
</para>
<para>
Arguments:
<itemizedlist>
<listitem>
<para>
<option>plugin</option>: pointer to plugin structure
</para>
</listitem>
<listitem>
<para>
<option>event</option> : event, see table below:
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Event</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>buffer_open</literal></entry>
<entry>a buffer was open</entry>
</row>
<row>
<entry><literal>buffer_close</literal></entry>
<entry>a buffer was closed</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</listitem>
<listitem>
<para>
<option>function</option>: function called
</para>
<para>
It uses following prototype:
<command>
int my_function (t_weechat_plugin *plugin,
int argc, char **argv,
char *handler_args, void *handler_pointer)
</command>
</para>
<para>
Argument argc is set to 1, argv[0] is number of buffer
open/closed.
</para>
</listitem>
<listitem>
<para>
<option>handler_args</option>: arguments given to function
when called
</para>
</listitem>
<listitem>
<para>
<option>handler_pointer</option>: pointer given to function
when called
</para>
</listitem>
</itemizedlist>
</para>
<para>
Return value: pointer to new event handler.
</para>
<para>
Note: function called has to return one of following values:
<itemizedlist>
<listitem>
<para>
<literal>PLUGIN_RC_KO</literal>: function failed
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK</literal>: function successfully
completed
</para>
</listitem>
</itemizedlist>
</para>
<para>
Example:
<screen>
int my_event (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
{
plugin->print (plugin, NULL, NULL, "my_event");
return PLUGIN_RC_OK;
}
...
t_plugin_handler *event_handler;
event_handler = plugin->event_handler_add (plugin, "buffer_open",
&amp;my_event);
</screen>
</para>
</section>
<section id="secAPI_handler_remove">
<title>handler_remove</title>
@@ -2917,6 +3161,12 @@ plugin->exec_command (plugin, "freenode", "#weechat", "hello");
<entry><literal>server</literal></entry>
<entry>name of server</entry>
</row>
<row>
<entry><literal>type</literal></entry>
<entry>
buffer type: 0=standard, 1=DCC, 2=raw IRC data
</entry>
</row>
<row>
<entry><literal>away</literal></entry>
<entry>"away" flag</entry>
@@ -4305,7 +4555,7 @@ else
<row>
<entry>int</entry>
<entry><literal>type</literal></entry>
<entry>buffer type: 0=standard, 1=dcc, 2=raw IRC data</entry>
<entry>buffer type: 0=standard, 1=DCC, 2=raw IRC data</entry>
</row>
<row>
<entry>int</entry>
@@ -5364,6 +5614,13 @@ end
will not be sent to WeeChat neither other plugins
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal>: function
successfully completed and make "highlight" on received
message
</para>
</listitem>
</itemizedlist>
</para>
</section>
@@ -5668,7 +5925,7 @@ def my_keyboard(key, input_before, input_after):
# ruby
Weechat.add_keyboard_handler("my_keyboard")
def my_keyboard(server, input_before, input_after)
def my_keyboard(key, input_before, input_after)
Weechat.print("keyboard handler: key = '#{key}', " \
"input before = '#{input_before}' " \
"after = '#{input_after}'")
@@ -5677,7 +5934,7 @@ end
-- lua
weechat.add_keyboard_handler("my_keyboard")
function my_keyboard(server, input_before, input_after)
function my_keyboard(key, input_before, input_after)
weechat.print("keyboard handler: key = '"..key..
"', input before = '"..input_before..
"' after = '"..input_after.."'")
@@ -5703,6 +5960,105 @@ end
</para>
</section>
<section id="secScript_add_event_handler">
<title>add_event_handler</title>
<para>
Perl prototype:
<command>
weechat::add_event_handler(event, function);
</command>
</para>
<para>
Python prototype:
<command>
weechat.add_event_handler(event, function)
</command>
</para>
<para>
Ruby prototype:
<command>
Weechat.add_event_handler(event, function)
</command>
</para>
<para>
Lua prototype:
<command>
weechat.add_event_handler(event, function)
</command>
</para>
<para>
Add an event handler, called when an event happens.
</para>
<para>
Arguments:
<itemizedlist>
<listitem>
<para>
<option>event</option> : event
(see <xref linkend="secAPI_event_handler_add" />)
</para>
</listitem>
<listitem>
<para>
<option>function</option>: function called
</para>
</listitem>
</itemizedlist>
</para>
<para>
Return value: 1 if success, 0 if an error occurred.
</para>
<para>
Examples:
<screen>
# perl
weechat::add_event_handler("buffer_open", "my_event");
sub my_event
{
weechat::print("buffer open");
return weechat::PLUGIN_RC_OK;
}
# python
weechat.add_event_handler("buffer_open", "my_event")
def my_event():
weechat.prnt("buffer open")
return weechat.PLUGIN_RC_OK
# ruby
Weechat.add_event_handler("buffer_open", "my_event")
def my_event()
Weechat.print("buffer open")
return Weechat::PLUGIN_RC_OK
end
-- lua
weechat.add_event_handler("buffer_open", "my_event")
function my_event()
weechat.print("buffer open")
return weechat.PLUGIN_RC_OK()
end
</screen>
</para>
<para>
Note: function called has to return one of following values:
<itemizedlist>
<listitem>
<para>
<literal>PLUGIN_RC_KO</literal>: function failed
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK</literal>: function successfully
completed
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section id="secScript_remove_handler">
<title>remove_handler</title>
@@ -5891,6 +6247,67 @@ weechat.remove_keyboard_handler("my_keyboard")
</para>
</section>
<section id="secScrip_remove_event_handler">
<title>remove_event_handler</title>
<para>
Perl prototype:
<command>
weechat::remove_event_handler(function);
</command>
</para>
<para>
Python prototype:
<command>
weechat.remove_event_handler(function)
</command>
</para>
<para>
Ruby prototype:
<command>
Weechat.remove_event_handler(function)
</command>
</para>
<para>
Lua prototype:
<command>
weechat.remove_event_handler(function)
</command>
</para>
<para>
Remove an event handler.
</para>
<para>
Arguments:
<itemizedlist>
<listitem>
<para>
<option>function</option>: function
</para>
</listitem>
</itemizedlist>
</para>
<para>
Return value: 1 if success, 0 if an error occurred.
</para>
<para>
Examples:
<screen>
# perl
weechat::remove_event_handler("my_event");
# python
weechat.remove_event_handler("my_event")
# ruby
Weechat.remove_event_handler("my_event")
-- lua
weechat.remove_event_handler("my_event")
</screen>
</para>
</section>
<section id="secScript_add_modifier">
<title>add_modifier</title>
+22 -9
View File
@@ -11,11 +11,12 @@ create an alias for a command
alias_name: name of alias
command: command name (WeeChat or IRC command, many commands can be separated by semicolons)
arguments: arguments for command
arguments: arguments for command
</programlisting>
<command>is replaced by all arguments.</command>
<programlisting>
<programlisting>Variables $nick, $channel and $server are replaced by current nick/channel/server.
</programlisting>
<command>buffer [action [args] | number | [[server] [channel]]]</command>
<programlisting>
@@ -40,24 +41,27 @@ command: command to execute (a '/' is automatically added if not found at beginn
</programlisting>
<command>clear [-all]</command>
<command>clear [-all | number]</command>
<programlisting>
clear window(s)
-all: clear all windows
-all: clear all buffers
number: clear buffer by number
</programlisting>
<command>connect [servername]</command>
<command>connect [-all | servername [servername ...]]</command>
<programlisting>
connect to a server
connect to server(s)
-all: connect to all servers
servername: server name to connect
</programlisting>
<command>disconnect [servername]</command>
<command>disconnect [-all | servername [servername ...]]</command>
<programlisting>
disconnect from a server
disconnect from server(s)
-all: disconnect from all servers
servername: server name to disconnect
</programlisting>
@@ -107,13 +111,14 @@ For each argument, '*' means all.
Without argument, /ignore command lists all defined ignore.
</programlisting>
<command>key [key [function/command]] [unbind key] [functions] [reset -yes]</command>
<command>key [key [function/command]] [unbind key] [functions] [call function ["args"]] [reset -yes]</command>
<programlisting>
bind/unbind keys
key: display or bind this key to an internal function or a command (beginning by "/")
unbind: unbind a key
functions: list internal functions for key bindings
call: call a function by name (with optional arguments)
reset: restore bindings to the default values and delete ALL personal bindings (use carefully!)
</programlisting>
@@ -130,6 +135,14 @@ autoload: autoload plugins in system or user directory
Without argument, /plugin command lists loaded plugins.
</programlisting>
<command>reconnect [-all | servername [servername ...]]</command>
<programlisting>
reconnect to server(s)
-all: reconnect to all servers
servername: server name to reconnect
</programlisting>
<command>server [servername] | [servername hostname port [-auto | -noauto] [-ipv6] [-ssl] [-pwd password] [-nicks nick1 nick2 nick3] [-username username] [-realname realname] [-command command] [-autojoin channel[,channel]] ] | [del servername]</command>
<programlisting>
+27 -13
View File
@@ -87,28 +87,28 @@
<entry>booléen</entry>
<entry>'on' ou 'off'</entry>
<entry>'on'</entry>
<entry>Afficher la fenêtre des utilisateurs (pour les fenêtres de canaux)</entry>
<entry>Afficher la fenêtre des pseudos (pour les fenêtres de canaux)</entry>
</row>
<row>
<entry><option>look_nicklist_position</option></entry>
<entry>chaîne</entry>
<entry>'left', 'right', 'top', 'bottom'</entry>
<entry>'right'</entry>
<entry>Position de la fenêtre d'utilisateurs (haut (top), gauche (left), droite (right, par défaut), bas (bottom))</entry>
<entry>Position de la fenêtre des pseudos (haut (top), gauche (left), droite (right, par défaut), bas (bottom))</entry>
</row>
<row>
<entry><option>look_nicklist_min_size</option></entry>
<entry>entier</entry>
<entry>entre 0 et 100</entry>
<entry>0</entry>
<entry>Taille minimum pour la fenêtre d'utilisateurs (largeur ou hauteur, selon look_nicklist_position (0 = pas de taille minimum))</entry>
<entry>Taille minimum pour la fenêtre des pseudos (largeur ou hauteur, selon look_nicklist_position (0 = pas de taille minimum))</entry>
</row>
<row>
<entry><option>look_nicklist_max_size</option></entry>
<entry>entier</entry>
<entry>entre 0 et 100</entry>
<entry>0</entry>
<entry>Taille maximum pour la fenêtre d'utilisateurs (largeur ou hauteur, selon look_nicklist_position (0 = pas de taille maximum; si min == max et &gt; 0, alors la taille est fixe))</entry>
<entry>Taille maximum pour la fenêtre des pseudos (largeur ou hauteur, selon look_nicklist_position (0 = pas de taille maximum; si min == max et &gt; 0, alors la taille est fixe))</entry>
</row>
<row>
<entry><option>look_nicklist_separator</option></entry>
@@ -122,21 +122,21 @@
<entry>chaîne</entry>
<entry>toute chaîne</entry>
<entry>'-cmd-'</entry>
<entry>Texte à afficher en lieu et place du nom d'utilisateur lorsque la connexion n'est pas active</entry>
<entry>Texte à afficher en lieu et place du pseudo lorsque la connexion n'est pas active</entry>
</row>
<row>
<entry><option>look_nickmode</option></entry>
<entry>booléen</entry>
<entry>'on' ou 'off'</entry>
<entry>'on'</entry>
<entry>Afficher le mode de l'utilisateur ((half)op/voice) devant chaque utilisateur</entry>
<entry>Afficher le mode du pseudo ((half)op/voice) devant chaque utilisateur</entry>
</row>
<row>
<entry><option>look_nickmode_empty</option></entry>
<entry>booléen</entry>
<entry>'on' ou 'off'</entry>
<entry>'off'</entry>
<entry>Afficher un espace si le mode utilisateur n'est pas (half)op/voice</entry>
<entry>Afficher un espace si le mode du pseudo n'est pas (half)op/voice</entry>
</row>
<row>
<entry><option>look_nick_prefix</option></entry>
@@ -194,6 +194,13 @@
<entry>'[]-^'</entry>
<entry>Caractères à ignorer pour la complétion des pseudos</entry>
</row>
<row>
<entry><option>look_nick_completion_smart</option></entry>
<entry>booléen</entry>
<entry>'on' ou 'off'</entry>
<entry>'on'</entry>
<entry>Complétion intelligente pour les pseudos (complète d'abord avec les personnes qui ont parlé récemment)</entry>
</row>
<row>
<entry><option>look_nick_complete_first</option></entry>
<entry>booléen</entry>
@@ -304,7 +311,7 @@
<entry>couleur</entry>
<entry>couleur Curses ou Gtk</entry>
<entry>'lightmagenta'</entry>
<entry>Couleur pour les '+' lors du scroll sur le titre</entry>
<entry>Couleur pour les '+' lors du défilement du titre</entry>
</row>
<row>
<entry><option>col_title_bg</option></entry>
@@ -374,14 +381,14 @@
<entry>couleur</entry>
<entry>couleur Curses ou Gtk</entry>
<entry>'lightcyan'</entry>
<entry>Couleur pour les noms d'utilisateurs dans les actions (fenêtre de discussion)</entry>
<entry>Couleur pour les pseudos dans les actions (fenêtre de discussion)</entry>
</row>
<row>
<entry><option>col_chat_host</option></entry>
<entry>couleur</entry>
<entry>couleur Curses ou Gtk</entry>
<entry>'cyan'</entry>
<entry>Couleur pour les noms de machines (fenêtre de discussion)</entry>
<entry>Couleur pour les hôtes (fenêtre de discussion)</entry>
</row>
<row>
<entry><option>col_chat_channel</option></entry>
@@ -551,6 +558,13 @@
<entry>'cyan'</entry>
<entry>Couleur pour le texte saisi (délimiteurs)</entry>
</row>
<row>
<entry><option>col_input_text_not_found</option></entry>
<entry>couleur</entry>
<entry>couleur Curses ou Gtk</entry>
<entry>'red'</entry>
<entry>Couleur pour le texte non trouvé</entry>
</row>
<row>
<entry><option>col_input_bg</option></entry>
<entry>couleur</entry>
@@ -612,7 +626,7 @@
<entry>couleur</entry>
<entry>couleur Curses ou Gtk</entry>
<entry>'lightmagenta'</entry>
<entry>Couleur pour les '+' lors du scroll sur les pseudos</entry>
<entry>Couleur pour les '+' lors du défilement des pseudos</entry>
</row>
<row>
<entry><option>col_nick_sep</option></entry>
@@ -1025,7 +1039,7 @@
<entry>booléen</entry>
<entry>'on' ou 'off'</entry>
<entry>'on'</entry>
<entry>Continuer automatiquement les transferts dcc si la connexion avec la machine distante a été perdue</entry>
<entry>Continuer automatiquement les transferts dcc si la connexion avec l'hôte a été perdue</entry>
</row>
<row>
<entry><option>proxy_use</option></entry>
@@ -1053,7 +1067,7 @@
<entry>chaîne</entry>
<entry>toute chaîne</entry>
<entry>''</entry>
<entry>Adresse du serveur proxy (IP ou nom)</entry>
<entry>Adresse du serveur proxy (IP ou nom de machine)</entry>
</row>
<row>
<entry><option>proxy_port</option></entry>
+30 -30
View File
@@ -36,17 +36,17 @@ message: message pour l'absence (si pas de message donn
</programlisting>
<command>ban [canal] [pseudo [pseudo ...]]</command>
<programlisting>
bannit des pseudos ou masques
bannit des pseudos ou hôtes
canal: nom du canal pour le bannissement
pseudo: pseudo ou masque pour le bannissement
pseudo: pseudo ou hôte pour le bannissement
</programlisting>
<command>ctcp cible type [arguments]</command>
<programlisting>
envoyer un message CTCP (Client-To-Client Protocol)
cible: utilisateur à qui envoyer le CTCP
cible: pseudo à qui envoyer le CTCP
type: type de CTCP (exemples: "version", "ping", etc...)
arguments: arguments pour le CTCP
@@ -61,12 +61,12 @@ message_de_fin: message de fin (affich
</programlisting>
<command>dehalfop [pseudo [pseudo]]</command>
<programlisting>
retire le statut de demi-opérateur du canal à/aux nick(s)
retire le statut de demi-opérateur du canal à/aux pseudo(s)
</programlisting>
<command>deop [pseudo [pseudo]]</command>
<programlisting>
retire le statut d'opérateur du canal à/aux nick(s)
retire le statut d'opérateur du canal à/aux pseudo(s)
</programlisting>
<command>devoice [pseudo [pseudo]]</command>
@@ -81,7 +81,7 @@ arr
</programlisting>
<command>halfop [pseudo [pseudo]]</command>
<programlisting>
donner le statut de demi-opérateur à un/des utilisateur(s)
donner le statut de demi-opérateur à un/des pseudo(s)
</programlisting>
<command>info [cible]</command>
@@ -93,15 +93,15 @@ cible: nom du serveur
</programlisting>
<command>invite pseudo canal</command>
<programlisting>
inviter un utilisateur sur un canal
inviter un pseudo sur un canal
pseudo: utilisateur à inviter
pseudo: pseudo à inviter
channel: canal pour l'invitation
</programlisting>
<command>ison pseudo [pseudo ...]</command>
<programlisting>
vérifier si un utilisateur est actuellement sur IRC
vérifier si un pseudo est actuellement sur IRC
pseudo: pseudo
@@ -119,16 +119,16 @@ canal: nom du canal
retirer par la force un utilisateur d'un canal
canal: canal où l'utilisateur se trouve
pseudo: utilisateur à éliminer
pseudo: pseudo à éliminer
commentaire: commentaire pour l'élimination
</programlisting>
<command>kickban [canal] pseudo [commentaire]</command>
<programlisting>
retirer par la force un utilisateur d'un canal et le bannir
retirer par la force un pseudo d'un canal et le bannir
canal: canal où l'utilisateur se trouve
pseudo: utilisateur à éliminer et bannir
pseudo: pseudo à éliminer et bannir
commentaire: commentaire pour l'élimination
</programlisting>
@@ -136,7 +136,7 @@ commentaire: commentaire pour l'
<programlisting>
fermer la connexion client-serveur
pseudo: utilisateur
pseudo: pseudo
commentaire: commentaire pour la mort
</programlisting>
@@ -171,7 +171,7 @@ envoyer une action CTCP au canal courant
message: message à envoyer
</programlisting>
<command>mode { canal {[+|-]|o|p|s|i|t|n|b|v} [limite] [utilisateur] [masque de banissement] } | { nick {[+|-]|i|w|s|o} }</command>
<command>mode { canal {[+|-]|o|p|s|i|t|n|b|v} [limite] [utilisateur] [masque de banissement] } | { pseudo {[+|-]|i|w|s|o} }</command>
<programlisting>
changer le mode du canal ou de l'utilisateur
@@ -190,7 +190,7 @@ modes de canaux :
v: donner/reprendre la possibilité de parler sur un canal modéré
k: définir une clé (mot de passe) pour accéder au canal
modes utilisateur :
pseudo: utilisateur à modifier
pseudo: pseudo à modifier
i: marquer un utilisateur comme invisible
s: marquer un utilisateur pour recevoir les notices du serveur
w: l'utilisateur reçoit les wallops
@@ -206,15 +206,15 @@ cible: nom du serveur
</programlisting>
<command>msg cible[,cible] texte</command>
<programlisting>
envoyer un message à un utilisateur ou canal
envoyer un message à un pseudo ou canal
cible: utilisateur ou canal (peut-être un masque, '*' = canal courant)
cible: pseudo ou canal (peut-être un masque, '*' = canal courant)
texte: texte à envoyer
</programlisting>
<command>names [canal[,canal]]</command>
<programlisting>
lister les utilisateurs sur des canaux
lister les pseudos sur des canaux
canal: nom du canal
@@ -231,13 +231,13 @@ pseudo: nouveau pseudo
<programlisting>
envoyer un message notice à un utilisateur
pseudo: utilisateur cible pour la notice
pseudo: pseudo cible pour la notice
texte: texte à envoyer
</programlisting>
<command>op pseudo [pseudo]</command>
<programlisting>
donner le statut opérateur à un/des utilisateur(s)
donner le statut opérateur à un/des pseudo(s)
</programlisting>
<command>oper utilisateur mot_de_passe</command>
@@ -273,9 +273,9 @@ d
</programlisting>
<command>query pseudo [texte]</command>
<programlisting>
envoyer un message privé à un utilisateur
envoyer un message privé à un pseudo
pseudo: utilisateur pour la conversation privée
pseudo: pseudo pour la conversation privée
texte: texte à envoyer
</programlisting>
@@ -376,15 +376,15 @@ cible: serveur
</programlisting>
<command>unban [canal] pseudo [pseudo ...]</command>
<programlisting>
supprime le bannissement sur des pseudos ou masques
supprime le bannissement sur des pseudos ou hôtes
canal: nom du canal pour supprimer le bannissement
pseudo: pseudo ou masque pour supprimer le bannissement
pseudo: pseudo ou hôte pour supprimer le bannissement
</programlisting>
<command>userhost pseudo [pseudo ...]</command>
<programlisting>
retourne une liste d'informations sur des utilisateurs
retourne une liste d'informations sur des pseudos
pseudo: pseudo
@@ -398,15 +398,15 @@ cible: serveur
</programlisting>
<command>version [serveur | pseudo]</command>
<programlisting>
retourne la version de l'utilisateur ou du serveur (courant ou spécifié)
retourne la version du pseudo ou du serveur (courant ou spécifié)
serveur: nom du serveur
pseudo: utilisateur
pseudo: pseudo
</programlisting>
<command>voice [pseudo [pseudo]]</command>
<programlisting>
donne la voix à/aux utilisateur(s)
donne la voix à/aux pseudo(s)
</programlisting>
<command>wallops texte</command>
@@ -429,12 +429,12 @@ masque: information qui correspond
demande les informations sur le(s) utilisateur(s)
serveur: nom du serveur
pseudo: utilisateur (peut être un masque)
pseudo: pseudo (peut être un masque)
</programlisting>
<command>whowas pseudo [,pseudo [,pseudo ...]] [nombre [cible]]</command>
<programlisting>
demander de l'information sur un nick qui n'existe plus
demander de l'information sur un pseudo qui n'existe plus
pseudo: pseudo à chercher
nombre: nombre de réponses à retourner (recherche complète si nombre négatif)
+11 -3
View File
@@ -171,15 +171,15 @@
</row>
<row>
<entry><literal>scroll_previous_highlight</literal></entry>
<entry>scroller jusqu'au highlight précédent du tampon</entry>
<entry>faire défiler jusqu'au highlight précédent du tampon</entry>
</row>
<row>
<entry><literal>scroll_next_highlight</literal></entry>
<entry>scroller jusqu'au highlight suivant du tampon</entry>
<entry>faire défiler jusqu'au highlight suivant du tampon</entry>
</row>
<row>
<entry><literal>scroll_unread</literal></entry>
<entry>scroller jusqu'à la première ligne non lue du tampon</entry>
<entry>faire défiler jusqu'à la première ligne non lue du tampon</entry>
</row>
<row>
<entry><literal>hotlist_clear</literal></entry>
@@ -197,3 +197,11 @@
<entry><literal>grab_key</literal></entry>
<entry>capturer une touche</entry>
</row>
<row>
<entry><literal>insert</literal></entry>
<entry>insérer une chaîne dans la ligne de commande</entry>
</row>
<row>
<entry><literal>search_text</literal></entry>
<entry>recherche de texte dans l'historique du tampon</entry>
</row>
+441 -7
View File
@@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<bookinfo>
<title>WeeChat 0.2.2 - Guide utilisateur</title>
<title>WeeChat 0.2.5 - Guide utilisateur</title>
<subtitle>Client IRC rapide, léger et extensible</subtitle>
<author>
@@ -48,7 +48,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
&date.xml;
<copyright>
<year>2006</year>
<year>2007</year>
<holder>Sébastien Helleu</holder>
</copyright>
@@ -517,6 +517,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Réafficher toute la fenêtre
</entry>
</row>
<row>
<entry>Ctrl + R</entry>
<entry>
Chercher du texte dans l'historique du tampon
(deux appuis successifs pour rechercher du texte exact)
</entry>
</row>
<row>
<entry>Ctrl + T</entry>
<entry>
@@ -571,12 +578,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<entry>Entrée / Ctrl + J / Ctrl + M</entry>
<entry>
Exécuter la commande ou envoyer le message
(en mode recherche: arrêter la recherche)
</entry>
</row>
<row>
<entry>Flèche haut / flèche bas</entry>
<entry>
Rappeler les dernières commandes ou messages
(en mode recherche: chercher en haut/bas)
</entry>
</row>
<row>
@@ -1115,6 +1124,124 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</para>
</section>
<section id="secCharset">
<title>Extension Charset</title>
<para>
L'extension Charset vous permet d'encoder et décoder les données en
utilisant un jeu de caractères, avec 3 niveaux : global, par serveur,
ou par canal.
Cette extension est facultative, mais recommandée : si elle n'est pas
chargée, WeeChat pourra uniquement lire/écrire des données UTF-8.
</para>
<para>
L'extension Charset devrait être automatiquement chargée par WeeChat
au démarrage.
Pour s'assurer que l'extension est bien chargée, essayez :
"<literal>/charset</literal>".
Si la commande n'est pas trouvée, alors chargez l'extension avec la
commande :
<screen>/plugin load charset</screen>
Si l'extension n'est pas trouvée, alors vous devriez recompiler
WeeChat avec les extensions et le support de Charset.
</para>
<para>
Lorsque l'extension Charset démarre, elle affiche le jeu de caractères
du terminal et l'interne.
Le jeu de caractères du terminal dépend de votre locale, et l'interne
est UTF-8.
Par exemple :
<screen>
-P- Charset plugin starting, terminal charset: ISO-8859-15 (WeeChat internal: UTF-8)
</screen>
</para>
<section id="secCharsetSettings">
<title>Configuration</title>
<itemizedlist>
<listitem>
<para>
Pour modifier les jeux de caractères de décodage et d'encodage
globaux, utilisez la commande "<literal>/setp</literal>".
Par exemple :
<screen>
/setp charset.global.decode = ISO-8859-15
/setp charset.global.encode = ISO-8859-15
</screen>
Si le jeu de caractères de décodage global n'est pas renseigné
(par exemple pendant le premier chargement de Charset), il sera
renseigné automatiquement avec le jeu de caractères du terminal
(s'il est différent de UTF-8) ou par défaut à
"<literal>ISO-8859-1</literal>".
La valeur d'encodage par défaut est vide, donc WeeChat envoie par
défaut avec le jeu de caractères interne (UTF-8).
</para>
</listitem>
<listitem>
<para>
Pour modifier le jeu de caractères d'un serveur, utilisez la
commande "<literal>/charset</literal>" sur le tampon serveur.
Si vous donnez seulement le jeu de caractères, alors vous
modifiez en même temps les valeurs de décodage et d'encodage.
Par exemple :
<screen>/charset ISO-8859-15</screen>
Ce qui est équivalent à :
<screen>
/charset decode ISO-8859-15
/charset encode ISO-8859-15
</screen>
</para>
</listitem>
<listitem>
<para>
Pour modifier le jeu de caractères d'un canal (ou d'une
conversation privée), utilisez la même commande que pour le
serveur, mais sur le tampon du canal (ou du privé).
</para>
</listitem>
</itemizedlist>
</section>
<section id="secCharsetFAQ">
<title>FAQ</title>
<para>
Si vous avez des problèmes avec certains caractères ou les accents en
utilisant l'extension Charset :
<itemizedlist>
<listitem>
<para>
vérifiez que weechat-curses est lié avec libncursesw
(attention : nécessaire sur beaucoup de distributions, mais pas
toutes) :
<screen>ldd /chemin/vers/weechat-curses</screen>
</para>
</listitem>
<listitem>
<para>
vérifiez la ligne charset (sur le tampon serveur), vous devriez
voir ISO-XXXXXX ou UTF-8 pour le charset du terminal. Si vous
voyez ANSI_X3.4-1968 ou d'autres valeurs, votre locale est
probablement erronée.
</para>
</listitem>
<listitem>
<para>
affectez la valeur pour le décodage global, par exemple :
<screen>/setp charset.global.decode = ISO-8859-15</screen>
</para>
</listitem>
</itemizedlist>
</para>
</section>
</section>
<section id="secTubeFIFO">
<title>Tube FIFO</title>
@@ -2105,6 +2232,12 @@ plugin->log (plugin, "freenode", "#weechat", "test");
ne sera ni transmis à WeeChat ni à d'autres extensions
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal> : la fonction
a réussi et provoque un "highlight" sur le message reçu
</para>
</listitem>
</itemizedlist>
</para>
<para>
@@ -2218,7 +2351,7 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
</row>
<row>
<entry><literal>%C</literal></entry>
<entry>canaux du serveur courant</entry>
<entry>tous les canaux (y compris les privés)</entry>
</row>
<row>
<entry><literal>%f</literal></entry>
@@ -2244,6 +2377,13 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK",
<entry><literal>%m</literal></entry>
<entry>pseudo sur le serveur courant</entry>
</row>
<row>
<entry><literal>%M</literal></entry>
<entry>
pseudos sur le serveur courant
(tous les canaux ouverts)
</entry>
</row>
<row>
<entry><literal>%n</literal></entry>
<entry>pseudos du canal courant</entry>
@@ -2596,7 +2736,125 @@ keyb_handler = plugin->keyboard_handler_add (plugin, &amp;mon_keyb);
</screen>
</para>
</section>
<section id="secAPI_event_handler_add">
<title>event_handler_add</title>
<para>
Prototype :
<command>
t_plugin_handler *event_handler_add (t_weechat_plugin
*plugin, char *evenement, t_plugin_handler_func *fonction,
char *handler_args, void *handler_pointer)
</command>
</para>
<para>
Ajoute un gestionnaire d'évènement, appelé dès qu'un évènement se
produit.
</para>
<para>
Paramètres :
<itemizedlist>
<listitem>
<para>
<option>plugin</option> : pointeur vers la structure
de l'extension
</para>
</listitem>
<listitem>
<para>
<option>évènement</option> : évènement, voir le tableau
ci-dessous :
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Evènement</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>buffer_open</literal></entry>
<entry>un tampon a été ouvert</entry>
</row>
<row>
<entry><literal>buffer_close</literal></entry>
<entry>un tampon a été fermé</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</listitem>
<listitem>
<para>
<option>fonction</option> : fonction appelée
</para>
<para>
Elle a le prototype suivant :
<command>
int ma_fonction (t_weechat_plugin *plugin,
int argc, char **argv,
char *handler_args, void *handler_pointer)
</command>
</para>
<para>
Le paramètre argc vaut 1 et argv[0] contient le numéro
du tampon ouvert ou fermé.
</para>
</listitem>
<listitem>
<para>
<option>handler_args</option> : paramètres passés à la
fonction appelée
</para>
</listitem>
<listitem>
<para>
<option>handler_pointer</option> : pointeur passé à la
fonction appelée
</para>
</listitem>
</itemizedlist>
</para>
<para>
Valeur renvoyée : le pointeur vers le nouveau gestionnaire
d'évènement.
</para>
<para>
Note : la fonction appelée doit renvoyer une des valeurs
suivantes :
<itemizedlist>
<listitem>
<para>
<literal>PLUGIN_RC_KO</literal> : la fonction a échoué
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK</literal> : la fonction a réussi
</para>
</listitem>
</itemizedlist>
</para>
<para>
Exemple :
<screen>
int mon_evenement (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
{
plugin->print (plugin, NULL, NULL, "mon_evenement");
return PLUGIN_RC_OK;
}
...
t_plugin_handler *event_handler;
event_handler = plugin->event_handler_add (plugin, "buffer_open",
&amp;mon_evenement);
</screen>
</para>
</section>
<section id="secAPI_handler_remove">
<title>handler_remove</title>
@@ -2987,6 +3245,13 @@ plugin->exec_command (plugin, "freenode", "#weechat", "bonjour");
<entry><literal>server</literal></entry>
<entry>nom du serveur</entry>
</row>
<row>
<entry><literal>type</literal></entry>
<entry>
type de tampon: 0=standard, 1=DCC,
2=données IRC brutes
</entry>
</row>
<row>
<entry><literal>away</literal></entry>
<entry>drapeau "away"</entry>
@@ -4408,7 +4673,7 @@ else
<entry>int</entry>
<entry><literal>type</literal></entry>
<entry>
type de tampon: 0=standard, 1=dcc,
type de tampon: 0=standard, 1=DCC,
2=données IRC brutes
</entry>
</row>
@@ -5487,6 +5752,12 @@ end
ne sera ni transmis à WeeChat ni à d'autres extensions
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK_WITH_HIGHLIGHT</literal> : la fonction
a réussi et provoque un "highlight" sur le message reçu
</para>
</listitem>
</itemizedlist>
</para>
</section>
@@ -5793,7 +6064,7 @@ def mon_clavier(key, input_before, input_after):
# ruby
Weechat.add_keyboard_handler("mon_clavier")
def mon_clavier(server, input_before, input_after)
def mon_clavier(key, input_before, input_after)
Weechat.print("gestionnaire clavier: touche = '#{key}', " \
"entrée avant = '#{input_before}' " \
"après = '#{input_after}'")
@@ -5802,7 +6073,7 @@ end
-- lua
weechat.add_keyboard_handler("mon_clavier")
function mon_clavier(server, input_before, input_after)
function mon_clavier(key, input_before, input_after)
weechat.print("gestionnaire clavier: touche = '"..key..
"', entrée avant = '"..input_before..
"' après = '"..input_after.."'")
@@ -5828,6 +6099,108 @@ end
</para>
</section>
<section id="secScript_add_event_handler">
<title>add_event_handler</title>
<para>
Prototype Perl :
<command>
weechat::add_event_handler(évènement, fonction);
</command>
</para>
<para>
Prototype Python :
<command>
weechat.add_event_handler(évènement, fonction)
</command>
</para>
<para>
Prototype Ruby :
<command>
Weechat.add_event_handler(évènement, fonction)
</command>
</para>
<para>
Prototype Lua :
<command>
weechat.add_event_handler(évènement, fonction)
</command>
</para>
<para>
Ajoute un gestionnaire d'évènement, appelé dès qu'un évènement se
produit.
</para>
<para>
Paramètres :
<itemizedlist>
<listitem>
<para>
<option>évènement</option> : évènement
(voir <xref linkend="secAPI_event_handler_add" />)
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>
<option>fonction</option> : fonction appelée
</para>
</listitem>
</itemizedlist>
</para>
<para>
Valeur renvoyée : 1 si succès, 0 si une erreur s'est produite.
</para>
<para>
Exemples :
<screen>
# perl
weechat::add_event_handler("buffer_open", "mon_evenement");
sub mon_evenement
{
weechat::print("buffer open");
return weechat::PLUGIN_RC_OK;
}
# python
weechat.add_event_handler("buffer_open", "mon_evenement")
def mon_evenement():
weechat.prnt("buffer open")
return weechat.PLUGIN_RC_OK
# ruby
Weechat.add_event_handler("buffer_open", "mon_evenement")
def mon_evenement()
Weechat.print("buffer open")
return Weechat::PLUGIN_RC_OK
end
-- lua
weechat.add_event_handler("buffer_open", "mon_evenement")
function mon_evenement()
weechat.print("buffer open")
return weechat.PLUGIN_RC_OK()
end
</screen>
</para>
<para>
Note : la fonction appelée doit renvoyer une des valeurs
suivantes :
<itemizedlist>
<listitem>
<para>
<literal>PLUGIN_RC_KO</literal> : la fonction a échoué
</para>
</listitem>
<listitem>
<para>
<literal>PLUGIN_RC_OK</literal> : la fonction a réussi
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section id="secScript_remove_handler">
<title>remove_handler</title>
@@ -6016,6 +6389,67 @@ weechat.remove_keyboard_handler("mon_clavier")
</para>
</section>
<section id="secScript_remove_event_handler">
<title>remove_event_handler</title>
<para>
Prototype Perl :
<command>
weechat::remove_event_handler(fonction);
</command>
</para>
<para>
Prototype Python :
<command>
weechat.remove_event_handler(fonction)
</command>
</para>
<para>
Prototype Ruby :
<command>
Weechat.remove_event_handler(fonction)
</command>
</para>
<para>
Prototype Lua :
<command>
weechat.remove_event_handler(fonction)
</command>
</para>
<para>
Supprime un gestionnaire d'évènement.
</para>
<para>
Paramètres :
<itemizedlist>
<listitem>
<para>
<option>fonction</option> : fonction
</para>
</listitem>
</itemizedlist>
</para>
<para>
Valeur renvoyée : 1 si succès, 0 si une erreur s'est produite.
</para>
<para>
Exemples :
<screen>
# perl
weechat::remove_event_handler("mon_evenement");
# python
weechat.remove_event_handler("mon_evenement")
# ruby
Weechat.remove_event_handler("mon_evenement")
-- lua
weechat.remove_event_handler("mon_evenement")
</screen>
</para>
</section>
<section id="secScript_add_modifier">
<title>add_modifier</title>
+25 -12
View File
@@ -15,7 +15,8 @@ param
</programlisting>
<command>est remplacé par tous les paramètres.</command>
<programlisting>
<programlisting>Les variables $nick, $channel et $server sont remplacées par le pseudo/canal/serveur courant.
</programlisting>
<command>buffer [action [args] | nombre | [[serveur] [canal]]]</command>
<programlisting>
@@ -40,24 +41,27 @@ commande: commande
</programlisting>
<command>clear [-all]</command>
<command>clear [-all | nombre]</command>
<programlisting>
effacer la/les fenêtre(s)
-all: effacer toutes les fenêtres
-all: effacer tous les tampons
nombre: effacer un tampon par son numéro
</programlisting>
<command>connect [nom_serveur]</command>
<command>connect [-all | nom_serveur [nom_serveur...]]</command>
<programlisting>
se connecter à un serveur
se connecter à un/plusieurs serveur(s)
-all: se connecter à tous les serveurs
nom_serveur: nom du serveur pour se connecter
</programlisting>
<command>disconnect [nom_serveur]</command>
<command>disconnect [-all | nom_serveur [nom_serveur...]]</command>
<programlisting>
se déconnecter d'un serveur
se déconnecter d'un/plusieurs serveur(s)
-all: se déconnecter de tous les serveurs
nom_serveur: nom du serveur pour se déconnecter
</programlisting>
@@ -95,9 +99,9 @@ valeur: nombre d'entr
</programlisting>
<command>ignore [masque [[type | commande] [canal [serveur]]]]</command>
<programlisting>
ignorer des messages IRC et/ou des masques
ignorer des messages IRC et/ou des hôtes
masque: pseudo ou masque à ignorer
masque: pseudo ou hôte à ignorer
type: type de message à ignorer (action, ctcp, dcc, pv)
commande: commande IRC
canal: nom du canal pour le ignore
@@ -107,13 +111,14 @@ Pour chaque param
Sans paramètres, la commande /ignore liste les ignore définis.
</programlisting>
<command>key [touche [fonction/commande]] [unbind touche] [functions] [reset -yes]</command>
<command>key [touche [fonction/commande]] [unbind touche] [functions] [call fonction ["params"]] [reset -yes]</command>
<programlisting>
associer/libérer des touches
touche: voir ou associer cette touche à une fonction interne ou une commande (commençant par "/")
unbind: supprimer l'association à une touche
functions: lister la liste des fonctions internes pour les associations de touches
call: appeler une foonction par son nom (avec paramètres optionnels)
reset: restaure les touches aux valeurs par défaut et supprime TOUTES les touches personnelles (utiliser avec précaution !)
</programlisting>
@@ -130,6 +135,14 @@ autoload: charger automatiquement les extensions dans un r
Sans paramètre, la commande /plugin liste les extensions chargées.
</programlisting>
<command>reconnect [-all | nom_serveur [nom_serveur...]]</command>
<programlisting>
se reconnecter à un/plusieurs serveur(s)
-all: se reconnecter à tous les serveurs
nom_serveur: nom du serveur pour se reconnecter
</programlisting>
<command>server [nom_serveur] | [nom_serveur nom/IP port [-auto | -noauto] [-ipv6] [-ssl] [-pwd mot_de_passe] [-nicks pseudo1 pseudo2 pseudo3] [-username nom_utilisateur] [-realname nom_réel] [-command commande] [-autojoin canal[,canal]] ] | [del nom_serveur]</command>
<programlisting>
@@ -184,10 +197,10 @@ nom_alias: nom de l'alias
</programlisting>
<command>unignore [nombre | [masque [[type | commande] [canal [serveur]]]]]</command>
<programlisting>
supprimer le ignore des messages IRC et/ou des masques
supprimer le ignore des messages IRC et/ou des hôtes
nombre: numéro de ignore à supprimer (le nombre est affiché sur la liste des ignore)
masque: pseudo ou masque à ignorer
masque: pseudo ou hôte à ignorer
type: type de message à ignorer (action, ctcp, dcc, pv)
commande: commande IRC
canal: nom du canal pour le ignore
+2 -2
View File
@@ -53,11 +53,11 @@ Guide de d
Vous pouvez voir les options du serveur et les valeurs avec /set quakenet
Pour modifier une option, utilisez /set quakenet.server_option = valeur
5. Se connecter au serveur et rejoindre les canaux :
5. Se connecter au serveur et rejoindre les canaux
/connect quakenet
6. Rejoindre/quittre les canaux
6. Rejoindre/quitter les canaux
Joindre un canal :
/join #channel
+28
View File
@@ -0,0 +1,28 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
LANGCODE = sco
QUICKSTART = weechat_quickstart.$(LANGCODE).txt
EXTRA_DIST = $(QUICKSTART)
docdir = $(datadir)/doc/$(PACKAGE)
# install docs
install-data-hook:
$(INSTALL_DATA) $(QUICKSTART) $(DESTDIR)$(docdir)/
+108
View File
@@ -0,0 +1,108 @@
WeeChat quik stairt guide (Scots version)
=========================
1. Launch weechat
Accordin tae choosed GUI, ye hav tae launch:
- weechat-curses fer Curses GUI
- weechat-gtk fer Gtk GUI (under development)
- weechat-qt fer Qt GUI (no developed)
- weechat-wxwidgets fer WxWidgets GUI (no developed yit)
2. Online help / options
WeeChat hus help fer awl commands, jus issu /help
Tae get help on a command, issu /help command
Tae set options, use eh /set option = value
Ye can use /set option wi partial name (displ't awl options
contain leters), or wi ownly a full option nam wi'oot value
(tae see long help fer option).
Pure Important: settings are saved when WeeChat ends (or wi eh "/save"
command). Gonnae NO(!) edit eh setup file whyle WeeChat is running, cause WeeChat
may write eh file at 'ne time, and its nae possible tae reload it.
Tae chainge any settins, use "/set" command, WeeChat immediately uses new
settings.
3. Create a server
Fer example irc.quakenet.org, port 6667:
/server quakenet irc.quakenet.org 6667
(/help server fer ful command help)
4. Set custom server options
Nicks:
/set quakenet.server_nick1 = "manick"
/set quakenet.server_nick2 = "manick2"
/set quakenet.server_nick3 = "manick3"
Username/realname:
/set quakenet.server_username = "Ma username"
/set quakenet.server_realname = "Ma real name"
Auto-connect tae server:
/set quakenet.server_autoconnect = on
Auto-join fer sum channels:
/set quakenet.server_autojoin = "#chan1,#chan2"
Other options:
Ye can see servers options and values wi /set quakenet
Tae set an option, use eh /set quakenet.server_option = value
5. Connect tae server n auto-join channels:
/connect quakenet
6. Join/part channels
Join a channel:
/join #channel
Part a channel:
/part [quit message]
Part a channel n close buffer:
/close [quit message]
(/close is an alias on /buffer close)
7. Buffer/window management
Ye can manage buffers wi "/buffer" command and windows
with "/window" command.
Fer example, tae split verticaly screen intae a wee windea (1/3 width),
n a big yin (2/3), use command:
/window splitv 33
8. Key bindings
According tae yer keyboard and/or ya needs, ye can rebind 'ne key
wi "/key" command.
A useful key is meta-k (alt-k) tae find key codes.
Fer example, tae bind meta-y (alt-y) tae command "/buffer close":
/key (press meta-k) (press meta-y) /buffer close
Ye wull huv a command line like:
/key meta-y /buffer close
9. Plugins/scripts
On som distros lyke Debian, plugins are available via a separate package
(like weechat-plugins).
Plugins are automatically loadet when found.
Many plugins/scripts are available fer WeeChat, please luk at:
http://weechat.flashtux.org/plugins.php
Please luk at WeeChat documentation tae load/unload plugins or scripts.
10. Mer documentation
Yae can noo use WeeChat and read FAQ/documentation fer any oths questins:
http://weechat.flashtux.org/faq.php
http://weechat.flashtux.org/doc.php
Enjoy WeeChat!
--
(c) 2006-05-31, written by FlashCode <flashcode@flashtux.org>, Translate't by AndrewB <andrewb@tuxhacker.org>
This document is part of WeeChat and is distributed under GPL licence.
+3 -3
View File
@@ -1,4 +1,4 @@
.TH WEECHAT 1 "January 2007" "FlashCode"
.TH WEECHAT 1 "June 2007" "FlashCode"
.SH NAME
weechat-curses \- Wee Enhanced Environment for Chat (Curses version)
@@ -14,7 +14,7 @@ or
Fast, light and extensible IRC client for many operating systems.
.br
Everything can be done with a keyboard. It is customizable and extensible with scripts.
Many GUIs are available (Curses, Gtk, Qt, and text).
Many GUIs are or will be available (Curses, Gtk and Qt).
It is compliant with RFCs 1459, 2810, 2811, 2812, and 2813.
.SH OPTIONS
@@ -85,7 +85,7 @@ WeeChat is written by FlashCode <flashcode@flashtux.org>
.br
WeeChat on the web:
.UR
http://weechat.flashtux.org
http://weechat.flashtux.org/
.br
Get support there:
.UR
+77
View File
@@ -0,0 +1,77 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
SET(PO_FILES
fr.po
es.po
cs.po
hu.po
de.po
ru.po
)
SET(COPYRIGHT_HOLDER "WeeChat Team")
SET(BUGS_ADDRESS "flashcode@flashtux.org")
SET(POT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pot)
INCLUDE(srcfiles.cmake)
# Looking for xgettext, msgmerge and msgfmt
FIND_PROGRAM(XGETTEXT_EXECUTABLE xgettext)
FIND_PROGRAM(MSGMERGE_EXECUTABLE msgmerge)
FIND_PROGRAM(MSGFMT_EXECUTABLE msgfmt)
IF(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
# Create PO template file weechat.pot
SET(SRC_FILES)
SET(POT_DEPENDS)
FOREACH(srcfile ${WEECHAT_SOURCES})
SET(SRC_FILES ${SRC_FILES} ${srcfile})
SET(POT_DEPENDS ${POT_DEPENDS} ${CMAKE_SOURCE_DIR}/${srcfile})
ENDFOREACH(srcfile ${WEECHAT_SOURCES})
ADD_CUSTOM_COMMAND(
OUTPUT ${POT_FILE}
COMMAND ${XGETTEXT_EXECUTABLE}
ARGS -o ${POT_FILE} --keyword='_' --keyword='N_' --directory=${CMAKE_SOURCE_DIR} --omit-header --msgid-bugs-address=${BUGS_ADDRESS} --copyright-holder=${COPYRIGHT_HOLDER} ${SRC_FILES}
DEPENDS ${POT_DEPENDS}
COMMENT "Generating PO template file"
)
# Update .po files and compile them to binary .gmo files
SET(GMO_FILES)
FOREACH(pofile ${PO_FILES})
GET_FILENAME_COMPONENT(polang ${pofile} NAME_WE)
SET(gmofile ${CMAKE_CURRENT_BINARY_DIR}/${polang}.gmo)
ADD_CUSTOM_COMMAND(
OUTPUT ${gmofile}
COMMAND ${MSGMERGE_EXECUTABLE} ARGS --quiet -s -o ${CMAKE_CURRENT_BINARY_DIR}/${pofile} ${CMAKE_CURRENT_SOURCE_DIR}/${pofile} ${POT_FILE}
COMMAND ${MSGFMT_EXECUTABLE} ARGS -o ${gmofile} ${CMAKE_CURRENT_BINARY_DIR}/${pofile}
DEPENDS ${POT_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}
COMMENT "Compiling locales (${polang})"
)
INSTALL(FILES ${gmofile} DESTINATION share/locale/${polang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
SET(GMO_FILES ${GMO_FILES} ${gmofile})
ENDFOREACH(pofile ${PO_FILES})
ADD_CUSTOM_TARGET(translations ALL DEPENDS ${GMO_FILES})
ENDIF(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
+1067 -971
View File
File diff suppressed because it is too large Load Diff
+1088 -978
View File
File diff suppressed because it is too large Load Diff
+1079 -966
View File
File diff suppressed because it is too large Load Diff
+1881 -1785
View File
File diff suppressed because it is too large Load Diff
+1072 -967
View File
File diff suppressed because it is too large Load Diff
+1074 -971
View File
File diff suppressed because it is too large Load Diff
+82
View File
@@ -0,0 +1,82 @@
SET(WEECHAT_SOURCES
src/irc/irc-mode.c
src/irc/irc-nick.c
src/irc/irc-server.c
src/irc/irc-channel.c
src/irc/irc-commands.c
src/irc/irc-display.c
src/irc/irc-send.c
src/irc/irc-recv.c
src/irc/irc-dcc.c
src/irc/irc-ignore.c
src/irc/irc.h
src/plugins/plugins.c
src/plugins/plugins.h
src/plugins/plugins-config.c
src/plugins/plugins-config.h
src/plugins/plugins-interface.c
src/plugins/weechat-plugin.h
src/gui/curses/gui-curses-chat.c
src/gui/curses/gui-curses-color.c
src/gui/curses/gui-curses-infobar.c
src/gui/curses/gui-curses-input.c
src/gui/curses/gui-curses-keyboard.c
src/gui/curses/gui-curses-main.c
src/gui/curses/gui-curses-nicklist.c
src/gui/curses/gui-curses-panel.c
src/gui/curses/gui-curses-status.c
src/gui/curses/gui-curses-window.c
src/gui/curses/gui-curses.h
src/gui/gtk/gui-gtk-chat.c
src/gui/gtk/gui-gtk-color.c
src/gui/gtk/gui-gtk-infobar.c
src/gui/gtk/gui-gtk-input.c
src/gui/gtk/gui-gtk-keyboard.c
src/gui/gtk/gui-gtk-main.c
src/gui/gtk/gui-gtk-nicklist.c
src/gui/gtk/gui-gtk-panel.c
src/gui/gtk/gui-gtk-status.c
src/gui/gtk/gui-gtk-window.c
src/gui/gtk/gui-gtk.h
src/gui/gui-action.c
src/gui/gui-buffer.c
src/gui/gui-common.c
src/gui/gui-keyboard.c
src/gui/gui-log.c
src/gui/gui-panel.c
src/gui/gui-window.c
src/gui/gui.h
src/gui/gui-buffer.h
src/gui/gui-color.h
src/gui/gui-keyboard.h
src/gui/gui-panel.h
src/gui/gui-window.h
src/common/alias.c
src/common/alias.h
src/common/backtrace.c
src/common/backtrace.h
src/common/command.c
src/common/command.h
src/common/completion.c
src/common/completion.h
src/common/fifo.c
src/common/fifo.h
src/common/history.c
src/common/history.h
src/common/hotlist.c
src/common/hotlist.h
src/common/log.c
src/common/log.h
src/common/session.c
src/common/session.h
src/common/utf8.c
src/common/utf8.h
src/common/util.c
src/common/util.h
src/common/weechat.c
src/common/weechat.h
src/common/weeconfig.c
src/common/weeconfig.h
src/common/weelist.c
src/common/weelist.h
)
+1068 -981
View File
File diff suppressed because it is too large Load Diff
+72
View File
@@ -0,0 +1,72 @@
# perl
# Logs URLs to a p5-DBI-MySQL database.
# This script is BSD licensed.
# Hacked together by Karlis "Hagabard" Loen in Feb 2007
# hagabard AT gmail DOT com
# Table format: (ircurls is default table name in script)
#+-----------+---------------+------+-----+---------+-------+
#| Field | Type | Null | Key | Default | Extra |
#+-----------+---------------+------+-----+---------+-------+
#| timestamp | timestamp(14) | YES | | NULL | |
#| hostmask | text(255) | YES | | NULL | |
#| target | text(255) | YES | | NULL | |
#| url | text(255) | YES | | NULL | |
#+-----------+---------------+------+-----+---------+-------+
# In the future I hope to get around to adding stuff like:
#+-----------+---------------+------+-----+---------+-------+
#| httptitle | text(255) | YES | | NULL | |
#| httpdinfo | text(255) | YES | | NULL | |
#| tinyurl | text(255) | YES | | NULL | |
#+-----------+---------------+------+-----+---------+-------+
# Test other DBI types, maybe /setp perl.logurlsql.dbtype="Pg" works?
# Tested with p5-DBI-Mysql, others untested
use DBI;
weechat::register("logurlsql", "0.2", "", "WeeChat p5-DBI script to log URLs to a SQL Database.");
weechat::add_message_handler("*", "cmd_logurl");
# Setup Database connection, now with /setp for your configuration pleasure
weechat::set_plugin_config("dbtype", "mysql") if (weechat::get_plugin_config("dbtype") eq "");
weechat::set_plugin_config("dbhost", "localhost") if (weechat::get_plugin_config("dbhost") eq "");
weechat::set_plugin_config("dbname", "weechat") if (weechat::get_plugin_config("dbname") eq "");
weechat::set_plugin_config("dbtable", "ircurls") if (weechat::get_plugin_config("dbtable") eq "");
weechat::set_plugin_config("dbuser", "irc") if (weechat::get_plugin_config("dbuser") eq "");
weechat::set_plugin_config("dbpass", "forever") if (weechat::get_plugin_config("dbpass") eq "");
# Regexps
sub URL_SCHEME_REGEX() { '(http|ftp|https|news|irc)' }
sub URL_GUESS_REGEX() { '(www|ftp)' }
sub URL_BASE_REGEX() { '[a-z0-9_\-+\\/:?%.&!~;,=\#<]' }
# This sub borrowed from the BSD licensed urlplot.pl irssi script by bwolf.
sub scan_url {
my $rawtext = shift;
return $1 if $rawtext =~ m|(@{[ URL_SCHEME_REGEX ]}://@{[ URL_BASE_REGEX ]}+)|io;
# The URL misses a scheme, try to be smart
if ($rawtext =~ m|@{[ URL_GUESS_REGEX ]}\.@{[ URL_BASE_REGEX ]}+|io) {
my $preserve = $&;
return "http://$preserve" if $1 =~ /^www/;
return "ftp://$preserve" if $1 =~ /^ftp/;
}
return undef;
}
sub cmd_logurl {
($null, $target, $data) = split ":",$_[1],3;
($hostmask, $null, $target) = split " ", $target;
if (defined($url = scan_url($data))) {
#weechat::print("hostmask=$hostmask, target=$target, url=$url");
db_insert($hostmask, $target, $url);
}
return weechat::PLUGIN_RC_OK;
}
sub db_insert {
my ($hostmask, $target, $url)=@_;
my $dbh = DBI->connect( "DBI:". weechat::get_plugin_config(dbtype) .":". weechat::get_plugin_config(dbname) .":". weechat::get_plugin_config(dbhost), weechat::get_plugin_config(dbuser), weechat::get_plugin_config(dbpass));
my $sql="insert into ". weechat::get_plugin_config(dbtable) ." (timestamp, hostmask, target, url) values (NOW()".",". $dbh->quote($hostmask) ."," . $dbh->quote($target) ."," . $dbh->quote($url) .")";
my $sth = $dbh->do($sql);
$dbh->disconnect();
}
+241
View File
@@ -0,0 +1,241 @@
#
# Copyright (c) 2007 by FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
#
# Display old topics for a channel.
#
# History:
# 2007-03-29, FlashCode <flashcode@flashtux.org>:
# initial release
#
use strict;
my $version = "0.1";
my $plugin_help_options = "Plugins options (set with /setp):\n"
." - perl.oldtopic.log_server: if on, displays all topic changes on server buffer\n"
." - perl.oldtopic.max_topics: number of topics to keep for each channel "
."(0 = do not keep any topics)";
# default values in setup file (~/.weechat/plugins.rc)
my $default_log_server = "off";
my $default_max_topics = "10";
# init script
weechat::register("oldtopic", $version, "", "Display old topics for a channel");
weechat::set_plugin_config("log_server", $default_log_server) if (weechat::get_plugin_config("log_server") eq "");
weechat::set_plugin_config("max_topics", $default_max_topics) if (weechat::get_plugin_config("max_topics") eq "");
# message and command handlers
weechat::add_message_handler("topic", "topic_msg");
weechat::add_message_handler("332", "topic_332_msg");
weechat::add_message_handler("333", "topic_333_msg");
weechat::add_command_handler ("lasttopic", "lasttopic_cmd",
"Display last topic for a channel (topic before current one)",
"[channel]",
"channel: channel name (default: current channel)\n\n"
.$plugin_help_options,
"%C");
weechat::add_command_handler ("oldtopic", "oldtopic_cmd",
"Display old topics for a channel",
"[channel]",
"channel: channel name (default: current channel)\n\n"
.$plugin_help_options,
"%C");
my %oldtopic;
undef %oldtopic;
my %msg_332_topic;
undef %msg_332_topic;
sub get_config
{
my $conf_log_server = weechat::get_plugin_config("log_server");
$conf_log_server = $default_log_server if ($conf_log_server eq "");
my $conf_max = weechat::get_plugin_config("max_topics");
$conf_max = $default_max_topics if ($conf_max eq "");
$conf_max = 0 if ($conf_max < 0);
return ($conf_log_server, $conf_max);
}
sub add_topic
{
my ($server, $channel, $nick, $topic, $topicdate, $conf_max) =
($_[0], $_[1], $_[2], $_[3], $_[4], $_[5]);
my $time = $topicdate;
$time = time() if ($time eq "");
$oldtopic{$server}{$channel}{$time}{"nick"} = $nick;
$oldtopic{$server}{$channel}{$time}{"topic"} = $topic;
my $numchan = scalar(keys(%{$oldtopic{$server}{$channel}}));
if ($numchan > $conf_max)
{
my $diff = $numchan - $conf_max;
my $count = 0;
foreach my $date (sort keys %{$oldtopic{$server}{$channel}})
{
delete($oldtopic{$server}{$channel}{$date});
$count++;
last if ($count >= $diff);
}
}
}
# received when someone changes topic on a channel
sub topic_msg
{
my $server = $_[0];
my ($conf_log_server, $conf_max) = get_config();
if ($_[1] =~ /(.*) TOPIC (.*)/)
{
my $nick = $1;
my $args = $2;
my $nick = $1 if ($nick =~ /:?([^!]+)(!?.*)/);
if ($args =~ /([\#\&\+\!][^ ]*) (.*)/)
{
my $channel = $1;
my $topic = $2;
$topic = $1 if ($topic =~ /:(.*)/);
if ($conf_log_server eq "on")
{
weechat::print("Topic on $channel changed by ${nick} to: \"${topic}\x0F\"",
"", $server);
}
if ($conf_max > 0)
{
add_topic($server, $channel, $nick, $topic, "", $conf_max);
}
else
{
delete($oldtopic{$server}{$channel});
}
}
}
return weechat::PLUGIN_RC_OK;
}
# topic for a channel (when joining channel)
sub topic_332_msg
{
my $server = $_[0];
if ($_[1] =~ /(.*) 332 (.*)/)
{
my $args = $2;
if ($args =~ /([\#\&\+\!][^ ]*) (.*)/)
{
my $channel = $1;
my $topic = $2;
$topic = $1 if ($topic =~ /:(.*)/);
$msg_332_topic{$server}{$channel} = $topic;
}
}
return weechat::PLUGIN_RC_OK;
}
# nick/date for topic (when joining channel, received after 332)
sub topic_333_msg
{
my $server = $_[0];
if ($_[1] =~ /.* 333 .* ([\#\&\+\!][^ ]*) (.*) ([0-9]+)/)
{
my $channel = $1;
my $nick = $2;
my $date = $3;
my ($conf_log_server, $conf_max) = get_config();
add_topic($server, $channel, $nick,
$msg_332_topic{$server}{$channel},
$date, $conf_max);
}
return weechat::PLUGIN_RC_OK;
}
sub lasttopic_cmd
{
my $server = weechat::get_info("server");
my $channel = weechat::get_info("channel");
$channel = $_[1] if ($_[1] ne "");
if ($channel ne "")
{
my ($conf_log_server, $conf_max) = get_config();
delete($oldtopic{$server}{$channel}) if ($conf_max == 0);
my $count = 0;
my $found = 0;
foreach my $date (sort { $b <=> $a } keys %{$oldtopic{$server}{$channel}})
{
$count++;
if ($count > 1)
{
$found = 1;
weechat::print("Last topic for ${server}/${channel}: on ".localtime($date)." by ".
$oldtopic{$server}{$channel}{$date}{"nick"}.": \"".
$oldtopic{$server}{$channel}{$date}{"topic"}."\x0F\"");
last;
}
}
weechat::print("Last topic not found for channel ${server}/${channel}.") if ($found == 0);
}
else
{
weechat::print("Error: this buffer is not a channel.");
}
return weechat::PLUGIN_RC_OK;
}
sub oldtopic_cmd
{
my $server = weechat::get_info("server");
my $channel = weechat::get_info("channel");
$channel = $_[1] if ($_[1] ne "");
if ($channel ne "")
{
my ($conf_log_server, $conf_max) = get_config();
delete($oldtopic{$server}{$channel}) if ($conf_max == 0);
my $found = 0;
foreach my $date (sort keys %{$oldtopic{$server}{$channel}})
{
$found = 1;
weechat::print("Topic for ${server}/${channel} on ".localtime($date)." by ".
$oldtopic{$server}{$channel}{$date}{"nick"}.": \"".
$oldtopic{$server}{$channel}{$date}{"topic"}."\x0F\"");
}
weechat::print("No old topic for channel ${server}/${channel}.") if ($found == 0);
}
else
{
weechat::print("Error: this buffer is not a channel.");
}
return weechat::PLUGIN_RC_OK;
}
+1 -1
View File
@@ -2,7 +2,7 @@
# xmms perl script for weechat #
# #
# Displays some useless xmms-infopipe values #
# (c) 2006 by Cédric Chalier <llinkz@gmail.com> #
# (c) 2006 by Cédric Chalier <ounaid AT gmail DOT com> #
# #
# This program is free software; you can redistribute it and/or #
# modify it under the terms of the GNU General Public License #
+231
View File
@@ -0,0 +1,231 @@
#
# Copyright (c) 2006 by Eric Gach <eric.gach@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
import weechat
import os
import subprocess
import traceback
__desc__ = 'Amarok control and now playing script for Weechat.'
__version__ = '1.0.2'
__author__ = 'Eric Gach <eric.gach@gmail.com>'
# With changes by Leonid Evdokimov (weechat at darkk dot net another dot ru):
# http://darkk.net.ru/weechat/amarok.py
# v 1.0.1 - added %year%
# v 1.0.2 - fixed bug with dead zombie-childs
# fixed bug when loading second instance of the script
# added better default for dcop_user setting
dcop = {}
debug = {}
infobar = {}
output = {}
ssh = {}
class amarokException(Exception):
pass
def amarokCommand(server, args):
try:
args = args.split(' ')
if args[0] == 'infobar':
if infobar['enabled']:
infobar['enabled'] = False
weechat.set_plugin_config('infobar_enabled', '0')
weechat.remove_timer_handler('amarokInfobarUpdate')
weechat.remove_infobar(0)
weechat.prnt('Infobar disabled')
else:
infobar['enabled'] = True
weechat.set_plugin_config('infobar_enabled', '1')
amarokInfobarUpdate()
weechat.add_timer_handler(infobar['update'], 'amarokInfobarUpdate')
weechat.prnt('Infobar enabled')
return weechat.PLUGIN_RC_OK
elif args[0] == 'next':
__executeCommand('next')
weechat.prnt('Amarok: Playing next song.')
return weechat.PLUGIN_RC_OK
elif args[0] == 'np':
return amarokNowPlaying(server)
elif args[0] == 'pause':
__executeCommand('pause')
weechat.prnt('Amarok: Song paused.')
return weechat.PLUGIN_RC_OK
elif args[0] == 'play':
__executeCommand('play')
weechat.prnt('Amarok: Started playing.')
return weechat.PLUGIN_RC_OK
elif args[0] == 'prev':
__executeCommand('prev')
weechat.prnt('Amarok: Playing previous song.')
return weechat.PLUGIN_RC_OK
elif args[0] == 'stop':
__executeCommand('stop')
weechat.prnt('Amarok: Stop playing.')
return weechat.PLUGIN_RC_OK
elif args[0] == '':
return amarokDisplayHelp(server)
else:
weechat.prnt('Amarok: Unknown command %s' % (args[0]), '', server)
return weechat.PLUGIN_RC_OK
except amarokException, ex:
return weechat.PLUGIN_RC_KO
except:
file = open(debug['file'], 'w')
traceback.print_exc(None, file)
weechat.prnt('Unknown Exception encountered. Stack dumped to %s' % (debug['file']), '', server)
return weechat.PLUGIN_RC_KO
def amarokDisplayHelp(server):
weechat.prnt('%s - Version: %s' % (__desc__, __version__), '', server)
weechat.prnt('Author: %s' % (__author__), '', server)
weechat.prnt('', '', server)
weechat.prnt('Commands Available', '', server)
weechat.prnt(' /amarok next - Move to the next song in the playlist.', '', server)
weechat.prnt(' /amarok np - Display currently playing song.', '', server)
weechat.prnt(' /amarok play - Start playing music.', '', server)
weechat.prnt(' /amarok pause - Toggle between pause/playing.', '', server)
weechat.prnt(' /amarok prev - Move to the previous song in the playlist.', '', server)
weechat.prnt(' /amarok stop - Stop playing music.', '', server)
weechat.prnt(' /amarok infobar - Toggle the infobar display.', '', server)
weechat.prnt('', '', server)
weechat.prnt('Formatting', '', server)
weechat.prnt(' %artist% - Replaced with the song artist.', '', server)
weechat.prnt(' %title% - Replaced with the song title.', '', server)
weechat.prnt(' %album% - Replaced with the song album.', '', server)
weechat.prnt(' %year% - Replaced with the song year tag.', '', server)
weechat.prnt(' %cTime% - Replaced with how long the song has been playing.', '', server)
weechat.prnt(' %tTime% - Replaced with the length of the song.', '', server)
weechat.prnt(' %bitrate% - Replaced with the bitrate of the song.', '', server)
return weechat.PLUGIN_RC_OK
def amarokInfobarUpdate():
__loadSettings()
if infobar['enabled'] == False:
return weechat.PLUGIN_RC_OK
isPlaying = __executeCommands((__dcopCommand('isPlaying'),))
if isPlaying.strip() == 'false':
weechat.print_infobar(infobar['update'], 'Amarok is not currently playing')
return weechat.PLUGIN_RC_OK
else:
song = __getSongInfo()
format = __formatNP(infobar['format'], song)
weechat.print_infobar(infobar['update'], format)
return weechat.PLUGIN_RC_OK
def amarokNowPlaying(server):
__loadSettings()
isPlaying = __executeCommands((__dcopCommand('isPlaying'),))
if isPlaying.strip() == 'false':
weechat.prnt('Amarok is not playing.', '', server)
return weechat.PLUGIN_RC_KO
else:
song = __getSongInfo()
format = __formatNP(output['format'], song)
weechat.command(format)
return weechat.PLUGIN_RC_OK
def amarokUnload():
"""Unload the plugin from weechat"""
if infobar['enabled']:
weechat.remove_infobar(0)
weechat.remove_timer_handler('amarokInfobarUpdate')
return weechat.PLUGIN_RC_OK
def __formatNP(template, song):
np = template.replace('%artist%', song['artist'])
np = np.replace('%title%', song['title'])
np = np.replace('%album%', song['album'])
np = np.replace('%cTime%', song['cTime'])
np = np.replace('%tTime%', song['tTime'])
np = np.replace('%bitrate%', song['bitrate'])
np = np.replace('%year%', song['year'])
return np
def __dcopCommand(cmd):
if dcop['user'] == ':':
return 'dcop amarok player %s' % (cmd)
else:
return 'dcop --user %s amarok player %s' % (dcop['user'], cmd)
def __executeCommands(cmds):
from subprocess import PIPE
cmds = " && ".join(cmds)
if ssh['enabled']:
cmds = 'ssh -p %d %s@%s "%s"' % (ssh['port'], ssh['user'], ssh['host'], cmds)
proc = subprocess.Popen(cmds, shell = True, stderr = PIPE, stdout = PIPE, close_fds = True)
error = proc.stderr.read()
if error != '':
weechat.prnt(error)
output = proc.stdout.read()
proc.wait()
return output
def __getSongInfo():
"""Get the song information from amarok"""
song = {}
songs = __executeCommands(
(
__dcopCommand('artist'),
__dcopCommand('title'),
__dcopCommand('album'),
__dcopCommand('currentTime'),
__dcopCommand('totalTime'),
__dcopCommand('bitrate'),
__dcopCommand('year')
)
)
song['artist'], song['title'], song['album'], song['cTime'], song['tTime'], song['bitrate'], song['year'], empty = songs.split("\n")
return song
def __loadSettings():
dcop['user'] = __loadSetting('dcop_user', ':')
debug['file'] = os.path.expanduser(__loadSetting('debug_file', '~/amarok_debug.txt'))
infobar['enabled'] = __loadSetting('infobar_enabled', '0', 'bool')
infobar['format'] = __loadSetting('infobar_format', 'Now Playing: %title% by %artist%')
infobar['update'] = __loadSetting('infobar_update', '10', 'int')
output['format'] = __loadSetting('output_format', '/me is listening to %C04%title%%C by %C03%artist%%C from %C12%album%%C [%cTime% of %tTime% @ %bitrate%kbps]')
ssh['enabled'] = __loadSetting('ssh_enabled', '0', 'bool')
ssh['host'] = __loadSetting('ssh_host', 'localhost')
ssh['port'] = __loadSetting('ssh_port', '22', 'int')
ssh['user'] = __loadSetting('ssh_user', 'user')
def __loadSetting(setting, default=None, type=None):
value = weechat.get_plugin_config(setting)
if value == '' and default != None:
weechat.set_plugin_config(setting, default)
value = default
if type == 'int' or type == 'bool':
value = int(value)
if type == 'bool':
value = bool(value)
return value
if weechat.register('amarok', __version__, 'amarokUnload', __desc__):
__loadSettings()
if infobar['enabled']:
amarokInfobarUpdate()
weechat.add_timer_handler(infobar['update'], 'amarokInfobarUpdate')
weechat.add_command_handler('amarok', 'amarokCommand', 'Manage amarok or display now playing information.', 'next|np|play|pause|prev|stop|infobar')
+76
View File
@@ -0,0 +1,76 @@
"""
This script shows buffer list in infobar. Nothing more.
It's inspired by `awl.pl` irssi script, but is less advanced. :)
The script is in the public domain.
Leonid Evdokimov (weechat at darkk dot net dot ru)
http://darkk.net.ru/weechat/awl.py
0.1 - initial commit
0.2 - added `show_servers` option
0.3 - infobar is actually redrawed only if that's necessary
"""
#######################################################################
import weechat
from itertools import ifilter
VERSION = "0.3"
NAME = "awl"
# how often to refresh infobar
timer_interval = 1
blist = ()
def cleanup():
weechat.remove_infobar(-1)
return weechat.PLUGIN_RC_OK
def cfg_boolean(key, default = False):
map = {True: 'ON', False: 'OFF'}
value = weechat.get_plugin_config(key).upper()
if not value in map.values():
if value:
weechat.prnt("[%s]: invalid %s value (%s), resetting to %s" % (NAME, key, value, map[default]))
weechat.set_plugin_config(key, map[default])
value = default
else:
value = ifilter(lambda p: p[1] == value, map.iteritems()).next()[0]
return value
def update_channels():
global blist
names = ()
buffers = weechat.get_buffer_info()
if buffers != None:
for index, buffer in buffers.iteritems():
#**** info for buffer no 8 ****
# > log_filename, notify_level, server, num_displayed, type, channel
if len(buffer['channel']):
name = buffer['channel']
elif len(buffer['server']):
if cfg_boolean('show_servers'):
name = "[" + buffer['server'] + "]"
else:
continue
else:
name = "?"
names += ("%i:%s" % (index, name), )
if (names != blist):
the_string = " ".join(names)
blist = names
weechat.remove_infobar(-1)
weechat.print_infobar(0, the_string);
def on_timer():
update_channels()
return weechat.PLUGIN_RC_OK
if weechat.register(NAME, VERSION, "cleanup", "bufferlist in infobar"):
#message handlers are called __before__ buflist is changed, so we don't use them
weechat.add_timer_handler(timer_interval, "on_timer")
cfg_boolean('show_servers', False)
update_channels()
# vim:set tabstop=4 softtabstop=4 shiftwidth=4:
# vim:set expandtab:
+600 -119
View File
@@ -1,21 +1,33 @@
#!/usr/bin/env python
"""
Catapult by Stalwart <stlwrt@gmail.com>
Licensed under GNU GPL 2
"""
# Catapult v0.2 - less ordinary abuse generator
# Copyright (C) 2007 Pavel Shevchuk <stlwrt@gmail.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import weechat
import random
weechat.register("Catapult", "0.1", "", "Less ordinary abuse generator")
weechat.register("Catapult", "0.2", "", "Less ordinary abuse generator.")
weechat.add_command_handler("slap", "slapper", "Creative slapper", "<target>", "", "%n")
weechat.add_command_handler("fortune", "fortune", "Fortune cookies!")
weechat.add_command_handler("winjoke", "winjoke", "Windoze jokes")
weechat.add_command_handler("linjoke", "linjoke", "Linux jokes")
weechat.add_command_handler("give", "giver", "Creative giver", "<target>", "", "%n")
weechat.add_command_handler("hate", "hater", "Creative hater", "<target>", "", "%n")
weechat.add_command_handler("love", "lover", "Creative lover", "<target>", "", "%n")
weechat.add_command_handler("dance", "dancer", "Creative dancer", "<target>", "", "%n")
weechat.add_command_handler("excuse", "excuser", "BOFH excuses")
weechat.add_command_handler("fortune", "fortune", "Fortune cookies!")
weechat.add_command_handler("winjoke", "winjoke", "Windoze jokes")
weechat.add_command_handler("linjoke", "linjoke", "Linux jokes")
# slapper
def slapper(server, args):
@@ -114,7 +126,9 @@ def slapper(server, args):
"the Win2k Buglist",
"a widescreen TV (it can damage your brain!)",
"a chain saw",
"a huge tree"
"a huge tree",
"a 50'' CRT monitor",
"a warehouse (Quadratisch. Praktisch. Gut.)"
]
if args <> "":
weechat.command("/me slaps %s with %s." % (args, random.choice(objects)))
@@ -123,9 +137,579 @@ def slapper(server, args):
weechat.prnt("You must specify target")
return weechat.PLUGIN_RC_KO
# giver
def giver(server, args):
objects = [
"a binary four",
"a nice cup of SHUT THE FUCK UP",
"an asskick",
"a sign: 'Please kill yourself'",
"a sign: 'Please go home now'",
"an unlocked Grenade *tick tick BOOM*",
"a gun - do it for mankind!"
]
if args <> "":
weechat.command("/me gives %s %s." % (args, random.choice(objects)))
return weechat.PLUGIN_RC_OK
else:
weechat.prnt("You must specify target")
return weechat.PLUGIN_RC_KO
# hater
def hater(server, args):
objects = [
"so much, that he spits hellfire",
"so much, that he want's to shoot someone",
"SOOOO MUUUUCH!!!"
]
if args <> "":
weechat.command("/me hates %s %s." % (args, random.choice(objects)))
return weechat.PLUGIN_RC_OK
else:
weechat.prnt("You must specify target")
return weechat.PLUGIN_RC_KO
# lover
def lover(server, args):
actions = [
"a *mwah*",
"a wet kiss",
"a tight and long hug",
"an ass-squeeze",
"a tight hug",
"a wet kiss",
"a nice, tight hug",
"a kiss on the cheek",
"a wet, french kiss",
"a kiss",
"a hug",
"sex",
"sweet romance",
"some groping",
"bed actions",
"oral sex",
"a porn-tape",
"anal love",
]
if args <> "":
weechat.command("/me cheers %s with %s.." % (args, random.choice(actions)))
return weechat.PLUGIN_RC_OK
else:
weechat.prnt("You must specify target")
return weechat.PLUGIN_RC_KO
# dancer
def dancer(server, args):
objects = [
"used condoms",
"condoms",
"used tampons",
"tampons",
"roses",
"rosebuds",
"rice",
"uncooked rice",
"bananas",
"little pieces of paper with the text *YAY!* on",
"little pieces of paper with the text *w00t!* on",
"little pieces of paper with the text *WOOHOO!* on",
"little pieces of paper with the text *Kiss my cheek!* on",
"coconuts with faces on",
"little pieces of paper with the text *LOVE ROCKS!* on",
"little pieces of paper with the text *LETS HAVE SEX!* on",
"little pieces of paper with the text *GOD BLESS AMERICA!* on",
"balloons with faces on",
"balloons",
"chocolate cakes",
"english teachers",
"pr0n magazines",
"vietnamese kids",
"snowballs",
"rocks",
"Michael Jackson (naked)",
"unlocked Grenades *BOOM*",
"Nine Inch Nails",
"Bodyparts (bloody, wet & sexy)",
]
if args <> "":
weechat.command("/me dances around %s throwing %s.." % (args, random.choice(objects)))
return weechat.PLUGIN_RC_OK
else:
weechat.prnt("You must specify target")
return weechat.PLUGIN_RC_KO
# BOFH excuser
def excuser(server, args):
excuses = [
"clock speed",
"solar flares",
"electromagnetic radiation from satellite debris",
"static from nylon underwear",
"static from plastic slide rules",
"global warming",
"poor power conditioning",
"static buildup",
"doppler effect",
"hardware stress fractures",
"magnetic interference from money/credit cards",
"dry joints on cable plug",
"we're waiting for [the phone company] to fix that line",
"sounds like a Windows problem, try calling Microsoft support",
"temporary routing anomaly",
"somebody was calculating pi on the server",
"fat electrons in the lines",
"excess surge protection",
"floating point processor overflow",
"divide-by-zero error",
"POSIX compliance problem",
"monitor resolution too high",
"improperly oriented keyboard",
"network packets travelling uphill (use a carrier pigeon)",
"Decreasing electron flux",
"first Saturday after first full moon in Winter",
"radiosity depletion",
"CPU radiator broken",
"It works the way the Wang did, what's the problem",
"positron router malfunction",
"cellular telephone interference",
"techtonic stress",
"piezo-electric interference",
"(l)user error",
"working as designed",
"dynamic software linking table corrupted",
"heavy gravity fluctuation, move computer to floor rapidly",
"secretary plugged hairdryer into UPS",
"terrorist activities",
"not enough memory, go get system upgrade",
"interrupt configuration error",
"spaghetti cable cause packet failure",
"boss forgot system password",
"bank holiday - system operating credits not recharged",
"virus attack, luser responsible",
"waste water tank overflowed onto computer",
"Complete Transient Lockout",
"bad ether in the cables",
"Bogon emissions",
"Change in Earth's rotational speed",
"Cosmic ray particles crashed through the hard disk platter",
"Smell from unhygienic janitorial staff wrecked the tape heads",
"Little hamster in running wheel had coronary; waiting for replacement to be Fedexed from Wyoming",
"Evil dogs hypnotised the night shift",
"Plumber mistook routing panel for decorative wall fixture",
"Electricians made popcorn in the power supply",
"Groundskeepers stole the root password",
"high pressure system failure",
"failed trials, system needs redesigned",
"system has been recalled",
"not approved by the FCC",
"need to wrap system in aluminum foil to fix problem",
"not properly grounded, please bury computer",
"CPU needs recalibration",
"system needs to be rebooted",
"bit bucket overflow",
"descramble code needed from software company",
"only available on a need to know basis",
"knot in cables caused data stream to become twisted and kinked",
"nesting roaches shorted out the ether cable",
"The file system is full of it",
"Satan did it",
"Daemons did it",
"You're out of memory",
"There isn't any problem",
"Unoptimized hard drive",
"Typo in the code",
"Yes, yes, its called a design limitation",
"Look, buddy: Windows 3.1 IS A General Protection Fault.",
"That's a great computer you have there; have you considered how it would work as a BSD machine?",
"Please excuse me, I have to circuit an AC line through my head to get this database working.",
"Yeah, yo mama dresses you funny and you need a mouse to delete files.",
"Support staff hung over, send aspirin and come back LATER.",
"Someone is standing on the ethernet cable, causing a kink in the cable",
"Windows 95 undocumented \"feature\"",
"Runt packets",
"Password is too complex to decrypt",
"Boss' kid fucked up the machine",
"Electromagnetic energy loss",
"Budget cuts",
"Mouse chewed through power cable",
"Stale file handle (next time use Tupperware(tm)!)",
"Feature not yet implemented",
"Internet outage",
"Pentium FDIV bug",
"Vendor no longer supports the product",
"Small animal kamikaze attack on power supplies",
"The vendor put the bug there.",
"SIMM crosstalk.",
"IRQ dropout",
"Collapsed Backbone",
"Power company testing new voltage spike (creation) equipment",
"operators on strike due to broken coffee machine",
"backup tape overwritten with copy of system manager's favourite CD",
"UPS interrupted the server's power",
"The electrician didn't know what the yellow cable was so he yanked the ethernet out.",
"The keyboard isn't plugged in",
"The air conditioning water supply pipe ruptured over the machine room",
"The electricity substation in the car park blew up.",
"The rolling stones concert down the road caused a brown out",
"The salesman drove over the CPU board.",
"The monitor is plugged into the serial port",
"Root nameservers are out of sync",
"electro-magnetic pulses from French above ground nuke testing.",
"your keyboard's space bar is generating spurious keycodes.",
"the real ttys became pseudo ttys and vice-versa.",
"the printer thinks its a router.",
"the router thinks its a printer.",
"evil hackers from Serbia.",
"we just switched to FDDI.",
"halon system went off and killed the operators.",
"because Bill Gates is a Jehovah's witness and so nothing can work on St. Swithin's day.",
"user to computer ratio too high.",
"user to computer ration too low.",
"we just switched to Sprint.",
"it has Intel Inside",
"Sticky bits on disk.",
"Power Company having EMP problems with their reactor",
"The ring needs another token",
"new management",
"telnet: Unable to connect to remote host: Connection refused",
"SCSI Chain overterminated",
"It's not plugged in.",
"because of network lag due to too many people playing deathmatch",
"You put the disk in upside down.",
"Daemons loose in system.",
"User was distributing pornography on server; system seized by FBI.",
"BNC (brain not connected)",
"UBNC (user brain not connected)",
"LBNC (luser brain not connected)",
"disks spinning backwards - toggle the hemisphere jumper.",
"new guy cross-connected phone lines with ac power bus.",
"had to use hammer to free stuck disk drive heads.",
"Too few computrons available.",
"Flat tire on station wagon with tapes. (\"Never underestimate the bandwidth of a station wagon full of tapes hurling down the highway\" Andrew S. Tannenbaum) ",
"Communications satellite used by the military for star wars.",
"Party-bug in the Aloha protocol.",
"Insert coin for new game",
"Dew on the telephone lines.",
"Arcserve crashed the server again.",
"Some one needed the powerstrip, so they pulled the switch plug.",
"My pony-tail hit the on/off switch on the power strip.",
"Big to little endian conversion error",
"You can tune a file system, but you can't tune a fish (from most tunefs man pages)",
"Dumb terminal",
"Zombie processes haunting the computer",
"Incorrect time synchronization",
"Defunct processes",
"Stubborn processes",
"non-redundant fan failure ",
"monitor VLF leakage",
"bugs in the RAID",
"no \"any\" key on keyboard",
"root rot",
"Backbone Scoliosis",
"/pub/lunch",
"excessive collisions & not enough packet ambulances",
"le0: no carrier: transceiver cable problem?",
"broadcast packets on wrong frequency",
"popper unable to process jumbo kernel",
"NOTICE: alloc: /dev/null: filesystem full",
"pseudo-user on a pseudo-terminal",
"Recursive traversal of loopback mount points",
"Backbone adjustment",
"OS swapped to disk",
"vapors from evaporating sticky-note adhesives",
"sticktion",
"short leg on process table",
"multicasts on broken packets",
"ether leak",
"Atilla the Hub",
"endothermal recalibration",
"filesystem not big enough for Jumbo Kernel Patch",
"loop found in loop in redundant loopback",
"system consumed all the paper for paging",
"permission denied",
"Reformatting Page. Wait...",
"..disk or the processor is on fire.",
"SCSI's too wide.",
"Proprietary Information.",
"Just type 'mv * /dev/null'.",
"runaway cat on system.",
"Did you pay the new Support Fee?",
"We only support a 1200 bps connection.",
"We only support a 28000 bps connection.",
"Me no internet, only janitor, me just wax floors.",
"I'm sorry a pentium won't do, you need an SGI to connect with us.",
"Post-it Note Sludge leaked into the monitor.",
"the curls in your keyboard cord are losing electricity.",
"The monitor needs another box of pixels.",
"RPC_PMAP_FAILURE",
"kernel panic: write-only-memory (/dev/wom0) capacity exceeded.",
"Write-only-memory subsystem too slow for this machine. Contact your local dealer.",
"Just pick up the phone and give modem connect sounds. \"Well you said we should get more lines so we don't have voice lines.\"",
"Quantum dynamics are affecting the transistors",
"Police are examining all internet packets in the search for a narco-net-trafficker",
"We are currently trying a new concept of using a live mouse. Unfortunately, one has yet to survive being hooked up to the computer.....please bear with us.",
"Your mail is being routed through Germany ... and they're censoring us.",
"Only people with names beginning with 'A' are getting mail this week (a la Microsoft)",
"We didn't pay the Internet bill and it's been cut off.",
"Lightning strikes.",
"Of course it doesn't work. We've performed a software upgrade.",
"Change your language to Finnish.",
"Fluorescent lights are generating negative ions. If turning them off doesn't work, take them out and put tin foil on the ends.",
"High nuclear activity in your area.",
"What office are you in? Oh, that one. Did you know that your building was built over the universities first nuclear research site? And wow, aren't you the lucky one, your office is right over where the core is buried!",
"The MGs ran out of gas.",
"The UPS doesn't have a battery backup.",
"Recursivity. Call back if it happens again.",
"Someone thought The Big Red Button was a light switch.",
"The mainframe needs to rest. It's getting old, you know.",
"I'm not sure. Try calling the Internet's head office -- it's in the book.",
"The lines are all busy (busied out, that is -- why let them in to begin with?).",
"Jan 9 16:41:27 huber su: 'su root' succeeded for .... on /dev/pts/1",
"It's those computer people in X {city of world}. They keep stuffing things up.",
"A star wars satellite accidently blew up the WAN.",
"Fatal error right in front of screen",
"That function is not currently supported, but Bill Gates assures us it will be featured in the next upgrade.",
"wrong polarity of neutron flow",
"Lusers learning curve appears to be fractal",
"We had to turn off that service to comply with the CDA Bill.",
"Ionization from the air-conditioning",
"TCP/IP UDP alarm threshold is set too low.",
"Someone is broadcasting pygmy packets and the router doesn't know how to deal with them.",
"The new frame relay network hasn't bedded down the software loop transmitter yet. ",
"Fanout dropping voltage too much, try cutting some of those little traces",
"Plate voltage too low on demodulator tube",
"You did wha... oh _dear_....",
"CPU needs bearings repacked",
"Too many little pins on CPU confusing it, bend back and forth until 10-20% are neatly removed. Do _not_ leave metal bits visible!",
"_Rosin_ core solder? But...",
"Software uses US measurements, but the OS is in metric...",
"The computer fleetly, mouse and all.",
"Your cat tried to eat the mouse.",
"The Borg tried to assimilate your system. Resistance is futile.",
"It must have been the lightning storm we had (yesterday) (last week) (last month)",
"Due to Federal Budget problems we have been forced to cut back on the number of users able to access the system at one time. (namely none allowed....)",
"Too much radiation coming from the soil.",
"Unfortunately we have run out of bits/bytes/whatever. Don't worry, the next supply will be coming next week.",
"Program load too heavy for processor to lift.",
"Processes running slowly due to weak power supply",
"Our ISP is having {switching,routing,SMDS,frame relay} problems",
"We've run out of licenses",
"Interference from lunar radiation",
"Standing room only on the bus.",
"You need to install an RTFM interface.",
"That would be because the software doesn't work.",
"That's easy to fix, but I can't be bothered.",
"Someone's tie is caught in the printer, and if anything else gets printed, he'll be in it too.",
"We're upgrading /dev/null",
"The Usenet news is out of date",
"Our POP server was kidnapped by a weasel.",
"It's stuck in the Web.",
"Your modem doesn't speak English.",
"The mouse escaped.",
"All of the packets are empty.",
"The UPS is on strike.",
"Neutrino overload on the nameserver",
"Melting hard drives",
"Someone has messed up the kernel pointers",
"The kernel license has expired",
"Netscape has crashed",
"The cord jumped over and hit the power switch.",
"It was OK before you touched it.",
"Bit rot",
"U.S. Postal Service",
"Your Flux Capacitor has gone bad.",
"The Dilithium Crystals need to be rotated.",
"The static electricity routing is acting up...",
"Traceroute says that there is a routing problem in the backbone. It's not our problem.",
"The co-locator cannot verify the frame-relay gateway to the ISDN server.",
"High altitude condensation from U.S.A.F prototype aircraft has contaminated the primary subnet mask. Turn off your computer for 9 days to avoid damaging it.",
"Lawn mower blade in your fan need sharpening",
"Electrons on a bender",
"Telecommunications is upgrading. ",
"Telecommunications is downgrading.",
"Telecommunications is downshifting.",
"Hard drive sleeping. Let it wake up on it's own...",
"Interference between the keyboard and the chair.",
"The CPU has shifted, and become decentralized.",
"Due to the CDA, we no longer have a root account.",
"We ran out of dial tone and we're and waiting for the phone company to deliver another bottle.",
"You must've hit the wrong any key.",
"PCMCIA slave driver",
"The Token fell out of the ring. Call us when you find it.",
"The hardware bus needs a new token.",
"Too many interrupts",
"Not enough interrupts",
"The data on your hard drive is out of balance.",
"Digital Manipulator exceeding velocity parameters",
"appears to be a Slow/Narrow SCSI-0 Interface problem",
"microelectronic Riemannian curved-space fault in write-only file system",
"fractal radiation jamming the backbone",
"routing problems on the neural net",
"IRQ-problems with the Un-Interruptible-Power-Supply",
"CPU-angle has to be adjusted because of vibrations coming from the nearby road",
"emissions from GSM-phones",
"CD-ROM server needs recalibration",
"firewall needs cooling",
"asynchronous inode failure",
"transient bus protocol violation",
"incompatible bit-registration operators",
"your process is not ISO 9000 compliant",
"You need to upgrade your VESA local bus to a MasterCard local bus.",
"The recent proliferation of Nuclear Testing",
"Elves on strike. (Why do they call EMAG Elf Magic)",
"Internet exceeded Luser level, please wait until a luser logs off before attempting to log back on.",
"Your EMAIL is now being delivered by the USPS.",
"Your computer hasn't been returning all the bits it gets from the Internet.",
"You've been infected by the Telescoping Hubble virus.",
"Scheduled global CPU outage",
"Your Pentium has a heating problem - try cooling it with ice cold water.(Do not turn off your computer, you do not want to cool down the Pentium Chip while he isn't working, do you?)",
"Your processor has processed too many instructions. Turn it off immediately, do not type any commands!!",
"Your packets were eaten by the terminator",
"Your processor does not develop enough heat.",
"We need a licensed electrician to replace the light bulbs in the computer room.",
"The POP server is out of Coke",
"Fiber optics caused gas main leak",
"Server depressed, needs Prozac",
"quantum decoherence",
"those damn raccoons!",
"suboptimal routing experience",
"A plumber is needed, the network drain is clogged",
"50% of the manual is in .pdf readme files",
"the AA battery in the wallclock sends magnetic interference",
"the xy axis in the trackball is coordinated with the summer solstice",
"the butane lighter causes the pincushioning",
"old inkjet cartridges emanate barium-based fumes",
"manager in the cable duct",
"We'll fix that in the next (upgrade, update, patch release, service pack).",
"HTTPD Error 666 : BOFH was here",
"HTTPD Error 4004 : very old Intel cpu - insufficient processing power",
"The ATM board has run out of 10 pound notes. We are having a whip round to refill it, care to contribute ?",
"Network failure - call NBC",
"Having to manually track the satellite.",
"Your/our computer(s) had suffered a memory leak, and we are waiting for them to be topped up.",
"The rubber band broke",
"We're on Token Ring, and it looks like the token got loose.",
"Stray Alpha Particles from memory packaging caused Hard Memory Error on Server.",
"paradigm shift...without a clutch",
"PEBKAC (Problem Exists Between Keyboard And Chair)",
"The cables are not the same length.",
"Second-system effect.",
"Chewing gum on /dev/sd3c",
"Boredom in the Kernel.",
"the daemons! the daemons! the terrible daemons!",
"I'd love to help you -- it's just that the Boss won't let me near the computer. ",
"struck by the Good Times virus",
"YOU HAVE AN I/O ERROR -> Incompetent Operator error",
"Your parity check is overdrawn and you're out of cache.",
"Communist revolutionaries taking over the server room and demanding all the computers in the building or they shoot the sysadmin. Poor misguided fools.",
"Plasma conduit breach",
"Out of cards on drive D:",
"Sand fleas eating the Internet cables",
"parallel processors running perpendicular today",
"ATM cell has no roaming feature turned on, notebooks can't connect",
"Webmasters kidnapped by evil cult.",
"Failure to adjust for daylight savings time.",
"Virus transmitted from computer to sysadmins.",
"Virus due to computers having unsafe sex.",
"Incorrectly configured static routes on the corerouters.",
"Forced to support NT servers; sysadmins quit.",
"Suspicious pointer corrupted virtual machine",
"It's the InterNIC's fault.",
"Root name servers corrupted.",
"Budget cuts forced us to sell all the power cords for the servers.",
"Someone hooked the twisted pair wires into the answering machine.",
"Operators killed by year 2000 bug bite.",
"We've picked COBOL as the language of choice.",
"Operators killed when huge stack of backup tapes fell over.",
"Robotic tape changer mistook operator's tie for a backup tape.",
"Someone was smoking in the computer room and set off the halon systems.",
"Your processor has taken a ride to Heaven's Gate on the UFO behind Hale-Bopp's comet.",
"it's an ID-10-T error",
"Dyslexics retyping hosts file on servers",
"The Internet is being scanned for viruses.",
"Your computer's union contract is set to expire at midnight.",
"Bad user karma.",
"/dev/clue was linked to /dev/null",
"Increased sunspot activity.",
"We already sent around a notice about that.",
"It's union rules. There's nothing we can do about it. Sorry.",
"Interference from the Van Allen Belt.",
"Jupiter is aligned with Mars.",
"Redundant ACLs. ",
"Mail server hit by UniSpammer.",
"T-1's congested due to porn traffic to the news server.",
"Data for intranet got routed through the extranet and landed on the internet.",
"We are a 100% Microsoft Shop.",
"We are Microsoft. What you are experiencing is not a problem; it is an undocumented feature.",
"Sales staff sold a product we don't offer.",
"Secretary sent chain letter to all 5000 employees.",
"Sysadmin didn't hear pager go off due to loud music from bar-room speakers.",
"Sysadmin accidentally destroyed pager with a large hammer.",
"Sysadmins unavailable because they are in a meeting talking about why they are unavailable so much.",
"Bad cafeteria food landed all the sysadmins in the hospital.",
"Route flapping at the NAP.",
"Computers under water due to SYN flooding.",
"The vulcan-death-grip ping has been applied.",
"Electrical conduits in machine room are melting.",
"Traffic jam on the Information Superhighway.",
"Radial Telemetry Infiltration",
"Cow-tippers tipped a cow onto the server.",
"tachyon emissions overloading the system",
"Maintenance window broken",
"We're out of slots on the server",
"Computer room being moved. Our systems are down for the weekend.",
"Sysadmins busy fighting SPAM.",
"Repeated reboots of the system failed to solve problem",
"Feature was not beta tested",
"Domain controller not responding",
"Someone else stole your IP address, call the Internet detectives!",
"It's not RFC-822 compliant.",
"operation failed because: there is no message for this error (#1014)",
"stop bit received",
"internet is needed to catch the etherbunny",
"network down, IP packets delivered via UPS",
"Firmware update in the coffee machine",
"Temporal anomaly",
"Mouse has out-of-cheese-error",
"Borg implants are failing",
"Borg nanites have infested the server",
"error: one bad user found in front of screen",
"Please state the nature of the technical emergency",
"Internet shut down due to maintenance",
"Daemon escaped from pentagram",
"crop circles in the corn shell",
"sticky bit has come loose",
"Hot Java has gone cold",
"Cache miss - please take better aim next time",
"Hash table has woodworm",
"Trojan horse ran out of hay",
"Zombie processes detected, machine is haunted.",
"overflow error in /dev/null",
"Browser's cookie is corrupted -- someone's been nibbling on it.",
"Mailer-daemon is busy burning your message in hell.",
"According to Microsoft, it's by design",
"vi needs to be upgraded to vii",
"greenpeace free'd the mallocs",
"Terrorists crashed an airplane into the server room, have to remove /bin/laden. (rm -rf /bin/laden)",
"astropneumatic oscillations in the water-cooling",
"Somebody ran the operating system through a spelling checker.",
"Rhythmic variations in the voltage reaching the power supply.",
"Keyboard Actuator Failure. Order and Replace.",
"Packet held up at customs.",
"Propagation delay.",
"High line impedance.",
"Someone set us up the bomb.",
"Power surges on the Underground."
]
weechat.command(random.choice(excuses))
return weechat.PLUGIN_RC_OK
# fortune cookies
def fortune(server, args):
objects = [
fortunes = [
"There are three kinds of people: men, women, and unix.",
"BOFH Excuse #118: the router thinks its a printer.",
"CHUBBY CHECKER just had a CHICKEN SANDWICH in downtown DULUTH!",
@@ -242,12 +826,12 @@ def fortune(server, args):
"Tact, n.: The unsaid part of what you're thinking.",
"Shit Happens."
]
weechat.command(("Wanda the Fish says: %s") % random.choice(objects))
weechat.command(("Wanda the Fish says: %s") % random.choice(fortunes))
return weechat.PLUGIN_RC_OK
# winjoke
def winjoke(server, args):
objects = [
winjokes = [
"Windows NT, from the people who invented EDLIN!",
"Windows: Microsoft's tax on computer illiterates.",
"The nice thing about Windows is - It does not just crash, it displays a dialog box and lets you press 'OK' first.",
@@ -291,12 +875,12 @@ def winjoke(server, args):
"Microsoft Zen - Become one with the blue screen.",
"The next hot technology from Microsoft will be object-oriented assembly."
]
weechat.command(("Wanda the Fish says: %s") % random.choice(objects))
weechat.command(("Wanda the Fish says: %s") % random.choice(winjokes))
return weechat.PLUGIN_RC_OK
# linjoke
def linjoke(server, args):
objects = [
linjokes = [
"Got Linux?",
"Microsoft gives you Windows... Linux gives you the whole house.",
"Linux, DOS, Windows NT -- The Good, the Bad, and the Ugly",
@@ -322,108 +906,5 @@ def linjoke(server, args):
"Oh My God! They Killed init! You Bastards!",
"Unix: Where /sbin/init is still Job 1."
]
weechat.command(("Wanda the Fish says: %s") % random.choice(objects))
weechat.command(("Wanda the Fish says: %s") % random.choice(linjokes))
return weechat.PLUGIN_RC_OK
# giver
def giver(server, args):
objects = [
"a binary four",
"a nice cup of SHUT THE FUCK UP",
"an asskick",
"a sign: 'Please kill yourself'",
"a sign: 'Please go home now'",
"an unlocked Grenade *tick tick BOOM*",
"a gun - do it for mankind!"
]
if args <> "":
weechat.command("/me gives %s %s." % (args, random.choice(objects)))
return weechat.PLUGIN_RC_OK
else:
weechat.prnt("You must specify target")
return weechat.PLUGIN_RC_KO
# hater
def hater(server, args):
objects = [
"so much, that he spits hellfire",
"so much, that he want's to shoot someone",
"SOOOO MUUUUCH!!!"
]
if args <> "":
weechat.command("/me hates %s %s." % (args, random.choice(objects)))
return weechat.PLUGIN_RC_OK
else:
weechat.prnt("You must specify target")
return weechat.PLUGIN_RC_KO
# lover
def lover(server, args):
actions = [
"a *mwah*",
"a wet kiss",
"a tight and long hug",
"an ass-squeeze",
"a tight hug",
"a wet kiss",
"a nice, tight hug",
"a kiss on the cheek",
"a wet, french kiss",
"a kiss",
"a hug",
"sex",
"sweet romance",
"some groping",
"bed actions",
"oral sex",
"a porn-tape",
"anal love",
]
if args <> "":
weechat.command("/me cheers %s with %s.." % (args, random.choice(actions)))
return weechat.PLUGIN_RC_OK
else:
weechat.prnt("You must specify target")
return weechat.PLUGIN_RC_KO
# dancer
def dancer(server, args):
objects = [
"used condoms",
"condoms",
"used tampons",
"tampons",
"roses",
"rosebuds",
"rice",
"uncooked rice",
"bananas",
"little pieces of paper with the text *YAY!* on",
"little pieces of paper with the text *w00t!* on",
"little pieces of paper with the text *WOOHOO!* on",
"little pieces of paper with the text *Kiss my cheek!* on",
"coconuts with faces on",
"little pieces of paper with the text *LOVE ROCKS!* on",
"little pieces of paper with the text *LETS HAVE SEX!* on",
"little pieces of paper with the text *GOD BLESS AMERICA!* on",
"balloons with faces on",
"balloons",
"chocolate cakes",
"english teachers",
"pr0n magazines",
"vietnamese kids",
"snowballs",
"rocks",
"Michael Jackson (naked)",
"unlocked Grenades *BOOM*",
"Nine Inch Nails",
"Bodyparts (bloody, wet & sexy)",
]
if args <> "":
weechat.command("/me dances around %s throwing %s.." % (args, random.choice(objects)))
return weechat.PLUGIN_RC_OK
else:
weechat.prnt("You must specify target")
return weechat.PLUGIN_RC_KO
+27 -8
View File
@@ -15,9 +15,10 @@
Hope you enjoy it :-)
-- Henning aka asmanian
-- Leonid Evdokimov (weechat at darkk dot net one more dot ru)
"""
version = "0.8"
version = "0.10"
history = """
0.1 initial
0.2
@@ -35,6 +36,10 @@ history = """
- added multi-server support
0.8
- fixed on_msg (occasionally caused a minor fault)
0.9
- added dump_to_servchan and dump_to_current setting
0.10
- added SILENT (asmanian)
"""
short_syntax = """[REQUEST ANSWER]"""
@@ -43,7 +48,8 @@ syntax = """ Examples:
/set_ctcp
show settings for common CTCP-Requests.
where "OFF" means "use weechat default behaviour.
where "OFF" means "use weechat default behaviour,
"SILENT" means: "dont answer at all".
/set_ctcp VERSION I prefer using weechat $version
Reply with a fancy message.
@@ -65,13 +71,20 @@ syntax = """ Examples:
import weechat as wc
import re
wc.register("ctcp", version, "", "Customize CTCP replies")
wc.add_command_handler("set_ctcp", "set", "", short_syntax, syntax)
wc.add_message_handler("privmsg", "on_msg")
if wc.register("ctcp", version, "", "Customize CTCP replies"):
wc.add_command_handler("set_ctcp", "set", "", short_syntax, syntax)
wc.add_message_handler("privmsg", "on_msg")
if not wc.get_plugin_config("requests"):
wc.set_plugin_config("requests", " ".join(["VERSION", "USERINFO", "FINGER", "TIME", "PING"]))
if not wc.get_plugin_config("requests"):
wc.set_plugin_config("requests", " ".join(["VERSION", "USERINFO", "FINGER", "TIME", "PING"]))
for key, default in {'dump_to_servchan': 'OFF', 'dump_to_current': 'ON'}.iteritems():
value = wc.get_plugin_config(key)
if not value in ['ON', 'OFF']:
if value:
wc.prnt("[ctcp]: invalid %s value, resetting to %s" % (key, default))
wc.set_plugin_config(key, default)
def get_answers():
# Strangely, get_plugin_config sometimes returns
# the integer 0
@@ -111,6 +124,9 @@ def on_msg(server, args):
if not ans or ans == "OFF":
raise ValueError
if ans == "SILENT":
return wc.PLUGIN_RC_OK_IGNORE_ALL
info = {
"version": wc.get_info("version"),
"nick": wc.get_info("nick"),
@@ -125,7 +141,10 @@ def on_msg(server, args):
l, r = match.span()
ans = ans[:l+1] + info.get(match.group(1), "$" + match.group(1)) + ans[r:]
wc.prnt("CTCP %s received from %s (on %s)" % (req, source, server))
if wc.get_plugin_config("dump_to_servchan") == 'ON':
wc.prnt("CTCP %s received from %s (on %s)" % (req, source, server), server)
if wc.get_plugin_config("dump_to_current") == 'ON':
wc.prnt("CTCP %s received from %s (on %s)" % (req, source, server))
wc.command("/quote NOTICE %s :\x01%s %s\x01" % (
source, req, ans), "", server)
return wc.PLUGIN_RC_OK_IGNORE_ALL
+56
View File
@@ -0,0 +1,56 @@
"""
:Author: Tim Schumacher <tim AT we-are-teh-b DOT org>
:What it does:
This script informs the active window of your last
submitted song at last.fm
:Usage:
/np - Displays your last submitted song.
:Configuration Variables:
============= ==========================================
Variable name Meaning
============= ==========================================
lastfmuser Your username at last.fm
Released under GPL licence.
"""
#!/usr/bin/python
todo = """
- Realy check if a song was recent.
- Define 'recent' through a userdefinedvar
- Add more help
"""
import urllib
import weechat as wc
wc.register("lastfmnp", "0.2.1", "", "now playing for last.fm")
def getLastSong(server, args):
"""
Provides your last submitted song in last.fm to the actual context
"""
user = wc.get_plugin_config("lastfmuser")
url = "http://ws.audioscrobbler.com/1.0/user/" + user + "/recenttracks.txt"
url_handle = urllib.urlopen(url)
lines = url_handle.readlines()
song = lines[0].split(",")[1].replace("\n","");
if song == '':
song = 'nothing :-)';
wc.command("np: " + song)
return 0
wc.add_command_handler("np", "getLastSong")
default = {
"lastfmuser": "timds235"
}
for k, v in default.items():
if not wc.get_plugin_config(k):
wc.set_plugin_config(k, v)
+36
View File
@@ -0,0 +1,36 @@
# mp3blaster nowplaying script by Stalwart <stlwrt@gmail.com>
# written for Caleb
# released under GNU GPL v2 or newer
import weechat
from os.path import expandvars, expanduser
def mp3blasternp(server, args):
try:
statusfile = open(expandvars(expanduser(weechat.get_plugin_config('statusfile'))), 'rU')
info = statusfile.readlines()
statusfile.close()
artist = title = path = ''
for line in info:
if (line.split()[0] == 'artist'):
artist = line.strip(' \n')[7:]
elif (line.split()[0] == 'title'):
title = line.strip(' \n')[6:]
elif (line.split()[0] == 'path'):
path = line.strip(' \n')[5:]
if (title):
if (artist):
weechat.command('/me np: '+artist+' - '+title)
else:
weechat.command('/me np: '+title)
else:
weechat.command('/me np: '+path)
except:
if (weechat.get_plugin_config('statusfile') == ''):
weechat.set_plugin_config('statusfile', '~/.mp3blasterstatus')
weechat.prnt('mp3blaster status file not found. Set proper using /setp python.mp3blaster.statusfile = /path/to/file')
return 0
weechat.register ('mp3blaster', '1.0', '', 'Posts track now played by mp3blaster')
weechat.add_command_handler ('np', 'mp3blasternp')
+66
View File
@@ -0,0 +1,66 @@
# Author: Skippy the Kangoo <Skippythekangoo AT yahoo DOT fr>
# This script manages basic controls of mpd (play/pause, next song, previous song, increase volume, decrease volume, display current song)
# Usage: /mpd toggle|next|prev|volume_up|volume_down|status
# Released under GNU GPL v2 or newer
import weechat
from os import popen
weechat.register ('mpd', '0.0.2', '', 'mpd control script')
weechat.add_command_handler('mpd', 'mpd', 'mpd control', 'toggle|next|prev|volume_up|volume_down|status', '', 'toggle|next|prev|volume_up|volume_down|status')
def toggle (server, args,):
popen('mpc toggle')
return weechat.PLUGIN_RC_OK
def next (server, args,):
popen('mpc next')
return weechat.PLUGIN_RC_OK
def prev (server, args,):
popen('mpc prev')
return weechat.PLUGIN_RC_OK
def volume_up (server, args,):
popen('mpc volume +10')
return weechat.PLUGIN_RC_OK
def volume_down (server, args,):
volume_down = popen('mpc volume -10')
return weechat.PLUGIN_RC_OK
def status (server, args,):
status = popen('mpc').readline().rstrip()
weechat.print_infobar(3, status)
return weechat.PLUGIN_RC_OK
def mpd(server, args):
largs = args.split(" ")
#strip spaces
while '' in largs:
largs.remove('')
while ' ' in largs:
largs.remove(' ')
if len(largs) == 0:
weechat.command("/help mpd")
return weechat.PLUGIN_RC_OK
else:
inchan = False
if largs[0] == 'toggle':
toggle(" ".join(largs[1:]), inchan)
elif largs[0] == 'next':
next(" ".join(largs[1:]), inchan)
elif largs[0] == 'prev':
prev(' '.join(largs[1:]), inchan)
elif largs[0] == 'volume_up':
volume_up(' '.join(largs[1:]), inchan)
elif largs[0] == 'volume_down':
volume_down(' '.join(largs[1:]), inchan)
elif largs[0] == 'status':
status(" ".join(largs[1:]), inchan)
return weechat.PLUGIN_RC_OK
+289
View File
@@ -0,0 +1,289 @@
"""
Response: Simple autoresponse script for WeeChat
Author: Christian Taylor <cht@chello.at>
License: GPL version 2 or later
"""
version = "0.1"
helptext = """ /response list
Displays a list of your current responses.
/response toggle <number>
Activates or deactivates response with the specified number.
/response delete <number>
Deletes response with the specified number.
/response add "<message-regexp>" "<command>"
Adds a response that executes <command> when it encounters a message matching
the specified regular expression in any channel.
<command> can be an actual command to be executed (for instance "/nick xyz")
or a simple text (for instance "xyz") which is then posted to the channel.
The following sequences are replaced in <command>:
\\nick => nickname of the user that triggered the response
\\mask => hostmask of the user that triggered the response
\\channel => name of the channel in which the response was triggered
\\<number> => matches of the message regular expression subgroups, \\0 for whole match
$<number> => whitespace-separated word number <number> of the whole triggering message
(starts with 0; negative numbers count from the last word)
/response add "<hostmask-regexp>" "<channel-regexp>" "<message-regexp>" "<command>"
Same as above, but only triggers if hostmask and channel match the given additional regexps.
Blank regexps ("") will trigger for any hostmask and/or channel.
Examples:
/response add "^!whoami" "/msg \\channel You are \\nick (\\mask) in \\channel!"
/response add "^!make (.*)" "/msg \\channel No rule for \\1. Stop."
/response add "somebody@somehost" "" "^!op" "/op \\nick"
"""
import weechat, sys, re, pickle
weechat.register("Response", version, "", "Execute commands on specific triggers")
weechat.add_message_handler("privmsg", "triggercheck")
weechat.add_command_handler("response", "triggercontrol", " Allows you to view, add and delete responses:", "<operation>", helptext, "add|delete|list|toggle")
debug = 0
t_enabled = 0
t_nick = 1
t_channel = 2
t_trigger = 3
t_reaction = 4
t_outstream = 5
def triggercheck(server, args):
null, context, message = args.split(":", 2)
mask, null, channel = context.strip().split(" ", 2)
nick, whois = mask.split("!", 1)
if debug: tell("Server: " + server + " | Mask: " + mask + " | Channel: " + channel + " | Message: " + message, server)
for trigger in triggerlist:
if trigger[t_enabled]:
if trigger[t_channel]:
channelmatch = re.compile(trigger[t_channel]).search(channel)
else:
channelmatch = True
if channelmatch and trigger[t_nick]:
nickmatch = re.compile(trigger[t_nick]).search(whois)
else:
nickmatch = True
if channelmatch and nickmatch and trigger[t_trigger]:
messagematch = re.compile(trigger[t_trigger]).search(message)
else:
messagematch = False
if channelmatch and nickmatch and messagematch:
reaction = trigger[t_reaction]
reaction = reaction.replace("\\nick", nick)
reaction = reaction.replace("\\{nick}", nick)
reaction = reaction.replace("\\mask", whois)
reaction = reaction.replace("\\{mask}", whois)
reaction = reaction.replace("\\channel", channel)
reaction = reaction.replace("\\{channel}", channel)
messagewords = message.split()
wordstring = re.compile("\\${?(-?\\d+)}?").search(reaction)
replacecount = 0
while wordstring and replacecount < 256:
replacecount += 1
try:
reaction = reaction.replace(wordstring.group(0), messagewords[int(wordstring.group(1))])
except IndexError:
reaction = reaction.replace(wordstring.group(0), "")
wordstring = re.compile("\\${?(-?\\d+)}?").search(reaction)
subgroupstring = re.compile("\\\\{?(\\d+)}?").search(reaction)
replacecount = 0
while subgroupstring and replacecount < 256:
replacecount += 1
try:
reaction = reaction.replace(subgroupstring.group(0), messagematch.group(int(subgroupstring.group(1))))
except (IndexError, TypeError):
reaction = reaction.replace(subgroupstring.group(0), "")
subgroupstring = re.compile("\\\\{?(\\d+)}?").search(reaction)
if trigger[t_outstream] == 1: weechat.command(reaction, channel, server)
if trigger[t_outstream] == 2: weechat.prnt(reaction, channel, server)
return weechat.PLUGIN_RC_OK
def tell(text, server):
return weechat.prnt(str(text), "[" + str(server) + "]", server)
def triggercontrol(server, args):
try:
if args.startswith("list"): return listdisplay(server, args)
if args.startswith("toggle"): return activetoggle(server, args)
if args.startswith("delete"): return deletetrigger(server, args)
if args.startswith("add"): return addtrigger(server, args)
if args.startswith("ostoggle"): return outstreamtoggle(server, args)
if args.startswith("debug"): return debugtoggle(server, args)
tell("Unknown operation. Supported operations are add / delete / list / toggle.", server)
except ValueError:
tell("Error: Incorrect syntax (malformed number).", server)
except:
(e_type, e_value, e_trace) = sys.exc_info()
tell("Error: %s: %s" % (str(e_type).replace("exceptions.", ""), e_value), server)
return weechat.PLUGIN_RC_OK
def savetriggers(varname):
savestring = pickle.dumps(triggerlist)
savestring = savestring.replace("\n", "\\$$$")
return weechat.set_plugin_config(varname, savestring)
def loadtriggers(varname):
try:
oldtriggers = weechat.get_plugin_config(varname)
if oldtriggers:
oldtriggers = oldtriggers.replace("\\$$$", "\n")
newtriggerlist = pickle.loads(oldtriggers)
return newtriggerlist
else:
return oldtriggers
except:
return False
def triggerstring(i, trigger):
if trigger:
cl = str(i+1) + " "
if i < 9: cl += " "
if trigger[t_enabled]:
cl += "[X] "
else:
cl += "[ ] "
if trigger[t_nick]:
cl += "\"" + str(trigger[t_nick]) + "\" in "
else:
cl += "(everyone) in "
if trigger[t_channel]:
cl += "\"" + str(trigger[t_channel]) + "\": "
else:
cl += "(all channels): "
cl += "\"" + str(trigger[t_trigger]) + "\" => "
cl += "\"" + str(trigger[t_reaction]) + "\""
#if trigger[t_outstream] == 1: cl += " <public output>"
if trigger[t_outstream] == 2: cl += " <private output>"
return cl
else:
return "No response number " + str(i+1)
def listdisplay(server, args):
if triggerlist:
tell(" --- Responses ---", server)
for i, trigger in enumerate(triggerlist):
tell(triggerstring(i, trigger), server)
else:
tell("No responses in the list.", server)
return weechat.PLUGIN_RC_OK
def activetoggle(server, args):
triggernum = int(args.replace("toggle ", ""))
if 1 <= triggernum < len(triggerlist) +1:
if triggerlist[triggernum-1][t_enabled]:
triggerlist[triggernum-1][t_enabled] = 0
tell("Deactivated response number " + str(triggernum), server)
else:
triggerlist[triggernum-1][t_enabled] = 1
tell("Activated response number " + str(triggernum), server)
savetriggers("responses")
else:
tell("There is no response number " + str(triggernum), server)
return weechat.PLUGIN_RC_OK
def outstreamtoggle(server, args):
triggernum = int(args.replace("ostoggle ", ""))
if 1 <= triggernum < len(triggerlist) +1:
if triggerlist[triggernum-1][t_outstream] == 1:
triggerlist[triggernum-1][t_outstream] = 2
tell("Set response number " + str(triggernum) + " to private output", server)
else:
triggerlist[triggernum-1][t_outstream] = 1
tell("Set response number " + str(triggernum) + " to public output", server)
savetriggers("responses")
else:
tell("There is no response number " + str(triggernum), server)
return weechat.PLUGIN_RC_OK
def deletetrigger(server, args):
triggernum = int(args.replace("delete ", ""))
if 1 <= triggernum < len(triggerlist) +1:
del triggerlist[triggernum-1]
tell("Deleted response number " + str(triggernum), server)
if triggerlist:
listdisplay(server, args)
savetriggers("responses")
else:
tell("There is no response number " + str(triggernum), server)
return weechat.PLUGIN_RC_OK
def addtrigger(server, args):
newtriggerargs = args.replace("add ", "")
if newtriggerargs.startswith('"') and newtriggerargs.endswith('"'):
newtriggerargs = newtriggerargs[1:-1]
newtrigger = newtriggerargs.split('" "')
elif newtriggerargs.startswith("'") and newtriggerargs.endswith("'"):
newtriggerargs = newtriggerargs[1:-1]
newtrigger = newtriggerargs.split("' '")
else:
tell ("Error: Incorrectly formatted input.", server)
return weechat.PLUGIN_RC_OK
if len(newtrigger) == 2:
triggerlist.append([1, "", "", 1])
triggerlist[-1][3:3] = newtrigger
tell(triggerstring(len(triggerlist)-1, triggerlist[-1]), server)
elif len(newtrigger) == 3:
triggerlist.append([1, "", 1])
triggerlist[-1][2:2] = newtrigger
tell(triggerstring(len(triggerlist)-1, triggerlist[-1]), server)
elif len(newtrigger) == 4:
triggerlist.append([1, 1])
triggerlist[-1][1:1] = newtrigger
tell(triggerstring(len(triggerlist)-1, triggerlist[-1]), server)
else:
tell("Error: Incorrectly formatted input.", server)
return weechat.PLUGIN_RC_OK
savetriggers("responses")
return weechat.PLUGIN_RC_OK
def debugtoggle(server, args):
global debug
if debug:
debug = 0
tell("Debugging output deactivated", server)
else:
debug = 1
tell("Debugging output activated", server)
return weechat.PLUGIN_RC_OK
triggerlist = []
newtriggerlist = loadtriggers("responses")
if newtriggerlist:
triggerlist = newtriggerlist
weechat.prnt("Response: Loaded " + str(len(triggerlist)) + " responses, " + str(len([1 for x in triggerlist if x[t_enabled]])) + " are active.")
else:
weechat.prnt("Response: No previously saved responses. Type '/help response' for usage information.")
-1
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
Theme manager for WeeChat.
It loads configuration parameters from file
-1
View File
@@ -1,4 +1,3 @@
#!/bin/env python
#
# TinyUrl, version 3.3, for weechat version 0.1.9
#
+103 -88
View File
@@ -1,5 +1,5 @@
#
# UrlGrab, version 1.0, for weechat version 0.1.6
# UrlGrab, version 1.1, for weechat version 0.2.4
#
# Listens to all channels for URLs, collects them in a list, and launches
# them in your favourite web server on the local host or a remote server.
@@ -59,9 +59,13 @@
# The file where the command output (if any) is saved. Overwritten
# each time you launch a new URL. Default is ~/.weechat/urllaunch.log
#
# default
# The command that will be run if no arguemnts to /url are given.
# Default is help
#
# Requirements:
#
# - Designed to run with weechat version 1.0.6 or better.
# - Designed to run with weechat version 0.2.4 or better.
# http://weechat.flashtux.org/
#
# Acknowlegements:
@@ -70,6 +74,13 @@
# irc.freenode.net/#weechat Honestly, I just cleaned up the code a bit and
# made the settings a little more useful (to me).
#
# - With changes by Leonid Evdokimov (weechat at darkk dot net another dot ru):
# http://darkk.net.ru/weechat/urlgrab.py
# v1.1: added better handling of dead zombie-childs
# added parsing of private messages
# added default command setting
# added parsing of scrollback buffers on load
#
# Copyright (C) 2005 Jim Ramsay <i.am@jimramsay.com>
#
# This program is free software; you can redistribute it and/or
@@ -88,16 +99,13 @@
# USA.
#
import sys
import os
import weechat
import subprocess
UC_NAME="UrlGrab"
UC_VERSION="1.0"
weechat.register (UC_NAME, UC_VERSION, "", "Url collector/launcher for weechat")
weechat.add_message_handler("privmsg", "urlGrabCheck")
weechat.add_command_handler("url", "urlGrabMain",
"Controls UrlGrab -> '/url help' for usage")
UC_VERSION="1.1"
def urlGrabPrint(message):
weechat.prnt("-[%s]- %s" % ( UC_NAME, message ) )
@@ -114,6 +122,8 @@ class WeechatSetting:
class UrlGrabSettings:
def __init__(self):
self.settings = {
'default':WeechatSetting('default', 'help',
"default command to /url to run if none given" ),
'historysize':WeechatSetting('historysize', '10',
"Number of URLs to keep per channel" ),
'method':WeechatSetting('method', 'local',
@@ -276,15 +286,22 @@ class UrlGrabber:
if not found:
urlGrabPrint(channel + "@" + server + ": no entries")
def urlGrabParsemsg(command):
infos = command.split(" ")
chan = infos[2]
message = " ".join(infos[3:])[1:]
return (chan, message)
def urlGrabParsemsg(server, command):
# :nick!ident@host PRIVMSG dest :foobarbaz
l = command.split(' ')
mask = l[0][1:]
dest = l[2]
message = ' '.join(l[3:])[1:]
###########################################
#nothing, info, message = command.split(":", 2)
#info = info.split(' ')
if dest == weechat.get_info('nick', server):
source = mask.split("!")[0]
else:
source = dest
return (source, message)
def urlGrabCheck(server, args):
global urlGrab
chan, message = urlGrabParsemsg(args)
def urlGrabCheckMsgline(server, chan, message):
# Ignore output from 'tinyurl.py'
if message.startswith( "[AKA] http://tinyurl.com" ):
return weechat.PLUGIN_RC_OK
@@ -294,17 +311,20 @@ def urlGrabCheck(server, args):
word[0:8] == "https://" or \
word[0:6] == "ftp://":
urlGrab.addUrl(word, chan, server)
# check for any dead children and clean them up
while True:
try:
mypid, status = os.waitpid(0, os.WNOHANG)
except:
break
else:
if mypid <= 0:
break
def urlGrabCheck(server, args):
global urlGrab
chan, message = urlGrabParsemsg(server, args)
urlGrabCheckMsgline(server, chan, message)
return weechat.PLUGIN_RC_OK
def urlGrabCheckOnload():
for buf in weechat.get_buffer_info().itervalues():
if len(buf['channel']):
lines = weechat.get_buffer_data(buf['server'], buf['channel'])
for line in reversed(lines):
urlGrabCheckMsgline(buf['server'], buf['channel'], line['data'])
def urlGrabOpen(index, channel = None):
global urlGrab, urlGrabSettings
@@ -336,30 +356,22 @@ def urlGrabOpen(index, channel = None):
except:
urlGrabPrint("Fork failed!")
if childpid == 0:
# in the child- Detach from tty and Exec the command
logfile = os.path.expanduser( urlGrabSettings.get( 'cmdlog' ) )
din = open("/dev/null", "r")
dout = open(logfile, "a")
try:
# Redirect IO for the child
os.dup2(din.fileno(), 0)
os.dup2(dout.fileno(), 1)
os.dup2(dout.fileno(), 2)
subprocess.Popen(
argl,
stdin = open('/dev/null', 'r'),
stdout = open(logfile, 'a'),
stderr = subprocess.STDOUT)
except:
dout.write( "UrlGrab: IO Redirection failed\n" )
dout.close()
din.close()
sys.exit(1)
try:
# Actually run the command
os.execvp( argl[0], argl )
except:
dout.write( "UrlGrab: Exec failed" )
dout.close()
din.close()
sys.exit(1)
urlGrabPrint(traceback.format_exc(None))
sys.exit(0)
else:
# In the parent - Don't wait now, wait later.
# In the parent - we may wait for stub to fork again and let the init kill grand-child
try:
os.waitpid(childpid, 0)
except:
pass
return
def urlGrabList( args ):
@@ -398,50 +410,53 @@ def urlGrabMain(server, args):
while ' ' in largs:
largs.remove(' ')
if len(largs) == 0:
largs = [urlGrabSettings.get('default')]
if largs[0] == 'help':
urlGrabHelp()
else:
if largs[0] == 'help':
urlGrabHelp()
elif largs[0] == 'list':
urlGrabList( largs[1:] )
elif largs[0] == 'set':
try:
if (len(largs) == 1):
urlGrabPrint( "Available settings:" )
urlGrabSettings.prntall()
elif (len(largs) == 2):
name = largs[1]
urlGrabPrint( "Get %s" % name )
urlGrabSettings.prnt( name )
elif (len(largs) > 2):
name = largs[1]
value = None
if( largs[2] != "="):
value = " ".join(largs[2:])
elif( largs > 3 and largs[2] == "=" ):
value = " ".join(largs[3:])
urlGrabPrint( "set %s = \'%s\'" % (name, value) )
if value is not None:
try:
urlGrabSettings.set( name, value )
urlGrabSettings.prnt( name, verbose=False )
except ValueError, msg:
weechat.prnt( " Failed: %s" % msg )
else:
weechat.prnt( " Failed: No value given" )
except KeyError:
weechat.prnt( " Failed: Unrecognized parameter '%s'" % name )
else:
try:
no = int(largs[0])
if len(largs) > 1:
urlGrabOpen(no, largs[1])
elif largs[0] == 'list':
urlGrabList( largs[1:] )
elif largs[0] == 'set':
try:
if (len(largs) == 1):
urlGrabPrint( "Available settings:" )
urlGrabSettings.prntall()
elif (len(largs) == 2):
name = largs[1]
urlGrabPrint( "Get %s" % name )
urlGrabSettings.prnt( name )
elif (len(largs) > 2):
name = largs[1]
value = None
if( largs[2] != "="):
value = " ".join(largs[2:])
elif( largs > 3 and largs[2] == "=" ):
value = " ".join(largs[3:])
urlGrabPrint( "set %s = \'%s\'" % (name, value) )
if value is not None:
try:
urlGrabSettings.set( name, value )
urlGrabSettings.prnt( name, verbose=False )
except ValueError, msg:
weechat.prnt( " Failed: %s" % msg )
else:
urlGrabOpen(no)
except ValueError:
urlGrabPrint( "Unknown command '%s'. Try '/url help' for usage" % largs[0])
weechat.prnt( " Failed: No value given" )
except KeyError:
weechat.prnt( " Failed: Unrecognized parameter '%s'" % name )
else:
try:
no = int(largs[0])
if len(largs) > 1:
urlGrabOpen(no, largs[1])
else:
urlGrabOpen(no)
except ValueError:
urlGrabPrint( "Unknown command '%s'. Try '/url help' for usage" % largs[0])
return weechat.PLUGIN_RC_OK
# Initialize global variables
urlGrabSettings = UrlGrabSettings()
urlGrab = UrlGrabber( urlGrabSettings.get('historysize') )
if weechat.register (UC_NAME, UC_VERSION, "", "Url collector/launcher for weechat"):
urlGrabSettings = UrlGrabSettings()
urlGrab = UrlGrabber( urlGrabSettings.get('historysize') )
urlGrabCheckOnload()
weechat.add_message_handler("privmsg", "urlGrabCheck")
weechat.add_command_handler("url", "urlGrabMain", "Controls UrlGrab -> '/url help' for usage")
+40
View File
@@ -0,0 +1,40 @@
#Author: Pablo Escobar <pablo__escobar AT tlen DOT pl>
#What it does: This script shows the currently played song in mpd
#Usage: /weempd - Displays the songname
#Released under GNU GPL v2 or newer
#/usr/bin/python
#coding: utf-8
import weechat
import re
import codecs
from os import popen
weechat.register ('weempd', '0.01', '', """mpd-weechat current song script (usage: /weempd)""")
weechat.add_command_handler ('weempd', 'show_it_to_them')
default = {
"msg_head": "is playing",
"msg_tail": "with mpd",
"spacer": "",
"colour_title": "C12",
"colour_spacer": "C08",
}
for k, v in default.items():
if not weechat.get_plugin_config(k):
weechat.set_plugin_config(k, v)
def show_it_to_them(server, args):
spacer = weechat.get_plugin_config("spacer")
msg_tail = weechat.get_plugin_config("msg_tail")
msg_head = weechat.get_plugin_config("msg_head")
colour_title = weechat.get_plugin_config("colour_title")
colour_spacer = weechat.get_plugin_config("colour_spacer")
tempinfo = popen('mpc').readline().rstrip()
all = '/me ' + msg_head + ' %' + colour_spacer + spacer + ' %' + colour_title + tempinfo + ' %' + colour_spacer + spacer + " %C00" + msg_tail
weechat.command(all)
return 0
+53
View File
@@ -0,0 +1,53 @@
#Author: Pablo Escobar <pablo__escobar AT tlen DOT pl>
#What it does: This script shows the currently played song in exaile
#Usage: /weexaile - Displays the songname
#Released under GNU GPL v2 or newer
#/usr/bin/python
#coding: utf-8
import weechat
import re
import codecs
from os import popen
weechat.register ('exaile', '0.01', '', """exaile-weechat current song script (usage: /weexaile)""")
weechat.add_command_handler ('weexaile', 'show_it_to_them')
default = {
"msg_head": "is playing",
"msg_tail": "with exaile",
"spacer": "",
"colour_artist": "C03",
"colour_title": "C02",
"colour_lenght": "C05",
"colour_spacer": "C08",
}
for k, v in default.items():
if not weechat.get_plugin_config(k):
weechat.set_plugin_config(k, v)
def show_it_to_them(server, args):
spacer = weechat.get_plugin_config("spacer")
msg_tail = weechat.get_plugin_config("msg_tail")
msg_head = weechat.get_plugin_config("msg_head")
colour_artist = weechat.get_plugin_config("colour_artist")
colour_title = weechat.get_plugin_config("colour_title")
colour_lenght = weechat.get_plugin_config("colour_lenght")
colour_spacer = weechat.get_plugin_config("colour_spacer")
exaile_running = popen ('exaile --get-title')
exaile_running_text = exaile_running.readline().rstrip()
if exaile_running_text != "No running Exaile instance found.":
song_name = popen ('exaile --get-title')
song_name_text = song_name.readline().rstrip()
song_artist = popen ('exaile --get-artist')
song_artist_text = song_artist.readline().rstrip()
song_length = popen ('exaile --get-length')
song_length_text = song_length.readline().rstrip()
song_current = popen ('exaile --current-position')
song_current_text = str(round(float(song_current.readline().rstrip()),2))
all = '/me ' + msg_head + ' %' + colour_title + song_name_text + ' %' + colour_spacer + spacer + ' %' + colour_artist + song_artist_text + ' %' + colour_spacer + spacer + ' %' + colour_lenght + song_length_text + " (" + song_current_text + "%)" + " %C00" + msg_tail
weechat.command(all)
return 0
+127
View File
@@ -0,0 +1,127 @@
# Copyright (c) 2007 by Javier Valencia <jvalencia@log01.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
def weechat_init
Weechat.register("browse", "0.1", "", "Fast url browsing for Weechat.")
Weechat.add_command_handler(
"browse",
"do_browse",
"Use your preferred browser to navigate an url.",
"[number of url] (-1 to browse all) (leave empty to browse first one)")
Weechat.add_command_handler(
"webbrowser",
"set_browser",
"Get/Set browser command",
"[command] (leavy empty to get current command)")
Weechat.add_command_handler(
"urls",
"get_url_list",
"Get a list of urls in a channel.")
Weechat.print("")
Weechat.print("See help for 'browse', 'webbrowser' and 'urls' commands.")
if Weechat.get_plugin_config("webbrowser").empty?
Weechat.print("")
Weechat.print("WARNING: you must define a web browser with the command /webbrowser.")
end
return Weechat::PLUGIN_RC_OK
end
def set_browser(server, args)
if args.empty?
Weechat.print("current web browser -> #{Weechat.get_plugin_config('webbrowser')}")
else
Weechat.set_plugin_config("webbrowser", args)
Weechat.print("web browser set to -> #{args}")
end
return Weechat::PLUGIN_RC_OK
end
def get_url_array(buffer_data)
urls = Array.new
buffer_data.each do |line|
line["data"].split.each do |word|
if word =~ /^http\:\/\/.*/
urls << word
end
end
end
return urls.uniq.reverse
end
def get_url_list(server,args)
channel = Weechat.get_info("channel")
if channel.empty?
Weechat.print("You must be inside a channel.")
return Weechat::PLUGIN_RC_KO
end
buffer = Weechat.get_buffer_data(server, channel)
unless buffer
Weechat.print("Error retrieving window buffer, may be a bug?.")
return Weechat::PLUGIN_RC_KO
end
Weechat.print("")
Weechat.print("URL listing:")
pos = 0
get_url_array(buffer).each do |url|
Weechat.print("#{pos}) #{url}")
pos += 1
end
return Weechat::PLUGIN_RC_OK
end
def do_browse(server, args)
num = args.to_i
channel = Weechat.get_info("channel")
if channel.empty?
Weechat.print("You must be inside a channel.")
return Weechat::PLUGIN_RC_KO
end
buffer = Weechat.get_buffer_data(server, channel)
unless buffer
Weechat.print("Error retrieving window buffer, may be a bug?.")
return Weechat::PLUGIN_RC_KO
end
browser = Weechat.get_plugin_config("webbrowser")
if browser.empty?
Weechat.print("")
Weechat.print("WARNING: you must define a web browser with the command /webbrowser.")
return Weechat::PLUGIN_RC_KO
end
urls = get_url_array(buffer)
if urls.empty?
Weechat.print("No urls in current channel.")
else
if num == -1
Weechat.print("Starting browser...")
fork do # only for unix/posix
exec("#{browser} #{urls.join(' ')} &> /dev/null")
end
else
if urls[num]
Weechat.print("Starting browser...")
fork do # only for unix/posix
exec("#{browser} #{urls[num]} &> /dev/null")
end
else
Weechat.print("Invalid url number.")
end
end
end
return Weechat::PLUGIN_RC_OK
end
+35
View File
@@ -0,0 +1,35 @@
# Forcenick v1.0 - forces your original nickname
# Copyright (C) 2007 Pavel Shevchuk <stlwrt@gmail.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
def weechat_init
Weechat.register("forcenick", "1.0", "", "Forces your original nickname, wipes out ghosts and nick stealers")
Weechat.add_command_handler("forcenick", "forcenick", "Forces server_nick1, identifies to nickserv using server_password. Useful to call from server_command if your connection is unstable")
end
def forcenick(server, args)
server_info = Weechat.get_server_info[server]
cur_nick = server_info['nick']
forced_nick = server_info['nick1']
password = server_info['password']
if cur_nick != forced_nick
Weechat.command("/msg nickserv ghost #{forced_nick} #{password}", "", server)
Weechat.command("/nick #{forced_nick}", "", server)
Weechat.command("/msg nickserv identify #{password}", "", server)
end
return Weechat::PLUGIN_RC_OK
end
+84
View File
@@ -0,0 +1,84 @@
# Rbox plugin (Rhythmnox control and now playing plugin.)
# Version 0.2
# Released under GNU GPL v2
# Metallines <metallines@gmail.com>
# /rbox-help for help
def weechat_init
Weechat.register("rbox", "0.2", "", "Rhythmbox control and now playing plugin.")
Weechat.add_command_handler("rbox-print", "rbox_print")
Weechat.add_command_handler("rbox-play", "rbox_play")
Weechat.add_command_handler("rbox-pause", "rbox_pause")
Weechat.add_command_handler("rbox-previous", "rbox_previous")
Weechat.add_command_handler("rbox-next", "rbox_next")
Weechat.add_command_handler("rbox-help", "rbox_help")
return Weechat::PLUGIN_RC_OK
end
def rbox_print(server, args)
if `ps -C rhythmbox` =~ /rhythmbox/
artiste = `rhythmbox-client --print-playing-format %ta`.chomp
titre = `rhythmbox-client --print-playing-format %tt`.chomp
album = `rhythmbox-client --print-playing-format %at`.chomp
couleur_artiste = "C05"
couleur_titre = "C10"
couleur_album = "C03"
couleur_entre = "C14"
Weechat.command("/me écoute" + " %" + couleur_titre + titre + " %" + couleur_entre + "par" + " %" + couleur_artiste + artiste + " %" + couleur_entre + "de l'album" + " %" + couleur_album + album)
else
Weechat.print("Rhythmbox isn't running.")
end
return Weechat::PLUGIN_RC_OK
end
def rbox_play(server, args)
if `ps -C rhythmbox` =~ /rhythmbox/
`rhythmbox-client --play`
Weechat.print("Start playback.")
else
Weechat.print("Rhythmbox isn't running.")
end
return Weechat::PLUGIN_RC_OK
end
def rbox_pause(server, args)
if `ps -C rhythmbox` =~ /rhythmbox/
`rhythmbox-client --pause`
Weechat.print("Pause playback.")
else
Weechat.print("Rhythmbox isn't running.")
end
return Weechat::PLUGIN_RC_OK
end
def rbox_previous(server, args)
if `ps -C rhythmbox` =~ /rhythmbox/
`rhythmbox-client --previous`
Weechat.print("Skip to the previous track.")
else
Weechat.print("Rhythmbox isn't running.")
end
return Weechat::PLUGIN_RC_OK
end
def rbox_next(server, args)
if `ps -C rhythmbox` =~ /rhythmbox/
`rhythmbox-client --next`
Weechat.print("Skip to the next track.")
else
Weechat.print("Rhythmbox isn't running.")
end
return Weechat::PLUGIN_RC_OK
end
def rbox_help(server, args)
Weechat.print("/rbox-play -> Start playback")
Weechat.print("/rbox-pause -> Pause playback")
Weechat.print("/rbox-previous -> Skip to previous track")
Weechat.print("/rbox-next -> Skip to next track")
Weechat.print("/rbox-print -> Print which song rhythmbox is playing in current channel")
Weechat.print("/robix-help -> Display this help")
return Weechat::PLUGIN_RC_OK
end
+95
View File
@@ -0,0 +1,95 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckFunctionExists)
CHECK_INCLUDE_FILES("arpa/inet.h" HAVE_ARPA_INET_H)
#CHECK_INCLUDE_FILES("libintl.h" HAVE_LIBINTL_H)
CHECK_INCLUDE_FILES("limits.h" HAVE_LIMITS_H)
CHECK_INCLUDE_FILES("locale.h" HAVE_LOCALE_H)
CHECK_INCLUDE_FILES("netdb.h" HAVE_NETDB_H)
CHECK_INCLUDE_FILES("netinet/in.h" HAVE_NETINET_IN_H)
CHECK_INCLUDE_FILES("stdlib.h" HAVE_STDLIB_H)
CHECK_INCLUDE_FILES("string.h" HAVE_STRING_H)
CHECK_INCLUDE_FILES("sys/socket.h" HAVE_SYS_SOCKET_H)
CHECK_INCLUDE_FILES("sys/time.h" HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES("sys/types.h" HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILES("unistd.h" HAVE_UNISTD_H)
CHECK_INCLUDE_FILES("pwd.h" HAVE_PWD_H)
CHECK_INCLUDE_FILES("errno.h" HAVE_ERRNO_H)
CHECK_INCLUDE_FILES("wchar.h" HAVE_WCHAR_H)
CHECK_INCLUDE_FILES("langinfo.h" HAVE_LANGINFO_CODESET)
CHECK_FUNCTION_EXISTS(gethostbyname HAVE_GETHOSTBYNAME)
CHECK_FUNCTION_EXISTS(gethostname HAVE_GETHOSTNAME)
CHECK_FUNCTION_EXISTS(getsockname HAVE_GETSOCKNAME)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
CHECK_FUNCTION_EXISTS(inet_ntoa HAVE_INET_NTOA)
CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)
CHECK_FUNCTION_EXISTS(mkdir HAVE_MKDIR)
CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
CHECK_FUNCTION_EXISTS(setlocale HAVE_SETLOCALE)
CHECK_FUNCTION_EXISTS(socket HAVE_SOCKET)
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
CHECK_FUNCTION_EXISTS(strchr HAVE_STRCHR)
CHECK_FUNCTION_EXISTS(strdup HAVE_STRDUP)
CHECK_FUNCTION_EXISTS(strndup HAVE_STRNDUP)
CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)
CHECK_FUNCTION_EXISTS(strpbrk HAVE_STRPBRK)
CHECK_FUNCTION_EXISTS(strrchr HAVE_STRRCHR)
CHECK_FUNCTION_EXISTS(strstr HAVE_STRSTR)
#needs to be splitted in subdirectories
# FIXME: weechat_gui_common MUST be the first lib in the list
SET(STATIC_LIBS weechat_gui_common)
# Check for Gettext
IF(NOT DISABLE_NLS)
FIND_PACKAGE(Gettext)
IF(GETTEXT_FOUND)
ADD_DEFINITIONS(-DENABLE_NLS)
ENDIF(GETTEXT_FOUND)
ENDIF(NOT DISABLE_NLS)
# Check for GnuTLS
IF(NOT DISABLE_GNUTLS)
FIND_PACKAGE(GnuTLS)
IF(GNUTLS_FOUND)
STRING(REGEX REPLACE "/[^/]*$" "" GNUTLS_LIBRARY_PATH "${GNUTLS_LIBRARY}")
ADD_DEFINITIONS(-DHAVE_GNUTLS)
INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_PATH})
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${GNUTLS_LIBRARY_PATH}")
LIST(APPEND EXTRA_LIBS gnutls)
ENDIF(GNUTLS_FOUND)
ENDIF(NOT DISABLE_GNUTLS)
IF(NOT DISABLE_PLUGINS)
ADD_DEFINITIONS(-DPLUGINS)
LIST(APPEND STATIC_LIBS weechat_plugins)
ADD_SUBDIRECTORY( plugins )
ENDIF(NOT DISABLE_PLUGINS)
ADD_SUBDIRECTORY( common )
List(APPEND STATIC_LIBS weechat_main)
ADD_SUBDIRECTORY( irc )
LIST(APPEND STATIC_LIBS weechat_irc)
ADD_SUBDIRECTORY( gui )
+33
View File
@@ -0,0 +1,33 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
SET(LIB_MAIN_SRC weechat.c weechat.h alias.c alias.h backtrace.c backtrace.h
command.c command.h completion.c completion.h weelist.c weelist.h weeconfig.c
weeconfig.h history.c history.h hotlist.c hotlist.h log.c log.h fifo.c fifo.h
session.c session.h utf8.c utf8.h util.c util.h)
# Check for flock support
INCLUDE(CheckSymbolExists)
CHECK_INCLUDE_FILES("sys/file.h" HAVE_SYS_FILE_H)
CHECK_SYMBOL_EXISTS(flock "sys/file.h" HAVE_FLOCK)
IF(ICONV_FOUND)
ADD_DEFINITIONS( -DHAVE_ICONV )
ENDIF(ICONV_FOUND)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
ADD_LIBRARY(weechat_main STATIC ${LIB_MAIN_SRC})
+12 -16
View File
@@ -299,40 +299,36 @@ alias_replace_args (char *alias_args, char *user_args)
*/
char *
alias_replace_vars (char *string)
alias_replace_vars (t_irc_server *server, t_irc_channel *channel, char *string)
{
char *nick, *channel, *server;
char *var_nick, *var_channel, *var_server;
char empty_string[1] = { '\0' };
char *res, *temp;
nick = (SERVER(gui_current_window->buffer)
&& SERVER(gui_current_window->buffer)->nick) ?
SERVER(gui_current_window->buffer)->nick : empty_string;
channel = (CHANNEL(gui_current_window->buffer)) ?
CHANNEL(gui_current_window->buffer)->name : empty_string;
server = (SERVER(gui_current_window->buffer)) ?
SERVER(gui_current_window->buffer)->name : empty_string;
var_nick = (server && server->nick) ? server->nick : empty_string;
var_channel = (channel) ? channel->name : empty_string;
var_server = (server) ? server->name : empty_string;
/* replace nick */
temp = weechat_strreplace (string, "$nick", nick);
temp = weechat_strreplace (string, "$nick", var_nick);
if (!temp)
return NULL;
res = temp;
/* replace channel */
temp = weechat_strreplace (res, "$channel", channel);
temp = weechat_strreplace (res, "$channel", var_channel);
free (res);
if (!temp)
return NULL;
res = temp;
/* replace server */
temp = weechat_strreplace (res, "$server", server);
temp = weechat_strreplace (res, "$server", var_server);
free (res);
if (!temp)
return NULL;
res = temp;
/* return result */
return res;
}
+3 -1
View File
@@ -21,6 +21,8 @@
#ifndef __WEECHAT_ALIAS_H
#define __WEECHAT_ALIAS_H 1
#include "../irc/irc.h"
typedef struct t_weechat_alias t_weechat_alias;
struct t_weechat_alias
@@ -39,7 +41,7 @@ extern t_weechat_alias *alias_search (char *);
extern t_weechat_alias *alias_new (char *, char *);
extern char *alias_get_final_command (t_weechat_alias *);
extern char *alias_replace_args (char *, char *);
extern char *alias_replace_vars (char *);
extern char *alias_replace_vars (t_irc_server *, t_irc_channel *, char *);
extern void alias_free (t_weechat_alias *);
extern void alias_free_all ();
+1 -1
View File
@@ -136,7 +136,7 @@ weechat_backtrace_addr2line (int number, void *address, char *symbol)
number, function_name);
pclose (output);
#else
/* make gcc happy */
/* make C compiler happy */
(void) number;
(void) address;
(void) symbol;
+601 -270
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -53,6 +53,7 @@ extern t_weelist *last_index_command;
extern void command_index_build ();
extern void command_index_free ();
extern int command_used_by_weechat (char *);
extern char **split_multi_command (char *, char);
extern void free_multi_command (char **);
extern int exec_weechat_command (t_irc_server *, t_irc_channel *, char *, int);
@@ -72,6 +73,7 @@ extern int weechat_cmd_ignore (t_irc_server *, t_irc_channel *, int, char **);
extern int weechat_cmd_key (t_irc_server *, t_irc_channel *, char *);
extern int weechat_cmd_panel (t_irc_server *, t_irc_channel *, int, char **);
extern int weechat_cmd_plugin (t_irc_server *, t_irc_channel *, int, char **);
extern int weechat_cmd_reconnect (t_irc_server *, t_irc_channel *, int, char **);
extern int weechat_cmd_save (t_irc_server *, t_irc_channel *, int, char **);
extern int weechat_cmd_server (t_irc_server *, t_irc_channel *, int, char **);
extern int weechat_cmd_set (t_irc_server *, t_irc_channel *, char *);
+334 -151
View File
@@ -95,12 +95,14 @@ completion_free (t_completion *completion)
free (completion->args);
completion->args = NULL;
while (completion->completion_list)
weelist_remove (&completion->completion_list,
&completion->last_completion,
completion->completion_list);
weelist_remove_all (&completion->completion_list,
&completion->last_completion);
completion->completion_list = NULL;
completion->last_completion = NULL;
if (completion->word_found)
free (completion->word_found);
completion->word_found = NULL;
}
/*
@@ -203,20 +205,96 @@ completion_get_command_infos (t_completion *completion,
return;
}
/*
* completion_is_only_alphanum: return 1 if there is only alpha/num chars
* in a string
*/
int
completion_is_only_alphanum (char *string)
{
while (string[0])
{
if (strchr (cfg_look_nick_completion_ignore, string[0]))
return 0;
string++;
}
return 1;
}
/*
* completion_strdup_alphanum: duplicate alpha/num chars in a string
*/
char *
completion_strdup_alphanum (char *string)
{
char *result, *pos;
result = (char *)malloc (strlen (string) + 1);
pos = result;
while (string[0])
{
if (!strchr (cfg_look_nick_completion_ignore, string[0]))
{
pos[0] = string[0];
pos++;
}
string++;
}
pos[0] = '\0';
return result;
}
/*
* completion_nickncmp: locale and case independent string comparison
* with max length for nicks (alpha or digits only)
*/
int
completion_nickncmp (char *base_word, char *nick, int max)
{
char *base_word2, *nick2;
int return_cmp;
if (!cfg_look_nick_completion_ignore
|| !cfg_look_nick_completion_ignore[0]
|| !base_word || !nick || !base_word[0] || !nick[0]
|| (!completion_is_only_alphanum (base_word)))
return ascii_strncasecmp (base_word, nick, max);
base_word2 = completion_strdup_alphanum (base_word);
nick2 = completion_strdup_alphanum (nick);
return_cmp = ascii_strncasecmp (base_word2, nick2, strlen (base_word2));
free (base_word2);
free (nick2);
return return_cmp;
}
/*
* completion_list_add: add a word to completion word list
*/
void
completion_list_add (t_completion *completion, char *word)
completion_list_add (t_completion *completion, char *word,
int nick_completion, int position)
{
if (!word || !word[0])
return;
if (!completion->base_word || !completion->base_word[0]
|| (ascii_strncasecmp (completion->base_word, word,
strlen (completion->base_word)) == 0))
|| (nick_completion && (completion_nickncmp (completion->base_word, word,
strlen (completion->base_word)) == 0))
|| (!nick_completion && (ascii_strncasecmp (completion->base_word, word,
strlen (completion->base_word)) == 0)))
{
weelist_add (&completion->completion_list,
&completion->last_completion,
word);
word,
position);
}
}
@@ -231,7 +309,8 @@ completion_list_add_alias (t_completion *completion)
for (ptr_alias = weechat_alias; ptr_alias; ptr_alias = ptr_alias->next_alias)
{
completion_list_add (completion, ptr_alias->alias_name);
completion_list_add (completion, ptr_alias->alias_name,
0, WEELIST_POS_SORT);
}
}
@@ -246,7 +325,7 @@ completion_list_add_alias_cmd (t_completion *completion)
for (ptr_list = index_commands; ptr_list; ptr_list = ptr_list->next_weelist)
{
completion_list_add (completion, ptr_list->data);
completion_list_add (completion, ptr_list->data, 0, WEELIST_POS_SORT);
}
}
@@ -259,24 +338,31 @@ completion_list_add_channel (t_completion *completion)
{
if (completion->channel)
completion_list_add (completion,
((t_irc_channel *)(completion->channel))->name);
((t_irc_channel *)(completion->channel))->name,
0, WEELIST_POS_SORT);
}
/*
* completion_list_add_server_channels: add server channels to completion list
* completion_list_add_channels: add server channels to completion list
*/
void
completion_list_add_server_channels (t_completion *completion)
completion_list_add_channels (t_completion *completion)
{
t_irc_server *ptr_server;
t_irc_channel *ptr_channel;
if (completion->server)
{
for (ptr_channel = ((t_irc_server *)(completion->server))->channels;
ptr_channel; ptr_channel = ptr_channel->next_channel)
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
completion_list_add (completion, ptr_channel->name);
for (ptr_channel = ptr_server->channels;
ptr_channel; ptr_channel = ptr_channel->next_channel)
{
completion_list_add (completion, ptr_channel->name,
0, WEELIST_POS_SORT);
}
}
}
}
@@ -361,7 +447,8 @@ completion_list_add_filename (t_completion *completion)
entry->d_name,
S_ISDIR(statbuf.st_mode) ? DIR_SEPARATOR : "");
completion_list_add (completion, buffer);
completion_list_add (completion, buffer,
0, WEELIST_POS_SORT);
}
}
}
@@ -392,11 +479,12 @@ completion_list_add_plugin_cmd (t_completion *completion)
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_handler->type == PLUGIN_HANDLER_COMMAND)
completion_list_add (completion, ptr_handler->command);
completion_list_add (completion, ptr_handler->command,
0, WEELIST_POS_SORT);
}
}
#else
/* make gcc happy */
/* make C compiler happy */
(void) completion;
#endif
}
@@ -413,7 +501,8 @@ completion_list_add_irc_cmd_sent (t_completion *completion)
for (i = 0; irc_commands[i].command_name; i++)
{
if (irc_commands[i].cmd_function_args || irc_commands[i].cmd_function_1arg)
completion_list_add (completion, irc_commands[i].command_name);
completion_list_add (completion, irc_commands[i].command_name,
0, WEELIST_POS_SORT);
}
}
@@ -429,7 +518,8 @@ completion_list_add_irc_cmd_recv (t_completion *completion)
for (i = 0; irc_commands[i].command_name; i++)
{
if (irc_commands[i].recv_function)
completion_list_add(completion, irc_commands[i].command_name);
completion_list_add(completion, irc_commands[i].command_name,
0, WEELIST_POS_SORT);
}
}
@@ -444,7 +534,8 @@ completion_list_add_key_cmd (t_completion *completion)
for (i = 0; gui_key_functions[i].function_name; i++)
{
completion_list_add (completion, gui_key_functions[i].function_name);
completion_list_add (completion, gui_key_functions[i].function_name,
0, WEELIST_POS_SORT);
}
}
@@ -455,9 +546,62 @@ completion_list_add_key_cmd (t_completion *completion)
void
completion_list_add_self_nick (t_completion *completion)
{
if (completion->server)
completion_list_add (completion,
((t_irc_server *)(completion->server))->nick,
0, WEELIST_POS_SORT);
}
/*
* completion_list_add_server_nicks: add server nicks to completion list
*/
void
completion_list_add_server_nicks (t_completion *completion)
{
t_irc_server *ptr_server;
t_irc_channel *ptr_channel;
t_irc_nick *ptr_nick;
if (completion->server)
{
completion_list_add (completion, ((t_irc_server *)(completion->server))->nick);
for (ptr_server = (t_irc_server *)(completion->server); ptr_server;
ptr_server = ptr_server->next_server)
{
for (ptr_channel = ptr_server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
{
if ((!completion->channel || (t_irc_channel *)(completion->channel) != ptr_channel)
&& (ptr_channel->type == CHANNEL_TYPE_CHANNEL))
{
for (ptr_nick = ptr_channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
completion_list_add (completion, ptr_nick->nick,
1, WEELIST_POS_SORT);
}
}
}
}
/* add current channel nicks at beginning */
if (completion->channel && (((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_CHANNEL))
{
for (ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
ptr_nick; ptr_nick = ptr_nick->next_nick)
{
completion_list_add (completion, ptr_nick->nick,
1, WEELIST_POS_BEGINNING);
}
}
/* add self nick at the end */
if (completion->server)
completion_list_add (completion,
((t_irc_server *)(completion->server))->nick,
1, WEELIST_POS_END);
completion->arg_is_nick = 1;
}
}
@@ -469,22 +613,45 @@ void
completion_list_add_channel_nicks (t_completion *completion)
{
t_irc_nick *ptr_nick;
t_weelist *ptr_weelist;
if (completion->channel)
{
if (((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_CHANNEL)
{
/* add channel nicks */
for (ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
ptr_nick; ptr_nick = ptr_nick->next_nick)
{
completion_list_add (completion, ptr_nick->nick);
completion_list_add (completion, ptr_nick->nick,
1, WEELIST_POS_SORT);
}
/* add nicks speaking recently on this channel */
if (cfg_look_nick_completion_smart)
{
for (ptr_weelist = ((t_irc_channel *)(completion->channel))->nicks_speaking;
ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
{
if (irc_nick_search ((t_irc_channel *)(completion->channel),
ptr_weelist->data))
completion_list_add (completion, ptr_weelist->data,
1, WEELIST_POS_BEGINNING);
}
}
/* add self nick at the end */
if (completion->server)
completion_list_add (completion,
((t_irc_server *)(completion->server))->nick,
1, WEELIST_POS_END);
}
if ((((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_PRIVATE)
|| (((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_DCC_CHAT))
{
completion_list_add (completion,
((t_irc_channel *)(completion->channel))->name);
((t_irc_channel *)(completion->channel))->name,
1, WEELIST_POS_SORT);
}
completion->arg_is_nick = 1;
}
@@ -508,7 +675,8 @@ completion_list_add_channel_nicks_hosts (t_completion *completion)
for (ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
ptr_nick; ptr_nick = ptr_nick->next_nick)
{
completion_list_add (completion, ptr_nick->nick);
completion_list_add (completion, ptr_nick->nick,
1, WEELIST_POS_SORT);
if (ptr_nick->host)
{
length = strlen (ptr_nick->nick) + 1 +
@@ -518,7 +686,8 @@ completion_list_add_channel_nicks_hosts (t_completion *completion)
{
snprintf (buf, length, "%s!%s",
ptr_nick->nick, ptr_nick->host);
completion_list_add (completion, buf);
completion_list_add (completion, buf,
1, WEELIST_POS_SORT);
free (buf);
}
}
@@ -528,7 +697,8 @@ completion_list_add_channel_nicks_hosts (t_completion *completion)
|| (((t_irc_channel *)(completion->channel))->type == CHANNEL_TYPE_PRIVATE))
{
completion_list_add (completion,
((t_irc_channel *)(completion->channel))->name);
((t_irc_channel *)(completion->channel))->name,
1, WEELIST_POS_SORT);
}
completion->arg_is_nick = 1;
}
@@ -553,7 +723,8 @@ completion_list_add_option (t_completion *completion)
for (j = 0; weechat_options[i][j].option_name; j++)
{
completion_list_add (completion,
weechat_options[i][j].option_name);
weechat_options[i][j].option_name,
0, WEELIST_POS_SORT);
}
}
}
@@ -565,7 +736,7 @@ completion_list_add_option (t_completion *completion)
snprintf (option_name, sizeof (option_name), "%s.%s",
ptr_server->name,
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
completion_list_add (completion, option_name);
completion_list_add (completion, option_name, 0, WEELIST_POS_SORT);
}
}
}
@@ -583,10 +754,10 @@ completion_list_add_plugin_option (t_completion *completion)
for (ptr_option = plugin_options; ptr_option;
ptr_option = ptr_option->next_option)
{
completion_list_add (completion, ptr_option->name);
completion_list_add (completion, ptr_option->name, 0, WEELIST_POS_SORT);
}
#else
/* make gcc happy */
/* make C compiler happy */
(void) completion;
#endif
}
@@ -599,7 +770,8 @@ void
completion_list_add_part (t_completion *completion)
{
if (cfg_irc_default_msg_part && cfg_irc_default_msg_part[0])
completion_list_add (completion, cfg_irc_default_msg_part);
completion_list_add (completion, cfg_irc_default_msg_part,
0, WEELIST_POS_SORT);
}
/*
@@ -615,10 +787,11 @@ completion_list_add_plugin (t_completion *completion)
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
completion_list_add (completion, ptr_plugin->name);
completion_list_add (completion, ptr_plugin->name,
0, WEELIST_POS_SORT);
}
#else
/* make gcc happy */
/* make C compiler happy */
(void) completion;
#endif
}
@@ -631,7 +804,8 @@ void
completion_list_add_quit (t_completion *completion)
{
if (cfg_irc_default_msg_quit && cfg_irc_default_msg_quit[0])
completion_list_add (completion, cfg_irc_default_msg_quit);
completion_list_add (completion, cfg_irc_default_msg_quit,
0, WEELIST_POS_SORT);
}
/*
@@ -643,7 +817,8 @@ completion_list_add_server (t_completion *completion)
{
if (completion->server)
completion_list_add (completion,
((t_irc_server *)(completion->server))->name);
((t_irc_server *)(completion->server))->name,
0, WEELIST_POS_SORT);
}
/*
@@ -658,7 +833,8 @@ completion_list_add_servers (t_completion *completion)
for (ptr_server = irc_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
completion_list_add (completion, ptr_server->name);
completion_list_add (completion, ptr_server->name,
0, WEELIST_POS_SORT);
}
}
@@ -671,11 +847,9 @@ completion_list_add_topic (t_completion *completion)
{
char *string;
if (!completion->server || !completion->channel
|| !((t_irc_channel *)(completion->channel))->topic
|| !((t_irc_channel *)(completion->channel))->topic[0])
completion_stop (completion);
else
if (completion->server && completion->channel
&& ((t_irc_channel *)(completion->channel))->topic
&& ((t_irc_channel *)(completion->channel))->topic[0])
{
if (cfg_irc_colors_send)
string = (char *)gui_color_decode_for_user_entry ((unsigned char *)((t_irc_channel *)(completion->channel))->topic);
@@ -683,7 +857,8 @@ completion_list_add_topic (t_completion *completion)
string = (char *)gui_color_decode ((unsigned char *)((t_irc_channel *)(completion->channel))->topic, 0);
completion_list_add (completion,
(string) ?
string : ((t_irc_channel *)(completion->channel))->topic);
string : ((t_irc_channel *)(completion->channel))->topic,
0, WEELIST_POS_SORT);
if (string)
free (string);
}
@@ -715,26 +890,31 @@ completion_list_add_option_value (t_completion *completion)
{
case OPTION_TYPE_BOOLEAN:
if (option_value && (*((int *)(option_value))))
completion_list_add (completion, "on");
completion_list_add (completion, "on",
0, WEELIST_POS_SORT);
else
completion_list_add (completion, "off");
completion_list_add (completion, "off",
0, WEELIST_POS_SORT);
break;
case OPTION_TYPE_INT:
snprintf (option_string, sizeof (option_string) - 1,
"%d", (option_value) ? *((int *)(option_value)) : option->default_int);
completion_list_add (completion, option_string);
completion_list_add (completion, option_string,
0, WEELIST_POS_SORT);
break;
case OPTION_TYPE_INT_WITH_STRING:
completion_list_add (completion,
(option_value) ?
option->array_values[*((int *)(option_value))] :
option->array_values[option->default_int]);
option->array_values[option->default_int],
0, WEELIST_POS_SORT);
break;
case OPTION_TYPE_COLOR:
completion_list_add (completion,
(option_value) ?
gui_color_get_name (*((int *)(option_value))) :
option->default_string);
option->default_string,
0, WEELIST_POS_SORT);
break;
case OPTION_TYPE_STRING:
snprintf (option_string, sizeof (option_string) - 1,
@@ -742,7 +922,8 @@ completion_list_add_option_value (t_completion *completion)
((option_value) && (*((char **)(option_value)))) ?
*((char **)(option_value)) :
option->default_string);
completion_list_add (completion, option_string);
completion_list_add (completion, option_string,
0, WEELIST_POS_SORT);
break;
}
}
@@ -770,13 +951,14 @@ completion_list_add_plugin_option_value (t_completion *completion)
ptr_option = plugin_config_search_internal (completion->args);
if (ptr_option)
completion_list_add (completion, ptr_option->value);
completion_list_add (completion, ptr_option->value,
0, WEELIST_POS_SORT);
if (pos)
pos[0] = ' ';
}
#else
/* make gcc happy */
/* make C compiler happy */
(void) completion;
#endif
}
@@ -792,7 +974,8 @@ completion_list_add_weechat_cmd (t_completion *completion)
for (i = 0; weechat_commands[i].command_name; i++)
{
completion_list_add (completion, weechat_commands[i].command_name);
completion_list_add (completion, weechat_commands[i].command_name,
0, WEELIST_POS_SORT);
}
}
@@ -821,7 +1004,8 @@ completion_build_list_template (t_completion *completion, char *template)
word[word_offset] = '\0';
weelist_add (&completion->completion_list,
&completion->last_completion,
word);
word,
WEELIST_POS_SORT);
}
word_offset = 0;
break;
@@ -846,7 +1030,7 @@ completion_build_list_template (t_completion *completion, char *template)
completion_list_add_channel (completion);
break;
case 'C': /* all channels */
completion_list_add_server_channels (completion);
completion_list_add_channels (completion);
break;
case 'f': /* filename */
completion_list_add_filename (completion);
@@ -866,6 +1050,9 @@ completion_build_list_template (t_completion *completion, char *template)
case 'm': /* self nickname */
completion_list_add_self_nick (completion);
break;
case 'M': /* nicks of current server (all open channels) */
completion_list_add_server_nicks (completion);
break;
case 'n': /* channel nicks */
completion_list_add_channel_nicks (completion);
completion->context = COMPLETION_NICK;
@@ -1107,7 +1294,9 @@ completion_command (t_completion *completion)
{
if ((!completion->word_found) || word_found_seen)
{
completion->word_found = ptr_weelist->data;
if (completion->word_found)
free (completion->word_found);
completion->word_found = strdup (ptr_weelist->data);
if (completion->direction < 0)
ptr_weelist2 = ptr_weelist->prev_weelist;
@@ -1146,80 +1335,12 @@ completion_command (t_completion *completion)
}
if (completion->word_found)
{
free (completion->word_found);
completion->word_found = NULL;
completion_command (completion);
}
}
/*
* completion_is_only_alphanum: return 1 if there is only alpha/num chars
* in a string
*/
int
completion_is_only_alphanum (char *string)
{
while (string[0])
{
if (strchr (cfg_look_nick_completion_ignore, string[0]))
return 0;
string++;
}
return 1;
}
/*
* completion_strdup_alphanum: duplicate alpha/num chars in a string
*/
char *
completion_strdup_alphanum (char *string)
{
char *result, *pos;
result = (char *)malloc (strlen (string) + 1);
pos = result;
while (string[0])
{
if (!strchr (cfg_look_nick_completion_ignore, string[0]))
{
pos[0] = string[0];
pos++;
}
string++;
}
pos[0] = '\0';
return result;
}
/*
* completion_nickncmp: locale and case independent string comparison
* with max length for nicks (alpha or digits only)
*/
int
completion_nickncmp (char *base_word, char *nick, int max)
{
char *base_word2, *nick2;
int return_cmp;
if (!cfg_look_nick_completion_ignore
|| !cfg_look_nick_completion_ignore[0]
|| !base_word || !nick || !base_word[0] || !nick[0]
|| (!completion_is_only_alphanum (base_word)))
return ascii_strncasecmp (base_word, nick, max);
base_word2 = completion_strdup_alphanum (base_word);
nick2 = completion_strdup_alphanum (nick);
return_cmp = ascii_strncasecmp (base_word2, nick2, strlen (base_word2));
free (base_word2);
free (nick2);
return return_cmp;
}
/*
* completion_command_arg: complete a command argument
*/
@@ -1245,7 +1366,9 @@ completion_command_arg (t_completion *completion, int nick_completion)
{
if ((!completion->word_found) || word_found_seen)
{
completion->word_found = ptr_weelist->data;
if (completion->word_found)
free (completion->word_found);
completion->word_found = strdup (ptr_weelist->data);
if (completion->direction < 0)
ptr_weelist2 = ptr_weelist->prev_weelist;
@@ -1286,6 +1409,7 @@ completion_command_arg (t_completion *completion, int nick_completion)
}
if (completion->word_found)
{
free (completion->word_found);
completion->word_found = NULL;
completion_command_arg (completion, nick_completion);
}
@@ -1299,7 +1423,8 @@ void
completion_nick (t_completion *completion)
{
int length, word_found_seen, other_completion;
t_irc_nick *ptr_nick, *ptr_nick2;
t_irc_nick *ptr_nick;
t_weelist *ptr_weelist, *ptr_weelist2;
if (!completion->channel)
return;
@@ -1313,31 +1438,83 @@ completion_nick (t_completion *completion)
{
weelist_add (&completion->completion_list,
&completion->last_completion,
((t_irc_channel *)(completion->channel))->name);
((t_irc_channel *)(completion->channel))->name,
WEELIST_POS_SORT);
weelist_add (&completion->completion_list,
&completion->last_completion,
((t_irc_server *)(completion->server))->nick);
((t_irc_server *)(completion->server))->nick,
WEELIST_POS_SORT);
}
completion_command_arg (completion, 1);
return;
}
/* rebuild nick list for completion, with nicks speaking at beginning of list */
if ((((t_irc_channel *)(completion->channel))->nick_completion_reset)
|| (!(completion->completion_list)))
{
/* empty completion list */
if (completion->completion_list)
{
weelist_remove_all (&(completion->completion_list),
&(completion->last_completion));
completion->completion_list = NULL;
completion->last_completion = NULL;
}
/* add channel nicks */
for (ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
ptr_nick; ptr_nick = ptr_nick->next_nick)
{
weelist_add (&(completion->completion_list),
&(completion->last_completion),
ptr_nick->nick,
WEELIST_POS_SORT);
}
/* add nicks speaking recently on this channel */
if (cfg_look_nick_completion_smart)
{
for (ptr_weelist = ((t_irc_channel *)(completion->channel))->nicks_speaking;
ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
{
if (irc_nick_search ((t_irc_channel *)(completion->channel),
ptr_weelist->data))
weelist_add (&(completion->completion_list),
&(completion->last_completion),
ptr_weelist->data,
WEELIST_POS_BEGINNING);
}
}
/* add self nick at the end */
if (completion->server)
weelist_add (&(completion->completion_list),
&(completion->last_completion),
((t_irc_server *)(completion->server))->nick,
WEELIST_POS_END);
((t_irc_channel *)(completion->channel))->nick_completion_reset = 0;
}
length = strlen (completion->base_word);
word_found_seen = 0;
other_completion = 0;
if (completion->direction < 0)
ptr_nick = ((t_irc_channel *)(completion->channel))->last_nick;
else
ptr_nick = ((t_irc_channel *)(completion->channel))->nicks;
while (ptr_nick)
if (completion->direction < 0)
ptr_weelist = completion->last_completion;
else
ptr_weelist = completion->completion_list;
while (ptr_weelist)
{
if (completion_nickncmp (completion->base_word, ptr_nick->nick, length) == 0)
if (completion_nickncmp (completion->base_word, ptr_weelist->data, length) == 0)
{
if ((!completion->word_found) || word_found_seen)
{
completion->word_found = ptr_nick->nick;
if (completion->word_found)
free (completion->word_found);
completion->word_found = strdup (ptr_weelist->data);
if (cfg_look_nick_complete_first)
{
completion->position = -1;
@@ -1345,21 +1522,21 @@ completion_nick (t_completion *completion)
}
if (completion->direction < 0)
ptr_nick2 = ptr_nick->prev_nick;
ptr_weelist2 = ptr_weelist->prev_weelist;
else
ptr_nick2 = ptr_nick->next_nick;
ptr_weelist2 = ptr_weelist->next_weelist;
while (ptr_nick2)
while (ptr_weelist2)
{
if (completion_nickncmp (completion->base_word,
ptr_nick2->nick,
ptr_weelist2->data,
length) == 0)
other_completion++;
if (completion->direction < 0)
ptr_nick2 = ptr_nick2->prev_nick;
ptr_weelist2 = ptr_weelist2->prev_weelist;
else
ptr_nick2 = ptr_nick2->next_nick;
ptr_weelist2 = ptr_weelist2->next_weelist;
}
if (other_completion == 0)
@@ -1374,16 +1551,17 @@ completion_nick (t_completion *completion)
other_completion++;
}
if (completion->word_found &&
(ascii_strcasecmp (ptr_nick->nick, completion->word_found) == 0))
(ascii_strcasecmp (ptr_weelist->data, completion->word_found) == 0))
word_found_seen = 1;
if (completion->direction < 0)
ptr_nick = ptr_nick->prev_nick;
ptr_weelist = ptr_weelist->prev_weelist;
else
ptr_nick = ptr_nick->next_nick;
ptr_weelist = ptr_weelist->next_weelist;
}
if (completion->word_found)
{
free (completion->word_found);
completion->word_found = NULL;
completion_nick (completion);
}
@@ -1407,10 +1585,10 @@ completion_auto (t_completion *completion)
}
/* channel completion */
if (string_is_channel (completion->base_word))
if (irc_channel_is_channel (completion->base_word))
{
if (!completion->completion_list)
completion_list_add_server_channels (completion);
completion_list_add_channels (completion);
completion_command_arg (completion, 0);
return;
}
@@ -1437,12 +1615,15 @@ completion_search (t_completion *completion, int direction,
/* if new completion => look for base word */
if (pos != completion->position)
{
if (completion->word_found)
free (completion->word_found);
completion->word_found = NULL;
completion_find_context (completion, buffer, size, pos);
}
/* completion */
old_word_found = completion->word_found;
old_word_found = (completion->word_found) ?
strdup (completion->word_found) : NULL;
switch (completion->context)
{
case COMPLETION_NULL:
@@ -1489,6 +1670,8 @@ completion_search (t_completion *completion, int direction,
}
}
}
if (old_word_found)
free (old_word_found);
}
/*
+2 -2
View File
@@ -147,7 +147,7 @@ fifo_exec (char *text)
pos = strchr (text, ',');
if (pos)
pos[0] = '\0';
ptr_server = server_search (text);
ptr_server = irc_server_search (text);
if (!ptr_server || !ptr_server->buffer)
{
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
@@ -157,7 +157,7 @@ fifo_exec (char *text)
}
if (ptr_server && pos)
{
ptr_channel = channel_search_any (ptr_server, pos + 1);
ptr_channel = irc_channel_search_any (ptr_server, pos + 1);
if (!ptr_channel)
{
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
+3 -28
View File
@@ -31,6 +31,7 @@
#include "history.h"
#include "util.h"
#include "weeconfig.h"
#include "../irc/irc.h"
#include "../gui/gui.h"
@@ -40,32 +41,6 @@ t_history *history_global_ptr = NULL;
int num_history_global = 0;
/*
* history_hide_password: hide a nickserv password
*/
void
history_hide_password (char *string)
{
char *pos_pwd;
if (strstr (string, "nickserv "))
{
pos_pwd = strstr (string, "identify ");
if (!pos_pwd)
pos_pwd = strstr (string, "register ");
if (pos_pwd)
{
pos_pwd += 9;
while (pos_pwd[0])
{
pos_pwd[0] = '*';
pos_pwd++;
}
}
}
}
/*
* history_buffer_add: add a text/command to buffer's history
*/
@@ -87,7 +62,7 @@ history_buffer_add (void *buffer, char *string)
{
new_history->text = strdup (string);
if (cfg_log_hide_nickserv_pwd)
history_hide_password (new_history->text);
irc_display_hide_password (new_history->text, 1);
if (((t_gui_buffer *)(buffer))->history)
((t_gui_buffer *)(buffer))->history->prev_history = new_history;
@@ -137,7 +112,7 @@ history_global_add (char *string)
{
new_history->text = strdup (string);
if (cfg_log_hide_nickserv_pwd)
history_hide_password (new_history->text);
irc_display_hide_password (new_history->text, 1);
if (history_global)
history_global->prev_history = new_history;
+1 -1
View File
@@ -86,7 +86,7 @@ hotlist_add (int priority, t_irc_server *server, t_gui_buffer *buffer,
/* do not highlight current buffer */
if ((buffer == gui_current_window->buffer)
&& (!allow_current_buffer))
&& (!allow_current_buffer) && (!gui_buffer_is_scrolled (buffer)))
return;
if ((pos_hotlist = hotlist_search (buffer)))
+1 -1
View File
@@ -101,7 +101,7 @@ weechat_log_init ()
if (!weechat_log_open (NULL, "w"))
{
weechat_iconv_fprintf (stderr,
_("%s unable to create/append to log file\n"
_("%s unable to create/append to log file (weechat.log)\n"
"If another WeeChat process is using this file, try to run WeeChat\n"
"with another home using \"--dir\" command line option.\n"),
WEECHAT_ERROR);
+21 -17
View File
@@ -259,6 +259,7 @@ session_save_servers (FILE *file)
rc = rc && (session_write_str (file, SESSION_SERV_UNTERMINATED_MESSAGE, ptr_server->unterminated_message));
rc = rc && (session_write_str (file, SESSION_SERV_NICK, ptr_server->nick));
rc = rc && (session_write_str (file, SESSION_SERV_NICK_MODES, ptr_server->nick_modes));
rc = rc && (session_write_str (file, SESSION_SERV_PREFIX, ptr_server->prefix));
rc = rc && (session_write_buf (file, SESSION_SERV_RECONNECT_START, &(ptr_server->reconnect_start), sizeof (time_t)));
rc = rc && (session_write_int (file, SESSION_SERV_RECONNECT_JOIN, ptr_server->reconnect_join));
rc = rc && (session_write_int (file, SESSION_SERV_IS_AWAY, ptr_server->is_away));
@@ -373,7 +374,7 @@ session_save_line (FILE *file, t_gui_line *line)
rc = rc && (session_write_int (file, SESSION_LINE_WITH_MESSAGE, line->line_with_message));
rc = rc && (session_write_int (file, SESSION_LINE_WITH_HIGHLIGHT, line->line_with_highlight));
rc = rc && (session_write_str (file, SESSION_LINE_DATA, line->data));
rc = rc && (session_write_int (file, SESSION_LINE_OFS_AFTER_DATE, line->ofs_start_message));
rc = rc && (session_write_int (file, SESSION_LINE_OFS_AFTER_DATE, line->ofs_after_date));
rc = rc && (session_write_int (file, SESSION_LINE_OFS_START_MESSAGE, line->ofs_start_message));
rc = rc && (session_write_str (file, SESSION_LINE_NICK, line->nick));
rc = rc && (session_write_buf (file, SESSION_LINE_DATE, &(line->date), sizeof (time_t)));
@@ -825,7 +826,6 @@ session_load_server (FILE *file)
void *session_data;
size_t session_size;
int session_size_int;
const int cert_type_prio[] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
#endif
/* read server name */
@@ -839,20 +839,20 @@ session_load_server (FILE *file)
/* use or allocate server */
weechat_log_printf (_("session: loading server \"%s\"\n"),
server_name);
session_current_server = server_search (server_name);
session_current_server = irc_server_search (server_name);
if (session_current_server)
weechat_log_printf (_("server found, updating values\n"));
else
{
weechat_log_printf (_("server not found, creating new one\n"));
session_current_server = server_alloc ();
session_current_server = irc_server_alloc ();
if (!session_current_server)
{
free (server_name);
session_crash (file, _("can't create new server"));
return 0;
}
server_init (session_current_server);
irc_server_init (session_current_server);
session_current_server->name = strdup (server_name);
}
free (server_name);
@@ -958,7 +958,8 @@ session_load_server (FILE *file)
return 0;
}
gnutls_set_default_priority (session_current_server->gnutls_sess);
gnutls_certificate_type_set_priority (session_current_server->gnutls_sess, cert_type_prio);
gnutls_certificate_type_set_priority (session_current_server->gnutls_sess, gnutls_cert_type_prio);
gnutls_protocol_set_priority (session_current_server->gnutls_sess, gnutls_prot_prio);
gnutls_credentials_set (session_current_server->gnutls_sess, GNUTLS_CRD_CERTIFICATE, gnutls_xcred);
session_data = NULL;
rc = rc && (session_read_buf_alloc (file, &session_data, &session_size_int));
@@ -986,6 +987,9 @@ session_load_server (FILE *file)
case SESSION_SERV_NICK_MODES:
rc = rc && (session_read_str (file, &(session_current_server->nick_modes)));
break;
case SESSION_SERV_PREFIX:
rc = rc && (session_read_str (file, &(session_current_server->prefix)));
break;
case SESSION_SERV_RECONNECT_START:
rc = rc && (session_read_buf (file, &(session_current_server->reconnect_start), sizeof (time_t)));
break;
@@ -1065,9 +1069,9 @@ session_load_channel (FILE *file)
/* allocate channel */
weechat_log_printf (_("session: loading channel \"%s\"\n"),
channel_name);
session_current_channel = channel_new (session_current_server,
channel_type,
channel_name);
session_current_channel = irc_channel_new (session_current_server,
channel_type,
channel_name);
free (channel_name);
if (!session_current_channel)
{
@@ -1160,8 +1164,8 @@ session_load_nick (FILE *file)
}
/* allocate nick */
nick = nick_new (session_current_server, session_current_channel,
nick_name, 0, 0, 0, 0, 0);
nick = irc_nick_new (session_current_server, session_current_channel,
nick_name, 0, 0, 0, 0, 0, 0);
free (nick_name);
if (!nick)
{
@@ -1218,7 +1222,7 @@ session_load_dcc (FILE *file)
t_irc_channel *ptr_channel;
/* allocate DCC */
dcc = dcc_alloc ();
dcc = irc_dcc_alloc ();
if (!dcc)
{
session_crash (file, _("can't create new DCC"));
@@ -1251,7 +1255,7 @@ session_load_dcc (FILE *file)
return 0;
if (string && string[0])
{
ptr_server = server_search (string);
ptr_server = irc_server_search (string);
if (!ptr_server)
{
session_crash (file, _("server not found for DCC"));
@@ -1272,7 +1276,7 @@ session_load_dcc (FILE *file)
return 0;
if (string && string[0])
{
ptr_channel = channel_search_any (ptr_server, string);
ptr_channel = irc_channel_search_any (ptr_server, string);
if (!ptr_channel)
{
session_crash (file, _("channel not found for DCC"));
@@ -1464,7 +1468,7 @@ session_load_buffer (FILE *file)
ptr_channel = NULL;
if (server_name)
{
ptr_server = server_search (server_name);
ptr_server = irc_server_search (server_name);
if (!ptr_server)
{
session_crash (file, _("server not found for buffer"));
@@ -1474,7 +1478,7 @@ session_load_buffer (FILE *file)
if (channel_name)
{
ptr_channel = channel_search_any_without_buffer (ptr_server, channel_name);
ptr_channel = irc_channel_search_any_without_buffer (ptr_server, channel_name);
if (!ptr_channel)
{
session_crash (file, _("channel not found for buffer"));
@@ -1682,7 +1686,7 @@ session_load_hotlist (FILE *file)
server_name = NULL;
if (!session_read_str (file, &server_name))
return 0;
ptr_server = server_search (server_name);
ptr_server = irc_server_search (server_name);
free (server_name);
break;
case SESSION_HOTL_BUFFER_NUMBER:
+2 -1
View File
@@ -92,7 +92,8 @@ enum t_session_server
SESSION_SERV_CHARSET_ENCODE__UNUSED,
SESSION_SERV_HOSTNAME,
SESSION_SERV_NICK_MODES,
SESSION_SERV_AWAY_MESSAGE
SESSION_SERV_AWAY_MESSAGE,
SESSION_SERV_PREFIX
};
enum t_session_channel
+16
View File
@@ -55,6 +55,22 @@ utf8_init ()
local_utf8 = (ascii_strcasecmp (local_charset, "UTF-8") == 0);
}
/*
* utf8_has_8bits: return 1 if string has 8-bits chars, 0 if only 7-bits chars
*/
int
utf8_has_8bits (char *string)
{
while (string && string[0])
{
if (string[0] & 0x80)
return 1;
string++;
}
return 0;
}
/*
* utf8_is_valid: return 1 if UTF-8 string is valid, 0 otherwise
* if error is not NULL, it's set with first non valid UTF-8
+1
View File
@@ -24,6 +24,7 @@
extern int local_utf8;
extern void utf8_init ();
extern int utf8_has_8bits (char *);
extern int utf8_is_valid (char *, char **);
extern void utf8_normalize (char *, char);
extern char *utf8_prev_char (char *, char *);
+75 -43
View File
@@ -33,6 +33,14 @@
#include <iconv.h>
#endif
#ifndef ICONV_CONST
#ifdef ICONV_2ARG_IS_CONST
#define ICONV_CONST const
#else
#define ICONV_CONST
#endif
#endif
#include "weechat.h"
#include "utf8.h"
#include "weeconfig.h"
@@ -194,16 +202,15 @@ ascii_strcasestr (char *string, char *search)
*/
char *
weechat_iconv (char *from_code, char *to_code, char *string)
weechat_iconv (int from_utf8, char *from_code, char *to_code, char *string)
{
char *outbuf;
#ifdef HAVE_ICONV
iconv_t cd;
char *inbuf;
char *inbuf, *ptr_inbuf, *ptr_outbuf, *next_char;
char *ptr_inbuf_shift;
int done;
ICONV_CONST char *ptr_inbuf;
char *ptr_outbuf;
size_t err, inbytesleft, outbytesleft;
if (from_code && from_code[0] && to_code && to_code[0]
@@ -220,10 +227,11 @@ weechat_iconv (char *from_code, char *to_code, char *string)
outbytesleft = inbytesleft * 4;
outbuf = (char *) malloc (outbytesleft + 2);
ptr_outbuf = outbuf;
ptr_inbuf_shift = NULL;
done = 0;
while (!done)
{
err = iconv (cd, &ptr_inbuf, &inbytesleft,
err = iconv (cd, (ICONV_CONST char **)(&ptr_inbuf), &inbytesleft,
&ptr_outbuf, &outbytesleft);
if (err == (size_t)(-1))
{
@@ -236,13 +244,45 @@ weechat_iconv (char *from_code, char *to_code, char *string)
done = 1;
break;
case EILSEQ:
ptr_inbuf[0] = '?';
if (from_utf8)
{
next_char = utf8_next_char (ptr_inbuf);
if (next_char)
{
inbytesleft -= next_char - ptr_inbuf;
ptr_inbuf = next_char;
}
else
{
inbytesleft--;
ptr_inbuf++;
}
}
else
{
ptr_inbuf++;
inbytesleft--;
}
ptr_outbuf[0] = '?';
ptr_outbuf++;
outbytesleft--;
break;
}
}
else
done = 1;
{
if (!ptr_inbuf_shift)
{
ptr_inbuf_shift = ptr_inbuf;
ptr_inbuf = NULL;
inbytesleft = 0;
}
else
done = 1;
}
}
if (ptr_inbuf_shift)
ptr_inbuf = ptr_inbuf_shift;
ptr_outbuf[0] = '\0';
free (inbuf);
iconv_close (cd);
@@ -251,7 +291,7 @@ weechat_iconv (char *from_code, char *to_code, char *string)
else
outbuf = strdup (string);
#else
/* make gcc happy */
/* make C compiler happy */
(void) from_code;
(void) to_code;
outbuf = strdup (string);
@@ -279,10 +319,11 @@ weechat_iconv_to_internal (char *charset, char *string)
if (input)
{
if (utf8_is_valid (input, NULL))
if (utf8_has_8bits (input) && utf8_is_valid (input, NULL))
return input;
output = weechat_iconv ((charset && charset[0]) ?
output = weechat_iconv (0,
(charset && charset[0]) ?
charset : local_charset,
WEECHAT_INTERNAL_CHARSET,
input);
@@ -313,7 +354,8 @@ weechat_iconv_from_internal (char *charset, char *string)
if (input)
{
utf8_normalize (input, '?');
output = weechat_iconv (WEECHAT_INTERNAL_CHARSET,
output = weechat_iconv (1,
WEECHAT_INTERNAL_CHARSET,
(charset && charset[0]) ?
charset : local_charset,
input);
@@ -434,33 +476,30 @@ explode_string (char *string, char *separators, int num_items_max,
if (num_items != NULL)
*num_items = 0;
n_items = num_items_max;
if (!string || !string[0])
return NULL;
if (num_items_max == 0)
/* calculate number of items */
ptr = string;
i = 1;
while ((ptr = strpbrk (ptr, separators)))
{
/* calculate number of items */
ptr = string;
i = 1;
while ((ptr = strpbrk (ptr, separators)))
{
while (strchr (separators, ptr[0]) != NULL)
ptr++;
i++;
}
n_items = i;
while (strchr (separators, ptr[0]) != NULL)
ptr++;
i++;
}
n_items = i;
if ((num_items_max != 0) && (n_items > num_items_max))
n_items = num_items_max;
array =
(char **) malloc ((num_items_max ? n_items : n_items + 1) *
sizeof (char *));
(char **) malloc ((n_items + 1) * sizeof (char *));
ptr1 = string;
ptr2 = string;
for (i = 0; i < n_items; i++)
{
while (strchr (separators, ptr1[0]) != NULL)
@@ -469,7 +508,7 @@ explode_string (char *string, char *separators, int num_items_max,
if ((ptr2 = strchr (ptr1, '\r')) == NULL)
if ((ptr2 = strchr (ptr1, '\n')) == NULL)
ptr2 = strchr (ptr1, '\0');
if ((ptr1 == NULL) || (ptr2 == NULL))
{
array[i] = NULL;
@@ -490,18 +529,11 @@ explode_string (char *string, char *separators, int num_items_max,
}
}
}
if (num_items_max == 0)
{
array[i] = NULL;
if (num_items != NULL)
*num_items = i;
}
else
{
if (num_items != NULL)
*num_items = num_items_max;
}
array[i] = NULL;
if (num_items != NULL)
*num_items = i;
return array;
}
+32 -43
View File
@@ -405,7 +405,7 @@ weechat_parse_args (int argc, char *argv[])
}
else if ((ascii_strncasecmp (argv[i], "irc", 3) == 0))
{
if (server_init_with_url (argv[i], &server_tmp) < 0)
if (irc_server_init_with_url (argv[i], &server_tmp) < 0)
{
weechat_iconv_fprintf (stderr,
_("%s invalid syntax for IRC server ('%s'), ignored\n"),
@@ -413,19 +413,19 @@ weechat_parse_args (int argc, char *argv[])
}
else
{
if (!server_new (server_tmp.name, server_tmp.autoconnect,
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, NULL, 0,
server_tmp.autojoin, 1, NULL))
if (!irc_server_new (server_tmp.name, server_tmp.autoconnect,
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, NULL, 0,
server_tmp.autojoin, 1, NULL))
weechat_iconv_fprintf (stderr,
_("%s unable to create server ('%s'), ignored\n"),
WEECHAT_WARNING, argv[i]);
server_destroy (&server_tmp);
irc_server_destroy (&server_tmp);
server_cmd_line = 1;
}
}
@@ -445,7 +445,7 @@ weechat_parse_args (int argc, char *argv[])
*/
int
weechat_create_dir (char *directory)
weechat_create_dir (char *directory, int permissions)
{
if (mkdir (directory, 0755) < 0)
{
@@ -456,7 +456,10 @@ weechat_create_dir (char *directory)
WEECHAT_ERROR, directory);
return 0;
}
return 1;
}
if ((permissions != 0) && (strcmp (directory, getenv ("HOME")) != 0))
chmod (directory, permissions);
return 1;
}
@@ -505,7 +508,7 @@ weechat_create_home_dirs ()
}
/* create home directory; error is fatal */
if (!weechat_create_dir (weechat_home))
if (!weechat_create_dir (weechat_home, 0))
{
weechat_iconv_fprintf (stderr, _("%s unable to create \"%s\" directory\n"),
WEECHAT_ERROR, weechat_home);
@@ -525,14 +528,7 @@ weechat_create_config_dirs ()
/* create logs directory" */
dir1 = weechat_strreplace (cfg_log_path, "~", getenv ("HOME"));
dir2 = weechat_strreplace (dir1, "%h", weechat_home);
if (weechat_create_dir (dir2))
{
if (strcmp (dir2, getenv ("HOME")) != 0)
chmod (dir2, 0700);
}
else
weechat_iconv_fprintf (stderr, _("%s unable to create \"%s\" directory\n"),
WEECHAT_WARNING, dir2);
(void) weechat_create_dir (dir2, 0700);
if (dir1)
free (dir1);
if (dir2)
@@ -541,14 +537,7 @@ weechat_create_config_dirs ()
/* create DCC download directory */
dir1 = weechat_strreplace (cfg_dcc_download_path, "~", getenv ("HOME"));
dir2 = weechat_strreplace (dir1, "%h", weechat_home);
if (weechat_create_dir (dir2))
{
if (strcmp (dir2, getenv ("HOME")) != 0)
chmod (dir2, 0700);
}
else
weechat_iconv_fprintf (stderr, _("%s unable to create \"%s\" directory\n"),
WEECHAT_WARNING, dir2);
(void) weechat_create_dir (dir2, 0700);
if (dir1)
free (dir1);
if (dir2)
@@ -595,7 +584,7 @@ weechat_config_read ()
exit (EXIT_FAILURE);
break;
default: /* other error (fatal) */
server_free_all ();
irc_server_free_all ();
exit (EXIT_FAILURE);
}
}
@@ -716,25 +705,25 @@ weechat_dump (int crash)
for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
{
weechat_log_printf ("\n");
server_print_log (ptr_server);
irc_server_print_log (ptr_server);
for (ptr_channel = ptr_server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
{
weechat_log_printf ("\n");
channel_print_log (ptr_channel);
irc_channel_print_log (ptr_channel);
for (ptr_nick = ptr_channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
weechat_log_printf ("\n");
nick_print_log (ptr_nick);
irc_nick_print_log (ptr_nick);
}
}
}
dcc_print_log ();
irc_dcc_print_log ();
gui_panel_print_log ();
@@ -765,7 +754,7 @@ weechat_dump (int crash)
}
weechat_log_printf ("\n");
ignore_print_log ();
irc_ignore_print_log ();
weechat_log_printf ("\n");
weechat_log_printf ("****** End of dump ******\n");
@@ -780,8 +769,8 @@ void
weechat_sigsegv ()
{
weechat_dump (1);
dcc_end ();
server_free_all ();
irc_dcc_end ();
irc_server_free_all ();
gui_main_end ();
weechat_iconv_fprintf (stderr, "\n");
@@ -848,22 +837,22 @@ main (int argc, char *argv[])
plugin_init (auto_load_plugins); /* init plugin interface(s) */
#endif
server_auto_connect (auto_connect, /* auto-connect to servers */
server_cmd_line);
irc_server_auto_connect (auto_connect, /* auto-connect to servers */
server_cmd_line);
gui_main_loop (); /* WeeChat main loop */
#ifdef PLUGINS
plugin_end (); /* end plugin interface(s) */
#endif
server_disconnect_all (); /* disconnect from all servers */
irc_server_disconnect_all (); /* disconnect from all servers */
if (cfg_look_save_on_exit)
(void) config_write (NULL); /* save config file */
command_index_free (); /* free commands index */
dcc_end (); /* remove all DCC */
server_free_all (); /* free all servers */
irc_dcc_end (); /* remove all DCC */
irc_server_free_all (); /* free all servers */
gui_main_end (); /* shut down WeeChat GUI */
weechat_shutdown (EXIT_SUCCESS, 0); /* quit WeeChat (oh no, why?) */
return EXIT_SUCCESS; /* make gcc happy (never executed) */
return EXIT_SUCCESS; /* make C compiler happy */
}
+63 -31
View File
@@ -97,6 +97,7 @@ int cfg_look_align_size;
int cfg_look_align_size_max;
char *cfg_look_nick_completor;
char *cfg_look_nick_completion_ignore;
int cfg_look_nick_completion_smart;
int cfg_look_nick_complete_first;
int cfg_look_infobar;
char *cfg_look_infobar_timestamp;
@@ -222,6 +223,10 @@ t_config_option weechat_options_look[] =
N_("chars ignored for nick completion"),
OPTION_TYPE_STRING, 0, 0, 0,
"[]-^", NULL, NULL, &cfg_look_nick_completion_ignore, config_change_noop },
{ "look_nick_completion_smart", N_("smart completion for nicks"),
N_("smart completion for nicks (completes with last speakers first)"),
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
NULL, NULL, &cfg_look_nick_completion_smart, NULL, config_change_noop },
{ "look_nick_complete_first", N_("complete only with first nick found"),
N_("complete only with first nick found"),
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE,
@@ -317,6 +322,7 @@ int cfg_col_input_server;
int cfg_col_input_channel;
int cfg_col_input_nick;
int cfg_col_input_delimiters;
int cfg_col_input_text_not_found;
int cfg_col_input_bg;
int cfg_col_nick;
int cfg_col_nick_away;
@@ -509,6 +515,10 @@ t_config_option weechat_options_colors[] =
N_("color for input text (delimiters)"),
OPTION_TYPE_COLOR, 0, 0, 0,
"cyan", NULL, &cfg_col_input_delimiters, NULL, &config_change_color },
{ "col_input_text_not_found", N_("color for text not found"),
N_("color for text not found"),
OPTION_TYPE_COLOR, 0, 0, 0,
"red", NULL, &cfg_col_input_text_not_found, NULL, &config_change_color },
{ "col_input_bg", N_("background for input window"),
N_("background for input window"),
OPTION_TYPE_COLOR, 0, 0, 0,
@@ -1212,7 +1222,7 @@ config_change_nicks_colors ()
ptr_nick = ptr_nick->next_nick)
{
if (ptr_nick->color != COLOR_WIN_NICK_SELF)
ptr_nick->color = nick_find_color (ptr_nick);
ptr_nick->color = irc_nick_find_color (ptr_nick);
}
}
}
@@ -1229,7 +1239,7 @@ config_change_away_check ()
if (cfg_irc_away_check == 0)
{
/* reset away flag for all nicks/chans/servers */
server_remove_away ();
irc_server_remove_away ();
}
check_away = cfg_irc_away_check * 60;
}
@@ -1266,7 +1276,7 @@ config_change_notify_levels ()
{
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));
irc_channel_get_notify_level (SERVER(ptr_buffer), CHANNEL(ptr_buffer));
}
}
@@ -1678,7 +1688,7 @@ config_option_search_option_value (char *option_name, t_config_option **option,
if (pos)
{
pos[0] = '\0';
ptr_server = server_search (option_name);
ptr_server = irc_server_search (option_name);
if (ptr_server)
{
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
@@ -1753,40 +1763,40 @@ config_allocate_server (char *filename, int line_number)
|| !cfg_server.username
|| !cfg_server.realname)
{
server_free_all ();
irc_server_free_all ();
gui_printf (NULL,
_("%s %s, line %d: new server, but previous was incomplete\n"),
WEECHAT_WARNING, filename, line_number);
return 0;
}
if (server_name_already_exists (cfg_server.name))
if (irc_server_name_already_exists (cfg_server.name))
{
server_free_all ();
irc_server_free_all ();
gui_printf (NULL,
_("%s %s, line %d: server '%s' already exists\n"),
WEECHAT_WARNING, filename, line_number, cfg_server.name);
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.ipv6, cfg_server.ssl,
cfg_server.password, cfg_server.nick1, cfg_server.nick2,
cfg_server.nick3, cfg_server.username, cfg_server.realname,
cfg_server.hostname, cfg_server.command,
cfg_server.command_delay, cfg_server.autojoin,
cfg_server.autorejoin, cfg_server.notify_levels))
if (!irc_server_new (cfg_server.name,
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.hostname, cfg_server.command,
cfg_server.command_delay, cfg_server.autojoin,
cfg_server.autorejoin, cfg_server.notify_levels))
{
server_free_all ();
irc_server_free_all ();
gui_printf (NULL,
_("%s %s, line %d: unable to create server\n"),
WEECHAT_WARNING, filename, line_number);
return 0;
}
server_destroy (&cfg_server);
server_init (&cfg_server);
irc_server_destroy (&cfg_server);
irc_server_init (&cfg_server);
return 1;
}
@@ -1876,7 +1886,7 @@ config_read ()
}
config_default_values ();
server_init (&cfg_server);
irc_server_init (&cfg_server);
/* read config file */
section = CONFIG_SECTION_NONE;
@@ -2019,7 +2029,8 @@ config_read ()
{
/* create new alias */
if (alias_new (line, pos))
weelist_add (&index_commands, &last_index_command, line);
weelist_add (&index_commands, &last_index_command,
line, WEELIST_POS_SORT);
}
else if (section == CONFIG_SECTION_IGNORE)
{
@@ -2030,7 +2041,7 @@ config_read ()
WEECHAT_WARNING, filename, line_number, line);
else
{
if (!ignore_add_from_config (pos))
if (!irc_ignore_add_from_config (pos))
gui_printf (NULL,
_("%s %s, line %d: invalid ignore options \"%s\"\n"),
WEECHAT_WARNING, filename, line_number, pos);
@@ -2225,9 +2236,11 @@ config_create_default ()
{
function_name = gui_keyboard_function_search_by_ptr (ptr_key->function);
if (function_name)
weechat_iconv_fprintf (file, "%s = \"%s\"\n",
weechat_iconv_fprintf (file, "%s = \"%s%s%s\"\n",
(expanded_name) ? expanded_name : ptr_key->key,
function_name);
function_name,
(ptr_key->args) ? " " : "",
(ptr_key->args) ? ptr_key->args : "");
}
else
weechat_iconv_fprintf (file, "%s = \"%s\"\n",
@@ -2340,9 +2353,9 @@ int
config_write (char *config_name)
{
int filename_length;
char *filename;
char *filename, *filename2;
FILE *file;
int i, j;
int i, j, rc;
time_t current_time;
t_irc_server *ptr_server;
t_weechat_alias *ptr_alias;
@@ -2351,7 +2364,10 @@ config_write (char *config_name)
char *expanded_name, *function_name;
if (config_name)
{
filename_length = strlen (config_name);
filename = strdup (config_name);
}
else
{
filename_length = strlen (weechat_home) +
@@ -2363,12 +2379,21 @@ config_write (char *config_name)
snprintf (filename, filename_length, "%s%s" WEECHAT_CONFIG_NAME,
weechat_home, DIR_SEPARATOR);
}
filename2 = (char *) malloc ((filename_length + 32) * sizeof (char));
if (!filename2)
{
free (filename);
return -2;
}
snprintf (filename2, filename_length + 32, "%s.weechattmp", filename);
if ((file = fopen (filename, "w")) == NULL)
if ((file = fopen (filename2, "w")) == NULL)
{
gui_printf (NULL, _("%s cannot create file \"%s\"\n"),
WEECHAT_ERROR, filename);
WEECHAT_ERROR, filename2);
free (filename);
free (filename2);
return -1;
}
@@ -2441,9 +2466,11 @@ config_write (char *config_name)
{
function_name = gui_keyboard_function_search_by_ptr (ptr_key->function);
if (function_name)
weechat_iconv_fprintf (file, "%s = \"%s\"\n",
weechat_iconv_fprintf (file, "%s = \"%s%s%s\"\n",
(expanded_name) ? expanded_name : ptr_key->key,
function_name);
function_name,
(ptr_key->args) ? " " : "",
(ptr_key->args) ? ptr_key->args : "");
}
else
weechat_iconv_fprintf (file, "%s = \"%s\"\n",
@@ -2516,7 +2543,12 @@ config_write (char *config_name)
}
fclose (file);
chmod (filename, 0600);
chmod (filename2, 0600);
unlink (filename);
rc = rename (filename2, filename);
free (filename);
free (filename2);
if (rc != 0)
return -1;
return 0;
}
+2
View File
@@ -114,6 +114,7 @@ extern int cfg_look_align_size;
extern int cfg_look_align_size_max;
extern char *cfg_look_nick_completor;
extern char *cfg_look_nick_completion_ignore;
extern int cfg_look_nick_completion_smart;
extern int cfg_look_nick_complete_first;
extern int cfg_look_infobar;
extern char *cfg_look_infobar_timestamp;
@@ -166,6 +167,7 @@ extern int cfg_col_input_server;
extern int cfg_col_input_channel;
extern int cfg_col_input_nick;
extern int cfg_col_input_delimiters;
extern int cfg_col_input_text_not_found;
extern int cfg_col_input_bg;
extern int cfg_col_nick;
extern int cfg_col_nick_away;
+63 -7
View File
@@ -33,6 +33,26 @@
#include "util.h"
/*
* weelist_get_size: get list size (number of elements)
*/
int
weelist_get_size (t_weelist *weelist)
{
t_weelist *ptr_weelist;
int count;
count = 0;
for (ptr_weelist = weelist; ptr_weelist; ptr_weelist = ptr_weelist->next_weelist)
{
count++;
}
return count;
}
/*
* weelist_search: search date in a list
*/
@@ -74,14 +94,36 @@ weelist_find_pos (t_weelist *weelist, char *data)
*/
void
weelist_insert (t_weelist **weelist, t_weelist **last_weelist, t_weelist *element)
weelist_insert (t_weelist **weelist, t_weelist **last_weelist, t_weelist *element,
int position)
{
t_weelist *pos_weelist;
pos_weelist = weelist_find_pos (*weelist, element->data);
if (*weelist)
{
/* remove element if already in list */
pos_weelist = weelist_search (*weelist, element->data);
if (pos_weelist)
weelist_remove (weelist, last_weelist, pos_weelist);
}
if (*weelist)
{
/* search position for new element, according to pos asked */
pos_weelist = NULL;
switch (position)
{
case WEELIST_POS_SORT:
pos_weelist = weelist_find_pos (*weelist, element->data);
break;
case WEELIST_POS_BEGINNING:
pos_weelist = *weelist;
break;
case WEELIST_POS_END:
pos_weelist = NULL;
break;
}
if (pos_weelist)
{
/* insert data into the list (before position found) */
@@ -116,7 +158,8 @@ weelist_insert (t_weelist **weelist, t_weelist **last_weelist, t_weelist *elemen
*/
t_weelist *
weelist_add (t_weelist **weelist, t_weelist **last_weelist, char *data)
weelist_add (t_weelist **weelist, t_weelist **last_weelist, char *data,
int position)
{
t_weelist *new_weelist;
@@ -126,7 +169,7 @@ weelist_add (t_weelist **weelist, t_weelist **last_weelist, char *data)
if ((new_weelist = ((t_weelist *) malloc (sizeof (t_weelist)))))
{
new_weelist->data = strdup (data);
weelist_insert (weelist, last_weelist, new_weelist);
weelist_insert (weelist, last_weelist, new_weelist, position);
return new_weelist;
}
/* failed to allocate new element */
@@ -134,7 +177,7 @@ weelist_add (t_weelist **weelist, t_weelist **last_weelist, char *data)
}
/*
* weelist_remove: free an element in a list
* weelist_remove: remove an element from a list
*/
void
@@ -142,7 +185,7 @@ weelist_remove (t_weelist **weelist, t_weelist **last_weelist, t_weelist *elemen
{
t_weelist *new_weelist;
if (!element)
if (!element || !(*weelist))
return;
/* remove element from list */
@@ -166,6 +209,19 @@ weelist_remove (t_weelist **weelist, t_weelist **last_weelist, t_weelist *elemen
*weelist = new_weelist;
}
/*
* weelist_remove_all: remove all elements from a list
*/
void
weelist_remove_all (t_weelist **weelist, t_weelist **last_weelist)
{
while (*weelist)
{
weelist_remove (weelist, last_weelist, *weelist);
}
}
/*
* weelist_print_log: print weelist in log (usually for crash dump)
*/
+7 -1
View File
@@ -21,6 +21,10 @@
#ifndef __WEECHAT_LIST_H
#define __WEECHAT_LIST_H 1
#define WEELIST_POS_SORT 0
#define WEELIST_POS_BEGINNING 1
#define WEELIST_POS_END 2
typedef struct t_weelist t_weelist;
struct t_weelist
@@ -30,9 +34,11 @@ struct t_weelist
t_weelist *next_weelist;
};
extern int weelist_get_size (t_weelist *);
extern t_weelist *weelist_search (t_weelist *, char *);
extern t_weelist *weelist_add (t_weelist **, t_weelist **, char *);
extern t_weelist *weelist_add (t_weelist **, t_weelist **, char *, int);
extern void weelist_remove (t_weelist **, t_weelist **, t_weelist *);
extern void weelist_remove_all (t_weelist **, t_weelist **);
extern void weelist_print_log (t_weelist *, char *);
#endif /* weelist.h */
+25
View File
@@ -0,0 +1,25 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
SUBDIRS( curses )
SET(LIB_GUI_COMMON_SRC gui-buffer.c gui-common.c gui-action.c gui-keyboard.c
gui-log.c gui-window.c gui-panel.c gui.h gui-buffer.h gui-color.h gui-keyboard.h
gui-panel.h gui-window.h)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
ADD_LIBRARY(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
+43
View File
@@ -0,0 +1,43 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
SET(WEECHAT_CURSES_SRC gui-curses-chat.c gui-curses-color.c gui-curses-infobar.c
gui-curses-input.c gui-curses-keyboard.c gui-curses-main.c gui-curses-nicklist.c
gui-curses-status.c gui-curses-window.c gui-curses-panel.c gui-curses.h)
SET(EXECUTABLE weechat-curses)
FIND_PACKAGE(Ncurses)
IF(NCURSES_FOUND)
CHECK_INCLUDE_FILES(ncursesw/ncurses.h NCURSESW_HEADERS)
IF(NCURSESW_HEADERS)
ADD_DEFINITIONS(-DHAVE_NCURSESW_CURSES_H)
ELSE(NCURSESW_HEADERS)
CHECK_INCLUDE_FILES(ncurses.h NCURSES_HEADERS)
IF(NCURSES_HEADERS)
ADD_DEFINITIONS(-DHAVE_NCURSES_H)
ENDIF(NCURSES_HEADERS)
ENDIF(NCURSESW_HEADERS)
LIST(APPEND EXTRA_LIBS ${NCURSES_LIBRARY})
ENDIF(NCURSES_FOUND)
ADD_EXECUTABLE(${EXECUTABLE} ${WEECHAT_CURSES_SRC})
INCLUDE_DIRECTORIES(.. ../../common ../../irc ../../plugins)
TARGET_LINK_LIBRARIES(${EXECUTABLE} ${STATIC_LIBS} ${EXTRA_LIBS})
INSTALL(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
+34 -26
View File
@@ -169,7 +169,6 @@ gui_chat_draw_title (t_gui_buffer *buffer, int erase)
{
t_gui_window *ptr_win;
char format[32], *buf, *buf2, *ptr_topic;
int length, width;
if (!gui_ok)
return;
@@ -189,17 +188,15 @@ gui_chat_draw_title (t_gui_buffer *buffer, int erase)
if (CHANNEL(buffer)->topic)
{
buf = (char *)gui_color_decode ((unsigned char *)(CHANNEL(buffer)->topic), 0);
buf2 = weechat_iconv_from_internal (NULL,
(buf) ? buf : CHANNEL(buffer)->topic);
ptr_topic = (buf2) ? buf2 : CHANNEL(buffer)->topic;
length = utf8_strlen (ptr_topic);
if (ptr_win->win_title_start >= length)
ptr_topic = utf8_add_offset ((buf) ? buf : CHANNEL(buffer)->topic,
ptr_win->win_title_start);
if (!ptr_topic || !ptr_topic[0])
{
ptr_win->win_title_start = 0;
width = (ptr_win->win_title_start == 0) ?
ptr_win->win_width : ptr_win->win_width - 2;
ptr_topic += ptr_win->win_title_start;
snprintf (format, 32, "%%-%ds", width);
ptr_topic = (buf) ? buf : CHANNEL(buffer)->topic;
}
buf2 = weechat_iconv_from_internal (NULL,
ptr_topic);
if (ptr_win->win_title_start > 0)
{
@@ -208,11 +205,10 @@ gui_chat_draw_title (t_gui_buffer *buffer, int erase)
wprintw (GUI_CURSES(ptr_win)->win_title, "%s", "++");
}
if (utf8_strlen (ptr_topic) > ptr_win->win_width)
if (utf8_width_screen (ptr_topic) > ptr_win->win_width)
{
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_title, COLOR_WIN_TITLE);
wprintw (GUI_CURSES(ptr_win)->win_title,
format, ptr_topic);
wprintw (GUI_CURSES(ptr_win)->win_title, "%s", (buf2) ? buf2 : ptr_topic);
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_title,
COLOR_WIN_TITLE_MORE);
mvwprintw (GUI_CURSES(ptr_win)->win_title, 0, ptr_win->win_width - 2,
@@ -221,7 +217,7 @@ gui_chat_draw_title (t_gui_buffer *buffer, int erase)
else
{
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_title, COLOR_WIN_TITLE);
wprintw (GUI_CURSES(ptr_win)->win_title, format, ptr_topic);
wprintw (GUI_CURSES(ptr_win)->win_title, "%s", (buf2) ? buf2 : ptr_topic);
}
if (buf)
free (buf);
@@ -816,14 +812,30 @@ gui_chat_display_line (t_gui_window *window, t_gui_line *line, int count,
}
else
{
/* display read marker if needed */
if (cfg_look_read_marker && cfg_look_read_marker[0] &&
window->buffer->last_read_line &&
(window->buffer->last_read_line == line->prev_line))
if (cfg_look_read_marker && cfg_look_read_marker[0])
{
gui_chat_set_weechat_color (window, COLOR_WIN_CHAT_READ_MARKER);
mvwprintw (GUI_CURSES(window)->win_chat, read_marker_y, read_marker_x,
"%c", cfg_look_read_marker[0]);
/* display marker if line is matching user search */
if (window->buffer->text_search != TEXT_SEARCH_DISABLED)
{
if (gui_buffer_line_search (line, window->buffer->input_buffer,
window->buffer->text_search_exact))
{
gui_chat_set_weechat_color (window, COLOR_WIN_CHAT_READ_MARKER);
mvwprintw (GUI_CURSES(window)->win_chat, read_marker_y, read_marker_x,
"%c", cfg_look_read_marker[0]);
}
}
else
{
/* display read marker if needed */
if (window->buffer->last_read_line &&
(window->buffer->last_read_line == line->prev_line))
{
gui_chat_set_weechat_color (window, COLOR_WIN_CHAT_READ_MARKER);
mvwprintw (GUI_CURSES(window)->win_chat, read_marker_y, read_marker_x,
"%c", cfg_look_read_marker[0]);
}
}
}
}
@@ -1153,11 +1165,7 @@ gui_chat_draw (t_gui_buffer *buffer, int erase)
if (!ptr_line && ptr_win->scroll)
{
if (count == gui_chat_display_line (ptr_win, ptr_win->buffer->last_line, 0, 1))
{
ptr_win->scroll = 0;
ptr_win->start_line = NULL;
ptr_win->start_line_pos = 0;
}
}
if (!ptr_win->scroll && (ptr_win->start_line == ptr_win->buffer->lines))
+1
View File
@@ -535,6 +535,7 @@ gui_color_init_weechat ()
gui_color[COLOR_WIN_INPUT_CHANNEL] = gui_color_build (COLOR_WIN_INPUT_CHANNEL, cfg_col_input_channel, cfg_col_input_bg);
gui_color[COLOR_WIN_INPUT_NICK] = gui_color_build (COLOR_WIN_INPUT_NICK, cfg_col_input_nick, cfg_col_input_bg);
gui_color[COLOR_WIN_INPUT_DELIMITERS] = gui_color_build (COLOR_WIN_INPUT_DELIMITERS, cfg_col_input_delimiters, cfg_col_input_bg);
gui_color[COLOR_WIN_INPUT_TEXT_NOT_FOUND] = gui_color_build (COLOR_WIN_INPUT_TEXT_NOT_FOUND, cfg_col_input_text_not_found, cfg_col_input_bg);
gui_color[COLOR_WIN_NICK] = gui_color_build (COLOR_WIN_NICK, cfg_col_nick, cfg_col_nick_bg);
gui_color[COLOR_WIN_NICK_AWAY] = gui_color_build (COLOR_WIN_NICK_AWAY, cfg_col_nick_away, cfg_col_nick_bg);
gui_color[COLOR_WIN_NICK_CHANOWNER] = gui_color_build (COLOR_WIN_NICK_CHANOWNER, cfg_col_nick_chanowner, cfg_col_nick_bg);
+2 -2
View File
@@ -46,7 +46,7 @@ gui_infobar_draw_time (t_gui_buffer *buffer)
time_t time_seconds;
struct tm *local_time;
/* make gcc happy */
/* make C compiler happy */
(void) buffer;
if (!gui_ok)
@@ -84,7 +84,7 @@ gui_infobar_draw (t_gui_buffer *buffer, int erase)
struct tm *local_time;
char text_time[1024 + 1], *buf;
/* make gcc happy */
/* make C compiler happy */
(void) buffer;
if (!gui_ok)
+68 -26
View File
@@ -78,6 +78,14 @@ gui_input_get_prompt_length (t_gui_window *window, char *nick)
char *pos, saved_char;
int char_size, length;
if (window->buffer->text_search != TEXT_SEARCH_DISABLED)
{
if (window->buffer->text_search_exact)
return utf8_width_screen (_("Text search (exact): "));
else
return utf8_width_screen (_("Text search: "));
}
length = 0;
pos = cfg_look_input_format;
while (pos && pos[0])
@@ -88,18 +96,18 @@ gui_input_get_prompt_length (t_gui_window *window, char *nick)
pos++;
switch (pos[0])
{
case 'c':
case 'c': /* channel or server name */
if (CHANNEL(window->buffer))
length += utf8_strlen (CHANNEL(window->buffer)->name);
length += utf8_width_screen (CHANNEL(window->buffer)->name);
else
{
if (SERVER(window->buffer))
length += utf8_strlen (SERVER(window->buffer)->name);
length += utf8_width_screen (SERVER(window->buffer)->name);
}
pos++;
break;
case 'm':
if (SERVER(window->buffer))
case 'm': /* nick modes */
if (SERVER(window->buffer) && SERVER(window->buffer)->is_connected)
{
if (SERVER(window->buffer)->nick_modes
&& SERVER(window->buffer)->nick_modes[0])
@@ -107,8 +115,8 @@ gui_input_get_prompt_length (t_gui_window *window, char *nick)
}
pos++;
break;
case 'n':
length += utf8_strlen (nick);
case 'n': /* nick */
length += utf8_width_screen (nick);
pos++;
break;
default:
@@ -148,10 +156,21 @@ gui_input_get_prompt_length (t_gui_window *window, char *nick)
void
gui_input_draw_prompt (t_gui_window *window, char *nick)
{
char *pos, saved_char;
char *pos, saved_char, *buf;
int char_size;
wmove (GUI_CURSES(window)->win_input, 0, 0);
if (window->buffer->text_search != TEXT_SEARCH_DISABLED)
{
gui_window_set_weechat_color (GUI_CURSES(window)->win_input,
COLOR_WIN_INPUT);
wprintw (GUI_CURSES(window)->win_input, "%s",
(window->buffer->text_search_exact) ?
_("Text search (exact): ") : _("Text search: "));
return;
}
pos = cfg_look_input_format;
while (pos && pos[0])
{
@@ -161,13 +180,17 @@ gui_input_draw_prompt (t_gui_window *window, char *nick)
pos++;
switch (pos[0])
{
case 'c':
case 'c': /* channel or server name */
if (CHANNEL(window->buffer))
{
gui_window_set_weechat_color (GUI_CURSES(window)->win_input,
COLOR_WIN_INPUT_CHANNEL);
buf = weechat_iconv_from_internal (NULL,
CHANNEL(window->buffer)->name);
wprintw (GUI_CURSES(window)->win_input, "%s",
CHANNEL(window->buffer)->name);
(buf) ? buf : CHANNEL(window->buffer)->name);
if (buf)
free (buf);
}
else
{
@@ -175,14 +198,18 @@ gui_input_draw_prompt (t_gui_window *window, char *nick)
{
gui_window_set_weechat_color (GUI_CURSES(window)->win_input,
COLOR_WIN_INPUT_SERVER);
buf = weechat_iconv_from_internal (NULL,
SERVER(window->buffer)->name);
wprintw (GUI_CURSES(window)->win_input, "%s",
SERVER(window->buffer)->name);
(buf) ? buf : SERVER(window->buffer)->name);
if (buf)
free (buf);
}
}
pos++;
break;
case 'm':
if (SERVER(window->buffer))
case 'm': /* nick modes */
if (SERVER(window->buffer) && SERVER(window->buffer)->is_connected)
{
if (SERVER(window->buffer)->nick_modes
&& SERVER(window->buffer)->nick_modes[0])
@@ -195,10 +222,13 @@ gui_input_draw_prompt (t_gui_window *window, char *nick)
}
pos++;
break;
case 'n':
case 'n': /* nick */
gui_window_set_weechat_color (GUI_CURSES(window)->win_input,
COLOR_WIN_INPUT_NICK);
wprintw (GUI_CURSES(window)->win_input, "%s", nick);
buf = weechat_iconv_from_internal (NULL, nick);
wprintw (GUI_CURSES(window)->win_input, "%s", (buf) ? buf : nick);
if (buf)
free (buf);
pos++;
break;
default:
@@ -254,6 +284,15 @@ gui_input_draw_text (t_gui_window *window, int input_width)
count_cursor = window->buffer->input_buffer_pos -
window->buffer->input_buffer_1st_display;
offset_cursor = 0;
if (window->buffer->text_search != TEXT_SEARCH_DISABLED)
{
if (window->buffer->text_search_found)
gui_window_set_weechat_color (GUI_CURSES(window)->win_input,
COLOR_WIN_INPUT);
else
gui_window_set_weechat_color (GUI_CURSES(window)->win_input,
COLOR_WIN_INPUT_TEXT_NOT_FOUND);
}
while ((input_width > 0) && ptr_start && ptr_start[0])
{
ptr_next = utf8_next_char (ptr_start);
@@ -262,18 +301,21 @@ gui_input_draw_text (t_gui_window *window, int input_width)
saved_char = ptr_next[0];
ptr_next[0] = '\0';
size = ptr_next - ptr_start;
if (window->buffer->input_buffer_color_mask[pos_mask] != ' ')
color = window->buffer->input_buffer_color_mask[pos_mask] - '0';
else
color = -1;
if (color != last_color)
if (window->buffer->text_search == TEXT_SEARCH_DISABLED)
{
if (color == -1)
gui_window_set_weechat_color (GUI_CURSES(window)->win_input, COLOR_WIN_INPUT);
if (window->buffer->input_buffer_color_mask[pos_mask] != ' ')
color = window->buffer->input_buffer_color_mask[pos_mask] - '0';
else
gui_input_set_color (window, color);
color = -1;
if (color != last_color)
{
if (color == -1)
gui_window_set_weechat_color (GUI_CURSES(window)->win_input, COLOR_WIN_INPUT);
else
gui_input_set_color (window, color);
}
last_color = color;
}
last_color = color;
output = weechat_iconv_from_internal (NULL, ptr_start);
wprintw (GUI_CURSES(window)->win_input, "%s", (output) ? output : ptr_start);
if (output)
@@ -325,9 +367,9 @@ gui_input_draw (t_gui_buffer *buffer, int erase)
if (buffer->input_buffer_length == 0)
buffer->input_buffer[0] = '\0';
if (SERVER(buffer))
if (SERVER(buffer) && SERVER(buffer)->is_connected)
ptr_nickname = (SERVER(buffer)->nick) ?
SERVER(buffer)->nick : SERVER(buffer)->nick1;
SERVER(buffer)->nick : cfg_look_no_nickname;
else
ptr_nickname = cfg_look_no_nickname;
+32 -50
View File
@@ -33,10 +33,6 @@
#include "../../common/util.h"
#include "gui-curses.h"
#ifdef PLUGINS
#include "../../plugins/plugins.h"
#endif
/*
* gui_keyboard_default_bindings: create default key bindings
@@ -53,8 +49,8 @@ gui_keyboard_default_bindings ()
gui_keyboard_bind ( /* RC */ "ctrl-J", "return");
gui_keyboard_bind ( /* tab */ "ctrl-I", "tab");
gui_keyboard_bind ( /* s-tab */ "meta2-Z", "tab_previous");
gui_keyboard_bind ( /* basckp */ "ctrl-H", "backspace");
gui_keyboard_bind ( /* basckp */ "ctrl-?", "backspace");
gui_keyboard_bind ( /* basckpace */ "ctrl-H", "backspace");
gui_keyboard_bind ( /* basckpace */ "ctrl-?", "backspace");
gui_keyboard_bind ( /* del */ "meta2-3~", "delete");
gui_keyboard_bind ( /* ^K */ "ctrl-K", "delete_end_line");
gui_keyboard_bind ( /* ^U */ "ctrl-U", "delete_beginning_line");
@@ -109,6 +105,7 @@ gui_keyboard_default_bindings ()
gui_keyboard_bind ( /* m-r */ "meta-r", "delete_line");
gui_keyboard_bind ( /* m-s */ "meta-s", "switch_server");
gui_keyboard_bind ( /* m-u */ "meta-u", "scroll_unread");
gui_keyboard_bind ( /* ^R */ "ctrl-R", "search_text");
/* keys bound with commands */
gui_keyboard_bind ( /* m-left */ "meta-meta2-D", "/buffer -1");
@@ -149,12 +146,7 @@ void
gui_keyboard_grab_end ()
{
char *expanded_key;
char *buffer_before_key;
#ifdef PLUGINS
char *expanded_key2;
int length;
#endif
/* get expanded name (for example: ^U => ctrl-u) */
expanded_key = gui_keyboard_get_expanded_name (gui_key_buffer);
@@ -162,27 +154,9 @@ gui_keyboard_grab_end ()
{
if (gui_current_window->buffer->has_input)
{
buffer_before_key =
(gui_current_window->buffer->input_buffer) ?
strdup (gui_current_window->buffer->input_buffer) : strdup ("");
gui_insert_string_input (gui_current_window, expanded_key, -1);
gui_current_window->buffer->input_buffer_pos += utf8_strlen (expanded_key);
gui_input_draw (gui_current_window->buffer, 1);
gui_current_window->buffer->completion.position = -1;
#ifdef PLUGINS
length = strlen (expanded_key) + 1 + 1;
expanded_key2 = (char *) malloc (length);
if (expanded_key2)
{
snprintf (expanded_key2, length, "*%s", expanded_key);
(void) plugin_keyboard_handler_exec (expanded_key2,
buffer_before_key,
gui_current_window->buffer->input_buffer);
free (expanded_key2);
}
#endif
if (buffer_before_key)
free (buffer_before_key);
gui_input_draw (gui_current_window->buffer, 0);
}
free (expanded_key);
}
@@ -200,12 +174,8 @@ gui_keyboard_grab_end ()
void
gui_keyboard_read ()
{
int key, i, insert_ok;
char key_str[32], *key_utf;
char *buffer_before_key;
#ifdef PLUGINS
char key_str2[33];
#endif
int key, i, insert_ok, input_draw;
char key_str[32], *key_utf, *input_old;
i = 0;
/* do not loop too much here (for example when big paste was made),
@@ -303,6 +273,14 @@ gui_keyboard_read ()
/*gui_printf (gui_current_window->buffer, "gui_input_read: key = %s (%d)\n", key_str, key);*/
if (gui_current_window->buffer->text_search != TEXT_SEARCH_DISABLED)
input_old = (gui_current_window->buffer->input_buffer) ?
strdup (gui_current_window->buffer->input_buffer) : strdup ("");
else
input_old = NULL;
input_draw = 0;
if ((gui_keyboard_pressed (key_str) != 0) && (insert_ok))
{
if (strcmp (key_str, "^^") == 0)
@@ -311,21 +289,9 @@ gui_keyboard_read ()
switch (gui_current_window->buffer->type)
{
case BUFFER_TYPE_STANDARD:
buffer_before_key =
(gui_current_window->buffer->input_buffer) ?
strdup (gui_current_window->buffer->input_buffer) : strdup ("");
gui_insert_string_input (gui_current_window, key_str, -1);
gui_current_window->buffer->input_buffer_pos += utf8_strlen (key_str);
gui_input_draw (gui_current_window->buffer, 0);
gui_current_window->buffer->completion.position = -1;
#ifdef PLUGINS
snprintf (key_str2, sizeof (key_str2), "*%s", key_str);
(void) plugin_keyboard_handler_exec (key_str2,
buffer_before_key,
gui_current_window->buffer->input_buffer);
#endif
if (buffer_before_key)
free (buffer_before_key);
input_draw = 1;
break;
case BUFFER_TYPE_DCC:
gui_exec_action_dcc (gui_current_window, key_str);
@@ -335,6 +301,22 @@ gui_keyboard_read ()
break;
}
}
/* incremental text search in buffer */
if ((gui_current_window->buffer->text_search != TEXT_SEARCH_DISABLED)
&& ((input_old == NULL) || (gui_current_window->buffer->input_buffer == NULL)
|| (strcmp (input_old, gui_current_window->buffer->input_buffer) != 0)))
{
gui_buffer_search_restart (gui_current_window);
input_draw = 1;
}
if (input_draw)
gui_input_draw (gui_current_window->buffer, 0);
if (input_old)
free (input_old);
i++;
}
}
+9 -9
View File
@@ -139,7 +139,7 @@ gui_main_loop ()
{
if (ptr_server->is_connected)
{
server_outqueue_send (ptr_server);
irc_server_outqueue_send (ptr_server);
}
}
@@ -170,7 +170,7 @@ gui_main_loop ()
if (check_away >= (cfg_irc_away_check * 60))
{
check_away = 0;
server_check_away ();
irc_server_check_away ();
}
}
@@ -223,7 +223,7 @@ gui_main_loop ()
if ((!ptr_server->is_connected)
&& (ptr_server->reconnect_start > 0)
&& (new_time >= (ptr_server->reconnect_start + ptr_server->autoreconnect_delay)))
server_reconnect (ptr_server);
irc_server_reconnect (ptr_server);
else
{
if (ptr_server->is_connected)
@@ -232,7 +232,7 @@ gui_main_loop ()
if ((ptr_server->lag_check_time.tv_sec == 0)
&& (new_time >= ptr_server->lag_next_check))
{
server_sendf (ptr_server, "PING %s", ptr_server->address);
irc_server_sendf (ptr_server, "PING %s", ptr_server->address);
gettimeofday (&(ptr_server->lag_check_time), NULL);
}
@@ -248,7 +248,7 @@ gui_main_loop ()
gui_printf (ptr_server->buffer,
_("%s lag is high, disconnecting from server...\n"),
WEECHAT_WARNING);
server_disconnect (ptr_server, 1);
irc_server_disconnect (ptr_server, 1);
continue;
}
}
@@ -282,22 +282,22 @@ gui_main_loop ()
if (!ptr_server->is_connected && (ptr_server->child_pid > 0))
{
if (FD_ISSET (ptr_server->child_read, &read_fd))
server_child_read (ptr_server);
irc_server_child_read (ptr_server);
}
else
{
if ((ptr_server->sock >= 0) &&
(FD_ISSET (ptr_server->sock, &read_fd)))
server_recv (ptr_server);
irc_server_recv (ptr_server);
}
}
}
/* manages active DCC */
dcc_handle ();
irc_dcc_handle ();
}
if (send_irc_quit)
irc_cmd_send_quit (NULL, NULL, NULL);
irc_send_cmd_quit (NULL, NULL, NULL);
}
/*
+59 -15
View File
@@ -24,8 +24,12 @@
#include "config.h"
#endif
#include <stdlib.h>
#include "../../common/weechat.h"
#include "../gui.h"
#include "../../common/utf8.h"
#include "../../common/util.h"
#include "../../common/weeconfig.h"
#include "../../irc/irc.h"
#include "gui-curses.h"
@@ -39,8 +43,8 @@ void
gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size)
{
t_gui_window *ptr_win;
int i, j, x, y, x2, column, max_length, nicks_displayed;
char format[32], format_empty[32];
int i, j, k, x, y, x2, max_y, column, max_length, max_chars, nicks_displayed;
char format_empty[32], *buf, *ptr_buf, *ptr_next, saved_char;
t_irc_nick *ptr_nick;
if (!gui_ok || !BUFFER_HAS_NICKLIST(buffer))
@@ -50,7 +54,7 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size)
{
if ((ptr_win->buffer == buffer) && (buffer->num_displayed > 0))
{
max_length = nick_get_max_length (CHANNEL(buffer));
max_length = irc_nick_get_max_length (CHANNEL(buffer));
if (calculate_size && (gui_window_calculate_pos_size (ptr_win, 0)))
{
@@ -81,15 +85,14 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size)
if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ||
(cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM))
snprintf (format, 32, "%%.%ds", max_length);
max_chars = max_length;
else
snprintf (format, 32, "%%.%ds",
((cfg_look_nicklist_min_size > 0)
&& (max_length < cfg_look_nicklist_min_size)) ?
cfg_look_nicklist_min_size :
(((cfg_look_nicklist_max_size > 0)
&& (max_length > cfg_look_nicklist_max_size)) ?
cfg_look_nicklist_max_size : max_length));
max_chars = ((cfg_look_nicklist_min_size > 0)
&& (max_length < cfg_look_nicklist_min_size)) ?
cfg_look_nicklist_min_size :
(((cfg_look_nicklist_max_size > 0)
&& (max_length > cfg_look_nicklist_max_size)) ?
cfg_look_nicklist_max_size : max_length);
if (cfg_look_nicklist_separator && has_colors ())
{
@@ -122,6 +125,20 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size)
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_nick, COLOR_WIN_NICK);
x = 0;
y = (cfg_look_nicklist_separator && (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) ? 1 : 0;
max_y = 0;
switch (cfg_look_nicklist_position)
{
case CFG_LOOK_NICKLIST_LEFT:
case CFG_LOOK_NICKLIST_RIGHT:
max_y = 0;
break;
case CFG_LOOK_NICKLIST_TOP:
max_y = ptr_win->win_nick_height - cfg_look_nicklist_separator;
break;
case CFG_LOOK_NICKLIST_BOTTOM:
max_y = ptr_win->win_nick_height;
break;
}
column = 0;
if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ||
@@ -176,6 +193,12 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size)
mvwprintw (GUI_CURSES(ptr_win)->win_nick, y, x, "&");
x++;
}
else if (ptr_nick->flags & NICK_CHANADMIN2)
{
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_nick, COLOR_WIN_NICK_CHANADMIN);
mvwprintw (GUI_CURSES(ptr_win)->win_nick, y, x, "!");
x++;
}
else if (ptr_nick->flags & NICK_OP)
{
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_nick, COLOR_WIN_NICK_OP);
@@ -203,7 +226,30 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size)
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_nick,
((cfg_irc_away_check > 0) && (ptr_nick->flags & NICK_AWAY)) ?
COLOR_WIN_NICK_AWAY : COLOR_WIN_NICK);
mvwprintw (GUI_CURSES(ptr_win)->win_nick, y, x, format, ptr_nick->nick);
wmove (GUI_CURSES(ptr_win)->win_nick, y, x);
ptr_buf = ptr_nick->nick;
saved_char = '\0';
for (k = 0; k < max_chars; k++)
{
if (ptr_buf && ptr_buf[0])
{
ptr_next = utf8_next_char (ptr_buf);
if (ptr_next)
{
saved_char = ptr_next[0];
ptr_next[0] = '\0';
}
buf = weechat_iconv_from_internal (NULL, ptr_buf);
wprintw (GUI_CURSES(ptr_win)->win_nick, "%s", (buf) ? buf : "?");
if (buf)
free (buf);
if (ptr_next)
ptr_next[0] = saved_char;
ptr_buf = ptr_next;
}
else
wprintw (GUI_CURSES(ptr_win)->win_nick, " ");
}
ptr_nick = ptr_nick->next_nick;
@@ -214,9 +260,7 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size)
if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ||
(cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM))
{
if (y - ((cfg_look_nicklist_separator
&& (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) ? 1 : 0)
>= ptr_win->win_nick_height - 1)
if (y >= max_y)
{
column += max_length + 2;
y = (cfg_look_nicklist_separator && (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) ?
+16 -6
View File
@@ -48,7 +48,7 @@ gui_status_draw (t_gui_buffer *buffer, int erase)
int x, server_pos, server_total;
int display_name, names_count;
/* make gcc happy */
/* make C compiler happy */
(void) buffer;
if (!gui_ok)
@@ -110,16 +110,26 @@ gui_status_draw (t_gui_buffer *buffer, int erase)
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_status,
COLOR_WIN_STATUS_CHANNEL);
if (SERVER(ptr_win->buffer)->is_connected)
wprintw (GUI_CURSES(ptr_win)->win_status, "[%s] ",
SERVER(ptr_win->buffer)->name);
{
if ((ptr_win->buffer->all_servers) && (SERVER(ptr_win->buffer)->is_away))
{
wprintw (GUI_CURSES(ptr_win)->win_status, "[%s",
SERVER(ptr_win->buffer)->name);
wprintw (GUI_CURSES(ptr_win)->win_status, _("(away)"));
wprintw (GUI_CURSES(ptr_win)->win_status, "] ");
}
else
wprintw (GUI_CURSES(ptr_win)->win_status, "[%s] ",
SERVER(ptr_win->buffer)->name);
}
else
wprintw (GUI_CURSES(ptr_win)->win_status, "(%s) ",
SERVER(ptr_win->buffer)->name);
if (ptr_win->buffer->all_servers)
{
server_get_number_buffer (SERVER(ptr_win->buffer),
&server_pos,
&server_total);
irc_server_get_number_buffer (SERVER(ptr_win->buffer),
&server_pos,
&server_total);
gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_status,
COLOR_WIN_STATUS_DELIMITERS);
wprintw (GUI_CURSES(ptr_win)->win_status, "(");
+42 -9
View File
@@ -206,7 +206,7 @@ gui_window_calculate_pos_size (t_gui_window *window, int force_calculate)
/* init chat & nicklist settings */
if (cfg_look_nicklist && BUFFER_IS_CHANNEL(window->buffer))
{
max_length = nick_get_max_length (CHANNEL(window->buffer));
max_length = irc_nick_get_max_length (CHANNEL(window->buffer));
lines = 0;
@@ -224,8 +224,8 @@ gui_window_calculate_pos_size (t_gui_window *window, int force_calculate)
}
else
{
nick_count (CHANNEL(window->buffer), &num_nicks, &num_op,
&num_halfop, &num_voice, &num_normal);
irc_nick_count (CHANNEL(window->buffer), &num_nicks, &num_op,
&num_halfop, &num_voice, &num_normal);
width_used = (window->win_width - add_left - add_right)
- ((window->win_width - add_left - add_right) % (max_length + 2));
if (((max_length + 2) * num_nicks) % width_used == 0)
@@ -533,7 +533,12 @@ gui_window_page_up (t_gui_window *window)
(-1) * (window->win_chat_height - 1) :
(-1) * ((window->win_chat_height - 1) * 2));
gui_chat_draw (window->buffer, 0);
gui_status_draw (window->buffer, 0);
if (!window->scroll)
{
window->start_line = NULL;
window->start_line_pos = 0;
}
gui_status_draw (window->buffer, 1);
}
}
@@ -569,7 +574,13 @@ gui_window_page_down (t_gui_window *window)
}
gui_chat_draw (window->buffer, 0);
gui_status_draw (window->buffer, 0);
if (!window->scroll)
{
window->start_line = NULL;
window->start_line_pos = 0;
hotlist_remove_buffer (window->buffer);
}
gui_status_draw (window->buffer, 1);
}
}
@@ -591,7 +602,12 @@ gui_window_scroll_up (t_gui_window *window)
(-1) * cfg_look_scroll_amount :
(-1) * ( (window->win_chat_height - 1) + cfg_look_scroll_amount));
gui_chat_draw (window->buffer, 0);
gui_status_draw (window->buffer, 0);
if (!window->scroll)
{
window->start_line = NULL;
window->start_line_pos = 0;
}
gui_status_draw (window->buffer, 1);
}
}
@@ -628,7 +644,13 @@ gui_window_scroll_down (t_gui_window *window)
}
gui_chat_draw (window->buffer, 0);
gui_status_draw (window->buffer, 0);
if (!window->scroll)
{
window->start_line = NULL;
window->start_line_pos = 0;
hotlist_remove_buffer (window->buffer);
}
gui_status_draw (window->buffer, 1);
}
}
@@ -647,7 +669,12 @@ gui_window_scroll_top (t_gui_window *window)
window->start_line = window->buffer->lines;
window->start_line_pos = 0;
gui_chat_draw (window->buffer, 0);
gui_status_draw (window->buffer, 0);
if (!window->scroll)
{
window->start_line = NULL;
window->start_line_pos = 0;
}
gui_status_draw (window->buffer, 1);
}
}
@@ -666,7 +693,13 @@ gui_window_scroll_bottom (t_gui_window *window)
window->start_line = NULL;
window->start_line_pos = 0;
gui_chat_draw (window->buffer, 0);
gui_status_draw (window->buffer, 0);
if (!window->scroll)
{
window->start_line = NULL;
window->start_line_pos = 0;
hotlist_remove_buffer (window->buffer);
}
gui_status_draw (window->buffer, 1);
}
}
+2 -2
View File
@@ -45,7 +45,7 @@ gui_infobar_draw_time (t_gui_buffer *buffer)
time_t time_seconds;
struct tm *local_time;*/
/* make gcc happy */
/* make C compiler happy */
(void) buffer;
if (!gui_ok)
@@ -67,7 +67,7 @@ gui_infobar_draw (t_gui_buffer *buffer, int erase)
struct tm *local_time;
char text_time[1024 + 1];*/
/* make gcc happy */
/* make C compiler happy */
(void) buffer;
if (!gui_ok)
+1 -1
View File
@@ -47,7 +47,7 @@ gui_status_draw (t_gui_buffer *buffer, int erase)
int i, first_mode, x, server_pos, server_total;
int display_name, names_count;*/
/* make gcc happy */
/* make C compiler happy */
(void) buffer;
if (!gui_ok)
+425 -199
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