mirror of
https://github.com/weechat/weechat.git
synced 2026-06-17 08:34:46 +02:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fc95f86528 | |||
| d7287a71e5 | |||
| b861403369 | |||
| d8a790e8eb | |||
| 9211a67fb4 | |||
| d0babb2896 | |||
| ad345c0bce | |||
| 3b7b459522 | |||
| a99e6f3d95 | |||
| 35d6c43f85 | |||
| db235b23fa | |||
| a4ed5069c1 | |||
| 0bd38072f2 | |||
| 81da0f41d7 | |||
| 070e1b6ec7 | |||
| 4e86ff9682 | |||
| 867b881bac |
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
WeeChat known bugs, 2004-02-07
|
||||
WeeChat known bugs, 2004-06-05
|
||||
|
||||
- ./configure does not check that Curses headers are installed
|
||||
- ./configure does not check that Gtk 2.0 libraries are installed
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2004-02-07
|
||||
ChangeLog - 2004-06-05
|
||||
|
||||
|
||||
Version 0.0.6 (2004-06-05):
|
||||
* improved channel highlight (priority to message vs join/part)
|
||||
* fixed bug when opened private win and remote user changes his nick
|
||||
* /query command added (starts private conversation)
|
||||
* IRC messages 476, 477 added
|
||||
* /mode command is now ok and channel flags are displayed in status bar
|
||||
* fixed display bug (text was blinking when scrolling)
|
||||
* CTCP Version reply is now in english only and doesn't show host (security reason)
|
||||
|
||||
Version 0.0.5 (2004-02-07):
|
||||
* /set command to modify config options when WeeChat is running
|
||||
* fixed look_nicklist config option, now enables/disables nicklist
|
||||
|
||||
@@ -1,158 +1,157 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
WeeChat FAQ, 2004-05-31
|
||||
=======================
|
||||
|
||||
WeeChat FAQ, 2004-01-01
|
||||
Intended audience:
|
||||
All WeeChat users.
|
||||
|
||||
Before reading the following:
|
||||
the following Q/A list is *not* exhaustive.
|
||||
It is also possible that you won't find any Q/A that matches your problem.
|
||||
Please read them anyway, they may provide you help in fixing your problem
|
||||
anyway.
|
||||
And even if your problem is listed below, it is possible that the answers don't
|
||||
help you anymore to solve it. Then, please contact us, we will try to help you
|
||||
finding a solution.
|
||||
|
||||
1 - Compiling
|
||||
2 - Using WeeChat
|
||||
3 - Development
|
||||
|
||||
1.1
|
||||
================================================================================
|
||||
Q: I heard about many GUI for WeeChat. How can I compile/use them?
|
||||
|
||||
A: Curses GUI is built by default.
|
||||
To build Gtk or Qt GUI you've to specify extra options to ./configure script:
|
||||
--enable-gtk to enable Gtk GUI
|
||||
--enable-qt to enable Qt QUI
|
||||
Type ./configure --help to see available options.
|
||||
WARNING: only Curses GUI is ok today. Other GUI are under development!
|
||||
|
||||
|
||||
1- Compiling
|
||||
1.2
|
||||
================================================================================
|
||||
Q: I can't compile WeeChat CVS.
|
||||
|
||||
1.1 I heard about many GUI for WeeChat. How can I compile/use them?
|
||||
1.2 I can't compile WeeChat CVS.
|
||||
|
||||
2- Using WeeChat
|
||||
|
||||
2.1 Why using WeeChat ? X-Chat and Irssi are so good...
|
||||
2.2 I've launched WeeChat, but I'm lost, what can I do?
|
||||
2.3 How can I customize key bindings?
|
||||
2.4 How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
2.5 How can I load Python scripts?
|
||||
2.6 How can I load Ruby scripts?
|
||||
|
||||
3- Development
|
||||
|
||||
3.1 How should I report bugs?
|
||||
3.2 How should I submit patches?
|
||||
3.3 How should I submit new feature request?
|
||||
3.4 Will WeeChat be ported to *BSD, QNX, MacOS X, Microsoft Windows?
|
||||
3.5 I want to help WeeChat developers. What can I do?
|
||||
3.6 Can I give money or other things to WeeChat developers?
|
||||
A: Check that you have latest version of autoconf and automake.
|
||||
WeeChat has been developed with autoconf version 2.56 and automake
|
||||
version 1.7.
|
||||
You should have at least these versions in order to compile WeeChat CVS.
|
||||
If you can't or don't want to install these versions, you can download and
|
||||
install "devel package", a package built almost every day, based on CVS.
|
||||
Note that this package may not correspond exactly to CVS base.
|
||||
|
||||
|
||||
/------------------------------------------------------------------------------\
|
||||
| 1- Compiling |
|
||||
\------------------------------------------------------------------------------/
|
||||
2.1
|
||||
================================================================================
|
||||
Q: Why using WeeChat ? X-Chat and Irssi are so good...
|
||||
|
||||
A: Because WeeChat is very light and has new features.
|
||||
Some new features:
|
||||
* many GUI (Curses, Gtk, Qt),
|
||||
* extensible with scripts (Perl, Python, Ruby),
|
||||
* developed from scratch (not based on any other IRC client)
|
||||
* multi-platform
|
||||
* 100% GPL and free
|
||||
This is the "geekest Irc client" ;)
|
||||
|
||||
|
||||
1.1 I heard about many GUI for WeeChat. How can I compile/use them?
|
||||
2.2
|
||||
================================================================================
|
||||
Q: I've launched WeeChat, but I'm lost, what can I do?
|
||||
|
||||
Curses GUI is built by default.
|
||||
To build Gtk or Qt GUI you've to specify extra options to ./configure script:
|
||||
--enable-gtk to enable gtk GUI
|
||||
--enable-qt to enable Qt QUI
|
||||
Type ./configure --help to see available options.
|
||||
WARNING: only Curses GUI is ok today. Other GUI are under development!
|
||||
A: For help you can type /help. For help about a command, type /help command.
|
||||
|
||||
|
||||
1.2 I can't compile WeeChat CVS.
|
||||
2.3
|
||||
================================================================================
|
||||
Q: How can I customize key bindings?
|
||||
|
||||
Check that you have latest version of autoconf and automake.
|
||||
WeeChat has been developed with autoconf version 2.56 and automake version 1.7.
|
||||
You should have at least these versions in order to compile WeeChat CVS.
|
||||
If you can't or don't want to install these versions, you can download and
|
||||
install "devel package", a package built almost every day, based on CVS.
|
||||
Note that this package may not correspond exactly to CVS base.
|
||||
A: Today you can't do that. This will be available in a future version.
|
||||
|
||||
|
||||
/------------------------------------------------------------------------------\
|
||||
| 2- Using WeeChat |
|
||||
\------------------------------------------------------------------------------/
|
||||
2.4
|
||||
================================================================================
|
||||
Q: How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
|
||||
A: You can use /perl command to load scripts
|
||||
(default path is ~/.weechat/perl).
|
||||
Note that scripts in ~/.weechat/perl/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat perl scripts are compatible with X-Chat, not with Irssi, sorry ;)
|
||||
|
||||
|
||||
2.1 Why using WeeChat ? X-Chat and Irssi are so good...
|
||||
2.5
|
||||
================================================================================
|
||||
Q: How can I load Python scripts?
|
||||
|
||||
Because WeeChat is very light and has new features.
|
||||
Some new features:
|
||||
* many GUI (Curses, Gtk, Qt),
|
||||
* extensible with scripts (Perl, Python, Ruby),
|
||||
* developed from scratch (not based on any other IRC client)
|
||||
* multi-platform
|
||||
* 100% GPL and free
|
||||
This is the "geekest Irc client" ;)
|
||||
A: Today Python interface is not developed, so can't load any Python script.
|
||||
|
||||
|
||||
2.2 I've launched WeeChat, but I'm lost, what can I do?
|
||||
2.6
|
||||
================================================================================
|
||||
Q: How can I load Ruby scripts?
|
||||
|
||||
For help you can type /help. For help about a command, type /help command.
|
||||
A: Today Ruby interface is not developed, so can't load any Ruby script.
|
||||
|
||||
|
||||
2.3 How can I customize key bindings?
|
||||
3.1
|
||||
================================================================================
|
||||
Q: How should I report bugs?
|
||||
|
||||
Today you can't do that. This will be available in a future version.
|
||||
A: There is 3 ways to report bugs:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #weechat
|
||||
2. you can submit your bug at this url:
|
||||
http://savannah.nongnu.org/bugs/?func=addbug&group=weechat
|
||||
3. you can mail your problem, look at support page for developer's mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
2.4 How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
3.2
|
||||
================================================================================
|
||||
Q: How should I submit patches?
|
||||
|
||||
Yes, you can use /perl command to launch scripts
|
||||
(default path is ~/.weechat/perl).
|
||||
Note that scripts in ~/.weechat/perl/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat perl scripts are compatible with X-Chat, not with Irssi, sorry ;)
|
||||
A: There is 3 ways to submit patches:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #weechat
|
||||
2. you can submit your patch at this url:
|
||||
http://savannah.nongnu.org/patch/?func=addpatch&group=weechat
|
||||
3. you can mail your patch, look at support page for developer's mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
2.5 How can I load Python scripts?
|
||||
3.3
|
||||
================================================================================
|
||||
Q: How should I submit new feature request?
|
||||
|
||||
Today Python interface is not developed, so can't load any Python script.
|
||||
A: There is 2 ways to submit your feature request:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #weechat
|
||||
2. you can mail your feature request, look at support page for developer's
|
||||
mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
2.6 How can I load Ruby scripts?
|
||||
3.4
|
||||
================================================================================
|
||||
Q: Will WeeChat be ported to *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
|
||||
Today Ruby interface is not developed, so can't load any Ruby script.
|
||||
A: Yes. Future versions will be available for these OS.
|
||||
|
||||
|
||||
/------------------------------------------------------------------------------\
|
||||
| 3- Development |
|
||||
\------------------------------------------------------------------------------/
|
||||
3.5
|
||||
================================================================================
|
||||
Q: I want to help WeeChat developers. What can I do?
|
||||
|
||||
A: There's many tasks to do (code, documentation, ...)
|
||||
Please contact us with IRC or mail, look at support page:
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.1 How should I report bugs?
|
||||
3.6
|
||||
================================================================================
|
||||
Q: Can I give money or other things to WeeChat developers?
|
||||
|
||||
There is 3 ways to report bugs:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #eci
|
||||
If no one can help you (huh?), try another way, see below.
|
||||
2. you can submit your bug at this url:
|
||||
http://savannah.nongnu.org/bugs/?func=addbug&group=weechat
|
||||
3. you can mail your problem, look at support page for developer's mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
3.2 How should I submit patches?
|
||||
|
||||
There is 3 ways to submit patches:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #eci
|
||||
If no one can help you (huh?), try another way, see below.
|
||||
2. you can submit your patch at this url:
|
||||
http://savannah.nongnu.org/patch/?func=addpatch&group=weechat
|
||||
3. you can mail your patch, look at support page for developer's mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
3.3 How should I submit new feature request?
|
||||
|
||||
There is 2 ways to submit your feature request:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #eci
|
||||
If no one can help you (huh?), try another way, see below.
|
||||
2. you can mail your feature request, look at support page for developer's
|
||||
mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
3.4 Will WeeChat be ported to *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
|
||||
Yes. Future versions will be available for these OS.
|
||||
|
||||
|
||||
3.5 I want to help WeeChat developers. What can I do?
|
||||
|
||||
There's many tasks to do (code, documentation, ...)
|
||||
Please contact us with IRC or mail, look at support page:
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.6 Can I give money or other things to WeeChat developers?
|
||||
|
||||
No.
|
||||
A: No.
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
WeeChat FAQ, 2004-05-31
|
||||
=======================
|
||||
|
||||
Public concerné :
|
||||
Tous les utilisateurs de WeeChat.
|
||||
|
||||
Avant de lire la suite ceci :
|
||||
la liste suivante de questions/réponses n'est *pas* exhaustive.
|
||||
Il est donc possible que vous ne trouviez pas de question/réponse correspondant
|
||||
à votre problème.
|
||||
Lisez les quand même SVP, elles peuvent vous aider à corriger votre problème.
|
||||
Et même si votre problème est mentionné ci-dessous, il est possible que la
|
||||
réponse ne vous aide pas à corriger le problème. Dans ce cas, contactez-nous,
|
||||
nous essaierons de vous aider Ă trouver une solution.
|
||||
|
||||
1 - Compilation
|
||||
2 - Utilisation de WeeChat
|
||||
3 - Développement
|
||||
|
||||
1.1
|
||||
================================================================================
|
||||
Q: J'ai entendu parler de plusieurs interfaces pour WeeChat.
|
||||
Comment puis-je les compiler/utiliser ?
|
||||
|
||||
R: L'interface Curses est construite par défaut.
|
||||
Pour construire l'interface Gtk ou Qt, vous devez spécifier des options
|
||||
pour le script ./configure :
|
||||
--enable-gtk pour activer l'interface Gtk
|
||||
--enable-qt pour activer l'interface Qt
|
||||
Tapez ./configure --help pour voir les options disponibles.
|
||||
ATTENTION : seule l'interface Curses est ok aujourd'hui.
|
||||
Les autres interfaces sont en développement.
|
||||
|
||||
|
||||
1.2
|
||||
================================================================================
|
||||
Q: Je ne peux pas compiler le CVS WeeChat.
|
||||
|
||||
R: Vérifiez que vous avez bien la dernière version d'autoconf et automake.
|
||||
WeeChat a été développé avec autoconf version 2.56 et automake
|
||||
version 1.7.
|
||||
Vous devez avoir au moins ces versions pour compiler le CVS WeeChat.
|
||||
Si vous n'avez pas ou ne souhaitez pas installer ces versions, vous
|
||||
pouvez télécharger et installer le paquet "devel", un paquet construit
|
||||
quasiment tous les jours, basé sur le CVS.
|
||||
Notez que ce paquet peut ne pas correspondre exactement Ă la base CVS.
|
||||
|
||||
|
||||
2.1
|
||||
================================================================================
|
||||
Q: Pourquoi utiliser WeeChat ? X-Chat et Irssi sont si bien...
|
||||
|
||||
R: Parce que WeeChat est très léger et a de nouvelles fonctionnalités.
|
||||
Quelques nouvelles fonctionnalités :
|
||||
* plusieurs interfaces (Curses, Gtk, Qt),
|
||||
* extensible par des scripts (Perl, Python, Ruby),
|
||||
* développé à partir de zéro (non basé sur un quelconque client IRC)
|
||||
* multi-platformes
|
||||
* 100% GPL et libre
|
||||
C'est le client le plus "geek" ;)
|
||||
|
||||
|
||||
2.2
|
||||
================================================================================
|
||||
Q: J'ai lancé WeeChat, mais je suis perdu, que puis-je faire ?
|
||||
|
||||
R: Pour obtenir de l'aide tapez /help. Pour de l'aide sur une commande,
|
||||
tapez /help commande.
|
||||
|
||||
|
||||
2.3
|
||||
================================================================================
|
||||
Q: Comment puis-je configurer les raccourcis clavier ?
|
||||
|
||||
R: Aujourd'hui vous ne pouvez pas le faire. Ce sera possible dans une
|
||||
version future.
|
||||
|
||||
|
||||
2.4
|
||||
================================================================================
|
||||
Q: Comment puis-je charger des scripts Perl ?
|
||||
Les scripts Perl sont-ils compatibles avec X-chat et/ou Irssi ?
|
||||
|
||||
R: La commande /perl permet de charger les scripts Perl
|
||||
(le chemin par défaut est ~/.weechat/perl).
|
||||
Notez que les scripts dans ~/.weechat/perl/autoload sont automatiquement
|
||||
chargés par WeeChat lorsqu'il démarre.
|
||||
Les scripts Perl WeeChat sont compatibles avec X-Chat, pas Irssi,
|
||||
désolé ;)
|
||||
|
||||
|
||||
2.5
|
||||
================================================================================
|
||||
Q: Comment puis-je charger les scripts Python ?
|
||||
|
||||
R: Aujourd'hui l'interface Python n'est pas déceloppée.
|
||||
Vous ne pouvez donc charger aucun script Python.
|
||||
|
||||
|
||||
2.6
|
||||
================================================================================
|
||||
Q: Comment puis-je charger des scripts Ruby ?
|
||||
|
||||
R: Aujourd'hui l'interface Ruby n'est pas développée.
|
||||
Vous ne pouvez donc charger aucun script Ruby.
|
||||
|
||||
|
||||
3.1
|
||||
================================================================================
|
||||
Q: Comment dois-je reporter les bugs ?
|
||||
|
||||
R: Il y a 3 manières de reporter les bugs :
|
||||
1. vous pouvez nous joindre sur IRC: irc.freenode.net, canal #weechat
|
||||
2. vous pouvez soumettre votre bug Ă cette adresse :
|
||||
http://savannah.nongnu.org/bugs/?func=addbug&group=weechat
|
||||
3. vous pouvez envoyer votre problem par mail, consultez la page
|
||||
support pour les mails des développeurs :
|
||||
http://weechat.flashtux.org/support.php
|
||||
(vous pouvez souscrire et envoyer Ă la liste de diffusion
|
||||
"support")
|
||||
|
||||
|
||||
3.2
|
||||
================================================================================
|
||||
Q: Comment dois-je soumettre les patches ?
|
||||
|
||||
R: Il y a 3 manières de soumettre les patches :
|
||||
1. vous pouvez nous joindre sur IRC: irc.freenode.net, canal #weechat
|
||||
2. vous pouvez soumettre votre patch Ă cette adresse :
|
||||
http://savannah.nongnu.org/patch/?func=addpatch&group=weechat
|
||||
3. vous pouvez envoyer votre patch par mail, consultez la page
|
||||
support pour les mails des développeurs :
|
||||
http://weechat.flashtux.org/support.php
|
||||
(vous pouvez souscrire et envoyer Ă la liste de diffusion
|
||||
"support")
|
||||
|
||||
|
||||
3.3
|
||||
================================================================================
|
||||
Q: Comment dois-je soumettre les demandes de nouvelles fonctionnalités ?
|
||||
|
||||
R: Il y a 2 manières :
|
||||
1. vous pouvez nous joindre sur IRC: irc.freenode.net, channel #weechat
|
||||
2. vous pouvez envoyer un mail, consultez la page support pour les
|
||||
mails des développeurs :
|
||||
http://weechat.flashtux.org/support.php
|
||||
(vous pouvez souscrire et envoyer Ă la liste de diffusion
|
||||
"support")
|
||||
|
||||
|
||||
3.4
|
||||
================================================================================
|
||||
Q: WeeChat sera-t-il porté sur *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
|
||||
R: Oui. Les futures versions seront disponibles pour ces OS.
|
||||
|
||||
|
||||
3.5
|
||||
================================================================================
|
||||
Q: Je souhaiterai aider les développeurs WeeChat. Que puis-je faire ?
|
||||
|
||||
R: Il y a plusieurs choses Ă faire (code, documentation, ...)
|
||||
Merci de prendre contact avec nous par IRC ou mail, consultez la page
|
||||
support :
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.6
|
||||
================================================================================
|
||||
Q: Puis-je donner de l'argent ou d'autres choses aux développeurs WeeChat ?
|
||||
|
||||
R: Non.
|
||||
+1
-1
@@ -17,6 +17,6 @@
|
||||
|
||||
SUBDIRS = po intl src
|
||||
|
||||
EXTRA_DIST = weechat.1 BUGS FAQ
|
||||
EXTRA_DIST = weechat.1 BUGS FAQ FAQ.fr
|
||||
|
||||
man_MANS = weechat.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
TODO - 2004-02-07
|
||||
TODO - 2004-06-05
|
||||
|
||||
Legend:
|
||||
# done
|
||||
@@ -10,38 +10,34 @@ Legend:
|
||||
? is this really necessary?
|
||||
|
||||
|
||||
v0.0.5:
|
||||
v0.0.6:
|
||||
------
|
||||
|
||||
* General:
|
||||
# debug messages can be enabled via ./configure --enbale-debug option
|
||||
- Windows version
|
||||
+ Solaris version
|
||||
|
||||
* WeeChat commands:
|
||||
# "/set" command: allow the user to set the WeeChat variables
|
||||
under WeeChat without editing the config file (colors, time
|
||||
format, etc)
|
||||
|
||||
* IRC protocol:
|
||||
# "/mode" command: change the user/channels modes
|
||||
+ "/dcc" command (for chat and sending/receiving files)
|
||||
# "/query" command: start private conversation
|
||||
|
||||
* Interface:
|
||||
+ internationalization (traduce WeeChat in many languages)
|
||||
# info bar
|
||||
# add clock
|
||||
# display current channel modes (example : #weechat(+nt))
|
||||
|
||||
* Configuration:
|
||||
+ add missing options for config file
|
||||
+ add key bindings to config file
|
||||
|
||||
- add key bindings to config file
|
||||
|
||||
|
||||
Future versions:
|
||||
---------------
|
||||
|
||||
* General:
|
||||
- Windows version
|
||||
- *BSD version
|
||||
|
||||
* IRC protocol:
|
||||
+ "/mode" command: change the user/channels modes
|
||||
- "/dcc" command (for chat and sending/receiving files)
|
||||
- complete "/list" command: add regexp search, display only channels that
|
||||
match regexp
|
||||
- "/ignore" and "/unignore" commands: hide all that is write by a given
|
||||
@@ -61,10 +57,11 @@ Future versions:
|
||||
and show us the output on the current window. An option to exec
|
||||
like -o could send the output to the server, on the current
|
||||
channel/private
|
||||
- "/last": command to look for text in previous messages
|
||||
|
||||
* Interface:
|
||||
+ Gtk GUI
|
||||
- display current channel modes (example : #weechat(+nt))
|
||||
- color for nicks (except own nick) when nick colors are disabled
|
||||
- interpret special chars in messages (color & bold for example)
|
||||
- many channel windows in one window/term (window split)
|
||||
- add lag indicator
|
||||
@@ -72,6 +69,7 @@ Future versions:
|
||||
if WeeChat is running for long time, a lot of memory is used!)
|
||||
- improve completion (for example complete command parameters when possible)
|
||||
- understand incomplete commands if unambigous (for example: /he for /help is ok)
|
||||
- tab key with empty command line should switch to next window (like F7)
|
||||
- log chats to file
|
||||
? Qt GUI
|
||||
|
||||
|
||||
+2
-2
@@ -19,10 +19,10 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(WeeChat, 0.0.5, flashcode@flashtux.org)
|
||||
AC_INIT(WeeChat, 0.0.6, flashcode@flashtux.org)
|
||||
AC_CONFIG_SRCDIR([src/common/weechat.c])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([weechat], [0.0.5])
|
||||
AM_INIT_AUTOMAKE([weechat], [0.0.6])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
|
||||
Vendored
+6
@@ -1,3 +1,9 @@
|
||||
weechat (0.0.6-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.0.6, see ChangeLog for detail.
|
||||
|
||||
-- FlashCode <flashcode@flashtux.org> Sat, 05 Jun 2004 11:30:00 +0200
|
||||
|
||||
weechat (0.0.5-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.0.5, see ChangeLog for detail.
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
This package was debianized by FlashCode <flashcode@flashtux.org> on
|
||||
Sat, 07 Feb 2004 20:30:00 +0200.
|
||||
Sat, 05 Jun 2004 11:30:00 +0200.
|
||||
|
||||
It was downloaded from http://weechat.flashtux.org/download
|
||||
|
||||
|
||||
Vendored
+1
@@ -3,6 +3,7 @@ BUGS
|
||||
ChangeLog
|
||||
COPYING
|
||||
FAQ
|
||||
FAQ.fr
|
||||
INSTALL
|
||||
NEWS
|
||||
README
|
||||
|
||||
+15
-8
@@ -8,12 +8,19 @@
|
||||
@c
|
||||
@c Copyright (c) 2004 by FlashCode <flashcode@flashtux.org>
|
||||
@c
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.2
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled "GNU
|
||||
@c Free Documentation License".
|
||||
@c This manual is free software; you can redistribute it and/or modify
|
||||
@c it under the terms of the GNU General Public License as published by
|
||||
@c the Free Software Foundation; either version 2 of the License, or
|
||||
@c (at your option) any later version.
|
||||
@c
|
||||
@c This manual is distributed in the hope that it will be useful,
|
||||
@c but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@c GNU General Public License for more details.
|
||||
@c
|
||||
@c You should have received a copy of the GNU General Public License
|
||||
@c along with this program; if not, write to the Free Software
|
||||
@c Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
@c pdf : texi2pdf weechat_doc_en.texi
|
||||
@c html: makeinfo --html --no-split --number-sections weechat_doc_en.texi
|
||||
@@ -28,7 +35,7 @@
|
||||
|
||||
@title WeeChat - User guide
|
||||
@subtitle Fast, light and extensible IRC client
|
||||
@subtitle Documentation for WeeChat v0.0.5-pre3 - January, 24 2004
|
||||
@subtitle Documentation for WeeChat v0.0.6 - June, 05 2004
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -804,7 +811,7 @@ Support with IRC:@*
|
||||
- server: @b{irc.freenode.net}@*
|
||||
- channel: @b{#weechat}@*@*
|
||||
@item
|
||||
WeeChat forum: soon!@*@*
|
||||
WeeChat forum: @uref{http://forums.flashtux.org}@*@*
|
||||
@item
|
||||
Support with mailing list:@*
|
||||
- to subscribe/unsubscribe:@*@uref{http://mail.nongnu.org/mailman/listinfo/weechat-support}.@*
|
||||
|
||||
+15
-8
@@ -8,12 +8,19 @@
|
||||
@c
|
||||
@c Copyright (c) 2004 by FlashCode <flashcode@flashtux.org>
|
||||
@c
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.2
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled "GNU
|
||||
@c Free Documentation License".
|
||||
@c This manual is free software; you can redistribute it and/or modify
|
||||
@c it under the terms of the GNU General Public License as published by
|
||||
@c the Free Software Foundation; either version 2 of the License, or
|
||||
@c (at your option) any later version.
|
||||
@c
|
||||
@c This manual is distributed in the hope that it will be useful,
|
||||
@c but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@c GNU General Public License for more details.
|
||||
@c
|
||||
@c You should have received a copy of the GNU General Public License
|
||||
@c along with this program; if not, write to the Free Software
|
||||
@c Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
@c pdf : texi2pdf weechat_doc_fr.texi
|
||||
@c html: makeinfo --html --no-split --number-sections weechat_doc_fr.texi
|
||||
@@ -28,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Guide utilisateur
|
||||
@subtitle Client IRC rapide, l@'eger et extensible
|
||||
@subtitle Documentation pour WeeChat v0.0.5-pre3 - 24 janvier 2004
|
||||
@subtitle Documentation pour WeeChat v0.0.6 - 5 juin 2004
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -804,7 +811,7 @@ Support par IRC:@*
|
||||
- serveur : @b{irc.freenode.net}@*
|
||||
- canal : @b{#weechat}@*@*
|
||||
@item
|
||||
Forum WeeChat : bient@^ot !@*@*
|
||||
Forum WeeChat : @uref{http://forums.flashtux.org}@*@*
|
||||
@item
|
||||
Support par la liste de diffusion :@*
|
||||
- pour souscrire/d@'esinscrire :@*@uref{http://mail.nongnu.org/mailman/listinfo/weechat-support}.@*
|
||||
|
||||
+15
-8
@@ -8,12 +8,19 @@
|
||||
@c
|
||||
@c Copyright (c) 2004 by FlashCode <flashcode@flashtux.org>
|
||||
@c
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.2
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled "GNU
|
||||
@c Free Documentation License".
|
||||
@c This manual is free software; you can redistribute it and/or modify
|
||||
@c it under the terms of the GNU General Public License as published by
|
||||
@c the Free Software Foundation; either version 2 of the License, or
|
||||
@c (at your option) any later version.
|
||||
@c
|
||||
@c This manual is distributed in the hope that it will be useful,
|
||||
@c but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@c GNU General Public License for more details.
|
||||
@c
|
||||
@c You should have received a copy of the GNU General Public License
|
||||
@c along with this program; if not, write to the Free Software
|
||||
@c Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
@c pdf : texi2pdf weechat_doc_pt.texi
|
||||
@c html: makeinfo --html --no-split --number-sections weechat_doc_pt.texi
|
||||
@@ -28,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Guia do Utilizador
|
||||
@subtitle Cliente de IRC rapido, leve e extencivel
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.0.5-pre2 - 21 de Janeiro de 2004
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.0.6 - 05 de Junho de 2004
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -495,7 +502,7 @@ Suporte por IRC:@*
|
||||
- servidor : @b{irc.freenode.net}@*
|
||||
- canal : @b{#weechat}@*@*
|
||||
@item
|
||||
Forum do WeeChat : mais tarde !@*@*
|
||||
Forum do WeeChat : @uref{http://forums.flashtux.org}@*@*
|
||||
@item
|
||||
Suporte por lista de correio-e :@*
|
||||
- para te inscreveres/desinscreveres :@*@uref{http://mail.nongnu.org/mailman/listinfo/weechat-support}.@*
|
||||
|
||||
+465
-418
File diff suppressed because it is too large
Load Diff
@@ -1143,6 +1143,7 @@ config_create_default ()
|
||||
fprintf (file, "M=msg\n");
|
||||
fprintf (file, "# MUB=unban *\n");
|
||||
fprintf (file, "N=names\n");
|
||||
fprintf (file, "Q=query\n");
|
||||
fprintf (file, "T=topic\n");
|
||||
fprintf (file, "# UB=unban\n");
|
||||
fprintf (file, "# UNIG=unignore\n");
|
||||
|
||||
@@ -388,7 +388,7 @@ gui_display_end_of_line (t_gui_window *window, t_gui_line *line, int count)
|
||||
{
|
||||
int lines_displayed, num_lines, offset, remainder, num_displayed;
|
||||
t_gui_message *ptr_message;
|
||||
char saved_char, format_align[32];
|
||||
char saved_char, format_align[32], format_empty[32];
|
||||
|
||||
snprintf (format_align, 32, "%%-%ds", line->length_align);
|
||||
num_lines = gui_get_line_num_splits (window, line);
|
||||
@@ -446,7 +446,11 @@ gui_display_end_of_line (t_gui_window *window, t_gui_line *line, int count)
|
||||
if (lines_displayed >= num_lines - count)
|
||||
{
|
||||
if (window->win_chat_cursor_x <= window->win_chat_width - 1)
|
||||
wclrtoeol (window->win_chat);
|
||||
{
|
||||
snprintf (format_empty, 32, "%%-%ds",
|
||||
window->win_chat_width - window->win_chat_cursor_x);
|
||||
wprintw (window->win_chat, format_empty, " ");
|
||||
}
|
||||
window->win_chat_cursor_y++;
|
||||
}
|
||||
window->win_chat_cursor_x = 0;
|
||||
@@ -468,7 +472,7 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int stop_at_end)
|
||||
{
|
||||
int offset, remainder, num_displayed;
|
||||
t_gui_message *ptr_message;
|
||||
char saved_char, format_align[32];
|
||||
char saved_char, format_align[32], format_empty[32];
|
||||
|
||||
snprintf (format_align, 32, "%%-%ds", line->length_align);
|
||||
ptr_message = line->messages;
|
||||
@@ -539,7 +543,11 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int stop_at_end)
|
||||
(window->win_chat_cursor_x > window->win_chat_width - 1)))
|
||||
{
|
||||
if (window->win_chat_cursor_x <= window->win_chat_width - 1)
|
||||
wclrtoeol (window->win_chat);
|
||||
{
|
||||
snprintf (format_empty, 32, "%%-%ds",
|
||||
window->win_chat_width - window->win_chat_cursor_x);
|
||||
wprintw (window->win_chat, format_empty, " ");
|
||||
}
|
||||
window->win_chat_cursor_y++;
|
||||
}
|
||||
window->win_chat_cursor_x = 0;
|
||||
@@ -563,11 +571,7 @@ gui_draw_window_chat (t_gui_window *window)
|
||||
return;
|
||||
|
||||
if (has_colors ())
|
||||
{
|
||||
gui_window_set_color (window->win_chat, COLOR_WIN_CHAT);
|
||||
wborder (window->win_chat, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
|
||||
wrefresh (window->win_chat);
|
||||
}
|
||||
|
||||
ptr_line = window->last_line;
|
||||
lines_used = 0;
|
||||
@@ -623,11 +627,22 @@ gui_draw_window_chat (t_gui_window *window)
|
||||
void
|
||||
gui_redraw_window_chat (t_gui_window *window)
|
||||
{
|
||||
char format_empty[32];
|
||||
int i;
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
if (window != gui_current_window)
|
||||
return;
|
||||
|
||||
gui_curses_window_clear (window->win_chat);
|
||||
if (has_colors ())
|
||||
gui_window_set_color (window->win_chat, COLOR_WIN_CHAT);
|
||||
|
||||
snprintf (format_empty, 32, "%%-%ds", window->win_chat_width);
|
||||
for (i = 0; i < window->win_chat_height; i++)
|
||||
{
|
||||
mvwprintw (window->win_chat, i, 0, format_empty, " ");
|
||||
}
|
||||
|
||||
gui_draw_window_chat (window);
|
||||
}
|
||||
|
||||
@@ -639,7 +654,7 @@ void
|
||||
gui_draw_window_nick (t_gui_window *window)
|
||||
{
|
||||
int i, x, y, column, max_length;
|
||||
char format[32];
|
||||
char format[32], format_empty[32];
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
@@ -663,7 +678,16 @@ gui_draw_window_nick (t_gui_window *window)
|
||||
window->win_nick_width,
|
||||
window->win_nick_y,
|
||||
window->win_nick_x);
|
||||
gui_draw_window_chat (window);
|
||||
gui_redraw_window_chat (window);
|
||||
|
||||
if (has_colors ())
|
||||
gui_window_set_color (window->win_nick, COLOR_WIN_NICK);
|
||||
|
||||
snprintf (format_empty, 32, "%%-%ds", window->win_nick_width);
|
||||
for (i = 0; i < window->win_nick_height; i++)
|
||||
{
|
||||
mvwprintw (window->win_nick, i, 0, format_empty, " ");
|
||||
}
|
||||
}
|
||||
snprintf (format, 32, "%%-%ds", max_length);
|
||||
|
||||
@@ -774,11 +798,22 @@ gui_draw_window_nick (t_gui_window *window)
|
||||
void
|
||||
gui_redraw_window_nick (t_gui_window *window)
|
||||
{
|
||||
char format_empty[32];
|
||||
int i;
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
if (window != gui_current_window)
|
||||
return;
|
||||
|
||||
gui_curses_window_clear (window->win_nick);
|
||||
if (has_colors ())
|
||||
gui_window_set_color (window->win_nick, COLOR_WIN_NICK);
|
||||
|
||||
snprintf (format_empty, 32, "%%-%ds", window->win_nick_width);
|
||||
for (i = 0; i < window->win_nick_height; i++)
|
||||
{
|
||||
mvwprintw (window->win_nick, i, 0, format_empty, " ");
|
||||
}
|
||||
|
||||
gui_draw_window_nick (window);
|
||||
}
|
||||
|
||||
@@ -791,6 +826,7 @@ gui_draw_window_status (t_gui_window *window)
|
||||
{
|
||||
t_gui_window *ptr_win;
|
||||
char format_more[32];
|
||||
int i, first_mode;
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
if (window != gui_current_window)
|
||||
@@ -879,7 +915,36 @@ gui_draw_window_status (t_gui_window *window)
|
||||
gui_window_set_color (window->win_status,
|
||||
COLOR_WIN_STATUS);
|
||||
}
|
||||
wprintw (window->win_status, "%s ", CHANNEL(ptr_win)->name);
|
||||
wprintw (window->win_status, "%s", CHANNEL(ptr_win)->name);
|
||||
if (gui_current_window == CHANNEL(ptr_win)->window)
|
||||
{
|
||||
/* display channel modes */
|
||||
wprintw (window->win_status, "(");
|
||||
i = 0;
|
||||
first_mode = 1;
|
||||
while (CHANNEL(ptr_win)->modes[i])
|
||||
{
|
||||
if (CHANNEL(ptr_win)->modes[i] != ' ')
|
||||
{
|
||||
if (first_mode)
|
||||
{
|
||||
wprintw (window->win_status, "+");
|
||||
first_mode = 0;
|
||||
}
|
||||
wprintw (window->win_status, "%c",
|
||||
CHANNEL(ptr_win)->modes[i]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (CHANNEL(ptr_win)->modes[CHANNEL_MODE_KEY] != ' ')
|
||||
wprintw (window->win_status, ",%s",
|
||||
CHANNEL(ptr_win)->key);
|
||||
if (CHANNEL(ptr_win)->modes[CHANNEL_MODE_LIMIT] != ' ')
|
||||
wprintw (window->win_status, ",%d",
|
||||
CHANNEL(ptr_win)->limit);
|
||||
wprintw (window->win_status, ")");
|
||||
}
|
||||
wprintw (window->win_status, " ");
|
||||
}
|
||||
if (!SERVER(ptr_win))
|
||||
{
|
||||
@@ -1288,8 +1353,8 @@ gui_move_page_up ()
|
||||
if (!gui_current_window->first_line_displayed)
|
||||
{
|
||||
gui_current_window->sub_lines += gui_current_window->win_chat_height - 1;
|
||||
gui_redraw_window_chat (gui_current_window);
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
gui_draw_window_chat (gui_current_window);
|
||||
gui_draw_window_status (gui_current_window);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1307,8 +1372,8 @@ gui_move_page_down ()
|
||||
gui_current_window->sub_lines = 0;
|
||||
if (gui_current_window->sub_lines == 0)
|
||||
gui_current_window->unread_data = 0;
|
||||
gui_redraw_window_chat (gui_current_window);
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
gui_draw_window_chat (gui_current_window);
|
||||
gui_draw_window_status (gui_current_window);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1619,8 +1684,11 @@ gui_add_message (t_gui_window *window, int type, int color, char *message)
|
||||
}
|
||||
if ((window != gui_current_window) || (window->sub_lines > 0))
|
||||
{
|
||||
window->unread_data = 1 + window->last_line->line_with_message;
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
if (window->unread_data < 1 + window->last_line->line_with_message)
|
||||
{
|
||||
window->unread_data = 1 + window->last_line->line_with_message;
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,4 +26,5 @@ lib_weechat_irc_a_SOURCES = irc.h \
|
||||
irc-server.c \
|
||||
irc-channel.c \
|
||||
irc-nick.c \
|
||||
irc-dcc.c \
|
||||
irc-display.c
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
|
||||
t_irc_channel *current_channel = NULL;
|
||||
char *channel_modes = "iklmnst";
|
||||
|
||||
|
||||
/*
|
||||
@@ -55,6 +56,10 @@ channel_new (t_irc_server *server, int channel_type, char *channel_name,
|
||||
new_channel->type = channel_type;
|
||||
new_channel->name = strdup (channel_name);
|
||||
new_channel->topic = NULL;
|
||||
memset (new_channel->modes, ' ', sizeof (new_channel->modes));
|
||||
new_channel->modes[sizeof (new_channel->modes) - 1] = '\0';
|
||||
new_channel->limit = 0;
|
||||
new_channel->key = NULL;
|
||||
new_channel->nicks = NULL;
|
||||
new_channel->last_nick = NULL;
|
||||
|
||||
|
||||
+22
-5
@@ -44,6 +44,12 @@ t_irc_command irc_commands[] =
|
||||
N_("nickname type"),
|
||||
N_("nickname: user to send ctcp to\ntype: \"action\" or \"version\""),
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_ctcp, NULL },
|
||||
{ "dcc", N_("starts DCC (file or chat)"),
|
||||
N_("action nickname [file]"),
|
||||
N_("action: 'send' (file) or 'chat'\n"
|
||||
"nickname: nickname to send file or chat\n"
|
||||
"file: filename (on local host)"),
|
||||
2, 3, 1, NULL, irc_cmd_send_dcc, NULL },
|
||||
{ "deop", N_("removes channel operator status from nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, 1, 1, irc_cmd_send_deop, NULL, NULL },
|
||||
@@ -119,15 +125,15 @@ t_irc_command irc_commands[] =
|
||||
" w: user receives wallops\n"
|
||||
" o: operator flag\n"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_mode, irc_cmd_recv_mode },
|
||||
{ "msg", N_("send message to a nick or channel"),
|
||||
N_("receiver[,receiver] text"),
|
||||
N_("receiver: nick or channel (may be mask, '*' = current channel)"
|
||||
"\ntext: text to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_msg, NULL },
|
||||
{ "motd", N_("get the \"Message Of The Day\""),
|
||||
N_("[target]"),
|
||||
N_("target: server name"),
|
||||
0, 1, 1, NULL, irc_cmd_send_motd, NULL },
|
||||
{ "msg", N_("send message to a nick or channel"),
|
||||
N_("receiver[,receiver] text"),
|
||||
N_("receiver: nick or channel (may be mask, '*' = current channel)"
|
||||
"\ntext: text to send"),
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_msg, NULL },
|
||||
{ "names", N_("list nicknames on channels"),
|
||||
N_("[channel[,channel]]"), N_("channel: channel name"),
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_names, NULL },
|
||||
@@ -158,6 +164,11 @@ t_irc_command irc_commands[] =
|
||||
{ "privmsg", N_("message received"),
|
||||
"", "",
|
||||
0, 0, 1, NULL, NULL, irc_cmd_recv_privmsg },
|
||||
{ "query", N_("send a private message to a nick"),
|
||||
N_("nickname [text]"),
|
||||
N_("nickname: nickname for private conversation"
|
||||
"\ntext: text to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_query, NULL },
|
||||
{ "quit", N_("close all connections & quit " PACKAGE_NAME),
|
||||
N_("[quit_message]"),
|
||||
N_("quit_message: quit message (displayed to other users)"),
|
||||
@@ -280,6 +291,8 @@ t_irc_command irc_commands[] =
|
||||
{ "321", N_("/list start"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_321 },
|
||||
{ "322", N_("channel (for /list)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_322 },
|
||||
{ "323", N_("/list end"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_323 },
|
||||
{ "324", N_("channel mode"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_324 },
|
||||
{ "329", "???", "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_329 },
|
||||
{ "331", N_("no topic for channel"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_331 },
|
||||
{ "332", N_("topic of channel"),
|
||||
N_("channel :topic"),
|
||||
@@ -383,6 +396,10 @@ t_irc_command irc_commands[] =
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "475", N_("cannot join channel (bad channel key)"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "476", N_("bad channel mask"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "477", N_("channel doesn't support modes"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "481", N_("you're not an IRC operator"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "482", N_("you're not channel operator"),
|
||||
|
||||
+478
-194
@@ -271,6 +271,256 @@ irc_cmd_recv_kick (t_irc_server *server, char *host, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_get_channel_modes: get channel modes
|
||||
*/
|
||||
|
||||
void irc_get_channel_modes (t_irc_channel *ptr_channel, char *channel_name,
|
||||
char *nick_host, char *modes, char *parm)
|
||||
{
|
||||
char *pos, set_flag;
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
set_flag = '+';
|
||||
while (modes && modes[0])
|
||||
{
|
||||
switch (modes[0])
|
||||
{
|
||||
case '+':
|
||||
set_flag = '+';
|
||||
break;
|
||||
case '-':
|
||||
set_flag = '-';
|
||||
break;
|
||||
case 'b':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "b", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets ban on") :
|
||||
_("removes ban on"),
|
||||
(parm) ? parm : NULL);
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "i", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets invite-only channel flag") :
|
||||
_("removes invite-only channel flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_INVITE);
|
||||
break;
|
||||
case 'k':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "k", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets channel key to") :
|
||||
_("removes channel key"),
|
||||
(set_flag == '+') ?
|
||||
((parm) ? parm : NULL) :
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_KEY);
|
||||
if (ptr_channel->key)
|
||||
free (ptr_channel->key);
|
||||
ptr_channel->key = strdup (parm);
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "l", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets the user limit to") :
|
||||
_("removes user limit"),
|
||||
(set_flag == '+') ?
|
||||
((parm) ? parm : NULL) :
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_LIMIT);
|
||||
ptr_channel->limit = atoi (parm);
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
case 'm':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "m", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets moderated channel flag") :
|
||||
_("removes moderated channel flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_MODERATED);
|
||||
break;
|
||||
case 'n':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "n", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets messages from channel only flag") :
|
||||
_("removes messages from channel only flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_NO_MSG_OUT);
|
||||
break;
|
||||
case 'o':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "o", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("gives channel operator status to") :
|
||||
_("removes channel operator status from"),
|
||||
(parm) ? parm : NULL);
|
||||
if (parm)
|
||||
{
|
||||
ptr_nick = nick_search (ptr_channel, parm);
|
||||
if (ptr_nick)
|
||||
{
|
||||
ptr_nick->is_op = (set_flag == '+') ? 1 : 0;
|
||||
nick_resort (ptr_channel, ptr_nick);
|
||||
gui_redraw_window_nick (ptr_channel->window);
|
||||
}
|
||||
}
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "p", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets private channel flag") :
|
||||
_("removes private channel flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_SECRET);
|
||||
break;
|
||||
case 's':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "s", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets secret channel flag") :
|
||||
_("removes secret channel flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_SECRET);
|
||||
break;
|
||||
case 't':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "t", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets topic protection") :
|
||||
_("removes topic protection"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_TOPIC);
|
||||
break;
|
||||
case 'v':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "v", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("gives voice to") :
|
||||
_("removes voice from"),
|
||||
(parm) ? parm : NULL);
|
||||
|
||||
if (parm)
|
||||
{
|
||||
ptr_nick = nick_search (ptr_channel, parm);
|
||||
if (ptr_nick)
|
||||
{
|
||||
ptr_nick->has_voice = (set_flag == '+') ? 1 : 0;
|
||||
nick_resort (ptr_channel, ptr_nick);
|
||||
gui_redraw_window_nick (ptr_channel->window);
|
||||
}
|
||||
}
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
}
|
||||
modes++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_recv_mode: 'mode' message received
|
||||
*/
|
||||
@@ -278,10 +528,8 @@ irc_cmd_recv_kick (t_irc_server *server, char *host, char *arguments)
|
||||
int
|
||||
irc_cmd_recv_mode (t_irc_server *server, char *host, char *arguments)
|
||||
{
|
||||
char *pos, *pos2, *pos_parm;
|
||||
char set_flag;
|
||||
char *pos, *pos_parm;
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
/* no host => we can't identify sender of message! */
|
||||
if (host == NULL)
|
||||
@@ -317,127 +565,15 @@ irc_cmd_recv_mode (t_irc_server *server, char *host, char *arguments)
|
||||
pos_parm++;
|
||||
while (pos_parm[0] == ' ')
|
||||
pos_parm++;
|
||||
pos2 = strchr (pos_parm, ' ');
|
||||
if (pos2)
|
||||
pos2[0] = '\0';
|
||||
}
|
||||
|
||||
set_flag = '+';
|
||||
|
||||
if (string_is_channel (arguments))
|
||||
{
|
||||
ptr_channel = channel_search (server, arguments);
|
||||
if (ptr_channel)
|
||||
{
|
||||
/* channel modes */
|
||||
while (pos && pos[0])
|
||||
{
|
||||
switch (pos[0])
|
||||
{
|
||||
case '+':
|
||||
set_flag = '+';
|
||||
break;
|
||||
case '-':
|
||||
set_flag = '-';
|
||||
break;
|
||||
case 'b':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "b", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets ban on") :
|
||||
_("removes ban on"),
|
||||
pos_parm);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'i':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "i", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets invite-only channel flag") :
|
||||
_("removes invite-only channel flag"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'l':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "l", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets the user limit to") :
|
||||
_("removes user limit"),
|
||||
(set_flag == '+') ? pos_parm : NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'm':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "m", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets moderated channel flag") :
|
||||
_("removes moderated channel flag"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'o':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "o", host,
|
||||
(set_flag == '+') ?
|
||||
_("gives channel operator status to") :
|
||||
_("removes channel operator status from"),
|
||||
pos_parm);
|
||||
ptr_nick = nick_search (ptr_channel, pos_parm);
|
||||
if (ptr_nick)
|
||||
{
|
||||
ptr_nick->is_op = (set_flag == '+') ? 1 : 0;
|
||||
nick_resort (ptr_channel, ptr_nick);
|
||||
gui_redraw_window_nick (ptr_channel->window);
|
||||
}
|
||||
break;
|
||||
/* TODO: remove this obsolete (?) channel flag? */
|
||||
case 'p':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "p", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets private channel flag") :
|
||||
_("removes private channel flag"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 's':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "s", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets secret channel flag") :
|
||||
_("removes secret channel flag"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 't':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "t", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets topic protection") :
|
||||
_("removes topic protection"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'v':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "v", host,
|
||||
(set_flag == '+') ?
|
||||
_("gives voice to") :
|
||||
_("removes voice from"),
|
||||
pos_parm);
|
||||
|
||||
ptr_nick = nick_search (ptr_channel, pos_parm);
|
||||
if (ptr_nick)
|
||||
{
|
||||
ptr_nick->has_voice = (set_flag == '+') ? 1 : 0;
|
||||
nick_resort (ptr_channel, ptr_nick);
|
||||
gui_redraw_window_nick (ptr_channel->window);
|
||||
}
|
||||
break;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
irc_get_channel_modes (ptr_channel, arguments, host, pos, pos_parm);
|
||||
gui_draw_window_status (gui_current_window);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -466,6 +602,7 @@ irc_cmd_recv_nick (t_irc_server *server, char *host, char *arguments)
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
int nick_is_me;
|
||||
t_gui_window *ptr_window;
|
||||
|
||||
/* no host => we can't identify sender of message! */
|
||||
if (host == NULL)
|
||||
@@ -487,6 +624,22 @@ irc_cmd_recv_nick (t_irc_server *server, char *host, char *arguments)
|
||||
ptr_nick = nick_search (ptr_channel, host);
|
||||
if (ptr_nick)
|
||||
{
|
||||
/* change nickname in any opened private window */
|
||||
for (ptr_window = gui_windows; ptr_window;
|
||||
ptr_window = ptr_window->next_window)
|
||||
{
|
||||
if ((SERVER(ptr_window) == server) && WIN_IS_PRIVATE(ptr_window))
|
||||
{
|
||||
if ((CHANNEL(ptr_window)->name)
|
||||
&& (strcmp (ptr_nick->nick, CHANNEL(ptr_window)->name) == 0))
|
||||
{
|
||||
free (CHANNEL(ptr_window)->name);
|
||||
CHANNEL(ptr_window)->name = strdup (arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* change nickname on channel */
|
||||
nick_is_me = (strcmp (ptr_nick->nick, server->nick) == 0) ? 1 : 0;
|
||||
nick_change (ptr_channel, ptr_nick, arguments);
|
||||
irc_display_prefix (ptr_channel->window, PREFIX_INFO);
|
||||
@@ -519,6 +672,7 @@ irc_cmd_recv_nick (t_irc_server *server, char *host, char *arguments)
|
||||
free (server->nick);
|
||||
server->nick = strdup (arguments);
|
||||
}
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
gui_redraw_window_input (gui_current_window);
|
||||
|
||||
return 0;
|
||||
@@ -741,6 +895,7 @@ int
|
||||
irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
{
|
||||
char *pos, *pos2, *host2;
|
||||
char *pos_file, *pos_addr, *pos_port, *pos_size; /* for DCC */
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
struct utsname *buf;
|
||||
@@ -870,18 +1025,18 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
if (buf && (uname (buf) == 0))
|
||||
{
|
||||
server_sendf (server,
|
||||
_("NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s, host \"%s\" is running "
|
||||
"%s %s / %s%s"),
|
||||
"NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s, running "
|
||||
"%s %s / %s%s",
|
||||
host, "\01", PACKAGE_NAME, PACKAGE_VERSION, __DATE__,
|
||||
&buf->nodename, &buf->sysname,
|
||||
&buf->sysname,
|
||||
&buf->release, &buf->machine, "\01\r\n");
|
||||
free (buf);
|
||||
}
|
||||
else
|
||||
server_sendf (server,
|
||||
_("NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s%s"),
|
||||
"NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s%s",
|
||||
host, "\01", PACKAGE_NAME, PACKAGE_VERSION, __DATE__,
|
||||
"\01\r\n");
|
||||
irc_display_prefix (server->window, PREFIX_INFO);
|
||||
@@ -893,79 +1048,144 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
COLOR_WIN_CHAT, _("from"));
|
||||
gui_printf_color (server->window,
|
||||
COLOR_WIN_CHAT_NICK, " %s\n", host);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ping request from another user => answer */
|
||||
if (strncmp (pos, "\01PING", 5) == 0)
|
||||
{
|
||||
pos += 5;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
pos2 = strchr (pos, '\01');
|
||||
if (pos2)
|
||||
pos2[0] = '\0';
|
||||
else
|
||||
pos = NULL;
|
||||
if (pos && !pos[0])
|
||||
pos = NULL;
|
||||
if (pos)
|
||||
server_sendf (server, "NOTICE %s :\01PING %s\01\r\n",
|
||||
host, pos);
|
||||
else
|
||||
server_sendf (server, "NOTICE %s :\01PING\01\r\n",
|
||||
host);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* incoming DCC file */
|
||||
if (strncmp (pos, "\01DCC SEND", 9) == 0)
|
||||
{
|
||||
pos2 = strchr (pos, '\01');
|
||||
if (!pos2)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot parse \"%s\" command\n"),
|
||||
WEECHAT_ERROR, "privmsg");
|
||||
return -1;
|
||||
}
|
||||
pos2[0] = '\0';
|
||||
pos_file = pos + 9;
|
||||
while (pos_file[0] == ' ')
|
||||
pos_file++;
|
||||
|
||||
/* look for file size */
|
||||
pos_size = strrchr (pos_file, ' ');
|
||||
if (!pos_size)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot parse \"%s\" command\n"),
|
||||
WEECHAT_ERROR, "privmsg");
|
||||
return -1;
|
||||
}
|
||||
pos2 = pos_size;
|
||||
pos_size++;
|
||||
while (pos2[0] == ' ')
|
||||
pos2--;
|
||||
pos2[1] = '\0';
|
||||
|
||||
/* look for DCC port */
|
||||
pos_port = strrchr (pos_file, ' ');
|
||||
if (!pos_port)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot parse \"%s\" command\n"),
|
||||
WEECHAT_ERROR, "privmsg");
|
||||
return -1;
|
||||
}
|
||||
pos2 = pos_port;
|
||||
pos_port++;
|
||||
while (pos2[0] == ' ')
|
||||
pos2--;
|
||||
pos2[1] = '\0';
|
||||
|
||||
/* look for DCC address (IP) */
|
||||
pos_addr = strrchr (pos_file, ' ');
|
||||
if (!pos_addr)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot parse \"%s\" command\n"),
|
||||
WEECHAT_ERROR, "privmsg");
|
||||
return -1;
|
||||
}
|
||||
pos2 = pos_addr;
|
||||
pos_addr++;
|
||||
while (pos2[0] == ' ')
|
||||
pos2--;
|
||||
pos2[1] = '\0';
|
||||
|
||||
wee_log_printf ("Incoming DCC file (NOT DEVELOPED!): "
|
||||
"\"%s\", address=\"%s\", port=\"%s\", size=\"%s\"\n",
|
||||
pos_file, pos_addr, pos_port, pos_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* private message received => display it */
|
||||
ptr_channel = channel_search (server, host);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
ptr_channel = channel_new (server, CHAT_PRIVATE, host, 0);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot create new private window \"%s\"\n"),
|
||||
WEECHAT_ERROR, host);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (!ptr_channel->topic)
|
||||
{
|
||||
ptr_channel->topic = strdup (host2);
|
||||
gui_redraw_window_title (ptr_channel->window);
|
||||
}
|
||||
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "<");
|
||||
if (strstr (pos, server->nick))
|
||||
{
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
"%s", host);
|
||||
if ( (cfg_look_infobar_delay_highlight > 0)
|
||||
&& (ptr_channel->window != gui_current_window) )
|
||||
gui_infobar_printf (cfg_look_infobar_delay_highlight,
|
||||
COLOR_WIN_INFOBAR_HIGHLIGHT,
|
||||
_("Private %s> %s"),
|
||||
host, pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* ping request from another user => answer */
|
||||
if (strncmp (pos, "\01PING", 5) == 0)
|
||||
{
|
||||
pos += 5;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
pos2 = strchr (pos, '\01');
|
||||
if (pos2)
|
||||
pos2[0] = '\0';
|
||||
else
|
||||
pos = NULL;
|
||||
if (pos && !pos[0])
|
||||
pos = NULL;
|
||||
if (pos)
|
||||
server_sendf (server, "NOTICE %s :\01PING %s\01\r\n",
|
||||
host, pos);
|
||||
else
|
||||
server_sendf (server, "NOTICE %s :\01PING\01\r\n",
|
||||
host);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* private message received => display it */
|
||||
ptr_channel = channel_search (server, host);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
ptr_channel = channel_new (server, CHAT_PRIVATE, host, 0);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot create new private window \"%s\"\n"),
|
||||
WEECHAT_ERROR, host);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (!ptr_channel->topic)
|
||||
{
|
||||
ptr_channel->topic = strdup (host2);
|
||||
gui_redraw_window_title (ptr_channel->window);
|
||||
}
|
||||
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "<");
|
||||
if (strstr (pos, server->nick))
|
||||
{
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
"%s", host);
|
||||
if ( (cfg_look_infobar_delay_highlight > 0)
|
||||
&& (ptr_channel->window != gui_current_window) )
|
||||
gui_infobar_printf (cfg_look_infobar_delay_highlight,
|
||||
COLOR_WIN_INFOBAR_HIGHLIGHT,
|
||||
_("Private %s> %s"),
|
||||
host, pos);
|
||||
}
|
||||
else
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_PRIVATE,
|
||||
"%s", host);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "> ");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_MSG,
|
||||
COLOR_WIN_CHAT, "%s\n", pos);
|
||||
}
|
||||
}
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_PRIVATE,
|
||||
"%s", host);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "> ");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_MSG,
|
||||
COLOR_WIN_CHAT, "%s\n", pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2006,6 +2226,69 @@ irc_cmd_recv_323 (t_irc_server *server, char *host, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_recv_324: '324' command (channel mode)
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_recv_324 (t_irc_server *server, char *host, char *arguments)
|
||||
{
|
||||
char *pos_chan, *pos, *pos_parm;
|
||||
t_irc_channel *ptr_channel;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) host;
|
||||
|
||||
pos_chan = strchr (arguments, ' ');
|
||||
if (pos_chan)
|
||||
{
|
||||
pos_chan[0] = '\0';
|
||||
pos_chan++;
|
||||
while (pos_chan[0] == ' ')
|
||||
pos_chan++;
|
||||
|
||||
pos = strchr (pos_chan, ' ');
|
||||
if (pos)
|
||||
{
|
||||
pos[0] = '\0';
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
|
||||
pos_parm = strchr (pos, ' ');
|
||||
if (pos_parm)
|
||||
{
|
||||
pos_parm[0] = '\0';
|
||||
pos_parm++;
|
||||
while (pos_parm[0] == ' ')
|
||||
pos_parm++;
|
||||
}
|
||||
ptr_channel = channel_search (server, pos_chan);
|
||||
if (ptr_channel)
|
||||
{
|
||||
irc_get_channel_modes (ptr_channel, NULL, NULL, pos, pos_parm);
|
||||
gui_draw_window_status (gui_current_window);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_recv_329: '329' command (???)
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_recv_329 (t_irc_server *server, char *host, char *arguments)
|
||||
{
|
||||
/* make gcc happy */
|
||||
(void) server;
|
||||
(void) host;
|
||||
(void) arguments;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_recv_331: '331' command received (no topic for channel)
|
||||
*/
|
||||
@@ -2515,6 +2798,7 @@ irc_cmd_recv_366 (t_irc_server *server, char *host, char *arguments)
|
||||
_("normal"));
|
||||
gui_printf_color (ptr_channel->window,
|
||||
COLOR_WIN_CHAT_DARK, ")\n");
|
||||
irc_cmd_send_mode (server, ptr_channel->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+84
-15
@@ -101,7 +101,7 @@ irc_cmd_send_away (t_irc_server *server, char *arguments)
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (server->is_connected)
|
||||
if (ptr_server->is_connected)
|
||||
{
|
||||
if (pos)
|
||||
server_sendf (ptr_server, "AWAY :%s\r\n", pos);
|
||||
@@ -178,6 +178,17 @@ irc_cmd_send_ctcp (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_dcc: starts DCC (file or chat)
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_dcc (t_irc_server *server, char *arguments)
|
||||
{
|
||||
/* TODO: write this command! */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_deop: remove operator privileges from nickname(s)
|
||||
*/
|
||||
@@ -405,6 +416,20 @@ irc_cmd_send_mode (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_motd: get the "Message Of The Day"
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_motd (t_irc_server *server, char *arguments)
|
||||
{
|
||||
if (arguments)
|
||||
server_sendf (server, "MOTD %s\r\n", arguments);
|
||||
else
|
||||
server_sendf (server, "MOTD\r\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_msg: send a message to a nick or channel
|
||||
*/
|
||||
@@ -526,20 +551,6 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_motd: get the "Message Of The Day"
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_motd (t_irc_server *server, char *arguments)
|
||||
{
|
||||
if (arguments)
|
||||
server_sendf (server, "MOTD %s\r\n", arguments);
|
||||
else
|
||||
server_sendf (server, "MOTD\r\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_names: list nicknames on channels
|
||||
*/
|
||||
@@ -714,6 +725,64 @@ irc_cmd_send_pong (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_query: start private conversation with a nick
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_query (t_irc_server *server, char *arguments)
|
||||
{
|
||||
char *pos;
|
||||
t_irc_channel *ptr_channel;
|
||||
|
||||
pos = strchr (arguments, ' ');
|
||||
if (pos)
|
||||
{
|
||||
pos[0] = '\0';
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
if (!pos[0])
|
||||
pos = NULL;
|
||||
}
|
||||
|
||||
/* create private window if not already opened */
|
||||
ptr_channel = channel_search (server, arguments);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
ptr_channel = channel_new (server, CHAT_PRIVATE, arguments, 1);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot create new private window \"%s\"\n"),
|
||||
WEECHAT_ERROR,
|
||||
arguments);
|
||||
return -1;
|
||||
}
|
||||
gui_redraw_window_title (ptr_channel->window);
|
||||
}
|
||||
|
||||
/* display text if given */
|
||||
if (pos)
|
||||
{
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "<");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_SELF,
|
||||
"%s", server->nick);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "> ");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_MSG,
|
||||
COLOR_WIN_CHAT, "%s\n", pos);
|
||||
server_sendf (server, "PRIVMSG %s :%s\r\n", arguments, pos);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_quit: disconnect from all servers and quit WeeChat
|
||||
*/
|
||||
|
||||
+27
-1
@@ -34,6 +34,20 @@
|
||||
|
||||
#define CHANNEL_PREFIX "#&+!"
|
||||
|
||||
#define NUM_CHANNEL_MODES 7
|
||||
#define CHANNEL_MODE_INVITE 0
|
||||
#define CHANNEL_MODE_KEY 1
|
||||
#define CHANNEL_MODE_LIMIT 2
|
||||
#define CHANNEL_MODE_MODERATED 3
|
||||
#define CHANNEL_MODE_NO_MSG_OUT 4
|
||||
#define CHANNEL_MODE_SECRET 5
|
||||
#define CHANNEL_MODE_TOPIC 6
|
||||
#define SET_CHANNEL_MODE(channel, set, mode) \
|
||||
if (set) \
|
||||
channel->modes[mode] = channel_modes[mode]; \
|
||||
else \
|
||||
channel->modes[mode] = ' ';
|
||||
|
||||
#define DEFAULT_IRC_PORT 6667
|
||||
|
||||
/* nick types */
|
||||
@@ -64,6 +78,9 @@ struct t_irc_channel
|
||||
int type; /* channel type */
|
||||
char *name; /* name of channel (exemple: "#abc") */
|
||||
char *topic; /* topic of channel (host for private) */
|
||||
char modes[NUM_CHANNEL_MODES+1];/* channel modes */
|
||||
int limit; /* user limit (0 is limit not set) */
|
||||
char *key; /* channel key (NULL if no key is set) */
|
||||
t_irc_nick *nicks; /* nicks on the channel */
|
||||
t_irc_nick *last_nick; /* last nick on the channel */
|
||||
t_gui_window *window; /* GUI window allocated for channel */
|
||||
@@ -139,6 +156,7 @@ extern t_irc_command irc_commands[];
|
||||
extern t_irc_server *irc_servers, *current_irc_server;
|
||||
extern t_irc_message *recv_msgq, *msgq_last_msg;
|
||||
extern t_irc_channel *current_channel;
|
||||
extern char *channel_modes;
|
||||
|
||||
/* server functions (irc-server.c) */
|
||||
|
||||
@@ -180,6 +198,10 @@ extern t_irc_nick *nick_search (t_irc_channel *, char *);
|
||||
extern void nick_count (t_irc_channel *, int *, int *, int *, int *, int *);
|
||||
extern int nick_get_max_length (t_irc_channel *);
|
||||
|
||||
/* DCC functions (irc-dcc.c) */
|
||||
|
||||
extern void dcc_send ();
|
||||
|
||||
/* IRC display (irc-diplay.c) */
|
||||
|
||||
extern void irc_display_prefix (/*@null@*/ t_gui_window *, char *);
|
||||
@@ -195,6 +217,7 @@ extern void irc_login (t_irc_server *);
|
||||
extern int irc_cmd_send_admin (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_away (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_ctcp (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_dcc (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_deop (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_devoice (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_die (t_irc_server *, char *);
|
||||
@@ -209,8 +232,8 @@ extern int irc_cmd_send_list (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_lusers (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_me (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_mode (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_msg (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_motd (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_msg (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_names (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_nick (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_notice (t_irc_server *, char *);
|
||||
@@ -219,6 +242,7 @@ extern int irc_cmd_send_oper (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_part (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_ping (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_pong (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_query (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_quit (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_quote (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_rehash (t_irc_server *, char *);
|
||||
@@ -272,6 +296,8 @@ extern int irc_cmd_recv_320 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_321 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_322 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_323 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_324 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_329 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_331 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_332 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_333 (t_irc_server *, char *, char *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH WEECHAT 1 "February 2004" "FlashCode"
|
||||
.TH WEECHAT 1 "June 2004" "FlashCode"
|
||||
|
||||
.SH NAME
|
||||
weechat \- Wee Enhanced Environment for Chat
|
||||
|
||||
+5
-2
@@ -1,5 +1,5 @@
|
||||
%define name weechat
|
||||
%define version 0.0.5
|
||||
%define version 0.0.6
|
||||
%define release 1
|
||||
|
||||
Name: %{name}
|
||||
@@ -10,6 +10,7 @@ Source: http://weechat.flashtux.org/download/%{name}-%{version}.tar.gz
|
||||
URL: http://weechat.flashtux.org
|
||||
Group: Networking/IRC
|
||||
BuildRoot: %{_tmppath}/%{name}-buildroot
|
||||
Requires: perl
|
||||
License: GPL
|
||||
|
||||
%description
|
||||
@@ -35,11 +36,13 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,0755)
|
||||
%doc AUTHORS BUGS ChangeLog COPYING FAQ INSTALL NEWS README TODO
|
||||
%doc AUTHORS BUGS ChangeLog COPYING FAQ FAQ.fr INSTALL NEWS README TODO
|
||||
/usr/local/man/man1/weechat.1*
|
||||
/usr/local/bin/weechat-curses
|
||||
|
||||
%changelog
|
||||
* Sat Jun 05 2004 FlashCode <flashcode@flashtux.org> 0.0.6-1
|
||||
- Released version 0.0.6
|
||||
* Thu Feb 02 2004 FlashCode <flashcode@flashtux.org> 0.0.5-1
|
||||
- Released version 0.0.5
|
||||
* Thu Jan 01 2004 FlashCode <flashcode@flashtux.org> 0.0.4-1
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
WeeChat known bugs, 2004-02-07
|
||||
WeeChat known bugs, 2004-06-05
|
||||
|
||||
- ./configure does not check that Curses headers are installed
|
||||
- ./configure does not check that Gtk 2.0 libraries are installed
|
||||
|
||||
+10
-1
@@ -1,9 +1,18 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2004-02-07
|
||||
ChangeLog - 2004-06-05
|
||||
|
||||
|
||||
Version 0.0.6 (2004-06-05):
|
||||
* improved channel highlight (priority to message vs join/part)
|
||||
* fixed bug when opened private win and remote user changes his nick
|
||||
* /query command added (starts private conversation)
|
||||
* IRC messages 476, 477 added
|
||||
* /mode command is now ok and channel flags are displayed in status bar
|
||||
* fixed display bug (text was blinking when scrolling)
|
||||
* CTCP Version reply is now in english only and doesn't show host (security reason)
|
||||
|
||||
Version 0.0.5 (2004-02-07):
|
||||
* /set command to modify config options when WeeChat is running
|
||||
* fixed look_nicklist config option, now enables/disables nicklist
|
||||
|
||||
+120
-121
@@ -1,158 +1,157 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
WeeChat FAQ, 2004-05-31
|
||||
=======================
|
||||
|
||||
WeeChat FAQ, 2004-01-01
|
||||
Intended audience:
|
||||
All WeeChat users.
|
||||
|
||||
Before reading the following:
|
||||
the following Q/A list is *not* exhaustive.
|
||||
It is also possible that you won't find any Q/A that matches your problem.
|
||||
Please read them anyway, they may provide you help in fixing your problem
|
||||
anyway.
|
||||
And even if your problem is listed below, it is possible that the answers don't
|
||||
help you anymore to solve it. Then, please contact us, we will try to help you
|
||||
finding a solution.
|
||||
|
||||
1 - Compiling
|
||||
2 - Using WeeChat
|
||||
3 - Development
|
||||
|
||||
1.1
|
||||
================================================================================
|
||||
Q: I heard about many GUI for WeeChat. How can I compile/use them?
|
||||
|
||||
A: Curses GUI is built by default.
|
||||
To build Gtk or Qt GUI you've to specify extra options to ./configure script:
|
||||
--enable-gtk to enable Gtk GUI
|
||||
--enable-qt to enable Qt QUI
|
||||
Type ./configure --help to see available options.
|
||||
WARNING: only Curses GUI is ok today. Other GUI are under development!
|
||||
|
||||
|
||||
1- Compiling
|
||||
1.2
|
||||
================================================================================
|
||||
Q: I can't compile WeeChat CVS.
|
||||
|
||||
1.1 I heard about many GUI for WeeChat. How can I compile/use them?
|
||||
1.2 I can't compile WeeChat CVS.
|
||||
|
||||
2- Using WeeChat
|
||||
|
||||
2.1 Why using WeeChat ? X-Chat and Irssi are so good...
|
||||
2.2 I've launched WeeChat, but I'm lost, what can I do?
|
||||
2.3 How can I customize key bindings?
|
||||
2.4 How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
2.5 How can I load Python scripts?
|
||||
2.6 How can I load Ruby scripts?
|
||||
|
||||
3- Development
|
||||
|
||||
3.1 How should I report bugs?
|
||||
3.2 How should I submit patches?
|
||||
3.3 How should I submit new feature request?
|
||||
3.4 Will WeeChat be ported to *BSD, QNX, MacOS X, Microsoft Windows?
|
||||
3.5 I want to help WeeChat developers. What can I do?
|
||||
3.6 Can I give money or other things to WeeChat developers?
|
||||
A: Check that you have latest version of autoconf and automake.
|
||||
WeeChat has been developed with autoconf version 2.56 and automake
|
||||
version 1.7.
|
||||
You should have at least these versions in order to compile WeeChat CVS.
|
||||
If you can't or don't want to install these versions, you can download and
|
||||
install "devel package", a package built almost every day, based on CVS.
|
||||
Note that this package may not correspond exactly to CVS base.
|
||||
|
||||
|
||||
/------------------------------------------------------------------------------\
|
||||
| 1- Compiling |
|
||||
\------------------------------------------------------------------------------/
|
||||
2.1
|
||||
================================================================================
|
||||
Q: Why using WeeChat ? X-Chat and Irssi are so good...
|
||||
|
||||
A: Because WeeChat is very light and has new features.
|
||||
Some new features:
|
||||
* many GUI (Curses, Gtk, Qt),
|
||||
* extensible with scripts (Perl, Python, Ruby),
|
||||
* developed from scratch (not based on any other IRC client)
|
||||
* multi-platform
|
||||
* 100% GPL and free
|
||||
This is the "geekest Irc client" ;)
|
||||
|
||||
|
||||
1.1 I heard about many GUI for WeeChat. How can I compile/use them?
|
||||
2.2
|
||||
================================================================================
|
||||
Q: I've launched WeeChat, but I'm lost, what can I do?
|
||||
|
||||
Curses GUI is built by default.
|
||||
To build Gtk or Qt GUI you've to specify extra options to ./configure script:
|
||||
--enable-gtk to enable gtk GUI
|
||||
--enable-qt to enable Qt QUI
|
||||
Type ./configure --help to see available options.
|
||||
WARNING: only Curses GUI is ok today. Other GUI are under development!
|
||||
A: For help you can type /help. For help about a command, type /help command.
|
||||
|
||||
|
||||
1.2 I can't compile WeeChat CVS.
|
||||
2.3
|
||||
================================================================================
|
||||
Q: How can I customize key bindings?
|
||||
|
||||
Check that you have latest version of autoconf and automake.
|
||||
WeeChat has been developed with autoconf version 2.56 and automake version 1.7.
|
||||
You should have at least these versions in order to compile WeeChat CVS.
|
||||
If you can't or don't want to install these versions, you can download and
|
||||
install "devel package", a package built almost every day, based on CVS.
|
||||
Note that this package may not correspond exactly to CVS base.
|
||||
A: Today you can't do that. This will be available in a future version.
|
||||
|
||||
|
||||
/------------------------------------------------------------------------------\
|
||||
| 2- Using WeeChat |
|
||||
\------------------------------------------------------------------------------/
|
||||
2.4
|
||||
================================================================================
|
||||
Q: How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
|
||||
A: You can use /perl command to load scripts
|
||||
(default path is ~/.weechat/perl).
|
||||
Note that scripts in ~/.weechat/perl/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat perl scripts are compatible with X-Chat, not with Irssi, sorry ;)
|
||||
|
||||
|
||||
2.1 Why using WeeChat ? X-Chat and Irssi are so good...
|
||||
2.5
|
||||
================================================================================
|
||||
Q: How can I load Python scripts?
|
||||
|
||||
Because WeeChat is very light and has new features.
|
||||
Some new features:
|
||||
* many GUI (Curses, Gtk, Qt),
|
||||
* extensible with scripts (Perl, Python, Ruby),
|
||||
* developed from scratch (not based on any other IRC client)
|
||||
* multi-platform
|
||||
* 100% GPL and free
|
||||
This is the "geekest Irc client" ;)
|
||||
A: Today Python interface is not developed, so can't load any Python script.
|
||||
|
||||
|
||||
2.2 I've launched WeeChat, but I'm lost, what can I do?
|
||||
2.6
|
||||
================================================================================
|
||||
Q: How can I load Ruby scripts?
|
||||
|
||||
For help you can type /help. For help about a command, type /help command.
|
||||
A: Today Ruby interface is not developed, so can't load any Ruby script.
|
||||
|
||||
|
||||
2.3 How can I customize key bindings?
|
||||
3.1
|
||||
================================================================================
|
||||
Q: How should I report bugs?
|
||||
|
||||
Today you can't do that. This will be available in a future version.
|
||||
A: There is 3 ways to report bugs:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #weechat
|
||||
2. you can submit your bug at this url:
|
||||
http://savannah.nongnu.org/bugs/?func=addbug&group=weechat
|
||||
3. you can mail your problem, look at support page for developer's mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
2.4 How can I load Perl scripts?
|
||||
Are Perl scripts compatible with X-chat or/and Irssi ?
|
||||
3.2
|
||||
================================================================================
|
||||
Q: How should I submit patches?
|
||||
|
||||
Yes, you can use /perl command to launch scripts
|
||||
(default path is ~/.weechat/perl).
|
||||
Note that scripts in ~/.weechat/perl/autoload are automatically loaded
|
||||
when WeeChat is starting up.
|
||||
WeeChat perl scripts are compatible with X-Chat, not with Irssi, sorry ;)
|
||||
A: There is 3 ways to submit patches:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #weechat
|
||||
2. you can submit your patch at this url:
|
||||
http://savannah.nongnu.org/patch/?func=addpatch&group=weechat
|
||||
3. you can mail your patch, look at support page for developer's mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
2.5 How can I load Python scripts?
|
||||
3.3
|
||||
================================================================================
|
||||
Q: How should I submit new feature request?
|
||||
|
||||
Today Python interface is not developed, so can't load any Python script.
|
||||
A: There is 2 ways to submit your feature request:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #weechat
|
||||
2. you can mail your feature request, look at support page for developer's
|
||||
mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
2.6 How can I load Ruby scripts?
|
||||
3.4
|
||||
================================================================================
|
||||
Q: Will WeeChat be ported to *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
|
||||
Today Ruby interface is not developed, so can't load any Ruby script.
|
||||
A: Yes. Future versions will be available for these OS.
|
||||
|
||||
|
||||
/------------------------------------------------------------------------------\
|
||||
| 3- Development |
|
||||
\------------------------------------------------------------------------------/
|
||||
3.5
|
||||
================================================================================
|
||||
Q: I want to help WeeChat developers. What can I do?
|
||||
|
||||
A: There's many tasks to do (code, documentation, ...)
|
||||
Please contact us with IRC or mail, look at support page:
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.1 How should I report bugs?
|
||||
3.6
|
||||
================================================================================
|
||||
Q: Can I give money or other things to WeeChat developers?
|
||||
|
||||
There is 3 ways to report bugs:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #eci
|
||||
If no one can help you (huh?), try another way, see below.
|
||||
2. you can submit your bug at this url:
|
||||
http://savannah.nongnu.org/bugs/?func=addbug&group=weechat
|
||||
3. you can mail your problem, look at support page for developer's mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
3.2 How should I submit patches?
|
||||
|
||||
There is 3 ways to submit patches:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #eci
|
||||
If no one can help you (huh?), try another way, see below.
|
||||
2. you can submit your patch at this url:
|
||||
http://savannah.nongnu.org/patch/?func=addpatch&group=weechat
|
||||
3. you can mail your patch, look at support page for developer's mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
3.3 How should I submit new feature request?
|
||||
|
||||
There is 2 ways to submit your feature request:
|
||||
1. you can join us on IRC: irc.freenode.net, channel #eci
|
||||
If no one can help you (huh?), try another way, see below.
|
||||
2. you can mail your feature request, look at support page for developer's
|
||||
mails:
|
||||
http://weechat.flashtux.org/support.php
|
||||
(you can subscribe and send to "support" mailing list)
|
||||
|
||||
|
||||
3.4 Will WeeChat be ported to *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
|
||||
Yes. Future versions will be available for these OS.
|
||||
|
||||
|
||||
3.5 I want to help WeeChat developers. What can I do?
|
||||
|
||||
There's many tasks to do (code, documentation, ...)
|
||||
Please contact us with IRC or mail, look at support page:
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.6 Can I give money or other things to WeeChat developers?
|
||||
|
||||
No.
|
||||
A: No.
|
||||
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
WeeChat FAQ, 2004-05-31
|
||||
=======================
|
||||
|
||||
Public concerné :
|
||||
Tous les utilisateurs de WeeChat.
|
||||
|
||||
Avant de lire la suite ceci :
|
||||
la liste suivante de questions/réponses n'est *pas* exhaustive.
|
||||
Il est donc possible que vous ne trouviez pas de question/réponse correspondant
|
||||
à votre problème.
|
||||
Lisez les quand même SVP, elles peuvent vous aider à corriger votre problème.
|
||||
Et même si votre problème est mentionné ci-dessous, il est possible que la
|
||||
réponse ne vous aide pas à corriger le problème. Dans ce cas, contactez-nous,
|
||||
nous essaierons de vous aider Ă trouver une solution.
|
||||
|
||||
1 - Compilation
|
||||
2 - Utilisation de WeeChat
|
||||
3 - Développement
|
||||
|
||||
1.1
|
||||
================================================================================
|
||||
Q: J'ai entendu parler de plusieurs interfaces pour WeeChat.
|
||||
Comment puis-je les compiler/utiliser ?
|
||||
|
||||
R: L'interface Curses est construite par défaut.
|
||||
Pour construire l'interface Gtk ou Qt, vous devez spécifier des options
|
||||
pour le script ./configure :
|
||||
--enable-gtk pour activer l'interface Gtk
|
||||
--enable-qt pour activer l'interface Qt
|
||||
Tapez ./configure --help pour voir les options disponibles.
|
||||
ATTENTION : seule l'interface Curses est ok aujourd'hui.
|
||||
Les autres interfaces sont en développement.
|
||||
|
||||
|
||||
1.2
|
||||
================================================================================
|
||||
Q: Je ne peux pas compiler le CVS WeeChat.
|
||||
|
||||
R: Vérifiez que vous avez bien la dernière version d'autoconf et automake.
|
||||
WeeChat a été développé avec autoconf version 2.56 et automake
|
||||
version 1.7.
|
||||
Vous devez avoir au moins ces versions pour compiler le CVS WeeChat.
|
||||
Si vous n'avez pas ou ne souhaitez pas installer ces versions, vous
|
||||
pouvez télécharger et installer le paquet "devel", un paquet construit
|
||||
quasiment tous les jours, basé sur le CVS.
|
||||
Notez que ce paquet peut ne pas correspondre exactement Ă la base CVS.
|
||||
|
||||
|
||||
2.1
|
||||
================================================================================
|
||||
Q: Pourquoi utiliser WeeChat ? X-Chat et Irssi sont si bien...
|
||||
|
||||
R: Parce que WeeChat est très léger et a de nouvelles fonctionnalités.
|
||||
Quelques nouvelles fonctionnalités :
|
||||
* plusieurs interfaces (Curses, Gtk, Qt),
|
||||
* extensible par des scripts (Perl, Python, Ruby),
|
||||
* développé à partir de zéro (non basé sur un quelconque client IRC)
|
||||
* multi-platformes
|
||||
* 100% GPL et libre
|
||||
C'est le client le plus "geek" ;)
|
||||
|
||||
|
||||
2.2
|
||||
================================================================================
|
||||
Q: J'ai lancé WeeChat, mais je suis perdu, que puis-je faire ?
|
||||
|
||||
R: Pour obtenir de l'aide tapez /help. Pour de l'aide sur une commande,
|
||||
tapez /help commande.
|
||||
|
||||
|
||||
2.3
|
||||
================================================================================
|
||||
Q: Comment puis-je configurer les raccourcis clavier ?
|
||||
|
||||
R: Aujourd'hui vous ne pouvez pas le faire. Ce sera possible dans une
|
||||
version future.
|
||||
|
||||
|
||||
2.4
|
||||
================================================================================
|
||||
Q: Comment puis-je charger des scripts Perl ?
|
||||
Les scripts Perl sont-ils compatibles avec X-chat et/ou Irssi ?
|
||||
|
||||
R: La commande /perl permet de charger les scripts Perl
|
||||
(le chemin par défaut est ~/.weechat/perl).
|
||||
Notez que les scripts dans ~/.weechat/perl/autoload sont automatiquement
|
||||
chargés par WeeChat lorsqu'il démarre.
|
||||
Les scripts Perl WeeChat sont compatibles avec X-Chat, pas Irssi,
|
||||
désolé ;)
|
||||
|
||||
|
||||
2.5
|
||||
================================================================================
|
||||
Q: Comment puis-je charger les scripts Python ?
|
||||
|
||||
R: Aujourd'hui l'interface Python n'est pas déceloppée.
|
||||
Vous ne pouvez donc charger aucun script Python.
|
||||
|
||||
|
||||
2.6
|
||||
================================================================================
|
||||
Q: Comment puis-je charger des scripts Ruby ?
|
||||
|
||||
R: Aujourd'hui l'interface Ruby n'est pas développée.
|
||||
Vous ne pouvez donc charger aucun script Ruby.
|
||||
|
||||
|
||||
3.1
|
||||
================================================================================
|
||||
Q: Comment dois-je reporter les bugs ?
|
||||
|
||||
R: Il y a 3 manières de reporter les bugs :
|
||||
1. vous pouvez nous joindre sur IRC: irc.freenode.net, canal #weechat
|
||||
2. vous pouvez soumettre votre bug Ă cette adresse :
|
||||
http://savannah.nongnu.org/bugs/?func=addbug&group=weechat
|
||||
3. vous pouvez envoyer votre problem par mail, consultez la page
|
||||
support pour les mails des développeurs :
|
||||
http://weechat.flashtux.org/support.php
|
||||
(vous pouvez souscrire et envoyer Ă la liste de diffusion
|
||||
"support")
|
||||
|
||||
|
||||
3.2
|
||||
================================================================================
|
||||
Q: Comment dois-je soumettre les patches ?
|
||||
|
||||
R: Il y a 3 manières de soumettre les patches :
|
||||
1. vous pouvez nous joindre sur IRC: irc.freenode.net, canal #weechat
|
||||
2. vous pouvez soumettre votre patch Ă cette adresse :
|
||||
http://savannah.nongnu.org/patch/?func=addpatch&group=weechat
|
||||
3. vous pouvez envoyer votre patch par mail, consultez la page
|
||||
support pour les mails des développeurs :
|
||||
http://weechat.flashtux.org/support.php
|
||||
(vous pouvez souscrire et envoyer Ă la liste de diffusion
|
||||
"support")
|
||||
|
||||
|
||||
3.3
|
||||
================================================================================
|
||||
Q: Comment dois-je soumettre les demandes de nouvelles fonctionnalités ?
|
||||
|
||||
R: Il y a 2 manières :
|
||||
1. vous pouvez nous joindre sur IRC: irc.freenode.net, channel #weechat
|
||||
2. vous pouvez envoyer un mail, consultez la page support pour les
|
||||
mails des développeurs :
|
||||
http://weechat.flashtux.org/support.php
|
||||
(vous pouvez souscrire et envoyer Ă la liste de diffusion
|
||||
"support")
|
||||
|
||||
|
||||
3.4
|
||||
================================================================================
|
||||
Q: WeeChat sera-t-il porté sur *BSD, QNX, MacOS X, Microsoft Windows ?
|
||||
|
||||
R: Oui. Les futures versions seront disponibles pour ces OS.
|
||||
|
||||
|
||||
3.5
|
||||
================================================================================
|
||||
Q: Je souhaiterai aider les développeurs WeeChat. Que puis-je faire ?
|
||||
|
||||
R: Il y a plusieurs choses Ă faire (code, documentation, ...)
|
||||
Merci de prendre contact avec nous par IRC ou mail, consultez la page
|
||||
support :
|
||||
http://weechat.flashtux.org/support.php
|
||||
|
||||
|
||||
3.6
|
||||
================================================================================
|
||||
Q: Puis-je donner de l'argent ou d'autres choses aux développeurs WeeChat ?
|
||||
|
||||
R: Non.
|
||||
+1
-1
@@ -17,6 +17,6 @@
|
||||
|
||||
SUBDIRS = po intl src
|
||||
|
||||
EXTRA_DIST = weechat.1 BUGS FAQ
|
||||
EXTRA_DIST = weechat.1 BUGS FAQ FAQ.fr
|
||||
|
||||
man_MANS = weechat.1
|
||||
|
||||
+14
-16
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
TODO - 2004-02-07
|
||||
TODO - 2004-06-05
|
||||
|
||||
Legend:
|
||||
# done
|
||||
@@ -10,38 +10,34 @@ Legend:
|
||||
? is this really necessary?
|
||||
|
||||
|
||||
v0.0.5:
|
||||
v0.0.6:
|
||||
------
|
||||
|
||||
* General:
|
||||
# debug messages can be enabled via ./configure --enbale-debug option
|
||||
- Windows version
|
||||
+ Solaris version
|
||||
|
||||
* WeeChat commands:
|
||||
# "/set" command: allow the user to set the WeeChat variables
|
||||
under WeeChat without editing the config file (colors, time
|
||||
format, etc)
|
||||
|
||||
* IRC protocol:
|
||||
# "/mode" command: change the user/channels modes
|
||||
+ "/dcc" command (for chat and sending/receiving files)
|
||||
# "/query" command: start private conversation
|
||||
|
||||
* Interface:
|
||||
+ internationalization (traduce WeeChat in many languages)
|
||||
# info bar
|
||||
# add clock
|
||||
# display current channel modes (example : #weechat(+nt))
|
||||
|
||||
* Configuration:
|
||||
+ add missing options for config file
|
||||
+ add key bindings to config file
|
||||
|
||||
- add key bindings to config file
|
||||
|
||||
|
||||
Future versions:
|
||||
---------------
|
||||
|
||||
* General:
|
||||
- Windows version
|
||||
- *BSD version
|
||||
|
||||
* IRC protocol:
|
||||
+ "/mode" command: change the user/channels modes
|
||||
- "/dcc" command (for chat and sending/receiving files)
|
||||
- complete "/list" command: add regexp search, display only channels that
|
||||
match regexp
|
||||
- "/ignore" and "/unignore" commands: hide all that is write by a given
|
||||
@@ -61,10 +57,11 @@ Future versions:
|
||||
and show us the output on the current window. An option to exec
|
||||
like -o could send the output to the server, on the current
|
||||
channel/private
|
||||
- "/last": command to look for text in previous messages
|
||||
|
||||
* Interface:
|
||||
+ Gtk GUI
|
||||
- display current channel modes (example : #weechat(+nt))
|
||||
- color for nicks (except own nick) when nick colors are disabled
|
||||
- interpret special chars in messages (color & bold for example)
|
||||
- many channel windows in one window/term (window split)
|
||||
- add lag indicator
|
||||
@@ -72,6 +69,7 @@ Future versions:
|
||||
if WeeChat is running for long time, a lot of memory is used!)
|
||||
- improve completion (for example complete command parameters when possible)
|
||||
- understand incomplete commands if unambigous (for example: /he for /help is ok)
|
||||
- tab key with empty command line should switch to next window (like F7)
|
||||
- log chats to file
|
||||
? Qt GUI
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(WeeChat, 0.0.5, flashcode@flashtux.org)
|
||||
AC_INIT(WeeChat, 0.0.6, flashcode@flashtux.org)
|
||||
AC_CONFIG_SRCDIR([src/common/weechat.c])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([weechat], [0.0.5])
|
||||
AM_INIT_AUTOMAKE([weechat], [0.0.6])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
weechat (0.0.6-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.0.6, see ChangeLog for detail.
|
||||
|
||||
-- FlashCode <flashcode@flashtux.org> Sat, 05 Jun 2004 11:30:00 +0200
|
||||
|
||||
weechat (0.0.5-1) unstable; urgency=low
|
||||
|
||||
* WeeChat version 0.0.5, see ChangeLog for detail.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
This package was debianized by FlashCode <flashcode@flashtux.org> on
|
||||
Sat, 07 Feb 2004 20:30:00 +0200.
|
||||
Sat, 05 Jun 2004 11:30:00 +0200.
|
||||
|
||||
It was downloaded from http://weechat.flashtux.org/download
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ BUGS
|
||||
ChangeLog
|
||||
COPYING
|
||||
FAQ
|
||||
FAQ.fr
|
||||
INSTALL
|
||||
NEWS
|
||||
README
|
||||
|
||||
@@ -8,12 +8,19 @@
|
||||
@c
|
||||
@c Copyright (c) 2004 by FlashCode <flashcode@flashtux.org>
|
||||
@c
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.2
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled "GNU
|
||||
@c Free Documentation License".
|
||||
@c This manual is free software; you can redistribute it and/or modify
|
||||
@c it under the terms of the GNU General Public License as published by
|
||||
@c the Free Software Foundation; either version 2 of the License, or
|
||||
@c (at your option) any later version.
|
||||
@c
|
||||
@c This manual is distributed in the hope that it will be useful,
|
||||
@c but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@c GNU General Public License for more details.
|
||||
@c
|
||||
@c You should have received a copy of the GNU General Public License
|
||||
@c along with this program; if not, write to the Free Software
|
||||
@c Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
@c pdf : texi2pdf weechat_doc_en.texi
|
||||
@c html: makeinfo --html --no-split --number-sections weechat_doc_en.texi
|
||||
@@ -28,7 +35,7 @@
|
||||
|
||||
@title WeeChat - User guide
|
||||
@subtitle Fast, light and extensible IRC client
|
||||
@subtitle Documentation for WeeChat v0.0.5-pre3 - January, 24 2004
|
||||
@subtitle Documentation for WeeChat v0.0.6 - June, 05 2004
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -804,7 +811,7 @@ Support with IRC:@*
|
||||
- server: @b{irc.freenode.net}@*
|
||||
- channel: @b{#weechat}@*@*
|
||||
@item
|
||||
WeeChat forum: soon!@*@*
|
||||
WeeChat forum: @uref{http://forums.flashtux.org}@*@*
|
||||
@item
|
||||
Support with mailing list:@*
|
||||
- to subscribe/unsubscribe:@*@uref{http://mail.nongnu.org/mailman/listinfo/weechat-support}.@*
|
||||
|
||||
@@ -8,12 +8,19 @@
|
||||
@c
|
||||
@c Copyright (c) 2004 by FlashCode <flashcode@flashtux.org>
|
||||
@c
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.2
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled "GNU
|
||||
@c Free Documentation License".
|
||||
@c This manual is free software; you can redistribute it and/or modify
|
||||
@c it under the terms of the GNU General Public License as published by
|
||||
@c the Free Software Foundation; either version 2 of the License, or
|
||||
@c (at your option) any later version.
|
||||
@c
|
||||
@c This manual is distributed in the hope that it will be useful,
|
||||
@c but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@c GNU General Public License for more details.
|
||||
@c
|
||||
@c You should have received a copy of the GNU General Public License
|
||||
@c along with this program; if not, write to the Free Software
|
||||
@c Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
@c pdf : texi2pdf weechat_doc_fr.texi
|
||||
@c html: makeinfo --html --no-split --number-sections weechat_doc_fr.texi
|
||||
@@ -28,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Guide utilisateur
|
||||
@subtitle Client IRC rapide, l@'eger et extensible
|
||||
@subtitle Documentation pour WeeChat v0.0.5-pre3 - 24 janvier 2004
|
||||
@subtitle Documentation pour WeeChat v0.0.6 - 5 juin 2004
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -804,7 +811,7 @@ Support par IRC:@*
|
||||
- serveur : @b{irc.freenode.net}@*
|
||||
- canal : @b{#weechat}@*@*
|
||||
@item
|
||||
Forum WeeChat : bient@^ot !@*@*
|
||||
Forum WeeChat : @uref{http://forums.flashtux.org}@*@*
|
||||
@item
|
||||
Support par la liste de diffusion :@*
|
||||
- pour souscrire/d@'esinscrire :@*@uref{http://mail.nongnu.org/mailman/listinfo/weechat-support}.@*
|
||||
|
||||
@@ -8,12 +8,19 @@
|
||||
@c
|
||||
@c Copyright (c) 2004 by FlashCode <flashcode@flashtux.org>
|
||||
@c
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.2
|
||||
@c or any later version published by the Free Software Foundation;
|
||||
@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
@c A copy of the license is included in the section entitled "GNU
|
||||
@c Free Documentation License".
|
||||
@c This manual is free software; you can redistribute it and/or modify
|
||||
@c it under the terms of the GNU General Public License as published by
|
||||
@c the Free Software Foundation; either version 2 of the License, or
|
||||
@c (at your option) any later version.
|
||||
@c
|
||||
@c This manual is distributed in the hope that it will be useful,
|
||||
@c but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@c GNU General Public License for more details.
|
||||
@c
|
||||
@c You should have received a copy of the GNU General Public License
|
||||
@c along with this program; if not, write to the Free Software
|
||||
@c Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
@c pdf : texi2pdf weechat_doc_pt.texi
|
||||
@c html: makeinfo --html --no-split --number-sections weechat_doc_pt.texi
|
||||
@@ -28,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Guia do Utilizador
|
||||
@subtitle Cliente de IRC rapido, leve e extencivel
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.0.5-pre2 - 21 de Janeiro de 2004
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.0.6 - 05 de Junho de 2004
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -495,7 +502,7 @@ Suporte por IRC:@*
|
||||
- servidor : @b{irc.freenode.net}@*
|
||||
- canal : @b{#weechat}@*@*
|
||||
@item
|
||||
Forum do WeeChat : mais tarde !@*@*
|
||||
Forum do WeeChat : @uref{http://forums.flashtux.org}@*@*
|
||||
@item
|
||||
Suporte por lista de correio-e :@*
|
||||
- para te inscreveres/desinscreveres :@*@uref{http://mail.nongnu.org/mailman/listinfo/weechat-support}.@*
|
||||
|
||||
+435
-385
File diff suppressed because it is too large
Load Diff
+465
-418
File diff suppressed because it is too large
Load Diff
@@ -1143,6 +1143,7 @@ config_create_default ()
|
||||
fprintf (file, "M=msg\n");
|
||||
fprintf (file, "# MUB=unban *\n");
|
||||
fprintf (file, "N=names\n");
|
||||
fprintf (file, "Q=query\n");
|
||||
fprintf (file, "T=topic\n");
|
||||
fprintf (file, "# UB=unban\n");
|
||||
fprintf (file, "# UNIG=unignore\n");
|
||||
|
||||
@@ -388,7 +388,7 @@ gui_display_end_of_line (t_gui_window *window, t_gui_line *line, int count)
|
||||
{
|
||||
int lines_displayed, num_lines, offset, remainder, num_displayed;
|
||||
t_gui_message *ptr_message;
|
||||
char saved_char, format_align[32];
|
||||
char saved_char, format_align[32], format_empty[32];
|
||||
|
||||
snprintf (format_align, 32, "%%-%ds", line->length_align);
|
||||
num_lines = gui_get_line_num_splits (window, line);
|
||||
@@ -446,7 +446,11 @@ gui_display_end_of_line (t_gui_window *window, t_gui_line *line, int count)
|
||||
if (lines_displayed >= num_lines - count)
|
||||
{
|
||||
if (window->win_chat_cursor_x <= window->win_chat_width - 1)
|
||||
wclrtoeol (window->win_chat);
|
||||
{
|
||||
snprintf (format_empty, 32, "%%-%ds",
|
||||
window->win_chat_width - window->win_chat_cursor_x);
|
||||
wprintw (window->win_chat, format_empty, " ");
|
||||
}
|
||||
window->win_chat_cursor_y++;
|
||||
}
|
||||
window->win_chat_cursor_x = 0;
|
||||
@@ -468,7 +472,7 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int stop_at_end)
|
||||
{
|
||||
int offset, remainder, num_displayed;
|
||||
t_gui_message *ptr_message;
|
||||
char saved_char, format_align[32];
|
||||
char saved_char, format_align[32], format_empty[32];
|
||||
|
||||
snprintf (format_align, 32, "%%-%ds", line->length_align);
|
||||
ptr_message = line->messages;
|
||||
@@ -539,7 +543,11 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int stop_at_end)
|
||||
(window->win_chat_cursor_x > window->win_chat_width - 1)))
|
||||
{
|
||||
if (window->win_chat_cursor_x <= window->win_chat_width - 1)
|
||||
wclrtoeol (window->win_chat);
|
||||
{
|
||||
snprintf (format_empty, 32, "%%-%ds",
|
||||
window->win_chat_width - window->win_chat_cursor_x);
|
||||
wprintw (window->win_chat, format_empty, " ");
|
||||
}
|
||||
window->win_chat_cursor_y++;
|
||||
}
|
||||
window->win_chat_cursor_x = 0;
|
||||
@@ -563,11 +571,7 @@ gui_draw_window_chat (t_gui_window *window)
|
||||
return;
|
||||
|
||||
if (has_colors ())
|
||||
{
|
||||
gui_window_set_color (window->win_chat, COLOR_WIN_CHAT);
|
||||
wborder (window->win_chat, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
|
||||
wrefresh (window->win_chat);
|
||||
}
|
||||
|
||||
ptr_line = window->last_line;
|
||||
lines_used = 0;
|
||||
@@ -623,11 +627,22 @@ gui_draw_window_chat (t_gui_window *window)
|
||||
void
|
||||
gui_redraw_window_chat (t_gui_window *window)
|
||||
{
|
||||
char format_empty[32];
|
||||
int i;
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
if (window != gui_current_window)
|
||||
return;
|
||||
|
||||
gui_curses_window_clear (window->win_chat);
|
||||
if (has_colors ())
|
||||
gui_window_set_color (window->win_chat, COLOR_WIN_CHAT);
|
||||
|
||||
snprintf (format_empty, 32, "%%-%ds", window->win_chat_width);
|
||||
for (i = 0; i < window->win_chat_height; i++)
|
||||
{
|
||||
mvwprintw (window->win_chat, i, 0, format_empty, " ");
|
||||
}
|
||||
|
||||
gui_draw_window_chat (window);
|
||||
}
|
||||
|
||||
@@ -639,7 +654,7 @@ void
|
||||
gui_draw_window_nick (t_gui_window *window)
|
||||
{
|
||||
int i, x, y, column, max_length;
|
||||
char format[32];
|
||||
char format[32], format_empty[32];
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
@@ -663,7 +678,16 @@ gui_draw_window_nick (t_gui_window *window)
|
||||
window->win_nick_width,
|
||||
window->win_nick_y,
|
||||
window->win_nick_x);
|
||||
gui_draw_window_chat (window);
|
||||
gui_redraw_window_chat (window);
|
||||
|
||||
if (has_colors ())
|
||||
gui_window_set_color (window->win_nick, COLOR_WIN_NICK);
|
||||
|
||||
snprintf (format_empty, 32, "%%-%ds", window->win_nick_width);
|
||||
for (i = 0; i < window->win_nick_height; i++)
|
||||
{
|
||||
mvwprintw (window->win_nick, i, 0, format_empty, " ");
|
||||
}
|
||||
}
|
||||
snprintf (format, 32, "%%-%ds", max_length);
|
||||
|
||||
@@ -774,11 +798,22 @@ gui_draw_window_nick (t_gui_window *window)
|
||||
void
|
||||
gui_redraw_window_nick (t_gui_window *window)
|
||||
{
|
||||
char format_empty[32];
|
||||
int i;
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
if (window != gui_current_window)
|
||||
return;
|
||||
|
||||
gui_curses_window_clear (window->win_nick);
|
||||
if (has_colors ())
|
||||
gui_window_set_color (window->win_nick, COLOR_WIN_NICK);
|
||||
|
||||
snprintf (format_empty, 32, "%%-%ds", window->win_nick_width);
|
||||
for (i = 0; i < window->win_nick_height; i++)
|
||||
{
|
||||
mvwprintw (window->win_nick, i, 0, format_empty, " ");
|
||||
}
|
||||
|
||||
gui_draw_window_nick (window);
|
||||
}
|
||||
|
||||
@@ -791,6 +826,7 @@ gui_draw_window_status (t_gui_window *window)
|
||||
{
|
||||
t_gui_window *ptr_win;
|
||||
char format_more[32];
|
||||
int i, first_mode;
|
||||
|
||||
/* TODO: manage splitted windows! */
|
||||
if (window != gui_current_window)
|
||||
@@ -879,7 +915,36 @@ gui_draw_window_status (t_gui_window *window)
|
||||
gui_window_set_color (window->win_status,
|
||||
COLOR_WIN_STATUS);
|
||||
}
|
||||
wprintw (window->win_status, "%s ", CHANNEL(ptr_win)->name);
|
||||
wprintw (window->win_status, "%s", CHANNEL(ptr_win)->name);
|
||||
if (gui_current_window == CHANNEL(ptr_win)->window)
|
||||
{
|
||||
/* display channel modes */
|
||||
wprintw (window->win_status, "(");
|
||||
i = 0;
|
||||
first_mode = 1;
|
||||
while (CHANNEL(ptr_win)->modes[i])
|
||||
{
|
||||
if (CHANNEL(ptr_win)->modes[i] != ' ')
|
||||
{
|
||||
if (first_mode)
|
||||
{
|
||||
wprintw (window->win_status, "+");
|
||||
first_mode = 0;
|
||||
}
|
||||
wprintw (window->win_status, "%c",
|
||||
CHANNEL(ptr_win)->modes[i]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (CHANNEL(ptr_win)->modes[CHANNEL_MODE_KEY] != ' ')
|
||||
wprintw (window->win_status, ",%s",
|
||||
CHANNEL(ptr_win)->key);
|
||||
if (CHANNEL(ptr_win)->modes[CHANNEL_MODE_LIMIT] != ' ')
|
||||
wprintw (window->win_status, ",%d",
|
||||
CHANNEL(ptr_win)->limit);
|
||||
wprintw (window->win_status, ")");
|
||||
}
|
||||
wprintw (window->win_status, " ");
|
||||
}
|
||||
if (!SERVER(ptr_win))
|
||||
{
|
||||
@@ -1288,8 +1353,8 @@ gui_move_page_up ()
|
||||
if (!gui_current_window->first_line_displayed)
|
||||
{
|
||||
gui_current_window->sub_lines += gui_current_window->win_chat_height - 1;
|
||||
gui_redraw_window_chat (gui_current_window);
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
gui_draw_window_chat (gui_current_window);
|
||||
gui_draw_window_status (gui_current_window);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1307,8 +1372,8 @@ gui_move_page_down ()
|
||||
gui_current_window->sub_lines = 0;
|
||||
if (gui_current_window->sub_lines == 0)
|
||||
gui_current_window->unread_data = 0;
|
||||
gui_redraw_window_chat (gui_current_window);
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
gui_draw_window_chat (gui_current_window);
|
||||
gui_draw_window_status (gui_current_window);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1619,8 +1684,11 @@ gui_add_message (t_gui_window *window, int type, int color, char *message)
|
||||
}
|
||||
if ((window != gui_current_window) || (window->sub_lines > 0))
|
||||
{
|
||||
window->unread_data = 1 + window->last_line->line_with_message;
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
if (window->unread_data < 1 + window->last_line->line_with_message)
|
||||
{
|
||||
window->unread_data = 1 + window->last_line->line_with_message;
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,4 +26,5 @@ lib_weechat_irc_a_SOURCES = irc.h \
|
||||
irc-server.c \
|
||||
irc-channel.c \
|
||||
irc-nick.c \
|
||||
irc-dcc.c \
|
||||
irc-display.c
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
|
||||
t_irc_channel *current_channel = NULL;
|
||||
char *channel_modes = "iklmnst";
|
||||
|
||||
|
||||
/*
|
||||
@@ -55,6 +56,10 @@ channel_new (t_irc_server *server, int channel_type, char *channel_name,
|
||||
new_channel->type = channel_type;
|
||||
new_channel->name = strdup (channel_name);
|
||||
new_channel->topic = NULL;
|
||||
memset (new_channel->modes, ' ', sizeof (new_channel->modes));
|
||||
new_channel->modes[sizeof (new_channel->modes) - 1] = '\0';
|
||||
new_channel->limit = 0;
|
||||
new_channel->key = NULL;
|
||||
new_channel->nicks = NULL;
|
||||
new_channel->last_nick = NULL;
|
||||
|
||||
|
||||
@@ -44,6 +44,12 @@ t_irc_command irc_commands[] =
|
||||
N_("nickname type"),
|
||||
N_("nickname: user to send ctcp to\ntype: \"action\" or \"version\""),
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_ctcp, NULL },
|
||||
{ "dcc", N_("starts DCC (file or chat)"),
|
||||
N_("action nickname [file]"),
|
||||
N_("action: 'send' (file) or 'chat'\n"
|
||||
"nickname: nickname to send file or chat\n"
|
||||
"file: filename (on local host)"),
|
||||
2, 3, 1, NULL, irc_cmd_send_dcc, NULL },
|
||||
{ "deop", N_("removes channel operator status from nickname(s)"),
|
||||
N_("nickname [nickname]"), "",
|
||||
1, 1, 1, irc_cmd_send_deop, NULL, NULL },
|
||||
@@ -119,15 +125,15 @@ t_irc_command irc_commands[] =
|
||||
" w: user receives wallops\n"
|
||||
" o: operator flag\n"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_mode, irc_cmd_recv_mode },
|
||||
{ "msg", N_("send message to a nick or channel"),
|
||||
N_("receiver[,receiver] text"),
|
||||
N_("receiver: nick or channel (may be mask, '*' = current channel)"
|
||||
"\ntext: text to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_msg, NULL },
|
||||
{ "motd", N_("get the \"Message Of The Day\""),
|
||||
N_("[target]"),
|
||||
N_("target: server name"),
|
||||
0, 1, 1, NULL, irc_cmd_send_motd, NULL },
|
||||
{ "msg", N_("send message to a nick or channel"),
|
||||
N_("receiver[,receiver] text"),
|
||||
N_("receiver: nick or channel (may be mask, '*' = current channel)"
|
||||
"\ntext: text to send"),
|
||||
2, MAX_ARGS, 1, NULL, irc_cmd_send_msg, NULL },
|
||||
{ "names", N_("list nicknames on channels"),
|
||||
N_("[channel[,channel]]"), N_("channel: channel name"),
|
||||
0, MAX_ARGS, 1, NULL, irc_cmd_send_names, NULL },
|
||||
@@ -158,6 +164,11 @@ t_irc_command irc_commands[] =
|
||||
{ "privmsg", N_("message received"),
|
||||
"", "",
|
||||
0, 0, 1, NULL, NULL, irc_cmd_recv_privmsg },
|
||||
{ "query", N_("send a private message to a nick"),
|
||||
N_("nickname [text]"),
|
||||
N_("nickname: nickname for private conversation"
|
||||
"\ntext: text to send"),
|
||||
1, MAX_ARGS, 1, NULL, irc_cmd_send_query, NULL },
|
||||
{ "quit", N_("close all connections & quit " PACKAGE_NAME),
|
||||
N_("[quit_message]"),
|
||||
N_("quit_message: quit message (displayed to other users)"),
|
||||
@@ -280,6 +291,8 @@ t_irc_command irc_commands[] =
|
||||
{ "321", N_("/list start"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_321 },
|
||||
{ "322", N_("channel (for /list)"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_322 },
|
||||
{ "323", N_("/list end"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_323 },
|
||||
{ "324", N_("channel mode"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_324 },
|
||||
{ "329", "???", "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_329 },
|
||||
{ "331", N_("no topic for channel"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_331 },
|
||||
{ "332", N_("topic of channel"),
|
||||
N_("channel :topic"),
|
||||
@@ -383,6 +396,10 @@ t_irc_command irc_commands[] =
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "475", N_("cannot join channel (bad channel key)"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "476", N_("bad channel mask"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "477", N_("channel doesn't support modes"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "481", N_("you're not an IRC operator"),
|
||||
"", "", 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_error },
|
||||
{ "482", N_("you're not channel operator"),
|
||||
|
||||
+478
-194
@@ -271,6 +271,256 @@ irc_cmd_recv_kick (t_irc_server *server, char *host, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_get_channel_modes: get channel modes
|
||||
*/
|
||||
|
||||
void irc_get_channel_modes (t_irc_channel *ptr_channel, char *channel_name,
|
||||
char *nick_host, char *modes, char *parm)
|
||||
{
|
||||
char *pos, set_flag;
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
set_flag = '+';
|
||||
while (modes && modes[0])
|
||||
{
|
||||
switch (modes[0])
|
||||
{
|
||||
case '+':
|
||||
set_flag = '+';
|
||||
break;
|
||||
case '-':
|
||||
set_flag = '-';
|
||||
break;
|
||||
case 'b':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "b", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets ban on") :
|
||||
_("removes ban on"),
|
||||
(parm) ? parm : NULL);
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "i", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets invite-only channel flag") :
|
||||
_("removes invite-only channel flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_INVITE);
|
||||
break;
|
||||
case 'k':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "k", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets channel key to") :
|
||||
_("removes channel key"),
|
||||
(set_flag == '+') ?
|
||||
((parm) ? parm : NULL) :
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_KEY);
|
||||
if (ptr_channel->key)
|
||||
free (ptr_channel->key);
|
||||
ptr_channel->key = strdup (parm);
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "l", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets the user limit to") :
|
||||
_("removes user limit"),
|
||||
(set_flag == '+') ?
|
||||
((parm) ? parm : NULL) :
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_LIMIT);
|
||||
ptr_channel->limit = atoi (parm);
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
case 'm':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "m", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets moderated channel flag") :
|
||||
_("removes moderated channel flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_MODERATED);
|
||||
break;
|
||||
case 'n':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "n", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets messages from channel only flag") :
|
||||
_("removes messages from channel only flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_NO_MSG_OUT);
|
||||
break;
|
||||
case 'o':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "o", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("gives channel operator status to") :
|
||||
_("removes channel operator status from"),
|
||||
(parm) ? parm : NULL);
|
||||
if (parm)
|
||||
{
|
||||
ptr_nick = nick_search (ptr_channel, parm);
|
||||
if (ptr_nick)
|
||||
{
|
||||
ptr_nick->is_op = (set_flag == '+') ? 1 : 0;
|
||||
nick_resort (ptr_channel, ptr_nick);
|
||||
gui_redraw_window_nick (ptr_channel->window);
|
||||
}
|
||||
}
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "p", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets private channel flag") :
|
||||
_("removes private channel flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_SECRET);
|
||||
break;
|
||||
case 's':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "s", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets secret channel flag") :
|
||||
_("removes secret channel flag"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_SECRET);
|
||||
break;
|
||||
case 't':
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "t", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("sets topic protection") :
|
||||
_("removes topic protection"),
|
||||
NULL);
|
||||
SET_CHANNEL_MODE(ptr_channel, (set_flag == '+'),
|
||||
CHANNEL_MODE_TOPIC);
|
||||
break;
|
||||
case 'v':
|
||||
pos = NULL;
|
||||
if (parm)
|
||||
{
|
||||
pos = strchr (parm, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
}
|
||||
if (nick_host)
|
||||
irc_display_mode (ptr_channel->window,
|
||||
channel_name, set_flag, "v", nick_host,
|
||||
(set_flag == '+') ?
|
||||
_("gives voice to") :
|
||||
_("removes voice from"),
|
||||
(parm) ? parm : NULL);
|
||||
|
||||
if (parm)
|
||||
{
|
||||
ptr_nick = nick_search (ptr_channel, parm);
|
||||
if (ptr_nick)
|
||||
{
|
||||
ptr_nick->has_voice = (set_flag == '+') ? 1 : 0;
|
||||
nick_resort (ptr_channel, ptr_nick);
|
||||
gui_redraw_window_nick (ptr_channel->window);
|
||||
}
|
||||
}
|
||||
|
||||
/* look for next parameter */
|
||||
if (parm && pos)
|
||||
{
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
parm = pos;
|
||||
}
|
||||
break;
|
||||
}
|
||||
modes++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_recv_mode: 'mode' message received
|
||||
*/
|
||||
@@ -278,10 +528,8 @@ irc_cmd_recv_kick (t_irc_server *server, char *host, char *arguments)
|
||||
int
|
||||
irc_cmd_recv_mode (t_irc_server *server, char *host, char *arguments)
|
||||
{
|
||||
char *pos, *pos2, *pos_parm;
|
||||
char set_flag;
|
||||
char *pos, *pos_parm;
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
/* no host => we can't identify sender of message! */
|
||||
if (host == NULL)
|
||||
@@ -317,127 +565,15 @@ irc_cmd_recv_mode (t_irc_server *server, char *host, char *arguments)
|
||||
pos_parm++;
|
||||
while (pos_parm[0] == ' ')
|
||||
pos_parm++;
|
||||
pos2 = strchr (pos_parm, ' ');
|
||||
if (pos2)
|
||||
pos2[0] = '\0';
|
||||
}
|
||||
|
||||
set_flag = '+';
|
||||
|
||||
if (string_is_channel (arguments))
|
||||
{
|
||||
ptr_channel = channel_search (server, arguments);
|
||||
if (ptr_channel)
|
||||
{
|
||||
/* channel modes */
|
||||
while (pos && pos[0])
|
||||
{
|
||||
switch (pos[0])
|
||||
{
|
||||
case '+':
|
||||
set_flag = '+';
|
||||
break;
|
||||
case '-':
|
||||
set_flag = '-';
|
||||
break;
|
||||
case 'b':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "b", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets ban on") :
|
||||
_("removes ban on"),
|
||||
pos_parm);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'i':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "i", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets invite-only channel flag") :
|
||||
_("removes invite-only channel flag"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'l':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "l", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets the user limit to") :
|
||||
_("removes user limit"),
|
||||
(set_flag == '+') ? pos_parm : NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'm':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "m", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets moderated channel flag") :
|
||||
_("removes moderated channel flag"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'o':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "o", host,
|
||||
(set_flag == '+') ?
|
||||
_("gives channel operator status to") :
|
||||
_("removes channel operator status from"),
|
||||
pos_parm);
|
||||
ptr_nick = nick_search (ptr_channel, pos_parm);
|
||||
if (ptr_nick)
|
||||
{
|
||||
ptr_nick->is_op = (set_flag == '+') ? 1 : 0;
|
||||
nick_resort (ptr_channel, ptr_nick);
|
||||
gui_redraw_window_nick (ptr_channel->window);
|
||||
}
|
||||
break;
|
||||
/* TODO: remove this obsolete (?) channel flag? */
|
||||
case 'p':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "p", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets private channel flag") :
|
||||
_("removes private channel flag"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 's':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "s", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets secret channel flag") :
|
||||
_("removes secret channel flag"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 't':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "t", host,
|
||||
(set_flag == '+') ?
|
||||
_("sets topic protection") :
|
||||
_("removes topic protection"),
|
||||
NULL);
|
||||
/* TODO: change & redraw channel modes */
|
||||
break;
|
||||
case 'v':
|
||||
irc_display_mode (ptr_channel->window,
|
||||
arguments, set_flag, "v", host,
|
||||
(set_flag == '+') ?
|
||||
_("gives voice to") :
|
||||
_("removes voice from"),
|
||||
pos_parm);
|
||||
|
||||
ptr_nick = nick_search (ptr_channel, pos_parm);
|
||||
if (ptr_nick)
|
||||
{
|
||||
ptr_nick->has_voice = (set_flag == '+') ? 1 : 0;
|
||||
nick_resort (ptr_channel, ptr_nick);
|
||||
gui_redraw_window_nick (ptr_channel->window);
|
||||
}
|
||||
break;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
irc_get_channel_modes (ptr_channel, arguments, host, pos, pos_parm);
|
||||
gui_draw_window_status (gui_current_window);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -466,6 +602,7 @@ irc_cmd_recv_nick (t_irc_server *server, char *host, char *arguments)
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
int nick_is_me;
|
||||
t_gui_window *ptr_window;
|
||||
|
||||
/* no host => we can't identify sender of message! */
|
||||
if (host == NULL)
|
||||
@@ -487,6 +624,22 @@ irc_cmd_recv_nick (t_irc_server *server, char *host, char *arguments)
|
||||
ptr_nick = nick_search (ptr_channel, host);
|
||||
if (ptr_nick)
|
||||
{
|
||||
/* change nickname in any opened private window */
|
||||
for (ptr_window = gui_windows; ptr_window;
|
||||
ptr_window = ptr_window->next_window)
|
||||
{
|
||||
if ((SERVER(ptr_window) == server) && WIN_IS_PRIVATE(ptr_window))
|
||||
{
|
||||
if ((CHANNEL(ptr_window)->name)
|
||||
&& (strcmp (ptr_nick->nick, CHANNEL(ptr_window)->name) == 0))
|
||||
{
|
||||
free (CHANNEL(ptr_window)->name);
|
||||
CHANNEL(ptr_window)->name = strdup (arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* change nickname on channel */
|
||||
nick_is_me = (strcmp (ptr_nick->nick, server->nick) == 0) ? 1 : 0;
|
||||
nick_change (ptr_channel, ptr_nick, arguments);
|
||||
irc_display_prefix (ptr_channel->window, PREFIX_INFO);
|
||||
@@ -519,6 +672,7 @@ irc_cmd_recv_nick (t_irc_server *server, char *host, char *arguments)
|
||||
free (server->nick);
|
||||
server->nick = strdup (arguments);
|
||||
}
|
||||
gui_redraw_window_status (gui_current_window);
|
||||
gui_redraw_window_input (gui_current_window);
|
||||
|
||||
return 0;
|
||||
@@ -741,6 +895,7 @@ int
|
||||
irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
{
|
||||
char *pos, *pos2, *host2;
|
||||
char *pos_file, *pos_addr, *pos_port, *pos_size; /* for DCC */
|
||||
t_irc_channel *ptr_channel;
|
||||
t_irc_nick *ptr_nick;
|
||||
struct utsname *buf;
|
||||
@@ -870,18 +1025,18 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
if (buf && (uname (buf) == 0))
|
||||
{
|
||||
server_sendf (server,
|
||||
_("NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s, host \"%s\" is running "
|
||||
"%s %s / %s%s"),
|
||||
"NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s, running "
|
||||
"%s %s / %s%s",
|
||||
host, "\01", PACKAGE_NAME, PACKAGE_VERSION, __DATE__,
|
||||
&buf->nodename, &buf->sysname,
|
||||
&buf->sysname,
|
||||
&buf->release, &buf->machine, "\01\r\n");
|
||||
free (buf);
|
||||
}
|
||||
else
|
||||
server_sendf (server,
|
||||
_("NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s%s"),
|
||||
"NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s%s",
|
||||
host, "\01", PACKAGE_NAME, PACKAGE_VERSION, __DATE__,
|
||||
"\01\r\n");
|
||||
irc_display_prefix (server->window, PREFIX_INFO);
|
||||
@@ -893,79 +1048,144 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
COLOR_WIN_CHAT, _("from"));
|
||||
gui_printf_color (server->window,
|
||||
COLOR_WIN_CHAT_NICK, " %s\n", host);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ping request from another user => answer */
|
||||
if (strncmp (pos, "\01PING", 5) == 0)
|
||||
{
|
||||
pos += 5;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
pos2 = strchr (pos, '\01');
|
||||
if (pos2)
|
||||
pos2[0] = '\0';
|
||||
else
|
||||
pos = NULL;
|
||||
if (pos && !pos[0])
|
||||
pos = NULL;
|
||||
if (pos)
|
||||
server_sendf (server, "NOTICE %s :\01PING %s\01\r\n",
|
||||
host, pos);
|
||||
else
|
||||
server_sendf (server, "NOTICE %s :\01PING\01\r\n",
|
||||
host);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* incoming DCC file */
|
||||
if (strncmp (pos, "\01DCC SEND", 9) == 0)
|
||||
{
|
||||
pos2 = strchr (pos, '\01');
|
||||
if (!pos2)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot parse \"%s\" command\n"),
|
||||
WEECHAT_ERROR, "privmsg");
|
||||
return -1;
|
||||
}
|
||||
pos2[0] = '\0';
|
||||
pos_file = pos + 9;
|
||||
while (pos_file[0] == ' ')
|
||||
pos_file++;
|
||||
|
||||
/* look for file size */
|
||||
pos_size = strrchr (pos_file, ' ');
|
||||
if (!pos_size)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot parse \"%s\" command\n"),
|
||||
WEECHAT_ERROR, "privmsg");
|
||||
return -1;
|
||||
}
|
||||
pos2 = pos_size;
|
||||
pos_size++;
|
||||
while (pos2[0] == ' ')
|
||||
pos2--;
|
||||
pos2[1] = '\0';
|
||||
|
||||
/* look for DCC port */
|
||||
pos_port = strrchr (pos_file, ' ');
|
||||
if (!pos_port)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot parse \"%s\" command\n"),
|
||||
WEECHAT_ERROR, "privmsg");
|
||||
return -1;
|
||||
}
|
||||
pos2 = pos_port;
|
||||
pos_port++;
|
||||
while (pos2[0] == ' ')
|
||||
pos2--;
|
||||
pos2[1] = '\0';
|
||||
|
||||
/* look for DCC address (IP) */
|
||||
pos_addr = strrchr (pos_file, ' ');
|
||||
if (!pos_addr)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot parse \"%s\" command\n"),
|
||||
WEECHAT_ERROR, "privmsg");
|
||||
return -1;
|
||||
}
|
||||
pos2 = pos_addr;
|
||||
pos_addr++;
|
||||
while (pos2[0] == ' ')
|
||||
pos2--;
|
||||
pos2[1] = '\0';
|
||||
|
||||
wee_log_printf ("Incoming DCC file (NOT DEVELOPED!): "
|
||||
"\"%s\", address=\"%s\", port=\"%s\", size=\"%s\"\n",
|
||||
pos_file, pos_addr, pos_port, pos_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* private message received => display it */
|
||||
ptr_channel = channel_search (server, host);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
ptr_channel = channel_new (server, CHAT_PRIVATE, host, 0);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot create new private window \"%s\"\n"),
|
||||
WEECHAT_ERROR, host);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (!ptr_channel->topic)
|
||||
{
|
||||
ptr_channel->topic = strdup (host2);
|
||||
gui_redraw_window_title (ptr_channel->window);
|
||||
}
|
||||
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "<");
|
||||
if (strstr (pos, server->nick))
|
||||
{
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
"%s", host);
|
||||
if ( (cfg_look_infobar_delay_highlight > 0)
|
||||
&& (ptr_channel->window != gui_current_window) )
|
||||
gui_infobar_printf (cfg_look_infobar_delay_highlight,
|
||||
COLOR_WIN_INFOBAR_HIGHLIGHT,
|
||||
_("Private %s> %s"),
|
||||
host, pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* ping request from another user => answer */
|
||||
if (strncmp (pos, "\01PING", 5) == 0)
|
||||
{
|
||||
pos += 5;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
pos2 = strchr (pos, '\01');
|
||||
if (pos2)
|
||||
pos2[0] = '\0';
|
||||
else
|
||||
pos = NULL;
|
||||
if (pos && !pos[0])
|
||||
pos = NULL;
|
||||
if (pos)
|
||||
server_sendf (server, "NOTICE %s :\01PING %s\01\r\n",
|
||||
host, pos);
|
||||
else
|
||||
server_sendf (server, "NOTICE %s :\01PING\01\r\n",
|
||||
host);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* private message received => display it */
|
||||
ptr_channel = channel_search (server, host);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
ptr_channel = channel_new (server, CHAT_PRIVATE, host, 0);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot create new private window \"%s\"\n"),
|
||||
WEECHAT_ERROR, host);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (!ptr_channel->topic)
|
||||
{
|
||||
ptr_channel->topic = strdup (host2);
|
||||
gui_redraw_window_title (ptr_channel->window);
|
||||
}
|
||||
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "<");
|
||||
if (strstr (pos, server->nick))
|
||||
{
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
"%s", host);
|
||||
if ( (cfg_look_infobar_delay_highlight > 0)
|
||||
&& (ptr_channel->window != gui_current_window) )
|
||||
gui_infobar_printf (cfg_look_infobar_delay_highlight,
|
||||
COLOR_WIN_INFOBAR_HIGHLIGHT,
|
||||
_("Private %s> %s"),
|
||||
host, pos);
|
||||
}
|
||||
else
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_PRIVATE,
|
||||
"%s", host);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "> ");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_MSG,
|
||||
COLOR_WIN_CHAT, "%s\n", pos);
|
||||
}
|
||||
}
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_PRIVATE,
|
||||
"%s", host);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "> ");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_MSG,
|
||||
COLOR_WIN_CHAT, "%s\n", pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2006,6 +2226,69 @@ irc_cmd_recv_323 (t_irc_server *server, char *host, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_recv_324: '324' command (channel mode)
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_recv_324 (t_irc_server *server, char *host, char *arguments)
|
||||
{
|
||||
char *pos_chan, *pos, *pos_parm;
|
||||
t_irc_channel *ptr_channel;
|
||||
|
||||
/* make gcc happy */
|
||||
(void) host;
|
||||
|
||||
pos_chan = strchr (arguments, ' ');
|
||||
if (pos_chan)
|
||||
{
|
||||
pos_chan[0] = '\0';
|
||||
pos_chan++;
|
||||
while (pos_chan[0] == ' ')
|
||||
pos_chan++;
|
||||
|
||||
pos = strchr (pos_chan, ' ');
|
||||
if (pos)
|
||||
{
|
||||
pos[0] = '\0';
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
|
||||
pos_parm = strchr (pos, ' ');
|
||||
if (pos_parm)
|
||||
{
|
||||
pos_parm[0] = '\0';
|
||||
pos_parm++;
|
||||
while (pos_parm[0] == ' ')
|
||||
pos_parm++;
|
||||
}
|
||||
ptr_channel = channel_search (server, pos_chan);
|
||||
if (ptr_channel)
|
||||
{
|
||||
irc_get_channel_modes (ptr_channel, NULL, NULL, pos, pos_parm);
|
||||
gui_draw_window_status (gui_current_window);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_recv_329: '329' command (???)
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_recv_329 (t_irc_server *server, char *host, char *arguments)
|
||||
{
|
||||
/* make gcc happy */
|
||||
(void) server;
|
||||
(void) host;
|
||||
(void) arguments;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_recv_331: '331' command received (no topic for channel)
|
||||
*/
|
||||
@@ -2515,6 +2798,7 @@ irc_cmd_recv_366 (t_irc_server *server, char *host, char *arguments)
|
||||
_("normal"));
|
||||
gui_printf_color (ptr_channel->window,
|
||||
COLOR_WIN_CHAT_DARK, ")\n");
|
||||
irc_cmd_send_mode (server, ptr_channel->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+84
-15
@@ -101,7 +101,7 @@ irc_cmd_send_away (t_irc_server *server, char *arguments)
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
if (server->is_connected)
|
||||
if (ptr_server->is_connected)
|
||||
{
|
||||
if (pos)
|
||||
server_sendf (ptr_server, "AWAY :%s\r\n", pos);
|
||||
@@ -178,6 +178,17 @@ irc_cmd_send_ctcp (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_dcc: starts DCC (file or chat)
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_dcc (t_irc_server *server, char *arguments)
|
||||
{
|
||||
/* TODO: write this command! */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_deop: remove operator privileges from nickname(s)
|
||||
*/
|
||||
@@ -405,6 +416,20 @@ irc_cmd_send_mode (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_motd: get the "Message Of The Day"
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_motd (t_irc_server *server, char *arguments)
|
||||
{
|
||||
if (arguments)
|
||||
server_sendf (server, "MOTD %s\r\n", arguments);
|
||||
else
|
||||
server_sendf (server, "MOTD\r\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_msg: send a message to a nick or channel
|
||||
*/
|
||||
@@ -526,20 +551,6 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_motd: get the "Message Of The Day"
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_motd (t_irc_server *server, char *arguments)
|
||||
{
|
||||
if (arguments)
|
||||
server_sendf (server, "MOTD %s\r\n", arguments);
|
||||
else
|
||||
server_sendf (server, "MOTD\r\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_names: list nicknames on channels
|
||||
*/
|
||||
@@ -714,6 +725,64 @@ irc_cmd_send_pong (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_query: start private conversation with a nick
|
||||
*/
|
||||
|
||||
int
|
||||
irc_cmd_send_query (t_irc_server *server, char *arguments)
|
||||
{
|
||||
char *pos;
|
||||
t_irc_channel *ptr_channel;
|
||||
|
||||
pos = strchr (arguments, ' ');
|
||||
if (pos)
|
||||
{
|
||||
pos[0] = '\0';
|
||||
pos++;
|
||||
while (pos[0] == ' ')
|
||||
pos++;
|
||||
if (!pos[0])
|
||||
pos = NULL;
|
||||
}
|
||||
|
||||
/* create private window if not already opened */
|
||||
ptr_channel = channel_search (server, arguments);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
ptr_channel = channel_new (server, CHAT_PRIVATE, arguments, 1);
|
||||
if (!ptr_channel)
|
||||
{
|
||||
gui_printf (server->window,
|
||||
_("%s cannot create new private window \"%s\"\n"),
|
||||
WEECHAT_ERROR,
|
||||
arguments);
|
||||
return -1;
|
||||
}
|
||||
gui_redraw_window_title (ptr_channel->window);
|
||||
}
|
||||
|
||||
/* display text if given */
|
||||
if (pos)
|
||||
{
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "<");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_SELF,
|
||||
"%s", server->nick);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "> ");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_MSG,
|
||||
COLOR_WIN_CHAT, "%s\n", pos);
|
||||
server_sendf (server, "PRIVMSG %s :%s\r\n", arguments, pos);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_cmd_send_quit: disconnect from all servers and quit WeeChat
|
||||
*/
|
||||
|
||||
+27
-1
@@ -34,6 +34,20 @@
|
||||
|
||||
#define CHANNEL_PREFIX "#&+!"
|
||||
|
||||
#define NUM_CHANNEL_MODES 7
|
||||
#define CHANNEL_MODE_INVITE 0
|
||||
#define CHANNEL_MODE_KEY 1
|
||||
#define CHANNEL_MODE_LIMIT 2
|
||||
#define CHANNEL_MODE_MODERATED 3
|
||||
#define CHANNEL_MODE_NO_MSG_OUT 4
|
||||
#define CHANNEL_MODE_SECRET 5
|
||||
#define CHANNEL_MODE_TOPIC 6
|
||||
#define SET_CHANNEL_MODE(channel, set, mode) \
|
||||
if (set) \
|
||||
channel->modes[mode] = channel_modes[mode]; \
|
||||
else \
|
||||
channel->modes[mode] = ' ';
|
||||
|
||||
#define DEFAULT_IRC_PORT 6667
|
||||
|
||||
/* nick types */
|
||||
@@ -64,6 +78,9 @@ struct t_irc_channel
|
||||
int type; /* channel type */
|
||||
char *name; /* name of channel (exemple: "#abc") */
|
||||
char *topic; /* topic of channel (host for private) */
|
||||
char modes[NUM_CHANNEL_MODES+1];/* channel modes */
|
||||
int limit; /* user limit (0 is limit not set) */
|
||||
char *key; /* channel key (NULL if no key is set) */
|
||||
t_irc_nick *nicks; /* nicks on the channel */
|
||||
t_irc_nick *last_nick; /* last nick on the channel */
|
||||
t_gui_window *window; /* GUI window allocated for channel */
|
||||
@@ -139,6 +156,7 @@ extern t_irc_command irc_commands[];
|
||||
extern t_irc_server *irc_servers, *current_irc_server;
|
||||
extern t_irc_message *recv_msgq, *msgq_last_msg;
|
||||
extern t_irc_channel *current_channel;
|
||||
extern char *channel_modes;
|
||||
|
||||
/* server functions (irc-server.c) */
|
||||
|
||||
@@ -180,6 +198,10 @@ extern t_irc_nick *nick_search (t_irc_channel *, char *);
|
||||
extern void nick_count (t_irc_channel *, int *, int *, int *, int *, int *);
|
||||
extern int nick_get_max_length (t_irc_channel *);
|
||||
|
||||
/* DCC functions (irc-dcc.c) */
|
||||
|
||||
extern void dcc_send ();
|
||||
|
||||
/* IRC display (irc-diplay.c) */
|
||||
|
||||
extern void irc_display_prefix (/*@null@*/ t_gui_window *, char *);
|
||||
@@ -195,6 +217,7 @@ extern void irc_login (t_irc_server *);
|
||||
extern int irc_cmd_send_admin (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_away (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_ctcp (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_dcc (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_deop (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_devoice (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_die (t_irc_server *, char *);
|
||||
@@ -209,8 +232,8 @@ extern int irc_cmd_send_list (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_lusers (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_me (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_mode (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_msg (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_motd (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_msg (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_names (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_nick (t_irc_server *, int, char **);
|
||||
extern int irc_cmd_send_notice (t_irc_server *, char *);
|
||||
@@ -219,6 +242,7 @@ extern int irc_cmd_send_oper (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_part (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_ping (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_pong (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_query (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_quit (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_quote (t_irc_server *, char *);
|
||||
extern int irc_cmd_send_rehash (t_irc_server *, char *);
|
||||
@@ -272,6 +296,8 @@ extern int irc_cmd_recv_320 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_321 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_322 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_323 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_324 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_329 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_331 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_332 (t_irc_server *, char *, char *);
|
||||
extern int irc_cmd_recv_333 (t_irc_server *, char *, char *);
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH WEECHAT 1 "February 2004" "FlashCode"
|
||||
.TH WEECHAT 1 "June 2004" "FlashCode"
|
||||
|
||||
.SH NAME
|
||||
weechat \- Wee Enhanced Environment for Chat
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%define name weechat
|
||||
%define version 0.0.5
|
||||
%define version 0.0.6
|
||||
%define release 1
|
||||
|
||||
Name: %{name}
|
||||
@@ -10,6 +10,7 @@ Source: http://weechat.flashtux.org/download/%{name}-%{version}.tar.gz
|
||||
URL: http://weechat.flashtux.org
|
||||
Group: Networking/IRC
|
||||
BuildRoot: %{_tmppath}/%{name}-buildroot
|
||||
Requires: perl
|
||||
License: GPL
|
||||
|
||||
%description
|
||||
@@ -35,11 +36,13 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,0755)
|
||||
%doc AUTHORS BUGS ChangeLog COPYING FAQ INSTALL NEWS README TODO
|
||||
%doc AUTHORS BUGS ChangeLog COPYING FAQ FAQ.fr INSTALL NEWS README TODO
|
||||
/usr/local/man/man1/weechat.1*
|
||||
/usr/local/bin/weechat-curses
|
||||
|
||||
%changelog
|
||||
* Sat Jun 05 2004 FlashCode <flashcode@flashtux.org> 0.0.6-1
|
||||
- Released version 0.0.6
|
||||
* Thu Feb 02 2004 FlashCode <flashcode@flashtux.org> 0.0.5-1
|
||||
- Released version 0.0.5
|
||||
* Thu Jan 01 2004 FlashCode <flashcode@flashtux.org> 0.0.4-1
|
||||
|
||||
Reference in New Issue
Block a user