Introduction
************

Description
===========

WeeChat (Wee Enhanced Environment for Chat) is a free IRC client, fast and light, designed for many operating systems.

Main features are:

  - multi-servers connection

  - many GUI (Graphical User Interface): Curses, Gtk and Qt

  - small, fast and light

  - customizable and extensible with scripts

  - compliant with RFCs 1459, 2810, 2811, 2812, and 2813

  - multi-platform (Gnu/Linux, *BSD, Windows and other)

  - 100% GPL, free software

WeeChat homepage is here:

http://weechat.flashtux.org

Pre-requisites
==============

In order to install WeeChat, you need:

  * A running Gnu/Linux system (with compiler tools for source package)

  * "root" privileges (to install WeeChat)

  * According to GUI, one of the following libraries:

       - Curses: ncurses library,

       - Gtk: *** GUI not developed ***,

       - Qt: *** GUI not developed ***,

Installation
************

Binary package
==============

Binary packages are available for these distributions:

  * Debian (or any Debian compatible distribution)

     To install: dpkg -i /path/weechat_x.y.z-1_i386.deb

  * Mandrake/Redhat (or any RPM compatible distribution)

     To install: rpm -i /path/weechat-x.y.z-1.i386.rpm

  * Gentoo

     To install: see Gentoo documentation

  * *BSD (not available!)

  * Slackware (not available!)

  * Windows (not available!)

where x.y.z is the version (for example 0.0.1)

Source package
==============

All you have to do is to run in a console or a terminal:

./configure

make

Nota: to build only some interfaces, you can give parameters to ./configure, type ./configure --help for help about options.

Then get root privileges and install WeeChat:

su -

(enter root password)

make install

CVS sources
===========

Warning: CVS sources are for advanced users: it may not compile or not be stable. You're warned!

To get CVS sources, issue these commands:

cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/weechat login

cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/weechat co weechat

(when prompted for a password, just press Enter key)

Execute this script:

./autogen.sh

Then follow instructions for source package - see Source package.

Usage
*****

Run WeeChat
===========

Command line parameters
-----------------------

-h, --help
     Display help screen

-l, --license
     Display WeeChat license

-v, --version
     Display WeeChat version

Run WeeChat
-----------

Just issue this command to run WeeChat:

weechat

or weechat-gtk (for Gtk front-end)

or weechat-qt (for Qt front-end)

When you run WeeChat for the first time, a default configuration file is created, with default options.

The default configuration file is: ~/.weechat/weechat.rc

You can edit this file at your convenience to configure WeeChat, or you can set parameters with /set command in WeeChat - see WeeChat commands.

Key bindings
============

Left arrow / Right arrow
     Go to previous / next char in command line

Ctrl + left arrow / Ctrl + right arrow
     Go to previous / next word in command line

Home / End
     Go to the beginning / end of command line

Backspace / Delete
     Erase previous / next char of command line

Ctrl + Backspace
     Erase previous word of command line

Tab
     Complete command or nick (Tab again: find next completion)

Any char
     Insert char to cursor position in the command line

Enter
     Execute command or send message

Up arrow / Down arrow
     Call again last commands/messages

PageUp / PageDown
     Show window history

F6 / F7
     Switch to previous / next window

Alt + left arrow / Alt + right arrow
     Same as F6 / F7

WeeChat commands
================

NOT WRITTEN!

Extensions
**********

Perl scripts
============

Load/unload Perl scripts
------------------------

Perl scripts are loaded and unloaded with /perl command. (type /help perl within WeeChat to get help about command).

  * Perl script loading example:

     /perl load /tmp/sample.pl

  * Perl script unloading example:

     /perl unload sample

     Notice: "sample" is the first parameter of IRC::register function.

  * List all Perl script loaded:

     /perl

WeeChat / Perl API
------------------

  * IRC::register ( name, version, shutdown_function, description );

     This is first function to call in Perl script.

     All Perl scripts for WeeChat should call this function.

     Arguments:

       - name: unique name to identify script (each script must have unique name)

       - version: script's version

       - shutdown_function: Perl function called when script is unloaded (optional parameter, empty string means nothing is called at the end)

       - description: short description of script.

     Example:

     IRC::register ("sample", "1.0", "sample_end", "Sample script!");

  * IRC::print ( message );

     Print message in current window (channel or server).

     Arguments:

       - message: message to display

     Example:

     IRC::print ("message");

  * IRC::add_message_handler ( name, function );

     Attach a Perl function to an IRC message.

     Function will be called each time IRC message will be received.

     Arguments:

       - name: name of IRC message
          To know list of IRC messages, please refer to RFC 1459 and/or 2812:

          RFC 1459: ftp://ftp.rfc-editor.org/in-notes/rfc1459.txt

          RFC 2812: ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt

       - function: Perl function called when message is received

     Example:

     IRC::add_message_handler ("privmsg", my_function);

     sub my_function

     {

         ($null, $channel, $message) = split ":",@_[0],3;

         ($hostmask, $null, $channel) = split " ", $channel;

         IRC::print ("host=$hostmask, chan=$channel, msg=$message\n");

     }

  * IRC::add_command_handler ( name, function );

     Create new WeeChat command, linked with Perl function.

     Function will be called when user will launch command with /name.

     Arguments:

       - name: name of new command
          This name may be existing command, so that the command is overrided by Perl function. Be careful when overriding WeeChat commands, they'll not be available until your Perl script will be unloaded.

       - function: Perl function linked with command

     Example:

     IRC::add_command_handler ("command", my_command);

     sub my_command

     {

         IRC::print("Arguments: ".@_[0]);

         return 0;

     }

Python scripts
==============

Not developed!

Ruby scripts
============

Not developed!

Authors / Support
*****************

Authors
=======

WeeChat is developed by:

  * FlashCode <flashcode AT flashtux.org>

  * Bounga <bounga AT altern.org>

  * Xahlexx <xahlexx AT tuxfamily.org>

  * Crevetor <crevetor AT caramail.com>

Get support
===========

Before asking for support, be sure you've read documentation and FAQ provided with WeeChat.

(documentation is this document, if you don't read all lines until this sentence, you can start again!)

  * Support with IRC:

     - server: irc.freenode.net

     - channel: #weechat

  * WeeChat forum: soon!

  * Support with mailing list:

     - to subscribe/unsubscribe:
     http://mail.nongnu.org/mailman/listinfo/weechat-support.

     - to send mail to all mailing list subscribers, send your mail to
     weechat-support@nongnu.org.

     Mailing archives are available here:

     http://mail.nongnu.org/archive/html/weechat-support

  * Look for WeeChat support page for detail:

     http://weechat.flashtux.org/support.php?lang=en