diff --git a/ChangeLog b/ChangeLog index 1754af572..5951ed4a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,12 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2003-11-03 +ChangeLog - 2003-11-09 +Version 0.0.4 (under dev!): + * debug messages can be enabled via ./configure --enbale-debug option + Version 0.0.3 (2003-11-03): * ./configure script to build WeeChat * nicks are now correctly sorted (op, halfop, voice, other) diff --git a/TODO b/TODO index 5ae2d2cd6..b98fd6494 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,7 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -TODO - 2003-11-03 +TODO - 2003-11-09 Legend: # done @@ -10,17 +10,11 @@ Legend: ? is this really necessary? -v0.0.3: +v0.0.4: ------ - - * General: - # use of ./configure script for building WeeChat * IRC protocol: - # implement RFC 2812 + "/mode" command: change the user/channels modes - # "/wallops" command: write the same string to all the - persons with the flag +w enable * WeeChat commands: + "/set" command: allow the user to set the WeeChat variables @@ -28,15 +22,24 @@ v0.0.3: format, etc) * Interface: + + Gtk GUI + internationalization (traduce WeeChat in many languages) * Configuration: - # do not stop program if problem with options in config file + - add missing options for config file + + * Plugins: + - add Perl plugin + - "/load" and "/unload" commands to (un)load extension scripts + (perl, python, ruby, ...) Future versions: --------------- + * General + - Windows version + * IRC protocol: - "/dcc" command (for chat and sending/receiving files) - complete "/list" command: add regexp search, display only channels that @@ -60,7 +63,6 @@ Future versions: channel/private * Interface: - + Gtk GUI - display current channel modes (example : #weechat(+nt)) - interpret special chars in messages (color & bold for example) - many channel windows in one window/term (window split) @@ -81,13 +83,9 @@ Future versions: * Configuration: - add key bindings to config file - - add missing options for config file - load config file after GUI (so init values by default (colors, ...) before loading config) * Plugins: - - add Perl plugin - add Python plugin - add Ruby plugin - - "/load" and "/unload" commands to (un)load extension scripts - (perl, python, ruby, ...) diff --git a/configure.in b/configure.in index 1265606cb..a21f2d615 100644 --- a/configure.in +++ b/configure.in @@ -51,29 +51,32 @@ AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr uname]) +AH_VERBATIM([DEBUG], [#undef DEBUG]) + AC_ARG_ENABLE(curses, [ --disable-curses Turn off Curses interface (default=auto)],,enable_curses=yes) AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=yes,enable_gtk=no) AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=yes,enable_qt=no) +AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=yes,enable_perl=no) +AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging messages (default=no)],enable_debug=yes,enable_debug=no) -enable_plugins=no -enable_perl=no -PERL_CFLAGS= -enable_python=no +enable_plugins="no" +enable_python="no" PYTHON_CFLAGS= -enable_ruby=no +enable_ruby="no" RUBY_CFLAGS= -enable_debug=no -DEBUG_CFLAGS= -AM_CONDITIONAL(GUI_CURSES, test "$enable_curses" = "yes") -AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes") -AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes") +AM_CONDITIONAL(GUI_CURSES, test "$enable_curses" = "yes") +AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes") +AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes") +AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes") +# AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes") +# AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes") if test "x$enable_curses" = "xyes" ; then if test "$LIBCURSES_FOUND" = "0" ; then AC_MSG_ERROR([Curses library not found! Install Curses library or run ./configure with --disable-curses parameter.]) fi - CURSES_LIBS=-lcurses + CURSES_LIBS="-lcurses" AC_SUBST(CURSES_LIBS) fi @@ -87,12 +90,31 @@ if test "x$enable_gtk" = "xyes" ; then AC_SUBST(GTK_LIBS) fi +PLUGIN_LIBS= + +if test "x$enable_perl" = "xyes" ; then + enable_plugins="yes" + PLUGIN_LIBS="$PLUGIN_LIBS ../../plugins/perl/lib_weechat_perl.a" + PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts` + PERL_LIBS=`perl -MExtUtils::Embed -e ldopts` + AC_SUBST(PERL_CFLAGS) + AC_SUBST(PERL_LIBS) +fi + +AC_SUBST(PLUGIN_LIBS) + +if test "x$enable_debug" = "xyes" ; then + AC_DEFINE(DEBUG) +fi + CFLAGS="-Wall -W -pipe -O2" AC_OUTPUT([Makefile src/Makefile src/common/Makefile src/irc/Makefile + src/plugins/Makefile + src/plugins/perl/Makefile src/gui/Makefile src/gui/curses/Makefile src/gui/gtk/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index f7441490b..3cfeeada5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,4 +15,4 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -SUBDIRS = common irc gui +SUBDIRS = common irc plugins gui diff --git a/src/gui/curses/Makefile.am b/src/gui/curses/Makefile.am index d54881329..e8edd5005 100644 --- a/src/gui/curses/Makefile.am +++ b/src/gui/curses/Makefile.am @@ -19,7 +19,7 @@ bin_PROGRAMS = weechat-curses weechat_curses_LDADD = ../../common/lib_weechat_main.a \ ../../irc/lib_weechat_irc.a \ - $(CURSES_LIBS) + $(CURSES_LIBS) $(PLUGIN_LIBS) weechat_curses_SOURCES = ../gui.h \ ../gui-common.c \ diff --git a/src/gui/gtk/Makefile.am b/src/gui/gtk/Makefile.am index 126eae3a8..6a84f264a 100644 --- a/src/gui/gtk/Makefile.am +++ b/src/gui/gtk/Makefile.am @@ -21,7 +21,7 @@ INCLUDES = $(GTK_CFLAGS) weechat_gtk_LDADD = ../../common/lib_weechat_main.a \ ../../irc/lib_weechat_irc.a \ - $(GTK_LIBS) + $(GTK_LIBS) $(PLUGIN_LIBS) weechat_gtk_SOURCES = ../gui.h \ ../gui-common.c \ diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am new file mode 100644 index 000000000..7dda77abf --- /dev/null +++ b/src/plugins/Makefile.am @@ -0,0 +1,31 @@ +# Copyright (c) 2003 FlashCode +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +if PLUGIN_PERL +perl_dir=perl +endif + +# if PLUGIN_PYTHON +# python_dir=python +# endif + +# if PLUGIN_RUBY +# ruby_dir=ruby +# endif + +# SUBDIRS = $(perl_dir) $(python_dir) $(ruby_dir) +SUBDIRS = $(perl_dir) diff --git a/src/plugins/perl/Makefile.am b/src/plugins/perl/Makefile.am new file mode 100644 index 000000000..213912f3a --- /dev/null +++ b/src/plugins/perl/Makefile.am @@ -0,0 +1,22 @@ +# Copyright (c) 2003 FlashCode +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +INCLUDES = $(PERL_CFLAGS) + +noinst_LIBRARIES = lib_weechat_perl.a + +lib_weechat_perl_a_SOURCES = perl.c diff --git a/src/plugins/perl/perl.c b/src/plugins/perl/perl.c new file mode 100644 index 000000000..115e3e19c --- /dev/null +++ b/src/plugins/perl/perl.c @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2003 by FlashCode + * Bounga + * Xahlexx + * See README for License detail. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* perl.c: Perl plugin support for WeeChat */ + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 1754af572..5951ed4a1 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,9 +1,12 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2003-11-03 +ChangeLog - 2003-11-09 +Version 0.0.4 (under dev!): + * debug messages can be enabled via ./configure --enbale-debug option + Version 0.0.3 (2003-11-03): * ./configure script to build WeeChat * nicks are now correctly sorted (op, halfop, voice, other) diff --git a/weechat/TODO b/weechat/TODO index 5ae2d2cd6..b98fd6494 100644 --- a/weechat/TODO +++ b/weechat/TODO @@ -1,7 +1,7 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -TODO - 2003-11-03 +TODO - 2003-11-09 Legend: # done @@ -10,17 +10,11 @@ Legend: ? is this really necessary? -v0.0.3: +v0.0.4: ------ - - * General: - # use of ./configure script for building WeeChat * IRC protocol: - # implement RFC 2812 + "/mode" command: change the user/channels modes - # "/wallops" command: write the same string to all the - persons with the flag +w enable * WeeChat commands: + "/set" command: allow the user to set the WeeChat variables @@ -28,15 +22,24 @@ v0.0.3: format, etc) * Interface: + + Gtk GUI + internationalization (traduce WeeChat in many languages) * Configuration: - # do not stop program if problem with options in config file + - add missing options for config file + + * Plugins: + - add Perl plugin + - "/load" and "/unload" commands to (un)load extension scripts + (perl, python, ruby, ...) Future versions: --------------- + * General + - Windows version + * IRC protocol: - "/dcc" command (for chat and sending/receiving files) - complete "/list" command: add regexp search, display only channels that @@ -60,7 +63,6 @@ Future versions: channel/private * Interface: - + Gtk GUI - display current channel modes (example : #weechat(+nt)) - interpret special chars in messages (color & bold for example) - many channel windows in one window/term (window split) @@ -81,13 +83,9 @@ Future versions: * Configuration: - add key bindings to config file - - add missing options for config file - load config file after GUI (so init values by default (colors, ...) before loading config) * Plugins: - - add Perl plugin - add Python plugin - add Ruby plugin - - "/load" and "/unload" commands to (un)load extension scripts - (perl, python, ruby, ...) diff --git a/weechat/configure.in b/weechat/configure.in index 1265606cb..a21f2d615 100644 --- a/weechat/configure.in +++ b/weechat/configure.in @@ -51,29 +51,32 @@ AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr uname]) +AH_VERBATIM([DEBUG], [#undef DEBUG]) + AC_ARG_ENABLE(curses, [ --disable-curses Turn off Curses interface (default=auto)],,enable_curses=yes) AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=yes,enable_gtk=no) AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=yes,enable_qt=no) +AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=yes,enable_perl=no) +AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging messages (default=no)],enable_debug=yes,enable_debug=no) -enable_plugins=no -enable_perl=no -PERL_CFLAGS= -enable_python=no +enable_plugins="no" +enable_python="no" PYTHON_CFLAGS= -enable_ruby=no +enable_ruby="no" RUBY_CFLAGS= -enable_debug=no -DEBUG_CFLAGS= -AM_CONDITIONAL(GUI_CURSES, test "$enable_curses" = "yes") -AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes") -AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes") +AM_CONDITIONAL(GUI_CURSES, test "$enable_curses" = "yes") +AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes") +AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes") +AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes") +# AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes") +# AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes") if test "x$enable_curses" = "xyes" ; then if test "$LIBCURSES_FOUND" = "0" ; then AC_MSG_ERROR([Curses library not found! Install Curses library or run ./configure with --disable-curses parameter.]) fi - CURSES_LIBS=-lcurses + CURSES_LIBS="-lcurses" AC_SUBST(CURSES_LIBS) fi @@ -87,12 +90,31 @@ if test "x$enable_gtk" = "xyes" ; then AC_SUBST(GTK_LIBS) fi +PLUGIN_LIBS= + +if test "x$enable_perl" = "xyes" ; then + enable_plugins="yes" + PLUGIN_LIBS="$PLUGIN_LIBS ../../plugins/perl/lib_weechat_perl.a" + PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts` + PERL_LIBS=`perl -MExtUtils::Embed -e ldopts` + AC_SUBST(PERL_CFLAGS) + AC_SUBST(PERL_LIBS) +fi + +AC_SUBST(PLUGIN_LIBS) + +if test "x$enable_debug" = "xyes" ; then + AC_DEFINE(DEBUG) +fi + CFLAGS="-Wall -W -pipe -O2" AC_OUTPUT([Makefile src/Makefile src/common/Makefile src/irc/Makefile + src/plugins/Makefile + src/plugins/perl/Makefile src/gui/Makefile src/gui/curses/Makefile src/gui/gtk/Makefile diff --git a/weechat/src/Makefile.am b/weechat/src/Makefile.am index f7441490b..3cfeeada5 100644 --- a/weechat/src/Makefile.am +++ b/weechat/src/Makefile.am @@ -15,4 +15,4 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -SUBDIRS = common irc gui +SUBDIRS = common irc plugins gui diff --git a/weechat/src/gui/curses/Makefile.am b/weechat/src/gui/curses/Makefile.am index d54881329..e8edd5005 100644 --- a/weechat/src/gui/curses/Makefile.am +++ b/weechat/src/gui/curses/Makefile.am @@ -19,7 +19,7 @@ bin_PROGRAMS = weechat-curses weechat_curses_LDADD = ../../common/lib_weechat_main.a \ ../../irc/lib_weechat_irc.a \ - $(CURSES_LIBS) + $(CURSES_LIBS) $(PLUGIN_LIBS) weechat_curses_SOURCES = ../gui.h \ ../gui-common.c \ diff --git a/weechat/src/gui/gtk/Makefile.am b/weechat/src/gui/gtk/Makefile.am index 126eae3a8..6a84f264a 100644 --- a/weechat/src/gui/gtk/Makefile.am +++ b/weechat/src/gui/gtk/Makefile.am @@ -21,7 +21,7 @@ INCLUDES = $(GTK_CFLAGS) weechat_gtk_LDADD = ../../common/lib_weechat_main.a \ ../../irc/lib_weechat_irc.a \ - $(GTK_LIBS) + $(GTK_LIBS) $(PLUGIN_LIBS) weechat_gtk_SOURCES = ../gui.h \ ../gui-common.c \ diff --git a/weechat/src/plugins/Makefile.am b/weechat/src/plugins/Makefile.am new file mode 100644 index 000000000..7dda77abf --- /dev/null +++ b/weechat/src/plugins/Makefile.am @@ -0,0 +1,31 @@ +# Copyright (c) 2003 FlashCode +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +if PLUGIN_PERL +perl_dir=perl +endif + +# if PLUGIN_PYTHON +# python_dir=python +# endif + +# if PLUGIN_RUBY +# ruby_dir=ruby +# endif + +# SUBDIRS = $(perl_dir) $(python_dir) $(ruby_dir) +SUBDIRS = $(perl_dir) diff --git a/weechat/src/plugins/perl/Makefile.am b/weechat/src/plugins/perl/Makefile.am new file mode 100644 index 000000000..213912f3a --- /dev/null +++ b/weechat/src/plugins/perl/Makefile.am @@ -0,0 +1,22 @@ +# Copyright (c) 2003 FlashCode +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +INCLUDES = $(PERL_CFLAGS) + +noinst_LIBRARIES = lib_weechat_perl.a + +lib_weechat_perl_a_SOURCES = perl.c diff --git a/weechat/src/plugins/perl/perl.c b/weechat/src/plugins/perl/perl.c new file mode 100644 index 000000000..115e3e19c --- /dev/null +++ b/weechat/src/plugins/perl/perl.c @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2003 by FlashCode + * Bounga + * Xahlexx + * See README for License detail. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* perl.c: Perl plugin support for WeeChat */ + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include