riece-8.0.0/ 0000755 0001750 0001750 00000000000 11570270205 007606 5 0000000 0000000 riece-8.0.0/acinclude.m4 0000644 0001750 0001750 00000025027 11400046556 011727 0000000 0000000 AC_DEFUN([AC_DEFINE_GNUS_PRODUCT_NAME],
[echo $ac_n "defining gnus product name... $ac_c"
AC_CACHE_VAL(EMACS_cv_GNUS_PRODUCT_NAME,[EMACS_cv_GNUS_PRODUCT_NAME=$1])
GNUS_PRODUCT_NAME=${EMACS_cv_GNUS_PRODUCT_NAME}
AC_MSG_RESULT(${GNUS_PRODUCT_NAME})
AC_SUBST(GNUS_PRODUCT_NAME)])
AC_DEFUN([AC_CHECK_EMACS],
[dnl Check for Emacsen.
dnl Apparently, if you run a shell window in Emacs, it sets the EMACS
dnl environment variable to 't'. Lets undo the damage.
test "$EMACS" = t && EMACS=
dnl Ignore cache.
unset ac_cv_prog_EMACS; unset ac_cv_prog_XEMACS;
AC_ARG_WITH(emacs,
[ --with-emacs=EMACS compile with EMACS [EMACS=emacs, mule...]],
[if test "$withval" = yes -o -z "$withval"; then
AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)
else
AC_CHECK_PROG(EMACS, $withval, $withval, emacs)
fi])
AC_ARG_WITH(xemacs,
[ --with-xemacs=XEMACS compile with XEMACS [XEMACS=xemacs]],
[if test "$withval" = yes -o -z "$withval"; then
AC_CHECK_PROG(XEMACS, xemacs, xemacs, xemacs)
else
AC_CHECK_PROG(XEMACS, $withval, $withval, xemacs)
fi
EMACS=$XEMACS],
[XEMACS=xemacs
test -z "$EMACS" && AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)])
AC_SUBST(EMACS)
AC_SUBST(XEMACS)])
AC_DEFUN([AC_EMACS_LISP], [
elisp="$2"
if test -z "$3"; then
AC_MSG_CHECKING(for $1)
fi
AC_CACHE_VAL(EMACS_cv_SYS_$1,[
OUTPUT=./conftest-$$
echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1
eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1
retval=`cat ${OUTPUT}`
echo "=> ${retval}" >& AC_FD_CC 2>&1
rm -f ${OUTPUT}
EMACS_cv_SYS_$1=$retval
])
$1=${EMACS_cv_SYS_$1}
if test -z "$3"; then
AC_MSG_RESULT($$1)
fi
])
AC_DEFUN([AC_CHECK_EMACS_FLAVOR],
[AC_MSG_CHECKING([what flavor does $EMACS have])
dnl Ignore cache.
unset EMACS_cv_SYS_flavor;
AC_EMACS_LISP(flavor,
(cond ((featurep (quote xemacs)) \"XEmacs\")\
((boundp (quote MULE)) \"MULE\")\
(t \"FSF Emacs\")),
"noecho")
case $EMACS_cv_SYS_flavor in
XEmacs)
EMACS_FLAVOR=xemacs;;
MULE)
EMACS_FLAVOR=mule;;
*)
EMACS_FLAVOR=emacs;;
esac
AC_MSG_RESULT($EMACS_cv_SYS_flavor)])
AC_DEFUN([AC_PATH_LISPDIR], [
AC_CHECK_EMACS_FLAVOR
if test "$prefix" = NONE; then
AC_MSG_CHECKING([prefix for your Emacs])
AC_EMACS_LISP(prefix,(expand-file-name \"..\" invocation-directory),"noecho")
prefix=${EMACS_cv_SYS_prefix}
AC_MSG_RESULT($prefix)
fi
AC_ARG_WITH(lispdir,
[ --with-lispdir=DIR Where to install lisp files
(for XEmacs package, use --with-packagedir instead)],
lispdir=${withval})
AC_MSG_CHECKING([where lisp files should go])
if test -z "$lispdir"; then
dnl Set default value
theprefix=$prefix
if test "$theprefix" = NONE; then
theprefix=$ac_default_prefix
fi
lispdir="\$(datadir)/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}"
for thedir in share lib; do
potential=
if test -d ${theprefix}/${thedir}/${EMACS_FLAVOR}/site-lisp; then
lispdir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}"
break
fi
done
fi
if test ${EMACS_FLAVOR} = xemacs; then
AC_MSG_RESULT([$lispdir
(it will be ignored when \"make install-package[[-ja]]\" is done)])
else
AC_MSG_RESULT([$lispdir])
fi
AC_SUBST(lispdir)
])
AC_DEFUN([AC_PATH_ETCDIR], [
AC_ARG_WITH(etcdir,[ --with-etcdir=DIR Where to install etc files], etcdir=${withval})
AC_MSG_CHECKING([where etc files should go])
if test -z "$etcdir"; then
dnl Set default value
etcdir="\$(lispdir)/../etc"
fi
AC_MSG_RESULT($etcdir)
AC_SUBST(etcdir)
])
dnl
dnl Check whether a function exists in a library
dnl All '_' characters in the first argument are converted to '-'
dnl
AC_DEFUN([AC_EMACS_CHECK_LIB], [
if test -z "$3"; then
AC_MSG_CHECKING(for $2 in $1)
fi
library=`echo $1 | tr _ -`
AC_EMACS_LISP($1,(progn (fmakunbound (quote $2)) (condition-case nil (progn (require (quote $library)) (fboundp (quote $2))) (error (prog1 nil (message \"$library not found\"))))),"noecho")
if test "${EMACS_cv_SYS_$1}" = nil; then
EMACS_cv_SYS_$1=no
fi
if test "${EMACS_cv_SYS_$1}" = t; then
EMACS_cv_SYS_$1=yes
fi
HAVE_$1=${EMACS_cv_SYS_$1}
AC_SUBST(HAVE_$1)
if test -z "$3"; then
AC_MSG_RESULT($HAVE_$1)
fi
])
dnl
dnl Perform sanity checking and try to locate the W3 package
dnl
AC_DEFUN([AC_CHECK_W3], [
AC_MSG_CHECKING(for acceptable W3 version)
dnl Ignore cache.
unset EMACS_cv_ACCEPTABLE_W3;
unset EMACS_cv_SYS_w3_dir;
unset EMACS_cv_SYS_w3_forms;
AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_W3,[
AC_EMACS_CHECK_LIB(w3_forms, w3-form-encode-xwfu,"noecho")
if test "${HAVE_w3_forms}" = yes; then
EMACS_cv_ACCEPTABLE_W3=yes
else
EMACS_cv_ACCEPTABLE_W3=
fi
if test "${EMACS_cv_ACCEPTABLE_W3}" = yes; then
AC_EMACS_LISP(w3_dir,(file-name-directory (locate-library \"w3-forms\")),"noecho")
EMACS_cv_ACCEPTABLE_W3=$EMACS_cv_SYS_w3_dir
fi
])
AC_ARG_WITH(w3,[ --with-w3=DIR Specify where to find the w3 package], [ EMACS_cv_ACCEPTABLE_W3=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
W3=${EMACS_cv_ACCEPTABLE_W3}
AC_SUBST(W3)
if test -z "${EMACS_cv_ACCEPTABLE_W3}"; then
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT(${W3})
fi
])
dnl
dnl Perform sanity checking and try to locate the W3 package
dnl
AC_DEFUN([AC_CHECK_URL], [
AC_MSG_CHECKING(for acceptable URL version)
dnl Ignore cache.
unset EMACS_cv_ACCEPTABLE_URL;
unset EMACS_cv_SYS_url_dir;
unset EMACS_cv_SYS_url;
AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_URL,[
AC_EMACS_CHECK_LIB(url, url-retrieve, "noecho")
if test "${HAVE_url}" = yes; then
EMACS_cv_ACCEPTABLE_URL=yes
else
EMACS_cv_ACCEPTABLE_URL=
fi
if test "${EMACS_cv_ACCEPTABLE_URL}" = yes; then
AC_EMACS_LISP(url_dir,(file-name-directory (locate-library \"url\")),"noecho")
EMACS_cv_ACCEPTABLE_URL=$EMACS_cv_SYS_url_dir
fi
])
AC_ARG_WITH(url,[ --with-url=DIR Specify where to find the url package], [ EMACS_cv_ACCEPTABLE_URL=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
URL=${EMACS_cv_ACCEPTABLE_URL}
AC_SUBST(URL)
if test -z "${EMACS_cv_ACCEPTABLE_URL}"; then
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT("${URL}")
fi
])
dnl
dnl Perform checking available fonts: Adobe Bembo, Adobe Futura and
dnl Bitstream Courier.
dnl
AC_DEFUN([GNUS_CHECK_FONTS], [
test "$LATEX" = t && LATEX=
test "$LATEX" || AC_PATH_PROGS(LATEX, latex, no)
AC_MSG_CHECKING(for available fonts)
AC_ARG_WITH(fonts,[ --with-fonts Assume all fonts required are available],[USE_FONTS="$withval"])
WITH_FONTS_bembo='%'
WITHOUT_FONTS_bembo=
WITH_FONTS_pfu='%'
WITHOUT_FONTS_pfu=
WITH_FONTS_bcr='%'
WITHOUT_FONTS_bcr=
if test -z "${USE_FONTS}"; then
if test "${LATEX}" = no; then
:
else
OUTPUT=./conftest-$$
echo '\nonstopmode\documentclass{article}\usepackage{bembo}\begin{document}\end{document}' > ${OUTPUT}
if ${LATEX} ${OUTPUT} & AC_FD_CC 2>&1 ; then
if test -z "${USE_FONTS}"; then
USE_FONTS="Adobe Bembo"
else
USE_FONTS="${USE_FONTS}, Adobe Bembo"
fi
WITH_FONTS_bembo=
WITHOUT_FONTS_bembo='%'
fi
echo '\nonstopmode\documentclass{article}\begin{document}{\fontfamily{pfu}\fontsize{10pt}{10}\selectfont test}\end{document}' > ${OUTPUT}
if retval=`${LATEX} ${OUTPUT} & AC_FD_CC`; then
if echo "$retval" | grep 'Some font shapes were not available' >& AC_FD_CC 2>&1 ; then
:
else
if test -z "${USE_FONTS}"; then
USE_FONTS="Adobe Futura"
else
USE_FONTS="${USE_FONTS}, Adobe Futura"
fi
WITH_FONTS_pfu=
WITHOUT_FONTS_pfu='%'
fi
fi
echo '\nonstopmode\documentclass{article}\begin{document}{\fontfamily{bcr}\fontsize{10pt}{10}\selectfont test}\end{document}' > ${OUTPUT}
if retval=`${LATEX} ${OUTPUT} & AC_FD_CC`; then
if echo "$retval" | grep 'Some font shapes were not available' >& AC_FD_CC 2>&1 ; then
:
else
if test -z "${USE_FONTS}"; then
USE_FONTS="Bitstream Courier"
else
USE_FONTS="${USE_FONTS}, Bitstream Courier"
fi
WITH_FONTS_bcr=
WITHOUT_FONTS_bcr='%'
fi
fi
rm -f ${OUTPUT} ${OUTPUT}.aux ${OUTPUT}.log ${OUTPUT}.dvi
fi
elif test "${USE_FONTS}" = yes ; then
WITH_FONTS_bembo=
WITHOUT_FONTS_bembo='%'
WITH_FONTS_pfu=
WITHOUT_FONTS_pfu='%'
WITH_FONTS_bcr=
WITHOUT_FONTS_bcr='%'
fi
AC_SUBST(WITH_FONTS_bembo)
AC_SUBST(WITHOUT_FONTS_bembo)
AC_SUBST(WITH_FONTS_pfu)
AC_SUBST(WITHOUT_FONTS_pfu)
AC_SUBST(WITH_FONTS_bcr)
AC_SUBST(WITHOUT_FONTS_bcr)
if test -z "${USE_FONTS}" ; then
USE_FONTS=no
fi
USE_FONTS=`echo "${USE_FONTS}" | sed 's/,\([[^,]]*\)$/ and\1/'`
AC_MSG_RESULT("${USE_FONTS}")
if test "${USE_FONTS}" = yes ; then
USE_FONTS='Set in Adobe Bembo, Adobe Futura and Bitstream Courier.'
elif test "${USE_FONTS}" = no ; then
USE_FONTS=''
else
USE_FONTS="Set in ${USE_FONTS}."
fi
AC_SUBST(USE_FONTS)
])
AC_DEFUN([AC_EXAMINE_PACKAGEDIR],
[dnl Examine PACKAGEDIR.
AC_EMACS_LISP(PACKAGEDIR,
(let (package-dir)\
(if (boundp (quote early-packages))\
(let ((dirs (delq nil (append (if early-package-load-path\
early-packages)\
(if late-package-load-path\
late-packages)\
(if last-package-load-path\
last-packages)))))\
(while (and dirs (not package-dir))\
(if (file-directory-p (car dirs))\
(setq package-dir (car dirs)\
dirs (cdr dirs))))))\
(or package-dir \"\")),
"noecho")])
AC_DEFUN([AC_PATH_PACKAGEDIR],
[dnl Check for PACKAGEDIR.
if test ${EMACS_FLAVOR} = xemacs; then
AC_MSG_CHECKING([where the XEmacs package is])
AC_ARG_WITH(packagedir,
[ --with-packagedir=DIR package DIR for XEmacs],
[if test "$withval" != yes -a -n "$withval"; then
PACKAGEDIR=$withval
else
AC_EXAMINE_PACKAGEDIR
fi],
AC_EXAMINE_PACKAGEDIR)
if test -z "$PACKAGEDIR"; then
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT($PACKAGEDIR)
fi
else
PACKAGEDIR=
fi
AC_SUBST(PACKAGEDIR)])
AC_DEFUN([AC_ADD_LOAD_PATH],
[dnl Check for additional load path.
AC_ARG_WITH(addpath,
[ --with-addpath=PATH search Emacs-Lisp libraries with PATH
use colons to separate directory names],
[if test "$withval" != yes -a -n "$withval"; then
AC_MSG_CHECKING([where to find the additional elisp libraries])
ADDITIONAL_LOAD_PATH=$withval
AC_MSG_RESULT($ADDITIONAL_LOAD_PATH)
fi],
ADDITIONAL_LOAD_PATH=)
AC_SUBST(ADDITIONAL_LOAD_PATH)])
riece-8.0.0/Makefile.in 0000644 0001750 0001750 00000050747 11570270171 011612 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
ChangeLog INSTALL NEWS install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
depcomp =
am__depfiles_maybe =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EMACS = @EMACS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
PACKAGE = @PACKAGE@
PACKAGEDIR = @PACKAGEDIR@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XEMACS = @XEMACS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
lispdir = @lispdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = lisp doc
EXTRA_DIST = README.ja NEWS.ja
AUTOMAKE_OPTIONS = no-dependencies
all: all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
distclean distclean-generic distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
@XEMACS_TRUE@install-package package:
@XEMACS_TRUE@ list='$(SUBDIRS)'; for subdir in $$list; do \
@XEMACS_TRUE@ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \
@XEMACS_TRUE@ done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
riece-8.0.0/configure.ac 0000644 0001750 0001750 00000000522 11570265630 012021 0000000 0000000 AC_INIT([riece], [8.0.0], [riece-discuss@nongnu.org])
AC_CONFIG_SRCDIR([configure.ac])
AC_PREREQ(2.63)
AM_INIT_AUTOMAKE
AC_CHECK_EMACS
AC_PATH_LISPDIR
AC_PATH_PACKAGEDIR
AM_CONDITIONAL(XEMACS, test ${EMACS_FLAVOR} = xemacs)
AC_CONFIG_FILES([Makefile
lisp/Makefile
lisp/riece-package-info.el
lisp/test/Makefile
doc/Makefile])
AC_OUTPUT
riece-8.0.0/COPYING 0000644 0001750 0001750 00000104513 11400052154 010556 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
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 3 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, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
riece-8.0.0/README 0000644 0001750 0001750 00000002357 11400046556 010417 0000000 0000000 * What's this?
Riece is an IRC client for Emacs.
Riece provides the following features:
- Several IRC servers may be used at the same time.
- Essential features can be built upon the extension framework (called
"add-on") capable of dependency tracking.
- Installation is easy. Riece doesn't depend on other packages.
- Setup is easy. Automatically save/restore the configuration.
- Riece uses separate windows to display users, channels, and
dialogues. The user can select the window layout.
- Step-by-step instructions (in info format) are included.
- Mostly compliant with RFC 2812.
* Directory tree
This package contains following directories:
lisp/ - Emacs Lisp files.
doc/ - Documentation files.
* Requirements
- Emacs 20.7 or later / XEmacs 21.4 or later
- Ruby 1.8 or later (optional)
* Installation
$ ./configure
$ sudo make install
Add the following line to your Emacs startup file such as ~/.emacs.
(autoload 'riece "riece" "Start Riece" t)
If you are using XEmacs and want to install as a package, supply
"--with-xemacs" option to the configure script and use
"install-package" target instead of "install".
* Manuals
Info manuals are available after installation. To read, start Emacs
and type M-x info and select "Riece-en".
riece-8.0.0/lisp/ 0000755 0001750 0001750 00000000000 11570270205 010555 5 0000000 0000000 riece-8.0.0/lisp/riece-rdcc.el 0000644 0001750 0001750 00000031266 11570265470 013037 0000000 0000000 ;;; riece-rdcc.el --- DCC file sending protocol support (written in Ruby) -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-globals)
(require 'riece-misc)
(require 'riece-channel)
(require 'riece-identity)
(require 'riece-ctcp) ;for riece-ctcp-additional-clientinfo
(require 'riece-ruby)
(require 'riece-mcat)
(defgroup riece-rdcc nil
"DCC written in Ruby."
:prefix "riece-"
:group 'riece)
(defcustom riece-rdcc-server-address nil
"Local address of the DCC server.
Only used for sending files."
:type 'string
:group 'riece-rdcc)
(defcustom riece-rdcc-server-port nil
"Local port of the DCC server.
Only used for sending files."
:type 'integer
:group 'riece-rdcc)
(defcustom riece-rdcc-send-program
'("\
require 'socket'
address = " address "
port = " port "
unless address
sock = UDPSocket.new
sock.connect('164.46.176.4', 7) # www.unixuser.org/echo
address = sock.getsockname[4 .. 7].unpack('CCCC').join('.')
end
server = TCPServer.new(address, port)
output(\"#{server.addr[3].split(/\\./).collect{|c| c.to_i}.pack('CCCC').unpack('N')[0]} #{server.addr[1]}\")
session = server.accept
if session
total = 0
File.open(" file ") {|file|
while (bytes = file.read(" block-size "))
total += bytes.length
output(total)
session.write(bytes)
begin
buf = session.read(4)
end until buf.unpack('N')[0] == total
end
}
session.close
end
")
"Ruby program to send file with DCC."
:type 'sexp
:group 'riece-rdcc)
(defcustom riece-rdcc-decode-address-program
'("\"#{" address " >> 24 & 0xFF}.#{" address " >> 16 & 0xFF}.#{"
address " >> 8 & 0xFF}.#{" address " & 0xFF}\"")
"Ruby program to numeric IP address."
:type 'sexp
:group 'riece-rdcc)
(defcustom riece-rdcc-save-directory nil
"Default directory where received files are saved in."
:type 'directory
:group 'riece-rdcc)
(defcustom riece-rdcc-block-size 1024
"Number of bytes sent as a block."
:type 'integer
:group 'riece-rdcc)
(defvar riece-rdcc-requests nil)
(defvar riece-rdcc-request-user nil)
(defvar riece-rdcc-request-file nil)
(defvar riece-rdcc-request-size nil)
(defvar riece-rdcc-temp-file nil)
(defvar riece-rdcc-received-size nil)
(defconst riece-rdcc-description
"DCC file sending protocol support (written in Ruby.)")
(defvar temporary-file-directory)
(defvar jka-compr-compression-info-list)
(defvar jam-zcat-filename-list)
(defun riece-rdcc-output-handler (name output _time)
(if (string-match "\\([0-9]+\\) \\([0-9]+\\)" output)
(let ((address (match-string 1 output))
(port (match-string 2 output)))
(riece-send-string
(format "PRIVMSG %s :\1DCC SEND %s %s %s %d\1\r\n"
(riece-identity-prefix
(riece-ruby-property name 'riece-rdcc-request-user))
(file-name-nondirectory
(riece-ruby-property name 'riece-rdcc-request-file))
address port
(riece-ruby-property name 'riece-rdcc-request-size)))))
(riece-ruby-set-output-handler name #'riece-rdcc-output-handler-2))
(defun riece-rdcc-output-handler-2 (name output _time)
(message (riece-mcat "Sending %s...(%s/%d)")
(riece-ruby-property name 'riece-rdcc-request-file)
(string-to-number output)
(riece-ruby-property name 'riece-rdcc-request-size)))
(defun riece-rdcc-exit-handler (name)
(message (riece-mcat "Sending %s...done")
(riece-ruby-property name 'riece-rdcc-request-file)))
(defun riece-command-dcc-send (user file)
(interactive
(let ((completion-ignore-case t))
(list (riece-completing-read-identity
(riece-mcat "User: ")
(riece-get-users-on-server (riece-current-server-name)))
(expand-file-name (read-file-name (riece-mcat "File: "))))))
(let ((name (riece-ruby-execute
(riece-ruby-substitute-variables
riece-rdcc-send-program
(list (cons 'address
(if riece-rdcc-server-address
(concat "'" riece-rdcc-server-address
"'")
"nil"))
(cons 'port
(if riece-rdcc-server-port
(number-to-string riece-rdcc-server-port)
"0"))
(cons 'file
(concat "'" file "'"))
(cons 'block-size
(number-to-string
riece-rdcc-block-size)))))))
(riece-ruby-set-property name 'riece-rdcc-request-user user)
(riece-ruby-set-property name 'riece-rdcc-request-file file)
(riece-ruby-set-property name 'riece-rdcc-request-size
(nth 7 (file-attributes file)))
(riece-ruby-set-output-handler name #'riece-rdcc-output-handler)
(riece-ruby-set-exit-handler name #'riece-rdcc-exit-handler)))
(defun riece-rdcc-filter (process input)
(with-current-buffer (process-buffer process)
(erase-buffer)
(insert input)
(let ((coding-system-for-write 'binary)
jka-compr-compression-info-list jam-zcat-filename-list)
(write-region (point-min) (point-max) riece-rdcc-temp-file t 0))
(setq riece-rdcc-received-size (+ (buffer-size) riece-rdcc-received-size))
(process-send-string
process
(format "%c%c%c%c"
(lsh riece-rdcc-received-size -24)
(logand (lsh riece-rdcc-received-size -16) 255)
(logand (lsh riece-rdcc-received-size -8) 255)
(logand riece-rdcc-received-size 255)))
(message (riece-mcat "Receiving %s from %s...(%s/%s)")
(file-name-nondirectory riece-rdcc-request-file)
riece-rdcc-request-user
(riece-rdcc-format-size riece-rdcc-received-size)
(riece-rdcc-format-size riece-rdcc-request-size))
(if (= riece-rdcc-received-size riece-rdcc-request-size)
(set-process-filter process nil))))
(defun riece-rdcc-sentinel (process _status)
(with-current-buffer (process-buffer process)
(unless (= riece-rdcc-received-size riece-rdcc-request-size)
(error "Premature end of file"))
(message (riece-mcat "Receiving %s from %s...done")
(file-name-nondirectory riece-rdcc-request-file)
riece-rdcc-request-user)
(condition-case nil
(progn
(rename-file riece-rdcc-temp-file riece-rdcc-request-file)
(delete-directory (file-name-directory riece-rdcc-temp-file)))
(file-already-exists
(error "Can't save %s. Temporarily saved in %s"
riece-rdcc-request-file riece-rdcc-temp-file))))
(kill-buffer (process-buffer process)))
(defun riece-rdcc-decode-address (address)
(let ((name (riece-ruby-execute
(riece-ruby-substitute-variables
riece-rdcc-decode-address-program
(list (cons 'address address)))))
response)
(while (equal (nth 2 (setq response (riece-ruby-inspect name))) "running")
(accept-process-output riece-ruby-process))
(riece-ruby-clear name)
(nth 1 response)))
(defun riece-command-dcc-receive (request file)
(interactive
(progn
(unless riece-rdcc-requests
(error "No request"))
(let* ((request
(if (= (length riece-rdcc-requests) 1)
(car riece-rdcc-requests)
(with-output-to-temp-buffer "*Help*"
(let ((requests riece-rdcc-requests)
(index 1))
(while requests
(princ (format (riece-mcat "%2d: %s %s (%d bytes)\n")
index
(car (car requests))
(nth 1 (car requests))
(nth 4 (car requests))))
(setq index (1+ index)
requests (cdr requests)))))
(let ((number (read-string "Request#: ")))
(unless (string-match "^[0-9]+$" number)
(error "Not a number"))
(if (or (> (setq number (string-to-number number))
(length riece-rdcc-requests))
(< number 1))
(error "Invalid number"))
(nth (1- number) riece-rdcc-requests))))
(default-name (expand-file-name
(convert-standard-filename (nth 1 request))
(or riece-rdcc-save-directory
default-directory))))
(list request
(expand-file-name
(read-file-name
(format (riece-mcat "Save as (default %s) ")
(file-name-nondirectory default-name))
(file-name-directory default-name)
default-name))))))
(let* ((temp-file (expand-file-name
(file-name-nondirectory file)
(expand-file-name (make-temp-name "riece-rdcc")
(if (featurep 'xemacs)
(temp-directory)
temporary-file-directory))))
(orig-mode (default-file-modes))
selective-display
(coding-system-for-read 'binary)
(coding-system-for-write 'binary)
process)
(unwind-protect
(progn
(set-default-file-modes 448)
;; This may throw an error.
(make-directory (file-name-directory temp-file)))
(set-default-file-modes orig-mode))
(setq process (open-network-stream
"DCC" (generate-new-buffer " *DCC*")
(riece-rdcc-decode-address (nth 2 request))
(nth 3 request)))
(setq riece-rdcc-requests (delq request riece-rdcc-requests))
(with-current-buffer (process-buffer process)
(if (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte nil))
(buffer-disable-undo)
(erase-buffer)
(make-local-variable 'riece-rdcc-request-user)
(setq riece-rdcc-request-user (car request))
(make-local-variable 'riece-rdcc-request-file)
(setq riece-rdcc-request-file file)
(make-local-variable 'riece-rdcc-request-size)
(setq riece-rdcc-request-size (nth 4 request))
(make-local-variable 'riece-rdcc-temp-file)
(setq riece-rdcc-temp-file temp-file)
(make-local-variable 'riece-rdcc-received-size)
(setq riece-rdcc-received-size 0))
(set-process-filter process #'riece-rdcc-filter)
(set-process-sentinel process #'riece-rdcc-sentinel)))
(defun riece-rdcc-format-size (size)
(if (< size 1024)
(format "%0.1f" size)
(setq size (/ size 1024.0))
(if (< size 1024)
(format "%0.1fKB" size)
(setq size (/ size 1024.0))
(if (< size 1024)
(format "%0.1fMB" size)
(format "%0.1fGB" (/ size 1024.0))))))
(defun riece-handle-dcc-request (prefix target message)
(let ((case-fold-search t))
(when (and (get 'riece-rdcc 'riece-addon-enabled)
(string-match
"SEND \\(\\([^ ]+\\)\\|\"\\(.+\\)\"\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\)"
message))
(let ((file (or (match-string 2 message)
(match-string 3 message)))
(address (match-string 4 message))
(port (string-to-number (match-string 5 message)))
(size (string-to-number (match-string 6 message)))
(buffer (if (riece-channel-p target)
(riece-channel-buffer (riece-make-identity
target riece-server-name))))
(user (riece-prefix-nickname prefix)))
(setq riece-rdcc-requests
(cons (list user file address port size)
riece-rdcc-requests))
(message "%s"
(with-current-buffer (window-buffer (selected-window))
(substitute-command-keys
(format
(riece-mcat
"Type \\[riece-command-dcc-receive] to receive")
user))))
(riece-insert-change buffer (format "DCC SEND from %s: %s (%s)\n"
user file
(riece-rdcc-format-size size)))
(riece-insert-change
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(format "DCC SEND from %s (%s) to %s: %s (%s)"
user
(riece-strip-user-at-host
(riece-prefix-user-at-host prefix))
(riece-decode-coding-string target)
file
(riece-rdcc-format-size size)))
"\n")))
t)))
(defun riece-rdcc-requires ()
'(riece-ctcp))
(defvar riece-dialogue-mode-map)
(defun riece-rdcc-insinuate ()
(add-to-list 'riece-ctcp-additional-clientinfo "DCC")
(add-hook 'riece-ctcp-dcc-request-hook 'riece-handle-dcc-request))
(defun riece-rdcc-uninstall ()
(setq riece-ctcp-additional-clientinfo
(delete "DCC" riece-ctcp-additional-clientinfo))
(remove-hook 'riece-ctcp-dcc-request-hook 'riece-handle-dcc-request))
(defun riece-rdcc-enable ()
(define-key riece-dialogue-mode-map "\C-ds" 'riece-command-dcc-send)
(define-key riece-dialogue-mode-map "\C-dr" 'riece-command-dcc-receive))
(defun riece-rdcc-disable ()
(define-key riece-dialogue-mode-map "\C-ds" nil)
(define-key riece-dialogue-mode-map "\C-dr" nil))
(provide 'riece-rdcc)
;;; riece-rdcc.el ends here
riece-8.0.0/lisp/riece-yank.el 0000644 0001750 0001750 00000006316 11570265470 013064 0000000 0000000 ;;; riece-yank.el --- enter the element of kill-ring -*- lexical-binding: t -*-
;; Copyright (C) 2004 Masatake YAMATO
;; Author: Masatake YAMATO
;; Keywords: IRC, riece
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-commands)
(defgroup riece-yank nil
"Enter the element of kill-ring."
:tag "Yank"
:prefix "riece-"
:group 'riece)
(defcustom riece-yank-tick 1
"Time span in second to send multiple lines."
:type 'number
:group 'riece-yank)
(defcustom riece-yank-strip-space nil
"If non-nil, strip common spaces in front of lines and blank lines
before/after the first/last non-blank line."
:type 'boolean
:group 'riece-yank)
(defconst riece-yank-description
"Enter the element of kill-ring.")
(defun riece-yank-insinuate ()
)
(defvar riece-command-mode-map)
(defun riece-yank-enable ()
(define-key riece-command-mode-map "\C-cy" 'riece-command-yank))
(defun riece-yank-disable ()
(define-key riece-command-mode-map "\C-cy" 'undefined))
(defun riece-yank-strip-space (string)
(with-temp-buffer
(insert string)
(untabify (point-min) (point-max))
;; Delete blank lines before the first non-blank line.
(goto-char (point-min))
(while (looking-at " *$")
(delete-region (point) (progn (forward-line) (point))))
;; Delete blank lines after the last non-blank line.
(goto-char (point-max))
(while (progn (beginning-of-line) (looking-at " *$"))
(delete-region (point) (progn (end-of-line 0) (point))))
;; Delete common spaces in front of lines.
(let ((space-width (point-max)))
(while (looking-at " +")
(setq space-width (min space-width (length (match-string 0))))
(forward-line))
(goto-char (point-min))
(while (not (eobp))
(delete-char space-width)
(forward-line)))
(buffer-string)))
(defun riece-command-yank (arg prefix)
(interactive "P\nsPrefix: ")
(when (or (not prefix)
(string= prefix ""))
(setq prefix " "))
(let* ((kill (current-kill 0))
msg)
(unless kill
(error "Nothing to send in kill-ring"))
(if riece-yank-strip-space
(setq kill (riece-yank-strip-space kill)))
(setq msg (split-string kill "\n"))
(when (y-or-n-p (format "Send \"%s\"\n? " kill))
(mapcar
(lambda (x)
(riece-command-send-message (concat prefix x) arg)
;; Without next line, you will be kicked out from ircd.
;; It may mean "Don't send much data at once."
(sit-for riece-yank-tick))
msg))))
(provide 'riece-yank)
;;; riece-yank.el ends here
riece-8.0.0/lisp/riece-command-join.xpm 0000644 0001750 0001750 00000010445 11400046556 014671 0000000 0000000 /* XPM */
static char *riece_command_join[] = {
/* columns rows colors chars-per-pixel */
"24 24 189 2",
" c #EDD400",
". c #F2F02B",
"X c #F5F328",
"o c #F5F329",
"O c #F4F22A",
"+ c #F5F32A",
"@ c #F2F02C",
"# c #F4F22D",
"$ c #EBE933",
"% c #EDEC32",
"& c #80827E",
"* c #D1D150",
"= c #D2D25E",
"- c #E0DF40",
"; c #E3E242",
": c #EFEE4F",
"> c #E4E351",
", c #F0EF55",
"< c #F2F152",
"1 c #F2F157",
"2 c #C2C261",
"3 c #CDCD66",
"4 c #EFEE60",
"5 c #ECEC6B",
"6 c #F1F063",
"7 c #F7F66E",
"8 c #EFEF70",
"9 c #EEEE74",
"0 c #E2E27D",
"q c #ECEB79",
"w c #EBEB7D",
"e c #EBEC7C",
"r c #F0EF76",
"t c #F1F177",
"y c #F7F677",
"u c #F1F07E",
"i c #838581",
"p c #8A8C87",
"a c #8B8D88",
"s c #8C8E88",
"d c #8C8E89",
"f c #8D8F8A",
"g c #8D908A",
"h c #8E908B",
"j c #8F918B",
"k c #90928C",
"l c #91938E",
"z c #92948F",
"x c #93958F",
"c c #939590",
"v c #949691",
"b c #959892",
"n c #979993",
"m c #989A95",
"M c #999B96",
"N c #9A9D97",
"B c #9C9E98",
"V c #9D9F9A",
"C c #9FA283",
"Z c #9EA19B",
"A c #9FA29C",
"S c #BEBF81",
"D c #A1A39D",
"F c #A2A59E",
"G c #ABAE9D",
"H c #B3B594",
"J c #A3A6A0",
"K c #A4A7A1",
"L c #A6A9A2",
"P c #A6A9A3",
"I c #A7A9A3",
"U c #A7AAA3",
"Y c #A7AAA4",
"T c #A8AAA4",
"R c #AAADA6",
"E c #ABAEA7",
"W c #EBEB86",
"Q c #EDED8D",
"! c #EEEE8E",
"~ c #EFEE8F",
"^ c #F0EF8D",
"/ c #F1F082",
"( c #F9F780",
") c #F0F08D",
"_ c #E9E995",
"` c #ECEC96",
"' c #EAEB98",
"] c #ECEB99",
"[ c #F0F09D",
"{ c #E7E9A2",
"} c #E8E8A5",
"| c #E8E9A5",
" . c #E9EAA6",
".. c #E6E8AB",
"X. c #E7E8AD",
"o. c #EDEDAB",
"O. c #EBEBAF",
"+. c #FBFAAC",
"@. c #EFEFB5",
"#. c #E5E7BB",
"$. c #E7E8BE",
"%. c #F0F0B2",
"&. c #F1F0B5",
"*. c #F2F2B7",
"=. c #F7F7BB",
"-. c #DADBD9",
";. c #DDDEDB",
":. c #E5E7C3",
">. c #E4E5CB",
",. c #E4E6CB",
"<. c #E5E7CB",
"1. c #F0F0C1",
"2. c #F0F0C7",
"3. c #FBFBCA",
"4. c #E3E5D0",
"5. c #E3E5D3",
"6. c #E4E6D0",
"7. c #E4E6D4",
"8. c #EAEBD1",
"9. c #E4E7D8",
"0. c #E2E4DF",
"q. c #E2E5DF",
"w. c #E4E6DD",
"e. c #E5E7DE",
"r. c #E7E8D9",
"t. c #ECEDDC",
"y. c #EFF0D1",
"u. c #EFF0DA",
"i. c #FBFBD5",
"p. c #FAFADA",
"a. c #FCFBD8",
"s. c #E2E4E0",
"d. c #E3E4E0",
"f. c #E2E5E0",
"g. c #E3E5E0",
"h. c #E3E5E1",
"j. c #E4E6E1",
"k. c #E4E6E2",
"l. c #E4E7E2",
"z. c #E5E7E2",
"x. c #E5E7E3",
"c. c #E6E7E3",
"v. c #E5E8E3",
"b. c #E6E8E4",
"n. c #E7E8E4",
"m. c #E7E9E5",
"M. c #E8E9E6",
"N. c #E8EAE6",
"B. c #E9EAE6",
"V. c #E9EAE7",
"C. c #E9EBE7",
"Z. c #EAEBE8",
"A. c #EBECE9",
"S. c #ECEDEA",
"D. c #ECEEEB",
"F. c #EDEEEB",
"G. c #EDEFEB",
"H. c #EDEEEC",
"J. c #EEEEEC",
"K. c #EEEFEC",
"L. c #EFEFED",
"P. c #EFF0E9",
"I. c #EFF0ED",
"U. c #EFF0EE",
"Y. c #F0F0EE",
"T. c #F0F1EF",
"R. c #F1F1EF",
"E. c #FDFCEA",
"W. c #FDFCEC",
"Q. c #FEFDEC",
"!. c #FEFEEF",
"~. c #F1F1F0",
"^. c #F1F2F0",
"/. c #F2F2F0",
"(. c #F2F2F1",
"). c #F2F3F1",
"_. c #F3F3F2",
"`. c #F3F4F2",
"'. c #F4F4F3",
"]. c #F5F5F4",
"[. c #FEFEF6",
"{. c #FEFEF7",
"}. c #FDFDF9",
"|. c #FEFEF8",
" X c #FEFEFA",
".X c #FEFEFB",
"XX c #FEFEFE",
"oX c gray100",
"OX c None",
/* pixels */
"OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
"OXOXOXE T Y Y U I P G H S 3 OXOXOXOXOXOXOXOXOXOX",
"OXOXR ;.XXoXoXoXoXQ.p.*.] 0 = > O OXOXOXOXOXOXOX",
"OXOXL XXG.C.N.b.9.:. .! t 6 ; @ + OXOXOXOXOX",
"OXOXK oXN.m.b.e.<...` 5 : {.oX % O + OXOXOXOX",
"OXOXJ oXb.v.l.7.#._ 3.oXoX!. + OXOXOX",
"OXOXF oXl.k.j.6.X. =.}.oXoXoXoXoXoXoXa. OXOXOX",
"OXOXD oXj.h.g.,.} w .XoXoXoXoXoXoXoX o + OXOX",
"OXOXA oXg.f.f.>.{ q y XXoXoXoXoXoXi. o + OXOX",
"OXOXZ oXd.f.q.4.| e , W.oXoXoXoXoX . o + OXOX",
"OXOXV oX0.f.s.5.X.W 4 XoXoXoXoXoX $ o OXOXOX",
"OXOXB oXf.g.h.w.$.' 9 oX[. E.oX - + OXOXOX",
"OXOXN oXz.x.c.b.r.O.Q 8 # X 7 * OXOXOXOX",
"OXOXM oXn.m.M.N.V.8.o.~ r 6 1 < 1 6 ( 2 OXOXOXOX",
"OXOXm oXB.C.Z.A.A.S.t.@.[ ) / u / ^ +.C OXOXOXOX",
"OXOXn oXZ.A.S.F.H.K.L.P.u.2.&.%.1.y.|.z OXOXOXOX",
"OXOXb oXA.S.F.K.I.Y.R.^.(.).).(./.R.oXl OXOXOXOX",
"OXOXv oXS.F.K.I.Y.R./._.'.].].'._.).oXk OXOXOXOX",
"OXOXc oXS.F.J.L.U.T.^.)._.`.`._.)./.oXh OXOXOXOX",
"OXOXx XXF.S.D.H.K.I.Y.T.T.R.R.R.T.~.XXh OXOXOXOX",
"OXOXg -.XXoXoXoXoXoXoXoXoXoXoXoXoXXX-.p OXOXOXOX",
"OXOXOXi j h h h g f f f d d d s a d & OXOXOXOXOX",
"OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
"OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX"
};
riece-8.0.0/lisp/riece-300.el 0000644 0001750 0001750 00000040172 11570265470 012422 0000000 0000000 ;;; riece-300.el --- handlers for 300 replies -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-misc)
(require 'riece-naming)
(require 'riece-signal)
(require 'riece-display)
(eval-when-compile
(autoload 'riece-default-handle-numeric-reply "riece-handle"))
(defun riece-handle-default-300-message (prefix number name string)
(riece-default-handle-numeric-reply
riece-info-prefix prefix number name string))
(defun riece-handle-302-message (_prefix _number _name string)
"RPL_USERHOST \":*1 *( \" \" )\""
(let ((replies (split-string (if (eq (aref string 0) ?:)
(substring string 1)
string)
" ")))
(while replies
(if (string-match
(concat "^\\([^ ]+\\)\\(\\*\\)?=\\([-+]\\)\\([^ ]+\\)")
(car replies))
(let ((user (match-string 1 (car replies)))
(operator (not (null (match-beginning 2))))
(away (eq (match-string 3 (car replies)) ?-))
(user-at-host (match-string 4 (car replies)))
status)
(if away
(setq status (cons "away" status)))
(if operator
(setq status (cons "operator" status)))
(riece-user-toggle-away user away)
(riece-emit-signal 'user-away-changed
(riece-make-identity user riece-server-name)
away)
(riece-user-toggle-operator user operator)
(riece-emit-signal 'user-operator-changed
(riece-make-identity user riece-server-name)
operator)
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(riece-concat-user-status
status
(format (riece-mcat "%s is (%s)")
(riece-format-identity
(riece-make-identity user riece-server-name)
t)
(riece-strip-user-at-host user-at-host))))
"\n"))))
(setq replies (cdr replies)))))
(defun riece-handle-303-message (_prefix _number _name string)
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(concat (riece-mcat "Online: ")
(mapconcat
(lambda (user)
(riece-format-identity
(riece-make-identity user riece-server-name)
t))
(split-string (if (eq (aref string 0) ?:)
(substring string 1)
string)
" ")
"")))
"\n")))
(defun riece-handle-301-message (_prefix _number _name string)
(if (string-match (concat "^\\([^ ]+\\) :?") string)
(let ((user (match-string 1 string))
(message (substring string (match-end 0))))
(riece-user-toggle-away user t)
(riece-emit-signal 'user-away-changed
(riece-make-identity user riece-server-name)
t)
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "%s is away: %s")
(riece-format-identity
(riece-make-identity user riece-server-name)
t)
message))
"\n")))))
(defun riece-handle-305-message (_prefix _number _name _string)
(riece-user-toggle-away riece-real-nickname nil)
(riece-emit-signal 'user-away-changed
(riece-make-identity riece-real-nickname
riece-server-name)
nil))
(defun riece-handle-306-message (_prefix _number _name _string)
(riece-user-toggle-away riece-real-nickname t)
(riece-emit-signal 'user-away-changed
(riece-make-identity riece-real-nickname
riece-server-name)
t))
(defun riece-handle-311-message (_prefix _number _name string)
(if (string-match
(concat "^\\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\* :?")
string)
(let ((user (match-string 1 string))
(name (substring string (match-end 0)))
(user-at-host (concat (match-string 2 string) "@"
(match-string 3 string))))
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "%s is %s (%s)")
(riece-format-identity
(riece-make-identity user riece-server-name)
t)
name
user-at-host))
"\n")))))
(defun riece-handle-312-message (_prefix _number _name string)
(if (string-match
(concat "^\\([^ ]+\\) \\([^ ]+\\) :?")
string)
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "on via server %s: %s")
(match-string 2 string)
(substring string (match-end 0))))
"\n"))))
(defun riece-handle-313-message (_prefix _number _name string)
(if (string-match "^[^ ]+" string)
(let ((user (match-string 0 string)))
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(format "%s is an IRC operator"
(riece-format-identity
(riece-make-identity user riece-server-name)
t)))
"\n")))))
(defun riece-handle-317-message (_prefix _number _name string)
(if (string-match
(concat "^\\([^ ]+\\) \\([0-9]+\\) ")
string)
(let* ((user (match-string 1 string))
(seconds (string-to-number (match-string 2 string)))
(units (list (cons (/ seconds 60 60 24) (riece-mcat "days"))
(cons (mod (/ seconds 60 60) 24)
(riece-mcat "hours"))
(cons (mod (/ seconds 60) 60) (riece-mcat "minutes"))
(cons (mod seconds 60) (riece-mcat "seconds")))))
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "%s is %s idle")
(riece-format-identity
(riece-make-identity user riece-server-name)
t)
(mapconcat #'identity
(delq nil
(mapcar
(lambda (unit)
(if (/= (car unit) 0)
(format "%d %s"
(car unit) (cdr unit))))
units))
" ")))
"\n")))))
(defun riece-handle-319-message (_prefix _number _name string)
(if (string-match (concat "^\\([^ ]+\\) :?") string)
(let ((user (match-string 1 string))
(channels
(mapconcat
(lambda (channel)
(if (string-match
(concat "^\\([@+]?\\)\\(" riece-channel-regexp "\\)")
channel)
(concat
(match-string 1 channel)
(riece-format-identity
(riece-make-identity (match-string 2 channel)
riece-server-name)
t))))
(split-string (substring string (match-end 0)) " ")
" ")))
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(format "%s: %s"
(riece-format-identity
(riece-make-identity user riece-server-name)
t)
channels))
"\n")))))
(defun riece-handle-351-message (_prefix _number _name string)
(if (string-match "\\([^ ]+\\.[^ ]+\\) \\([^ ]+\\) :?" string)
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "%s is running on %s: %s")
(match-string 1 string)
(match-string 2 string)
(substring string (match-end 0))))
"\n"))))
(defvar riece-353-message-alist nil)
(defun riece-handle-353-message (_prefix _number _name string)
"RPL_NAMREPLY \"[=\*@] :[[@|+] [[@|+] [...]]]\"."
(make-local-variable 'riece-353-message-alist)
(if (string-match "^[=\*@] *\\([^ ]+\\) +:?" string)
(let* ((channel (match-string 1 string))
(entry (riece-identity-assoc channel riece-353-message-alist t)))
(if entry
(setcdr entry
(concat (cdr entry)
(substring string (match-end 0)) " "))
(setq riece-353-message-alist
(cons (cons channel
(concat (substring string (match-end 0)) " "))
riece-353-message-alist))))))
(defun riece-handle-322-message (_prefix _number _name decoded)
(let* ((parameters (riece-split-parameters (riece-decoded-string decoded)))
(channel (car parameters))
(visible (nth 1 parameters))
(channel-identity (riece-make-identity channel riece-server-name))
(buffer (riece-channel-buffer channel-identity))
topic)
(setq parameters (riece-split-parameters
(riece-decoded-string-for-identity decoded
channel-identity))
topic (nth 2 parameters))
(riece-channel-set-topic (riece-get-channel channel) topic)
(riece-insert-info buffer (format (riece-mcat "%s users, topic: %s\n")
visible topic))
(riece-insert-info
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "%s: %s users, topic: %s")
(riece-format-identity channel-identity t) visible topic))
"\n"))))
(defun riece-handle-324-message (_prefix _number _name string)
(if (string-match "^\\([^ ]+\\) \\([^ ]+\\) " string)
(let* ((channel (match-string 1 string))
(mode-string (match-string 2 string)))
(riece-naming-assert-channel-modes channel
(riece-parse-modes mode-string))
(let* ((channel-identity (riece-make-identity channel
riece-server-name))
(buffer (riece-channel-buffer channel-identity)))
(riece-insert-info buffer (concat (riece-mcat "Mode: ") mode-string
"\n"))
(riece-insert-info
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "Mode for %s: %s")
(riece-format-identity channel-identity t)
mode-string))
"\n"))))))
(defun riece-handle-set-topic (_prefix _number _name decoded remove)
(let* ((parameters (riece-split-parameters (riece-decoded-string decoded)))
(channel (car parameters))
topic
(channel-identity (riece-make-identity channel riece-server-name))
(buffer (riece-channel-buffer channel-identity)))
(if remove
(riece-channel-set-topic (riece-get-channel channel) nil)
(setq parameters (riece-split-parameters
(riece-decoded-string-for-identity decoded
channel-identity))
topic (nth 1 parameters))
(riece-channel-set-topic (riece-get-channel channel) topic)
(riece-insert-info buffer (concat (riece-mcat "Topic: ") topic "\n"))
(riece-insert-info
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "Topic for %s: %s")
(riece-format-identity channel-identity t)
topic))
"\n")))
(riece-emit-signal 'channel-topic-changed channel-identity topic)))
(defun riece-handle-331-message (prefix number name string)
(riece-handle-set-topic prefix number name string t))
(defun riece-handle-332-message (prefix number name string)
(riece-handle-set-topic prefix number name string nil))
(defun riece-handle-341-message (_prefix _number _name string)
(if (string-match "^\\([^ ]+\\) " string)
(let* ((channel (substring string (match-end 0)))
(user (match-string 1 string))
(channel-identity (riece-make-identity channel riece-server-name))
(buffer (riece-channel-buffer channel-identity)))
(riece-insert-info buffer (format (riece-mcat "Inviting %s\n") user))
(riece-insert-info
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "Inviting %s to %s") user
(riece-format-identity channel-identity t)))
"\n")))))
(defun riece-handle-352-message (_prefix _number _name string)
(if (string-match "^\\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([HG]\\)\\(\\*\\)?\\([@+]\\)? :\\([0-9]+\\) " string)
(let* ((channel (match-string 1 string))
(user (match-string 2 string))
(host (match-string 3 string))
(server (match-string 4 string))
(nick (match-string 5 string))
(away (equal (match-string 6 string) "G"))
(operator (not (null (match-beginning 7))))
(flag (match-string 8 string))
(hops (match-string 9 string))
(name (substring string (match-end 0)))
(buffer (riece-channel-buffer (riece-make-identity
channel riece-server-name)))
(info (format "%10s = %s (%s)"
(concat
(if (memq flag '(?@ ?+))
(char-to-string flag)
" ")
(riece-format-identity
(riece-make-identity nick riece-server-name)
t))
name
(riece-strip-user-at-host
(concat user "@" host))))
status)
(if operator
(setq status (cons "operator" status)))
(if away
(setq status (cons "away" status)))
(unless (equal hops "0")
(setq status (cons (concat "on " server)
(cons (concat hops " hops")
status))))
(if status
(setq status (nreverse status)))
(riece-naming-assert-join nick channel)
(riece-user-toggle-away user away)
(riece-emit-signal 'user-away-changed
(riece-make-identity user riece-server-name)
away)
(riece-user-toggle-operator user operator)
(riece-emit-signal 'user-operator-changed
(riece-make-identity user riece-server-name)
operator)
(riece-insert-info buffer (concat (riece-concat-user-status
status info)
"\n"))
(riece-insert-info
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(riece-concat-user-status
status
(concat
(riece-format-identity
(riece-make-identity channel riece-server-name)
t)
" "
info)))
"\n")))))
(defun riece-handle-315-message (_prefix _number _name _string))
(defun riece-handle-318-message (_prefix _number _name _string))
(defun riece-handle-323-message (_prefix _number _name _string))
(defun riece-handle-366-message (_prefix _number _name string)
"RPL_ENDOFNAMES \" :End of NAMES list\""
(if (string-match "^\\([^ ]+\\) " string)
(let* ((channel (match-string 1 string))
(channel-identity (riece-make-identity channel
riece-server-name))
(buffer (riece-channel-buffer channel-identity))
(entry (riece-identity-assoc channel riece-353-message-alist t))
(string (cdr entry))
(start 0)
users)
(if entry
(setq riece-353-message-alist
(delq entry riece-353-message-alist)))
(while (string-match
(concat "\\([@+]\\)?\\([^ ]+\\) +")
string start)
(put-text-property (match-beginning 2) (match-end 2)
'riece-identity
(riece-make-identity (match-string 2 string)
riece-server-name)
string)
(setq start (match-end 0)
users (cons (if (match-beginning 1)
(if (eq (aref string (match-beginning 1)) ?@)
(list (match-string 2 string) ?o)
(if (eq (aref string (match-beginning 1)) ?+)
(list (match-string 2 string) ?v)))
(list (match-string 2 string)))
users)))
(setq users (nreverse users))
(riece-naming-assert-channel-users users channel)
(riece-insert-info
buffer
(concat (format (riece-mcat "%d users: ") (length users)) string
"\n"))
(riece-insert-info
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(concat (format (riece-mcat "%d users on %s: ")
(length users)
(riece-format-identity channel-identity t))
string))
"\n")))))
(provide 'riece-300)
;;; riece-300.el ends here
riece-8.0.0/lisp/riece-user.el 0000644 0001750 0001750 00000012173 11570265470 013076 0000000 0000000 ;;; riece-user.el --- a user object -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-identity)
(require 'riece-mode)
(require 'riece-cache)
;;; User object:
(defun riece-find-user (name)
"Get a user object named NAME from the server buffer."
(riece-cache-get riece-user-cache name)
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
riece-user-obarray)))
(if symbol
(symbol-value symbol))))
(defun riece-forget-user (name)
(riece-cache-delete riece-user-cache name)
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix name))))
(when symbol
(makunbound symbol)
(unintern (symbol-name symbol) riece-user-obarray))))
(defun riece-rename-user (old-name new-name)
(riece-cache-delete riece-user-cache old-name)
(riece-cache-set riece-user-cache new-name new-name)
(unless (equal (riece-identity-canonicalize-prefix old-name)
(riece-identity-canonicalize-prefix new-name))
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix old-name)
riece-user-obarray)))
(when symbol
(set (intern (riece-identity-canonicalize-prefix new-name)
riece-user-obarray)
(symbol-value symbol))
(makunbound symbol)
(unintern (symbol-name symbol) riece-user-obarray)))))
(defun riece-make-user (channels user-at-host modes away operator)
"Make an instance of user object.
Arguments are appropriate to joined channels, user-at-host, mode, and
away status, respectively."
(vector channels user-at-host modes away operator))
(defun riece-get-user (name)
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
riece-user-obarray)))
(if symbol
(progn
(riece-cache-get riece-user-cache name)
(symbol-value symbol))
(riece-cache-set riece-user-cache name name)
(set (intern (riece-identity-canonicalize-prefix name)
riece-user-obarray)
(riece-make-user nil nil nil nil nil)))))
(defun riece-user-channels (user)
"Return joined channels of USER."
(aref user 0))
(defun riece-user-user-at-host (user)
"Return the user-at-host of USER."
(aref user 1))
(defun riece-user-modes (user)
"Return the modes of USER."
(aref user 2))
(defun riece-user-away (user)
"Return t, if USER has been marked as away."
(aref user 3))
(defun riece-user-operator (user)
"Return t, if USER has operator privilege."
(aref user 4))
(defun riece-user-set-channels (user value)
"Set the joined channels of USER to VALUE."
(aset user 0 value))
(defun riece-user-set-user-at-host (user value)
"Set the user-at-host of USER to VALUE."
(aset user 1 value))
(defun riece-user-set-modes (user value)
"Set the modes of USER to VALUE."
(aset user 2 value))
(defun riece-user-set-away (user value)
"Set the away status of USER to VALUE."
(aset user 3 value))
(defun riece-user-set-operator (user value)
"Set the operator status of USER to VALUE."
(aset user 4 value))
(defun riece-user-get-channels (name)
(riece-user-channels (riece-get-user name)))
(defun riece-user-get-user-at-host (name)
(riece-user-user-at-host (riece-get-user name)))
(defun riece-user-get-modes (name)
(riece-user-modes (riece-get-user name)))
(defun riece-user-get-away (name)
(riece-user-away (riece-get-user name)))
(defun riece-user-get-operator (name)
(riece-user-operator (riece-get-user name)))
(defun riece-user-toggle-channel (name channel flag)
"Add or remove the joined channel of user."
(let* ((user (riece-get-user name))
(channels (riece-user-channels user)))
(if flag
(unless (member channel channels)
(riece-user-set-channels user (cons channel channels)))
(if (setq channel (car (member channel channels)))
(riece-user-set-channels user (delq channel channels))))))
(defun riece-user-toggle-mode (name mode flag)
"Add or remove user MODE of user."
(let* ((user (riece-get-user name))
(modes (riece-user-modes user))
(old (riece-mode-assoc (riece-mode-flag mode) modes)))
(if flag
(unless old
(riece-user-set-modes user (cons mode modes)))
(if old
(riece-user-set-modes user (delq mode modes))))))
(defun riece-user-toggle-away (name flag)
(riece-user-set-away (riece-get-user name) flag))
(defun riece-user-toggle-operator (name flag)
(riece-user-set-operator (riece-get-user name) flag))
(provide 'riece-user)
;;; riece-user.el ends here
riece-8.0.0/lisp/Makefile.in 0000644 0001750 0001750 00000044177 11570270171 012561 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = lisp
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/riece-package-info.el.in ChangeLog
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = riece-package-info.el
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EMACS = @EMACS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
PACKAGE = @PACKAGE@
PACKAGEDIR = @PACKAGEDIR@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XEMACS = @XEMACS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
lispdir = @lispdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = test
EXTRA_DIST = COMPILE ChangeLog ChangeLog.Liece \
riece-000.el riece-200.el riece-300.el riece-400.el riece-500.el \
riece-addon-modules.el riece-addon.el riece-cache.el riece-channel.el \
riece-coding.el riece-commands.el riece-compat.el riece-complete.el \
riece-debug.el riece-display.el riece-emacs.el riece-filter.el \
riece-globals.el riece-handle.el riece-highlight.el riece-identity.el \
riece-mcat.el riece-message.el riece-misc.el riece-mode.el \
riece-naming.el riece-options.el riece-ruby.el riece-server.el \
riece-signal.el riece-user.el riece-version.el riece-xemacs.el \
riece-irc.el riece.el \
riece-mcat-japanese.el \
riece-ctcp.el riece-url.el riece-unread.el riece-ndcc.el \
riece-rdcc.el riece-log.el riece-mini.el riece-doctor.el \
riece-alias.el riece-layout.el riece-skk-kakutei.el riece-guess.el \
riece-history.el riece-button.el riece-keyword.el riece-menu.el \
riece-icon.el riece-async.el riece-lsdb.el riece-xface.el \
riece-ctlseq.el riece-ignore.el riece-hangman.el riece-biff.el \
riece-kakasi.el riece-foolproof.el riece-yank.el riece-toolbar.el \
riece-eval.el riece-google.el riece-keepalive.el riece-eval-ruby.el \
riece-shrink-buffer.el riece-xfaceb.el riece-epg.el riece-twitter.el \
riece-desktop-notify.el \
url-riece.el \
riece-command-previous-channel.xpm riece-command-next-channel.xpm \
riece-command-configure-windows.xpm riece-command-list-addons.xpm \
riece-command-join.xpm riece-command-part.xpm \
server.rb aproxy.rb
CLEANFILES = auto-autoloads.el custom-load.el *.elc lunit-report.xml
DISTCLEANFILES = riece-package-info.el
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lisp/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu lisp/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
riece-package-info.el: $(top_builddir)/config.status $(srcdir)/riece-package-info.el.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install-exec: install-exec-recursive
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
ctags-recursive install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am check-local clean clean-generic \
ctags ctags-recursive distclean distclean-generic \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
tags-recursive uninstall uninstall-am
FLAGS ?= -batch -q -no-site-file
all: elc
elc:
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile \
$(srcdir)
install: elc
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install \
$(srcdir) $(lispdir) # $(MAKE)
uninstall:
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-uninstall \
$(lispdir)
package:
$(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile-package \
$(srcdir)
install-package: package
$(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install-package \
$(srcdir) $(PACKAGEDIR) # $(MAKE)
check-local:
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-test \
$(srcdir) lunit-report.xml
compile-individually:
@for i in `$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-examine`; \
do \
echo $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \
-f riece-compile-module $$i; \
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \
-f riece-compile-module $$i; \
done
update-mcat:
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-update-mcat \
$(srcdir)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
riece-8.0.0/lisp/riece-cache.el 0000644 0001750 0001750 00000012677 11570265470 013174 0000000 0000000 ;;; riece-cache.el --- LRU cache -*- lexical-binding: t -*-
;; Copyright (C) 1998-2005 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(defun riece-cache-make-node (key value &optional previous next)
"Make riece-cache-node object."
(vector key value previous next))
(defun riece-cache-node-key (node)
"Return key of NODE."
(aref node 0))
(defun riece-cache-node-value (node)
"Return value of NODE."
(aref node 1))
(defun riece-cache-node-set-value (node value)
"Set value of NODE to VALUE."
(aset node 1 value))
(defun riece-cache-node-next (node)
"Return next of NODE."
(aref node 3))
(defun riece-cache-node-set-next (node next)
"Set next of NODE to NEXT."
(aset node 3 next))
(defun riece-cache-node-previous (node)
"Return previous of NODE."
(aref node 2))
(defun riece-cache-node-set-previous (node previous)
"Set previous of NODE to PREVIOUS."
(aset node 2 previous))
(defun riece-make-cache (max-length)
"Make riece-cache object."
(vector max-length (make-vector (* max-length 2) 0) 0 nil nil))
(defun riece-cache-max-length (cache)
"Return max-length of CACHE."
(aref cache 0))
(defun riece-cache-hash-obarray (cache)
"Return hash-obarray of CACHE."
(aref cache 1))
(defun riece-cache-hash-length (cache)
"Return hash-length of CACHE."
(aref cache 2))
(defun riece-cache-set-hash-length (cache hash-length)
"Set hash-length of CACHE to HASH-LENGTH."
(aset cache 2 hash-length))
(defun riece-cache-first (cache)
"Return first of CACHE."
(aref cache 3))
(defun riece-cache-set-first (cache first)
"Set first of CACHE to FIRST."
(aset cache 3 first))
(defun riece-cache-last (cache)
"Return last of CACHE."
(aref cache 4))
(defun riece-cache-set-last (cache last)
"Set last of CACHE to LAST."
(aset cache 4 last))
(defun riece-cache-contains (cache key)
"Return t if CACHE contains an entry whose key is KEY."
(intern-soft key (riece-cache-hash-obarray cache)))
(defun riece-cache-get (cache key)
"Return the value associated with KEY in CACHE.
If KEY is not associated in CACHE, it returns nil."
(let ((node (riece-cache-get-node cache key)))
(if node
(riece-cache-node-value node))))
(defun riece-cache-get-node (cache key)
"Return a node object associcated with KEY in CACHE.
If KEY is not associated in CACHE, it returns nil."
(let ((symbol (intern-soft key (riece-cache-hash-obarray cache)))
previous next last node)
(when symbol
(setq node (symbol-value symbol)
previous (riece-cache-node-previous node)
next (riece-cache-node-next node)
last (riece-cache-last cache))
(if previous
(riece-cache-node-set-next previous next))
(if next
(riece-cache-node-set-previous next previous))
(riece-cache-node-set-next node nil)
(riece-cache-node-set-previous node last)
(riece-cache-node-set-next last node)
(riece-cache-set-last cache node)
(if (and (eq node (riece-cache-first cache)) next)
(riece-cache-set-first cache next))
node)))
(defun riece-cache-delete (cache key)
"Remove an entry from CACHE whose key is KEY."
(let ((symbol (intern-soft key (riece-cache-hash-obarray cache)))
previous next node)
(when symbol
(setq node (symbol-value symbol)
previous (riece-cache-node-previous node)
next (riece-cache-node-next node))
(if previous
(riece-cache-node-set-next previous next))
(if next
(riece-cache-node-set-previous next previous))
(if (eq (riece-cache-last cache) node)
(riece-cache-set-last cache previous))
(if (eq (riece-cache-first cache) node)
(riece-cache-set-first cache next))
(unintern symbol (riece-cache-hash-obarray cache))
(riece-cache-set-hash-length cache
(1- (riece-cache-hash-length cache)))
(riece-cache-node-value node))))
(defun riece-cache-set (cache key value)
"Associate KEY with VALUE in CACHE."
(let ((node (riece-cache-get-node cache key)))
(if node
(riece-cache-node-set-value node value)
(if (>= (riece-cache-hash-length cache)
(riece-cache-max-length cache))
(riece-cache-delete cache (riece-cache-node-key
(riece-cache-first cache))))
(setq node (riece-cache-make-node key value (riece-cache-last cache)))
(set (intern key (riece-cache-hash-obarray cache)) node)
(riece-cache-set-hash-length cache
(1+ (riece-cache-hash-length cache)))
(unless (riece-cache-first cache)
(riece-cache-set-first cache node))
(when (riece-cache-last cache)
(riece-cache-node-set-next (riece-cache-last cache) node)
(riece-cache-node-set-previous node (riece-cache-last cache)))
(riece-cache-set-last cache node))))
(provide 'riece-cache)
;;; riece-cache.el ends here
riece-8.0.0/lisp/riece-naming.el 0000644 0001750 0001750 00000012461 11570265470 013371 0000000 0000000 ;;; riece-naming.el --- toplevel naming management -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-globals)
(require 'riece-channel)
(require 'riece-user)
(require 'riece-signal)
(defun riece-naming-assert-join (user-name channel-name)
(riece-user-toggle-channel user-name channel-name t)
(riece-channel-toggle-user channel-name user-name t)
(riece-emit-signal 'user-joined-channel
(riece-make-identity user-name
riece-server-name)
(riece-make-identity channel-name
riece-server-name)))
(defun riece-naming-assert-part (user-name channel-name)
(riece-user-toggle-channel user-name channel-name nil)
(riece-channel-toggle-user channel-name user-name nil)
(riece-channel-toggle-operator channel-name user-name nil)
(riece-channel-toggle-speaker channel-name user-name nil)
(riece-emit-signal 'user-left-channel
(riece-make-identity user-name
riece-server-name)
(riece-make-identity channel-name
riece-server-name)))
(defun riece-naming-assert-rename (old-name new-name)
(if (riece-identity-equal-no-server old-name riece-real-nickname)
(setq riece-last-nickname riece-real-nickname
riece-real-nickname new-name))
(let* ((old (riece-get-user old-name))
(channels (riece-user-channels old))
users user)
(while channels
(setq users (riece-channel-get-users (car channels))
user (riece-identity-assoc old-name users t))
(if user
(setcar user new-name))
(setq channels (cdr channels)))
(riece-rename-user old-name new-name))
(riece-emit-signal 'user-renamed
(riece-make-identity old-name riece-server-name)
(riece-make-identity new-name riece-server-name)))
(defun riece-naming-assert-channel-users (users channel-name)
(let ((channel-identity (riece-make-identity channel-name
riece-server-name))
(pointer users))
(while pointer
(riece-user-toggle-channel (car (car pointer)) channel-name t)
(riece-channel-toggle-user channel-name (car (car pointer)) t)
(if (memq ?o (cdr (car pointer)))
(riece-channel-toggle-operator channel-name (car (car pointer)) t)
(if (memq ?v (cdr (car pointer)))
(riece-channel-toggle-speaker channel-name (car (car pointer)) t)
(riece-channel-toggle-operator channel-name (car (car pointer)) nil)
(riece-channel-toggle-speaker channel-name (car (car pointer)) nil)))
(setq pointer (cdr pointer)))
;; Remove nonexistent users.
(setq pointer (riece-channel-users (riece-get-channel channel-name)))
(while pointer
(unless (assoc (car (car pointer)) users)
(riece-user-toggle-channel (car (car pointer)) channel-name nil)
(riece-channel-toggle-user channel-name (car (car pointer)) nil))
(setq pointer (cdr pointer)))
(riece-emit-signal 'user-list-changed channel-identity)))
(defun riece-naming-assert-channel-modes (channel modes)
(while modes
(cond
((eq (riece-mode-flag (car (car modes))) ?o)
(riece-channel-toggle-operator channel
(riece-mode-parameter (car (car modes)))
(nth 1 (car modes)))
(riece-emit-signal 'channel-operators-changed
(riece-make-identity channel
riece-server-name)
(riece-make-identity (riece-mode-parameter
(car (car modes)))
riece-server-name)
(nth 1 (car modes))))
((eq (riece-mode-flag (car (car modes))) ?v)
(riece-channel-toggle-speaker channel
(riece-mode-parameter (car (car modes)))
(nth 1 (car modes)))
(riece-emit-signal 'channel-speakers-changed
(riece-make-identity channel
riece-server-name)
(riece-make-identity (riece-mode-parameter
(car (car modes)))
riece-server-name)
(nth 1 (car modes))))
((eq (riece-mode-flag (car (car modes))) ?b)
(riece-channel-toggle-banned channel
(riece-mode-parameter (car (car modes)))
(nth 1 (car modes))))
((eq (riece-mode-flag (car (car modes))) ?e)
(riece-channel-toggle-uninvited channel
(riece-mode-parameter (car (car modes)))
(nth 1 (car modes))))
((eq (riece-mode-flag (car (car modes))) ?I)
(riece-channel-toggle-invited channel
(riece-mode-parameter (car (car modes)))
(nth 1 (car modes))))
(t
(apply #'riece-channel-toggle-mode channel (car modes))))
(setq modes (cdr modes)))
(riece-emit-signal 'channel-modes-changed
(riece-make-identity channel riece-server-name)))
(provide 'riece-naming)
;;; riece-naming.el ends here
riece-8.0.0/lisp/riece-mode.el 0000644 0001750 0001750 00000004422 11570265470 013042 0000000 0000000 ;;; riece-mode.el --- functions for manipulating channel/user modes -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(defun riece-parse-modes (string)
(let ((start 0)
result)
(while (and (string-match "[-+]\\([^-+ ]*\\) *" string start)
(= (match-beginning 0) start))
(let ((toggle (eq (aref string start) ?+))
(modes (string-to-list (match-string 1 string))))
(setq start (match-end 0))
(while modes
(if (and (string-match "\\([^-+][^ ]*\\) *" string start)
(= (match-beginning 0) start))
(setq start (match-end 0)
result (cons (list (riece-make-mode
(car modes) (match-string 1 string))
toggle)
result))
(setq result (cons (list (riece-make-mode (car modes))
toggle)
result)))
(setq modes (cdr modes)))))
(nreverse result)))
(defun riece-mode-assoc (flag modes)
"Return a mode object matched with FLAG in MODES."
(catch 'found
(while modes
(if (eq flag (riece-mode-flag (car modes)))
(throw 'found (car modes)))
(setq modes (cdr modes)))))
(defun riece-make-mode (flag &optional parameter)
"Make an instance of mode object.
Arguments are appropriate to the flag and the parameter."
(vector flag parameter))
(defun riece-mode-flag (mode)
"Return the flag of MODE."
(aref mode 0))
(defun riece-mode-parameter (mode)
"Return the parameter of MODE."
(aref mode 1))
(provide 'riece-mode)
;;; riece-mode.el ends here
riece-8.0.0/lisp/riece-epg.el 0000644 0001750 0001750 00000017555 11570265470 012704 0000000 0000000 ;;; riece-epg.el --- Encrypt/decrypt messages add-on -*- lexical-binding: t -*-
;; Copyright (C) 2006 Daiki Ueno
;; Author: Daiki Ueno
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-message)
(require 'riece-identity)
(autoload 'widget-convert-button "wid-edit")
(autoload 'epg-make-context "epg")
(autoload 'epg-decrypt-string "epg")
(autoload 'epg-encrypt-string "epg")
(autoload 'epg-passphrase-callback-function "epg")
(autoload 'epg-context-set-passphrase-callback "epg")
(autoload 'epg-cancel "epg")
(eval-when-compile
(autoload 'riece-command-send-message "riece-commands"))
(defgroup riece-epg nil
"Encrypt/decrypt messages."
:group 'riece)
(defconst riece-epg-description
"Encrypt/decrypt messages.")
(defvar riece-epg-passphrase-alist nil)
(defun riece-epg-passphrase-callback-function (context key-id identity)
(if (eq key-id 'SYM)
(let ((entry (riece-identity-assoc identity riece-epg-passphrase-alist))
passphrase)
(or (copy-sequence (cdr entry))
(progn
(unless entry
(setq entry (list identity)
riece-epg-passphrase-alist (cons entry
riece-epg-passphrase-alist)))
(setq passphrase (epg-passphrase-callback-function context
key-id nil))
(setcdr entry (copy-sequence passphrase))
passphrase)))
(epg-passphrase-callback-function context key-id nil)))
(defun riece-epg-passphrase-callback-function-for-decrypt (context key-id
identity)
(if (eq key-id 'SYM)
(let ((entry (riece-identity-assoc identity riece-epg-passphrase-alist)))
(if (cdr entry)
(copy-sequence (cdr entry))
(epg-cancel context)))
(epg-passphrase-callback-function context key-id nil)))
(defun riece-epg-funcall-clear-passphrase (identity function &rest args)
(condition-case error
(apply function args)
(error
(let ((entry (riece-identity-assoc identity riece-epg-passphrase-alist)))
(if entry
(setq riece-epg-passphrase-alist
(delq entry riece-epg-passphrase-alist))))
(signal (car error) (cdr error)))))
(defun riece-command-enter-encrypted-message ()
"Encrypt the current line and send it to the current channel."
(interactive)
(let ((context (epg-make-context))
(string (buffer-substring (riece-line-beginning-position)
(riece-line-end-position))))
(epg-context-set-passphrase-callback
context
(cons #'riece-epg-passphrase-callback-function
riece-current-channel))
(riece-send-string
(format "PRIVMSG %s :[encrypted:%s]\r\n"
(riece-identity-prefix riece-current-channel)
(base64-encode-string
(riece-epg-funcall-clear-passphrase
riece-current-channel
#'epg-encrypt-string
context
(riece-with-server-buffer
(riece-identity-server riece-current-channel)
(riece-encode-coding-string-for-identity
string
riece-current-channel))
nil)
t)))
(riece-display-message
(riece-make-message (riece-current-nickname) riece-current-channel
(concat "[encrypted:" string "]") nil t))
(if (> (forward-line) 0)
(insert "\n"))))
(defun riece-command-set-passphrase (identity passphrase)
"Set PASSPHRASE associated with IDENTITY."
(interactive
(let ((identity
(riece-completing-read-identity
"Channel/user: "
riece-current-channels nil t nil nil
(riece-format-identity riece-current-channel))))
(list identity
(read-passwd (format "Passphrase for %s: "
(riece-format-identity identity))))))
(let ((entry (riece-identity-assoc identity riece-epg-passphrase-alist)))
(if (equal passphrase "")
(if entry
(setq riece-epg-passphrase-alist
(delq entry riece-epg-passphrase-alist)))
(if entry
(setcdr entry passphrase)
(setq riece-epg-passphrase-alist
(cons (cons identity passphrase)
riece-epg-passphrase-alist))))))
(defun riece-epg-decrypt-string-for-identity (context cipher target)
(let ((coding-system
(or (riece-coding-system-for-identity target)
riece-default-coding-system)))
(riece-with-server-buffer (riece-identity-server target)
(decode-coding-string
(riece-epg-funcall-clear-passphrase
target
#'epg-decrypt-string
context
(base64-decode-string cipher))
(if (consp coding-system)
(car coding-system)
coding-system)))))
(defun riece-epg-message-filter (message)
(if (get 'riece-epg 'riece-addon-enabled)
(when (string-match "\\`\\[encrypted:\\(.*\\)]"
(riece-message-text message))
(let ((context (epg-make-context))
(string (match-string 1 (riece-message-text message))))
(epg-context-set-passphrase-callback
context
(cons #'riece-epg-passphrase-callback-function-for-decrypt
riece-current-channel))
(condition-case error
(progn
(riece-message-set-text
message
(format "[encrypted:%s]"
(riece-epg-decrypt-string-for-identity
context string (riece-message-target message)))))
(error
(riece-put-text-property-nonsticky
0 (length (riece-message-text message))
'riece-epg-encryption-target (riece-message-target message)
(riece-message-text message))
(if riece-debug
(message "Couldn't decrypt: %s" (cdr error))
(message "Couldn't decrypt")))))))
message)
(defun riece-epg-add-encrypted-button (start end)
(if (and (get 'riece-button 'riece-addon-enabled)
(get 'riece-epg 'riece-addon-enabled))
(riece-scan-property-region
'riece-epg-encryption-target
start end
(lambda (start end)
(let ((inhibit-read-only t)
buffer-read-only)
(widget-convert-button
'link start end
:help-echo "Click to decrypt"
:notify #'riece-epg-encrypted-button-notify
(get-text-property start 'riece-epg-encryption-target)))))))
(defun riece-epg-encrypted-button-notify (widget &rest _ignore)
(let* ((from (marker-position (widget-get widget :from)))
(to (marker-position (widget-get widget :to)))
(target (widget-get widget :value))
(cipher (buffer-substring from to))
(inhibit-read-only t)
buffer-read-only
plain)
(when (string-match "\\`\\[encrypted:\\(.*\\)]" cipher)
(setq plain (riece-epg-decrypt-string-for-identity
(epg-make-context) (match-string 1 cipher) target))
(widget-delete widget)
(delete-region from to)
(save-excursion
(goto-char from)
(insert "[encrypted:" plain "]")))))
(defun riece-epg-requires ()
(if (memq 'riece-button riece-addons)
'(riece-button)))
(defun riece-epg-insinuate ()
(add-hook 'riece-message-filter-functions 'riece-epg-message-filter)
(add-hook 'riece-after-insert-functions 'riece-epg-add-encrypted-button))
(defun riece-epg-uninstall ()
(remove-hook 'riece-message-filter-functions 'riece-epg-message-filter)
(remove-hook 'riece-after-insert-functions 'riece-epg-add-encrypted-button))
(defvar riece-command-mode-map)
(defun riece-epg-enable ()
(define-key riece-command-mode-map
"\C-ce" 'riece-command-enter-encrypted-message)
(define-key riece-command-mode-map
"\C-c\C-ec" 'riece-command-set-passphrase))
(defun riece-epg-disable ()
(define-key riece-command-mode-map
"\C-ce" nil)
(define-key riece-command-mode-map
"\C-c\C-ec" nil))
(provide 'riece-epg)
;;; riece-epg.el ends here
riece-8.0.0/lisp/riece-keyword.el 0000644 0001750 0001750 00000007525 11570265470 013611 0000000 0000000 ;;; riece-keyword.el --- detect keywords in IRC buffers -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-message)
(defgroup riece-keyword nil
"Detect keywords in IRC buffers."
:prefix "riece-"
:group 'riece)
(defcustom riece-keywords nil
"Keywords to be highlightened."
:type '(repeat (choice (string :tag "Keyword")
(cons (string :tag "Regexp")
(integer :tag "Match"))))
:group 'riece-keyword)
(defcustom riece-notify-keyword-functions nil
"Functions used to notify keyword match."
:type '(repeat function)
:group 'riece-keyword)
(make-obsolete-variable 'riece-notify-keyword-functions
'riece-keyword-notify-functions
"2003-12-22")
(defcustom riece-keyword-notify-functions nil
"Functions used to notify keyword match.
Two arguments are passed to each function: the keyword used to match
and the matched message object."
:type '(repeat function)
:group 'riece-keyword)
(defface riece-keyword-face
'((((class color))
(:foreground "red" :underline t))
(t
(:underline t)))
"Face used for highlightening matching keyword."
:group 'riece-highlight-faces)
(defvar riece-keyword-face 'riece-keyword-face)
(defconst riece-keyword-description
"Detect keywords in IRC buffers.")
;;; The old XEmacs package doesn't have autoload setting for regexp-opt.
(autoload 'regexp-opt "regexp-opt")
(defun riece-keyword-message-filter (message)
(if (and (get 'riece-keyword 'riece-addon-enabled)
riece-keywords
;; Ignore messages which belongs to myself.
(not (riece-message-own-p message)))
(let* (keywords
(alist
(nconc
(delq nil (mapcar
(lambda (matcher)
(if (stringp matcher)
(ignore
(setq keywords (cons matcher keywords)))
matcher))
riece-keywords))
(if keywords
(list (cons (regexp-opt keywords) 0)))))
index)
(while alist
(setq index 0)
(while (and (< index (length (riece-message-text message)))
(string-match (car (car alist))
(riece-message-text message) index))
(put-text-property (match-beginning (cdr (car alist)))
(match-end (cdr (car alist)))
'riece-overlay-face riece-keyword-face
(riece-message-text message))
(save-match-data
(run-hook-with-args 'riece-notify-keyword-functions
(match-string (cdr (car alist))
(riece-message-text message)))
(run-hook-with-args 'riece-keyword-notify-functions
(cdr (car alist))
message))
(setq index (1+ (match-end (cdr (car alist))))))
(setq alist (cdr alist)))))
message)
(defun riece-keyword-requires ()
(if (memq 'riece-highlight riece-addons)
'(riece-highlight)))
(defun riece-keyword-insinuate ()
(add-hook 'riece-message-filter-functions 'riece-keyword-message-filter))
(defun riece-keyword-uninstall ()
(remove-hook 'riece-message-filter-functions 'riece-keyword-message-filter))
(provide 'riece-keyword)
;;; riece-keyword.el ends here
riece-8.0.0/lisp/riece-command-list-addons.xpm 0000644 0001750 0001750 00000003605 11400046556 016153 0000000 0000000 /* XPM */
static char *riece_command_list_addons[] = {
/* columns rows colors chars-per-pixel */
"24 24 76 1",
" c #2E3436",
". c #343A3B",
"X c #414646",
"o c #4D5252",
"O c #555753",
"+ c #5A5E5D",
"@ c #676A68",
"# c #737673",
"$ c #80827E",
"% c #868984",
"& c #888A85",
"* c #898B86",
"= c #898C87",
"- c #8D908B",
"; c #8F928C",
": c #BABDB6",
"> c gray78",
", c #C8C8C8",
"< c gray79",
"1 c #CACBC9",
"2 c #CACACA",
"3 c #CBCBCB",
"4 c gray80",
"5 c #CDCDCD",
"6 c #CECFCD",
"7 c #CECECE",
"8 c gray81",
"9 c #D0D0D0",
"0 c gray82",
"q c #D2D2D2",
"w c LightGray",
"e c #D5D5D5",
"r c gray86",
"t c gainsboro",
"y c #DDDDDD",
"u c gray87",
"i c #DFDFDF",
"p c gray88",
"a c #E1E1E0",
"s c #E1E1E1",
"d c #E2E2E1",
"f c #E2E2E2",
"g c #E3E3E2",
"h c gray89",
"j c #E4E4E3",
"k c #E4E4E4",
"l c #E5E5E4",
"z c gray90",
"x c #E6E6E5",
"c c #E7E7E6",
"v c #E8E8E6",
"b c #E8E8E7",
"n c #E9E9E7",
"m c #E9E9E8",
"M c #EAEAE8",
"N c #EAEAE9",
"B c #EBEBE9",
"V c #EBEBEA",
"C c #ECECEA",
"Z c #ECECEB",
"A c #EFEFEF",
"S c gray94",
"D c #F1F1F1",
"F c gray95",
"G c #F3F3F2",
"H c #F3F3F3",
"J c #F4F4F4",
"K c #F5F5F4",
"L c gray96",
"P c #F6F6F5",
"I c #F6F6F6",
"U c #F7F7F6",
"Y c gray97",
"T c #FEFEFE",
"R c gray100",
"E c None",
/* pixels */
"EEEEEEEEEEEEEEEEEEEEEEEE",
"EEEEEEEEEEEEEEEEEEEEEEEE",
"EEEEEEEEEEEEEEEEEEEEEEEE",
"EE-*&&&&&&&&&&&&&&&*-EEE",
"E;6LUUIPPLLKJJHHHHHD1;EE",
"E*LZVBNMnbcxljhfsppsD*EE",
"E&UVOOOOOmbcxljhfsppH&EE",
"E&UBORRROM xl spH&EE",
"E&INO:::OB...cx...daH&EE",
"E&PmOOOOOBXXXcOOOOOsH&EE",
"E&LbmoooCBooobORRROfH&EE",
"E&Lcb+++BB+++bO:::OgH&EE",
"E&Lxc@@@MM@@@bOOOOOhH&EE",
"E&Hlx###nOOOOOv###khG&EE",
"E&Fjl$$$cORRROc$$$ljF&EE",
"E&Dgj&&&xO:::Oc&&&ljD&EE",
"E&SdghjllOOOOOxxxlljD&EE",
"E&IdsfgjjllzxxxxllklY&EE",
"E&HTRRRRRRRRRRRRRRRTA&EE",
"E*zewq0988754322<,>,u*EE",
"E=8hkhffspppiiuyyytr2=EE",
"EE%*&&&&&&&&&&&&&&&*%EEE",
"EEEEEEEEEEEEEEEEEEEEEEEE",
"EEEEEEEEEEEEEEEEEEEEEEEE"
};
riece-8.0.0/lisp/riece-history.el 0000644 0001750 0001750 00000013277 11570265470 013627 0000000 0000000 ;;; riece-history.el --- manage history of channel shifting -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;; You can check recently visited channels via `C-c g' in the commands
;; buffer, by adding the following lines to ~/.riece/init.el:
;; (add-hook 'riece-guess-channel-try-functions
;; 'riece-guess-channel-from-history)
;;; Code:
(require 'riece-options)
(require 'riece-globals)
(require 'riece-identity)
(require 'riece-signal)
(require 'ring)
(require 'riece-highlight)
(defgroup riece-history nil
"Manage history of channel shifting."
:tag "History"
:prefix "riece-"
:group 'riece)
(defcustom riece-channel-history-length 3
"Length of riece-channel-history."
:type 'integer
:group 'riece-history)
(defface riece-channel-list-history-face
'((((class color)
(background dark))
(:foreground "PaleTurquoise"))
(((class color)
(background light))
(:foreground "SeaGreen3"))
(t
(:bold t)))
"Face used for displaying history channels."
:group 'riece-highlight-faces)
(defvar riece-channel-list-history-face 'riece-channel-list-history-face)
(unless (riece-facep 'riece-modeline-history-face)
(make-face 'riece-modeline-history-face
"Face used for displaying history channels in modeline.")
(if (featurep 'xemacs)
(set-face-parent 'riece-modeline-history-face 'modeline))
(set-face-foreground 'riece-modeline-history-face
(face-foreground 'riece-channel-list-history-face)))
(defvar riece-modeline-history-face 'riece-modeline-history-face)
(defvar riece-channel-history nil)
(defconst riece-history-description
"Manage history of channel shifting.")
(defun riece-guess-channel-from-history ()
(let ((length (ring-length riece-channel-history))
(index 0)
result)
(while (< index length)
(setq result (cons (ring-ref riece-channel-history index) result)
index (1+ index)))
(nreverse result)))
(defun riece-history-format-identity-for-channel-list-buffer (index identity)
(if (and (get 'riece-history 'riece-addon-enabled)
(not (ring-empty-p riece-channel-history))
(riece-identity-equal identity (ring-ref riece-channel-history 0)))
(concat (format "%2d:+" index)
(riece-format-identity identity))))
(defun riece-history-format-identity-for-channel-list-indicator (index
identity)
(if (and (get 'riece-history 'riece-addon-enabled)
(not (ring-empty-p riece-channel-history))
(riece-identity-equal identity (ring-ref riece-channel-history 0)))
(let ((string (riece-format-identity identity))
(start 0))
;; Escape % -> %%.
(while (string-match "%" string start)
(setq start (1+ (match-end 0))
string (replace-match "%%" nil nil string)))
(list (format "%d:" index)
(riece-propertize-modeline-string
string 'face 'riece-modeline-history-face)))))
;;; (defun riece-history-requires ()
;;; (if (memq 'riece-guess riece-addons)
;;; '(riece-guess)))
(defun riece-history-after-switch-to-channel-functions (last)
(if (and (get 'riece-history 'riece-addon-enabled) last
(not (riece-identity-equal last riece-current-channel)))
(ring-insert riece-channel-history last)))
(defun riece-history-requires ()
(if (memq 'riece-highlight riece-addons)
'(riece-highlight)))
(defun riece-history-insinuate ()
(add-hook 'riece-after-switch-to-channel-functions
'riece-history-after-switch-to-channel-functions)
(add-hook 'riece-format-identity-for-channel-list-buffer-functions
'riece-history-format-identity-for-channel-list-buffer)
(add-hook 'riece-format-identity-for-channel-list-indicator-functions
'riece-history-format-identity-for-channel-list-indicator)
(if (memq 'riece-highlight riece-addons)
(setq riece-channel-list-mark-face-alist
(cons '(?+ . riece-channel-list-history-face)
riece-channel-list-mark-face-alist)))
;;; (if (memq 'riece-guess riece-addons)
;;; (add-hook 'riece-guess-channel-try-functions
;;; 'riece-guess-channel-from-history))
)
(defun riece-history-uninstall ()
(remove-hook 'riece-after-switch-to-channel-functions
'riece-history-after-switch-to-channel-functions)
(remove-hook 'riece-format-identity-for-channel-list-buffer-functions
'riece-history-format-identity-for-channel-list-buffer)
(remove-hook 'riece-format-identity-for-channel-list-indicator-functions
'riece-history-format-identity-for-channel-list-indicator)
(setq riece-channel-list-mark-face-alist
(delq (assq ?+ riece-channel-list-mark-face-alist)
riece-channel-list-mark-face-alist)))
(defun riece-history-enable ()
(setq riece-channel-history
(make-ring riece-channel-history-length))
(riece-emit-signal 'channel-list-changed))
(defun riece-history-disable ()
(setq riece-channel-history nil)
(riece-emit-signal 'channel-list-changed))
(provide 'riece-history)
;;; riece-history.el ends here
riece-8.0.0/lisp/riece-ctlseq.el 0000644 0001750 0001750 00000016734 11570265470 013422 0000000 0000000 ;;; riece-ctlseq.el --- mark up control sequences in IRC buffers -*- lexical-binding: t -*-
;; Copyright (C) 1998-2004 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-message)
(require 'riece-misc)
(defgroup riece-ctlseq nil
"Mark up control sequences in IRC buffer."
:prefix "riece-"
:group 'riece)
(defcustom riece-ctlseq-colors
'("white" "black" "red" "orange" "yellow" "LightGreen" "DarkOliveGreen"
"cyan4" "turquoise" "blue" "black" "black" "black" "black" "black"
"DarkBlue" "purple1" "purple2" "purple3" "magenta")
"List of colors can be used with ^C,.
To set up colors compatible with X-Chat and mIRC, do:
\(setq riece-ctlseq-colors '(\"#cecece\" \"black\" \"#0000cc\" \"#00cc00\"
\"#dd0000\" \"#aa0000\" \"#bb00bb\" \"#ffaa00\"
\"#eedd22\" \"#33de55\" \"#00cccc\" \"#33eeff\"
\"#0000ff\" \"#ee22ee\" \"#777777\" \"#999999\"))
"
:group 'riece-ctlseq
:type '(repeat (string :tag "Color")))
(defcustom riece-ctlseq-hide-controls t
"If non-nil, control characters are hidden."
:group 'riece-ctlseq
:type 'boolean)
(defcustom riece-ctlseq-face-cache-size 128
"Maximum length of the internal face cache."
:group 'riece-ctlseq
:type 'integer)
(defvar riece-ctlseq-face-cache nil)
(defvar riece-ctlseq-face-counter 0)
(defconst riece-ctlseq-description
"Mark up control sequences in IRC buffers.")
(defconst riece-ctlseq-regexp
"[\x2\xF\x16\x1F]\\|\x3\\([0-9][0-9]?\\)\\(,[0-9][0-9]?\\)?")
(defun riece-ctlseq-compatible-attributes-p (this other)
(let ((pointer this))
(catch 'mismatched
(while pointer
(unless (equal (plist-get other (car pointer)) (nth 1 pointer))
(throw 'mismatched nil))
(setq pointer (nthcdr 2 pointer)))
t)))
(defun riece-ctlseq-face-foreground-name (face)
"Return the name of FACE's foreground color."
(if (fboundp 'face-foreground-name) ;XEmacs
(face-foreground-name face)
(face-foreground face)))
(defun riece-ctlseq-face-background-name (face)
"Return the name of FACE's background color."
(if (fboundp 'face-background-name) ;XEmacs
(face-background-name face)
(face-background face)))
(defun riece-ctlseq-make-face (attrs)
(let* ((face-name (intern (format "riece-ctlseq-face-%d"
(prog1 riece-ctlseq-face-counter
(setq riece-ctlseq-face-counter
(1+ riece-ctlseq-face-counter))))))
(face (make-face face-name))
foreground
background)
(if (plist-get attrs 'bold)
(make-face-bold face))
(if (plist-get attrs 'underline)
(set-face-underline-p face t))
(if (setq foreground (plist-get attrs 'foreground))
(set-face-foreground face foreground))
(if (setq background (plist-get attrs 'background))
(set-face-background face background))
(when (plist-get attrs 'inverse-video)
(setq foreground (or (riece-ctlseq-face-background-name face)
(riece-ctlseq-face-background-name 'default))
background (or (riece-ctlseq-face-foreground-name face)
(riece-ctlseq-face-foreground-name 'default)))
(set-face-foreground face foreground)
(set-face-background face background))
(put face-name 'riece-ctlseq-attributes attrs)
face-name))
(defun riece-ctlseq-face-from-cache (attrs)
(if (null attrs)
'default
(let ((pointer riece-ctlseq-face-cache)
last-pointer
other)
(catch 'found
(while pointer
(setq other (get (car pointer) 'riece-ctlseq-attributes))
(when (and (riece-ctlseq-compatible-attributes-p attrs other)
(riece-ctlseq-compatible-attributes-p other attrs))
(if last-pointer
(setcdr last-pointer (cdr pointer)))
(throw 'found (setcar riece-ctlseq-face-cache (car pointer))))
(setq last-pointer pointer
pointer (cdr pointer)))
(if (>= (length riece-ctlseq-face-cache)
riece-ctlseq-face-cache-size)
(setq riece-ctlseq-face-cache
(butlast riece-ctlseq-face-cache)))
(setq riece-ctlseq-face-cache
(cons (riece-ctlseq-make-face attrs)
riece-ctlseq-face-cache))
(car riece-ctlseq-face-cache)))))
(defun riece-ctlseq-update-attribute (tag attrs)
(let ((attrs (copy-sequence attrs)))
(cond
((eq (aref tag 0) ?\x2) ;^B
(setq attrs (plist-put attrs 'bold (not (plist-get attrs 'bold)))))
((eq (aref tag 0) ?\xF) ;^O
(setq attrs nil))
((eq (aref tag 0) ?\x16) ;^V
(setq attrs (plist-put attrs 'inverse-video
(not (plist-get attrs 'inverse-video)))))
((eq (aref tag 0) ?\x1F) ;^_
(setq attrs (plist-put attrs 'underline
(not (plist-get attrs 'underline)))))
((eq (aref tag 0) ?\x3) ;^C[,]
(setq attrs (plist-put attrs 'foreground
(nth (string-to-number (substring tag 1))
riece-ctlseq-colors)))
(if (string-match "," tag)
(setq attrs (plist-put attrs 'background
(nth (string-to-number
(substring tag (match-end 0)))
riece-ctlseq-colors))))))
attrs))
(defun riece-ctlseq-update-attributes (tags attrs)
(let ((start 0))
(while (string-match riece-ctlseq-regexp tags start)
(setq start (match-end 0)
attrs (riece-ctlseq-update-attribute (match-string 0 tags) attrs)))
attrs))
(defun riece-ctlseq-put-attributes (string start end attrs)
(when (and (> end start) attrs)
(put-text-property start end
'riece-ctlseq-attributes (copy-sequence attrs)
string)
(put-text-property start end
'riece-overlay-face
(riece-ctlseq-face-from-cache attrs)
string)))
(defun riece-ctlseq-message-filter (message)
(if (get 'riece-ctlseq 'riece-addon-enabled)
(let ((start 0)
(end (length (riece-message-text message)))
tags-start tags-end attrs)
(while (string-match (concat "\\(" riece-ctlseq-regexp "\\)+")
(riece-message-text message) start)
(if riece-ctlseq-hide-controls
(put-text-property (match-beginning 0) (match-end 0)
'invisible 'riece-ctlseq
(riece-message-text message)))
(setq tags-start (match-beginning 0)
tags-end (match-end 0))
(riece-ctlseq-put-attributes (riece-message-text message)
start tags-start
attrs)
(setq attrs (riece-ctlseq-update-attributes
(substring (riece-message-text message)
tags-start tags-end)
attrs)
start tags-end))
(riece-ctlseq-put-attributes (riece-message-text message)
start end
attrs)))
message)
(defun riece-ctlseq-requires ()
'(riece-highlight))
(defun riece-ctlseq-insinuate ()
(add-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter))
(defun riece-ctlseq-uninstall ()
(remove-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter))
(provide 'riece-ctlseq)
;;; riece-ctlseq.el ends here
riece-8.0.0/lisp/aproxy.rb 0000644 0001750 0001750 00000005444 11400046556 012355 0000000 0000000 # aproxy.rb --- async proxy between an IRC server and a client
# Copyright (C) 1998-2005 Daiki Ueno
# Author: Daiki Ueno
# Created: 1998-09-28
# Keywords: IRC, riece
# This file is part of Riece.
# 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, 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 GNU Emacs; see the file COPYING. If not, write to the
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
require 'io/nonblock'
require 'socket'
class AProxy
def initialize(host, port, size, back)
@host = host
@port = port
@size = size
@back = File.new(back, 'a') if back
end
def start
$stdout.nonblock = true
trap('STOP', 'IGNORE')
trap('TSTP', 'IGNORE')
socket = TCPSocket.new(@host, @port)
$stdout.write("NOTICE CONNECTED #{$$}\r\n")
wfds_in = []
buf = ''
loop do
rfds, wfds, = select([socket, $stdin], wfds_in)
unless wfds.empty?
if buf.length > @size
s = buf.slice!(0 ... @size)
@back.write(s) if @back
end
begin
until buf.empty?
len = $stdout.syswrite(buf)
buf.slice!(0 .. len)
end
wfds_in.clear
rescue Errno::EAGAIN
end
end
if rfds.include?(socket)
line = socket.gets("\r\n")
break unless line
if line =~ /\A(?::\S+\s+)?PING\s+(.*)\r\n/i
socket.write("PONG #{$1}\r\n")
else
wfds_in = [$stdout]
buf << line
end
end
if rfds.include?($stdin)
line = $stdin.gets("\r\n")
break unless line
socket.write(line)
end
end
socket.close
end
end
if $0 == __FILE__
require 'optparse'
opt_size, opt_back = nil, nil
opts = OptionParser.new do |opts|
opts.banner = <<"End"
Usage: #{$0} [OPTIONS] host port
End
opts.on('-s', '--size SIZE', 'Size of buffer.') do |size|
opt_size = size.to_i
end
opts.on('-b', '--back BACK', 'Send outdated messages to BACK.') do |back|
opt_back = back
end
opts.on_tail('--help', '-h', 'Show this message.') do
$stdout.print(opts.to_s)
exit(0)
end
end
begin
opts.parse!(ARGV)
rescue OptionParser::ParseError
$stderr.print(opts.to_s)
exit(1)
end
AProxy.new(ARGV.shift, ARGV.shift, opt_size, opt_back).start
end
riece-8.0.0/lisp/riece-url.el 0000644 0001750 0001750 00000012526 11570265470 012724 0000000 0000000 ;;; riece-url.el --- collect URL in IRC buffers -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-options)
(require 'riece-menu) ;riece-menu-items
(require 'easymenu)
(autoload 'browse-url "browse-url")
(defvar browse-url-browser-function)
(defgroup riece-url nil
"URL Browsing in IRC buffer."
:prefix "riece-"
:group 'riece)
;; the default value was copied from gnus-button-url-regexp
(defcustom riece-url-regexp
(concat
"\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|"
"nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
"\\(//[-a-z0-9_.]+:[0-9]*\\)?"
(if (string-match "[[:digit:]]" "1") ;; Support POSIX?
(let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")
(punct "!?:;.,"))
(concat
"\\(?:"
;; Match paired parentheses, e.g. in Wikipedia URLs:
;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com
"[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "[" chars "]*"
"\\|"
"[" chars punct "]+" "[" chars "]"
"\\)"))
(concat ;; XEmacs 21.4 doesn't support POSIX.
"\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+"
"\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)"))
"\\)")
"Regular expression that matches URLs."
:group 'riece-url
:type 'regexp)
(defcustom riece-url-regexp-alist nil
"An alist mapping regexp to URL.
For example:
(setq riece-url-regexp-alist
'((\"\\\\bBug#\\\\([0-9]+\\\\)\\\\b\" .
\"http://bugs.debian.org/\\\\1\")))
This maps a string \"Bug#12345\" to a URL
\"http://bugs.debian.org/12345\"."
:type 'alist
:group 'riece-url)
(defvar riece-urls nil
"A list of URL which appears in Riece buffers.")
(defconst riece-url-description
"Collect URL in IRC buffers.")
(autoload 'widget-convert-button "wid-edit")
(defun riece-url-replace-match (string)
(let ((match-data (match-data))
(index 0)
number
replacement)
(while (string-match "\\\\[&1-9\\\\]" string index)
(if (eq (aref string (1+ (match-beginning 0))) ?&)
(setq number 0)
(unless (eq (aref string (1+ (match-beginning 0))) ?\\)
(setq number (string-to-number (substring (match-string 0 string)
1)))))
(if number
(setq replacement
(buffer-substring (nth (* number 2) match-data)
(nth (1+ (* number 2)) match-data)))
(setq replacement "\\"))
(setq string (concat (substring string 0 (match-beginning 0))
replacement
(substring string (match-end 0)))
index (+ index (length replacement))))
string))
(defun riece-url-scan-region (start end)
(let ((alist (cons (cons riece-url-regexp "\\&")
riece-url-regexp-alist)))
(while alist
(save-excursion
(goto-char start)
(while (re-search-forward (car (car alist)) end t)
(let ((url (save-match-data
(riece-url-replace-match (cdr (car alist))))))
(if (memq 'riece-highlight riece-addons)
(widget-convert-button
'url-link (match-beginning 0) (match-end 0) url))
(unless (member url riece-urls)
(setq riece-urls (cons url riece-urls))))))
(setq alist (cdr alist)))))
(defun riece-command-browse-url (&optional url)
(interactive
(list (completing-read (riece-mcat "Open URL: ")
(mapcar #'list riece-urls))))
(browse-url url))
(defun riece-url-create-menu (_menu)
(mapcar (lambda (url)
(vector url (list 'browse-url url)))
riece-urls))
(defvar riece-dialogue-mode-map)
(defun riece-url-requires ()
(append (if (memq 'riece-highlight riece-addons)
'(riece-highlight))
(if (memq 'riece-menu riece-addons)
'(riece-menu))))
(defun riece-url-command-mode-hook ()
(easy-menu-add-item
nil (list (car riece-menu-items))
(list (if (featurep 'xemacs)
"Open URL..."
(riece-mcat "Open URL..."))
:filter 'riece-url-create-menu)))
(defun riece-url-insinuate ()
(add-hook 'riece-after-insert-functions 'riece-url-scan-region)
(if (memq 'riece-menu riece-addons)
(add-hook 'riece-command-mode-hook
'riece-url-command-mode-hook
t)))
(defun riece-url-uninstall ()
(easy-menu-remove-item
nil (list (car riece-menu-items))
(if (featurep 'xemacs)
"Open URL..."
(riece-mcat "Open URL...")))
(remove-hook 'riece-after-insert-functions 'riece-url-scan-region)
(remove-hook 'riece-command-mode-hook
'riece-url-command-mode-hook))
(defun riece-url-enable ()
(define-key riece-dialogue-mode-map "U" 'riece-command-browse-url))
(defun riece-url-disable ()
(define-key riece-dialogue-mode-map "U" nil))
(provide 'riece-url)
;;; riece-url.el ends here
riece-8.0.0/lisp/riece-xface.el 0000644 0001750 0001750 00000005533 11570265470 013210 0000000 0000000 ;;; riece-xface.el --- display X-Face in IRC buffers -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-identity)
(require 'riece-globals)
(require 'riece-display)
(require 'riece-lsdb)
(defconst riece-xface-description
"Display X-Face in IRC buffers.")
(defvar lsdb-insert-x-face-function)
(defun riece-xface-update-user-list-buffer ()
(if (get 'riece-xface 'riece-addon-enabled)
(riece-scan-property-region
'riece-identity (point-min)(point-max)
(lambda (start end)
(let ((records (riece-lsdb-lookup-records (get-text-property
start 'riece-identity)))
xface)
(while (and records
(null xface))
(setq xface (nth 1 (assq 'x-face (car records)))
records (cdr records)))
(if (and xface
(not (eq (char-after end) ? )))
(let ((inhibit-read-only t)
buffer-read-only)
(goto-char end)
(insert " ")
(funcall lsdb-insert-x-face-function xface))))))))
(defun riece-xface-requires ()
'(riece-lsdb))
(defun riece-xface-user-list-mode-hook ()
(add-hook 'riece-update-buffer-functions
'riece-xface-update-user-list-buffer t t))
(defun riece-xface-insinuate ()
(if riece-user-list-buffer
(with-current-buffer riece-user-list-buffer
(riece-xface-user-list-mode-hook)))
(add-hook 'riece-user-list-mode-hook
'riece-xface-user-list-mode-hook))
(defun riece-xface-uninstall ()
(if riece-user-list-buffer
(with-current-buffer riece-user-list-buffer
(remove-hook 'riece-update-buffer-functions
'riece-xface-update-user-list-buffer t)))
(remove-hook 'riece-user-list-mode-hook
'riece-xface-user-list-mode-hook))
(defun riece-xface-enable ()
(if riece-current-channel
(riece-emit-signal 'user-list-changed riece-current-channel)))
(defun riece-xface-disable ()
(if riece-current-channel
(riece-emit-signal 'user-list-changed riece-current-channel)))
(provide 'riece-xface)
;;; riece-xface.el ends here
riece-8.0.0/lisp/riece-filter.el 0000644 0001750 0001750 00000012411 11570265470 013400 0000000 0000000 ;;; riece-filter.el --- process filter and sentinel -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-handle)
(require 'riece-misc)
(require 'riece-server) ;riece-close-server
(require 'riece-identity)
(require 'riece-debug)
(defun riece-handle-numeric-reply (prefix number name string)
(let ((base-number (* (/ number 100) 100))
function)
(setq function (intern-soft (format "riece-handle-%03d-message" number)))
(unless (and function
(symbol-function function))
(setq function
(intern-soft
(format "riece-handle-default-%03d-message" base-number))))
(if (and function
(symbol-function function))
(riece-funcall-ignore-errors (symbol-name function)
function prefix number name
(riece-decode-coding-string string)))))
(defun riece-handle-message (prefix message string)
(if (and prefix
(string-match "![^\x00\x0d\x0a @]+@" prefix))
(riece-user-set-user-at-host
(riece-get-user (substring prefix 0 (match-beginning 0)))
(riece-parse-user-at-host (substring prefix (1+ (match-beginning 0))))))
(setq message (downcase message)
string (riece-decode-coding-string string))
(let ((function (intern-soft (concat "riece-handle-" message "-message")))
(hook (intern (concat "riece-" message "-hook")))
(after-hook (intern (concat "riece-after-" message "-hook"))))
(unless (riece-funcall-ignore-errors (symbol-name hook)
#'run-hook-with-args-until-success
hook prefix string)
(if function
(riece-funcall-ignore-errors (symbol-name function)
function prefix string))
(riece-funcall-ignore-errors (symbol-name after-hook)
#'run-hook-with-args-until-success
after-hook prefix string))))
(defsubst riece-chomp-string (string)
(if (string-match "\r\\'" string)
(substring string 0 (match-beginning 0))
string))
(defun riece-filter (process input)
(with-current-buffer (process-buffer process)
(goto-char (point-max))
(insert input)
(unless riece-filter-running
(unwind-protect
(progn
(setq riece-filter-running t)
(goto-char riece-read-point)
(beginning-of-line)
(while (looking-at ".*\n") ;the input line is finished
(save-excursion
(if (looking-at
":\\([^ ]+\\) +\\([0-5][0-9][0-9]\\) +\\([^ ]+\\)\
+\\(.*\\)")
(riece-handle-numeric-reply
(match-string 1) ;prefix
(string-to-number (match-string 2)) ;number
(match-string 3) ;name
(riece-chomp-string (match-string 4))) ;reply string
(if (looking-at "\\(:\\([^ ]+\\) +\\)?\\([^ ]+\\) +\\(.*\\)")
(riece-handle-message
(match-string 2) ;optional prefix
(match-string 3) ;command
(riece-chomp-string (match-string 4))
;params & trailing
)
(if riece-debug
(message "Weird message from server: %s"
(buffer-substring (point) (progn
(end-of-line)
(point))))))))
(forward-line))
(unless riece-debug
(delete-region (point-min) (point)))
(setq riece-read-point (point)))
(setq riece-filter-running nil)))))
(eval-when-compile
(autoload 'riece-exit "riece"))
(defun riece-sentinel (process status)
(if riece-reconnect-with-password
(let ((server-name
(with-current-buffer (process-buffer process)
riece-server-name)))
(riece-close-server-process process)
(riece-open-server
(if (equal server-name "")
riece-server
(riece-server-name-to-server server-name))
server-name))
(let ((server-name (with-current-buffer (process-buffer process)
riece-server-name)))
(if riece-debug
(if (equal server-name "")
(riece-debug (format "Connection closed: %s"
(substring status 0 (1- (length status)))))
(riece-debug (format "Connection to \"%s\" closed: %s"
server-name
(substring status 0 (1- (length status))))))
(if (equal server-name "")
(message "Connection closed")
(message "Connection to \"%s\" closed" server-name)))
(let ((channels riece-current-channels))
(while channels
(if (and (car channels)
(equal (riece-identity-server (car channels))
server-name))
(riece-part-channel (car channels)))
(setq channels (cdr channels))))
(riece-redisplay-buffers)
(riece-close-server-process process)
;; If no server process is available, exit.
(unless riece-server-process-alist
(riece-exit)))))
(provide 'riece-filter)
;;; riece-filter.el ends here
riece-8.0.0/lisp/riece-handle.el 0000644 0001750 0001750 00000035073 11570265470 013357 0000000 0000000 ;;; riece-handle.el --- basic message handlers -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-misc)
(require 'riece-message)
(require 'riece-channel)
(require 'riece-naming)
(require 'riece-signal)
(require 'riece-mode)
(require 'riece-000)
(require 'riece-200)
(require 'riece-300)
(require 'riece-400)
(require 'riece-500)
(defun riece-default-handle-numeric-reply
(client-prefix _prefix _number _name string)
(riece-insert
(list riece-dialogue-buffer riece-others-buffer)
(concat client-prefix
(riece-concat-server-name
(mapconcat #'identity (riece-split-parameters string) " "))
"\n")))
(defun riece-handle-nick-message (prefix string)
(let* ((old (riece-prefix-nickname prefix))
(new (car (riece-split-parameters string)))
(old-identity (riece-make-identity old riece-server-name))
(new-identity (riece-make-identity new riece-server-name))
(channels (riece-user-get-channels old))
(visible (riece-identity-member
riece-current-channel
(mapcar (lambda (channel)
(riece-make-identity channel riece-server-name))
channels))))
(riece-naming-assert-rename old new)
(if (riece-identity-member old-identity riece-current-channels)
(setq channels (cons new channels)))
(riece-insert-change (delq nil (mapcar
(lambda (channel)
(riece-channel-buffer
(riece-make-identity
channel riece-server-name)))
channels))
(format "%s -> %s\n"
(riece-format-identity old-identity t)
(riece-format-identity new-identity t)))
(riece-insert-change (if visible
riece-dialogue-buffer
(list riece-dialogue-buffer riece-others-buffer))
(concat
(riece-concat-server-name
(format "%s -> %s"
(riece-format-identity old-identity t)
(riece-format-identity new-identity t)))
"\n"))))
(defun riece-handle-privmsg-message (prefix decoded)
(let* ((user (riece-prefix-nickname prefix))
(parameters (riece-split-parameters (riece-decoded-string decoded)))
(targets (split-string (car parameters) ","))
message)
(setq parameters (riece-split-parameters
(riece-decoded-string-for-identity
decoded
(riece-make-identity (car targets) riece-server-name)))
message (nth 1 parameters))
(riece-display-message
(riece-make-message (riece-make-identity user
riece-server-name)
(riece-make-identity (car targets)
riece-server-name)
message
nil
(riece-identity-equal-no-server
user riece-real-nickname)))))
(defun riece-handle-notice-message (prefix decoded)
(let* ((user (if prefix
(riece-prefix-nickname prefix)))
(parameters (riece-split-parameters (riece-decoded-string decoded)))
(targets (split-string (car parameters) ","))
message)
(setq parameters (riece-split-parameters
(riece-decoded-string-for-identity
decoded
(riece-make-identity (car targets) riece-server-name)))
message (nth 1 parameters))
(if user
(riece-display-message
(riece-make-message (riece-make-identity user
riece-server-name)
(riece-make-identity (car targets)
riece-server-name)
message 'notice
(if riece-real-nickname
(riece-identity-equal-no-server
user riece-real-nickname))))
;; message from server
(riece-insert-notice
(list riece-dialogue-buffer riece-others-buffer)
(concat (riece-concat-server-name message) "\n")))))
(defun riece-handle-ping-message (_prefix string)
(riece-send-string (format "PONG :%s\r\n"
(if (eq (aref string 0) ?:)
(substring string 1)
string))))
(defun riece-handle-join-message (prefix string)
(let* ((user (riece-prefix-nickname prefix))
;; RFC2812 3.2.1 doesn't recommend server to send join
;; messages which contain multiple targets.
(channels (split-string (car (riece-split-parameters string)) ","))
(user-identity (riece-make-identity user riece-server-name)))
(while channels
(riece-naming-assert-join user (car channels))
(if (and riece-gather-channel-modes
(riece-identity-equal-no-server user riece-real-nickname))
(riece-send-string (format "MODE %s\r\n" (car channels))))
(let* ((channel-identity (riece-make-identity (car channels)
riece-server-name))
(buffer (riece-channel-buffer channel-identity)))
(riece-insert-change
buffer
(format (riece-mcat "%s (%s) has joined %s\n")
(riece-format-identity user-identity t)
(riece-user-get-user-at-host user)
(riece-format-identity channel-identity t)))
(riece-insert-change
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "%s (%s) has joined %s")
(riece-format-identity user-identity t)
(riece-user-get-user-at-host user)
(riece-format-identity channel-identity t)))
"\n")))
(setq channels (cdr channels)))))
(defun riece-handle-part-message (prefix decoded)
(let* ((user (riece-prefix-nickname prefix))
(parameters (riece-split-parameters (riece-decoded-string decoded)))
;; RFC2812 3.2.2 doesn't recommend server to send part
;; messages which contain multiple targets.
(channels (split-string (car parameters) ","))
(user-identity (riece-make-identity user riece-server-name)))
(while channels
(let* ((channel-identity (riece-make-identity (car channels)
riece-server-name))
(buffer (riece-channel-buffer channel-identity))
message)
(setq parameters (riece-split-parameters
(riece-decoded-string-for-identity decoded
channel-identity))
message (nth 1 parameters))
(riece-insert-change
buffer
(concat
(riece-concat-message
(format (riece-mcat "%s has left %s")
(riece-format-identity user-identity t)
(riece-format-identity channel-identity t))
message)
"\n"))
(riece-insert-change
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(riece-concat-message
(format (riece-mcat "%s has left %s")
(riece-format-identity user-identity t)
(riece-format-identity channel-identity t))
message))
"\n")))
(riece-naming-assert-part user (car channels))
(setq channels (cdr channels)))))
(defun riece-handle-kick-message (prefix decoded)
(let* ((kicker (riece-prefix-nickname prefix))
(parameters (riece-split-parameters (riece-decoded-string decoded)))
(channel (car parameters))
(user (nth 1 parameters))
message
(kicker-identity (riece-make-identity kicker riece-server-name))
(channel-identity (riece-make-identity channel riece-server-name))
(user-identity (riece-make-identity user riece-server-name)))
(setq parameters (riece-split-parameters
(riece-decoded-string-for-identity decoded
channel-identity))
message (nth 2 parameters))
(riece-naming-assert-part user channel)
(let ((buffer (riece-channel-buffer channel-identity)))
(riece-insert-change
buffer
(concat
(riece-concat-message
(format (riece-mcat "%s kicked %s out from %s")
(riece-format-identity kicker-identity t)
(riece-format-identity user-identity t)
(riece-format-identity channel-identity t))
message)
"\n"))
(riece-insert-change
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(riece-concat-message
(format (riece-mcat "%s kicked %s out from %s\n")
(riece-format-identity kicker-identity t)
(riece-format-identity user-identity t)
(riece-format-identity channel-identity t))
message))
"\n")))))
(defun riece-handle-quit-message (prefix string)
(let* ((user (riece-prefix-nickname prefix))
(channels (copy-sequence (riece-user-get-channels user)))
(pointer channels)
(parameters (riece-split-parameters string))
(message (car parameters))
(user-identity (riece-make-identity user riece-server-name)))
;; If you are talking with the user, quit it.
(if (riece-identity-member user-identity riece-current-channels)
(riece-part-channel user-identity))
(setq pointer channels)
(while pointer
(riece-naming-assert-part user (car pointer))
(setq pointer (cdr pointer)))
(let ((buffers
(delq nil (mapcar
(lambda (channel)
(riece-channel-buffer (riece-make-identity
channel riece-server-name)))
channels))))
(riece-insert-change
buffers
(concat
(riece-concat-message
(format (riece-mcat "%s has left IRC")
(riece-format-identity user-identity t))
message)
"\n"))
(riece-insert-change
(if (and riece-channel-buffer-mode
(not (memq riece-channel-buffer buffers)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(riece-concat-message
(format (riece-mcat "%s has left IRC")
(riece-format-identity user-identity t))
message))
"\n")))))
(defun riece-handle-kill-message (prefix string)
(let* ((killer (riece-prefix-nickname prefix))
(parameters (riece-split-parameters string))
(user (car parameters))
(message (nth 1 parameters))
(channels (copy-sequence (riece-user-get-channels user)))
(killer-identity (riece-make-identity killer riece-server-name))
(user-identity (riece-make-identity user riece-server-name))
pointer)
;; If you are talking with the user, quit it.
(if (riece-identity-member user-identity riece-current-channels)
(riece-part-channel user))
(setq pointer channels)
(while pointer
(riece-naming-assert-part user (car pointer))
(setq pointer (cdr pointer)))
(let ((buffers
(delq nil (mapcar
(lambda (channel)
(riece-channel-buffer (riece-make-identity
channel riece-server-name)))
channels))))
(riece-insert-change
buffers
(concat
(riece-concat-message
(format (riece-mcat "%s killed %s")
(riece-format-identity killer-identity t)
(riece-format-identity user-identity t))
message)
"\n"))
(riece-insert-change
(if (and riece-channel-buffer-mode
(not (memq riece-channel-buffer buffers)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(riece-concat-message
(format (riece-mcat "%s killed %s")
(riece-format-identity killer-identity t)
(riece-format-identity user-identity t))
message))
"\n")))))
(defun riece-handle-invite-message (prefix string)
(let* ((user (riece-prefix-nickname prefix))
(parameters (riece-split-parameters string))
(invited (car parameters))
(channel (nth 1 parameters))
(channel-identity (riece-make-identity channel riece-server-name)))
(if (riece-identity-equal-no-server invited riece-real-nickname)
(setq riece-join-channel-candidate channel-identity))
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "%s invites %s to %s")
(riece-format-identity (riece-make-identity
user riece-server-name))
(riece-format-identity (riece-make-identity
invited riece-server-name))
(riece-format-identity channel-identity)))
"\n"))))
(defun riece-handle-topic-message (prefix decoded)
(let* ((user (riece-prefix-nickname prefix))
(parameters (riece-split-parameters (riece-decoded-string decoded)))
(channel (car parameters))
topic
(user-identity (riece-make-identity user riece-server-name))
(channel-identity (riece-make-identity channel riece-server-name)))
(setq parameters (riece-split-parameters
(riece-decoded-string-for-identity decoded
channel-identity))
topic (nth 1 parameters))
(riece-channel-set-topic (riece-get-channel channel) topic)
(riece-emit-signal 'channel-topic-changed
channel-identity topic)
(let ((buffer (riece-channel-buffer channel-identity)))
(riece-insert-change
buffer
(format (riece-mcat "Topic by %s: %s\n")
(riece-format-identity user-identity t)
topic))
(riece-insert-change
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "Topic on %s by %s: %s")
(riece-format-identity channel-identity t)
(riece-format-identity user-identity t)
topic))
"\n")))))
(defun riece-handle-mode-message (prefix string)
(let* ((user (riece-prefix-nickname prefix))
(user-identity (riece-make-identity user riece-server-name))
channel)
(when (string-match "^\\([^ ]+\\) *:?" string)
(setq channel (match-string 1 string)
string (substring string (match-end 0)))
(if (string-match (concat "^" riece-channel-regexp "$") channel)
(riece-naming-assert-channel-modes channel
(riece-parse-modes string)))
(let* ((channel-identity (riece-make-identity channel riece-server-name))
(buffer (riece-channel-buffer channel-identity)))
(riece-insert-change
buffer
(format (riece-mcat "Mode by %s: %s\n")
(riece-format-identity user-identity t)
string))
(riece-insert-change
(if (and riece-channel-buffer-mode
(not (eq buffer riece-channel-buffer)))
(list riece-dialogue-buffer riece-others-buffer)
riece-dialogue-buffer)
(concat
(riece-concat-server-name
(format (riece-mcat "Mode on %s by %s: %s")
(riece-format-identity channel-identity t)
(riece-format-identity user-identity t)
string))
"\n"))))))
(provide 'riece-handle)
;;; riece-handle.el ends here
riece-8.0.0/lisp/riece-eval-ruby.el 0000644 0001750 0001750 00000005550 11570265470 014027 0000000 0000000 ;;; riece-eval-ruby.el --- evaluate input string as a Ruby program -*- lexical-binding: t -*-
;; Copyright (C) 1998-2005 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece, Ruby
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-ruby)
(require 'riece-message)
(defgroup riece-eval-ruby nil
"Evaluate input string as a Ruby program."
:prefix "riece-"
:group 'riece)
(defcustom riece-eval-ruby-prefix-regexp "^,ruby\\s-+"
"Pattern of of the prefix for sending Ruby programs."
:type 'string
:group 'riece-eval-ruby)
(defconst riece-eval-ruby-description
"Evaluate input string as a Ruby program.")
(defun riece-eval-ruby-exit-handler (name)
(riece-ruby-inspect name)
(let* ((data (copy-sequence (or riece-ruby-data "nil")))
(length (length data))
(index 0))
(while (< index length)
(if (eq (aref data index) ?\n)
(aset data index ? ))
(setq index (1+ index)))
(riece-send-string
(format "NOTICE %s :%s\r\n"
(riece-identity-prefix
(riece-ruby-property name 'riece-eval-ruby-target))
data))
(riece-display-message
(riece-make-message (riece-current-nickname)
(riece-ruby-property name 'riece-eval-ruby-target)
data
'notice))))
(defun riece-eval-ruby-display-message-function (message)
(if (and (get 'riece-eval-ruby 'riece-addon-enabled)
(riece-message-own-p message)
(string-match riece-eval-ruby-prefix-regexp
(riece-message-text message)))
(let ((name (riece-ruby-execute
(substring (riece-message-text message)
(match-end 0)))))
(riece-ruby-set-property name
'riece-eval-ruby-target
(riece-message-target message))
(riece-ruby-set-exit-handler name
#'riece-eval-ruby-exit-handler))))
(defun riece-eval-ruby-insinuate ()
(add-hook 'riece-after-display-message-functions
'riece-eval-ruby-display-message-function))
(defun riece-eval-ruby-uninstall ()
(remove-hook 'riece-after-display-message-functions
'riece-eval-ruby-display-message-function))
(provide 'riece-eval-ruby)
;;; riece-eval-ruby.el ends here
riece-8.0.0/lisp/riece-menu.el 0000644 0001750 0001750 00000012572 11570265470 013067 0000000 0000000 ;;; riece-menu.el --- setup menus -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-options)
(require 'riece-globals)
(require 'riece-identity)
(require 'riece-layout)
(require 'riece-server)
(require 'riece-mcat)
(defcustom riece-menu-items
(list
"Riece"
(vector (riece-mcat "Next Channel") 'riece-command-next-channel
'riece-current-channels)
(vector (riece-mcat "Previous Channel") 'riece-command-previous-channel
'riece-current-channels)
"----"
(list (riece-mcat "Channels")
:filter 'riece-menu-create-channels-menu)
(list (riece-mcat "Servers")
:filter 'riece-menu-create-servers-menu)
"----"
(vector (riece-mcat "Redraw Layout") 'riece-command-configure-windows t)
(list (riece-mcat "Change Window Layout...")
:filter 'riece-menu-create-layouts-menu)
(list (riece-mcat "Toggle...")
(vector (riece-mcat "Freeze Channel Buffer")
'riece-command-toggle-freeze t)
(vector (riece-mcat "Freeze Channel Buffer Until Next Message")
'riece-command-toggle-own-freeze t)
(vector (riece-mcat "Display Channel Buffer")
'riece-command-toggle-channel-buffer-mode t)
(vector (riece-mcat "Display Channel List Buffer")
'riece-command-toggle-channel-list-buffer-mode t)
(vector (riece-mcat "Display User List Buffer")
'riece-command-toggle-user-list-buffer-mode t))
"----"
(vector (riece-mcat "Join Channel") 'riece-command-join t)
(vector (riece-mcat "Part Channel") 'riece-command-part
'riece-current-channel)
(vector (riece-mcat "Set Channel Topic") 'riece-command-topic
'riece-current-channel)
(vector (riece-mcat "Kick User") 'riece-command-kick
'riece-current-channel)
(vector (riece-mcat "Invite User") 'riece-command-invite
'riece-current-channel)
"----"
(vector (riece-mcat "Manage Add-ons") 'riece-command-list-addons t)
(vector (riece-mcat "Version") 'riece-version t)
(vector (riece-mcat "Submit Bug Report") 'riece-submit-bug-report t)
"----"
(vector (riece-mcat "Mark As Away") 'riece-command-toggle-away t)
(vector (riece-mcat "Change Nickname") 'riece-command-change-nickname t)
(vector (riece-mcat "Quit IRC") 'riece-command-quit t))
"Menu used in command mode."
:type 'sexp
:group 'riece-options)
(defconst riece-menu-description
"Setup Riece's command menus.")
(defun riece-menu-create-layouts-menu (_menu)
(mapcar (lambda (entry)
(vector (car entry) (list 'riece-command-change-layout (car entry))
t))
riece-layout-alist))
(defun riece-menu-create-channels-menu (_menu)
(delq nil
(mapcar (lambda (channel)
(if channel
(list (riece-format-identity channel)
(vector (riece-mcat "Switch To Channel")
(list 'riece-command-switch-to-channel
channel)
t)
(vector (riece-mcat "Part Channel")
(list 'riece-command-part channel) t)
(vector (riece-mcat "List Channel")
(list 'riece-command-list
(riece-identity-prefix channel)) t))))
riece-current-channels)))
(defun riece-menu-create-servers-menu (_menu)
(mapcar (lambda (entry)
(list (car entry)
(vector (riece-mcat "Open Server")
(list 'riece-command-open-server (car entry))
(not (riece-server-opened (car entry))))
(vector (riece-mcat "Close Server")
(list 'riece-command-close-server (car entry))
(riece-server-opened (car entry)))))
riece-server-alist))
(defvar riece-command-mode-map)
(defvar riece-menu)
(defun riece-menu-command-mode-hook ()
(easy-menu-define riece-menu
riece-command-mode-map
"Riece Menu"
riece-menu-items)
(easy-menu-add riece-menu))
(defun riece-menu-requires ()
(if (memq 'riece-mcat riece-addons)
'(riece-mcat)))
(defun riece-menu-insinuate ()
(if (fboundp 'custom-reevaluate-setting)
(custom-reevaluate-setting 'riece-menu-items)
;; We could emulate custom-reevaluate-setting by manually eval the
;; 'standard-value property of 'riece-menu-items. In that case
;; (i.e. XEmacs 21.4), however, there is no way to render
;; non-ASCII labels in the menu, so give up here.
)
(if riece-command-buffer
(with-current-buffer riece-command-buffer
(riece-menu-command-mode-hook)))
(add-hook 'riece-command-mode-hook
'riece-menu-command-mode-hook))
(defun riece-menu-uninstall ()
(if riece-command-buffer
(with-current-buffer riece-command-buffer
(easy-menu-remove riece-menu)))
(remove-hook 'riece-command-mode-hook
'riece-menu-command-mode-hook))
(provide 'riece-menu)
;;; riece-menu.el ends here
riece-8.0.0/lisp/riece-xfaceb.el 0000644 0001750 0001750 00000011707 11570265470 013352 0000000 0000000 ;;; riece-xfaceb.el --- display X-Face/Colour Face in IRC buffers -*- lexical-binding: t -*-
;; Copyright (C) 2005 Daiki Ueno
;; Author: Steve Youngs
;; Created: 2005-09-03
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece. It is adapted from
;; `riece-xface' but gets the image data from BBDB instead of LSDB.
;; This add-on displays either X-Face or colour Face images in the
;; Riece "Users" buffers. The image data comes from entries in a BBDB
;; db. Consequently it does require a little setting up in BBDB...
;; BBDB Setup:
;; You need a new field called "ircnick" for each IRC contact that is
;; in your BBDB. Its value is the IRC nickname of the contact (what
;; is listed in the Riece "Users" buffer).
;; M-x bbdb-insert-new-field RET ircnick RET
;; answer `yes' to the prompt about the field not being defined
;; then give it a value which will be that record's IRC nickname
;; Then you'll need to collect X-Face: and Face: headers from your mail.
;; To do that see:
;;; Code:
(require 'riece-identity)
(require 'riece-globals)
(require 'riece-display)
(autoload 'bbdb-records "bbdb")
(autoload 'bbdb-record-getprop "bbdb")
(defconst riece-xfaceb-description
"Display X-Face & Colour Face images in IRC buffers \(BBDB\).")
(defcustom riece-xfaceb-prefer-cface-to-xface (featurep 'png)
"*When non-nil, display colour face images instead of X-Face."
:type 'boolean
:group 'riece-looks)
(defun riece-xfaceb-face-to-png (face)
"Base64 decode a Face header into a PNG.
Returns a string."
(with-temp-buffer
(insert face)
(base64-decode-region (point-min) (point-max))
(buffer-string)))
(defun riece-xfaceb-update-user-list-buffer ()
"Add X-Face or Colour Face images to channel users' buffer."
(when (get 'riece-xfaceb 'riece-addon-enabled)
(let ((users (ignore-errors
(riece-with-server-buffer
(riece-identity-server riece-current-channel)
(riece-channel-get-users (riece-identity-prefix
riece-current-channel)))))
all-records cface xface nick name record)
(while users
(setq name (caar users))
(setq all-records (bbdb-records))
(while all-records
(setq record (car all-records)
nick (bbdb-record-getprop record 'ircnick)
xface (bbdb-record-getprop record 'face)
cface (bbdb-record-getprop record 'cface))
(when (and (equal nick name)
(or xface cface))
(with-current-buffer riece-user-list-buffer
(goto-char (point-min))
(re-search-forward (regexp-quote name) nil t)
(beginning-of-line)
(when (and xface
(or (not riece-xfaceb-prefer-cface-to-xface)
(not cface)))
(set-extent-begin-glyph
(extent-at (point))
(make-glyph (list (vector 'xface
:data (concat "X-Face: " xface)
:foreground "black"
:background "white")))))
(when (and (featurep 'png)
riece-xfaceb-prefer-cface-to-xface
cface)
(set-extent-begin-glyph
(extent-at (point))
(make-glyph (list (vector 'png
:data (riece-xfaceb-face-to-png cface)))))))
;; We have a match, get out of the inner loop
(setq all-records nil))
(setq all-records (cdr all-records)))
(setq users (cdr users))))))
(defun riece-xfaceb-requires ()
)
(defun riece-xfaceb-user-list-mode-hook ()
(add-hook 'riece-update-buffer-functions
'riece-xfaceb-update-user-list-buffer t t))
(defun riece-xfaceb-insinuate ()
(if riece-user-list-buffer
(with-current-buffer riece-user-list-buffer
(riece-xfaceb-user-list-mode-hook)))
(add-hook 'riece-user-list-mode-hook
'riece-xfaceb-user-list-mode-hook))
(defun riece-xfaceb-uninstall ()
(if riece-user-list-buffer
(with-current-buffer riece-user-list-buffer
(remove-hook 'riece-update-buffer-functions
'riece-xfaceb-update-user-list-buffer t)))
(remove-hook 'riece-user-list-mode-hook
'riece-xfaceb-user-list-mode-hook))
(defun riece-xfaceb-enable ()
(if riece-current-channel
(riece-emit-signal 'user-list-changed riece-current-channel)))
(defun riece-xfaceb-disable ()
(if riece-current-channel
(riece-emit-signal 'user-list-changed riece-current-channel)))
(provide 'riece-xfaceb)
;;; riece-xfaceb.el ends here
riece-8.0.0/lisp/riece-000.el 0000644 0001750 0001750 00000005765 11570265470 012430 0000000 0000000 ;;; riece-000.el --- handlers for 000 replies -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-misc)
(require 'riece-version)
(require 'riece-commands) ;riece-command-join
(eval-when-compile
(autoload 'riece-default-handle-numeric-reply "riece-handle"))
(defun riece-handle-default-000-message (prefix number name string)
(setq riece-nick-accepted 'ok)
(riece-default-handle-numeric-reply
riece-info-prefix prefix number name string))
(defun riece-handle-001-message (prefix _number name string)
"RPL_WELCOME \"Welcome to the Internet Relay Network !@\""
(if riece-real-server-name
(error (riece-mcat "Already registered")))
(setq riece-real-server-name prefix
riece-real-nickname name
riece-real-userhost nil)
;; Before sending USERHOST, register myself with riece-obarray
;; because it may take some time.
(riece-get-user name)
(riece-send-string (format "USERHOST %s\r\n" riece-real-nickname))
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat (substring string 1) "\n"))
(if (equal riece-server-name "")
(message (riece-mcat "Logging in to IRC server...done"))
(message (riece-mcat "Logging in to %s...done") riece-server-name))
(run-hooks 'riece-after-login-hook)
(let ((channel-list riece-startup-channel-list)
entry identity)
(while channel-list
(unless (listp (setq entry (car channel-list)))
(setq entry (list (car channel-list))))
(if (equal (riece-identity-server
(setq identity (riece-parse-identity (car entry))))
riece-server-name)
(riece-command-join-channel identity (nth 1 entry)))
(setq channel-list (cdr channel-list)))))
(defun riece-handle-004-message (_prefix _number _name string)
"RPL_MYINFO \" \""
(if (string-match "^[^ ]+ +[^ ]+ +\\([^ ]+\\) +" string)
(setq riece-supported-user-modes
(string-to-list (match-string 1 string))
riece-supported-channel-modes
(string-to-list (substring string (match-end 0))))
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat string "\n"))))
(provide 'riece-000)
;;; riece-000.el ends here
riece-8.0.0/lisp/riece-irc.el 0000644 0001750 0001750 00000010566 11570265470 012701 0000000 0000000 ;;; riece-irc.el --- IRC protocol -*- lexical-binding: t -*-
;; Copyright (C) 1998-2004 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-filter)
(require 'riece-server)
(require 'riece-mcat)
(defun riece-irc-open-server (server server-name)
(riece-server-keyword-bind server
(let (selective-display
(coding-system-for-read 'binary)
(coding-system-for-write 'binary)
process)
(if (equal server-name "")
(message (riece-mcat "Connecting to IRC server..."))
(message (riece-mcat "Connecting to %s...") server-name))
(condition-case error
(setq process
(funcall function (riece-server-process-name server-name)
(concat " *IRC*" server-name)
host service))
(error
(if (equal server-name "")
(message (riece-mcat "Connecting to IRC server...failed: %S")
error)
(message (riece-mcat "Connecting to %s...failed: %S") server-name
error))
(signal (car error) (cdr error))))
(if (equal server-name "")
(message (riece-mcat "Connecting to IRC server...done"))
(message (riece-mcat "Connecting to %s...done") server-name))
(riece-reset-process-buffer process)
(with-current-buffer (process-buffer process)
(setq riece-server-name server-name))
(set-process-sentinel process 'riece-sentinel)
(set-process-filter process 'riece-filter)
(if (equal server-name "")
(message (riece-mcat "Logging in to IRC server..."))
(message (riece-mcat "Logging in to %s...") server-name))
(if riece-reconnect-with-password ;password incorrect or not set.
(unwind-protect
(setq password
(condition-case nil
(let (inhibit-quit)
(if (equal server-name "")
(riece-read-passwd (riece-mcat "Password: "))
(riece-read-passwd
(format (riece-mcat "Password for %s: ")
server-name))))
(quit
(if (equal server-name "")
(message (riece-mcat "Password: Quit"))
(message (riece-mcat "Password for %s: Quit")
server-name))
'quit)))
(setq riece-reconnect-with-password nil)))
(if (eq password 'quit)
(delete-process process)
(if password
(riece-process-send-string process
(format "PASS %s\r\n" password)))
(riece-process-send-string process (format "NICK %s\r\n" nickname))
(unless realname
(setq realname (riece-mcat "No information given")))
(if coding
(setq realname (encode-coding-string realname
(if (consp coding)
(cdr coding)
coding))))
(riece-process-send-string process
(format "USER %s * * :%s\r\n"
(or username
(user-real-login-name))
realname))
(with-current-buffer (process-buffer process)
(setq riece-last-nickname riece-real-nickname
riece-nick-accepted 'sent
riece-coding-system coding))
process))))
(defun riece-irc-quit-server-process (process &optional message)
(if riece-quit-timeout
(riece-run-at-time riece-quit-timeout nil
(lambda (process)
(if (rassq process riece-server-process-alist)
(delete-process process)))
process))
(let ((server-name (with-current-buffer (process-buffer process)
riece-server-name)))
(if (equal server-name "")
(message (riece-mcat "Sending QUIT..."))
(message (riece-mcat "Sending QUIT to \"%s\"...") server-name))
(riece-process-send-string process
(if message
(format "QUIT :%s\r\n" message)
"QUIT\r\n"))
(if (equal server-name "")
(message (riece-mcat "Sending QUIT...done"))
(message (riece-mcat "Sending QUIT to \"%s\"...done") server-name))))
(provide 'riece-irc)
;;; riece-irc.el ends here
riece-8.0.0/lisp/riece-identity.el 0000644 0001750 0001750 00000017342 11570265470 013754 0000000 0000000 ;;; riece-identity.el --- an identity object -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-globals)
(require 'riece-coding)
(defcustom riece-channel-coding-system-alist nil
"An alist mapping from channels to coding-systems."
:type '(repeat (cons (string :tag "Channel")
(symbol :tag "Coding system")))
:group 'riece-coding)
(defvar riece-abbrev-identity-string-function nil)
(defvar riece-expand-identity-string-function nil)
(defconst riece-identity-prefix-case-pair-alist
'((?\[ . ?{)
(?\] . ?})
(?\\ . ?|)
(?~ . ?^))
"An alist used to canonicalize identity-prefix.
RFC2812, 2.2 \"Character codes\" says:
Because of IRC's Scandinavian origin, the characters {}|^ are
considered to be the lower case equivalents of the characters []\~,
respectively. This is a critical issue when determining the
equivalence of two nicknames or channel names.")
(defun riece-identity-prefix (identity)
"Return the component sans its server name from IDENTITY."
(aref identity 0))
(defun riece-identity-server (identity)
"Return the server name component in IDENTITY."
(aref identity 1))
(defun riece-make-identity (prefix server)
"Make an identity object from PREFIX and SERVER."
(vector prefix server))
(defun riece-identity-equal (ident1 ident2)
"Return t, if IDENT1 and IDENT2 are equal."
(and (riece-identity-equal-no-server
(riece-identity-prefix ident1)
(riece-identity-prefix ident2))
(equal
(riece-identity-server ident1)
(riece-identity-server ident2))))
(defun riece-identity-canonicalize-prefix (prefix)
"Canonicalize identity PREFIX."
(let ((i 0)
c)
(setq prefix (downcase prefix))
(while (< i (length prefix))
(if (setq c (cdr (assq (aref prefix i)
riece-identity-prefix-case-pair-alist)))
(aset prefix i c))
(setq i (1+ i)))
prefix))
(defun riece-identity-equal-no-server (prefix1 prefix2)
"Return t, if IDENT1 and IDENT2 are equal without server part."
(equal (riece-identity-canonicalize-prefix prefix1)
(riece-identity-canonicalize-prefix prefix2)))
(defun riece-identity-member (elt list &optional no-server)
"Return non-nil if an identity ELT is an element of LIST."
(catch 'found
(while list
(if (and (car list) ;needed because riece-current-channels
;contains nil.
(if no-server
(riece-identity-equal-no-server (car list) elt)
(riece-identity-equal (car list) elt)))
(throw 'found list)
(setq list (cdr list))))))
(defun riece-identity-assoc (elt alist &optional no-server)
"Return non-nil if an identity ELT matches the car of an element of ALIST."
(catch 'found
(while alist
(if (if no-server
(riece-identity-equal-no-server (car (car alist)) elt)
(riece-identity-equal (car (car alist)) elt))
(throw 'found (car alist))
(setq alist (cdr alist))))))
(defun riece-identity-assign-binding (item list binding)
(let ((slot (riece-identity-member item binding))
pointer)
(unless list ;we need at least one room
(setq list (list nil)))
(setq pointer list)
(if slot
(while (not (eq binding slot))
(unless (cdr pointer)
(setcdr pointer (list nil)))
(setq pointer (cdr pointer)
binding (cdr binding)))
(while (or (car pointer) (car binding))
(unless (cdr pointer)
(setcdr pointer (list nil)))
(setq pointer (cdr pointer)
binding (cdr binding))))
(setcar pointer item)
list))
(defun riece-format-identity (identity &optional prefix-only)
"Convert IDENTITY object to a string.
If the optional 2nd argument PREFIX-ONLY is non-nil, don't append
server part of the identity.
The returned string will be abbreviated by
`riece-abbrev-identity-string-function', and `riece-identity' property
will be added."
(let ((string
(if (or prefix-only
(equal (riece-identity-server identity) ""))
(copy-sequence (riece-identity-prefix identity))
(concat (riece-identity-prefix identity) " "
(riece-identity-server identity)))))
(if riece-abbrev-identity-string-function
(setq string (funcall riece-abbrev-identity-string-function string)))
(riece-put-text-property-nonsticky 0 (length string)
'riece-identity identity
string)
(if prefix-only
(riece-put-text-property-nonsticky 0 (length string)
'riece-format-identity-prefix-only t
string))
string))
(defun riece-parse-identity (string)
"Convert STRING to an identity object.
The string will be expanded by
`riece-expand-identity-string-function'."
(if riece-expand-identity-string-function
(setq string (funcall riece-expand-identity-string-function string)))
(riece-make-identity (if (string-match " " string)
(substring string 0 (match-beginning 0))
string)
(if (string-match " " string)
(substring string (match-end 0))
"")))
(defun riece-completing-read-identity (prompt channels
&optional predicate require-match
initial history default
no-server)
"Read an identity object in the minibuffer, with completion.
PROMPT is a string to prompt with; normally it ends in a colon and a space.
CHANNELS is a list of identity objects.
The rest of arguments are the same as `completing-read'."
(let* ((string
(completing-read
prompt
(mapcar (lambda (channel)
(list (riece-format-identity channel no-server)))
(delq nil (copy-sequence (or channels
riece-current-channels))))
predicate require-match initial history default))
(identity
(riece-parse-identity string)))
;;; (unless (string-match (concat "^\\(" riece-channel-regexp "\\|"
;;; riece-user-regexp "\\)")
;;; (riece-identity-prefix identity))
;;; (error "Invalid channel name!"))
identity))
(defun riece-coding-system-for-identity (identity)
(let ((alist riece-channel-coding-system-alist)
matcher)
(catch 'found
(while alist
(setq matcher (riece-parse-identity (car (car alist))))
(if (and (equal (riece-identity-server matcher)
(riece-identity-server identity))
(equal (riece-identity-prefix matcher)
(riece-identity-prefix identity)))
(throw 'found (cdr (car alist))))
(setq alist (cdr alist))))))
(defun riece-decoded-string-for-identity (decoded identity)
"Return the string decoded for IDENTITY."
(let ((coding-system (riece-coding-system-for-identity identity)))
(if (and coding-system
(not (eq (riece-decoded-coding-system decoded)
(if (consp coding-system)
(car coding-system)
coding-system))))
(riece-decode-coding-string-1 (riece-decoded-encoded-string decoded)
coding-system)
decoded)))
(defun riece-encode-coding-string-for-identity (string identity)
(let ((coding-system (riece-coding-system-for-identity identity)))
(if coding-system
(encode-coding-string string
(if (consp coding-system)
(cdr coding-system)
coding-system))
(riece-encode-coding-string string))))
(provide 'riece-identity)
;;; riece-identity.el ends here
riece-8.0.0/lisp/riece-commands.el 0000644 0001750 0001750 00000064063 11570265470 013726 0000000 0000000 ;;; riece-commands.el --- commands available in command buffer -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-channel)
(require 'riece-complete)
(require 'riece-layout)
(require 'riece-display)
(require 'riece-server)
(require 'riece-misc)
(require 'riece-identity)
(require 'riece-message)
(require 'riece-mcat)
;;; Channel movement:
(defun riece-command-switch-to-channel (channel)
(interactive (list (riece-completing-read-identity
(riece-mcat "Switch to channel/user: ")
riece-current-channels nil t)))
(unless (equal channel riece-current-channel)
(riece-switch-to-channel channel)))
(defun riece-command-switch-to-channel-by-number (number)
(interactive
(let ((command-name (symbol-name this-command)))
(if (string-match "[0-9]+$" command-name)
(list (string-to-number (match-string 0 command-name)))
(list (string-to-number (read-string (riece-mcat "Switch to number: ")))))))
(let ((channel (nth (1- number) riece-current-channels)))
(if channel
(riece-command-switch-to-channel channel)
(error "No such number!"))))
(eval-and-compile
(let ((number 1))
(while (<= number 20)
(defalias (intern (concat "riece-command-switch-to-channel-by-number-"
(number-to-string number)))
'riece-command-switch-to-channel-by-number)
(setq number (1+ number)))))
(defun riece-command-next-channel ()
"Select the next channel."
(interactive)
(when (> (length riece-current-channels) 1)
(let ((pointer (cdr (riece-identity-member
riece-current-channel
riece-current-channels))))
(while (and pointer
(null (car pointer)))
(setq pointer (cdr pointer)))
(when (null pointer)
(setq pointer riece-current-channels)
(while (and pointer
(null (car pointer)))
(setq pointer (cdr pointer))))
(if (car pointer)
(riece-command-switch-to-channel (car pointer))
(error "No such channel!")))))
(defun riece-command-previous-channel ()
"Select the previous channel."
(interactive)
(when (> (length riece-current-channels) 1)
(let ((pointer (riece-identity-member
riece-current-channel
riece-current-channels))
(start riece-current-channels)
channel)
(while (and start (not (eq start pointer)))
(if (car start)
(setq channel (car start)))
(setq start (cdr start)))
(when (null channel)
(setq start (copy-sequence riece-current-channels))
(setq start (delq nil start))
(and (> (length start) 1)
(setq channel (nth (1- (length start)) start))))
(if channel
(riece-command-switch-to-channel channel)
(error "No such channel!")))))
(defun riece-command-select-command-buffer ()
"Select the command buffer."
(interactive)
(let ((window (get-buffer-window riece-command-buffer)))
(if window
(select-window window))))
(defun riece-command-configure-windows ()
(interactive)
"Reconfigure windows with the current layout."
(riece-redisplay-buffers t))
(defun riece-command-suspend-resume ()
(interactive)
"Save or restore the current window configuration."
(let ((entry (assq 'riece-window-configuration (frame-parameters))))
(modify-frame-parameters (selected-frame)
(list (cons 'riece-window-configuration
(current-window-configuration))))
(if (cdr entry)
(set-window-configuration (cdr entry))
(delete-other-windows))
(message
(substitute-command-keys
"\\[riece-command-suspend-resume] to get back the last windows"))))
(defun riece-command-change-layout (name)
"Select a layout-name from all current available layouts and change
the layout to the selected layout-name."
(interactive (list (completing-read (riece-mcat "Change layout: ")
riece-layout-alist)))
(setq riece-layout name
riece-save-variables-are-dirty t)
(riece-command-configure-windows))
(defun riece-command-toggle-channel-buffer-mode ()
(interactive)
(setq riece-channel-buffer-mode
(not riece-channel-buffer-mode)
riece-save-variables-are-dirty t)
(riece-command-configure-windows))
(defun riece-command-toggle-others-buffer-mode ()
(interactive)
(setq riece-others-buffer-mode
(not riece-others-buffer-mode)
riece-save-variables-are-dirty t)
(riece-command-configure-windows))
(defun riece-command-toggle-user-list-buffer-mode ()
(interactive)
(setq riece-user-list-buffer-mode
(not riece-user-list-buffer-mode)
riece-save-variables-are-dirty t)
(riece-command-configure-windows))
(defun riece-command-toggle-channel-list-buffer-mode ()
(interactive)
(setq riece-channel-list-buffer-mode
(not riece-channel-list-buffer-mode)
riece-save-variables-are-dirty t)
(riece-command-configure-windows))
(defun riece-command-finger (user &optional recurse)
(interactive
(let* ((completion-ignore-case t)
(user (riece-completing-read-identity
(riece-mcat "Finger user: ")
(riece-get-users-on-server (riece-current-server-name))
nil nil nil nil nil t)))
(list user current-prefix-arg)))
(if recurse
(riece-send-string (format "WHOIS %s %s\r\n"
(riece-identity-prefix user)
(riece-identity-prefix user)))
(riece-send-string (format "WHOIS %s\r\n" (riece-identity-prefix user)))))
(defun riece-command-topic (topic)
(interactive
(progn
(riece-check-channel-commands-are-usable t)
(list (read-from-minibuffer
(riece-mcat "Set topic: ")
(cons (or (riece-with-server-buffer
(riece-identity-server
riece-current-channel)
(riece-channel-get-topic
(riece-identity-prefix
riece-current-channel)))
"")
0)))))
(riece-send-string (format "TOPIC %s :%s\r\n"
(riece-identity-prefix riece-current-channel)
topic)
riece-current-channel))
(defun riece-command-invite (user)
(interactive
(let ((completion-ignore-case t))
(riece-check-channel-commands-are-usable t)
(list (riece-completing-read-identity
(riece-mcat "Invite user: ")
(riece-get-users-on-server (riece-current-server-name))
nil nil nil nil nil t))))
(riece-send-string (format "INVITE %s :%s\r\n"
(riece-identity-prefix user)
(riece-identity-prefix riece-current-channel))))
(defun riece-command-kick (user &optional message)
(interactive
(let ((completion-ignore-case t))
(riece-check-channel-commands-are-usable t)
(list (completing-read
(riece-mcat "Kick user: ")
(riece-with-server-buffer
(riece-identity-server riece-current-channel)
(riece-channel-get-users (riece-identity-prefix
riece-current-channel))))
(if current-prefix-arg
(read-string "Message: ")))))
(riece-send-string
(if message
(format "KICK %s %s :%s\r\n"
(riece-identity-prefix riece-current-channel)
user message)
(format "KICK %s %s\r\n"
(riece-identity-prefix riece-current-channel)
user))
riece-current-channel))
(defun riece-command-kick-with-ban (user pattern &optional message)
(interactive
(let ((completion-ignore-case t)
user)
(riece-check-channel-commands-are-usable t)
(riece-with-server-buffer (riece-identity-server riece-current-channel)
(setq user (completing-read
(riece-mcat "Kick user: ")
(riece-channel-get-users (riece-identity-prefix
riece-current-channel))))
(list
user
(read-from-minibuffer
(riece-mcat "Ban pattern: ")
(concat user "!" (riece-user-get-user-at-host user)))
(if current-prefix-arg
(read-string "Message: "))))))
(riece-send-string (format "MODE %s :+b %s\r\n"
(riece-identity-prefix riece-current-channel)
pattern)
riece-current-channel)
(riece-send-string
(if message
(format "KICK %s %s :%s\r\n"
(riece-identity-prefix riece-current-channel)
user message)
(format "KICK %s %s\r\n"
(riece-identity-prefix riece-current-channel)
user))
riece-current-channel))
(defun riece-command-names (pattern)
(interactive
(let ((completion-ignore-case t))
(list (read-from-minibuffer
(riece-mcat "NAMES pattern: ")
(if (and riece-current-channel
(riece-channel-p (riece-identity-prefix
riece-current-channel)))
(cons (riece-identity-prefix riece-current-channel)
0))))))
(if (or (not (equal pattern ""))
(yes-or-no-p (riece-mcat
"Really want to query NAMES without argument? ")))
(riece-send-string (format "NAMES %s\r\n" pattern))))
(defun riece-command-who (pattern)
(interactive
(let ((completion-ignore-case t))
(list (read-from-minibuffer
(riece-mcat "WHO pattern: ")
(if (and riece-current-channel
(riece-channel-p (riece-identity-prefix
riece-current-channel)))
(cons (riece-identity-prefix riece-current-channel)
0))))))
(if (or (not (equal pattern ""))
(yes-or-no-p (riece-mcat
"Really want to query WHO without argument? ")))
(riece-send-string (format "WHO %s\r\n" pattern))))
(defun riece-command-list (pattern)
(interactive
(let ((completion-ignore-case t))
(list (read-from-minibuffer
(riece-mcat "LIST pattern: ")
(if (and riece-current-channel
(riece-channel-p (riece-identity-prefix
riece-current-channel)))
(cons (riece-identity-prefix riece-current-channel)
0))))))
(if (or (not (equal pattern ""))
(yes-or-no-p (riece-mcat
"Really want to query LIST without argument? ")))
(riece-send-string (format "LIST %s\r\n" pattern))))
(defvar riece-temp-minibuffer-message)
(defvar riece-overriding-server-name)
(defun riece-command-change-mode (channel change)
(interactive
(let* ((completion-ignore-case t)
(channel
(if current-prefix-arg
(riece-completing-read-identity
(riece-mcat "Change mode for channel/user: ")
(riece-get-identities-on-server (riece-current-server-name))
nil nil nil nil nil t)
(riece-check-channel-commands-are-usable t)
riece-current-channel))
(riece-overriding-server-name (riece-identity-server channel))
(riece-temp-minibuffer-message
(concat (riece-mcat "[Available modes: ")
(riece-with-server-buffer (riece-identity-server channel)
(if (riece-channel-p (riece-identity-prefix channel))
(if riece-supported-channel-modes
(apply #'string riece-supported-channel-modes))
(if riece-supported-user-modes
(apply #'string riece-supported-user-modes))))
"]")))
(list channel
(read-from-minibuffer
(concat (riece-concat-channel-modes
channel (riece-mcat "Mode (? for help)")) ": ")
nil riece-minibuffer-map))))
(if (equal change "")
(riece-send-string (format "MODE %s\r\n"
(riece-identity-prefix channel)))
(riece-send-string (format "MODE %s %s\r\n"
(riece-identity-prefix channel)
change))))
(defun riece-command-set-operators (users &optional _arg)
(interactive
(progn
(riece-check-channel-commands-are-usable t)
(let ((completion-ignore-case t))
(list (riece-completing-read-multiple
(if current-prefix-arg
(riece-mcat "Unset +o for users")
(riece-mcat "Set +o for users"))
(riece-with-server-buffer
(riece-identity-server riece-current-channel)
(riece-channel-get-users (riece-identity-prefix
riece-current-channel)))
(if current-prefix-arg
(lambda (user)
(memq ?o (cdr user)))
(lambda (user)
(not (memq ?o (cdr user))))))
current-prefix-arg))))
(let (group)
(while users
(setq group (cons (car users) group)
users (cdr users))
(when (or (= (length group) 3)
(null users))
(riece-send-string
(format "MODE %s %c%s %s\r\n"
(riece-identity-prefix riece-current-channel)
(if current-prefix-arg
?-
?+)
(make-string (length group) ?o)
(mapconcat #'identity (nreverse group) " ")))
(setq group nil)))))
(defun riece-command-set-speakers (users &optional _arg)
(interactive
(progn
(riece-check-channel-commands-are-usable t)
(let ((completion-ignore-case t))
(list (riece-completing-read-multiple
(if current-prefix-arg
(riece-mcat "Unset +v for users")
(riece-mcat "Set +v for users"))
(riece-with-server-buffer
(riece-identity-server riece-current-channel)
(riece-channel-get-users (riece-identity-prefix
riece-current-channel)))
(if current-prefix-arg
(lambda (user)
(memq ?v (cdr user)))
(lambda (user)
(not (memq ?v (cdr user))))))
current-prefix-arg))))
(let (group)
(while users
(setq group (cons (car users) group)
users (cdr users))
(when (or (= (length group) 3)
(null users))
(riece-send-string
(format "MODE %s %c%s %s\r\n"
(riece-identity-prefix riece-current-channel)
(if current-prefix-arg
?-
?+)
(make-string (length group) ?v)
(mapconcat #'identity (nreverse group) " ")))
(setq group nil)))))
(defun riece-command-send-message (message notice)
"Send MESSAGE to the current channel."
(run-hooks 'riece-command-send-message-hook)
(if (equal message "")
(error (riece-mcat "No text to send")))
(riece-check-channel-commands-are-usable)
(if notice
(progn
(riece-send-string
(format "NOTICE %s :%s\r\n"
(riece-identity-prefix riece-current-channel)
message)
riece-current-channel)
(riece-display-message
(riece-make-message (riece-current-nickname) riece-current-channel
message 'notice t)))
(riece-send-string
(format "PRIVMSG %s :%s\r\n"
(riece-identity-prefix riece-current-channel)
message)
riece-current-channel)
(riece-display-message
(riece-make-message (riece-current-nickname) riece-current-channel
message nil t))))
(defun riece-command-enter-message ()
"Send the current line to the current channel."
(interactive)
(riece-command-send-message (buffer-substring
(riece-line-beginning-position)
(riece-line-end-position))
nil)
(forward-line 1)
(when (eobp)
(insert "\n")))
(defun riece-command-enter-message-as-notice ()
"Send the current line to the current channel as NOTICE."
(interactive)
(riece-command-send-message (buffer-substring
(riece-line-beginning-position)
(riece-line-end-position))
t)
(forward-line 1)
(when (eobp)
(insert "\n")))
(defun riece-command-enter-message-to-user (user)
"Send the current line to USER."
(interactive
(if (and (bolp) (eolp))
(error "No text to send")
(let ((completion-ignore-case t))
(list (riece-completing-read-identity
(riece-mcat "Message to user: ")
(riece-get-users-on-server (riece-current-server-name))
nil nil nil nil nil t)))))
(let ((text (buffer-substring
(riece-line-beginning-position)
(riece-line-end-position))))
(riece-send-string
(format "PRIVMSG %s :%s\r\n" (riece-identity-prefix user) text)
user)
(riece-display-message
(riece-make-message (riece-current-nickname) user text nil t)))
(forward-line 1)
(when (eobp)
(insert "\n")))
(defun riece-command-join-channel (target key)
(unless (riece-server-opened (riece-identity-server target))
(error "%s" (substitute-command-keys
"Type \\[riece-command-open-server] to open server.")))
(riece-send-string (if key
(format "JOIN %s :%s\r\n"
(riece-identity-prefix target)
key)
(format "JOIN %s\r\n"
(riece-identity-prefix target)))
target))
(defun riece-command-join-partner (target)
(let ((pointer (riece-identity-member target riece-current-channels)))
(if pointer
(riece-command-switch-to-channel (car pointer))
(riece-join-channel target)
(riece-switch-to-channel target))))
(defun riece-command-join (target)
(interactive
(let ((completion-ignore-case t))
(list
(if riece-join-channel-candidate
(let ((default (riece-format-identity
riece-join-channel-candidate)))
(riece-completing-read-identity
(format (riece-mcat "Join channel/user (default %s): ") default)
(riece-get-identities-on-server (riece-current-server-name))
nil nil nil nil default))
(riece-completing-read-identity
(riece-mcat "Join channel/user: ")
(riece-get-identities-on-server (riece-current-server-name)))))))
(let ((pointer (riece-identity-member target riece-current-channels)))
(if pointer
(riece-command-switch-to-channel (car pointer))
(if (riece-channel-p (riece-identity-prefix target))
(riece-command-join-channel target nil)
(riece-command-join-partner target)))))
(defun riece-command-part-channel (target message)
(unless (riece-server-opened (riece-identity-server target))
(error "%s" (substitute-command-keys
"Type \\[riece-command-open-server] to open server.")))
(riece-send-string (if message
(format "PART %s :%s\r\n"
(riece-identity-prefix target)
message)
(format "PART %s\r\n"
(riece-identity-prefix target)))
target))
(defun riece-command-part (target &optional message)
(interactive
(progn
(riece-check-channel-commands-are-usable)
(let* ((completion-ignore-case t)
(target
(riece-completing-read-identity
(format (riece-mcat "Part from channel/user (default %s): ")
(riece-format-identity riece-current-channel))
riece-current-channels nil nil nil nil
(riece-format-identity riece-current-channel)))
(message
(if current-prefix-arg
(read-string (riece-mcat "Message: "))
riece-part-message)))
(list target message))))
(if (riece-identity-member target riece-current-channels)
(if (riece-channel-p (riece-identity-prefix target))
(riece-command-part-channel target message)
(riece-part-channel target))
(error "You are not talking with %s" target)))
(defun riece-command-change-nickname (nickname)
"Change your nickname to NICK."
(interactive "sEnter your nickname: ")
(riece-send-string (format "NICK %s\r\n" nickname)))
(defun riece-command-scroll-down (lines)
"Scroll LINES down dialogue buffer from command buffer."
(interactive "P")
(let ((buffer (if (and riece-channel-buffer-mode
riece-current-channel)
riece-channel-buffer
riece-dialogue-buffer)))
(if (get-buffer-window buffer)
(condition-case nil
(let ((other-window-scroll-buffer buffer))
(scroll-other-window-down lines))
(beginning-of-buffer
(message (riece-mcat "Beginning of buffer")))))))
(defun riece-command-scroll-up (lines)
"Scroll LINES up dialogue buffer from command buffer."
(interactive "P")
(let ((buffer (if (and riece-channel-buffer-mode
riece-current-channel)
riece-channel-buffer
riece-dialogue-buffer)))
(if (get-buffer-window buffer)
(condition-case nil
(let ((other-window-scroll-buffer buffer))
(scroll-other-window lines))
(end-of-buffer
(message (riece-mcat "End of buffer")))))))
(defun riece-command-user-list-scroll-down (lines)
"Scroll LINES down user list buffer from command buffer."
(interactive "P")
(if (get-buffer-window riece-user-list-buffer)
(condition-case nil
(let ((other-window-scroll-buffer riece-user-list-buffer))
(scroll-other-window-down lines))
(beginning-of-buffer
(message (riece-mcat "Beginning of buffer"))))))
(defun riece-command-user-list-scroll-up (lines)
"Scroll LINES up user list buffer from command buffer."
(interactive "P")
(if (get-buffer-window riece-user-list-buffer)
(condition-case nil
(let ((other-window-scroll-buffer riece-user-list-buffer))
(scroll-other-window lines))
(end-of-buffer
(message (riece-mcat "End of buffer"))))))
(defun riece-command-toggle-away (&optional message)
"Mark yourself as being away."
(interactive
(if (and (not (riece-with-server-buffer (riece-identity-server
(riece-current-nickname))
(riece-user-get-away (riece-identity-prefix
(riece-current-nickname)))))
current-prefix-arg)
(list (read-from-minibuffer
(riece-mcat "Away message: ") (cons (or riece-away-message "")
0)))))
(if (riece-with-server-buffer (riece-identity-server
(riece-current-nickname))
(riece-user-get-away (riece-identity-prefix
(riece-current-nickname))))
(riece-send-string "AWAY\r\n")
(riece-send-string (format "AWAY :%s\r\n" (or message
riece-away-message)))))
(defun riece-command-toggle-freeze (&optional arg)
"Prevent automatic scrolling of the dialogue window.
If prefix argument ARG is non-nil, toggle frozen status."
(interactive "P")
(with-current-buffer (if (riece-derived-mode-p 'riece-dialogue-mode)
(current-buffer)
(if (and riece-channel-buffer-mode
riece-channel-buffer)
riece-channel-buffer
riece-dialogue-buffer))
(setq riece-freeze (if arg
(< 0 (prefix-numeric-value arg))
(not riece-freeze)))
(riece-emit-signal 'buffer-freeze-changed
(current-buffer) riece-freeze)))
(defun riece-command-toggle-own-freeze (&optional arg)
"Prevent automatic scrolling of the dialogue window.
The difference from `riece-command-freeze' is that your messages are hidden.
If prefix argument ARG is non-nil, toggle frozen status."
(interactive "P")
(with-current-buffer (if (riece-derived-mode-p 'riece-dialogue-mode)
(current-buffer)
(if (and riece-channel-buffer-mode
riece-channel-buffer)
riece-channel-buffer
riece-dialogue-buffer))
(if (if arg
(< 0 (prefix-numeric-value arg))
(not (eq riece-freeze 'own)))
(setq riece-freeze 'own)
(setq riece-freeze nil))
(riece-emit-signal 'buffer-freeze-changed
(current-buffer) riece-freeze)))
(eval-when-compile
(autoload 'riece-exit "riece"))
(defun riece-command-quit (&optional arg)
"Quit IRC."
(interactive "P")
(if (null riece-server-process-alist)
(progn
(message (riece-mcat "No server process"))
(ding))
(if (y-or-n-p (riece-mcat "Really quit IRC? "))
(let ((message
(if arg
(read-string (riece-mcat "Message: "))
riece-quit-message))
(alist riece-server-process-alist))
(while alist
(riece-quit-server-process (cdr (car alist)) message)
(setq alist (cdr alist)))))))
(defun riece-command-raw (command)
"Enter raw IRC command, which is sent to the server."
(interactive "sIRC command: ")
(riece-send-string (concat command "\r\n")))
(defun riece-command-beginning-of-buffer ()
"Scroll channel buffer to the beginning."
(interactive)
(let (buffer window)
(setq buffer (if riece-channel-buffer-mode
riece-channel-buffer
riece-dialogue-buffer))
(or (setq window (get-buffer-window buffer))
(setq window (get-buffer-window riece-dialogue-buffer)
buffer riece-dialogue-buffer))
(when window
(save-selected-window
(select-window window)
(goto-char (point-min))))))
(defun riece-command-end-of-buffer ()
"Scroll channel buffer to the end."
(interactive)
(let (buffer window)
(setq buffer (if riece-channel-buffer-mode
riece-channel-buffer
riece-dialogue-buffer))
(or (setq window (get-buffer-window buffer))
(setq window (get-buffer-window riece-dialogue-buffer)
buffer riece-dialogue-buffer))
(when window
(save-selected-window
(select-window window)
(goto-char (point-max))))))
(defun riece-command-copy-region (start end)
"Move current region between START and END to `kill-ring'."
(interactive "r")
(kill-new (buffer-substring-no-properties start end)))
(defun riece-command-complete-user ()
"Complete a user name in the current buffer."
(interactive)
(let* ((completion-ignore-case t)
(table (mapcar (lambda (user)
(list (riece-format-identity user t)))
(riece-get-users-on-server
(riece-current-server-name))))
(current (or (current-word) ""))
(completion (try-completion current table))
(all (all-completions current table)))
(if (eq completion t)
nil
(if (null completion)
(message (riece-mcat "Can't find completion for \"%s\"") current)
(if (equal current completion)
(with-output-to-temp-buffer "*Help*"
(display-completion-list all))
(re-search-forward "\\>" nil t)
(delete-region (point) (- (point) (length current)))
(insert completion))))))
(defun riece-command-open-server (server-name)
(interactive
(list (completing-read (riece-mcat "Open server: ") riece-server-alist)))
(if (riece-server-process server-name)
(error "%s is already opened" server-name))
(riece-open-server
(riece-server-name-to-server server-name)
server-name))
(defun riece-command-close-server (server-name &optional message)
(interactive
(list (completing-read (riece-mcat "Close server: ")
riece-server-process-alist)
(if current-prefix-arg
(read-string (riece-mcat "Message: "))
riece-quit-message)))
(let ((process (riece-server-process server-name)))
(unless process
(error "%s is not opened" server-name))
(riece-quit-server-process process message)))
(defun riece-command-universal-server-name-argument ()
(interactive)
(let* ((riece-overriding-server-name
(completing-read (riece-mcat "Server: ") riece-server-process-alist))
(command
(key-binding (read-key-sequence
(format (riece-mcat "Command to execute on \"%s\":")
riece-overriding-server-name)))))
(message "")
(call-interactively command)))
(eval-when-compile
(autoload 'riece-save-variables-files "riece"))
(defun riece-command-save-variables ()
"Save `riece-variables-file'."
(interactive)
(if (or riece-save-variables-are-dirty
(y-or-n-p (riece-mcat "No changes made. Save anyway? ")))
(riece-save-variables-files)))
(provide 'riece-commands)
;;; riece-commands.el ends here
riece-8.0.0/lisp/riece-debug.el 0000644 0001750 0001750 00000006317 11570265470 013211 0000000 0000000 ;;; riece-debug.el --- debug support -*- lexical-binding: t -*-
;; Copyright (C) 1998-2005 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-globals)
(require 'riece-options)
(defun riece-debug-1 (message detail)
(message "riece-debug: %s" message)
(with-current-buffer riece-debug-buffer
(goto-char (point-max))
(let ((time (format-time-string "%Y-%m-%d:%H:%M:%S")))
(if detail
(insert "*** " time ": " message "\n" detail "\n")
(insert "*** " time ": " message "\n")))))
(defun riece-debug (message &optional detail)
"Print a one-line debug MESSAGE at the bottom of the frame.
If the optional 2nd argument DETAIL is specified, it is stored into
`riece-debug-buffer'."
(ignore (riece-debug-1 message detail)))
(defun riece-debug-reset-standard-output ()
"Reset `riece-temp-buffer' to be used as `standard-output'."
(with-current-buffer riece-temp-buffer
(buffer-disable-undo)
(erase-buffer)))
(defmacro riece-debug-with-backtrace (&rest body)
"Execute BODY and send a backtrace to `riece-temp-buffer'."
`(unwind-protect
(progn ,@body)
(riece-debug-reset-standard-output)
(let ((standard-output riece-temp-buffer))
(backtrace))))
(put 'riece-debug-with-backtrace 'lisp-indent-function 0)
(put 'riece-debug-with-backtrace 'edebug-form-spec '(form body))
(defmacro riece-ignore-errors (location &rest body)
"Execute BODY; if an error occurs, return nil.
Otherwise, return result of last FORM.
If `riece-debug' is non-nil and an error occurred, it sends a
backtrace to standard-output."
`(condition-case error
(if riece-debug
(riece-debug-with-backtrace ,@body)
,@body)
(error
(if riece-debug
(with-current-buffer riece-temp-buffer
(goto-char (point-min))
(if (re-search-forward "^ signal(" nil t)
(delete-region (point-min) (match-beginning 0)))
(riece-debug (format "Error in `%s': %S" ,location error)
(buffer-string))))
nil)))
(put 'riece-ignore-errors 'lisp-indent-function 1)
(put 'riece-ignore-errors 'edebug-form-spec '(form body))
(defun riece-funcall-ignore-errors (location function &rest args)
"Call FUNCTION with ARGS; if an error occurs, return nil.
Otherwise, return result of the function.
If `riece-debug' is non-nil and an error occurred, it sends a
backtrace to standard-output."
(riece-ignore-errors location
(apply function args)))
(provide 'riece-debug)
;;; riece-debug.el ends here
riece-8.0.0/lisp/riece-hangman.el 0000644 0001750 0001750 00000017634 11570265470 013540 0000000 0000000 ;;; riece-hangman.el --- allow channel members to play the hangman game -*- lexical-binding: t -*-
;; Copyright (C) 1998-2004 Daiki Ueno
;; Author: Daiki Ueno
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-globals)
(require 'riece-identity)
(require 'riece-message)
(require 'riece-server)
(defgroup riece-hangman nil
"Allow channel members to play the hangman game."
:prefix "riece-"
:group 'riece)
(defcustom riece-hangman-hello-regexp "^,hangman$"
"Pattern of string to start the game."
:type 'string
:group 'riece-hangman)
(defcustom riece-hangman-bye-regexp "^,hangman bye$"
"Pattern of string to end the game."
:type 'string
:group 'riece-hangman)
(defcustom riece-hangman-words-file "/usr/share/dict/words"
"Location of words file."
:type 'file
:group 'riece-hangman)
(defvar riece-hangman-player-context-alist nil)
(defvar riece-hangman-words-buffer nil)
(defconst riece-hangman-description
"Allow channel members to play the hangman game.")
(put 'riece-hangman 'riece-addon-default-disabled t)
(defun riece-hangman-make-context (word)
"Make an instance of player context object.
This function is for internal use only."
(vector word nil 0))
(defun riece-hangman-context-word (context)
"Return the correct word of CONTEXT.
This function is for internal use only."
(aref context 0))
(defun riece-hangman-context-guessed (context)
"Return the guessed letters in this CONTEXT.
This function is for internal use only."
(aref context 1))
(defun riece-hangman-context-missed-count (context)
"Return the count of missed guesses in this CONTEXT.
This function is for internal use only."
(aref context 2))
(defun riece-hangman-context-set-guessed (context guessed)
"Set the GUESSED letters in this CONTEXT.
This function is for internal use only."
(aset context 1 guessed))
(defun riece-hangman-context-set-missed-count (context missed-count)
"Set the count of MISSED guesses in this CONTEXT.
This function is for internal use only."
(aset context 2 missed-count))
(defun riece-hangman-word ()
"Return random word.
The wordlist is read from `riece-hangman-words-file'."
(unless (and riece-hangman-words-buffer
(buffer-name riece-hangman-words-buffer))
(setq riece-hangman-words-buffer (generate-new-buffer " *riece-hangman*"))
(with-current-buffer riece-hangman-words-buffer
(buffer-disable-undo)
(insert-file-contents riece-hangman-words-file)
(let ((case-fold-search nil))
(delete-non-matching-lines "^[a-z][a-z][a-z][a-z][a-z][a-z]+"))))
(with-current-buffer riece-hangman-words-buffer
(goto-char (1+ (random (buffer-size))))
(if (eobp)
(beginning-of-line -1)
(beginning-of-line))
(buffer-substring (point) (progn (end-of-line) (point)))))
(defun riece-hangman-reply (target string)
(riece-display-message
(riece-make-message (riece-make-identity riece-real-nickname
riece-server-name)
(riece-make-identity target riece-server-name)
string 'notice t))
(riece-send-string (format "NOTICE %s :%s\r\n" target string)))
(defun riece-hangman-reply-with-context (user target context)
(let ((masked-word (make-string
(length (riece-hangman-context-word context))
?-))
(guessed (copy-sequence (riece-hangman-context-guessed context)))
(index 0))
(while (< index (length (riece-hangman-context-word context)))
(if (memq (aref (riece-hangman-context-word context) index) guessed)
(aset masked-word index
(aref (riece-hangman-context-word context) index)))
(setq index (1+ index)))
(riece-hangman-reply
target
(format "%s: Word: %s, Guessed: %s"
user masked-word
(if guessed
(apply #'string (sort guessed #'<))
"")))))
(defun riece-hangman-after-privmsg-hook (prefix string)
(if (get 'riece-hangman 'riece-addon-enabled)
(let* ((user (riece-prefix-nickname prefix))
(parameters (riece-split-parameters string))
(targets (split-string (car parameters) ","))
(message (nth 1 parameters))
case-fold-search
pointer word guessed index)
(if (string-match riece-hangman-hello-regexp message)
(if (riece-identity-assoc user riece-hangman-player-context-alist
t)
(riece-hangman-reply
(car targets)
(format "%s: You are already playing the game." user))
(let ((context (riece-hangman-make-context
(riece-hangman-word))))
(setq riece-hangman-player-context-alist
(cons (cons user context)
riece-hangman-player-context-alist))
(riece-hangman-reply-with-context user (car targets) context)))
(if (string-match riece-hangman-bye-regexp message)
(when (setq pointer (riece-identity-assoc
user riece-hangman-player-context-alist t))
(setq riece-hangman-player-context-alist
(delq pointer riece-hangman-player-context-alist))
(riece-hangman-reply
(car targets)
(format "%s: Sorry, the word was \"%s\""
user
(riece-hangman-context-word (cdr pointer)))))
(if (setq pointer (riece-identity-assoc
user riece-hangman-player-context-alist t))
(if (or (/= (length message) 1)
(not (string-match "[a-z]" message)))
(riece-hangman-reply
(car targets)
(format "%s: Not a valid guess: %s" user message))
(if (memq (aref message 0)
(riece-hangman-context-guessed (cdr pointer)))
(riece-hangman-reply (car targets)
(format "%s: Already guessed '%c'"
user (aref message 0)))
(setq guessed (riece-hangman-context-set-guessed
(cdr pointer)
(cons (aref message 0)
(riece-hangman-context-guessed
(cdr pointer))))
word (riece-hangman-context-word (cdr pointer)))
(unless (catch 'found
(setq index 0)
(while (< index (length word))
(if (eq (aref word index) (aref message 0))
(throw 'found t))
(setq index (1+ index))))
(riece-hangman-context-set-missed-count
(cdr pointer)
(1+ (riece-hangman-context-missed-count
(cdr pointer)))))
(if (>= (riece-hangman-context-missed-count (cdr pointer))
7)
(progn
(riece-hangman-reply
(car targets)
(format "%s: Sorry, the word was \"%s\""
user
(riece-hangman-context-word (cdr pointer))))
(setq riece-hangman-player-context-alist
(delq pointer
riece-hangman-player-context-alist)))
(if (catch 'missing
(setq index 0)
(while (< index (length word))
(unless (memq (aref word index) guessed)
(throw 'missing t))
(setq index (1+ index))))
(riece-hangman-reply-with-context user (car targets)
(cdr pointer))
(riece-hangman-reply (car targets)
(format "%s: You got it! (%s)"
user word))
(setq riece-hangman-player-context-alist
(delq
pointer
riece-hangman-player-context-alist))))))))))))
(defun riece-hangman-insinuate ()
(add-hook 'riece-after-privmsg-hook 'riece-hangman-after-privmsg-hook))
(defun riece-hangman-uninstall ()
(remove-hook 'riece-after-privmsg-hook 'riece-hangman-after-privmsg-hook))
(defun riece-hangman-enable ()
(random t))
(provide 'riece-hangman)
;;; riece-hangman.el ends here
riece-8.0.0/lisp/riece-guess.el 0000644 0001750 0001750 00000006547 11570265470 013256 0000000 0000000 ;;; riece-guess.el --- guess the next channel, using multiple methods -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-identity)
(require 'riece-commands)
(defgroup riece-guess nil
"Guess the next channel."
:tag "Guess"
:prefix "riece-"
:group 'riece)
(defcustom riece-guess-channel-try-functions nil
"Functions which returns a list of channels the user wants to switch."
:type '(repeat function)
:group 'riece-guess)
(defconst riece-guess-description
"Guess the next channel, using multiple methods.")
(defvar riece-current-channels)
(defun riece-guess-candidates ()
"Build candidate list.
This function calls \\[riece-guess-channel-try-functions] in turn and
merge the results."
(let ((functions riece-guess-channel-try-functions)
candidates)
(while functions
(setq candidates
(nconc candidates
(delq nil (mapcar
(lambda (channel)
(unless (riece-identity-member
channel candidates)
channel))
(funcall (car functions)))))
functions (cdr functions)))
;; Merge the default.
(setq candidates
(nconc candidates
(delq nil (mapcar
(lambda (channel)
(if (and channel
(not (riece-identity-member
channel candidates)))
channel))
riece-current-channels))))
candidates))
(defvar riece-guess-candidates nil)
(defun riece-command-guess-switch-to-channel ()
"Try to switch to the channel where the user is interested in."
(interactive)
(unless (and (eq last-command this-command)
riece-guess-candidates)
(setq riece-guess-candidates (riece-guess-candidates)))
(unless riece-guess-candidates
(error "No channel"))
(riece-command-switch-to-channel
(prog1 (car riece-guess-candidates)
(setq riece-guess-candidates (cdr riece-guess-candidates)))))
(defvar riece-command-mode-map)
(defvar riece-dialogue-mode-map)
(defvar riece-channel-list-mode-map)
(defun riece-guess-insinuate ()
)
(defun riece-guess-enable ()
(define-key riece-command-mode-map
"\C-cg" 'riece-command-guess-switch-to-channel)
(define-key riece-dialogue-mode-map
"g" 'riece-command-guess-switch-to-channel)
(define-key riece-channel-list-mode-map
"g" 'riece-command-guess-switch-to-channel))
(defun riece-guess-disable ()
(define-key riece-command-mode-map
"\C-cg" nil)
(define-key riece-dialogue-mode-map
"g" nil)
(define-key riece-channel-list-mode-map
"g" nil))
(provide 'riece-guess)
;;; riece-guess.el ends here
riece-8.0.0/lisp/riece-async.el 0000644 0001750 0001750 00000006103 11570265470 013231 0000000 0000000 ;;; riece-async.el --- connect to IRC server via async proxy -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;; This program allows to connect to an IRC server via local proxy
;; which responds to PING requests from server.
;; If you want to enable this feature per server, write the server
;; spec like this:
;; (add-to-list 'riece-server-alist
;; '("async" :host "irc.tokyo.wide.ad.jp"
;; :function riece-async-open-network-stream))
;;; Code:
(require 'riece-options)
(require 'riece-ruby) ;riece-ruby-command
(defgroup riece-async nil
"Connect to IRC server via async proxy."
:prefix "riece-"
:group 'riece)
(defcustom riece-async-buffer-size 65535
"Maximum size of the write buffer."
:type 'integer
:group 'riece-async)
(defcustom riece-async-backup-file (expand-file-name "riece-async.bak"
riece-directory)
"A file which contains outdated messages."
:type 'string
:group 'riece-async)
(defvar riece-async-server-program "aproxy.rb"
"The server program file. If the filename is not absolute, it is
assumed that the file is in the same directory of this file.")
(defvar riece-async-server-program-arguments
(list "-s" (number-to-string riece-async-buffer-size)
"-b" riece-async-backup-file)
"Command line arguments passed to `riece-async-server-program'.")
(defconst riece-async-description
"Connect to IRC server via async proxy.")
;;;###autoload
(defun riece-async-open-network-stream (name buffer _host _service)
(let* (process-connection-type
(process
(apply #'start-process name buffer riece-ruby-command
(expand-file-name riece-async-server-program
riece-data-directory)
riece-async-server-program-arguments)))
(if buffer
(with-current-buffer (process-buffer process)
(while (and (eq (process-status process) 'run)
(progn
(goto-char (point-min))
(not (looking-at (format "NOTICE CONNECTED %d"
(process-id process))))))
(accept-process-output process))))
(riece-set-process-query-on-exit-flag process nil)
process))
(defun riece-async-insinuate ()
(setq riece-default-open-connection-function
#'riece-async-open-network-stream))
(provide 'riece-async)
;;; riece-async.el ends here
riece-8.0.0/lisp/server.rb 0000644 0001750 0001750 00000012247 11400046556 012340 0000000 0000000 # server.rb --- A simple IPC server executing Ruby programs.
# Copyright (C) 1998-2005 Daiki Ueno
# Author: Daiki Ueno
# Created: 1998-09-28
# Keywords: IRC, riece, Ruby
# This file is part of Riece.
# 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, 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 GNU Emacs; see the file COPYING. If not, write to the
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
require 'thread'
require 'stringio'
class Server
def initialize(outfile, errfile, logfile)
@out = $stdout
@err = $stderr
$stdout = outfile ? File.new(outfile, 'a') : StringIO.new
$stderr = errfile ? File.new(errfile, 'a') : StringIO.new
@log = File.new(logfile, 'a') if logfile
@buf = ''
@que = Queue.new
@thr = Hash.new
@cnt = 0
end
def dispatch(line)
@log.puts(line) if @log
case line.chomp
when /\AD /
@buf << $'
when /\A(\S+)\s*/
c = $1
r = $'
d = "dispatch_#{c.downcase}"
if respond_to?(d, true)
Thread.start do
self.send(d, c, r)
end
else
send_line("ERR 103 Unknown command\r\n")
end
end
end
def dispatch_cancel(c, r)
send_line("ERR 100 Not implemented\r\n")
end
def dispatch_bye(c, r)
send_line("ERR 100 Not implemented\r\n")
end
def dispatch_auth(c, r)
send_line("ERR 100 Not implemented\r\n")
end
def dispatch_reset(c, r)
send_line("ERR 100 Not implemented\r\n")
end
def dispatch_end(c, r)
enq_data
end
def dispatch_help(c, r)
send_line("ERR 100 Not implemented\r\n")
end
def dispatch_quit(c, r)
send_line("ERR 100 Not implemented\r\n")
end
def dispatch_eval(c, r)
r = deq_data if r.empty?
name = nil
Thread.exclusive do
while @thr.include?(name = @cnt.to_s)
@cnt += 1
end
@thr[name] = Thread.current
end
send_line("S name #{name}\r\n")
send_line("OK\r\n")
Thread.current[:rubyserv_name] = name
begin
Thread.current[:rubyserv_error] = false
Thread.current[:rubyserv_response] = eval(r, exec_env.empty_binding)
rescue Exception => e
Thread.current[:rubyserv_error] = true
Thread.current[:rubyserv_response] =
e.to_s.sub(/\A.*?\n#{Regexp.quote(__FILE__)}:\d+: /o, '')
end
send_line("# exit #{name}\r\n")
end
def dispatch_poll(c, r)
thr = @thr[r]
if !thr
send_line("ERR 105 Parameter error: no such name \"#{r}\"\r\n")
elsif thr.alive?
send_line("S running #{r}\r\n")
send_line("OK\r\n")
else
if thr[:rubyserv_error]
send_line("S exited #{r}\r\n")
else
send_line("S finished #{r}\r\n")
end
if d = thr[:rubyserv_response]
send_data(d.to_s)
end
send_line("OK\r\n")
end
end
def dispatch_exit(c, r)
thr = @thr[r]
if !thr
send_line("ERR 105 Parameter error: no such name \"#{r}\"\r\n")
return
end
thr.kill if thr.alive?
@thr.delete(r)
send_line("OK\r\n")
end
def escape(s)
s.gsub(/[%\r\n]/) {|m| '%%%02X' % m[0]}
end
def unescape(s)
s.gsub(/%([0-9A-Z][0-9A-Z])/) {[$1].pack('H*')}
end
def send_data(d)
d = escape(d)
begin
len = [d.length, 998].min # 998 = 1000 - "D "
send_line("D #{d[0 ... len]}\r\n")
d = d[len .. -1]
end until d.empty?
end
def enq_data
d = unescape(@buf)
@buf = ''
@que.enq(d)
end
def deq_data
@que.deq
end
def send_line(line)
@out.puts(line)
@log.puts(line) if @log
end
def exec_env
env = Object.new
def env.empty_binding
binding
end
out, log = @out, @log
env.instance_eval {@out, @log = out, log}
def env.send_line(line)
@out.puts(line)
@log.puts(line) if @log
end
def env.output(s)
send_line("# output #{Thread.current[:rubyserv_name]} #{s}\r\n")
end
env
end
end
if $0 == __FILE__
require 'optparse'
opt_outfile, opt_errfile, opt_logfile = nil, nil, nil
opts = OptionParser.new do |opts|
opts.banner = <<"End"
Usage: #{$0} [OPTIONS]
End
opts.on('-o', '--out OUTFILE', 'Send stdout to OUTFILE.') do |outfile|
opt_outfile = outfile
end
opts.on('-e', '--err ERRFILE', 'Send stderr to ERRFILE.') do |errfile|
opt_errfile = errfile
end
opts.on('-l', '--log LOGFILE', 'Send log to LOGFILE.') do |logfile|
opt_logfile = logfile
end
opts.on_tail('--help', '-h', 'Show this message.') do
$stdout.print(opts.to_s)
exit(0)
end
end
begin
opts.parse!(ARGV)
rescue OptionParser::ParseError
$stderr.print(opts.to_s)
exit(1)
end
server = Server.new(opt_outfile, opt_errfile, opt_logfile)
while gets
server.dispatch($_)
end
end
riece-8.0.0/lisp/riece-twitter.el 0000644 0001750 0001750 00000007534 11570265470 013627 0000000 0000000 ;;; riece-twitter.el --- post your status to Twitter -*- lexical-binding: t -*-
;; Copyright (C) 2007 Daiki Ueno
;; Author: Daiki Ueno
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-message)
(defgroup riece-twitter nil
"Post your status to Twitter"
:group 'riece)
(defcustom riece-twitter-credential nil
"Your credential used to login to Twitter."
:group 'riece-twitter
:type 'string)
(eval-and-compile
(if (fboundp 'clear-string)
(defalias 'riece-twitter-clear-string 'clear-string)
(defun riece-twitter-clear-string (string)
(fillarray string ?\0))))
(defun riece-twitter-set-credential (credential)
"Set your credential used to login to Twitter."
(interactive
(let ((username (read-string "Username: "))
password)
(unwind-protect
(list (concat username ":"
(setq password (read-passwd "Password: "))))
(if password
(riece-twitter-clear-string password))
(setq password nil))))
(setq riece-twitter-credential credential))
(defun riece-twitter-update (status)
"Update your status."
(interactive
(progn
(unless riece-twitter-credential
(error "%s"
(substitute-command-keys
"\\[riece-twitter-set-credential] to set your credential")))
(list (read-string "Status: "))))
(message "Sending to Twitter...")
(let* ((args
(list "-u" riece-twitter-credential
"-d" (concat "status="
(riece-twitter-escape-string
(encode-coding-string status 'utf-8)))
"-s"
"http://twitter.com/statuses/update.json"))
(process
(apply #'start-process
"curl" nil "curl"
(if (interactive-p)
args
(append args
(list "-H" "X-Twitter-Client: Riece"
"-H" (concat "X-Twitter-Client-Version: "
riece-version-number)
"-H" "X-Twitter-Client-URL: http://riece.nongnu.org/twitter.xml"
"-d" "source=riece"))))))
(set-process-sentinel process #'riece-twitter-sentinel)))
(defun riece-twitter-sentinel (_process status)
(if (equal status "finished\n")
(message "Sending to Twitter...done")
(message "Sending to Twitter...failed: %s"
(substring status 0 (1- (length status))))))
(defun riece-twitter-message-filter (message)
(if (and (riece-message-own-p message)
(eq 'action (riece-message-type message)))
(if riece-twitter-credential
(riece-twitter-update (riece-message-text message))
(message "%s"
(substitute-command-keys
"\\[riece-twitter-set-credential] to set your credential"))))
message)
(defun riece-twitter-escape-string (string)
(let ((index 0))
(while (string-match "[^0-9A-Za-z\-\._~:/?@!\$'()*,]" string index)
(setq string (replace-match
(format "%%%02X" (aref string (match-beginning 0)))
t t string)
index (+ 3 (match-beginning 0))))
string))
(defun riece-twitter-insinuate ()
(add-hook 'riece-message-filter-functions 'riece-twitter-message-filter))
(defun riece-twitter-uninstall ()
(remove-hook 'riece-message-filter-functions 'riece-twitter-message-filter))
(provide 'riece-twitter)
;;; riece-twitter.el ends here
riece-8.0.0/lisp/riece-coding.el 0000644 0001750 0001750 00000005303 11570265470 013360 0000000 0000000 ;;; riece-coding.el --- converting string with coding system -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece, coding-system, MULE
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'riece-globals)
(require 'riece-options)
(defun riece-encode-coding-string (string)
(if (and (local-variable-p 'riece-coding-system (current-buffer))
riece-coding-system) ;should be nil on non-Mule environment
(encode-coding-string string (if (consp riece-coding-system)
(cdr riece-coding-system)
riece-coding-system))
string))
(defun riece-decode-coding-string (string)
(if (and (local-variable-p 'riece-coding-system (current-buffer))
riece-coding-system) ;should be nil on non-Mule environment
(riece-decode-coding-string-1 string
(if (consp riece-coding-system)
(car riece-coding-system)
riece-coding-system))
string))
(defun riece-decode-coding-string-1 (string coding-system)
(let* ((decoded (decode-coding-string string coding-system))
(length (length decoded)))
(put-text-property 0 length 'riece-decoded-encoded-string
string decoded)
(put-text-property 0 length 'riece-decoded-coding-system
coding-system decoded)
decoded))
;; The following functions are API used by handler functions. For the
;; meantime DECODED is actually a string (with some text properties).
;; In the future, however, the implementation _should_ be changed so
;; that decoding phase is delayed until the body of handler functions.
(defun riece-decoded-coding-system (decoded)
"Return the coding-system used for decoding DECODED."
(get-text-property 0 'riece-decoded-coding-system decoded))
(defun riece-decoded-encoded-string (decoded)
"Return the string before decoding."
(get-text-property 0 'riece-decoded-encoded-string decoded))
(defalias 'riece-decoded-string 'identity)
(provide 'riece-coding)
;;; riece-coding.el ends here
riece-8.0.0/lisp/Makefile.am 0000644 0001750 0001750 00000005053 11570265470 012544 0000000 0000000 SUBDIRS = test
EXTRA_DIST = COMPILE ChangeLog ChangeLog.Liece \
riece-000.el riece-200.el riece-300.el riece-400.el riece-500.el \
riece-addon-modules.el riece-addon.el riece-cache.el riece-channel.el \
riece-coding.el riece-commands.el riece-compat.el riece-complete.el \
riece-debug.el riece-display.el riece-emacs.el riece-filter.el \
riece-globals.el riece-handle.el riece-highlight.el riece-identity.el \
riece-mcat.el riece-message.el riece-misc.el riece-mode.el \
riece-naming.el riece-options.el riece-ruby.el riece-server.el \
riece-signal.el riece-user.el riece-version.el riece-xemacs.el \
riece-irc.el riece.el \
riece-mcat-japanese.el \
riece-ctcp.el riece-url.el riece-unread.el riece-ndcc.el \
riece-rdcc.el riece-log.el riece-mini.el riece-doctor.el \
riece-alias.el riece-layout.el riece-skk-kakutei.el riece-guess.el \
riece-history.el riece-button.el riece-keyword.el riece-menu.el \
riece-icon.el riece-async.el riece-lsdb.el riece-xface.el \
riece-ctlseq.el riece-ignore.el riece-hangman.el riece-biff.el \
riece-kakasi.el riece-foolproof.el riece-yank.el riece-toolbar.el \
riece-eval.el riece-google.el riece-keepalive.el riece-eval-ruby.el \
riece-shrink-buffer.el riece-xfaceb.el riece-epg.el riece-twitter.el \
riece-desktop-notify.el \
url-riece.el \
riece-command-previous-channel.xpm riece-command-next-channel.xpm \
riece-command-configure-windows.xpm riece-command-list-addons.xpm \
riece-command-join.xpm riece-command-part.xpm \
server.rb aproxy.rb
CLEANFILES = auto-autoloads.el custom-load.el *.elc lunit-report.xml
DISTCLEANFILES = riece-package-info.el
FLAGS ?= -batch -q -no-site-file
all: elc
elc:
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile \
$(srcdir)
install: elc
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install \
$(srcdir) $(lispdir) # $(MAKE)
uninstall:
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-uninstall \
$(lispdir)
package:
$(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile-package \
$(srcdir)
install-package: package
$(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install-package \
$(srcdir) $(PACKAGEDIR) # $(MAKE)
check-local:
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-test \
$(srcdir) lunit-report.xml
compile-individually:
@for i in `$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-examine`; \
do \
echo $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \
-f riece-compile-module $$i; \
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \
-f riece-compile-module $$i; \
done
update-mcat:
$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-update-mcat \
$(srcdir)
riece-8.0.0/lisp/riece-complete.el 0000644 0001750 0001750 00000010066 11570265470 013727 0000000 0000000 ;;; riece-complete.el --- completion -*- lexical-binding: t -*-
;; Copyright (C) 1998-2003 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1999-02-02
;; Keywords: minibuffer, completion
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(eval-when-compile (require 'cl)) ;butlast
(require 'riece-compat)
(defvar riece-minibuffer-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
(define-key map "?" 'riece-minibuffer-help)
map))
(defvar riece-temp-minibuffer-message nil)
;; stolen (and renamed) from XEmacs's minibuf.el.
(defun riece-temp-minibuffer-message (message)
(let ((end (point-max)))
(save-excursion
(goto-char (point-max))
(message nil)
(insert message))
(let ((inhibit-quit t))
(sit-for 2)
(delete-region end (point-max)))))
(defun riece-minibuffer-help ()
(interactive)
(if riece-temp-minibuffer-message
(riece-temp-minibuffer-message riece-temp-minibuffer-message)))
;;; stolen (and renamed) from crm.el.
(defvar riece-completing-read-multiple-separator ",")
(defvar riece-completing-read-multiple-table nil)
(defun riece-completing-read-multiple-1 (string predicate flag)
"Function used by `riece-completing-read-multiple'.
The value of STRING is the string to be completed.
The value of PREDICATE is a function to filter possible matches, or
nil if none.
The value of FLAG is used to specify the type of completion operation.
A value of nil specifies `try-completion'. A value of t specifies
`all-completions'. A value of lambda specifes a test for an exact match.
For more information on STRING, PREDICATE, and FLAG, see the Elisp
Reference sections on 'Programmed Completion' and 'Basic Completion
Functions'."
(let ((except (split-string string riece-completing-read-multiple-separator))
(table (copy-sequence riece-completing-read-multiple-table))
lead)
;; Remove a partially matched word construct if it exists.
(or (string-match
(concat riece-completing-read-multiple-separator "$")
string)
(setq except (butlast except)))
(when (string-match
(concat ".*" riece-completing-read-multiple-separator)
string)
(setq lead (substring string 0 (match-end 0))
string (substring string (match-end 0))))
(while except
(let ((entry (assoc (car except) table)))
(if entry
(setq table (delq entry table)))
(setq except (cdr except))))
(if (null flag)
(progn
(setq string (try-completion string table predicate))
(or (eq t string)
(concat lead string)))
(if (eq flag 'lambda)
(eq t (try-completion string table predicate))
(if flag
(all-completions string table predicate))))))
(defun riece-completing-read-multiple
(prompt table &optional predicate require-match initial-input
history default)
"Execute `completing-read' consequently.
See the documentation for `completing-read' for details on the arguments:
PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HISTORY, DEFAULT."
(let ((prompt
(format "%s (separated by \"%s\"): "
prompt riece-completing-read-multiple-separator))
(riece-completing-read-multiple-table table))
(split-string
(completing-read
prompt #'riece-completing-read-multiple-1
predicate require-match initial-input history default)
riece-completing-read-multiple-separator)))
(provide 'riece-complete)
;;; riece-complete.el ends here
riece-8.0.0/lisp/riece-eval.el 0000644 0001750 0001750 00000005477 11570265470 013060 0000000 0000000 ;;; riece-eval.el --- evaluate input string as an elisp form -*- lexical-binding: t -*-
;; Copyright (C) 2005 OHASHI Akira
;; Author: OHASHI Akira
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'pp)
(require 'riece-message)
(defgroup riece-eval nil
"Evaluate an input string as an elisp form."
:prefix "riece-"
:group 'riece)
(defcustom riece-eval-regexp "^, \\(.+\\)"
"*Pattern of string evaluating."
:type 'string
:group 'riece-eval)
(defcustom riece-eval-ignore-error nil
"*If non-nil, an error is ignored."
:type 'boolean
:group 'riece-eval)
(defconst riece-eval-description
"Evaluate an input string as an elisp form.")
(defun riece-eval-display-message-function (message)
(when (and (get 'riece-eval 'riece-addon-enabled)
(riece-message-own-p message)
(string-match riece-eval-regexp (riece-message-text message)))
(let* ((form (match-string 1 (riece-message-text message)))
(string (riece-eval-form form)))
(unless (equal string "")
(riece-send-string
(format "NOTICE %s :%s\r\n"
(riece-identity-prefix (riece-message-target message))
string))
(riece-display-message
(riece-make-message (riece-current-nickname)
(riece-message-target message)
string 'notice))))))
(defun riece-eval-form (form)
(condition-case err
(let ((object (eval (read form))))
(cond
((stringp object) object)
((and (listp object)
(not (eq object nil)))
(let ((string (pp-to-string object)))
(substring string 0 (1- (length string)))))
((numberp object)
(number-to-string object))
((eq object nil) "")
(t (pp-to-string object))))
(error
(unless riece-eval-ignore-error
(format "Error evaluating %s: %s" form err)))))
(defun riece-eval-insinuate ()
(add-hook 'riece-after-display-message-functions
'riece-eval-display-message-function))
(defun riece-eval-uninstall ()
(remove-hook 'riece-after-display-message-functions
'riece-eval-display-message-function))
(provide 'riece-eval)
;;; riece-eval.el ends here
riece-8.0.0/lisp/riece-ignore.el 0000644 0001750 0001750 00000011410 11570265470 013374 0000000 0000000 ;;; riece-ignore.el --- ignore messages from some users -*- lexical-binding: t -*-
;; Copyright (C) 1998-2004 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-signal)
(require 'riece-identity)
(require 'riece-message)
(defgroup riece-ignore nil
"Ignore messages from some users."
:prefix "riece-"
:group 'riece)
(defcustom riece-ignore-discard-message 'log
"If t, messages from ignored user are completely discarded.
If 'log, messages are removed from IRC buffers, but they are saved in
`riece-ignore-buffer'.
Otherwise, they are not removed from IRC buffers, but are hidden with
'invisible text-property."
:group 'riece-ignore
:type '(choice (const :tag "Discard completely" t)
(const :tag "Discard but save logs" log)
(const :tag "Make messages invisible" nil)))
(defcustom riece-ignore-buffer-name "*Ignore*"
"The name of buffer where ignored messages are stored."
:group 'riece-ignore
:type 'string)
(defcustom riece-startup-ignored-user-list nil
"List of user names whose messages are ignored."
:group 'riece-ignore
:type '(repeat string))
(defvar riece-ignore-buffer nil)
(defconst riece-ignore-description
"Ignore messages from some users.")
(defvar riece-ignored-user-list nil)
(defun riece-ignore-user-rename-signal-function (signal _handback)
(let ((pointer (riece-identity-member (car (riece-signal-args signal))
riece-ignored-user-list)))
(if pointer
(setcar pointer (nth 1 (riece-signal-args signal))))))
(defun riece-ignore-user (user toggle)
(interactive
(let ((completion-ignore-case t))
(list (if current-prefix-arg
(riece-completing-read-identity
"Unignore user: "
riece-ignored-user-list)
(riece-completing-read-identity
"Ignore user: "
(riece-get-users-on-server (riece-current-server-name))
(lambda (user)
(not (riece-identity-member
(riece-parse-identity (car user))
riece-ignored-user-list)))))
(not current-prefix-arg))))
(if toggle
(progn
(setq riece-ignored-user-list (cons user riece-ignored-user-list))
(riece-connect-signal
'user-renamed
#'riece-ignore-user-rename-signal-function))
(let ((pointer (riece-identity-member user riece-ignored-user-list)))
(setq riece-ignored-user-list (delq (car pointer)
riece-ignored-user-list))
(riece-disconnect-signal
'user-renamed
#'riece-ignore-user-rename-signal-function))))
(eval-when-compile
(autoload 'riece-dialogue-mode "riece"))
(defun riece-ignore-message-filter (message)
(if (and (get 'riece-ignore 'riece-addon-enabled)
(riece-identity-member (riece-message-speaker message)
riece-ignored-user-list))
(if riece-ignore-discard-message
(when (eq riece-ignore-discard-message 'log)
(unless riece-ignore-buffer
(with-current-buffer (setq riece-ignore-buffer
(riece-get-buffer-create
riece-ignore-buffer-name
'riece-dialogue-mode))
(riece-dialogue-mode)))
(with-current-buffer riece-ignore-buffer
(goto-char (point-max))
(let ((inhibit-read-only t)
buffer-read-only)
(insert (concat (format-time-string "%H:%M") " "
(riece-format-message message t))))))
(put-text-property 0 (length (riece-message-text message))
'invisible 'riece-ignore
(riece-message-text message))
message)
message))
(defvar riece-command-mode-map)
(defun riece-ignore-insinuate ()
(setq riece-ignored-user-list
(mapcar #'riece-parse-identity riece-startup-ignored-user-list))
(add-hook 'riece-message-filter-functions 'riece-ignore-message-filter))
(defun riece-ignore-uninstall ()
(setq riece-ignored-user-list nil)
(remove-hook 'riece-message-filter-functions 'riece-ignore-message-filter))
(defun riece-ignore-enable ()
(define-key riece-command-mode-map
"\C-ck" 'riece-ignore-user))
(defun riece-ignore-disable ()
(define-key riece-command-mode-map
"\C-ck" nil))
(provide 'riece-ignore)
;;; riece-ignore.el ends here
riece-8.0.0/lisp/riece-shrink-buffer.el 0000644 0001750 0001750 00000007326 11570265470 014671 0000000 0000000 ;;; riece-shrink-buffer.el --- free old IRC messages to save memory usage -*- lexical-binding: t -*-
;; Copyright (C) 1998-2005 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-globals)
(require 'derived)
(defgroup riece-shrink-buffer nil
"Free old IRC messages to save memory usage."
:prefix "riece-"
:group 'riece)
(defcustom riece-shrink-buffer-idle-time-delay 5
"Number of idle seconds to wait before shrinking channel buffers."
:type 'integer
:group 'riece-shrink-buffer)
(defcustom riece-max-buffer-size 65536
"Maximum size of channel buffers."
:type '(integer :tag "Number of characters")
:group 'riece-shrink-buffer)
(defcustom riece-shrink-buffer-remove-chars (/ riece-max-buffer-size 2)
"Number of chars removed when shrinking channel buffers."
:type 'integer
:group 'riece-shrink-buffer)
(defvar riece-shrink-buffer-idle-timer nil
"Timer object to periodically shrink channel buffers.")
(defconst riece-shrink-buffer-description
"Free old IRC messages to save memory usage.")
(defun riece-shrink-buffer-idle-timer ()
(let ((buffers riece-buffer-list))
(while buffers
(if (and (get 'riece-shrink-buffer 'riece-addon-enabled)
(buffer-live-p (car buffers))
(with-current-buffer (car buffers)
(riece-derived-mode-p 'riece-dialogue-mode)))
(riece-shrink-buffer (car buffers)))
(setq buffers (cdr buffers)))))
(defun riece-shrink-buffer (buffer)
(save-excursion
(set-buffer buffer)
(goto-char (point-min))
(while (> (buffer-size) riece-max-buffer-size)
(let* ((inhibit-read-only t)
buffer-read-only
(end (progn
(goto-char riece-shrink-buffer-remove-chars)
(beginning-of-line 2)
(point)))
(overlays (riece-overlays-in (point-min) end)))
(while overlays
(riece-delete-overlay (car overlays))
(setq overlays (cdr overlays)))
(delete-region (point-min) end)))))
(defun riece-shrink-buffer-startup-hook ()
(setq riece-shrink-buffer-idle-timer
(riece-run-with-idle-timer
riece-shrink-buffer-idle-time-delay t
'riece-shrink-buffer-idle-timer)))
(defun riece-shrink-buffer-exit-hook ()
(if riece-shrink-buffer-idle-timer
(riece-cancel-timer riece-shrink-buffer-idle-timer)))
(defun riece-shrink-buffer-insinuate ()
(add-hook 'riece-startup-hook
'riece-shrink-buffer-startup-hook)
;; Reset the timer since riece-shrink-buffer-insinuate will be
;; called before running riece-startup-hook.
(unless riece-shrink-buffer-idle-timer
(riece-shrink-buffer-startup-hook))
(add-hook 'riece-exit-hook
'riece-shrink-buffer-exit-hook))
(defun riece-shrink-buffer-uninstall ()
(riece-shrink-buffer-exit-hook)
(remove-hook 'riece-startup-hook
'riece-shrink-buffer-startup-hook)
(remove-hook 'riece-exit-hook
'riece-shrink-buffer-exit-hook))
(provide 'riece-shrink-buffer)
;;; riece-shrink-buffer.el ends here
riece-8.0.0/lisp/riece-keepalive.el 0000644 0001750 0001750 00000004503 11570265470 014063 0000000 0000000 ;;; riece-keepalive.el --- keep an IRC connection -*- lexical-binding: t -*-
;; Copyright (C) 1998-2004 Daiki Ueno
;; Author: Daiki Ueno
;; Created: 1998-09-28
;; Keywords: IRC, riece
;; This file is part of Riece.
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; NOTE: This is an add-on module for Riece.
;;; Code:
(require 'riece-options)
(require 'riece-server)
(defgroup riece-keepalive nil
"Keep an IRC connection."
:prefix "riece-"
:group 'riece)
(defcustom riece-keepalive-ping-repeat 120
"Interval for sending PING to server."
:type 'integer
:group 'riece-keepalive)
(defvar riece-keepalive-timer nil)
(defconst riece-keepalive-description
"Keep an IRC connection.")
(defun riece-keepalive-after-login-hook ()
(make-local-variable 'riece-keepalive-timer)
(unless riece-keepalive-timer
(setq riece-keepalive-timer
(riece-run-at-time
riece-keepalive-ping-repeat riece-keepalive-ping-repeat
(lambda (buffer)
(with-current-buffer buffer
(riece-send-string "PING riece-keepalive\r\n")))
(current-buffer)))))
(defun riece-keepalive-after-close-hook ()
(when riece-keepalive-timer
(riece-cancel-timer riece-keepalive-timer)
(setq riece-keepalive-timer nil)))
(defun riece-keepalive-insinuate ()
(add-hook 'riece-after-login-hook 'riece-keepalive-after-login-hook)
(add-hook 'riece-after-close-hook 'riece-keepalive-after-close-hook))
(defun riece-keepalive-uninstall ()
(remove-hook 'riece-after-login-hook 'riece-keepalive-after-login-hook)
(remove-hook 'riece-after-close-hook 'riece-keepalive-after-close-hook))
(provide 'riece-keepalive)
;;; riece-ignore.el ends here
riece-8.0.0/lisp/ChangeLog 0000644 0001750 0001750 00000512506 11570265470 012270 0000000 0000000 2011-04-20 Daiki Ueno
* riece-commands.el (riece-command-set-operators)
(riece-command-set-speakers): Revert the arglist change in the
last commit.
2011-04-04 Daiki Ueno
* Use lexical binding.
2011-03-25 Daiki Ueno
* riece-url.el (riece-url-regexp): Update the default value.
2011-03-16 Daiki Ueno
* COMPILE (riece-compile-module, riece-update-mcat)
(riece-compile): Add workaround for XEmacs 21.5.
2011-01-25 TAKAHASHI Kaoru
* riece-ignore.el: Add newline at end of file.
* riece-keyword.el: Ditto.
* riece-mode.el: Ditto.
2010-12-20 Daiki Ueno
* COMPILE (riece-examine): Supply srcdir to riece-examine-modules.
(riece-compile-package): Ditto.
(riece-install-package): Ditto.
2010-12-16 Daiki Ueno
* riece-shrink-buffer.el (riece-shrink-buffer): Make sure not to
move cursor.
* riece-misc.el (riece-insert): Save the current point, if the
buffer is frozen.
2010-12-11 TAKAHASHI Kaoru
* COMPILE (riece-update-mcat): Fix "Wrong number of arguments"
on `riece-examine-modules'.
* Makefile.am: Add $(srcdir) to update-mcat target.
2010-12-10 Daiki Ueno
* riece-log.el (riece-log-make-file-name): Don't append
coding-system name to the filename when coding-system is nil.
2010-10-15 Daiki Ueno
* riece-ctlseq.el (riece-ctlseq-put-attributes): Fix typo.
2010-10-15 Daiki Ueno
* riece-ctlseq.el (riece-ctlseq-colors): Add an example setting to
the doc.
(riece-ctlseq-regexp, riece-ctlseq-update-attribute): Make
"^C[,]" matching robuster.
Thanks to Akira TAGOH.
2010-10-15 Daiki Ueno
* riece-ctlseq.el (riece-ctlseq-regexp): New constant.
(riece-ctlseq-update-attribute): Rename from
riece-ctlseq-update-attributes.
(riece-ctlseq-put-attributes): New function.
(riece-ctlseq-message-filter): Rewrite the parsing logic.
2010-10-14 Daiki Ueno
* COMPILE: Support "make distcheck".
* Makefile.am: Support "make distcheck".
* test/test-riece-log.el (test-riece-log-delete-directory)
(test-riece-log-display-message-function): Don't bind
default-file-name-coding-system.
* riece-log.el (riece-log-display-message-function)
(riece-log-insert): Don't bind default-file-name-coding-system.
2010-10-14 Daiki Ueno
* riece-compat.el (riece-make-local-hook): Check if
make-local-hook exists. Thanks to Makoto Fujiwara.
2010-09-12 TAKAHASHI Kaoru
* riece-develop.el (riece-insert-struct-template): Use "\n"
instead of newline in `interactive'. For
`delete-trailing-whitespace' safe.
* riece-rdcc.el (riece-rdcc-filter, riece-rdcc-sentinel): Suppress
byte-compile warnings; `save-excursion' defeated by `set-buffer'.
* riece-misc.el (riece-insert): Suppress byte-compile warnings;
`save-excursion' defeated by `set-buffer'.
* riece-keepalive.el (riece-keepalive-after-login-hook): Suppress
byte-compile warnings; `save-excursion' defeated by `set-buffer'.
* riece-kakasi.el (riece-kakasi-convert-string): Suppress
byte-compile warnings; `save-excursion' defeated by `set-buffer'.
* riece-ignore.el (riece-ignore-message-filter): Suppress
byte-compile warnings; `save-excursion' defeated by `set-buffer'.
* riece-hangman.el (riece-hangman-word): Suppress byte-compile
warnings; `save-excursion' defeated by `set-buffer'.
* riece-server.el (riece-reset-process-buffer): Suppress
byte-compile warnings; `save-excursion' defeated by `set-buffer'.
* riece-filter.el (riece-filter): Suppress byte-compile warnings;
`save-excursion' defeated by `set-buffer'.
* riece.el (riece-create-buffers): Suppress byte-compile
warnings; `save-excursion' defeated by `set-buffer'.
* riece-display.el (riece-display-connect-signals)
(riece-update-buffers): Suppress byte-compile
warnings; `save-excursion' defeated by `set-buffer'.
* riece-button.el (riece-identity-button-popup-menu)
(riece-identity-button-click): Suppress byte-compile warnings;
`save-excursion' defeated by `set-buffer'.
* riece-async.el (riece-async-open-network-stream): Suppress
byte-compile warnings; `save-excursion' defeated by `set-buffer'.
2010-09-04 TAKAHASHI Kaoru
* riece-mcat.el (riece-mcat-update): Suppress byte-compile
warnings; `save-excursion' defeated by `set-buffer'.
* riece-shrink-buffer.el (riece-shrink-buffer): Suppress
byte-compile warnings; `save-excursion' defeated by `set-buffer'.
* riece-ruby.el (riece-ruby-reset-process-buffer)
(riece-ruby-execute, riece-ruby-filter)
(riece-ruby-inspect): Suppress byte-compile warnings;
`save-excursion' defeated by `set-buffer'.
* riece-doctor.el (riece-doctor-after-privmsg-hook): Suppress
byte-compile warnings; `save-excursion' defeated by `set-buffer'.
2010-09-01 TAKAHASHI Kaoru
* riece-debug.el (riece-debug-1)
(riece-debug-reset-standard-output, riece-ignore-errors): Suppress
byte-compile warnings; `save-excursion' defeated by `set-buffer'.
2010-05-28 Daiki Ueno
* riece-globals.el (riece-mode-line-buffer-identification)
(riece-channel-indicator, riece-long-channel-indicator)
(riece-channel-list-indicator, riece-user-indicator)
(riece-away-indicator, riece-operator-indicator)
(riece-channel-status-indicator): Mark as risky-local-variable.
2010-04-07 Daiki Ueno
* COMPILE (riece-install): Add workaround for XEmacs 21.5.
2009-09-10 Daiki Ueno
* Riece: Version 6.1.0 released.
* riece.el (riece-read-variables-files)
(riece-save-variables-files): Revert to use setq instead of
custom-set-variables. Fixes #27384.
2009-08-28 TAKAHASHI Kaoru
* riece-addon.el (riece-command-insinuate-addon)
(riece-command-uninstall-addon, riece-command-unload-addon): Fix
"Wrong type argument" error on not riece-addon-list-mode.
2009-07-26 TAKAHASHI Kaoru
* riece-skk-kakutei.el: Fix Author header.
* riece-foolproof.el: Ditto.
* riece-layout.el: Ditto.
2009-05-30 Daiki Ueno
* Riece: Version 6.0.0 released.
2009-04-23 Daiki Ueno
* riece.el (riece-submit-bug-report): Just visit the tracker URL.
2009-04-22 Daiki Ueno
* riece-addon-modules.el (riece-addon-modules): Don't mention
riece-notify.
* Makefile.am (EXTRA_DIST): Remove riece-notify.el.
* riece-notify.el: Remove; use riece-desktop-notify.el.
2009-03-30 OHASHI Akira
* riece-desktop-notify.el: New add-on.
* riece-addon-modules.el (riece-addon-modules): Add
riece-desktop-notify.
* riece-mcat-japanese.el (riece-mcat-japanese-alist): Translate
"Display notification to desktop.".
* Makefile.am (EXTRA_DIST): Add riece-desktop-notify.el.
2009-03-30 OHASHI Akira
* riece-keyword.el (riece-keyword-message-filter): Fix for the infinite
loop.
2008-10-13 OHASHI Akira
* riece-mini.el (riece-mini-show-backlog): Fix for multibyte
characters.
2008-09-08 Daiki Ueno
* riece-notify.el: New add-on.
* riece-addon-modules.el (riece-addon-modules): Add
riece-notify (commented).
* Makefile.am (EXTRA_DIST): Add riece-notify.el.
2008-08-25 TAKAHASHI Kaoru
* riece-commands.el (riece-command-enter-message): Fix behavior at
last line of buffer.
(riece-command-enter-message-to-user): Ditto.
(riece-command-enter-message-as-notice): Ditto.
2008-06-11 Daiki Ueno
* riece-options.el (riece-use-full-window): Abolish unused option.
* riece-layout.el (riece-layout-alist): New layout "one-window".
(riece-configure-windows-one-window): New function.
2008-06-07 Daiki Ueno
* riece-options.el (riece-server-alist): Accept an integer for
:service.
2008-06-06 Daiki Ueno
* riece-compat.el (riece-make-local-hook): New alias.
(riece-derived-mode-p): New alias.
(riece-set-process-query-on-exit-flag): New alias.
2008-06-05 TAKAHASHI Kaoru
* riece-options.el (riece-server-alist): Fix :value for username,
password, function and coding-system.
2008-06-02 Daiki Ueno
* riece.el (riece-read-variables-files): Re-evaluate custom settings.
2008-05-30 Daiki Ueno
* Riece: Version 5.0.0 released.
2008-05-28 Daiki Ueno
* riece.el (riece-save-variables-files): Generate
custom-set-variables instead of a list of setq.
* riece-options.el (riece-server-alist): Simplify custom-type.
* riece-coding.el: Move defcustom to riece-options; require
'riece-options.
2008-05-27 Daiki Ueno
* riece-menu.el (riece-menu-create-channels-menu): Remove
placeholder channels.
2008-05-27 Daiki Ueno
* riece-addon-modules.el (riece-addon-modules): Translate add-on
description.
* riece-menu.el (riece-menu-items): Define with defcustom; use
riece-mcat to translate menu labels; bind
riece-command-configure-windows.
(riece-menu-requires): Depend on riece-mcat.
(riece-menu-insinuate): Re-evaluate riece-menu-items.
* riece-url.el (riece-url-command-mode-hook): Translate "Open URL...".
2008-05-27 Daiki Ueno
* riece-display.el (riece-update-status-indicators): Don't update
riece-user-indicator if riece-real-nickname is not fixed.
* COMPILE (riece-icons): Re-order filenames.
* Makefile.am (EXTRA_DIST): Add new toolbar icons.
* riece-command-change-layout.xpm:
* riece-command-configure-windows.xpm:
* riece-command-join.xpm:
* riece-command-part.xpm:
* riece-command-quit.xpm: New toolbar icons.
2008-04-15 Daiki Ueno
* riece-mcat-japanese.el (riece-mcat-japanese-alist): Translate
"No information given".
* riece-server.el (riece-open-server): Record errors for debug.
* riece-irc.el (riece-irc-open-server): Send NICK before USER,
following the recommendation in "3.1 Connection Registration" of
RFC2812.
(riece-irc-open-server): Fixed typo in the commit on 2008-04-04.
2008-04-04 春日 玄 KASUGA Toru
* riece-irc.el (riece-irc-open-server): Encode realname when
issueing a USER command.
2008-03-26 Takeru Naito
* riece-keyword.el (riece-keyword-message-filter): Don't match to
empty string if riece-keywords is nil, or it only contains regexp
matchers.
2008-02-01 Daiki Ueno
* riece.el (riece-save-variables-files): Display message
before/after saving files.
* riece-mcat-japanese.el (riece-mcat-japanese-alist): Translate
these mesasges for riece-save-variables-files.
2007-12-21 OHASHI Akira
* riece-mini.el (riece-mini-send-message): Use riece-format-identity.
2007-10-13 Daiki Ueno
* riece-twitter.el (riece-twitter-update): Don't send extra
headers only if it is called interactively.
2007-10-12 Daiki Ueno
* riece-twitter.el (riece-twitter-update): Don't send extra headers.
2007-09-04 Didier Verna
* riece-addon.el (riece-addon-list-mark-face-alist): Fix misuse of
the list widget type.
* riece-google.el (riece-google-program): Ditto.
* riece-highlight.el (riece-channel-list-mark-face-alist): Ditto.
* riece-keyword.el (riece-notify-keyword-functions)
(riece-keyword-notify-functions): Ditto.
* riece-layout.el (riece-layout-alist): Ditto.
* riece-rdcc.el (riece-rdcc-send-program)
(riece-rdcc-decode-address-program): Ditto.
2007-08-19 Daiki Ueno
* riece-commands.el (riece-command-kick-with-ban): New command.
2007-06-21 Nikita Danilov
* riece-000.el (riece-handle-001-message): Run
riece-after-login-hook before joining in startup channels.
* riece-mcat.el (riece-mcat): Don't load localized messages if
mule is off.
2007-06-06 Daiki Ueno
* riece-twitter.el (riece-twitter-set-credential): New command.
(riece-twitter-update): New command.
(riece-twitter-message-filter): Use it.
(riece-twitter-sentinel): New function.
2007-06-05 Daiki Ueno
* riece-twitter.el (riece-twitter-message-filter): Send a "source"
parameter.
2007-05-29 Daiki Ueno
* Riece: Version 4.0.0 released.
2007-05-29 Daiki Ueno
* riece-twitter.el (riece-twitter-credential): Define with defcustom.
(riece-twitter-cache-credential): New user option.
(riece-twitter-message-filter): Ask Twitter username and password.
2007-05-28 Daiki Ueno
* riece-log.el (riece-log-display-message-function): Just call
riece-format-message.
* riece-message.el (riece-format-message-1): Renamed from
riece-format-message.
(riece-format-message): Pick a function from
riece-message-format-function-alist.
2007-04-24 OHASHI Akira
* riece-log.el (riece-log-display-message-function): Use
riece-message-format-function-alist.
2007-04-18 Daiki Ueno
* riece-twitter.el: New add-on.
* riece-addon-modules.el (riece-addon-modules): Add riece-twitter.
* Makefile.am (EXTRA_DIST): Add riece-twitter.el.
* riece-ctcp.el (riece-ctcp-action-format-message): New function.
(riece-handle-ctcp-action-request): Use it.
(riece-command-ctcp-action): Use it.
* riece-message.el (riece-message-format-function-alist): New user
option.
(riece-display-message-1): Pick a format function from
riece-message-format-function-alist.
2007-04-16 Daiki Ueno
* riece-rdcc.el (riece-rdcc-server-port): New user option.
(riece-rdcc-send-program): Bind `port'.
2007-02-12 Daiki Ueno
* riece-handle.el (riece-handle-notice-message): Don't check the
scope of the message if riece-real-nickname is nil.
2007-01-29 Daiki Ueno
* Riece: Version 3.1.2 released.
2007-01-29 Daiki Ueno
* riece-ctcp.el (riece-handle-ctcp-ping-request): Removed useless
argument for `format'.
* riece-mcat.el (riece-mcat-extract): New local variable `pointer'.
* riece-epg.el (epg-cancel): Autoload.
* riece-options.el (riece): Specify :group.
2007-01-22 Daiki Ueno
* riece-mcat.el (riece-mcat-extract): Abolished ALIST arg.
2007-01-19 Daiki Ueno
* riece-options.el (riece-addons): Insinuate riece-mcat by default.
* riece-addon-modules.el (riece-addon-modules): Add riece-mcat.
* riece-mcat.el: Implement add-on interface.
(riece-mcat-alist): Removed.
(riece-mcat-description): New constant.
(riece-mcat-insinuate): New function.
(riece-mcat-uninstall): New function.
2007-01-19 Daiki Ueno
* riece-mcat.el (riece-mcat-update): New function.
* Makefile.am (update-mcat): New target.
* COMPILE (riece-modules): Moved riece-mcat-japanese.el to
riece-mcat-modules.
(riece-mcat-modules): New variable.
(riece-examine-modules): Append riece-mcat-modules.
(riece-update-mcat): New function.
2007-01-18 Daiki Ueno
* riece-mcat.el: New file.
* riece-mcat-japanese.el: New file.
* COMPILE (riece-modules): Added riece-mcat and riece-mcat-japanese.
* Makefile.am (EXTRA_DIST): Added riece-mcat.el and
riece-mcat-japanese.el.
2006-12-18 Daiki Ueno
* riece-package-info.el.in: New file.
* COMPILE (riece-modules): Added riece-package-info.
* Makefile.am (DISTCLEANFILES): Added riece-package-info.el.
2006-09-29 Daiki Ueno
* Riece: Version 3.1.1 released.
* configure.ac: Bump up version to 3.1.1.
2006-09-27 Daiki Ueno
* riece-addon.el (riece-command-list-addons): Describe "save the
current setting".
(riece-command-enable-addon): Make sure the addon to be insinuated.
2006-08-30 Daiki Ueno
* riece-layout.el (riece-layout-alist): Added
riece-configure-windows-spiral.
(riece-configure-windows-spiral): New window layout. Written by
URABE Shyouhei .
* riece-options.el (riece-addons): Enable riece-shrink-buffer by
default.
* aproxy.rb (AProxy::start): Fixed a typo (@out -> $stdout).
2006-07-29 Daiki Ueno
* Riece: Version 3.1.0 released.
* configure.ac: Bump up version to 3.1.0.
2006-07-17 Daiki Ueno
* riece-commands.el (riece-command-join-channel): Simplified by
using riece-server-opened.
(riece-command-part-channel): Ditto.
2006-07-16 Daiki Ueno
* riece.el (riece-save-variables-files): Place ";;; Do not edit
this file!" at the beginning of ~/.riece/save.
* riece-server.el (riece-reset-process-buffer): Make
riece-filter-running local to the server buffer.
* riece-filter.el (riece-filter): Allow only a message handler to
run at a time.
* riece-globals.el (riece-filter-running): New variable.
2006-06-01 Daiki Ueno
* riece-ndcc.el: Don't use calc.
* riece-300.el (riece-handle-353-message): Append " " to every 353
line before inserting it to riece-353-message-alist.
2006-05-29 Daiki Ueno
* Riece: Version 3.0.0 released.
* configure.ac: Bump up version to 3.0.0.
2006-05-16 Daiki Ueno
* riece-options.el (riece-realname): New user option.
* riece-irc.el (riece-irc-open-server): Changed the meaning of
riece-username. i.e. now riece-username represents the user's
login name and riece-realname is the replacement of the former
riece-username.
* riece-server.el (riece-server-keyword-map): New keyword :realname.
2006-05-06 Yoichi NAKAYAMA
* riece-commands.el (riece-command-close-server): Cause error
on non-existent server process.
2006-04-26 Daiki Ueno
* riece-skk-kakutei.el: Declare some variables and autoload
'skk-kakutei to suppress compilation warnings.
* riece-xfaceb.el: Don't enclose autoloads with ignore-errors;
autoloads should not report errors.
* riece-commands.el (riece-command-save-variables): New command.
* riece-epg.el
(riece-epg-passphrase-callback-function-for-decrypt): New
function.
(riece-command-set-passphrase): Renamed.
(riece-epg-message-filter): Don't query passphrase; if decryption
fails add button to try again.
(riece-epg-add-encrypted-button): New function.
(riece-epg-encrypted-button-notify): New function.
2006-04-25 Daiki Ueno
* riece-epg.el: New add-on.
* riece-addon-modules.el (riece-addon-modules): Added riece-epg.
* Makefile.am (EXTRA_DIST): Added riece-epg.el.
2006-04-13 Steve Youngs
* riece-commands.el (riece-command-invite): Add missing `:' to
string sent to server.
* riece-300.el (riece-handle-341-message): swap values for
`channel' and `user'.
2006-04-03 Daiki Ueno
* riece.el (riece-buffer-alist): " *Debug*" -> "*Debug*".
(riece-save-variables-files): Fixed a typo in the docstring.
2006-01-14 Daiki Ueno
* riece-display.el (riece-part-channel): Emit
'channel-list-changed signal.
2005-12-29 Daiki Ueno
* riece-alias.el (riece-alias-alternate-separator): Reverted the
default value.
2005-11-19 Daiki Ueno
* Riece: Version 2.0.2 released.
* configure.ac: Bump up version to 2.0.2.
2005-11-19 Daiki Ueno
* riece-alias.el (riece-alias-alternate-separator): Changed from
"@" -> "%".
* test/test-riece-cache.el: New test cases.
* test/Makefile.am (EXTRA_DIST): Added test-riece-cache.el.
* Makefile.am (EXTRA_DIST): Added riece-cache.el.
* riece-commands.el (riece-command-part-channel): Signal an error
if TARGET server has not opened.
* riece-channel.el: Require 'riece-cache.
(riece-find-channel): Increase priority of given channel name in
riece-channel-cache.
(riece-forget-channel): Remove given channel name from
riece-channel-cache.
(riece-get-channel): Register given channel name in
riece-channel-cache (if it is being added to riece-channel-obarray.)
* riece-server.el (riece-reset-process-buffer): Initialize
riece-channel-cache.
* riece-options.el (riece-channel-cache-max-size): New user
option.
* riece-misc.el (riece-get-channels-on-server): Get channel names
from riece-channel-cache.
* riece-globals.el (riece-channel-cache): New variable.
2005-11-18 Daiki Ueno
* riece-cache.el: Renamed from riece-lru.el.
2005-11-18 Daiki Ueno
* riece-user.el: Require 'riece-lru.
(riece-find-user): Increase priority of given username in
riece-user-lru.
(riece-forget-user): Remove given username from riece-user-lru.
(riece-rename-user): Rename given username in riece-user-lru.
(riece-get-user): Register given username in riece-user-lru (if
it is being added to riece-user-obarray.)
* riece-server.el: Require 'riece-lru.
(riece-reset-process-buffer): Initialize riece-user-lru.
* riece-options.el (riece-user-lru-max-size): New user option.
* riece-misc.el: Require 'riece-lru.
(riece-get-users-on-server): Get usernames from riece-user-lru.
* riece-globals.el (riece-user-lru): New variable.
* COMPILE (riece-modules): Added riece-lru.
* riece-lru.el: New file.
* riece-develop.el: New file.
2005-10-27 Masatake YAMATO
* url-riece.el (url-irc-riece): Use `server-name'
to create an argument for `riece-parse-identity'.
`server' was used.
2005-09-29 Daiki Ueno
* Riece: Version 2.0.1 released.
* configure.ac: Bump up version to 2.0.1.
2005-09-11 Daiki Ueno
* riece-addon.el (riece-command-list-addons): Adjust width of 2nd
column to the length of the longest add-on name.
2005-09-10 Daiki Ueno
* riece-alias.el (riece-alias-abbrev-identity-string): Compare car
of riece-alias-alist with identities case insensitively.
2005-09-05 Daiki Ueno
* Makefile.am (EXTRA_DIST): Added riece-xfaceb.el.
* riece-addon-modules.el (riece-addon-modules): Added riece-xfaceb.
2005-09-03 Steve Youngs
* riece-xfaceb.el: New file. Display X-Face and colour Face
images in IRC buffer, getting the image data from BBDB records.
2005-08-31 Daiki Ueno
* riece-unread.el (riece-unread-requires): Require 'riece-history.
2005-08-29 Daiki Ueno
* Riece: Version 2.0.0 released.
* riece-version.el (riece-version-number): Bump up to 2.0.0.
2005-08-29 Daiki Ueno
* test/test-riece-log.el
(test-riece-log-display-message-function): Enable riece-log addon.
* test/test-riece-ruby.el (lunit-test-case-teardown): Reset
riece-ruby-output-handler-alist and riece-ruby-output-queue-alist.
* riece-server.el (riece-server-keyword-map): Abolished
:coding-system-alist keyword.
(riece-send-string): Take the target identity as the 2nd argument.
* riece-identity.el (riece-channel-coding-system-alist): Renamed
from riece-coding-system-alist.
* riece-globals.el (riece-coding-system-alist): Abolished.
* riece-commands.el (riece-command-topic): Pass the target
identity to riece-send-string.
(riece-command-kick): Ditto.
(riece-command-send-message): Ditto.
(riece-command-enter-message-to-user): Ditto.
(riece-command-join-channel): Ditto.
(riece-command-part-channel): Ditto.
2005-08-29 Daiki Ueno
* riece-identity.el (riece-coding-system-for-identity): Moved from
riece-coding.el.
(riece-decoded-string-for-identity): Ditto.
* riece-300.el (riece-handle-322-message): Decode message per
channel.
(riece-handle-set-topic): Ditto.
* riece-handle.el (riece-handle-notice-message): Decode message
per channel.
(riece-handle-part-message): Ditto.
(riece-handle-kick-message): Ditto.
(riece-handle-topic-message): Ditto.
2005-08-28 Daiki Ueno
* riece-handle.el (riece-handle-privmsg-message): Use
riece-decoded-string & riece-decoded-string-for-identity.
* riece-coding.el (riece-coding-system-alist): New user option.
(riece-coding-system-for-identity): New function.
(riece-encoded-string): New function.
(riece-decoded-string): New alias.
(riece-decoded-string-for-identity): New function.
2005-08-27 Daiki Ueno
* riece-addon.el (riece-uninstall-addon): Don't check the add-on
is enabled.
(riece-uninstall-addon): Don't use riece-remprop.
(riece-enable-addon): Put 'riece-addon-enabled property on the
add-on feature.
(riece-disable-addon): Ditto.
(riece-command-list-addons): Check 'riece-addon-enabled property
instead of riece-*-enabled variables.
2005-08-27 Daiki Ueno
* riece-options.el (riece-shrink-buffer-idle-time-delay):
Abolished; moved to riece-shrink-buffer.el.
(riece-max-buffer-size): Ditto.
(riece-shrink-buffer-remove-chars): Ditto.
* riece.el (riece-shrink-buffer-idle-timer): Abolished; moved to
riece-shrink-buffer.el.
(riece): Don't set riece-shrink-buffer-idle-timer here.
(riece-exit): Don't cancel riece-shrink-buffer-idle-timer here.
* riece-shrink-buffer.el: New add-on.
* riece-addon-modules.el (riece-addon-modules): Added
riece-shrink-buffer.
* Makefile.am (EXTRA_DIST): Added riece-shrink-buffer.el.
2005-08-27 Daiki Ueno
* riece-highlight.el (riece-highlight-uninstall): Use
riece-remprop instead of remprop.
* riece-addon.el (riece-uninstall-addon): Use riece-remprop
instead of remprop.
* riece-xemacs.el (riece-remprop): New alias.
* riece-emacs.el (riece-remprop): New function.
* COMPILE (riece-compile-modules): Add current directory to load-path.
* riece-history.el (riece-history-requires): New function.
* riece-addon.el (riece-insinuate-addon-1): Require add-on feature.
2005-08-27 Daiki Ueno
* riece-foolproof.el (riece-foolproof-description): Made it more
descriptive.
* riece-url.el (riece-url-uninstall): Call easy-menu-remove-item.
* riece-addon.el (riece-addon-list-mode-map): Bind
riece-command-unload-addon.
(riece-insinuate-addon-1): New function; renamed from
riece-insinuate-addon.
(riece-insinuate-addon): Use it; re-insinuate add-ons preceding to
the add-on.
(riece-addon-list-set-point): New function.
(riece-command-unload-addon): New command.
2005-08-27 Daiki Ueno
* riece-menu.el (riece-menu-uninstall): Call easy-menu-remove.
* riece-toolbar.el (riece-toolbar-original-toolbar) [XEmacs]: New
variable.
(riece-unset-toolbar): New function.
(riece-toolbar-uninstall): Call riece-unset-toolbar.
(riece-toolbar-command-mode-hook): Renamed from
riece-toolbar-insinuate-in-command-buffer.
* riece-icon.el (riece-icon-enable): Update
mode-line-buffer-identification here.
(riece-icon-disable): Ditto.
2005-08-26 Daiki Ueno
* riece-addon.el (riece-uninstall-addon): Update
riece-addon-dependencies.
2005-08-26 Daiki Ueno
* riece.el (riece-command-mode): Set
riece-mode-line-buffer-identification.
(riece-dialogue-mode): Ditto.
(riece-channel-mode): Ditto.
(riece-channel-list-mode): Ditto.
(riece-user-list-mode): Ditto.
* riece-icon.el
(riece-icon-update-mode-line-buffer-identification): New function.
(riece-icon-insinuate): Use it.
(riece-icon-uninstall): Use it.
* riece-globals.el (riece-mode-line-buffer-identification): New
variable.
2005-08-26 Daiki Ueno
* Make add-ons uninstallable.
* riece-xface.el (riece-xface-user-list-mode-hook): New function.
(riece-xface-insinuate): Use it.
(riece-xface-uninstall): New function.
* riece-url.el (riece-url-command-mode-hook): New function.
(riece-url-insinuate): Use it.
(riece-url-uninstall): New function.
* riece-unread.el (riece-unread-uninstall): New function.
* riece-toolbar.el (riece-toolbar-uninstall): New function.
* riece-rdcc.el (riece-rdcc-uninstall): New function.
* riece-ndcc.el (riece-ndcc-uninstall): New function.
* riece-mini.el (riece-mini-uninstall): New function.
* riece-menu.el (riece-menu-uninstall): New function.
* riece-lsdb.el: New function.
* riece-log.el (riece-log-uninstall): New function.
* riece-keyword.el (riece-keyword-uninstall): New function.
* riece-keepalive.el (riece-keepalive-uninstall): New function.
* riece-kakasi.el (riece-kakasi-uninstall): New function.
* riece-ignore.el (riece-ignore-uninstall): New function.
* riece-icon.el (riece-icon-user-list-mode-hook): New function.
(riece-icon-channel-list-mode-hook): New function.
(riece-icon-original-mode-line-buffer-identification): New variable.
(riece-icon-insinuate): Use them.
(riece-icon-uninstall): New function.
* riece-history.el
(riece-history-after-switch-to-channel-functions): New function.
(riece-history-insinuate): Use it.
(riece-history-uninstall): New function.
* riece-highlight.el (riece-highlight-uninstall): New function.
* riece-hangman.el (riece-hangman-uninstall): New function.
* riece-google.el (riece-google-uninstall): New function.
* riece-foolproof.el (riece-foolproof-uninstall): New function.
* riece-eval.el (riece-eval-uninstall): New function.
* riece-eval-ruby.el (riece-eval-ruby-uninstall): New function.
* riece-doctor.el (riece-doctor-uninstall): New function.
* riece-ctlseq.el (riece-ctlseq-uninstall): New function.
* riece-ctcp.el (riece-ctcp-dialogue-font-lock-keywords): New variable.
(riece-ctcp-uninstall): New function.
* riece-button.el (riece-button-channel-list-mode-hook): New function.
* riece-biff.el (riece-biff-uninstall): New function.
2005-08-26 Daiki Ueno
* riece-options.el (riece-saved-forms): Added riece-addons.
* riece-addon.el: Require 'riece-addon-modules.
(riece-command-list-addons): List all available add-ons from
riece-addon-modules.
(riece-addon-list-mode-map): Bind riece-command-insinuate-addon
and riece-command-uninstall-addon.
(riece-insinuate-addon): Rebuild riece-addon-dependencies.
(riece-command-insinuate-addon): New command.
(riece-command-uninstall-addon): New command.
* COMPILE (riece-examine-modules): New function.
(riece-examine): Use it.
(riece-compile): Use it.
(riece-install): Use it.
(riece-compile-package): Use it.
(riece-install-package): Use it.
* Makefile.am (EXTRA_DIST): Added riece-addon-modules.el.
* riece-addon-modules.el: New file.
2005-08-25 Daiki Ueno
* riece-addon.el (riece-command-list-addons): Use
riece-addon-dependencies instead of riece-addons.
(riece-command-enable-addon): Ditto.
(riece-command-disable-addon): Ditto.
(riece-uninstall-addon): New function.
2005-08-25 Daiki Ueno
* riece.el (riece): Don't override riece-addons setting.
* riece-globals.el (riece-addon-dependencies): New variable.
* riece-addon.el (riece-sort-addon-dependencies): Rename from
riece-resolve-addon-dependencies; return addon dependencies as an
alist, instead of returning a list of addons.
2005-08-20 Daiki Ueno
* riece-addon.el (riece-command-enable-addon): Redraw entire
add-on list.
(riece-command-disable-addon): Ditto.
2005-08-17 Daiki Ueno
* riece-filter.el (riece-handle-message): Use
riece-funcall-ignore-errors instead of riece-ignore-errors.
* riece-ctcp.el (riece-handle-ctcp-request): Use
riece-funcall-ignore-errors instead of riece-ignore-errors.
(riece-handle-ctcp-response): Ditto.
2005-08-16 Daiki Ueno
* riece-options.el (riece-data-directory): Use load-file-name.
2005-08-15 TAKAHASHI Kaoru
* riece-options.el (riece-data-directory): Avoid compile time
error when locate-data-directory undefined.
2005-08-15 Daiki Ueno
* riece-options.el (riece-quit-timeout): Set default to 1.
* riece-irc.el (riece-irc-quit-server-process): Display message
before/after sending QUIT.
2005-08-14 Daiki Ueno
* riece.el (riece-addons-insinuated): Abolished.
(riece): Don't check riece-addons-insinuated.
* riece-addon.el (riece-insinuate-addon): Put
'riece-addon-insinuated property on add-on feature.
2005-08-13 Daiki Ueno
* COMPILE (riece-install-package): Install *.xpm and *.rb in etc/riece.
* riece-async.el (riece-async-open-network-stream): Locate Ruby
script files in riece-data-directory.
* riece-toolbar.el (riece-make-toolbar-from-menu): Locate icon
files in riece-data-directory.
* riece-ruby.el (riece-ruby-execute): Locate Ruby script files in
riece-data-directory.
* riece-options.el (riece-data-directory): New user option.
2005-08-12 Daiki Ueno
* riece-ruby.el (riece-ruby-filter): Pass timestamp of output
event to output-handler.
2005-08-12 Daiki Ueno
* riece-button.el (riece-user-button-popup-menu): Simplified
menu item titles.
* COMPILE (riece-compile-module): New function.
(riece-examine): New function.
* Makefile.am (compile-individually): New rule.
* riece-log.el (riece-log-file-name-regexp): New constant.
(riece-log-get-file): Add 2nd argument coding-system.
(riece-log-get-files): Add 2nd argument time.
(riece-log-insert): Simplified; determine coding-system from
suffix of each log file.
(riece-log-dired): Renamed from riece-log-open-directory.
(riece-log-open-directory-function): Abolished.
(riece-log-make-file-name): Renamed from riece-log-get-file.
(riece-log-list-files): Renamed from riece-log-get-files.
(riece-log-directory): Renamed from riece-log-get-directory.
* Makefile.am (EXTRA_DIST): Added aproxy.rb.
* COMPILE (riece-scripts): Added "aproxy.rb".
* riece-async.el (riece-async-buffer-size): Renamed from
riece-async-max-buffer-size.
(riece-async-backup-file): New user option.
(riece-async-server-program): New variable.
(riece-async-server-program-arguments): New variable.
(riece-async-open-network-stream): Use aproxy.rb.
* aproxy.rb: New file.
* riece-ruby.el (riece-ruby-out-file): New user option.
(riece-ruby-err-file): New user option.
(riece-ruby-log-file): New user option..
(riece-ruby-server-program-arguments): New variable.
(riece-ruby-filter): Call output-handler within
riece-debug-with-backtrace; erase process output.
(riece-ruby-run-exit-handler): Call exit-handler within
riece-debug-with-backtrace.
* server.rb: Don't bind @err in execution environment;
added logging feature.
2005-08-11 Daiki Ueno
* server.rb: Connect $stdout and $stderr to StringIO objects.
* riece-async.el: Use riece-ruby (partially).
* riece-eval-ruby.el (riece-eval-ruby-prefix-regexp): New user option.
(riece-eval-ruby-exit-handler): Print "nil".
2005-08-11 Daiki Ueno
* riece-hangman.el (riece-hangman-hello-regexp): Changed regexp.
(riece-hangman-bye-regexp): Ditto.
* riece-doctor.el (riece-doctor-hello-regexp): Changed regexp.
(riece-doctor-bye-regexp): Ditto.
* riece-ruby.el: Moved add-on stuff to riece-eval-ruby.el.
* riece-eval-ruby.el: New add-on.
* COMPILE (riece-modules): Add riece-eval-ruby.
* Makefile.am (EXTRA_DIST): Add riece-eval-ruby.el.
2005-08-11 Daiki Ueno
* server.rb (Server::unescape): Fixed.
* riece-ruby.el: Implement add-on API.
(riece-ruby-filter): Fixed regexp; fixed argument order of
output-handler.
(riece-ruby-run-exit-handler): Remove exit-handler entry before
running it to avoid recursion; call riece-ruby-clear if
exit-handler is specified.
(riece-ruby-exit-handler): Don't call riece-ruby-clear.
* riece-rdcc.el: Use riece-ruby.
2005-08-11 Daiki Ueno
* riece-ruby.el (riece-ruby-property-alist): New variable
(riece-ruby-set-property): New function.
(riece-ruby-property): New function.
(riece-ruby-execute): Locate server.rb from load-path.
* Makefile.am (EXTRA_DIST): Added riece-ruby.el and server.rb.
* COMPILE (riece-modules): Added riece-ruby.
(riece-icons): Use filename instead of symbol.
(riece-scripts): New variable.
(riece-install-icons): Use filename instead of symbol.
(riece-install-scripts): New function.
(riece-install): Call riece-install-scripts.
(riece-install-package): Ditto.
2005-08-11 Daiki Ueno
* riece-ruby.el: Add docs for variables.
(riece-ruby-substitute-variables): Substitute multiple variables.
(riece-ruby-filter): Call output-handler/exit-handler with program
name.
2005-08-11 Daiki Ueno
* server.rb: Renamed from rubyserv.rb; s/RubyServ/Server/.
* riece-ruby.el (riece-ruby-server-program): Follow the filename
change.
(riece-ruby-set-output-handler): New function.
2005-08-11 Daiki Ueno
* riece-ruby.el: Fixed example.
(riece-ruby-server-program): New variable.
(riece-ruby-status-alist): New variable.
(riece-ruby-status): Abolished.
(riece-ruby-escaped-data): Renamed from riece-ruby-input.
(riece-ruby-reset-process-buffer): New function.
(riece-ruby-send-exit): New function.
(riece-ruby-filter): Call riece-ruby-run-exit-handler if the
program is exited.
(riece-ruby-run-exit-handler): New function.
(riece-ruby-execute): Don't expect program name.
(riece-ruby-clear): New function.
(riece-ruby-set-exit-handler): New function.
* rubyserv.rb (RubyServ::dispatch_eval): Don't expect program
name; eval under the binding of RubyServ::C.
(RubyServ::dispatch_poll): Don't clear @thr.
(RubyServ::dispatch_exit): New method.
2005-08-10 Daiki Ueno
* riece-ruby.el: New file.
* rubyserv.rb: Rewrite.
2005-08-09 Daiki Ueno
* riece-mini.el (riece-mini-message-no-log): Defined as a
function.
(riece-mini-requires): Fixed indent.
2005-08-08 Daiki Ueno
* riece.el (riece-dialogue-mode-map): Bind
riece-command-toggle-others-buffer-mode.
* riece-commands.el (riece-command-toggle-others-buffer-mode): New
command.
* riece-layout.el (riece-configure-windows): Hide
riece-others-buffer if riece-others-buffer-mode is nil.
* riece-options.el (riece-saved-forms): Add
riece-others-buffer-mode and riece-channel-list-buffer-mode.
(riece-others-buffer-mode): New user option.
2005-08-06 Daiki Ueno
* riece-alias.el (riece-alias-alternate-separator): Set to "@".
2005-07-28 Daiki Ueno
* riece-debug.el: Don't bind unused variable; prepend time to
debug message.
2005-07-19 Daiki Ueno
* riece-unread.el (riece-guess-channel-from-unread): Return
reversed copy of riece-unread-channels.
* riece-server.el (riece-server-parse-string): Use
string-to-number instead of string-to-int.
2005-07-07 Daiki Ueno
* riece-display.el (riece-channel-buffer): Return nil when
channel-buffer is killed.
* riece-debug.el (riece-debug-1): New function.
(riece-debug): Always return nil.
2005-06-04 Daiki Ueno
* riece-server.el (riece-server-keyword-map): Add :coding-system-alist.
* riece-irc.el (riece-irc-open-server): Init riece-coding-system-alist.
* riece-handle.el (riece-handle-privmsg-message): Retry with the
channel's coding-system if it differs from the server's
coding-system.
* riece-commands.el (riece-command-send-message): Pass prefix to
riece-send-string.
* riece-globals.el (riece-coding-system-alist): New variable.
* riece-coding.el (riece-decode-coding-string-1): Split from
riece-decode-coding-string; set riece-coding-encoded-string and
riece-coding-decoded-coding-system properties on decoded string.
(riece-retry-decode-coding-string): New function.
(riece-decoded-coding-system): Use it.
2005-06-03 Daiki Ueno
* riece-ruby.el: New file.
2005-04-04 Daiki Ueno
* riece-misc.el (riece-get-channels-on-server): New function.
(riece-get-users-on-server): Don't use riece-user-p.
(riece-get-identities-on-server): Call
riece-get-channels-on-server and riece-get-users-on-server.
* riece-identity.el (riece-completing-read-identity): Don't signal
an error when input string does not match riece-channel-regexp nor
riece-user-regexp.
* riece-300.el (riece-handle-366-message): Don't use riece-user-regexp.
(riece-handle-302-message): Ditto.
(riece-handle-313-message): Ditto.
2005-03-22 Daiki Ueno
* rubyserv.rb: New file.
2005-03-20 Daiki Ueno
* riece-toolbar.el [XEmacs] (riece-make-toolbar-from-menu):
Pick up toolbar icons from etc/riece/.
2005-03-12 Daiki Ueno
* riece.el (riece-buffer-alist): Init riece-debug-buffer.
(riece-submit-bug-report): Insert content of riece-debug-buffer.
* riece-globals.el (riece-debug-buffer): New variable.
* riece-filter.el (riece-sentinel): Use riece-debug.
* riece-display.el (riece-channel-buffer-name): Use riece-debug.
* riece-button.el (riece-identity-button-click): Use riece-debug.
* riece-debug.el (riece-debug): New function.
(riece-ignore-errors): Use it.
* riece-filter.el (riece-filter): Removed (eobp) check.
2005-03-06 Daiki Ueno
* Riece: Version 1.0.8 released.
* riece-version.el (riece-version-number): Bump up to 1.0.8.
2005-03-06 Daiki Ueno
* COMPILE (riece-compile-modules): Print summary.
2005-03-05 Daiki Ueno
* riece-version.el: Bind emacs-program-version.
* riece-debug.el: Require 'riece-options for riece-debug.
* riece-log.el (riece-log-insinuate): Use user-uid instead of
user-login-name and escape system-name for riece-log-lock-file.
2005-03-02 Daiki Ueno
* riece-log.el (riece-log-lock-file): Define with defvar.
(riece-log-display-message-function): Use riece-log-lock-file as
LOCKNAME of write-region.
(riece-log-insinuate): Generate name for riece-log-lock-file.
2005-02-27 Daiki Ueno
* riece-300.el (riece-handle-317-message): Format idle seconds in
human readable form.
(riece-handle-301-message): Don't use riece-user-regexp.
(riece-handle-311-message): Ditto.
(riece-handle-312-message): Ditto.
(riece-handle-317-message): Ditto.
(riece-handle-319-message): Ditto.
* riece-ctcp.el (riece-handle-ctcp-action-request): Prepend target.
(riece-command-ctcp-action): Ditto.
2005-02-25 TAKAHASHI Kaoru
* riece-globals.el (riece-obarray-size, riece-obarray): Abolish.
(riece-channel-obarray-size, riece-user-obarray-size)
(riece-channel-obaary, riece-user-obarray): New variables.
* riece-user.el (riece-find-user, riece-forget-user)
(riece-rename-user, riece-get-user): Use `riece-user-obarray'
instead of `riece-user-obarray'.
* riece-channel.el (riece-find-channel, riece-forget-channel)
(riece-get-channel): Use `riece-channel-obarray' instead of
`riece-obarray'.
* riece-misc.el (riece-get-identities-on-server): Ditto.
* riece-server.el (riece-reset-process-buffer): Ditto.
2005-02-24 Daiki Ueno
* riece-unread.el (riece-unread-after-switch-to-channel-function):
Clear riece-unread-channels case insensitively.
* riece-300.el (riece-handle-353-message): Use
riece-identity-assoc to pick an entry from
riece-353-message-alist.
(riece-handle-366-message): Ditto.
Reported by Steve Youngs .
2005-02-19 Daiki Ueno
* riece-debug.el (riece-funcall-ignore-errors): New function.
* riece-signal.el (riece-emit-signal): Use riece-funcall-ignore-errors.
* riece-filter.el (riece-handle-numeric-reply): Use
riece-funcall-ignore-errors.
(riece-handle-message): Ditto.
* riece-ctcp.el (riece-handle-ctcp-request): Use
riece-funcall-ignore-errors.
2005-02-18 Steve Youngs
* riece-ctcp.el (riece-handle-ctcp-time-request): New.
(riece-handle-ctcp-time-response): New.
(riece-command-ctcp-time): New.
(riece-ctcp-enable): Add `riece-command-ctcp-time'.
(riece-ctcp-disable): Ditto.
* riece-layout.el (riece-layout-alist): Minor doc string fix --
escape a couple of parens.
* riece-version.el: defvar sxemacs-codename at compile time.
(riece-extended-version): Simplify the XEmacs section, add support
for SXEmacs.
2005-02-17 TAKAHASHI Kaoru
* riece-addon.el (riece-resolve-addons): Fixed
avoid add directory to addons condition.
2005-02-10 TAKAHASHI Kaoru
* riece-addon.el (riece-resolve-addons): Don't add directory to
addons.
2005-02-09 Yoichi NAKAYAMA
* riece-commands.el (riece-command-part): Fix argument.
2005-02-07 Daiki Ueno
* riece-filter.el (riece-filter): Simplified.
* riece-addon.el (riece-resolve-addons): Check the existence of
riece-addon-directory.
2005-02-06 Daiki Ueno
* riece-filter.el (riece-filter): Modified regexp.
2005-02-05 Daiki Ueno
* riece.el (riece-exit): Clear riece-window-configuration frame
parameter.
* riece-commands.el (riece-command-suspend-resume): Don't attempt
to restore window-configuration if the cdr of
riece-window-configuration frame parameter is nil.
* riece-filter.el (riece-chomp-string): New function.
(riece-filter): Use it.
2005-02-05 Daiki Ueno
* Riece: Version 1.0.7 released.
* riece-version.el (riece-version-number): Bump up to 1.0.7.
2005-02-05 Daiki Ueno
* riece-keyword.el (riece-keyword-face): Change defface spec for tty.
* riece-toolbar.el (riece-toolbar-description): New constant.
* riece-keepalive.el: Require 'riece-options.
(riece-keepalive-ping-repeat): Define with defcustom.
(riece-keepalive-description): New constant.
* riece.el (riece-dialogue-mode-map): Bind
riece-command-suspend-resume.
* riece-commands.el (riece-command-suspend-resume): New command.
* riece-options.el (riece-addons): Enable riece-keyword by default.
* riece-button.el (riece-identity-button-popup-menu): Changed
interactivbe spect "@e" -> "e".
(riece-identity-button-click): New function.
(riece-make-identity-button-map): Bind riece-identity-button-click.
2005-02-04 Daiki Ueno
* riece-options.el (riece-part-message): New user option.
(riece-addons): Enable riece-alias and riece-ctlseq by default.
(riece-max-buffer-size): Change the default value to nil.
* riece-commands.el (riece-command-part): Use riece-part-message.
2005-02-04 OHASHI Akira
* riece-eval.el (riece-eval-form): New function.
(riece-eval-display-message-function): Use it.
2005-02-04 Daiki Ueno
* riece-000.el (riece-handle-001-message): Use
riece-command-join-channel to join startup channels.
* riece-filter.el (riece-filter): Accept lines which end with LF.
* riece-300.el (riece-353-message-alist): Renamed from riece-353-users.
(riece-handle-353-message): Don't parse the reply.
(riece-handle-366-message): Parse 353 replies here; count users.
* riece-log.el (riece-log-enable): Add debug message.
* riece-keepalive.el: New add-on.
* COMPILE (riece-modules): Add riece-keepalive.
* Makefile.am (EXTRA_DIST): Add riece-keepalive.el.
2005-02-04 OHASHI Akira
* riece-biff.el (riece-biff-functions): Abolish.
(riece-biff-after-display-message-function): Follow the change above.
2005-02-04 Daiki Ueno
* riece-server.el (riece-close-server-process): Switch to process
buffer when running riece-after-close-hook.
* COMPILE (riece-icons): Add all symbols from riece-toolbar-items.
* Makefile.am (EXTRA_DIST): Add riece-command-previous-channel.xpm,
riece-command-next-channel.xpm, and riece-submit-bug-report.xpm.
* riece-menu.el (riece-menu-items): Add "Submit Bug Report".
* riece-toolbar.el (riece-toolbar-items): Add riece-submit-bug-report.
* riece-compat.el (riece-read-passwd): Changed default value.
* riece-400.el (riece-handle-475-message): Don't bind inhibit-quit
when reading channel key.
* riece-irc.el (riece-irc-open-server): Don't bind inhibit-quit
when reading password.
* riece-compat.el (riece-read-passwd): Bind inhibit-quit.
* riece-commands.el (riece-command-join): Abolished prefix-arg
(channel key).
* riece-options.el (riece-buffer-dispose-function): Changed the
default value from bury-buffer to kill-buffer.
* riece-log.el (riece-log-lock-directory): New user option.
(riece-log-enable): Create lock directory.
(riece-log-disable): Remove lock directory.
* riece-addon.el (riece-resolve-addons): Don't use FILES-ONLY
argument of directory-files.
2005-02-04 OHASHI Akira
* riece-google.el (riece-google-default-lang): Change value.
(riece-google-display-message-function): Follow the change above.
2005-02-03 OHASHI Akira
* riece-google.el: New add-on.
* COMPILE (riece-modules): Add riece-google.
* Makefile.am (EXTRA_DIST): Add riece-google.el.
2005-02-03 Daiki Ueno
* riece-400.el (riece-handle-475-message): New handler; query
channel key.
2005-02-03 Daiki Ueno
* riece-addon.el (riece-resolve-addon-dependencies): Rename from
riece-resolve-addon.
(riece-resolve-addon): Append add-ons under riece-addon-directory.
2005-02-02 TAKAHASHI Kaoru
* riece-message.el (riece-display-message): When filter-function
return nil, escape from while loop.
2005-02-02 Daiki Ueno
* riece-debug.el (riece-debug-standard-output-buffer): Use
riece-temp-buffer.
* riece.el: Add riece-temp-buffer.
* riece-globals.el (riece-temp-buffer): New variable.
2005-02-02 Daiki Ueno
* riece-signal.el (riece-emit-signal): Use riece-ignore-errors.
* riece-filter.el (riece-handle-numeric-reply): Use
riece-ignore-errors.
(riece-handle-message): Ditto.
* riece-ctcp.el (riece-handle-ctcp-request): Use
riece-ignore-errors.
(riece-handle-ctcp-response): Ditto.
* riece-debug.el: New file.
* COMPILE (riece-modules): Add riece-debug.
* Makefile.am (EXTRA_DIST): Add riece-debug.el.
2005-02-02 OHASHI Akira
* riece-eval.el (riece-eval-regexp): Fix regexp.
(riece-eval-display-message-function): Follow the change above.
2005-02-02 Daiki Ueno
* riece-server.el (riece-close-server-process): Run
riece-after-close-hook.
* riece-log.el (riece-log-insert): Bind file-name-coding-system
and default-file-name-coding-system to nil.
2005-02-01 OHASHI Akira
* riece-eval.el: New add-on.
* COMPILE (riece-modules): Add riece-eval.
* Makefile.am (EXTRA_DIST): Add riece-eval.el.
2005-01-30 TAKAHASHI Kaoru
* riece-display.el (riece-display-connect-signals): Check nick or
channel, before call `riece-channel-get-users'.
2004-12-15 Yoichi NAKAYAMA
* riece-addon.el (riece-command-enable-addon): Fixed.
(riece-command-disable-addon): Ditto.
2004-12-14 Daiki Ueno
* riece-alias.el (riece-alias-abbrev-identity-string): Return a
copy of a string since text properties will be set on it.
(riece-alias-expand-identity-string): Ditto.
* riece-emacs.el (riece-normalize-modeline-string): Don't
concatenate elements in modeline string.
2004-12-13 Daiki Ueno
* riece-display.el (riece-update-channel-list-indicator):
Normalize modeline indicator.
* riece-xemacs.el (riece-normalize-modeline-string): New alias.
* riece-emacs.el (riece-normalize-modeline-string): New function.
(riece-normalize-modeline-string-1): New function.
2004-12-13 Daiki Ueno
* test/Makefile.am (EXTRA_DIST): Add test-riece.el.
* test/test-riece.el: New test cases.
* riece.el (riece-shrink-buffer): Fixed bug.
* riece-options.el (riece-username): Changed the default value to
user-full-name.
2004-12-12 Daiki Ueno
* riece-command-previous-channel.xpm: New file.
* riece-command-next-channel.xpm: New file.
* COMPILE (riece-icons): New variable.
(riece-install-icons): New function.
(riece-install): Install icons.
(riece-install-package): Ditto.
2004-12-12 Daiki Ueno
* riece-options.el (riece-addons): Add riece-toolbar.
* riece-log.el (riece-log-flashback): Fixed regexp.
* riece-menu.el (riece-menu-items): Add "Next Channel" and
"Previous Channel".
* riece-toolbar.el: Support XEmacs.
(riece-toolbar-items): Renamed from
riece-toolbar-item-list.
(riece-tool-bar-local-item-from-menu): Abolished.
(riece-toolbar-find-menu-item): New function.
(riece-make-toolbar-from-menu): New function.
(riece-set-toolbar): New function.
(riece-toolbar-insinuate-in-command-buffer): Use them.
2004-12-11 Daiki Ueno
* riece-toolbar.el: New add-on.
* COMPILE (riece-modules): Add riece-toolbar.
* Makefile.am (EXTRA_DIST): Add riece-toolbar.el.
2004-12-10 Daiki Ueno
* test/test-riece-log.el
(test-riece-log-display-message-function): "yes" -> "true".
* test/Makefile.am (EXTRA_DIST): Add lunit-report.el and
test-riece-log.el.
2004-12-10 Daiki Ueno
* riece.el (riece-shrink-buffer): Shrink buffer based on chars
instead of lines.
* riece-options.el (riece-shrink-buffer-remove-chars): New user option.
(riece-shrink-buffer-remove-lines): Abolish.
2004-12-08 Daiki Ueno
* test/test-riece-log.el (test-riece-log-delete-directory):
Suppress file-name encoding.
* riece-log.el (riece-log-get-directory): Fixed bug in
riece-log-directory-map handling.
* test/test-riece-log.el
(test-riece-log-display-message-function): New test case.
2004-12-08 Daiki Ueno
* riece-log.el (riece-log-flashback): Fixed custom spec.
(riece-log-date-face): New face.
(riece-log-insert): Don't append date string to the end of log
lines if they arrived today.
(riece-log-flashback): Insert "Recent messages ...:"; call
riece-after-insert-functions.
* riece-handle.el (riece-handle-part-message): Call riece-naming
assert-part after inserting changes in channel buffers.
* riece-display.el (riece-part-channel): Call
riece-buffer-dispose-function on parted channel buffer.
2004-12-08 Daiki Ueno
* riece-log.el (riece-log-display-message-function): Suppress
further file-name encoding.
2004-12-07 Daiki Ueno
* test/lunit-report.el: New file split from lunit.el.
* riece-options.el (riece-addons): Add 'riece-log.
* test/test-riece-log.el (lunit-test-case-setup): #riece -> =23riece.
* riece-log.el (riece-log-insert): Renamed from
riece-log-flashback-1; simplified.
(riece-log-get-files): Check existence of directory.
(riece-log-get-directory): New implementation.
[cf. ]
2004-12-07 TAKAHASHI Kaoru
* riece-foolproof.el (riece-foolproof-command-send-message-function):
Check invisible text.
2004-12-07 Daiki Ueno
* test/test-riece-log.el (test-riece-log-encode-file-name): New
test case.
(test-riece-log-encode-file-name-mule): New test case.
(test-riece-log-decode-file-name): New test case.
(test-riece-log-decode-file-name-mule): New test case.
* riece-log.el (riece-log-file-name-coding-system): New user option.
(riece-log-encode-file-name): New function.
(riece-log-decode-file-name): New function.
2004-12-06 Daiki Ueno
* test/test-riece-log.el: New test cases.
* riece-log.el: Collect logs across dates.
(riece-log-get-files): New function.
(riece-log-flashback-1): New function.
(riece-log-flashback): Use it.
2004-12-05 Daiki Ueno
* riece-message.el (riece-display-message-1): Call
riece-after-display-message-functions in riece-message-buffer.
[cf. ]
2004-12-05 Daiki Ueno
* Riece: Version 1.0.6 released.
* riece-version.el (riece-version-number): Bump up to 1.0.6.
2004-12-01 Daiki Ueno
* riece-display.el (riece-update-channel-status-indicator): Fixed typo.
2004-11-28 Daiki Ueno