Commit initial: GNUWorld servicii IRC cu README.md complet in limba romana - Analiza arhitecturala completa a proiectului - Documentatie ierarhie clase, bucla de evenimente, protocol P10 - Identificare probleme memorie si recomandari modernizare

This commit is contained in:
Underchat committed 2026-03-02 00:51:45 +02:00
commit fcb24f6de9
870 files changed
+311128

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
Makefile
*.la *.lo
.deps .libs
.arch-ids
+2
View File
@@ -0,0 +1,2 @@
2004-05-16 0.0.1 Jeekay
* Initial module creation
+24
View File
@@ -0,0 +1,24 @@
## $Id: Makefile.am,v 1.5 2005/01/17 23:09:17 dan_karrels Exp $
lib_LTLIBRARIES = libchanfix.la
libchanfix_la_CXXFLAGS = -I${top_srcdir}/include \
-I${top_srcdir}/libgnuworld \
-Werror -ansi -pedantic
libchanfix_la_LDFLAGS = -module -export-dynamic
libchanfix_la_SOURCES = chanfix.cc \
chanfix-commands.cc \
chanfix-core.cc \
chanfix-misc.cc \
chanfix-xclient.cc \
cfChannel.cc \
cfChannelUser.cc \
cmdCHECK.cc
EXTRA_DIST = chanfix.h \
cfChannel.h \
cfChannelUser.h \
chanfix-commands.h \
logging.h
+621
View File
@@ -0,0 +1,621 @@
# 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 = :
build_triplet = @build@
host_triplet = @host@
subdir = mod.chanfix
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/ac_cxx_namespaces.m4 \
$(top_srcdir)/ax_boost_thread.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/defs.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libchanfix_la_LIBADD =
am_libchanfix_la_OBJECTS = libchanfix_la-chanfix.lo \
libchanfix_la-chanfix-commands.lo \
libchanfix_la-chanfix-core.lo libchanfix_la-chanfix-misc.lo \
libchanfix_la-chanfix-xclient.lo libchanfix_la-cfChannel.lo \
libchanfix_la-cfChannelUser.lo libchanfix_la-cmdCHECK.lo
libchanfix_la_OBJECTS = $(am_libchanfix_la_OBJECTS)
libchanfix_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libchanfix_la_CXXFLAGS) \
$(CXXFLAGS) $(libchanfix_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libchanfix_la_SOURCES)
DIST_SOURCES = $(libchanfix_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBGNUWORLD = @LIBGNUWORLD@
LIBLTDL = @LIBLTDL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTDLDEPS = @LTDLDEPS@
LTDLINCL = @LTDLINCL@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NEW_MODS = @NEW_MODS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
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@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pgsql_includedir = @pgsql_includedir@
pgsql_libdir = @pgsql_libdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
threadLib = @threadLib@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
lib_LTLIBRARIES = libchanfix.la
libchanfix_la_CXXFLAGS = -I${top_srcdir}/include \
-I${top_srcdir}/libgnuworld \
-Werror -ansi -pedantic
libchanfix_la_LDFLAGS = -module -export-dynamic
libchanfix_la_SOURCES = chanfix.cc \
chanfix-commands.cc \
chanfix-core.cc \
chanfix-misc.cc \
chanfix-xclient.cc \
cfChannel.cc \
cfChannelUser.cc \
cmdCHECK.cc
EXTRA_DIST = chanfix.h \
cfChannel.h \
cfChannelUser.h \
chanfix-commands.h \
logging.h
all: all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 mod.chanfix/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu mod.chanfix/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libchanfix.la: $(libchanfix_la_OBJECTS) $(libchanfix_la_DEPENDENCIES)
$(libchanfix_la_LINK) -rpath $(libdir) $(libchanfix_la_OBJECTS) $(libchanfix_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-cfChannel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-cfChannelUser.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-chanfix-commands.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-chanfix-core.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-chanfix-misc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-chanfix-xclient.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-chanfix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-cmdCHECK.Plo@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
libchanfix_la-chanfix.lo: chanfix.cc
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-chanfix.lo -MD -MP -MF $(DEPDIR)/libchanfix_la-chanfix.Tpo -c -o libchanfix_la-chanfix.lo `test -f 'chanfix.cc' || echo '$(srcdir)/'`chanfix.cc
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libchanfix_la-chanfix.Tpo $(DEPDIR)/libchanfix_la-chanfix.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chanfix.cc' object='libchanfix_la-chanfix.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-chanfix.lo `test -f 'chanfix.cc' || echo '$(srcdir)/'`chanfix.cc
libchanfix_la-chanfix-commands.lo: chanfix-commands.cc
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-chanfix-commands.lo -MD -MP -MF $(DEPDIR)/libchanfix_la-chanfix-commands.Tpo -c -o libchanfix_la-chanfix-commands.lo `test -f 'chanfix-commands.cc' || echo '$(srcdir)/'`chanfix-commands.cc
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libchanfix_la-chanfix-commands.Tpo $(DEPDIR)/libchanfix_la-chanfix-commands.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chanfix-commands.cc' object='libchanfix_la-chanfix-commands.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-chanfix-commands.lo `test -f 'chanfix-commands.cc' || echo '$(srcdir)/'`chanfix-commands.cc
libchanfix_la-chanfix-core.lo: chanfix-core.cc
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-chanfix-core.lo -MD -MP -MF $(DEPDIR)/libchanfix_la-chanfix-core.Tpo -c -o libchanfix_la-chanfix-core.lo `test -f 'chanfix-core.cc' || echo '$(srcdir)/'`chanfix-core.cc
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libchanfix_la-chanfix-core.Tpo $(DEPDIR)/libchanfix_la-chanfix-core.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chanfix-core.cc' object='libchanfix_la-chanfix-core.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-chanfix-core.lo `test -f 'chanfix-core.cc' || echo '$(srcdir)/'`chanfix-core.cc
libchanfix_la-chanfix-misc.lo: chanfix-misc.cc
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-chanfix-misc.lo -MD -MP -MF $(DEPDIR)/libchanfix_la-chanfix-misc.Tpo -c -o libchanfix_la-chanfix-misc.lo `test -f 'chanfix-misc.cc' || echo '$(srcdir)/'`chanfix-misc.cc
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libchanfix_la-chanfix-misc.Tpo $(DEPDIR)/libchanfix_la-chanfix-misc.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chanfix-misc.cc' object='libchanfix_la-chanfix-misc.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-chanfix-misc.lo `test -f 'chanfix-misc.cc' || echo '$(srcdir)/'`chanfix-misc.cc
libchanfix_la-chanfix-xclient.lo: chanfix-xclient.cc
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-chanfix-xclient.lo -MD -MP -MF $(DEPDIR)/libchanfix_la-chanfix-xclient.Tpo -c -o libchanfix_la-chanfix-xclient.lo `test -f 'chanfix-xclient.cc' || echo '$(srcdir)/'`chanfix-xclient.cc
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libchanfix_la-chanfix-xclient.Tpo $(DEPDIR)/libchanfix_la-chanfix-xclient.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='chanfix-xclient.cc' object='libchanfix_la-chanfix-xclient.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-chanfix-xclient.lo `test -f 'chanfix-xclient.cc' || echo '$(srcdir)/'`chanfix-xclient.cc
libchanfix_la-cfChannel.lo: cfChannel.cc
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-cfChannel.lo -MD -MP -MF $(DEPDIR)/libchanfix_la-cfChannel.Tpo -c -o libchanfix_la-cfChannel.lo `test -f 'cfChannel.cc' || echo '$(srcdir)/'`cfChannel.cc
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libchanfix_la-cfChannel.Tpo $(DEPDIR)/libchanfix_la-cfChannel.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cfChannel.cc' object='libchanfix_la-cfChannel.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-cfChannel.lo `test -f 'cfChannel.cc' || echo '$(srcdir)/'`cfChannel.cc
libchanfix_la-cfChannelUser.lo: cfChannelUser.cc
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-cfChannelUser.lo -MD -MP -MF $(DEPDIR)/libchanfix_la-cfChannelUser.Tpo -c -o libchanfix_la-cfChannelUser.lo `test -f 'cfChannelUser.cc' || echo '$(srcdir)/'`cfChannelUser.cc
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libchanfix_la-cfChannelUser.Tpo $(DEPDIR)/libchanfix_la-cfChannelUser.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cfChannelUser.cc' object='libchanfix_la-cfChannelUser.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-cfChannelUser.lo `test -f 'cfChannelUser.cc' || echo '$(srcdir)/'`cfChannelUser.cc
libchanfix_la-cmdCHECK.lo: cmdCHECK.cc
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-cmdCHECK.lo -MD -MP -MF $(DEPDIR)/libchanfix_la-cmdCHECK.Tpo -c -o libchanfix_la-cmdCHECK.lo `test -f 'cmdCHECK.cc' || echo '$(srcdir)/'`cmdCHECK.cc
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libchanfix_la-cmdCHECK.Tpo $(DEPDIR)/libchanfix_la-cmdCHECK.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cmdCHECK.cc' object='libchanfix_la-cmdCHECK.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-cmdCHECK.lo `test -f 'cmdCHECK.cc' || echo '$(srcdir)/'`cmdCHECK.cc
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
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: $(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
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
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-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-libLTLIBRARIES
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-generic distclean-libtool \
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-libLTLIBRARIES install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-libLTLIBRARIES
# 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:
+63
View File
@@ -0,0 +1,63 @@
/**
* cfChannel.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <string>
#include <assert.h>
#include "cfChannel.h"
#include "cfChannelUser.h"
namespace gnuworld {
namespace chanfix {
using std::string;
cfChannel::cfChannel(const string& _name) :
name(_name)
{
}
cfChannel::~cfChannel()
{
for( mapUsers::iterator itr = users.begin() ;
itr != users.end() ;
++itr ) {
delete itr->second;
}
}
cfChannelUser* cfChannel::getUser(const string& username)
{
mapUsers::iterator itr = users.find(username);
if( itr != users.end() ) { return itr->second; }
cfChannelUser *tmpUser = new cfChannelUser(username);
users[username] = tmpUser;
return tmpUser;
}
} // namespace chanfix
} // namespace gnuworld
+57
View File
@@ -0,0 +1,57 @@
/**
* cfChannel.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef CF_CFCHANNEL_H
#define CF_CFCHANNEL_H "$Id: cfChannel.h,v 1.6 2007/08/28 16:10:08 dan_karrels Exp $"
#include <string>
#include <map>
namespace gnuworld {
namespace chanfix {
class cfChannelUser;
class cfChannel {
public:
cfChannel(const std::string&);
virtual ~cfChannel();
/** Return a given user - add a new one if one is not present. */
cfChannelUser* getUser(const std::string&);
/** Return the beginning of the users map. */
typedef std::map< std::string , cfChannelUser* > mapUsers;
typedef mapUsers::const_iterator mapUsersConstIterator;
inline mapUsersConstIterator getUsersBegin()
{ return users.begin(); }
inline mapUsersConstIterator getUsersEnd()
{ return users.end(); }
protected:
std::string name;
mapUsers users;
}; // class cfChannel
} // namespace chanfix
} // namespace gnuworld
#endif
+49
View File
@@ -0,0 +1,49 @@
/**
* cfChannelUser.cc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <string>
#include "cfChannelUser.h"
namespace gnuworld {
namespace chanfix {
using std::string;
cfChannelUser::cfChannelUser(const string& _name) :
name(_name) ,
points(0)
{
}
cfChannelUser::~cfChannelUser()
{
}
void cfChannelUser::addPoints(unsigned int _points)
{
points += _points;
}
} // namespace chanfix
} // namespace gnuworld
+56
View File
@@ -0,0 +1,56 @@
/**
* cfChannelUser.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef CF_CFCHANNELUSER_H
#define CF_CFCHANNELUSER_H
#include <string>
namespace gnuworld {
namespace chanfix {
class cfChannelUser {
public:
cfChannelUser(const std::string&);
virtual ~cfChannelUser();
void addPoints(unsigned int);
inline void setPoints(unsigned int _points)
{ points = _points; }
inline unsigned int getPoints() const
{ return points; }
inline const std::string& getName() const
{ return name; }
protected:
std::string name;
unsigned int points;
}; // class cfChannelUser;
} // namespace chanfix
} // namespace gnuworld
#endif
+44
View File
@@ -0,0 +1,44 @@
/**
* chanfix-commands.cc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include "chanfix.h"
#include "chanfix-commands.h"
namespace gnuworld {
namespace chanfix {
bool chanfix::RegisterCommand( Command *theCommand )
{
return commandMap.insert(
commandPairType( theCommand->getName() , theCommand )
).second;
}
void Command::Usage( const iClient *theClient )
{
bot->Notice(theClient, "SYNTAX: %s - %s",
getName().c_str(),
getHelp().c_str()
);
}
} // namespace chanfix
} // namespace gnuworld
+77
View File
@@ -0,0 +1,77 @@
/**
* chanfix-commands.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef CF_CHANFIX_COMMANDS_H
#define CF_CHANFIX_COMMANDS_H
#include <string>
namespace gnuworld {
class iClient;
namespace chanfix {
class chanfix;
class Command {
public:
Command( chanfix *_bot,
const std::string& _commandName,
const std::string& _help ) :
bot(_bot), commandName(_commandName), help(_help)
{ }
virtual ~Command() { }
virtual void Exec(const iClient*, const std::string&) = 0;
const std::string& getName() const
{ return commandName; }
const std::string& getHelp() const
{ return help; }
virtual void Usage(const iClient*);
protected:
chanfix *bot;
std::string commandName;
std::string help;
}; // class Command
#define DECLARE_COMMAND(commandName) \
class commandName##Command : public Command \
{ \
public: \
commandName##Command(chanfix* _bot, \
const std::string& _commandName, \
const std::string& _help) : \
Command(_bot, _commandName, _help) {} \
virtual ~commandName##Command() {} \
virtual void Exec(const iClient*, const std::string&); \
};
DECLARE_COMMAND( CHECK )
} // namespace chanfix
} // namespace gnuworld
#endif
+106
View File
@@ -0,0 +1,106 @@
/**
* chanfix-core.cc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <string>
#include "Channel.h"
#include "ChannelUser.h"
#include "Network.h"
#include "Timer.h"
#include "cfChannel.h"
#include "cfChannelUser.h"
#include "chanfix.h"
namespace gnuworld {
namespace chanfix {
using std::string;
cfChannel* chanfix::getChannel(const string& channel, bool create)
{
mapChannels::iterator itr = channels.find(channel);
if( itr != channels.end() ) { return itr->second; }
if( ! create ) { return 0; }
cfChannel* newChan = new cfChannel(channel);
channels[channel] = newChan;
return newChan;
}
void chanfix::doCountUpdate()
{
/* Iterator over all available channels */
log(logging::DEBUG, "Starting count cycle");
Timer myTimer;
unsigned int channels = 0;
unsigned int ops = 0;
for( xNetwork::const_channelIterator itr = Network->channels_begin() ;
itr != Network->channels_end() ;
++itr ) {
Channel *tmpChannel = itr->second;
++channels;
cfChannel *cfChan = 0;
for( Channel::userIterator citr = tmpChannel->userList_begin() ;
citr != tmpChannel->userList_end() ;
++citr ) {
ChannelUser *chanUser = citr->second;
if( ! chanUser->isModeO() ) { continue ; }
if( ! chanUser->getClient()->isModeR() ) { continue ; }
if( chanUser->getClient()->isModeK() ) { continue ; }
if( ! cfChan ) { cfChan = getChannel(tmpChannel->getName(), true); }
++ops;
cfChannelUser *user = cfChan->getUser(chanUser->getClient()->getAccount());
if( user->getPoints() >= confMaxPoints ) { continue ; }
user->addPoints(confPointsAuth);
if( user->getPoints() >= confMaxPoints ) {
user->setPoints(confMaxPoints);
}
}
}
log(logging::DEBUG, "Duration: %ums. Found %u channels and %u ops.",
myTimer.stopTimeMS(),
channels,
ops
);
}
} // namespace chanfix
} // namespace gnuworld
+87
View File
@@ -0,0 +1,87 @@
/**
* chanfix-misc.cc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <string>
#include <sstream>
#include <cstdarg>
#include "Network.h"
#include "chanfix.h"
namespace gnuworld {
namespace chanfix {
using std::endl;
void chanfix::log(const logging::loglevel& level, const char* format, ... )
{
char buf[1024] = {0};
va_list list;
va_start(list, format);
vsnprintf(buf, 1024, format, list);
va_end(list);
log(level, std::string(buf));
}
void chanfix::log(const logging::loglevel& level,
const std::string& message)
{
if( 0 == confLogLevel & level ) { return; }
/* Check our logging channel exists */
Channel *logChannel = Network->findChannel(confConsoleChannel);
if( !logChannel ) {
elog << "chanfix> ERROR: Unable to locate logging channel."
<< endl;
return;
}
Message(logChannel, message.c_str());
}
void chanfix::setConsoleTopic()
{
char buffer[512];
sprintf(buffer, "Giving %u points per %us",
confPointsAuth,
confPeriod
);
std::stringstream newTopic;
newTopic << this->getCharYYXXX()
<< " T "
<< confConsoleChannel
<< " :"
<< buffer
<< endl;
this->Write(newTopic.str());
}
} // namespace chanfix
} // namespace gnuworld
+111
View File
@@ -0,0 +1,111 @@
/**
* chanfix-xclient.cc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <string>
#include "StringTokenizer.h"
#include "chanfix.h"
#include "chanfix-commands.h"
namespace gnuworld {
namespace chanfix {
void chanfix::OnAttach()
{
xClient::OnAttach();
/* Lastly, kick off any timers we might need */
time_t next;
next = ::time(0) + confStartDelay;
timerCount = MyUplink->RegisterTimer(next, this, 0);
}
void chanfix::BurstChannels()
{
xClient::BurstChannels();
MyUplink->JoinChannel(this, confConsoleChannel, confConsoleModes);
}
void chanfix::OnCTCP( iClient *theClient, const std::string& CTCP,
const std::string& Message, bool )
{
StringTokenizer st(CTCP);
if(st.empty()) return;
std::string Command = string_upper(st[0]);
if("DCC" == Command) {
DoCTCP(theClient, CTCP, "REJECT");
} else if("PING" == Command) {
DoCTCP(theClient, CTCP, Message);
} else if("VERSION" == Command) {
DoCTCP(theClient, CTCP, "GNUWorld ChanFix v0.0.1");
}
}
void chanfix::OnPrivateMessage( iClient *theClient,
const std::string& Message, bool)
{
/* Only speak to opers */
if( ! theClient->isOper() ) return;
StringTokenizer st(Message);
if( st.empty() ) return;
std::string Command = string_upper(st[0]);
commandMapType::iterator commandHandler = commandMap.find(Command);
if( commandHandler == commandMap.end() ) {
Notice(theClient, "Invalid command: %s", Command.c_str());
return;
}
commandHandler->second->Exec(theClient, Message);
}
void chanfix::OnTimer( const TimerHandler::timerID& theTimer , void* _data )
{
xClient::OnTimer( theTimer , _data );
time_t next = ::time(0);
if( theTimer == timerCount ) {
doCountUpdate();
next += confPeriod;
timerCount = MyUplink->RegisterTimer(next, this, 0);
} else {
assert(0);
}
}
} // namespace chanfix
} // namespace gnuworld
+77
View File
@@ -0,0 +1,77 @@
/**
* chanfix.cc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <string>
#include "EConfig.h"
#include "ELog.h"
#include "cfChannel.h"
#include "chanfix.h"
#include "chanfix-commands.h"
namespace gnuworld {
namespace chanfix {
using std::string;
extern "C" {
xClient* _gnuwinit(const string& args) {
return new chanfix( args ) ;
}
}
/** Constructor taking the configuration file as an argument. */
chanfix::chanfix( const string& configFileName )
: xClient( configFileName )
{
/* Get our config */
EConfig *config = new EConfig(configFileName);
assert( config != 0 );
/* Initialise our config variables */
confConsoleChannel = config->Require("consoleChannel")->second;
confConsoleModes = config->Require("consoleModes")->second;
//confLogLevel = atoi(config->Require("logLevel")->second.c_str());
confLogLevel = 255;
confPointsAuth = atoi(config->Require("pointsAuth")->second.c_str());
confMaxPoints = atoi(config->Require("maxPoints")->second.c_str());
confPeriod = atoi(config->Require("period")->second.c_str());
confStartDelay = atoi(config->Require("startDelay")->second.c_str());
/* Register our commands */
RegisterCommand(new CHECKCommand(this, "CHECK", "<#channel>"));
}
/** Destructor doing nothing as we have no heap. */
chanfix::~chanfix()
{
for( mapChannels::iterator itr = channels.begin() ;
itr != channels.end() ;
++itr ) {
delete itr->second;
}
}
} // namespace chanfix
} // namespace gnuworld
+121
View File
@@ -0,0 +1,121 @@
/**
* chanfix.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef CF_CHANFIX_H
#define CF_CHANFIX_H "$Id: chanfix.h,v 1.9 2007/08/28 16:10:08 dan_karrels Exp $"
#include <string>
#include <map>
#include "client.h"
#include "logging.h"
namespace gnuworld {
namespace chanfix {
class cfChannel;
class Command;
class chanfix : public xClient {
public:
/** Constructor taking a configuration filename. */
chanfix( const std::string& );
/** Destructor. */
virtual ~chanfix();
/*************************************
* X C L I E N T F U N C T I O N S *
*************************************/
virtual void OnAttach();
virtual void BurstChannels();
virtual void OnCTCP( iClient* , const std::string& ,
const std::string& , bool );
virtual void OnPrivateMessage( iClient* ,
const std::string& , bool );
virtual void OnTimer( const TimerHandler::timerID& , void* );
/***************************
* C H A N F I X M I S C *
***************************/
virtual void log(const logging::loglevel&, const char*, ... );
virtual void log(const logging::loglevel&, const std::string&);
virtual void setConsoleTopic();
/***************************
* C H A N F I X C O R E *
***************************/
virtual void doCountUpdate();
virtual cfChannel* getChannel(const std::string&,
bool create = false);
protected:
/***********************
* C O N T A I N E R S *
***********************/
typedef std::map< std::string , cfChannel* > mapChannels;
mapChannels channels;
/*************************
* C O N F I G V A R S *
*************************/
/** Name of our console channel. */
std::string confConsoleChannel;
/** Modes of our console channel. */
std::string confConsoleModes;
/** Bitmap of what to log. */
logging::loglevel confLogLevel;
/** Points to award a +r op per period. */
unsigned short confPointsAuth;
/** Maximum points a user can get. */
unsigned int confMaxPoints;
/** Duration of a period in seconds. */
unsigned short confPeriod;
/** Duration to wait between linking and counting. */
unsigned short confStartDelay;
/***************
* T I M E R S *
***************/
/** Counting timer. */
xServer::timerID timerCount;
/*******************
* C O M M A N D S *
*******************/
/** Type of the commandMap. */
typedef std::map< std::string , Command* > commandMapType;
/** Convenience type when creating a new command pair. */
typedef commandMapType::value_type commandPairType;
/** Map holding all available bot commands. */
commandMapType commandMap;
/** Register a command. */
bool RegisterCommand(Command*);
};
} // namespace chanfix
} // namespace gnuworld
#endif
+77
View File
@@ -0,0 +1,77 @@
/**
* cmdCHECK.cc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <string>
#include "StringTokenizer.h"
#include "cfChannel.h"
#include "cfChannelUser.h"
#include "chanfix.h"
#include "chanfix-commands.h"
namespace gnuworld {
namespace chanfix {
void CHECKCommand::Exec( const iClient *theClient,
const std::string& message )
{
StringTokenizer st(message);
/* Usage:
* CHECK #channel
*/
if( st.size() != 2 ) {
Usage(theClient);
return;
}
cfChannel *theChannel = bot->getChannel(st[1], false);
if( ! theChannel ) {
bot->Notice(theClient, "Unable to find channel %s",
st[1].c_str()
);
return;
} else {
bot->Notice(theClient, "Status for %s:",
st[1].c_str()
);
}
for(cfChannel::mapUsersConstIterator itr = theChannel->getUsersBegin() ;
itr != theChannel->getUsersEnd() ;
++itr
) {
cfChannelUser *theCU = itr->second;
bot->Notice(theClient, " %s: %u",
theCU->getName().c_str(),
theCU->getPoints()
);
}
}
} // namespace chanfix
} // namespace gnuworld
+29
View File
@@ -0,0 +1,29 @@
/**
* cmdHELP.cc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include "chanfix.h"
#include "chanfix-commands.h"
namespace gnuworld {
namespace chanfix {
} // namespace chanfix
} // namespace gnuworld
+44
View File
@@ -0,0 +1,44 @@
/**
* logging.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef CF_LOGGING_H
#define CF_LOGGING_H
namespace gnuworld {
namespace chanfix {
namespace logging {
typedef unsigned short loglevel;
const loglevel DEBUG = 0x01 ;
const loglevel INFO = 0x02 ;
const loglevel NOTICE = 0x04 ;
const loglevel WARNING = 0x08 ;
const loglevel ERROR = 0x10 ;
const loglevel CRITICAL = 0x20 ;
} // namespace logging
} // namespace chanfix
} // namespace gnuworld
#endif