./PaxHeaders.23204/libircclient-1.100000644000000000000000000000013213340661224013706 xustar0030 mtime=1535337108.222355054 30 atime=1535337108.210355321 30 ctime=1535337108.222355054 libircclient-1.10/0000755000175000001440000000000013340661224014107 5ustar00timusers00000000000000libircclient-1.10/PaxHeaders.23204/Makefile0000644000000000000000000000012411131775731015274 xustar0027 mtime=1231551449.666432 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/Makefile0000644000175000001440000000103411131775731015552 0ustar00timusers00000000000000# $Id: Makefile 84 2009-01-10 01:37:29Z chromerium $ SUBDIRS = src examples all: for subdir in $(SUBDIRS); do \ $(MAKE) -C $$subdir || exit 1; \ done clean: -for subdir in $(SUBDIRS); do \ $(MAKE) -C $$subdir clean || exit 1; \ done -rm -f core distclean: -for subdir in $(SUBDIRS); do \ $(MAKE) -C $$subdir distclean || exit 1; \ done -rm -f include/config.h config.cache config.status config.log core distro: distclean (cd .. && tar zcf libircclient-1.2.tar.gz libircclient-1.2) install: all -cd src && make install libircclient-1.10/PaxHeaders.23204/doc0000644000000000000000000000013213340661224014316 xustar0030 mtime=1535337108.218355143 30 atime=1535337108.218355143 30 ctime=1535337108.218355143 libircclient-1.10/doc/0000755000175000001440000000000013340661224014654 5ustar00timusers00000000000000libircclient-1.10/doc/PaxHeaders.23204/Makefile0000644000000000000000000000012413340657557016052 xustar0027 mtime=1535336303.948224 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/Makefile0000644000175000001440000001274313340657557016341 0ustar00timusers00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " pdf to make PDF" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Libircclient.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Libircclient.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/Libircclient" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Libircclient" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." pdf: $(SPHINXBUILD) -b rinoh . _build/rinoh info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." libircclient-1.10/doc/PaxHeaders.23204/conf.py0000644000000000000000000000012413340660765015704 xustar0027 mtime=1535336949.461882 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/conf.py0000644000175000001440000002247613340660765016177 0ustar00timusers00000000000000# -*- coding: utf-8 -*- # # Libircclient documentation build configuration file, created by # sphinx-quickstart on Sat Jun 15 22:37:32 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.rinoh.frontend.sphinx extensions = ['sphinx.ext.doctest'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'Libircclient' copyright = u'2005-2016 George Yunaev, http://www.ulduzsoft.com/linux/libircclient/' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '1.9' # The full version, including alpha/beta/rc tags. release = '1.9' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'Libircclientdoc' # -- Options for LaTeX output -------------------------------------------------- #latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '\setcounter{tocdepth}{4}', #} # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). #latex_documents = [ # ('index', 'Libircclient.tex', u'Libircclient Documentation', # u'George Yunaev', 'manual'), #] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'libircclient', u'Libircclient Documentation', [u'George Yunaev'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'Libircclient', u'Libircclient Documentation', u'George Yunaev', 'Libircclient', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # -- Options for Epub output --------------------------------------------------- # Bibliographic Dublin Core info. epub_title = u'Libircclient' epub_author = u'George Yunaev' epub_publisher = u'George Yunaev' epub_copyright = u'2013, George Yunaev' # The language of the text. It defaults to the language option # or en if the language is not set. #epub_language = '' # The scheme of the identifier. Typical schemes are ISBN or URL. #epub_scheme = '' # The unique identifier of the text. This can be a ISBN number # or the project homepage. #epub_identifier = '' # A unique identification for the text. #epub_uid = '' # A tuple containing the cover image and cover page html template filenames. #epub_cover = () # HTML files that should be inserted before the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_pre_files = [] # HTML files shat should be inserted after the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_post_files = [] # A list of files that should not be packed into the epub file. #epub_exclude_files = [] # The depth of the table of contents in toc.ncx. #epub_tocdepth = 3 # Allow duplicate toc entries. #epub_tocdup = True # -- Options for Rhinotype output --------------------------------------------------- rinoh_documents = [('index', # top-level file (index.rst) 'libircclient', # output (target.pdf) 'Libircclient Documentation', # document title 'George Yunaev')] # document author rinoh_paper_size = 'letterpaper' libircclient-1.10/doc/PaxHeaders.23204/make.bat0000644000000000000000000000012412161761242016002 xustar0027 mtime=1372054178.603106 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/make.bat0000644000175000001440000001176412161761242016273 0ustar00timusers00000000000000@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Libircclient.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Libircclient.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) :end libircclient-1.10/doc/PaxHeaders.23204/sources0000644000000000000000000000013213340661224016001 xustar0030 mtime=1535337108.218355143 30 atime=1535337108.218355143 30 ctime=1535337108.218355143 libircclient-1.10/doc/sources/0000755000175000001440000000000013340661224016337 5ustar00timusers00000000000000libircclient-1.10/doc/sources/PaxHeaders.23204/API_reference_constants.rst0000644000000000000000000000012412160506626023337 xustar0027 mtime=1371704726.935131 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/sources/API_reference_constants.rst0000644000175000001440000001266012160506626023624 0ustar00timusers00000000000000 Constants ~~~~~~~~~ This section describes contstants such as options and the error codes. Errors ^^^^^^ .. c:macro:: LIBIRC_ERR_OK (0): No error .. c:macro:: LIBIRC_ERR_INVAL (1): An invalid value was given for one of the arguments to a function. For example, supplying the NULL value as a channel argument of :c:func:`irc_cmd_join` produces this error. .. c:macro:: LIBIRC_ERR_RESOLV (2): The host name supplied for :c:func:`irc_connect` function could not be resolved into valid IP address. .. c:macro:: LIBIRC_ERR_SOCKET (3): The new socket could not be created or made non-blocking. Usually means that the server is out of resources, or (hopefully not) a bug in libircclient. See also :ref:`faq_err_socket` .. c:macro:: LIBIRC_ERR_CONNECT (4): The socket could not connect to the IRC server, or to the destination DCC part. Usually means that either the IRC server is down or its address is invalid. For DCC the reason usually is the firewall on your or destination computer, which refuses DCC transfer. .. c:macro:: LIBIRC_ERR_CLOSED (5): The IRC connection was closed by the IRC server (which could mean that an IRC operator just have banned you from the server - test your client before connecting to a public server), or the DCC connection was closed by remote peer - for example, the other side just terminates the IRC application. Usually it is not an error. .. c:macro:: LIBIRC_ERR_NOMEM (6): There are two possible reasons for this error. First is that memory could not be allocated for libircclient internal use, and this error is usually fatal. Second reason is that the command buffer (which queues the commands ready to be sent to the IRC server) is full, and could not accept more commands yet. In the last case you should just wait, and repeat the command later. .. c:macro:: LIBIRC_ERR_ACCEPT (7): A DCC chat/send connection from the remote peer could not be accepted. Either the connection was just terminated before it is accepted, or there is a bug in libircclient. .. c:macro:: LIBIRC_ERR_NODCCSEND (9): A filename supplied to :c:func:`irc_dcc_sendfile` could not be sent. Either is is not a regular file (a directory or a socket, for example), or it could not be read. See also :c:macro:`LIBIRC_ERR_OPENFILE` .. c:macro:: LIBIRC_ERR_READ (10): Either a DCC file could not be read (for example, was truncated during sending), or a DCC socket returns a read error, which usually means that the network connection is terminated. .. c:macro:: LIBIRC_ERR_WRITE (11): Either a DCC file could not be written (for example, there is no free space on disk), or a DCC socket returns a write error, which usually means that the network connection is terminated. .. c:macro:: LIBIRC_ERR_STATE (12): The function is called when it is not allowed to be called. For example, :c:func:`irc_cmd_join` was called before the connection to IRC server succeed, and :c:member:`event_connect` is called. .. c:macro:: LIBIRC_ERR_TIMEOUT (13): The DCC request is timed out. There is a timer for each DCC request, which tracks connecting, accepting and non-accepted/declined DCC requests. For every request this timer is currently set to 60 seconds. If the DCC request was not connected, accepted or declined during this time, it will be terminated with this error. .. c:macro:: LIBIRC_ERR_OPENFILE (14): The file specified in :c:func:`irc_dcc_sendfile` could not be opened. .. c:macro:: LIBIRC_ERR_TERMINATED (15): The connection to the IRC server was terminated. .. c:macro:: LIBIRC_ERR_NOIPV6 (16): The function which requires IPv6 support was called, but the IPv6 support was not compiled into the application .. c:macro:: LIBIRC_ERR_SSL_NOT_SUPPORTED (17): The SSL connection was required but the library was not compiled with SSL support .. c:macro:: LIBIRC_ERR_SSL_INIT_FAILED (18): The SSL library could not be initialized. .. c:macro:: LIBIRC_ERR_CONNECT_SSL_FAILED (19): SSL handshare failed when attempting to connect to the server. Typically this means you're trying to use SSL but attempting to connect to a non-SSL port. .. c:macro:: LIBIRC_ERR_SSL_CERT_VERIFY_FAILED (20): The server is using an invalid or the self-signed certificate. Use :c:macro:`LIBIRC_OPTION_SSL_NO_VERIFY` option to connect to it. .. _api_options: Options ^^^^^^^ .. c:macro:: LIBIRC_OPTION_DEBUG If set, enables additional debug output which goes to STDOUT. .. c:macro:: LIBIRC_OPTION_STRIPNICKS If set, strips the event origins automatically. Every event has an origin (i.e. who originated the event). The origin usually looks like *nick!host@ircserver*, i.e. like *tim!home@irc.server.net*. Such origins can not be used in IRC commands, and need to be stripped (i.e. host and server part should be cut off) before using. This can be done either manually by calling :c:func:`irc_target_get_nick`, or automatically for all the events if this option is set. .. c:macro:: LIBIRC_OPTION_SSL_NO_VERIFY By default the SSL connection is authenticated by verifying that the certificate presented by the server is signed by a known trusted certificate authority. Since those typically cost money, some IRC servers use the self-signed certificates. They provide the benefits of the SSL connection but since they are not signed by the Certificate Authority, their authencity cannot be verified. This option, if set, disables the certificate verification - the library will accept any certificate presented by the server. This option must be set before the :c:macro:`irc_connect` function is called. libircclient-1.10/doc/sources/PaxHeaders.23204/Appendix_FAQ.rst0000644000000000000000000000012412160534560021051 xustar0027 mtime=1371715952.398579 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/sources/Appendix_FAQ.rst0000644000175000001440000001510012160534560021326 0ustar00timusers00000000000000 Frequently asked questions ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. _faq_err_socket: Why do I get a LIBIRC_ERR_SOCKET error under Win32 when using a static library? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Because on Win32 you have to initialize the Winsock API before using it: .. sourcecode:: c WSADATA wsaData; if ( WSAStartup ( MAKEWORD (2, 2), &wsaData) != 0 ) // report an error // Now you can use libircclient You have to do it ONCE in your application, and since libircclient does not know whether you already initialized it or not, it does not contain any Winsock initialization code. What does it mean that the IRC protocol is event-based? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The IRC protocol itself is asynchronous and server-driven. For you, this means the following: - For any IRC command, it is not possible to obtain an immediate response whether the command succeed or not. Instead the server will send the reply in a short (or long) period of time. - For some IRC command there is no ‘success’ response at all. For example, when you send a text message, IRC server will not send anything to confirm that the message is already sent. - You can send several commands to the IRC server, and then receive several replies regarding every command. The order of the replies you receive is generally undefined. - A lot of IRC events sent to you is generated by other users, or the IRC server itself, and are sent to you just when they are generated. - Long lists (for example, channel lists) are also sent as events. Moreover, these events could be separated by other events (message or notices). And it is your responsibility to separate the data (using event codes), and use some sort of data structure that will hold it until the data is complete. It is not possible to simply query the list of channels, and expect that its content will immediately arrive. - You may send the request, and not receive a response in case of success (such as when you send a message). You may send the request and it will only succeed when you receive a response (which may be after you receive ten more unrelated events). Or you can receive a response without even sending a request, as it is the case with JOIN - it is possible for the server to JOIN you to a specific channel implicitly. - You should be prepared to expect the unexpected from the IRC server. For example, the server can change your nick (seen on most servers, which use nickserv authentication. You can be “forced” to join the channel, to say something, to leave a channel, to change your usermode and so on. Listen what IRC server tells you, and do so. Why the irc_cmd_join function does not return an error? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A typical example is the :c:func:`irc_cmd_join` call always returns success even when you attempt to join a password-protected channel. Then some time later the IRC server returns an error. This is because the irc_cmd family of functions return success when the command is sent to the IRC server. The asynchronous nature of IRC makes it impossible to obtain the command result immediately. Please read the question above. How to register/auth with NICKSERV? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There is no ‘standard’ way. NICKSERV, CHANSERV and so on are not specified by the RFC. They are IRC extensions which behave exactly like the other IRC users but with more power. Typically their messages are sent via Notice events, so you can use following algorithm to handle Nickserv registration: .. sourcecode:: c static void event_notice (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { char buf[256]; if ( !origin ) return; if ( strcasecmp (origin, "nickserv") ) return; if ( strstr (params[1], "This nick is not registered") == params[1] ) { sprintf (buf, "REGISTER %s NOMAIL", gCfg.irc_nickserv_password); irc_cmd_msg(session, "nickserv", buf); } else if ( strstr (params[1], "This nickname is registered and protected") == params[1] ) { sprintf (buf, "IDENTIFY %s", gCfg.irc_nickserv_password); irc_cmd_msg(session, "nickserv", buf); } else if ( strstr (params[1], "Password accepted - you are now recognized") == params[1] ) printf ("Nickserv authentication succeed."); } The idea is to parse the messages sent from NICKSERV, and if they’re matched the specific patterns, react on them appropriately. What is CTCP? ^^^^^^^^^^^^^ CTCP abbreviature is deciphered as “Client-to-Client Protocol”. It is used between the IRC clients to query the remote client for some data, or to send some information – for example, /me messages are sent via CTCP. There is no standard list of possible CTCP requests, and different IRC clients often add their own CTCP codes. The built-in handler reacts on TIME, VERSION, PING and FINGER CTCP queries. If you need to react on other requests, you’ll have to write your own CTCP handler. See the source code of libirc_event_ctcp_internal function to get an idea how to write it. When I am made a chanop (+o) why do I not receive the event_umode? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Becoming a channel operator channes the **channel mode**, not user mode. Therefore you will receive :c:member:`event_mode` and not :c:member:`event_umode` If you receive the event_umode with +o this means your user is an IRC server operator. .. _faq_epoll: What if my application uses epoll? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The library only directly supports the select()-based loops for historic reasons, so epoll and other polling methods are not supported directly by the library. However but if necessart, it could be emulated by converting descriptors between select and epoll as following: * Call irc_add_select_descriptors with an empty FD_SET * Extract the descriptors from the fd_set arrays (remember fd_array is a bitarray, not the value array). There may be more than one descriptor in case there are DCC sessions. * Pass those descriptors to poll/epoll using relevant events (i.e. use the EPOLLIN for the descriptors in the *in_set*) * For those descriptors which triggered the events, fill up the relevant in_set and out_set structures (again, remember the bitmasks!) and pass them to :c:func:`irc_process_select_descriptors` While this is cumbersome, the operations are very simple (basically bitmask operations on a small structure) and will not add any significant slowdown to your application. libircclient-1.10/doc/sources/PaxHeaders.23204/API_reference_functions.rst0000644000000000000000000000012412160774652023341 xustar0027 mtime=1371797930.914264 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/sources/API_reference_functions.rst0000644000175000001440000025173112160774652023632 0ustar00timusers00000000000000 Functions ~~~~~~~~~ This section describes the functions defined in the library which are grouped by the purpose. Library initialization and shutdown ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ irc_create_session ****************** **Prototype:** .. c:function:: irc_session_t * irc_create_session( irc_callbacks_t * callbacks ) **Parameters:** +---------------------------------------------------------------------------------------------------------------------------------------+ | *callbacks* | Event callbacks structure, which defines several callbacks, which will be called on appropriate events. Cannot be NULL. | +---------------------------------------------------------------------------------------------------------------------------------------+ **Description:** Creates and initiates a new IRC session. Every session represents a single user connection to a single IRC server, and possibly to one or more users via DCC. Almost every library function requires this object to be passed to, and therefore this function should be called first. Multiple sessions could be allocated to support multiple connections. When it is not needed anymore, the session must be destroyed by calling the :c:func:`irc_destroy_session` function. **Return value:** An :c:type:`irc_session_t` object, or 0 if creation failed. Usually, failure is caused by out of memory error. **Thread safety:** This function can be called simultaneously from multiple threads. Same callback structure may be reused by multiple threads. irc_destroy_session ******************* **Prototype:** .. c:function:: void irc_destroy_session (irc_session_t * session) **Parameters:** +---------------------------------------------------------------------------------------------------------------------------------------+ | *session* | The IRC session handle | +---------------------------------------------------------------------------------------------------------------------------------------+ **Description:** This function destroys an IRC session, closes the connection to the IRC server, and frees all the used resources. After calling this function you should not use this session object anymore. **Thread safety:** This function can be called simultaneously from multiple threads. Connecting, disconnecting and running the main event loop ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ irc_connect6 ************ **Prototype:** .. c:function:: int irc_connect6 (irc_session_t * session, const char * server, unsigned short port, const char * password, const char * nick, const char * username, const char * realname) irc_connect *********** **Prototype:** .. c:function:: int irc_connect (irc_session_t * session, const char * server, unsigned short port, const char * password, const char * nick, const char * username, const char * realname) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *server* | IP address or the host name of the server. If prefixed with #, the library will try to establish the SSL connection | | | IPv4 address should be in numeric form such as 154.23.112.33; IPv6 address should be in IPv6 form | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *port* | Port number to connect to, usually 6667 | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *password* | IRC server password, if the server requires it. May be NULL, in this case password will not be send to the IRC | | | server. Vast majority of IRC servers do not require passwords. This is NOT NickServ/ChanServ password | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | Nick which will be used to log into the IRC server. Cannot be NULL | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *username* | Username of the Unix account which is used to connect to the IRC server. This is for information only, will be shown in | | | "user properties" dialogs and returned by /whois request. Can be NULL in which case "nobody" would be used | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *realname* | A real name of the person, who connects to the IRC. In reality nobody uses this field for that. Instead this field is | | | used as user self-description, advertising, or other purposes. This information also will be shown in "user properties" | | | dialogs and returned by /whois request. May be NULL, in this case "noname" will be used | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function initiates the connection to the IPv4 (irc_connect) or IPv6 (irc_connect6) IRC server. The server could be specified either by an IP address or by the DNS name. The irc_connect6 works only if the library was built with the IPv6 support. If the library was built with the OpenSSL support, and the IP address or the host name is prefixed by a hash, such as ``"#irc.example.com"``, the library attempts to establish the SSL connection. The connection is established asynchronously, and the :c:member:`event_connect` is called once the connection is established. A single IRC session object can only be connected to a single IRC server and only with a single nick, meaning it is not possible to have multiple nicks sharing a single connection. **Return value:** Returns 0 if the connection is initiated successfully. This doesn't mean the connection is established - the :c:member:`event_connect` is called when it happens. If the connection cannot be established, either :c:func:`irc_run` or :c:func:`irc_process_select_descriptors` will return an error. **Thread safety:** This function can be called simultaneously from multiple threads, but not using the same session object. irc_disconnect ************** **Prototype:** .. c:function:: void irc_disconnect (irc_session_t * session) **Parameters:** +---------------------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +---------------------------------------------------------------------------------------------------------------------------------------+ **Description:** This function closes the IRC connection. After that connection is closed, if the libirc was looped in the :c:func:`irc_run` loop, it automatically leaves the loop and :c:func:`irc_run` returns. **Thread safety:** This function can be called simultaneously from multiple threads, but not using the same session object. irc_is_connected **************** **Prototype:** .. c:function:: int irc_is_connected (irc_session_t * session) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Return value:** This function returns 1 if the connection to the IRC server is established or 0 if it is not. **Thread safety:** This function can be called simultaneously from multiple threads. irc_run ******* **Prototype:** .. c:function:: int irc_run (irc_session_t * session) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function enters into forever loop, processing the IRC events, and calling the relevant callbacks. This function will not return until the server connection is terminated - either by server, or by calling :c:type:`irc_cmd_quit`. This function should only be used if you use a single IRC session and don't need asynchronous request processing (i.e. your bot just reacts on the events, and doesn't generate it asynchronously). Even in last case, you still can call this function and start the asynchronous thread in :c:member:`event_connect` handler. See the examples. **Return value:** This function returns a nonzero value if the connection to the IRC server could not be established, or was terminated. **Thread safety:** This function cannot be called from multiple threads. Use :c:func:`irc_add_select_descriptors` and :c:func:`irc_process_select_descriptors` instead. irc_add_select_descriptors ************************** **Prototype:** .. c:function:: int irc_add_select_descriptors (irc_session_t * session, fd_set *in_set, fd_set *out_set, int * maxfd) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *in_set* | fd_set input descriptor set for select() | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *out_set* | fd_set output descriptor set for select() | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *maxfd* | Largest descriptor already in all the sets. Will be updated if libirc adds larger number to the FD_SET array | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function should be used after you called :c:func:`irc_connect`. It is useful when you have your own select-based event processing loop. To use it you should put your own descriptors into the sets, call this function to add the library descriptor(s) into the set, and then call select(). When it returns, you should call :c:func:`irc_process_select_descriptors` which will handle the events and calls your callbacks(!). Then you can process your sockets events from set. See the example. What if you use epoll? :ref:`See the FAQ ` **Return value:** This function returns a nonzero value if the :c:func:`irc_connect` was not called before calling this function. **Thread safety:** This function can be called simultaneously from multiple threads, but it rarely makes sense. irc_process_select_descriptors ****************************** **Prototype:** .. c:function:: int irc_process_select_descriptors (irc_session_t * session, fd_set *in_set, fd_set *out_set) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *in_set* | fd_set input descriptor set for select() | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *out_set* | fd_set output descriptor set for select() | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function should be used in pair with :c:func:`irc_add_select_descriptors` function, which documentation describes how they work together. Note that while processing the events this function calls your callbacks and it will not return until all your callbacks return. Keep that in mind if you pop up a dialog in your application, such as a DCC CHAT or DCC SEND confirmation dialog. **Return value:** Return code 0 means success. Other value means error, the error code may be obtained through irc_errno(). **Thread safety:** This function can be called simultaneously from multiple threads for different IRC session objects only. Managing the IRC channels: joining, leaving, inviting ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ irc_cmd_join ************ **Prototype:** .. c:function:: int irc_cmd_join (irc_session_t * session, const char * channel, const char * key) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *channel* | Channel name to join. Cannot be NULL. | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *key* | Secret key for the channel. Can be NULL if not needed | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** Use this function to join the new IRC channel. If the channel does not exist, it will be automatically created by the IRC server. Note that to JOIN the password-protected channel, you must know the password, and specify it in the key argument. If join is successful, the :c:member:`event_join` will be called (with your nick as the origin), then typically the :c:member:`event_topic` is be called and then you receive the list of users who are on the channel (by using LIBIRC_RFC_RPL_NAMREPLY), which will include the user who just joined. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_BANNEDFROMCHAN - LIBIRC_RFC_ERR_INVITEONLYCHAN - LIBIRC_RFC_ERR_BADCHANNELKEY - LIBIRC_RFC_ERR_CHANNELISFULL - LIBIRC_RFC_ERR_BADCHANMASK - LIBIRC_RFC_ERR_NOSUCHCHANNEL - LIBIRC_RFC_ERR_TOOMANYCHANNELS **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_part ************ **Prototype:** .. c:function:: int irc_cmd_part (irc_session_t * session, const char * channel) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *channel* | Channel name to leave. Cannot be NULL. | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** Use this function to leave the IRC channel you've already joined to. An attempt to leave the channel you aren't in results a LIBIRC_RFC_ERR_NOTONCHANNEL server error. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NOSUCHCHANNEL - LIBIRC_RFC_ERR_NOTONCHANNEL **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_invite ************** **Prototype:** .. c:function:: int irc_cmd_invite (irc_session_t * session, const char * nick, const char * channel) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | Nick name of the user to invite | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *channel* | Channel name to join. Cannot be NULL | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to invite someone to invite-only channel. "Invite-only" is a channel mode, which restricts anyone, except invided, to join this channel. After invitation, the user could join this channel. The user, who is invited, will receive the :c:member:`event_invite` event. Note that you must be a channel operator to invite the users. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. On success one of the following replies returned: - LIBIRC_RFC_RPL_INVITING - LIBIRC_RFC_RPL_AWAY Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NEEDMOREPARAMS - LIBIRC_RFC_ERR_NOSUCHNICK - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_ERR_USERONCHANNEL - LIBIRC_RFC_ERR_ERR_CHANOPRIVSNEEDED **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_names ************* **Prototype:** .. c:function:: int irc_cmd_names (irc_session_t * session, const char * channel); **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *channel* | A channel name(s) to obtain user list. Multiple channel names must be separated by a comma | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to to ask the IRC server for the list of the users who are joined the specified channel. You can list all nicknames that are visible to you on any channel that you can see. The list of users will be returned using LIBIRC_RFC_RPL_NAMREPLY and LIBIRC_RFC_RPL_ENDOFNAMES numeric codes. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. The channel names are returned by :c:member:`event_numeric` event using the following reply codes: - LIBIRC_RFC_RPL_NAMREPLY - LIBIRC_RFC_RPL_ENDOFNAMES **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_list ************ **Prototype:** .. c:function:: int irc_cmd_list (irc_session_t * session, const char * channel) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *channel* | A channel name(s) to list. Multiple channel names must be separated by a comma. If NULL, all channels are listed | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to ask the IRC server for the active (existing) channels list. The list will be returned using the LIBIRC_RFC_RPL_LISTSTART, multiple LIBIRC_RFC_RPL_LIST, and LIBIRC_RFC_RPL_LISTEND event sequence. Note that "private" channels are listed (without their topics) as channel "Prv" unless the client generating the LIST query is actually on that channel. Likewise, secret channels are not listed at all unless the client is active at the channel in question. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. The list of channels is returned by :c:member:`event_numeric` event using the following reply codes: - LIBIRC_RFC_RPL_LISTSTART - LIBIRC_RFC_RPL_LISTEND - LIBIRC_RFC_RPL_LIST **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_topic ************* **Prototype:** .. c:function:: int irc_cmd_topic (irc_session_t * session, const char * channel, const char * topic) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *channel* | A channel name | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *topic* | A new channel topic. If NULL, the old topic would be returned and nothing would change. To set the empty topic use "" | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to change or view the topic (title) of a channel. Note that depending on *+t* channel mode, you may be required to be a channel operator to change the channel topic. If the command succeeds, the IRC server will generate a LIBIRC_RFC_RPL_NOTOPIC or LIBIRC_RFC_RPL_TOPIC message, containing either the old or changed topic. Also the IRC server can (but does not have to) generate the non-RFC LIBIRC_RFC_RPL_TOPIC_EXTRA message, containing the nick of person who changed the topic, and the date/time of the last change. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. The topic information is returned using one of following reply codes: - LIBIRC_RFC_RPL_NOTOPIC - LIBIRC_RFC_RPL_TOPIC If the topic change was requested and it was successfully changed, the :c:member:`event_topic` is generated as well. Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NEEDMOREPARAMS - LIBIRC_RFC_ERR_CHANOPRIVSNEEDED - LIBIRC_RFC_ERR_NOTONCHANNEL **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_channel_mode ******************** **Prototype:** .. c:function:: int irc_cmd_channel_mode (irc_session_t * session, const char * channel, const char * mode) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *channel* | A channel name | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *mode* | A mode to change. If NULL, the channel mode is not changed but the old mode is returned | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to is used to change or view the channel modes. Note that only the channel operators can change the channel mode. Channel mode is represended by the multiple letters combination. Every letter has its own meaning in channel modes. Most channel mode letters are boolean (i.e. could only be set or reset), but a few channel mode letters accept a parameter. All channel options are set by adding a plus sign before the letter, and reset by adding a minus sign before the letter. Here is the list of 'standard' channel modes: +-------------+-------------------------------------------------------------------------------------------------------------------------+ | o nickname | gives (+o nickname) to, or takes (-o nickname) the channel operator privileges from a *nickname*. This mode affects | | | the users in channel, not the channel itself. Examples: "+o tim", "-o watson" | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | p | sets (+p) or resets (-p) private channel flag. Private channels are shown in channel list as 'Prv', without the topic | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | s | sets (+s) or resets (-s) secret channel flag. Secret channels aren't shown in channel list at all | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | i | sets (+i) or resets (-i) invite-only channel flag. When the flag is set, only the people who are invited by the | | | :c:func:`irc_cmd_invite` can join this channel | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | t | allows (+t) or denies (-t) changing the topic by the non-channel operator users. When the flag is set, only the channel | | | operators can change the channel topic | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | n | sets (+n) or resets (-n) the protection from the users who did not join the channel. When the +n mode is set, only the | | | users who have joined the channel can send the messages to the channel | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | m | sets (+m) or resets (-m) the moderation of the channel. When the moderation mode is set, only channel operators and the | | | users who have +v user mode can speak in the channel | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | v nickname | gives (+v nick) or takes (-v nick) from user the ability to speak on a moderated channel. Examples: "+v bob", "-v joy" | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | l number | sets (+l 20) or removes (-l) the restriction of maximum number of users allowed in channel. When the restriction is set | | | and there is a number of users in the channel, no one can join the channel anymore | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | k key | sets (+k password) or removes (-k) the password from the channel. When the restriction is set, any user joining the | | | channel required to provide a channel key | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | b mask | sets (+b *!*@*.mil) or removes (-b *!*@*.mil) the ban mask on a user to keep him out of channel. Note that to remove the| | | ban you must specify the ban mask to remove, not just "-b". | +-------------+-------------------------------------------------------------------------------------------------------------------------+ Note that the actual list of channel modes depends on the IRC server, and can be bigger. If you know the popular channel modes which aren't listed here - please contact me **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. The old mode information is returned by using following numeric codes: - LIBIRC_RFC_RPL_CHANNELMODEIS - LIBIRC_RFC_RPL_BANLIST - LIBIRC_RFC_RPL_ENDOFBANLIST Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NEEDMOREPARAMS - LIBIRC_RFC_ERR_CHANOPRIVSNEEDED - LIBIRC_RFC_ERR_NOSUCHNICK - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_KEYSET - LIBIRC_RFC_ERR_UNKNOWNMODE - LIBIRC_RFC_ERR_NOSUCHCHANNEL **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_user_mode ***************** **Prototype:** .. c:function:: int irc_cmd_user_mode (irc_session_t * session, const char * mode) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *mode* | A mode to change. If NULL, the user mode is not changed but the old mode is returned | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to change or view the user modes. Note that, unlike channel modes, some user modes cannot be changed at all. User mode is represended by the letters combination. All the user mode letters are boolean (i.e. could only be set or reset), they are set by adding a plus sign before the letter, and reset by adding a minus sign before the letter. Here is the list of 'standard' user modes: +---+-----------------------------------------------------------------------------------------------------------------------------------+ | o | represents an IRC operator status. Could not be set directly (but can be reset though), to set it use the IRC \a OPER command | +---+-----------------------------------------------------------------------------------------------------------------------------------+ | i | if set, marks a user as 'invisible' - that is, not seen by lookups if the user is not in a channel | +---+-----------------------------------------------------------------------------------------------------------------------------------+ | w | if set, marks a user as 'receiving wallops' - special messages generated by IRC operators using WALLOPS command | +---+-----------------------------------------------------------------------------------------------------------------------------------+ | s | if set, marks a user for receipt of server notices | +---+-----------------------------------------------------------------------------------------------------------------------------------+ | r | NON-STANDARD MODE. If set, user has been authenticated with the NickServ IRC service | +---+-----------------------------------------------------------------------------------------------------------------------------------+ | x | NON-STANDARD MODE. If set, user's real IP is masked by the IRC server | +---+-----------------------------------------------------------------------------------------------------------------------------------+ Note that the actual list of user modes depends on the IRC server, and can be bigger. If you know the popular user modes, which aren't mentioned here - please contact me. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. The old mode information is returned by using the numeric code LIBIRC_RFC_RPL_UMODEIS: Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NEEDMOREPARAMS - LIBIRC_RFC_ERR_NOSUCHNICK - LIBIRC_RFC_ERR_UNKNOWNMODE - LIBIRC_RFC_ERR_USERSDONTMATCH - LIBIRC_RFC_ERR_UMODEUNKNOWNFLAG **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_kick ************ **Prototype:** .. c:function:: int irc_cmd_kick (irc_session_t * session, const char * nick, const char * channel, const char * reason); **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | The nick to kick | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *channel* | The channel to kick the nick from | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | If not NULL, the reason to kick the user | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to kick a person out of channel. Note that you must be a channel operator to kick anyone from a channel. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. If the command succeed, the :c:member:`event_kick` will be generated. If the command failed, one of the following :c:member:`event_numeric` responses will be generated: - LIBIRC_RFC_ERR_NEEDMOREPARAMS - LIBIRC_RFC_ERR_BADCHANMASK - LIBIRC_RFC_ERR_NOSUCHCHANNEL - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_CHANOPRIVSNEEDED **Thread safety:** This function can be called simultaneously from multiple threads. Sending the messages, notices, /me messages and working with CTCP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ irc_cmd_msg *********** **Prototype:** .. c:function:: int irc_cmd_msg (irc_session_t * session, const char * nch, const char * text) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nch* | Target nick or target channel | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *text* | Message text | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to send the message to the channel or privately to another nick. "Privately" here means the message is not posted to the public, but the message still goes through the IRC server and could be seen by the IRC netwrk operators. The message target is determined by the *nch* argument: if it is a nick, this will be a private message, but if it is a channel name it will be posted into the channel. The protocol does not require you to join the channel to post the message into it, but most channels set the channel mode preventing you from posting into a channel unless you join it. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed. You need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. If the command succeed, no event is typically generated except the possibility of LIBIRC_RFC_RPL_AWAY. However if the command failed, one of the following numeric events may be generated: - LIBIRC_RFC_ERR_NORECIPIENT - LIBIRC_RFC_ERR_NOTEXTTOSEND - LIBIRC_RFC_ERR_CANNOTSENDTOCHAN - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_NOTOPLEVEL - LIBIRC_RFC_ERR_WILDTOPLEVEL - LIBIRC_RFC_ERR_TOOMANYTARGETS - LIBIRC_RFC_ERR_NOSUCHNICK **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_me ********** **Prototype:** .. c:function:: int irc_cmd_me (irc_session_t * session, const char * nch, const char * text) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nch* | Target nick or target channel | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *text* | Message text | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to send the /me message (CTCP ACTION) to the channel or privately to another nick. "Privately" here means the message is not posted to the public, but the message still goes through the IRC server and could be seen by the IRC netwrk operators. The message target is determined by the *nch* argument: if it is a nick, this will be a private message, but if it is a channel name it will be posted into the channel. The protocol does not require you to join the channel to post the message into it, but most channels set the channel mode preventing you from posting into a channel unless you join it. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed. You need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. If the command succeed, no event is typically generated except the possibility of LIBIRC_RFC_RPL_AWAY. However if the command failed, one of the following numeric events may be generated: - LIBIRC_RFC_ERR_NORECIPIENT - LIBIRC_RFC_ERR_NOTEXTTOSEND - LIBIRC_RFC_ERR_CANNOTSENDTOCHAN - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_NOTOPLEVEL - LIBIRC_RFC_ERR_WILDTOPLEVEL - LIBIRC_RFC_ERR_TOOMANYTARGETS - LIBIRC_RFC_ERR_NOSUCHNICK **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_notice ************** **Prototype:** .. c:function:: int irc_cmd_notice (irc_session_t * session, const char * nch, const char * text) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nch* | Target nick or target channel | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *text* | Message text | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to send the notice to the channel or privately to another nick. "Privately" here means the message is not posted to the public, but the message still goes through the IRC server and could be seen by the IRC netwrk operators. The message target is determined by the *nch* argument: if it is a nick, this will be a private message, but if it is a channel name it will be posted into the channel. The protocol does not require you to join the channel to post the notice into it, but most channels set the channel mode preventing you from posting into a channel unless you join it. The only difference between a message and a notice is that the RFC explicitly says the automatic bots must not reply to NOTICE automatically. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. If the command succeed, no event is typically generated except the possibility of LIBIRC_RFC_RPL_AWAY. However if the command failed, one of the following numeric events may be generated: - LIBIRC_RFC_ERR_NORECIPIENT - LIBIRC_RFC_ERR_NOTEXTTOSEND - LIBIRC_RFC_ERR_CANNOTSENDTOCHAN - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_NOTOPLEVEL - LIBIRC_RFC_ERR_WILDTOPLEVEL - LIBIRC_RFC_ERR_TOOMANYTARGETS - LIBIRC_RFC_ERR_NOSUCHNICK **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_ctcp_request ******************** **Prototype:** .. c:function:: int irc_cmd_ctcp_request (irc_session_t * session, const char * nick, const char * request) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | Target nick | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *request* | CTCP request tex | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to send a CTCP request. There are four CTCP requests supported by most IRC clients: * VERSION - get the client software name and version * FINGER - get the client username, host and real name. * PING - get the client delay. * TIME - get the client local time. Some clients may support other requests. The RFC does not list the requests and does not mandate any CTCP support. If you send the CTCP request, make sure you define the handler for the :c:member:`event_ctcp_rep` to process the reply; **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NORECIPIENT - LIBIRC_RFC_ERR_NOTEXTTOSEND - LIBIRC_RFC_ERR_CANNOTSENDTOCHAN - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_NOTOPLEVEL - LIBIRC_RFC_ERR_WILDTOPLEVEL - LIBIRC_RFC_ERR_TOOMANYTARGETS - LIBIRC_RFC_ERR_NOSUCHNICK **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_ctcp_reply ****************** **Prototype:** .. c:function:: int irc_cmd_ctcp_reply (irc_session_t * session, const char * nick, const char * reply) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | Target nick | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *reply* | CTCP reply | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to send a reply to the CTCP request received from :c:member:`event_ctcp_req` event. Note that you will not receive this event unless you specify your own handler during the IRC session initialization. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NORECIPIENT - LIBIRC_RFC_ERR_NOTEXTTOSEND - LIBIRC_RFC_ERR_CANNOTSENDTOCHAN - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_NOTOPLEVEL - LIBIRC_RFC_ERR_WILDTOPLEVEL - LIBIRC_RFC_ERR_TOOMANYTARGETS - LIBIRC_RFC_ERR_NOSUCHNICK **Thread safety:** This function can be called simultaneously from multiple threads. Miscellaneous: library version, raw data, changing nick, quitting ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ irc_cmd_nick ************ **Prototype:** .. c:function:: int irc_cmd_nick (irc_session_t * session, const char * newnick) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | New nick | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to change your current nick to another nick. Note that such a change is not always possible; for example you cannot change nick to the existing nick, or (on some servers) to the registered nick. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. If the operation succeed, the server will send the :c:member:`event_nick` event. If not, it will send a numeric error. Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NONICKNAMEGIVEN - LIBIRC_RFC_ERR_ERRONEUSNICKNAME - LIBIRC_RFC_ERR_NICKNAMEINUSE - LIBIRC_RFC_ERR_NICKCOLLISION **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_whois ************* **Prototype:** .. c:function:: int irc_cmd_whois (irc_session_t * session, const char * nick) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | Nick or comma-separated list of nicks to query the information about | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function queries various information about the nick. The amount of information depends on the IRC server but typically includes username, real name (as defined by the client at login), the IRC server used, the channels user is in, idle time, away mode and so on. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate :c:member:`event_numeric` event. If the request succeed, the information is returned through the following numeric codes which return the information: - LIBIRC_RFC_RPL_WHOISUSER - LIBIRC_RFC_RPL_WHOISCHANNELS - LIBIRC_RFC_RPL_WHOISSERVER - LIBIRC_RFC_RPL_AWAY - LIBIRC_RFC_RPL_WHOISOPERATOR - LIBIRC_RFC_RPL_WHOISIDLE - LIBIRC_RFC_RPL_ENDOFWHOIS - this event terminates the WHOIS information Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NOSUCHSERVER - LIBIRC_RFC_ERR_NOSUCHNICK - LIBIRC_RFC_ERR_NONICKNAMEGIVEN **Thread safety:** This function can be called simultaneously from multiple threads. irc_cmd_quit ************ **Prototype:** .. c:function:: int irc_cmd_quit (irc_session_t * session, const char * reason) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *reason* | If not NULL, the reason to quit | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function sends the QUIT command to the IRC server. This command forces the IRC server to close the IRC connection, and terminate the session. The difference between this command and calling the irc_disconnect is that this command allows to specify the reason to quit which will be shown to all the users in the channels you joined. Also it would make it clear that you left the IRC channels by purpose, and not merely got disconnected. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. **Thread safety:** This function can be called simultaneously from multiple threads. irc_send_raw ************ **Prototype:** .. c:function:: int irc_send_raw (irc_session_t * session, const char * format, ...); **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *format* | printf-type formatting string followed by the format arguments | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function sends the raw data as-is to the IRC server. Use it to generate a server command, which is not (yet) provided by libircclient directly. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. **Thread safety:** This function can be called simultaneously from multiple threads. irc_target_get_nick ******************* **Prototype:** .. c:function:: void irc_target_get_nick (const char * origin, char *nick, size_t size) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *origin* | Nick in the common IRC server format such as tim!root\@mycomain.com | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | Buffer to retrieve the parsed nick name | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *size* | Size of the *nick* buffer. If the parsed nick is larger than the buffer size it will be truncated | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** For most events IRC server returns 'origin' (i.e. the person, who generated this event) in so-called "common" form, like nick!host@domain. However, all the irc_cmd_* functions require just a nick. This function parses this origin, and retrieves the nick, storing it into the user-provided buffer. A buffer of size 128 should be enough for most nicks. **Thread safety:** This function can be called simultaneously from multiple threads. irc_target_get_host ******************* **Prototype:** .. c:function:: void irc_target_get_host (const char * target, char *host, size_t size) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *origin* | Nick in the common IRC server format such as tim!root\@mycomain.com | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *host* | Buffer to retrieve the parsed hostname | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *size* | Size of the *host* buffer. If the parsed nick is larger than the buffer size it will be truncated | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** For most events IRC server returns 'origin' (i.e. the person, who generated this event) in so-called "common" form, like nick!host\@domain. This function parses this origin, and retrieves the host, storing it into the user-provided buffer. **Thread safety:** This function can be called simultaneously from multiple threads. DCC initiating and accepting chat sessions, sending and receiving files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ irc_dcc_chat ************ **Prototype:** .. c:function:: int irc_dcc_chat(irc_session_t * session, void * ctx, const char * nick, irc_dcc_callback_t callback, irc_dcc_t * dccid) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *ctx* | User-defined context which will be passed to the callback. May be NULL | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | Target nick | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *callback* | DCC callback which will be used for DCC and chat events | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *dccid* | If this function succeeds, the DCC session identifier is stored in this field | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function requests a DCC CHAT between you and other IRC user. DCC CHAT is like private chat, but it goes directly between two users, and bypasses the IRC server. DCC CHAT request must be accepted by other side before you can send anything. When the chat is accepted, declined, terminated, or some data is received, the *callback* function is called. To be specific, the callback will be called when: * The chat request is accepted; * The chat request is denied; * The new chat message is received; * The chat is terminated by the remote party; See the details in :c:type:`irc_dcc_callback_t` declaration. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NORECIPIENT - LIBIRC_RFC_ERR_NOTEXTTOSEND - LIBIRC_RFC_ERR_CANNOTSENDTOCHAN - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_NOTOPLEVEL - LIBIRC_RFC_ERR_WILDTOPLEVEL - LIBIRC_RFC_ERR_TOOMANYTARGETS - LIBIRC_RFC_ERR_NOSUCHNICK **Thread safety:** This function can be called simultaneously from multiple threads. irc_dcc_msg *********** **Prototype:** .. c:function:: int irc_dcc_msg (irc_session_t * session, irc_dcc_t dccid, const char * text) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *dccid* | DCC session identifier for the DCC CHAT session which is active | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *text* | NULL-terminated message to send | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function is used to send the DCC CHAT message to an active DCC CHAT. To be active, DCC CHAT request must be initiated by one side and accepted by another side. **Return value:** Return code 0 means success. Other value means error, the error code may be obtained through irc_errno(). **Thread safety:** This function can be called simultaneously from multiple threads. irc_dcc_accept ************** **Prototype:** .. c:function:: int irc_dcc_accept (irc_session_t * session, irc_dcc_t dccid, void * ctx, irc_dcc_callback_t callback) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *dccid* | DCC session identifier returned by the callback | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *ctx* | User-defined context which will be passed to the callback. May be NULL | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *callback* | DCC callback which will be used for DCC and chat events | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function accepts a remote DCC chat or file transfer request. After the request is accepted the *callback* will be called for the further DCC events, including the termination of the DCC session. See the :c:type:`DCC callback information `. This function should be called only after either :c:member:`event_dcc_chat_req` or :c:member:`event_dcc_send_req` events are received. You don't have to call irc_dcc_accept() or irc_dcc_decline() immediately in the event processing function - you may just store the *dccid* and return, and call those functions later. However to prevent memory leaks you must call either irc_dcc_decline() or irc_dcc_accept() for any incoming DCC request within 60 seconds after receiving it. **Return value:** Return code 0 means success. Other value means error, the error code may be obtained through :c:func:`irc_errno`. **Thread safety:** This function can be called simultaneously from multiple threads. irc_dcc_decline *************** **Prototype:** .. c:function:: int irc_dcc_decline (irc_session_t * session, irc_dcc_t dccid) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *dccid* | DCC session identifier returned by the callback | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function declines a remote DCC chat or file transfer request. This function should be called only after either :c:member:`event_dcc_chat_req` or :c:member:`event_dcc_send_req` events are received. You don't have to call irc_dcc_accept() or irc_dcc_decline() immediately in the event processing function - you may just store the *dccid* and return, and call those functions later. However to prevent memory leaks you must call either irc_dcc_decline() or irc_dcc_accept() for any incoming DCC request within 60 seconds after receiving it. Do not use this function to forecefully close the previously accepted or initiated DCC session. Use :c:func:`irc_dcc_destroy` instead. **Return value:** Return code 0 means success. Other value means error, the error code may be obtained through :c:func:`irc_errno`. **Thread safety:** This function can be called simultaneously from multiple threads. irc_dcc_sendfile **************** **Prototype:** .. c:function:: int irc_dcc_sendfile (irc_session_t * session, void * ctx, const char * nick, const char * filename, irc_dcc_callback_t callback, irc_dcc_t * dccid) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *ctx* | User-defined context which will be passed to the callback. May be NULL | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *nick* | Target nick | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *filename* | Full path to the file which will be sent. Must be an existing file | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *callback* | DCC callback which will be used for DCC and chat events | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *dccid* | If this function succeeds, the DCC session identifier is stored in this field | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function generates a DCC SEND request to send the file. When it is accepted, the file is sent to the remote party, and the DCC session is closed. The send operation progress and result can be checked in the callback. See the :c:type:`DCC callback information `. **Return value:** Return code 0 means the command was sent to the IRC server successfully. This does not mean the operation succeed, and you need to wait for the appropriate event or for the error code via :c:member:`event_numeric` event. Possible error responces for this command from the RFC1459: - LIBIRC_RFC_ERR_NORECIPIENT - LIBIRC_RFC_ERR_NOTEXTTOSEND - LIBIRC_RFC_ERR_CANNOTSENDTOCHAN - LIBIRC_RFC_ERR_NOTONCHANNEL - LIBIRC_RFC_ERR_NOTOPLEVEL - LIBIRC_RFC_ERR_WILDTOPLEVEL - LIBIRC_RFC_ERR_TOOMANYTARGETS - LIBIRC_RFC_ERR_NOSUCHNICK **Thread safety:** This function can be called simultaneously from multiple threads. irc_dcc_destroy *************** **Prototype:** .. c:function:: int irc_dcc_destroy (irc_session_t * session, irc_dcc_t dccid) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *dccid* | DCC session identifier of a session to destroy | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function closes the DCC connection (if available), and destroys the DCC session, freeing the used resources. It can be called anytime, even from callbacks or from different threads. Note that when DCC session is finished (either with success or failure), you should not destroy it - it will be destroyed automatically. **Return value:** Return code 0 means success. Other value means error, the error code may be obtained through :c:func:`irc_errno`. **Thread safety:** This function can be called simultaneously from multiple threads. Handling the colored messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ irc_color_strip_from_mirc ************************* **Prototype:** .. c:function:: char * irc_color_strip_from_mirc (const char * message) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *message* | Original message with colors | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function strips all the ANSI color codes from the message, and returns a new message with no color information. Useful for the bots which react to strings, to make sure the bot is not confused if the string uses colors. This function does not modify the message which doesn't use colors. **Return value:** Returns a new message with stripped color codes. Note that the memory for the new message is allocated using malloc(), so you should free it using free() when it is not used anymore. If memory allocation failed, returns 0. **Thread safety:** This function can be called simultaneously from multiple threads. irc_color_convert_from_mirc *************************** **Prototype:** .. c:function:: char * irc_color_convert_from_mirc (const char * message) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *message* | Original message with colors | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function converts all the color codes and format options to libircclient internal colors. **Return value:** Returns a pointer to the new message with converted ANSI color codes and format options. See the irc_color_convert_to_mirc_ help for details. Note that the memory for the new message is allocated using malloc(), so you should free it using free() when it is not used anymore. If memory allocation failed, returns 0. **Thread safety:** This function can be called simultaneously from multiple threads. irc_color_convert_to_mirc ************************* **Prototype:** .. c:function:: char * irc_color_convert_to_mirc (const char * message) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *message* | Original message with colors | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function converts all the color codes and format options from internal libircclient colors to ANSI used by mIRC and other IRC clients. **Return value:** Returns a new message with converted color codes and format options, or 0 if memory could not be allocated. Note that the memory for the new message is allocated using malloc(), so you should free it using free() when it is not used anymore. **Thread safety:** This function can be called simultaneously from multiple threads. The color system of libircclient is designed to be easy to use, and portable between different IRC clients. Every color or format option is described using plain text commands written between square brackets. The possible codes are: - [B] ... [/B] - bold format mode. Everything between [B] and [/B] is written in **bold**. - [I] ... [/I] - italic/reverse format mode. Everything between [I] and [/I] is written in *italic*, or reversed (however, because some clients are incapable of rendering italic text, most clients display this as normal text with the background and foreground colors swapped). - [U] ... [/U] - underline format mode. Everything between [U] and [/U] is written underlined. - [COLOR=RED] ... [/COLOR] - write the text using specified foreground color. The color is set by using the COLOR keyword, and equal sign followed by text color code (see below). - [COLOR=RED/BLUE] ... [/COLOR] - write the text using specified foreground and background color. The color is set by using the COLOR keyword, an equal sign followed by text foreground color code, a dash and a text background color code. The following colors are supported: - WHITE - BLACK - DARKBLUE - DARKGREEN - RED - BROWN - PURPLE - OLIVE - YELLOW - GREEN - TEAL - CYAN - BLUE - MAGENTA - DARKGRAY - LIGHTGRAY Examples of color sequences: :: Hello, [B]Tim[/B]. [U]Arsenal[/U] got a [COLOR=RED]red card[/COLOR] The tree[U]s[/U] are [COLOR=GREEN/BLACK]green[/COLOR] Changing the library options ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ irc_get_version *************** **Prototype:** .. c:function:: void irc_get_version (unsigned int * high, unsigned int * low) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *high* | Stores the high version number | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *low* | Stores the low version number | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function returns the libircclient version. You can use the version either to check whether required options are available, or to output the version. The preferred printf-like format string to output the version is: ``printf ("Version: %d.%02d", high, low);`` **Thread safety:** This function can be called simultaneously from multiple threads. irc_set_ctx *********** **Prototype:** .. c:function:: void irc_set_ctx (irc_session_t * session, void * ctx) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *ctx* | User-defined context | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function sets the user-defined context for this IRC session. This context is not used by libircclient. Its purpose is to store session-specific user data, which may be obtained later by calling irc_get_ctx_. Note that libircclient just carries out this pointer. If you allocate some memory, and store its address in ctx (most common usage), it is your responsibility to free it before calling :c:func:`irc_destroy_session`. **Thread safety:** This function can be called simultaneously from multiple threads. irc_get_ctx *********** **Prototype:** .. c:function:: void * irc_get_ctx (irc_session_t * session) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function returns the IRC session context, which was set by irc_set_ctx_. **Return value:** If no context was set, this function returns NULL. **Thread safety:** This function can be called simultaneously from multiple threads. irc_option_set ************** **Prototype:** .. c:function:: void irc_option_set (irc_session_t * session, unsigned int option) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *option* | One of the :ref:`Libirc options ` to set | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function sets the libircclient option, changing libircclient behavior. See the :ref:`options ` list for the meaning for every option. **Thread safety:** This function can be called simultaneously from multiple threads. irc_option_reset **************** **Prototype:** .. c:function:: void irc_option_reset (irc_session_t * session, unsigned int option) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *option* | One of the :ref:`Libirc options ` to set | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function resets the libircclient option, changing libircclient behavior. See the :ref:`options ` list for the meaning for every option. **Thread safety:** This function can be called simultaneously from multiple threads. Handling the errors ^^^^^^^^^^^^^^^^^^^ irc_errno ********* **Prototype:** .. c:function:: int irc_errno (irc_session_t * session) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session handle | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function returns the last error code associated with last operation of this IRC session. Possible error codes are defined in libirc_errors.h As usual, typical errno rules apply: - irc_errno() should be called ONLY if the called function fails; - irc_errno() doesn't return 0 if function succeed; actually, the return value will be undefined. - you should call irc_errno() IMMEDIATELY after function fails, before calling any other libircclient function. **Return value:** The error code. **Thread safety:** This function can be called simultaneously from multiple threads. Local error code is per IRC context, not per thread. irc_strerror ************ **Prototype:** .. c:function:: const char * irc_strerror (int ircerrno) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------+ | *ircerrno* | IRC error code returned by :c:func:`irc_errno` | +-------------+-------------------------------------------------------------------------------------------------------------------------+ **Description:** This function returns the text representation of the given error code. **Return value:** Returns an internal English string with a short description of the error code. **Thread safety:** This function can be called simultaneously from multiple threads. libircclient-1.10/doc/sources/PaxHeaders.23204/Appendix_LGPL.rst0000644000000000000000000000012412160506626021202 xustar0027 mtime=1371704726.935131 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/sources/Appendix_LGPL.rst0000644000175000001440000001646212160506626021473 0ustar00timusers00000000000000 GNU LESSER GENERAL PUBLIC LICENSE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License. “The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”. The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser 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 Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. libircclient-1.10/doc/sources/PaxHeaders.23204/API_reference_callbacks.rst0000644000000000000000000000012412160774652023250 xustar0027 mtime=1371797930.914264 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/sources/API_reference_callbacks.rst0000644000175000001440000003622312160774652023536 0ustar00timusers00000000000000 Callbacks ~~~~~~~~~ This section describes the callbacks supported by the library. irc_event_callback_t ^^^^^^^^^^^^^^^^^^^^ **Prototype:** .. c:type:: typedef void (*irc_event_callback_t) (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *session* | The IRC session, which generated the event | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *event* | The text name of the event. Useful in case a single event handler is used to handle multiple events | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *origin* | The originator of the event. Depends on the event. | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *params* | Extra parameters, if any, for this event. The number of extra parameters depends on the event, and may be zero. | | | Each parameter is a NULL-terminated text string. None of the params can be NULL, but the *params* pointer itself could be NULL for some events. | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *count* | The number of entries in the *params* argument supplied. | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ **Description:** Every IRC event generates a callback. This type of callback is universal and is used by almost all IRC events. Depending on the event nature, it can have zero or more parameters. For each type of event, the number of provided parameters is fixed, and their meaning is described in the :c:type:`irc_callbacks_t` structure. Every event has an origin (i.e. who originated the event). In some cases the *origin* variable may be NULL, which indicates that event origin is unknown. The origin usually looks like *nick!host@ircserver*, i.e. like *tim!home@irc.server.net*. Such origins can not be used in IRC commands, and need to be stripped (i.e. host and server part should be cut off) before using. This can be done either manually, by calling :c:func:`irc_target_get_nick`, or automatically for all the events - by setting the :c:macro:`LIBIRC_OPTION_STRIPNICKS` option with :c:func:`irc_option_set`. irc_event_dcc_chat_t ^^^^^^^^^^^^^^^^^^^^ **Prototype:** .. c:type:: typedef void (*irc_event_dcc_chat_t) (irc_session_t * session, const char * nick, const char * addr, irc_dcc_t dccid) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *session* | IRC session, which generates an event (the one returned by irc_create_session) | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *nick* | User who requested the chat | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *addr* | IP address of the person such as 189.12.34.56 | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *dccid* | Identifier associated with this request which should be passed to the :c:func:`irc_dcc_accept` / :c:func:`irc_dcc_decline` functions | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ **Description:** This callback is called when someone requests DCC CHAT with you. DCC CHAT is the type of chat which goes directly between the clients, instead of going through the IRC server. Since the TCP connection must be established for it to happen, typically the initiator must either have the public IP or special software on the firewall which handles the necessary port forwarding. You must respond to the chat request either by calling :c:func:`irc_dcc_accept` to accept it, or by calling :c:func:`irc_dcc_decline` to decline it. irc_event_dcc_send_t ^^^^^^^^^^^^^^^^^^^^ **Prototype:** .. c:type:: typedef void (*irc_event_dcc_send_t) (irc_session_t * session, const char * nick, const char * addr, const char * filename, unsigned long size, irc_dcc_t dccid) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *session* | The IRC session, which generates an event (the one returned by irc_create_session) | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *nick* | The user who requested the chat | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *addr* | The IP address of the person such as 189.12.34.56 | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *filename* | The name of the file the user is trying to send you | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *size* | The size of the file | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *dccid* | Identifier associated with this request which should be passed to the :c:func:`irc_dcc_accept` / :c:func:`irc_dcc_decline` functions | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ **Description:** This callback is called when someone wants to send you a file by using DCC SEND. DCC SEND goes directly between the clients, and requires the TCP connection to be established established for it to happen. Therefore the initiator must either have the public IP or special software on the firewall which handles the necessary port forwarding. You must respond to the chat request either by calling :c:func:`irc_dcc_accept` to accept it, or by calling :c:func:`irc_dcc_decline` to decline it. irc_dcc_callback_t ^^^^^^^^^^^^^^^^^^ **Prototype:** .. c:type:: typedef void (*irc_dcc_callback_t) (irc_session_t * session, irc_dcc_t id, int status, void * ctx, const char * data, unsigned int length) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *session* | The IRC session, which generates an event (the one returned by irc_create_session) | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *id* | The DCC session id | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *status* | The DCC connection status. 0 means there is no error, otherwise contains an error code | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *ctx* | The user-provided context | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *data* | Data received (if available), otherwise NULL | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *length* | Size of the data received if any data | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ **Description:** This callback is called for all DCC functions when state change occurs. For DCC CHAT, the callback is called as following: * *status* is :c:macro:`LIBIRC_ERR_CLOSED`: connection is closed by remote peer. After returning from the callback, the DCC session is automatically destroyed * *status* is nonzero but not :c:macro:`LIBIRC_ERR_CLOSED`: socket I/O error (connect error, accept error, recv error, send error). After returning from the callback, the DCC session is automatically destroyed * *status* is zero and *length* is zero: the remote side accepted the chat request * *status* is zero and *length* is nonzero: new chat message received, *data* contains the message (a null-terminated string), *length* contains the string length without null terminator For DCC SEND, while file is being sent, the callback is called as following: * *status* is nonzero: socket I/O error (connect error, accept error, recv error, send error). After returning from the callback, the DCC session is automatically destroyed * *status* is zero: another data packet has been sent, *length* contains the total amount of data sent so far, *data* is NULL For DCC RECV, while file is being sending, callback called as following: * *status* is nonzero: socket I/O error (connect error, accept error, recv error, send error). After returning from the callback, the DCC session is automatically destroyed. * *status* is zero, and *data* is NULL: the file has been received successfully. After returning from the callback, the DCC session is automatically destroyed. * *status* is zero, and *data* is not NULL: new data received, *data* contains the data received, *length* contains the amount of data received. irc_eventcode_callback_t ^^^^^^^^^^^^^^^^^^^^^^^^ **Prototype:** .. c:type:: typedef void (*irc_eventcode_callback_t) (irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count) **Parameters:** +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *session* | The IRC session, which generates an event (the one returned by irc_create_session) | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *event* | The numeric code of the event. Useful in case a single event handler is used to handle multiple events | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *origin* | The originator of the event. Depends on the event. | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *params* | Extra parameters, if any, for this event. The number of extra parameters depends on the event, and may be zero. | | | Each parameter is a NULL-terminated text string. None of the params can be NULL, but the *params* pointer itself could be NULL for some events. | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | *count* | The number of entries in the *params* argument supplied. | +-------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ **Description:** This is an advanced callback for those who want to handle events deeper. Most times the IRC server replies to your actions with numeric events. Most of those events are error codes, and some are list-start and list-stop markers. Every code has its own set of params; for details you can either experiment, or read RFC 1459 (don't expect servers to follow it closely though). Every event has an origin (i.e. who originated the event). In some cases the *origin* variable may be NULL, which indicates that event origin is unknown. The origin usually looks like *nick!host@ircserver*, i.e. like *tim!home@irc.server.net*. Such origins can not be used in IRC commands, and need to be stripped (i.e. host and server part should be cut off) before using. This can be done either manually, by calling :c:func:`irc_target_get_nick`, or automatically for all the events - by setting the :c:macro:`LIBIRC_OPTION_STRIPNICKS` option with :c:func:`irc_option_set`. libircclient-1.10/doc/sources/PaxHeaders.23204/Writing_code.rst0000644000000000000000000000012412160774652021237 xustar0027 mtime=1371797930.914264 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/sources/Writing_code.rst0000644000175000001440000005771712160774652021540 0ustar00timusers00000000000000===================== Integration ===================== Requirements ~~~~~~~~~~~~ Supported operating systems and compilers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The library has been extensively tested on Linux x86 and x86_64. It has also been tested on Solaris x86, Linux on ARM and Linux on MIPS platforms, on Mac OS X on x86 and on various versions of Microsoft Windows. Compilation ^^^^^^^^^^^ On Linux, FreeBSD and Mac OS X the library has to be compiled and installed before use unless you use a precompiled package provided by your operating system distribution. If it is provided, you are recommended to use it as it would be updated from the central repository when the bugs are fixed. On Microsoft Windows the official library binaries are provided, so you do not have to build it. Unless you have experience building with Cygwin, you're advised not to build from source and use the official binary. Required libraries ****************** The library depends only on libc (glibc-devel on Linux) and gcc, although the examples require also libstdc++ (libstdc++-devel) and g++. Minimum supported version is glibc 2.2, although if IPv6 is requested, at least glibc 2.4 is required. If the library is built with SSL support, the openssl development package (openssl-devel) needs to be installed. On Microsoft Windows the Cygwin with necessary development packages must be installed (and openssl-devel as well). Compiling ********* The library is configured and built the standard Unix way: :: ./configure [--enable-openssl] [--enable-ipv6] make Installing ********** Although no install is necessary to use the libraries, the install target is provided for convenience and could be invoked via ``sudo make install`` Linking ^^^^^^^ Link your application with either libircclient.a or libircclient.so depending on your needs. If you use the system-provided library, please link with libircclient.so. If you have built the library with SSL support, you will need to link with OpenSSL libraries; add ``-lcrypto -lssl`` to your LDFLAGS On Microsoft Windows please link with libircclient.lib which implicitly links with libircclient.dll Coding ~~~~~~ Initialization ^^^^^^^^^^^^^^ Include the headers ******************* Before using the library you need to include the library header *libircclient.h*. You may also want to include *libirc_rfcnumeric.h* which provides the RFC codes: .. sourcecode:: c #include "libircclient.h" #include "libirc_rfcnumeric.h" Create event handlers ********************* Unlike most network protocols such as HTTP or SMTP, the IRC protocol is event-based. The events come from server asynchronously. Some events are triggered by your action (such as joining the channel or changing your nick), some are triggered by other IRC users (such as sending you a message), and some are triggered by the IRC server itself (such as sending operation notes or invoking NickServ services). Libircclient helps handling those events by providing the :c:type:`event handling structure `. It declares the events you can define in your application, and when such event is received from the server, the appropriate callback will be called. The number of events you need to handle depending on the complexity of your client and the functionality it supports. Generally there are only two events you must handle to provide a bare minimum functionality: :c:member:`event_connect` and :c:member:`event_numeric`. However it is recommended to create an event dump function and use it for all unused events to make sure you do not miss an important event because you expected a wrong one. See function **dump_event** in the file examples/irctest.c Windows-specific initialization ******************************* If you link with the **static** library on Microsoft Windows, you need to initialize the Winsock2 library before calling the library functions. It could be done by following: .. sourcecode:: c WSADATA wsaData; if ( WSAStartup ( MAKEWORD (2, 2), &wsaData) != 0 ) // report an error However if you link with the **dynamic** library (libircclient.dll) which is default if you use the official build, this is not needed because the DLL initializes it automatically on load. Create an IRC session ********************* To use the library at least one :c:type:`IRC session ` needs to be created. One session could be used to establish a single connection to one IRC server for one nick. However more than one session could be created if needed. To create a session, call the :c:func:`irc_create_session` function: .. sourcecode:: c // The IRC callbacks structure irc_callbacks_t callbacks; // Init it memset ( &callbacks, 0, sizeof(callbacks) ); // Set up the mandatory events callbacks.event_connect = event_connect; callbacks.event_numeric = event_numeric; // Set up the rest of events // Now create the session irc_session_t * session = irc_create_session( &callbacks ); if ( !session ) // Handle the error This code could be repeated as many times as needed to create multiple sessions. The same callback structure could be reused for multiple sessions. Set options *********** Besides debugging there are two options you may need to use. The :c:macro:`LIBIRC_OPTION_STRIPNICKS` enables automatic parsing of nicknames, and since it is hard to imagine the case when it should not be enabled, we enable it: .. sourcecode:: c irc_option_set( session, LIBIRC_OPTION_STRIPNICKS ); The second option you may need if you use SSL connections and plan to connect to the servers which use self-signed certificates. See the documentation for :c:macro:`LIBIRC_OPTION_SSL_NO_VERIFY` Connect to the server ********************* To initiate the connection to the IRC server, call the :c:func:`irc_connect` function: .. sourcecode:: c // Connect to a regular IRC server if ( irc_connect (session, "irc.example.com", 6667, 0, "mynick", "myusername", "myrealname" ) ) // Handle the error: irc_strerror() and irc_errno() To initiate the connection to the IRC server over SSL, call the :c:func:`irc_connect` function and prefix the host name or IP address with a hash symbol: .. sourcecode:: c // Connect to the SSL server; #192.168.1.1 is also possible if ( irc_connect (session, "#irc.example.com", 6669, 0, "mynick", "myusername", "myrealname" ) ) // Handle the error: irc_strerror() and irc_errno() This function only initiates the connection, so when it successfully returns the connection is only initiated, but not established yet. Then one of the following happens after you invoke the networking handler: - If the connection is established, you will receive the :c:member:`event_connect` - this is why it is important to handle it - If the connection failed, the networking handler function will return failure Connect to the IPv6 server ************************** To initiate the connection to the IPv6 server, call the :c:func:`irc_connect6` function: .. sourcecode:: c if ( irc_connect6 (session, "2001:0db8:85a3:0042:1000:8a2e:0370:7334", 6669, 0, "mynick", "myusername", "myrealname" ) ) // Handle the error: irc_strerror() and irc_errno() The rest of the details, including the return value and the SSL are the same as with regular connect. Start the networking loop ************************* To let the library handle the events, there are two scenarios. You can either invoke the built-in networking loop which will handle the networking and call your events, or you can write your own loop. Invoking the build-in networking loop is simpler but limited. Since it loops until the connection terminates, it is not an option for a GUI application (unless you start the loop in a separate thread which you can do). And since this loop only can handle one session, it is impossible to use it if you want to handle multiple IRC sessions. In those cases the custom networking loop, described below, should be used. To start the event loop call the :c:func:`irc_run` function: .. sourcecode:: c if ( irc_run (s) ) // Either the connection to the server could not be established or terminated. See irc_errno() Remember that irc_run() call **will not return** until the server connection is not active anymore. Use the custom networking loop ****************************** If you use multiple sessions or have your own socket handler, you can use the custom networking loop. In this case your application must be select()-based (:ref:`see the FAQ ` if you want to use other polling methods). And you need to run the following loop: .. sourcecode:: c // Make sure that all the IRC sessions are connected if ( !irc_is_connected(session) ) // reconnect it, or abort // Create the structures for select() struct timeval tv; fd_set in_set, out_set; int maxfd = 0; // Wait 0.25 sec for the events - you can wait longer if you want to, but the library has internal timeouts // so it needs to be called periodically even if there are no network events tv.tv_usec = 250000; tv.tv_sec = 0; // Initialize the sets FD_ZERO (&in_set); FD_ZERO (&out_set); // Add your own descriptors you need to wait for, if any ... // Add the IRC session descriptors - call irc_add_select_descriptors() for each active session irc_add_select_descriptors( session, &in_set, &out_set, &maxfd ); // Call select() if ( select (maxfd + 1, &in_set, &out_set, 0, &tv) < 0 ) // Error // You may also check if any descriptor is active, but again the library needs to handle internal timeouts, // so you need to call irc_process_select_descriptors() for each session at least once in a few seconds ... // Call irc_process_select_descriptors() for each session with the descriptor set if ( irc_process_select_descriptors (session, &in_set, &out_set) ) // The connection failed, or the server disconnected. Handle it. // Do it again Channels and users ^^^^^^^^^^^^^^^^^^ Before calling any of those functions make sure you have connected to the server. Join and leave a channel ************************ To join the channel call the :c:func:`irc_cmd_join` function with the channel name: .. sourcecode:: c // Join the channel #linux if ( irc_cmd_join( session, "#linux", 0 ) ) // most likely connection error // Join the channel $science protected by the secret key *superpassword* if ( irc_cmd_join( session, "$science", "superpassword" ) ) // most likely connection error You can join as many channels as you want, although the serer may restrict the number of channels you can join simultaneously. If the join was successful you will receive the :c:member:`event_join` event. You need to wait for this event before you can perform any channel operations (such as sending the messages). However you do NOT have to wait for this event to issue a second JOIN command as shown in the example above. If the join was not successful, you will receive the error via :c:member:`event_numeric`. To leave the channel call the :c:func:`irc_cmd_part` function with the channel name: .. sourcecode:: c // Leave the channel #linux if ( irc_cmd_part( session, "#linux" ) ) // most likely connection error // Leave the channel $science if ( irc_cmd_part( session, "$science" ) ) // most likely connection error Send a message to a channel or to a user **************************************** After you have joined the channel, you can send a message to the channel by using the :c:func:`irc_cmd_msg` function with the channel name: .. sourcecode:: c // Say "Hi!" to everyone in the channel #linux if ( irc_cmd_msg( session, "#linux", "Hi!" ) ) // most likely connection error Technically the protocol does not require one to join the channel to send the messages into the channel. However most servers by default set the channel mode which prevents the users who did not join the channel from sending the message into the channel. Same function is used to send a "private" message to another user. The "private" messages do not go through the channels, but they still go through the IRC server (sometime multiple servers) and can be seen or even logged by the IRC network operators. .. sourcecode:: c // Say "Hi!" to IRC user john if ( irc_cmd_msg( session, "john", "Hi!" ) ) // most likely connection error If the message was sent successfully you will not receive any confirmation or event. You will only receive the error via :c:member:`event_numeric` if the message was not sent. Receive messages from a channel or from a user ********************************************** You receive the channel messages by handling the :c:member:`event_channel`. Each time someone says something in the channel this event is called. You receive the "private" messages from other users by handling the :c:member:`event_privmsg`. Those event handlers should be created in your application and passed to the library when you `create an IRC session`_ Send an action message ********************** "Action" messages, also called /me messages, are specially formatted CTCP messages. However the library contains a special function to send them, :c:func:`irc_cmd_me`. Actions sent by other people are handled by the :c:member:`event_ctcp_action` event. Same as with sending messages no confirmation is received on success. Send a CTCP request ******************* Other CTCP requests such as PING, VERSION etc should be sent by calling :c:func:`irc_cmd_ctcp_request`. If the CTCP response is received, it is handled by the :c:member:`event_ctcp_rep` event. Handling DCC chat ^^^^^^^^^^^^^^^^^ Implementing the DCC callback ***************************** No matter whether you plan to initiate DCC chats or respond to them you must implement the :c:type:`DCC callback `: .. sourcecode:: c void dcc_callback (irc_session_t * session, irc_dcc_t id, int status, void * ctx, const char * data, unsigned int length) { if ( status ) { // If status is LIBIRC_ERR_CLOSED, the chat has been closed by the remote party. // Otherwise it is an error; the CHAT either terminated or could not be established. status is the error code; see irc_strerror(status) } else if ( length == 0 ) { // The remote side has accepted the chat request, send "hello" something to them irc_dcc_text( session, id, "Hello!" ); } else { // We have received the chat message from the remote party printf ("Remote party said: %s\n", data ); } } This callback should be passed to either :c:func:`irc_dcc_chat` function which initiates the request, or to :c:func:`irc_dcc_accept` function which accepts the DCC CHAT request initiated by another user. Initiating the DCC CHAT *********************** You can initiate the DCC chat with another user by calling :c:func:`irc_dcc_chat`: .. sourcecode:: c // The DCC chat session id will be returned in this variable irc_dcc_t dccid; // Initiate the DCC chat with the IRC user "john" if ( irc_dcc_chat( session, 0, "john", dcc_callback, &dccid ) ) // report error Now you can proceed with other tasks. When John accepts or declines the chat, the dcc_callback() will be called, and it will be possible to use the :c:func:`irc_dcc_text` function to send the chat messages. The callback will also be called each time a new chat message is received, or when the chat is finished or terminated because of network error. Responding to DCC CHAT requests ******************************* To respond to the DCC CHAT equests your application should implement for the :c:member:`event_dcc_chat_req` event. The callback could be implemented as following: .. sourcecode:: c void callback_event_dcc_chat( irc_session_t * session, const char * nick, const char * addr, irc_dcc_t dccid ) { // User 'nick' from the IP address 'addr' tries to initiate the DCC chat with us. // Store this information in the application internal queue together with the dccid so the callback can return dcc_queue.store( dccid, "CHAT from " + nick + " IP address: " + addr ); } and registered when the IRC session is created. If your application does not handle DCC at all you can just call the :c:func:`irc_dcc_decline` function inside the callback. If it does, we only store this information in the callback, and return. This is because the event processing will stop until the callback returns, so popping up the dialog asking for the user confirmation would stop further events such as channel messages from being processed. Even if your application is automatic and doesn't pop up dialogs it is still better to separate the chat logic from the callback logic. Somewhere later the application would check the queue in the GUI thread, get this information, and pop up the dialog asking the user feedback. Then if the chat request was accepted, the application would call the :c:func:`irc_dcc_accept` function, and if it was declined, the application would call the :c:func:`irc_dcc_decline` function. Both functions will accept the *dccid* which identifies this specific request: .. sourcecode:: c // Somewhere in the GUI thread if ( !dcc_queue.empty() ) { // Get the DCC information and show the dialog to the user irc_dcc_t dccid = dcc_chat_queue.top().dccid; ... // React to the user entry if ( dialog.isAccepted() ) irc_dcc_accept( session, dccid, 0, dcc_callback ); else irc_dcc_decline( session, dccid ); } Send CHAT messages ****************** Once the chat session is established, you can send the chat messages using :c:func:`irc_dcc_text` function. Note that you need to pass the dcc session id instead of nick: .. sourcecode:: c irc_dcc_text( session, dccid, "Hello there!" ); Handling DCC file transfer ^^^^^^^^^^^^^^^^^^^^^^^^^^ This section covers handling sending and receiving files via DCC. Implementing the callback ************************* No matter whether you plan to send or receive files via dcc you must implement the :c:type:`DCC callback `. While the same callback may be used both for sending and receiving, this is not recommended since the logic is different. Therefore the suggested implementation would be to use different callbacks as suggested: .. sourcecode:: c // This callback is used when we send a file to the remote party void callback_dcc_send_file (irc_session_t * session, irc_dcc_t id, int status, void * ctx, const char * data, unsigned int length) { if ( status ) { // It is an error; the send operation was either terminated or the connection could not be established. status is the error code; see irc_strerror(status) } else { // We have sent some data to the remote party, 'length' indicates how much data was sent printf ("Sent bytes: %d\n", length ); } } // This callback is used when we receive a file from the remote party void callback_dcc_recv_file (irc_session_t * session, irc_dcc_t id, int status, void * ctx, const char * data, unsigned int length) { if ( status ) { // It is an error; the send operation was either terminated or the connection could not be established. status is the error code; see irc_strerror(status) } else if ( data == 0 ) { // File transfer has been finished printf ("File has been received successfully\n" ); } else { // More file content has been received. Store it in memory, write to disk or something printf ("Received %d bytes of data\n", length ); } } This callback should be passed to either :c:func:`irc_dcc_sendfile` function which initiates the request, or to :c:func:`irc_dcc_accept` function which accepts the DCC RECVFILE request initiated by another user. Sending the file via DCC ************************ You can initiate sending the file via DCC to another user by calling :c:func:`irc_dcc_sendfile`: .. sourcecode:: c // The DCC session id will be returned in this variable irc_dcc_t dccid; // Initiate sending of file "/etc/passwd" via DCC chat to the IRC user "john" if ( irc_dcc_sendfile( session, 0, "john", "/etc/passwd", callback_dcc_send_file, &dccid ) ) // report error Now you can proceed with other tasks. When John accepts the request, the file will be sent and callback_dcc_send_file() will be called each time a piece of file is sent. The callback will also be called when the file has been sent, or when sending was terminated because of network error. Receive a file via DCC ********************** To receive the file via DCC a remote user must initiate the DCC request to send you a file. To receive this request your application should implement the :c:member:`event_dcc_send_req` event. The callback could be implemented as following: .. sourcecode:: c void callback_event_dcc_file( irc_session_t * session, const char * nick, const char * addr, const char * filename, unsigned long size, irc_dcc_t dccid ) { // User 'nick' from the IP address 'addr' tries to initiate the DCC chat with us. // Store this information in the application internal queue together with the dccid so the callback can return dcc_queue.store( dccid, "CHAT from " + nick + " IP address: " + addr + ", filename " + filename ); } If your application does not handle DCC at all you can just call the :c:func:`irc_dcc_decline` function inside the callback. If it does, we only store this information in the callback, and return. This is because the event processing will stop until the callback returns, so popping up the dialog asking for the user confirmation would stop further events such as channel messages from being processed. Even if your application is automatic and doesn't pop up dialogs it is still better to separate the chat logic from the callback logic. Somewhere later the application would check the queue in the GUI thread, get this information, and pop up the dialog asking the user feedback. Then if the chat request was accepted, the application would call the :c:func:`irc_dcc_accept` function, and if it was declined, the application would call the :c:func:`irc_dcc_decline` function. Both functions will accept the *dccid* which identifies this specific request: .. sourcecode:: c // Somewhere in the GUI thread if ( !dcc_queue.empty() ) { // Get the DCC information and show the dialog to the user irc_dcc_t dccid = dcc_chat_queue.top().dccid; ... // React to the user entry if ( dialog.isAccepted() ) irc_dcc_accept( session, dccid, 0, dcc_callback ); else irc_dcc_decline( session, dccid ); } Note that it is not possible to request a remote user to send you a file. Handling colors ^^^^^^^^^^^^^^^ .. _color_stripping: Stripping colors from the message ********************************* If your bot reacts on the text messages, you need to strip down the colors from the text messages before processing them. Otherwise the user sending the colored message won't get the same reaction as the user who doesn't use colors, and some users use colors by default. Use the :c:func:`irc_color_strip_from_mirc` function to strip the ANSI colors from the text message. It does not modify the message which doesn't use colors. Color conversion **************** The library supports color translation, and can convert colors between the ANSI colors used by the IRC clients and their textual representation. Colors usage is typically limited to the messages and user specified reasons. You cannot use colors as part of your nick or channel name. Use the :c:func:`irc_color_convert_from_mirc` function to convert colors from ANSI to the library textual representation, and :c:func:`irc_color_convert_to_mirc` to convert the library textual representation of colors into ANSI. Do not forget to free() the returned pointer once it is not used anymore. Miscellaneous ^^^^^^^^^^^^^ Tracking user nicks ******************* If your application maintains some user-specific quotas, it is important to track the nick changes. Since the nick is the only identifier available to you, each time the user changes the nick you need to update your quota database. To do so you need to intercept the :c:member:`event_nick` event. See the examples/censor.c for details. libircclient-1.10/doc/sources/PaxHeaders.23204/Introduction.rst0000644000000000000000000000012412712252212021265 xustar0027 mtime=1462326410.688766 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/sources/Introduction.rst0000644000175000001440000000556712712252212021562 0ustar00timusers00000000000000===================== Introduction ===================== Overview ~~~~~~~~ Libircclient is a small but extremely powerful library which implements the client IRC protocol. It is designed to be small, fast, portable and compatible with the RFC standards as well as non-standard but popular features. It is perfect for building the IRC clients and bots. Features ~~~~~~~~ - Comprehensive C API; - Full coverage of the IRC protocol using providing functions; - Supports multiple simultaneous connection to different IRC servers or even to the same server; - Supports both plain and SSL connections to the IRC servers with the optional certificate check; - Full multi-threading support, the library is thread-safe; - All the processing could be handled by a single thread even if multiple connections are used; - Non-blocking, asynchronous event-based interface implemented with callbacks; - Extra support for the socket-based applications, which use select(); - CTCP support with optional build-in reply code; - Supports CTCP PING necessary to pass the “spoof check” implemented by most IRC servers; - Flexible DCC support, including both DCC chat, and DCC file transfer; - Can both initiate and react to initiated DCC; - Can accept or decline DCC sessions asynchronously; - Written in plain C, very small binary size (around 30K depending on platform); - Compatible all tested IRC clients; - Free software licensed under the LGPLv3 license; - Supports Linux as well as any POSIX-compliant Unix, Mac OS X and Microsoft Windows; - Supports 32/64bit architectures as well as non-x86 architectures; - IPv6 support (optional, must be compiled in); - OpenSSL support (optional, must be compiled in); - Cocoa interface by Nathan Ollerenshaw; - Comprehensive documentation, examples and the FAQ; Known issues ~~~~~~~~~~~~ Even though possible by using multiple sessions, the library is not suitable to connect to a large number of IRC servers simultaneously. If you still want to use it, you'd have to overcome the following: - You cannot use the main loop in :c:func:`irc_run` because it only supports one session. You would have to use :c:func:`irc_add_select_descriptors` - You'd have to handle reconnections separately by processing the relevant :c:func:`irc_process_select_descriptors` return values - If you wish to use poll/epoll() instead of select() you'd have to write more logic as it is not directly supported. See the :ref:`FAQ `. - The library is not optimized to have a low per-connection memory footprint, each non-SSL connection uses at least 4K, with around 32K per connection for SSL. Author ~~~~~~ This library is created by George Yunaev, copyright 2004-2016. Please see http://www.ulduzsoft.com/linux/libircclient License ~~~~~~~ Libircclient is licensed under Lesser General Public License version 3 or higher. The complete license text is provided in the Appendix. libircclient-1.10/doc/sources/PaxHeaders.23204/API_reference_types.rst0000644000000000000000000000012412161761242022465 xustar0027 mtime=1372054178.603106 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/sources/API_reference_types.rst0000644000175000001440000004440112161761242022750 0ustar00timusers00000000000000 Types ~~~~~ This section describes various types defined by the library. irc_session_t ^^^^^^^^^^^^^ .. c:type:: typedef struct irc_session_s irc_session_t The IRC session handle created by callind :c:func:`irc_create_session`. Most of the library function calls expect this handle as a parameter. You can create as many handles as you want. Each handle could be used to establish a single IRC connection to an IRC server as a single user. Once the handle is not used anymore, it should be destroyed by calling :c:func:`irc_destroy_session`. irc_dcc_session_t ^^^^^^^^^^^^^^^^^ .. c:type:: typedef struct irc_dcc_session_s irc_dcc_session_t This structure describes a DCC session used by libircclient. Its members are internal to libircclient, and should not be used directly. irc_dcc_t ^^^^^^^^^ .. c:type:: typedef unsigned int irc_dcc_t This type is a DCC session identifier, used to identify the DCC sessions in callbacks and various functions. irc_callbacks_t ^^^^^^^^^^^^^^^ .. c:type:: typedef struct irc_callbacks_t :: typedef struct { irc_event_callback_t event_connect; irc_event_callback_t event_nick; irc_event_callback_t event_quit; irc_event_callback_t event_join; irc_event_callback_t event_part; irc_event_callback_t event_mode; irc_event_callback_t event_umode; irc_event_callback_t event_topic; irc_event_callback_t event_kick; irc_event_callback_t event_channel; irc_event_callback_t event_privmsg; irc_event_callback_t event_notice; irc_event_callback_t event_channel_notice; irc_event_callback_t event_invite; irc_event_callback_t event_ctcp_req; irc_event_callback_t event_ctcp_rep; irc_event_callback_t event_ctcp_action; irc_event_callback_t event_unknown; irc_eventcode_callback_t event_numeric; irc_event_dcc_chat_t event_dcc_chat_req; irc_event_dcc_send_t event_dcc_send_req; } Describes the event callbacks structure which is used in registering the callbacks. All the communication with the IRC network is based on events. Generally speaking, event is anything generated by someone else in the network, or by the IRC server itself. "Someone sends you a message", "Someone has joined the channel", "Someone has quits IRC" - all these messages are events. Every event has its own event handler, which is called when the appropriate event is received. You don't have to define all the event handlers; define only the handlers for the events you need to intercept, and set the remaining handler pointers to NULL. .. c:member:: event_connect This event is triggered when the connection to the IRC server is successfully established, and the MOTD is received. Depending on the server it may also be possible to send the commands before this event. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+------------------------------------------------------------------+ | *origin* | Unused, set to NULL | +-------------+------------------------------------------------------------------+ | *params* | Unused, set to NULL | +-------------+------------------------------------------------------------------+ .. c:member:: event_nick This event is triggered when the NICK message is received. It happens when one of the users (including you) in one of the channels you are watching (have joined) changed their nick. Changing your own nick will also generate this event. Note that the server may change your nick independently, so you must track this event. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+------------------------------------------------------------------+ | *origin* | The original nick (may be yours!) | +-------------+------------------------------------------------------------------+ | *params* | params[0] contains a new nick. | +-------------+------------------------------------------------------------------+ .. c:member:: event_quit This event is triggered when the QUIT message is received. It happens when one of the users in one of the channels you are watching (have joined) disconnected from the IRC server. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who disconnected | +-------------+-------------------------------------------------------------------+ | *params* | params[0] is optional, contains the user-specified reason to quit | +-------------+-------------------------------------------------------------------+ .. c:member:: event_join This event is triggered upon receipt of a JOIN message. It happens when a new user joins the channel you are watching (have joined). It also happens when you joined the new channel. Note that you may be "forced" to join the channel (and therefore receive this event) without issuing the JOIN command. A typical case is when the NickServ bot on the server is configured to auto-join you to specific channels. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who joined the channel (this may be you!) | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the channel name | +-------------+-------------------------------------------------------------------+ .. c:member:: event_part This event is triggered upon receipt of a PART message. It happens when a user leaves the channel you are watching (have joined). It also happens when you leave a channel. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who left the channel (this may be you!) | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the channel name | | | params[1] is optional and contains the user-specified reason | +-------------+-------------------------------------------------------------------+ .. c:member:: event_mode This event is triggered upon receipt of a channel MODE message. It happens when someone changed the mode(s) of the channel you are watching (have joined). This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who performed the change | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the channel name | | | params[1] contains the channel mode changes, such as "+t", "-i" | | | params[2] optional, contains the argument for the channel mode | | | (for example, a nick for the +o mode) | +-------------+-------------------------------------------------------------------+ .. c:member:: event_umode This event is triggered upon receipt of a user MODE message. It happens when your user mode is changed. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who performed the change | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the channel name | | | params[1] contains the user mode changes, such as "+t", "-i" | +-------------+-------------------------------------------------------------------+ .. c:member:: event_topic This event is triggered upon receipt of a TOPIC message. It happens when someone changed the topic on the channel you are watching (have joined). This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who performed the change | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the channel name | | | params[1] optional, contains the new topic | +-------------+-------------------------------------------------------------------+ .. c:member:: event_kick This event is triggered upon receipt of a KICK message. It happens when someone (including you) kicked someone (including you) from the channel you are watching (have joined). It is possible to kick yourself from the channel. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who performed the action (may be you) | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the channel name | | | params[1] optional, contains the nick of the kicked | | | params[2] optional, contains the reason for the kick | +-------------+-------------------------------------------------------------------+ .. c:member:: event_channel This event is triggered upon receipt of a PRIVMSG message sent to the channel. It happens when someone (but not you) sent a message to the channel you are watching (have joined). Your own messages do not trigger this event. However the server can still "force" you to send a message to the channel by generating this event. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who sent a message | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the channel name | | | params[1] optional, contains the message text | +-------------+-------------------------------------------------------------------+ .. c:member:: event_privmsg This event is triggered upon receipt of a PRIVMSG message sent privately to you. It happens when someone sent you a message. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who sent a message | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains your nick | | | params[1] optional, contains the message text | +-------------+-------------------------------------------------------------------+ .. c:member:: event_notice This event is triggered upon receipt of a NOTICE message. This message is similar to PRIVMSG and matches the event_privmsg_. According to RFC 1459, the only difference between NOTICE and PRIVMSG is that you should NEVER automatically reply to NOTICE messages. Unfortunately, this rule is frequently violated by IRC servers itself - for example, NICKSERV messages require reply, and are sent as NOTICE. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who sent a message | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the target nick name | | | params[1] optional, contains the message text | +-------------+-------------------------------------------------------------------+ .. c:member:: event_channel_notice This event is triggered upon receipt of a NOTICE message. This message is similar to PRIVMSG and matches the event_channel_. According to RFC 1459, the only difference between NOTICE and PRIVMSG is that you should NEVER automatically reply to NOTICE messages. Unfortunately, this rule is frequently violated by IRC servers itself - for example, NICKSERV messages require reply, and are sent as NOTICE. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who sent a message | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the channel name | | | params[1] optional, contains the message text | +-------------+-------------------------------------------------------------------+ .. c:member:: event_invite This event is triggered upon receipt of an INVITE message. It happens when someone invited you to a channel which has +i (invite-only) mode. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who invited you | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains your nick | | | params[1] optional, contains the channel name | +-------------+-------------------------------------------------------------------+ See also: :c:func:`irc_cmd_invite` .. c:member:: event_ctcp_req This event is triggered upon receipt of an CTCP request. By default, the built-in CTCP request handler is used. Mirc generates *PING*, *FINGER*, *VERSION*, *TIME* and *ACTION* messages which are automatically handled by the library if this event is not handled by your application. Those messages are replied automatically except the ACTION message which triggers event_ctcp_action_ event. If you need to handle more types of the message, define this event handler, and check the source code of ``libirc_event_ctcp_internal`` function to see how to write your own CTCP request handler. Note that you must support at least CTCP PING to pass the spoof check by some IRC servers. Also you may find useful this question in FAQ: \ref faq4 This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who generated the message | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the complete CTCP message | +-------------+-------------------------------------------------------------------+ .. c:member:: event_ctcp_rep This event is triggered upon receipt of an CTCP response. Thus if you generate the CTCP message and the remote user responded, this event handler will be called. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who generated the message | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the complete CTCP message | +-------------+-------------------------------------------------------------------+ .. c:member:: event_ctcp_action This event is triggered upon receipt of an CTCP ACTION message. It is only invoked if you did not define the event_ctcp_req_ event handler. Such messages typically look like that in the IRC client: :: [08:32:55] * Michael is having fun [08:32:55] * Bobby's getting jealous This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who generated the message | +-------------+-------------------------------------------------------------------+ | *params* | params[0] contains the content of ACTION message | +-------------+-------------------------------------------------------------------+ .. c:member:: event_unknown This event is triggered upon receipt of an unknown message which is not handled by the library. This event uses :c:type:`irc_event_callback_t` callback with the following values: +-------------+-------------------------------------------------------------------+ | *origin* | The user who generated the event | +-------------+-------------------------------------------------------------------+ | *params* | Zero or more parameters provided with the event | +-------------+-------------------------------------------------------------------+ .. c:member:: event_numeric This event is triggered upon receipt of every numeric message from the server. The incomplete list of those responses could be found in RFC 1429. This event is necessary to handle for any meaningful client. This event uses the dedicated irc_eventcode_callback_t_ callback. See the callback documentation. .. c:member:: event_dcc_chat_req This event is triggered when someone attempts to establish the DCC CHAT with you. This event uses the dedicated :c:type:`irc_event_dcc_chat_t` callback. See the callback documentation. .. c:member:: event_dcc_send_req This event is triggered when someone attempts to send you the file via DCC SEND. This event uses the dedicated :c:type:`irc_event_dcc_send_t` callback. See the callback documentation. libircclient-1.10/doc/PaxHeaders.23204/index.rst0000644000000000000000000000012412161761242016236 xustar0027 mtime=1372054178.603106 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/doc/index.rst0000644000175000001440000000164312161761242016522 0ustar00timusers00000000000000.. Libircclient documentation master file, created by sphinx-quickstart on Sat Jun 15 22:37:32 2013. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Libircclient technical documentation """""""""""""""""""""""""""""""""""" ===================== Introduction ===================== .. toctree:: sources/Introduction ===================== Integration ===================== .. toctree:: sources/Writing_code ===================== API Reference ===================== .. toctree:: sources/API_reference_callbacks sources/API_reference_functions sources/API_reference_types sources/API_reference_constants ===================== Appendix ===================== .. toctree:: sources/Appendix_FAQ sources/Appendix_LGPL Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` libircclient-1.10/PaxHeaders.23204/Doxyfile0000644000000000000000000000012411127770153015340 xustar0027 mtime=1231024235.548078 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/Doxyfile0000644000175000001440000013426411127770153015632 0ustar00timusers00000000000000# Doxyfile 1.3.8 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = libircclient # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 1.3 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of source # files, where putting all generated files in the same directory would otherwise # cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, # Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, # Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, # Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # This tag can be used to specify the encoding used in the generated output. # The encoding is not always determined by the language that is chosen, # but also whether or not the output is meant for Windows or non-Windows users. # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES # forces the Windows encoding (this is the default for the Windows binary), # whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = YES # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is used # as the annotated text. Otherwise, the brief description is used as-is. If left # blank, the following values are used ("$name" is automatically replaced with the # name of the entity): "The $name class" "The $name widget" "The $name file" # "is" "provides" "specifies" "contains" "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited # members of a class in the documentation of that class as if those members were # ordinary class members. Constructors, destructors and assignment operators of # the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources # only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = NO # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = include/ # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp # *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories # that are symbolic links (a Unix filesystem feature) are excluded from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = YES #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse the # parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. Note that this # option is superseded by the HAVE_DOT option below. This is only a fallback. It is # recommended to install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = NO # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = NO # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes that # lay further from the root node will be omitted. Note that setting this option to # 1 or 2 may greatly reduce the computation time needed for large code bases. Also # note that a graph may be further truncated if the graph's image dimensions are # not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). # If 0 is used for the depth value (the default), the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO libircclient-1.10/PaxHeaders.23204/LICENSE0000644000000000000000000000007110117570656014644 xustar0027 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/LICENSE0000644000175000001440000006130310117570656015126 0ustar00timusers00000000000000 GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, 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 this service 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 make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library 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 Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey 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 library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libircclient-1.10/PaxHeaders.23204/build-release.sh0000644000000000000000000000012413340661216016701 xustar0027 mtime=1535337102.802475 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/build-release.sh0000755000175000001440000000416413340661216017171 0ustar00timusers00000000000000#!/bin/sh # Export the source code PACKAGE=libircclient BINARYFILE="libircclient.dll" FILE_VERSION="src/params.h" # Get current version VERSION_MAJOR=`sed -n 's/^\#define\s\+LIBIRC_VERSION_HIGH\s\+\([0-9]\+\)/\1/p' $FILE_VERSION` VERSION_MINOR=`sed -n 's/^\#define\s\+LIBIRC_VERSION_LOW\s\+\([0-9]\+\)/\1/p' $FILE_VERSION` CURRENTVER="$VERSION_MAJOR.$VERSION_MINOR" BUILDDIR="build" RELEASEDIR="release/$CURRENTVER" PKGDIR="$PACKAGE-$CURRENTVER" if [ -d "$BUILDDIR" ]; then rm -rf "$BUILDDIR" fi if [ ! -d "$RELEASEDIR" ]; then mkdir -p $RELEASEDIR fi if [ -d "$PKGDIR" ]; then rm -rf "$PKGDIR" fi # Export the build directory to build the documentation svn export . "$BUILDDIR/" || exit 1 # Build the documentation (cd $BUILDDIR/doc && make singlehtml && make man) || exit 1 # Package the documentations (cd $BUILDDIR/doc/_build/singlehtml && zip -r ../$PKGDIR-html.zip .) mv $BUILDDIR/doc/_build/$PKGDIR-html.zip $RELEASEDIR/ || exit 1 # Source package svn export . "$PKGDIR/" || exit 1 mkdir $PKGDIR/man cp $BUILDDIR/doc/_build/man/libircclient.1 $PKGDIR/man/ || exit 1 tar zcf "$RELEASEDIR/$PKGDIR.tar.gz" $PKGDIR/ || exit 1 rm -rf $PKGDIR/* # win32 export PATH=$PATH:/usr/toolchains/windows-x86-complete/bin/ (cd $BUILDDIR && ./configure --enable-shared --host=i686-w64-mingw32.static && make) || exit 1 BINDIR="$PKGDIR/bin" mkdir -p $BINDIR cp $BUILDDIR/src/libircclient.dll $BINDIR/ || exit 1 cp $BUILDDIR/src/libircclient.lib $BINDIR/ || exit 1 mkdir "$PKGDIR/include" cp include/*.h "$PKGDIR/include" || exit 1 mkdir "$PKGDIR/examples" cp examples/*.c* $PKGDIR/examples || exit 1 mkdir "$PKGDIR/doc" cp $RELEASEDIR/$PKGDIR-html.zip "$PKGDIR/doc/" || exit 1 zip -r $RELEASEDIR/$PKGDIR-win32-dll.zip $PKGDIR || exit 1 # And the SSL version (cd $BUILDDIR && make distclean && ./configure --enable-shared --host=i686-w64-mingw32.static --enable-openssl && make clean && make) || exit 1 cp $BUILDDIR/src/libircclient.dll $BINDIR/ || exit 1 cp $BUILDDIR/src/libircclient.lib $BINDIR/ || exit 1 zip -r $RELEASEDIR/$PKGDIR-win32-dll-openssl.zip $PKGDIR || exit 1 rm -rf "$BUILDDIR" "$PKGDIR" echo "Done! Version $CURRENTVER released!" libircclient-1.10/PaxHeaders.23204/README0000644000000000000000000000012411705744556014524 xustar0027 mtime=1326958958.458837 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/README0000644000175000001440000000116311705744556015005 0ustar00timusers00000000000000Building from source The library uses autoconf so it is build in a fairly typical way on most Unix systems: ./configure make This will build both the library and various examples in the examples subdirectory. Configure script also accepts parameters, optional useful parameters accepted are –enable-openssl and –enable-ipv6 which correspondingly enable the SSL and IPv6 connectivity. Use –enable-shared to build a shared library. The same procedure is used to build the Win32 binary using the MinGW compiler. For the rest see the Doxygen documentation in the header files and http://www.ulduzsoft.com/libircclient/ libircclient-1.10/PaxHeaders.23204/cocoa0000644000000000000000000000013213340661224014635 xustar0030 mtime=1535337108.214355232 30 atime=1535337108.214355232 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/0000755000175000001440000000000013340661224015173 5ustar00timusers00000000000000libircclient-1.10/cocoa/PaxHeaders.23204/Classes0000644000000000000000000000013213340661224016232 xustar0030 mtime=1535337108.214355232 30 atime=1535337108.214355232 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/0000755000175000001440000000000013340661224016570 5ustar00timusers00000000000000libircclient-1.10/cocoa/Classes/PaxHeaders.23204/IRCClientChannelDelegate.h0000644000000000000000000000012411132047270023155 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/IRCClientChannelDelegate.h0000644000175000001440000001031111132047270023431 0ustar00timusers00000000000000/* * Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ /** * @file IRCClientChannelDelegate.h * @author Nathan Ollerenshaw * @version 1.0 * @date 01.2009 * @brief Receives delegate messages from an IRCClientChannel. * @protocol IRCClientChannelDelegate */ #import /** @brief Receives delegate messages from an IRCClientChannel. * * Each IRCClientChannel object needs a delegate. Delegate methods are called * for each event that occurs on an IRC channel that the client is current on. * * Note that for any given parameter, it may be optional, in which case a nil * object may be supplied instead of the given parameter. */ @interface NSObject (IRCClientChannelDelegate) /** When a client joins this channel, the onJoin event is fired. Note that * the nickname is most likely in nick!user\@host format, but may simply be a * nickname, depending on the server implementation. * * You should also expect to see this event when the client first joins a channel, * with a parameter of the client's nickname. * * @param nick The nickname of the user that joined the channel. */ - (void)onJoin:(NSString *)nick; /** When an IRC client parts a channel you are connect to, you will see * an onPart event. You will also see this event when you part a channel. * * @param nick (required) The nickname of the user that left the channel. * @param reason (optional) The reason, if any, that the user gave for leaving. */ - (void)onPart:(NSString *)nick reason:(NSString *)reason; /** Received when an IRC client changes the channel mode. What modes are available * for a given channel is an implementation detail for each server. * * @param mode the new channel mode. * @param params any parameters with the mode (such as channel key). * @param nick the nickname of the IRC client that changed the mode. */ - (void)onMode:(NSString *)mode params:(NSString *)params nick:(NSString *)nick; /** Received when the topic is changed for the channel. * * @param aTopic The new topic of the channel. * @param nick Nickname of the IRC client that changed the topic. */ - (void)onTopic:(NSString *)aTopic nick:(NSString *)nick; /** Received when an IRC client is kicked from a channel. * * @param nick nickname of the client that was kicked * @param reason reason message given for the kick * @param byNick nickname of the client that performed the kick command */ - (void)onKick:(NSString *)nick reason:(NSString *)reason byNick:(NSString *)byNick; /** Received when an IRC client sends a public PRIVMSG to the channel. Note that the * user may not necessarily be required to be on the channel to send a message * to it. * * @param message the message sent to the channel. * @param nick the nickname of the IRC client that sent the message. */ - (void)onPrivmsg:(NSString *)message nick:(NSString *)nick; /** Received when an IRC client sends a public NOTICE to the channel. Note that * the user may not necessarily be required to be on the channel to send a notice to * it. Furthermore, the RFC states that the only difference between PRIVMSG and * NOTICE is that a NOTICE may never be responded to automatically. * * @param notice the notice sent to the channel. * @param nick the nickname of the IRC client that sent the notice. */ - (void)onNotice:(NSString *)notice nick:(NSString *)nick; /** Received when an IRC client sends a CTCP ACTION message to the channel. * used by lamers with no life to pretend that they are playing some form of * MMORPG. * * @param action the action message sent to the channel. * @param nick the nickname of the IRC client that sent the message. */ - (void)onAction:(NSString *)action nick:(NSString *)nick; @end libircclient-1.10/cocoa/Classes/PaxHeaders.23204/IRCClientSessionDelegate.h0000644000000000000000000000012411134761141023232 xustar0027 mtime=1232331361.668394 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/IRCClientSessionDelegate.h0000644000175000001440000001161011134761141023511 0ustar00timusers00000000000000/* * Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #import #include /** * @file IRCClientChannelDelegate.h * @author Nathan Ollerenshaw * @version 1.0 * @date 01.2009 * @brief Receives delegate messages from an IRCClientSession. * @protocol IRCClientSessionDelegate */ @class IRCClientChannel; /** @brief Receives delegate messages from an IRCClientSession. * * Each IRCClientSession object needs a single delegate. Methods are called * for each event that occurs on an IRC server that the client is connected to. * * Note that for any given parameter, it may be optional, in which case a nil * object may be supplied instead of the given parameter. */ @interface NSObject (IRCClientSessionDelegate) /** The client has successfully connected to the IRC server. */ - (void)onConnect; /** An IRC client on a channel that this client is connected to has changed nickname, * or this IRC client has changed nicknames. * * @param nick the new nickname * @param oldNick the old nickname */ - (void)onNick:(NSString *)nick oldNick:(NSString *)oldNick; /** An IRC client on a channel that this client is connected to has quit IRC. * * @param nick the nickname of the client that quit. * @param reason (optional) the quit message, if any. */ - (void)onQuit:(NSString *)nick reason:(NSString *)reason; /** The IRC client has joined (connected) successfully to a new channel. This * event creates an IRCClientChannel object, which you are expected to asign a * delegate to, to handle events from the channel. * * For example, on receipt of this message, a graphical IRC client would most * likely open a new window, create an IRCClientChannelDelegate for the window, * set the new IRCClientChannel's delegate to the new delegate, and then hook * it up so that new events sent to the IRCClientChannelDelegate are sent to * the window. * * @param channel the IRCClientChannel object for the newly joined channel. */ - (void)onJoinChannel:(IRCClientChannel *)channel; /** The client has changed it's user mode. * * @param mode the new mode. */ - (void)onMode:(NSString *)mode; /** The client has received a private PRIVMSG from another IRC client. * * @param message the text of the message * @param nick the other IRC Client that sent the message. */ - (void)onPrivmsg:(NSData *)message nick:(NSString *)nick; /** The client has received a private NOTICE from another client. * * @param notice the text of the message * @param nick the nickname of the other IRC client that sent the message. */ - (void)onNotice:(NSData *)notice nick:(NSString *)nick; /** The IRC client has been invited to a channel. * * @param channel the channel for the invitation. * @param nick the nickname of the user that sent the invitation. */ - (void)onInvite:(NSString *)channel nick:(NSString *)nick; /** A private CTCP request was sent to the IRC client. * * @param request the CTCP request string (after the type) * @param type the CTCP request type * @param nick the nickname of the user that sent the request. */ - (void)onCtcpRequest:(NSString *)request type:(NSString *)type nick:(NSString *)nick; /** A private CTCP reply was sent to the IRC client. * * @param reply an NSData containing the raw C string of the reply. * @param nick the nickname of the user that sent the reply. */ - (void)onCtcpReply:(NSData *)reply nick:(NSString *)nick; /** A private CTCP ACTION was sent to the IRC client. * * CTCP ACTION is not limited to channels; it may also be sent directly to other users. * * @param action the action message text. * @param nick the nickname of the client that sent the action. */ - (void)onAction:(NSData *)action nick:(NSString *)nick; /** An unhandled event was received from the IRC server. * * @param event the unknown event name * @param origin the sender of the event * @param params an NSArray of NSData objects that are the raw C strings of the event. */ - (void)onUnknownEvent:(NSString *)event origin:(NSString *)origin params:(NSArray *)params; /** An unhandled numeric was received from the IRC server * * @param event the unknown event number * @param origin the sender of the event * @param params an NSArray of NSData objects that are the raw C strings of the event. */ - (void)onNumericEvent:(NSUInteger)event origin:(NSString *)origin params:(NSArray *)params; @end libircclient-1.10/cocoa/Classes/PaxHeaders.23204/IRCClientChannel.m0000644000000000000000000000012411132047270021527 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/IRCClientChannel.m0000644000175000001440000001073411132047270022014 0ustar00timusers00000000000000/* * Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #import "IRCClientChannel.h" #import "IRCClientSession.h" #import "NSObject+DDExtensions.h" @implementation IRCClientChannel @synthesize delegate; @synthesize name; @synthesize encoding; @synthesize session; @synthesize topic; @synthesize modes; @synthesize names; -(id)init { return [self initWithName:nil]; } -(id)initWithName:(NSString *)aName { if ((self = [super init])) { [self setName:aName]; topic = [[NSString alloc] init]; encoding = NSASCIIStringEncoding; } return self; } -(void)dealloc { [super dealloc]; } - (int)part { return irc_cmd_part([session session], [name cStringUsingEncoding:NSASCIIStringEncoding]); } - (int)invite:(NSString *)nick { return irc_cmd_invite([session session], [nick cStringUsingEncoding:NSASCIIStringEncoding], [name cStringUsingEncoding:NSASCIIStringEncoding]); } - (int)refreshNames { return irc_cmd_names([session session], [name cStringUsingEncoding:NSASCIIStringEncoding]); } - (void)setTopic:(NSString *)aTopic { irc_cmd_topic([session session], [name cStringUsingEncoding:NSASCIIStringEncoding], [topic cStringUsingEncoding:encoding]); } - (int)setMode:(NSString *)mode params:(NSString *)params { return irc_cmd_channel_mode([session session], [name cStringUsingEncoding:NSASCIIStringEncoding], [mode cStringUsingEncoding:NSASCIIStringEncoding]); } - (int)message:(NSString *)message { return irc_cmd_msg([session session], [name cStringUsingEncoding:NSASCIIStringEncoding], [message cStringUsingEncoding:encoding]); } - (int)action:(NSString *)action { return irc_cmd_me([session session], [name cStringUsingEncoding:NSASCIIStringEncoding], [action cStringUsingEncoding:encoding]); } - (int)notice:(NSString *)notice { return irc_cmd_notice([session session], [name cStringUsingEncoding:NSASCIIStringEncoding], [notice cStringUsingEncoding:encoding]); } - (int)kick:(NSString *)nick reason:(NSString *)reason { return irc_cmd_kick([session session], [nick cStringUsingEncoding:NSASCIIStringEncoding], [name cStringUsingEncoding:NSASCIIStringEncoding], [reason cStringUsingEncoding:encoding]); } - (int)ctcpRequest:(NSString *)request { return irc_cmd_ctcp_request([session session], [name cStringUsingEncoding:NSASCIIStringEncoding], [request cStringUsingEncoding:encoding]); } // event handlers // // These farm events out to the delegate on the main thread. - (void)onJoin:(NSString *)nick { if ([delegate respondsToSelector:@selector(onJoin:)]) [[delegate dd_invokeOnMainThread] onJoin:nick]; } - (void)onPart:(NSString *)nick reason:(NSString *)reason { if ([delegate respondsToSelector:@selector(onPart:reason:)]) [[delegate dd_invokeOnMainThread] onPart:nick reason:reason]; } - (void)onMode:(NSString *)mode params:(NSString *)params nick:(NSString *)nick { if ([delegate respondsToSelector:@selector(onMode:params:nick:)]) [[delegate dd_invokeOnMainThread] onMode:mode params:params nick:nick]; } - (void)onTopic:(NSString *)aTopic nick:(NSString *)nick { [topic release]; topic = [NSString stringWithString:aTopic]; if ([delegate respondsToSelector:@selector(onTopic:nick:)]) [[delegate dd_invokeOnMainThread] onTopic:aTopic nick:nick]; } - (void)onKick:(NSString *)nick reason:(NSString *)reason byNick:(NSString *)byNick { if ([delegate respondsToSelector:@selector(onKick:reason:byNick:)]) [[delegate dd_invokeOnMainThread] onKick:nick reason:reason byNick:byNick]; } - (void)onPrivmsg:(NSString *)message nick:(NSString *)nick { if ([delegate respondsToSelector:@selector(onPrivmsg:nick:)]) [[delegate dd_invokeOnMainThread] onPrivmsg:message nick:nick]; } - (void)onNotice:(NSString *)notice nick:(NSString *)nick { if ([delegate respondsToSelector:@selector(onNotice:nick:)]) [[delegate dd_invokeOnMainThread] onNotice:notice nick:nick]; } - (void)onAction:(NSString *)action nick:(NSString *)nick { if ([delegate respondsToSelector:@selector(onAction:nick:)]) [[delegate dd_invokeOnMainThread] onAction:action nick:nick]; } @end libircclient-1.10/cocoa/Classes/PaxHeaders.23204/IRCClientChannel.h0000644000000000000000000000012411134761141021524 xustar0027 mtime=1232331361.668394 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/IRCClientChannel.h0000644000175000001440000001041311134761141022003 0ustar00timusers00000000000000/* * Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ /** * @file IRCClientChannel.h * @author Nathan Ollerenshaw * @version 1.0 * @date 01.2009 * @brief Represents a connected IRC Channel. */ #import #import /** \class IRCClientChannel * @brief Represents a connected IRC Channel. * * IRCClientChannel objects are created by the IRCClientSession object * for a given session when the client joins an IRC channel. At that time * you are expected to register event handlers for each of the delegate * methods described in the IRCClientChannelDelegate interface. */ @class IRCClientSession; @interface IRCClientChannel : NSObject { id delegate; NSString *name; NSStringEncoding encoding; IRCClientSession *session; NSString *topic; NSString *modes; NSMutableArray *names; } /** Delegate to send events to */ @property (assign) id delegate; /** Name of the channel */ @property (copy) NSString *name; /** Encoding used by this channel */ @property (assign) NSStringEncoding encoding; /** Associated IRCClientSession object */ @property (assign) IRCClientSession *session; /** Topic of the channel */ @property (copy) NSString *topic; /** Mode of the channel */ @property (copy) NSString *modes; /** An array of nicknames stored as NSStrings that list the connected users for the channel */ @property (assign, readonly) NSMutableArray *names; /** initWithName: * * Returns an initialised IRCClientChannel with a given channel name. You * are not expected to initialise your own IRCClientChannel objects; if you * wish to join a channel you should send a [IRCClientSession join:key:] message * to your IRCClientSession object. * * @param aName Name of the channel. */ - (id)initWithName:(NSString *)aName; /** Parts the channel. */ - (int)part; /** Invites another IRC client to the channel. * * @param nick the nickname of the client to invite. */ - (int)invite:(NSString *)nick; /** Sets the topic of the channel. * * Note that not all users on a channel have permission to change the topic; if you fail * to set the topic, then you will not see an onTopic event on the IRCClientChannelDelegate. * * @param aTopic the topic the client wishes to set for the channel. */ - (void)setTopic:(NSString *)aTopic; /** Sets the mode of the channel. * * Note that not all users on a channel have permission to change the mode; if you fail * to set the mode, then you will not see an onMode event on the IRCClientChannelDelegate. * * @param mode the mode to set the channel to * @param params paramaters for the mode, if it requires parameters. */ - (int)setMode:(NSString *)mode params:(NSString *)params; /** Sends a public PRIVMSG to the channel. If you try to send more than can fit on an IRC * buffer, it will be truncated. * * @param message the message to send to the channel. */ - (int)message:(NSString *)message; /** Sends a public CTCP ACTION to the channel. * * @param action action to send to the channel. */ - (int)action:(NSString *)action; /** Sends a public NOTICE to the channel. * * @param notice message to send to the channel. */ - (int)notice:(NSString *)notice; /** Kicks someone from a channel. * * @param nick the IRC client to kick from the channel. * @param reason the message to give to the channel and the IRC client for the kick. */ - (int)kick:(NSString *)nick reason:(NSString *)reason; /** Sends a CTCP request to the channel. * * It is perfectly legal to send a CTCP request to an IRC channel, however many clients * decline to respond to them, and often they are percieved as annoying. * * @param request the string of the request, in CTCP format. */ - (int)ctcpRequest:(NSString *)request; @end libircclient-1.10/cocoa/Classes/PaxHeaders.23204/IRCClientSession.h0000644000000000000000000000012411134761141021577 xustar0027 mtime=1232331361.668394 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/IRCClientSession.h0000644000175000001440000001726111134761141022066 0ustar00timusers00000000000000/*! \mainpage IRCClient - a Cocoa IRC Framework to create IRC clients * * \section intro_sec Introduction * * IRCClient is a Cocoa Framework that uses the excellent libircclient library * written by Georgy Yunaev. * * \section usage Basic Usage * * To use this framework, you will need to write an IRCClientSessionDelegate to * handle all of the events generated by the server, and an IRCClientChannelDelegate * to handle all of the events generated by channels on that server. * * You then create an IRCClientSession object in your code, assign the required * properties, and call connect: to connect to the server and run: to create * the new thread and start receiving events. For example: * * \code * IRCClientSession *session = [[IRCClientSession alloc] init]; * MyIRCClientSessionDelegate *controller = [[MyIRCClientSessionDelegate alloc] init]; * * [session setDelegate:controller]; * [controller setSession:session]; * * [session setServer:@"irc.dal.net"]; * [session setPort:@"6667"]; * [session setNickname:@"test"]; * [session setUsername:@"test"]; * [session setRealname:@"test"]; * [session connect]; * * [session run]; //starts the thread * \endcode * * \section author Author, copyright, support. * * If you have any questions, bug reports, suggestions regarding libircclient * or the IRCClient framework, please visit http://libircclient.sourceforge.net * *
 * libircclient Copyright (C) 2004-2009 Georgy Yunaev gyunaev@ulduzsoft.com
 * IRCClient Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net
 *
 * This library is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU Lesser General Public License as published by 
 * the Free Software Foundation; either version 2 of the License, or (at your 
 * option) any later version.
 *
 * This library 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 Lesser General Public 
 * License for more details.
 * 
*/ /** * @file IRCClientSession.h * @author Nathan Ollerenshaw * @version 1.0 * @date 01.2009 * @brief Represents a connected IRC Session. */ #import #import #include /** @class IRCClientSession * @brief Represents a connected IRC Session. * * IRCClientSession represents a single connection to an IRC server. On initialising * the object, and setting the delegate, server, port, password, nickname, username and realname * properties, you call the connect: and run: methods to connect to the IRC server * and start a new thread. * * This thread then sends messages back to the main runloop to the IRC server delegate, * or to the IRCClientChannel delegate as required. */ @class IRCClientChannel; @interface IRCClientSession : NSObject { id delegate; irc_callbacks_t callbacks; irc_session_t *session; NSThread *thread; NSString *version; NSString *server; NSString *port; NSString *password; NSString *nickname; NSString *username; NSString *realname; NSMutableDictionary *channels; NSMutableDictionary *nicks; NSStringEncoding encoding; } /** delegate to send events to. */ @property (assign) id delegate; /** The underlying libircclient handle */ @property (assign) irc_session_t *session; /** The version string for the client to send back on CTCP VERSION requests */ @property (copy) NSString *version; /** IRC server to connect to */ @property (copy) NSString *server; /** IRC port to connect to */ @property (copy) NSString *port; /** Server password to provide on connect (may be left empty or nil) */ @property (copy) NSString *password; /** Nickname of the connected client. Note that setting this after connection will not result in the client renaming on IRC. You need to send a nick: message instead. */ @property (copy) NSString *nickname; /** Username of the connected client. Also known as the ident. Setting this after connection does nothing. */ @property (copy) NSString *username; /** Realname of the connected client. Setting this after connection does nothing. */ @property (copy) NSString *realname; /** An NSMutableDictionary of channels that the client is currently connected to. You should not modify this. */ @property (assign,readonly) NSMutableDictionary *channels; /** The default text encoding for messages on this server. This affects messages received via PRIVMSG and NOTICE, and TOPIC in a channel. You may change this at any time. */ @property (assign) NSStringEncoding encoding; /** Connect to the IRC server. Note that this performs the initial DNS lookup and the TCP connection, so if there are any problems you will be notified via the return code of the message. Look at the libircclient documentation for the different return codes. */ - (int)connect; /** Disconnect from the IRC server. This always works, as it simply shuts down the socket. If you want to disconnect in a friendly way, you should use the quit: message. */ - (void)disconnect; /** returns YES if the server is currently connected successfully, and NO if it is not. */ - (bool)isConnected; /** Starts a new thread and starts the libircclient runloop, processing events and firing messages back to the main runloop as required. Calling this again will do nothing other than raise a warning in your logs. */ - (void)run; /** Sends a raw message to the IRC server. Please consult rfc1459 for the format of IRC commands. */ - (int)sendRawWithFormat:(NSString *)format, ...; /** quits the IRC server with the given reason. On success, an onQuit event will be sent to the IRCClientSessionDelegate with the nickname of the IRC client. The format is a standard NSString format string, followed by optional arguments. */ - (int)quit:(NSString *)reason; /** Joins a channel with a given name and key @param channel the channel to join @param key they key for the channel (may be nil) */ - (int)join:(NSString *)channel key:(NSString *)key; /** lists channels on the IRC server. @param channel a channel name or string to pass to the LIST command. Implementation specific. */ - (int)list:(NSString *)channel; /** sets the user mode for the IRC client @param mode string to set */ - (int)userMode:(NSString *)mode; /** sets the IRC client nickname. On success, an onNick event will be sent to the delegate @param newnick new nickname to set. */ - (int)nick:(NSString *)newnick; /** sends a WHOIS request to the IRC server @param nick nickname of the irc client to whois. */ - (int)whois:(NSString *)nick; /** send a PRIVMSG to another IRC client @param message message to send @param target the other IRC client to send the message to. */ - (int)message:(NSString *)message to:(NSString *)target; /** send a CTCP ACTION to another IRC client @param action the action message to send @param target the nickname of the irc client to send the message to. */ - (int)action:(NSString *)action to:(NSString *)target; /** send a NOTICE to another IRC client @param notice the message text to send @param target the nickname of the irc client to send the notice to. */ - (int)notice:(NSString *)notice to:(NSString *)target; /** send a CTCP request to another IRC client @param request the CTCP request string to send @param target the nickname of the IRC client to send the request to. */ - (int)ctcpRequest:(NSString *)request target:(NSString *)target; /** send a CTCP reply to another IRC client @param reply the CTCP reply string to send @param target the nickname of the IRC client to send the reply to. */ - (int)ctcpReply:(NSString *)reply target:(NSString *)target; @end libircclient-1.10/cocoa/Classes/PaxHeaders.23204/DDInvocationGrabber.m0000644000000000000000000000012411132047270022270 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/DDInvocationGrabber.m0000644000175000001440000001122111132047270022545 0ustar00timusers00000000000000/* * Copyright (c) 2007-2008 Dave Dribin * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* * This class is based on CInvocationGrabber: * * Copyright (c) 2007, Toxic Software * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of the Toxic Software nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * */ #import "DDInvocationGrabber.h" @implementation DDInvocationGrabber + (id)invocationGrabber { return([[[self alloc] init] autorelease]); } - (id)init { _target = nil; _invocation = nil; _forwardInvokesOnMainThread = NO; _waitUntilDone = NO; return self; } - (void)dealloc { [self setTarget:NULL]; [self setInvocation:NULL]; // [super dealloc]; } #pragma mark - - (id)target { return _target; } - (void)setTarget:(id)inTarget { if (_target != inTarget) { [_target autorelease]; _target = [inTarget retain]; } } - (NSInvocation *)invocation { return _invocation; } - (void)setInvocation:(NSInvocation *)inInvocation { if (_invocation != inInvocation) { [_invocation autorelease]; _invocation = [inInvocation retain]; } } - (BOOL)forwardInvokesOnMainThread; { return _forwardInvokesOnMainThread; } - (void)setForwardInvokesOnMainThread:(BOOL)forwardInvokesOnMainThread; { _forwardInvokesOnMainThread = forwardInvokesOnMainThread; } - (BOOL)waitUntilDone; { return _waitUntilDone; } - (void)setWaitUntilDone:(BOOL)waitUntilDone; { _waitUntilDone = waitUntilDone; } #pragma mark - - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { return [[self target] methodSignatureForSelector:selector]; } - (void)forwardInvocation:(NSInvocation *)ioInvocation { [ioInvocation setTarget:[self target]]; [self setInvocation:ioInvocation]; if (_forwardInvokesOnMainThread) { if (!_waitUntilDone) [_invocation retainArguments]; [_invocation performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:_waitUntilDone]; } } @end #pragma mark - @implementation DDInvocationGrabber (DDnvocationGrabber_Conveniences) - (id)prepareWithInvocationTarget:(id)inTarget { [self setTarget:inTarget]; return(self); } @end libircclient-1.10/cocoa/Classes/PaxHeaders.23204/DDInvocationGrabber.h0000644000000000000000000000012411132047270022263 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/DDInvocationGrabber.h0000644000175000001440000001132711132047270022547 0ustar00timusers00000000000000/* * Copyright (c) 2007-2008 Dave Dribin * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* * This class is based on CInvocationGrabber: * * Copyright (c) 2007, Toxic Software * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of the Toxic Software nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * */ #import /* * @class DDInvocationGrabber * @discussion DDInvocationGrabber is a helper object that makes it very easy to construct instances of NSInvocation for later use. The object is inspired by NSUndoManager's prepareWithInvocationTarget method. To use a DDInvocationGrabber object, you set its target to some object, then send it a message as if it were the target object (the DDInvocationGrabber object acts as a proxy), if the target message understands the message the DDInvocationGrabber object stores the message invocation. DDInvocationGrabber *theGrabber = [DDInvocationGrabber invocationGrabber]; [theGrabber setTarget:someObject] [theGrabber doSomethingWithParameter:someParameter]; // Send messages to 'theGrabber' as if it were 'someObject' NSInvocation *theInvocation = [theGrabber invocation]; A slightly more concise version (using the covenience category) follows: DDInvocationGrabber *theGrabber = [DDInvocationGrabber invocationGrabber]; [[theGrabber prepareWithInvocationTarget:someObject] doSomethingWithParameter:someParameter]; NSInvocation *theInvocation = [theGrabber invocation]; */ @interface DDInvocationGrabber : NSProxy { id _target; NSInvocation * _invocation; BOOL _forwardInvokesOnMainThread; BOOL _waitUntilDone; } /* * @method invocationGrabber * @abstract Returns a newly allocated, inited, autoreleased DDInvocationGrabber object. */ + (id)invocationGrabber; - (id)target; - (void)setTarget:(id)inTarget; - (NSInvocation *)invocation; - (void)setInvocation:(NSInvocation *)inInvocation; - (BOOL)forwardInvokesOnMainThread; - (void)setForwardInvokesOnMainThread:(BOOL)forwardInvokesOnMainThread; - (BOOL)waitUntilDone; - (void)setWaitUntilDone:(BOOL)waitUntilDone; @end @interface DDInvocationGrabber (DDInvocationGrabber_Conveniences) /* * @method prepareWithInvocationTarget: * @abstract Sets the target object of the receiver and returns itself. The sender can then send a message to the */ - (id)prepareWithInvocationTarget:(id)inTarget; @end libircclient-1.10/cocoa/Classes/PaxHeaders.23204/NSObject+DDExtensions.h0000644000000000000000000000012411132047270022467 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/NSObject+DDExtensions.h0000644000175000001440000000251211132047270022747 0ustar00timusers00000000000000/* * Copyright (c) 2007-2008 Dave Dribin * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #import @interface NSObject (DDExtensions) - (id)dd_invokeOnMainThread; - (id)dd_invokeOnMainThreadAndWaitUntilDone:(BOOL)waitUntilDone; @end #define ddsynthesize(_X_) @synthesize _X_ = _##_X_ libircclient-1.10/cocoa/Classes/PaxHeaders.23204/NSObject+DDExtensions.m0000644000000000000000000000012411132047270022474 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/NSObject+DDExtensions.m0000644000175000001440000000314211132047270022754 0ustar00timusers00000000000000/* * Copyright (c) 2007-2008 Dave Dribin * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #import "NSObject+DDExtensions.h" #import "DDInvocationGrabber.h" @implementation NSObject (DDExtensions) - (id)dd_invokeOnMainThread; { return [self dd_invokeOnMainThreadAndWaitUntilDone:NO]; } - (id)dd_invokeOnMainThreadAndWaitUntilDone:(BOOL)waitUntilDone; { DDInvocationGrabber * grabber = [DDInvocationGrabber invocationGrabber]; [grabber setForwardInvokesOnMainThread:YES]; [grabber setWaitUntilDone:waitUntilDone]; return [grabber prepareWithInvocationTarget:self]; } @end libircclient-1.10/cocoa/Classes/PaxHeaders.23204/IRCClientSession.m0000644000000000000000000000012411132047270021602 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Classes/IRCClientSession.m0000644000175000001440000007125311132047270022072 0ustar00timusers00000000000000/* * Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #define IRCCLIENTVERSION "1.0" #import "IRCClientSession.h" #import "NSObject+DDExtensions.h" #import "IRCClientChannel.h" #include "string.h" static void onConnect(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onNick(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onQuit(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onJoinChannel(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onPartChannel(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onMode(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onUserMode(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onTopic(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onKick(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onChannelPrvmsg(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onPrivmsg(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onNotice(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onInvite(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onCtcpRequest(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onCtcpReply(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onCtcpAction(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onUnknownEvent(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count); static void onNumericEvent(irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count); @implementation IRCClientSession @synthesize delegate; @synthesize session; @synthesize version; @synthesize server; @synthesize port; @synthesize password; @synthesize nickname; @synthesize username; @synthesize realname; @synthesize channels; @synthesize encoding; -(id)init { if ((self = [super init])) { callbacks.event_connect = onConnect; callbacks.event_nick = onNick; callbacks.event_quit = onQuit; callbacks.event_join = onJoinChannel; callbacks.event_part = onPartChannel; callbacks.event_mode = onMode; callbacks.event_umode = onUserMode; callbacks.event_topic = onTopic; callbacks.event_kick = onKick; callbacks.event_channel = onChannelPrvmsg; callbacks.event_privmsg = onPrivmsg; callbacks.event_notice = onNotice; callbacks.event_invite = onInvite; callbacks.event_ctcp_req = onCtcpRequest; callbacks.event_ctcp_rep = onCtcpReply; callbacks.event_ctcp_action = onCtcpAction; callbacks.event_unknown = onUnknownEvent; callbacks.event_numeric = onNumericEvent; callbacks.event_dcc_chat_req = NULL; callbacks.event_dcc_send_req = NULL; session = irc_create_session(&callbacks); if (!session) { NSLog(@"Could not create irc_session."); return nil; } irc_set_ctx(session, self); unsigned int high, low; irc_get_version (&high, &low); [self setVersion:[NSString stringWithFormat:@"IRCClient Framework v%s (Nathan Ollerenshaw) - libirc v%d.%d (Georgy Yunaev)", IRCCLIENTVERSION, high, low]]; channels = [[[NSMutableDictionary alloc] init] retain]; encoding = NSASCIIStringEncoding; } return self; } -(void)dealloc { if (irc_is_connected(session)) NSLog(@"Warning: IRC Session is not disconnected on dealloc"); irc_destroy_session(session); [channels release]; [super dealloc]; } - (int)connect; { unsigned short sPort = [port intValue]; return irc_connect(session, [server cStringUsingEncoding:encoding], sPort, [password length] > 0 ? [password cStringUsingEncoding:encoding] : NULL , [nickname cStringUsingEncoding:encoding], [username cStringUsingEncoding:encoding], [realname cStringUsingEncoding:encoding]); } - (void)disconnect { irc_disconnect(session); } - (bool)isConnected { return irc_is_connected(session); } - (void)startThread { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; irc_run(session); [pool drain]; } - (void)run { if (thread) { NSLog(@"Thread already running!"); return; } thread = [[NSThread alloc] initWithTarget:self selector:@selector(startThread) object:nil]; [thread retain]; [thread start]; } - (int)sendRawWithFormat:(NSString *)format, ... { va_list ap; va_start(ap, format); NSString *line = [[NSString alloc] initWithFormat:format arguments:ap]; va_end(ap); return irc_send_raw(session, [line cStringUsingEncoding:encoding]); } - (int)quit:(NSString *)reason { return irc_cmd_quit(session, [reason cStringUsingEncoding:encoding]); } - (int)join:(NSString *)channel key:(NSString *)key { NSLog(@"Joining %@", channel); if (!key || ![key length] > 0) return irc_cmd_join(session, [channel cStringUsingEncoding:encoding], NULL); return irc_cmd_join(session, [channel cStringUsingEncoding:encoding], [key cStringUsingEncoding:encoding]); } - (int)list:(NSString *)channel { return irc_cmd_list(session, [channel cStringUsingEncoding:encoding]); } - (int)userMode:(NSString *)mode { return irc_cmd_user_mode(session, [mode cStringUsingEncoding:encoding]); } - (int)nick:(NSString *)newnick { return irc_cmd_nick(session, [newnick cStringUsingEncoding:encoding]); } - (int)whois:(NSString *)nick { return irc_cmd_whois(session, [nick cStringUsingEncoding:encoding]); } - (int)message:(NSString *)message to:(NSString *)target { return irc_cmd_msg(session, [target cStringUsingEncoding:encoding], [message cStringUsingEncoding:encoding]); } - (int)action:(NSString *)action to:(NSString *)target { return irc_cmd_me(session, [target cStringUsingEncoding:encoding], [action cStringUsingEncoding:encoding]); } - (int)notice:(NSString *)notice to:(NSString *)target { return irc_cmd_notice(session, [target cStringUsingEncoding:encoding], [notice cStringUsingEncoding:encoding]); } - (int)ctcpRequest:(NSString *)request target:(NSString *)target { return irc_cmd_ctcp_request(session, [target cStringUsingEncoding:encoding], [request cStringUsingEncoding:encoding]); } - (int)ctcpReply:(NSString *)reply target:(NSString *)target { return irc_cmd_ctcp_reply(session, [target cStringUsingEncoding:encoding], [reply cStringUsingEncoding:encoding]); } @end NSString * getNickFromNickUserHost(NSString *nuh) { NSArray *nuhArray = [nuh componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"!@"]]; if ([nuhArray count] == 3) return [NSString stringWithString:[nuhArray objectAtIndex:0]]; else return [NSString stringWithString:nuh]; } NSString * getUserFromNickUserHost(NSString *nuh) { NSArray *nuhArray = [nuh componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"!@"]]; if ([nuhArray count] == 3) return [NSString stringWithString:[nuhArray objectAtIndex:1]]; else return nil; } NSString * getHostFromNickUserHost(NSString *nuh) { NSArray *nuhArray = [nuh componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"!@"]]; if ([nuhArray count] == 3) return [NSString stringWithString:[nuhArray objectAtIndex:2]]; else return nil; } /*! * The "on_connect" event is triggered when the client successfully * connects to the server, and could send commands to the server. * No extra params supplied; \a params is 0. */ static void onConnect(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); if ([[client delegate] respondsToSelector:@selector(onConnect)]) [[[client delegate] dd_invokeOnMainThread] onConnect]; } /*! * The "nick" event is triggered when the client receives a NICK message, * meaning that someone (including you) on a channel with the client has * changed their nickname. * * \param origin the person, who changes the nick. Note that it can be you! * \param params[0] mandatory, contains the new nick. */ static void onNick(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; NSString *oldNick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; if ([[client nickname] compare:oldNick] == NSOrderedSame) { [client setNickname:nick]; } if ([[client delegate] respondsToSelector:@selector(onNick:oldNick:)]) [[[client delegate] dd_invokeOnMainThread] onNick:nick oldNick:oldNick]; } /*! * The "quit" event is triggered upon receipt of a QUIT message, which * means that someone on a channel with the client has disconnected. * * \param origin the person, who is disconnected * \param params[0] optional, contains the reason message (user-specified). */ static void onQuit(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *reason = [NSString stringWithCString:params[0] encoding:[client encoding]]; if ([[client delegate] respondsToSelector:@selector(onQuit:reason:)]) [[[client delegate] dd_invokeOnMainThread] onQuit:nick reason:reason]; } /*! * The "join" event is triggered upon receipt of a JOIN message, which * means that someone has entered a channel that the client is on. * * \param origin the person, who joins the channel. By comparing it with * your own nickname, you can check whether your JOIN * command succeed. * \param params[0] mandatory, contains the channel name. */ static void onJoinChannel(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *channel = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; NSString *nickOnly = getNickFromNickUserHost(nick); if ([[client nickname] compare:nickOnly] == NSOrderedSame) { // We just joined a channel; allocate an IRCClientChannel object and send it // to the main thread. IRCClientChannel *newChannel = [[IRCClientChannel alloc] initWithName:channel]; [[client channels] setObject:newChannel forKey:channel]; if ([[client delegate] respondsToSelector:@selector(onJoinChannel:)]) [[[client delegate] dd_invokeOnMainThread] onJoinChannel:newChannel]; } else { // Someone joined a channel we're on. IRCClientChannel *currentChannel = [[client channels] objectForKey:channel]; [currentChannel onJoin:nick]; } } /*! * The "part" event is triggered upon receipt of a PART message, which * means that someone has left a channel that the client is on. * * \param origin the person, who leaves the channel. By comparing it with * your own nickname, you can check whether your PART * command succeed. * \param params[0] mandatory, contains the channel name. * \param params[1] optional, contains the reason message (user-defined). */ static void onPartChannel(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *channel = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; NSData *reason = nil; IRCClientChannel *currentChannel = nil; if (count > 1) reason = [NSData dataWithBytes:params[1] length:strlen(params[1])]; if ([[client nickname] compare:nick] == NSOrderedSame) { // We just left a channel; remove it from the channels dict. currentChannel = [[client channels] objectForKey:channel]; [[client channels] removeObjectForKey:channel]; } else { // Someone left a channel we're on. currentChannel = [[client channels] objectForKey:channel]; } [currentChannel onPart:nick reason:[[NSString alloc] initWithData:reason encoding:[currentChannel encoding]]]; } /*! * The "mode" event is triggered upon receipt of a channel MODE message, * which means that someone on a channel with the client has changed the * channel's parameters. * * \param origin the person, who changed the channel mode. * \param params[0] mandatory, contains the channel name. * \param params[1] mandatory, contains the changed channel mode, like * '+t', '-i' and so on. * \param params[2] optional, contains the mode argument (for example, a * key for +k mode, or user who got the channel operator status for * +o mode) */ static void onMode(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *channel = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; NSString *mode = [NSString stringWithCString:params[1] encoding:NSASCIIStringEncoding]; NSString *modeParams = nil; if (count > 2) modeParams = [NSString stringWithCString:params[2] encoding:NSASCIIStringEncoding]; IRCClientChannel *currentChannel = [[client channels] objectForKey:channel]; [currentChannel onMode:mode params:modeParams nick:nick]; } /*! * The "umode" event is triggered upon receipt of a user MODE message, * which means that your user mode has been changed. * * \param origin the person, who changed the channel mode. * \param params[0] mandatory, contains the user changed mode, like * '+t', '-i' and so on. */ static void onUserMode(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *mode = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; if ([[client delegate] respondsToSelector:@selector(onMode:)]) [[[client delegate] dd_invokeOnMainThread] onMode:mode]; } /*! * The "topic" event is triggered upon receipt of a TOPIC message, which * means that someone on a channel with the client has changed the * channel's topic. * * \param origin the person, who changes the channel topic. * \param params[0] mandatory, contains the channel name. * \param params[1] optional, contains the new topic. */ static void onTopic(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *channel = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; NSData *topic = nil; if (count > 1) topic = [NSData dataWithBytes:params[1] length:strlen(params[1])]; IRCClientChannel *currentChannel = [[client channels] objectForKey:channel]; [currentChannel onTopic:[[NSString alloc] initWithData:topic encoding:[currentChannel encoding]] nick:nick]; } /*! * The "kick" event is triggered upon receipt of a KICK message, which * means that someone on a channel with the client (or possibly the * client itself!) has been forcibly ejected. * * \param origin the person, who kicked the poor. * \param params[0] mandatory, contains the channel name. * \param params[1] optional, contains the nick of kicked person. * \param params[2] optional, contains the kick text */ static void onKick(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *byNick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *channel = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; NSString *nick = nil; NSData *reason = nil; if (count > 1) nick = [NSString stringWithCString:params[1] encoding:NSASCIIStringEncoding]; if (count > 2) reason = [NSData dataWithBytes:params[2] length:strlen(params[2])]; if (nick == nil) { // we got kicked IRCClientChannel *currentChannel = [[client channels] objectForKey:channel]; [[client channels] removeObjectForKey:channel]; [currentChannel onKick:[client nickname] reason:[[NSString alloc] initWithData:reason encoding:[currentChannel encoding]] byNick:byNick]; } else { // someone else got booted IRCClientChannel *currentChannel = [[client channels] objectForKey:channel]; [currentChannel onKick:nick reason:[[NSString alloc] initWithData:reason encoding:[currentChannel encoding]] byNick:byNick]; } } /*! * The "channel" event is triggered upon receipt of a PRIVMSG message * to an entire channel, which means that someone on a channel with * the client has said something aloud. Your own messages don't trigger * PRIVMSG event. * * \param origin the person, who generates the message. * \param params[0] mandatory, contains the channel name. * \param params[1] optional, contains the message text */ static void onChannelPrvmsg(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *channel = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; NSData *message = nil; if (count > 1) { message = [NSData dataWithBytes:params[1] length:strlen(params[1])]; IRCClientChannel *currentChannel = [[client channels] objectForKey:channel]; [currentChannel onPrivmsg:[[NSString alloc] initWithData:message encoding:[currentChannel encoding]] nick:nick]; } } /*! * The "privmsg" event is triggered upon receipt of a PRIVMSG message * which is addressed to one or more clients, which means that someone * is sending the client a private message. * * \param origin the person, who generates the message. * \param params[0] mandatory, contains your nick. * \param params[1] optional, contains the message text */ static void onPrivmsg(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSData *message = nil; if (count > 1) { message = [NSData dataWithBytes:params[1] length:strlen(params[1])]; if ([[client delegate] respondsToSelector:@selector(onPrivmsg:nick:)]) [[[client delegate] dd_invokeOnMainThread] onPrivmsg:message nick:nick]; } // we eat privmsgs with no message } /*! * The "notice" event is triggered upon receipt of a NOTICE message * which means that someone has sent the client a public or private * notice. According to RFC 1459, the only difference between NOTICE * and PRIVMSG is that you should NEVER automatically reply to NOTICE * messages. Unfortunately, this rule is frequently violated by IRC * servers itself - for example, NICKSERV messages require reply, and * are NOTICEs. * * \param origin the person, who generates the message. * \param params[0] mandatory, contains the channel name. * \param params[1] optional, contains the message text */ static void onNotice(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *target = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; NSData *notice = nil; IRCClientChannel *currentChannel = [[client channels] objectForKey:target]; if (count > 1) { notice = [NSData dataWithBytes:params[1] length:strlen(params[1])]; if (currentChannel != nil) { [currentChannel onNotice:[[NSString alloc] initWithData:notice encoding:[currentChannel encoding]] nick:nick]; } else { if ([[client delegate] respondsToSelector:@selector(onNotice:nick:)]) [[[client delegate] dd_invokeOnMainThread] onNotice:notice nick:nick]; } } // we eat notices with no message } /*! * The "invite" event is triggered upon receipt of an INVITE message, * which means that someone is permitting the client's entry into a +i * channel. * * \param origin the person, who INVITEs you. * \param params[0] mandatory, contains your nick. * \param params[1] mandatory, contains the channel name you're invited into. * * \sa irc_cmd_invite irc_cmd_chanmode_invite */ static void onInvite(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *channel = [NSString stringWithCString:params[1] encoding:NSASCIIStringEncoding]; if ([[client delegate] respondsToSelector:@selector(onInvite:nick:)]) [[[client delegate] dd_invokeOnMainThread] onInvite:channel nick:nick]; } /*! * The "ctcp" event is triggered when the client receives the CTCP * request. By default, the built-in CTCP request handler is used. The * build-in handler automatically replies on most CTCP messages, so you * will rarely need to override it. * * \param origin the person, who generates the message. * \param params[0] mandatory, the complete CTCP message, including its * arguments. * * Mirc generates PING, FINGER, VERSION, TIME and ACTION messages, * check the source code of \c libirc_event_ctcp_internal function to * see how to write your own CTCP request handler. Also you may find * useful this question in FAQ: \ref faq4 */ static void onCtcpRequest(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; if ( origin ) { char nickbuf[128]; irc_target_get_nick (origin, nickbuf, sizeof(nickbuf)); if ( strstr (params[0], "PING") == params[0] ) { irc_cmd_ctcp_reply (session, nickbuf, params[0]); } else if ( !strcmp (params[0], "VERSION") ) { irc_cmd_ctcp_reply (session, nickbuf, [[NSString stringWithFormat:@"VERSION %@", [client version]] UTF8String]); } else if ( !strcmp (params[0], "FINGER") ) { irc_cmd_ctcp_reply (session, nickbuf, [[NSString stringWithFormat:@"FINGER %@ (%@) Idle 0 seconds", [client username], [client realname]] UTF8String]); } else if ( !strcmp (params[0], "TIME") ) { irc_cmd_ctcp_reply(session, nickbuf, [[[NSDate dateWithTimeIntervalSinceNow:0] descriptionWithCalendarFormat:@"TIME %a %b %e %H:%M:%S %Z %Y" timeZone:nil locale:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]] UTF8String]); } else { if ([[client delegate] respondsToSelector:@selector(onCtcpRequest:type:nick:)]) { NSString *requestString = [[NSString alloc] initWithData:[NSData dataWithBytes:params[0] length:strlen(params[0])] encoding:[client encoding]]; NSRange firstSpace = [requestString rangeOfString:@" "]; NSString *type = [requestString substringToIndex:firstSpace.location]; NSString *request = [requestString substringFromIndex:(firstSpace.location + 1)]; [[[client delegate] dd_invokeOnMainThread] onCtcpRequest:request type:type nick:nick]; } } } } /*! * The "ctcp" event is triggered when the client receives the CTCP reply. * * \param origin the person, who generates the message. * \param params[0] mandatory, the CTCP message itself with its arguments. */ static void onCtcpReply(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSData *reply = [NSData dataWithBytes:params[0] length:strlen(params[0])]; if ([[client delegate] respondsToSelector:@selector(onCtcpReply:nick:)]) [[[client delegate] dd_invokeOnMainThread] onCtcpReply:reply nick:nick]; } /*! * The "action" event is triggered when the client receives the CTCP * ACTION message. These messages usually looks like:\n * \code * [23:32:55] * Tim gonna sleep. * \endcode * * \param origin the person, who generates the message. * \param params[0] mandatory, the target of the message. * \param params[1] mandatory, the ACTION message. */ static void onCtcpAction(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *nick = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSString *target = [NSString stringWithCString:params[0] encoding:NSASCIIStringEncoding]; NSData *action = [NSData dataWithBytes:params[1] length:strlen(params[1])]; IRCClientChannel *currentChannel = [[client channels] objectForKey:target]; if (currentChannel) { // An action on a channel we're on [currentChannel onAction:[[NSString alloc] initWithData:action encoding:[currentChannel encoding]] nick:nick]; } else { // An action in a private message if ([[client delegate] respondsToSelector:@selector(onAction:nick:)]) [[[client delegate] dd_invokeOnMainThread] onAction:action nick:nick]; } } /*! * The "unknown" event is triggered upon receipt of any number of * unclassifiable miscellaneous messages, which aren't handled by the * library. */ static void onUnknownEvent(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSString *eventString = [NSString stringWithCString:event encoding:NSASCIIStringEncoding]; NSString *sender = nil; if (origin != NULL) sender = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSMutableArray *paramsArray = [[NSMutableArray alloc] init]; for (unsigned int i = 0; i < count; i++) [paramsArray addObject:[[NSString alloc] initWithData:[NSData dataWithBytes:params[i] length:strlen(params[i])] encoding:[client encoding]]]; if ([[client delegate] respondsToSelector:@selector(onUnknownEvent:origin:params:)]) [[[client delegate] dd_invokeOnMainThread] onUnknownEvent:eventString origin:sender params:paramsArray]; } /*! * The "numeric" event is triggered upon receipt of any numeric response * from the server. There is a lot of such responses, see the full list * here: \ref rfcnumbers. * * See the params in ::irc_eventcode_callback_t specification. */ static void onNumericEvent(irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count) { IRCClientSession *client = (IRCClientSession *) irc_get_ctx(session); NSUInteger eventNumber = event; NSString *originString = [NSString stringWithCString:origin encoding:NSASCIIStringEncoding]; NSMutableArray *paramsArray = [[NSMutableArray alloc] init]; for (unsigned int i = 0; i < count; i++) [paramsArray addObject:[[NSString alloc] initWithData:[NSData dataWithBytes:params[i] length:strlen(params[i])] encoding:[client encoding]]]; if ([[client delegate] respondsToSelector:@selector(onNumericEvent:origin:params:)]) [[[client delegate] dd_invokeOnMainThread] onNumericEvent:eventNumber origin:originString params:paramsArray]; } libircclient-1.10/cocoa/PaxHeaders.23204/doc0000644000000000000000000000013213340661224015402 xustar0030 mtime=1535337108.214355232 30 atime=1535337108.214355232 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/0000755000175000001440000000000013340661224015740 5ustar00timusers00000000000000libircclient-1.10/cocoa/doc/PaxHeaders.23204/html0000644000000000000000000000013213340661224016346 xustar0030 mtime=1535337108.218355143 30 atime=1535337108.214355232 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/0000755000175000001440000000000013340661224016704 5ustar00timusers00000000000000libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/functions_prop.html0000644000000000000000000000012411132047270022356 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/functions_prop.html0000644000175000001440000000725511132047270022647 0ustar00timusers00000000000000 IRCClient: Class Members - Properties
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/files.html0000644000000000000000000000012411132047270020410 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/files.html0000644000175000001440000000471111132047270020673 0ustar00timusers00000000000000 IRCClient: File Index

File List

Here is a list of all documented files with brief descriptions:
DDInvocationGrabber.h [code]
IRCClientChannel.h [code]Represents a connected IRC Channel
IRCClientChannelDelegate.h [code]Receives delegate messages from an IRCClientChannel
IRCClientSession.h [code]Represents a connected IRC Session
IRCClientSessionDelegate.h [code]
NSObject+DDExtensions.h [code]

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/index.html0000644000000000000000000000012411132047270020415 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/index.html0000644000175000001440000000757211132047270020710 0ustar00timusers00000000000000 IRCClient: IRCClient - a Cocoa IRC Framework to create IRC clients

IRCClient - a Cocoa IRC Framework to create IRC clients

1.0

Introduction

IRCClient is a Cocoa Framework that uses the excellent libircclient library written by Georgy Yunaev.

Basic Usage

To use this framework, you will need to write an IRCClientSessionDelegate to handle all of the events generated by the server, and an IRCClientChannelDelegate to handle all of the events generated by channels on that server.

You then create an IRCClientSession object in your code, assign the required properties, and call connect: to connect to the server and run: to create the new thread and start receiving events. For example:

 IRCClientSession *session = [[IRCClientSession alloc] init];
 MyIRCClientSessionDelegate *controller = [[MyIRCClientSessionDelegate alloc] init];
 
 [session setDelegate:controller];
 [controller setSession:session];
 
 [session setServer:@"irc.dal.net"];
 [session setPort:@"6667"];
 [session setNickname:@"test"];
 [session setUsername:@"test"];
 [session setRealname:@"test"];
 [session connect];
 
 [session run]; //starts the thread

Author, copyright, support.

If you have any questions, bug reports, suggestions regarding libircclient or the IRCClient framework, please visit http://libircclient.sourceforge.net

 libircclient Copyright (C) 2004-2009 Georgy Yunaev gyunaev@ulduzsoft.com
 IRCClient Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net

 This library is free software; you can redistribute it and/or modify it 
 under the terms of the GNU Lesser General Public License as published by 
 the Free Software Foundation; either version 2 of the License, or (at your 
 option) any later version.

 This library 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 Lesser General Public 
 License for more details.
 

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/interface_i_r_c_client_channel.html0000644000000000000000000000012411132047270025427 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/interface_i_r_c_client_channel.html0000644000175000001440000005132011132047270025710 0ustar00timusers00000000000000 IRCClient: IRCClientChannel Class Reference

IRCClientChannel Class Reference

Represents a connected IRC Channel. More...

#import <IRCClientChannel.h>

Inheritance diagram for IRCClientChannel:

List of all members.

Public Member Functions

(id) - initWithName:
(int) - part
(int) - invite:
(void) - setTopic:
(int) - setMode:params:
(int) - message:
(int) - action:
(int) - notice:
(int) - kick:reason:
(int) - ctcpRequest:

Properties

id delegate
NSString * name
NSStringEncoding encoding
IRCClientSessionsession
NSString * topic
NSString * modes
NSMutableArray * names


Detailed Description

Represents a connected IRC Channel.

IRCClientChannel objects are created by the IRCClientSession object for a given session when the client joins an IRC channel. At that time you are expected to register event handlers for each of the delegate methods described in the IRCClientChannelDelegate interface.


Member Function Documentation

- (int) action: (NSString *)  action  

Sends a public CTCP ACTION to the channel.

Parameters:
action action to send to the channel.

- (int) ctcpRequest: (NSString *)  request  

Sends a CTCP request to the channel.

It is perfectly legal to send a CTCP request to an IRC channel, however many clients decline to respond to them, and often they are percieved as annoying.

Parameters:
request the string of the request, in CTCP format.

- (id) initWithName: (NSString *)  aName  

initWithName:

Returns an initialised IRCClientChannel with a given channel name. You are not expected to initialise your own IRCClientChannel objects; if you wish to join a channel you should send a [IRCClientSession join:key:] message to your IRCClientSession object.

Parameters:
aName Name of the channel.

- (int) invite: (NSString *)  nick  

Invites another IRC client to the channel.

Parameters:
nick the nickname of the client to invite.

- (int) kick: (NSString *)  nick
reason: (NSString *)  reason 

Kicks someone from a channel.

Parameters:
nick the IRC client to kick from the channel.
reason the message to give to the channel and the IRC client for the kick.

- (int) message: (NSString *)  message  

Sends a public PRIVMSG to the channel. If you try to send more than can fit on an IRC buffer, it will be truncated.

Parameters:
message the message to send to the channel.

- (int) notice: (NSString *)  notice  

Sends a public NOTICE to the channel.

Parameters:
notice message to send to the channel.

- (int) part  

Parts the channel.

- (int) setMode: (NSString *)  mode
params: (NSString *)  params 

Sets the mode of the channel.

Note that not all users on a channel have permission to change the mode; if you fail to set the mode, then you will not see an onMode event on the IRCClientChannelDelegate.

Parameters:
mode the mode to set the channel to
params paramaters for the mode, if it requires parameters.

- (void) setTopic: (NSString *)  aTopic  

Sets the topic of the channel.

Note that not all users on a channel have permission to change the topic; if you fail to set the topic, then you will not see an onTopic event on the IRCClientChannelDelegate.

Parameters:
aTopic the topic the client wishes to set for the channel.


Property Documentation

- (id) delegate [read, write, assign]

Delegate to send events to

- (NSStringEncoding) encoding [read, write, assign]

Encoding used by this channel

- (NSString *) modes [read, write, copy]

Mode of the channel

- (NSString *) name [read, write, copy]

Name of the channel

- (NSMutableArray *) names [read, assign]

An array of nicknames stored as NSStrings that list the connected users for the channel

- (IRCClientSession *) session [read, write, assign]

Associated IRCClientSession object

- (NSString *) topic [read, write, copy]

Topic of the channel


The documentation for this class was generated from the following files:

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/_i_r_c_client_channel_delegate_8h-source.html0000644000000000000000000000012411132047270027275 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/_i_r_c_client_channel_delegate_8h-source.html0000644000175000001440000000753211132047270027564 0ustar00timusers00000000000000 IRCClient: IRCClientChannelDelegate.h Source File
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/class_n_s_object_07_i_r_c_client_channel_delegate_0000644000000000000000000000012411132047270030315 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/class_n_s_object_07_i_r_c_client_channel_delegate_08-members.html0000644000175000001440000001001411132047270033334 0ustar00timusers00000000000000 IRCClient: Member List
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/_i_r_c_client_channel_8h-source.html0000644000000000000000000000012411132047270025443 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/_i_r_c_client_channel_8h-source.html0000644000175000001440000001710411132047270025726 0ustar00timusers00000000000000 IRCClient: IRCClientChannel.h Source File
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/functions.html0000644000000000000000000000012411132047270021316 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/functions.html0000644000175000001440000003137711132047270021611 0ustar00timusers00000000000000 IRCClient: Class Members
Here is a list of all documented class members with links to the class documentation for each member:

- a -

- c -

- d -

- e -

- i -

- j -

- k -

- l -

- m -

- n -

- o -

- p -

- q -

- r -

- s -

- t -

- u -

- v -

- w -


Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/tab_b.gif0000644000000000000000000000012411132047270020156 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/tab_b.gif0000644000175000001440000000004311132047270020433 0ustar00timusers00000000000000GIF89a,D;libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/interface_i_r_c_client_channel.png0000644000000000000000000000012411132047270025247 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/interface_i_r_c_client_channel.png0000644000175000001440000000062011132047270025525 0ustar00timusers00000000000000PNG  IHDRoP6+PLTE`{tRNS@f&IDATX햱 LSw&^$PKZ;ɵ$|IVc!G01: @rZz`P0#\ rb$ICk)hé*5od@JvAYتGk4;,Tk? ?vk.۲ ^'8 Np~6_u@[ (6g7i 쒊1w"է:(EǨCv{Э3y; r" pPUg@(+U-xl>tGGn s&;.TQIENDB`libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/_n_s_object_09_d_d_extensions_8h-source.html0000644000000000000000000000012411132047270027044 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/_n_s_object_09_d_d_extensions_8h-source.html0000644000175000001440000001022611132047270027325 0ustar00timusers00000000000000 IRCClient: NSObject+DDExtensions.h Source File
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/doxygen.png0000644000000000000000000000012411132047270020603 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/doxygen.png0000644000175000001440000000240111132047270021060 0ustar00timusers00000000000000PNG  IHDRd-ok>gAMAOX2tEXtSoftwareAdobe ImageReadyqe<]PLTEǾ"&ﶻޠ{ԍ눙נED9hg]_X<@:#mhU1tRNSvIDATxbC: d#h` @X",***LK.], X@t b @BD6%""  % B:Hf@ RPy"K`\PbC(!II!h(!Cąl!0[X\J\$TM(>a$S @ Ш@R.$LJBRAG1 (FPhhT%!`&q%u P    CT$B|Wl!B`R$( @A%%@,(%$RPmB U`1IYB  99\1 yCCCf"[N'=TGȒl8^K5<SRɤ%@@  b1qAXH&BR y nP4A j>  t!+(.WQA2MU܂ `1%`19F< 3cZ`e!\ D+. 83!lYYA -6EJV @XXX 4 @86`RdB4I " "@xrʌHA`f ȰC"XV0C b@2H ȓ p)!( 04)(%R $Tʀbb,s@7 Ѱ?f֗\PIx!I"Ȉ3 QYt^^gv- }>WJOAV`$&#88\FF SFJ$ƀƊ 4 - Hf ?5 k1d, ."FˀI"4Hgx|fm)))9. aMD& X@t b @%DK.], X@t b @d`ɽSOIENDB`libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/_i_r_c_client_channel_delegate_8h.html0000644000000000000000000000012411132047270025777 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/_i_r_c_client_channel_delegate_8h.html0000644000175000001440000000572211132047270026265 0ustar00timusers00000000000000 IRCClient: IRCClientChannelDelegate.h File Reference

IRCClientChannelDelegate.h File Reference

Receives delegate messages from an IRCClientChannel. More...

#import <Cocoa/Cocoa.h>

Go to the source code of this file.

Classes

class  NSObject(IRCClientChannelDelegate)
 Receives delegate messages from an IRCClientChannel. More...


Detailed Description

Receives delegate messages from an IRCClientChannel.

Receives delegate messages from an IRCClientSession.

Author:
Nathan Ollerenshaw
Version:
1.0
Date:
01.2009
Author:
Nathan Ollerenshaw
Version:
1.0
Date:
01.2009

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/tab_r.gif0000644000000000000000000000012411132047270020176 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/tab_r.gif0000644000175000001440000000503111132047270020455 0ustar00timusers00000000000000GIF89a,薴ŝɯͻ,,@pH,Ȥrl:ШtJZجv h d@L"F:򑐌$9 (8&Nz (GFB^!˨)WVl)1 w̥.wY0Ib|Hpf:e pJ}Ȧ6nz 80%"8v~ @JЂMBІ:D'ZPKF ּ&16юz HGJRb L5Җ0LgJӚ#(e>Ӟ@ PJԢHMRԦ:PTJժ&5;%Uծz` XJVCjYֶp\Uxͫ^׾i)$Mb:v, ಘͬf7z hGKҚMjWֺ*$SPͭnwm +Mr:E?9Zͮv9" xKbLz^A|ͯ0/LN(; n0'LaJ0{/{ؘG|(SCr. v1wc6@LdHNd/PLeOXp|+s2L_153M5t3_:wsgʹπp?/FFЎt!-JҖ1NӞuA-Pԝ>53UWծ4cYZѶsA׀5,aƶ3=e3~-3Sc6mo2Mq>7ӭn$D~7,y1m}v\/N3#S\gu-mO0C\'_S^|.c.0ל49~s=3d:u)?F;ˮW|;W)vt˽w|=xA;libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/classes.html0000644000000000000000000000012411132047270020743 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/classes.html0000644000175000001440000000456711132047270021237 0ustar00timusers00000000000000 IRCClient: Alphabetical List
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/interface_n_s_object_07_i_r_c_client_channel_deleg0000644000000000000000000000012411132047270030317 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/interface_n_s_object_07_i_r_c_client_channel_delegate_08.html0000644000175000001440000004077511132047270032560 0ustar00timusers00000000000000 IRCClient: NSObject(IRCClientChannelDelegate) Class Reference

NSObject(IRCClientChannelDelegate) Class Reference

Receives delegate messages from an IRCClientChannel. More...

#import <IRCClientChannelDelegate.h>

List of all members.

Public Member Functions

(void) - onJoin:
(void) - onPart:reason:
(void) - onMode:params:nick:
(void) - onTopic:nick:
(void) - onKick:reason:byNick:
(void) - onPrivmsg:nick:
(void) - onNotice:nick:
(void) - onAction:nick:


Detailed Description

Receives delegate messages from an IRCClientChannel.

Each IRCClientChannel object needs a delegate. Delegate methods are called for each event that occurs on an IRC channel that the client is current on.

Note that for any given parameter, it may be optional, in which case a nil object may be supplied instead of the given parameter.


Member Function Documentation

- (void) onAction: (NSString *)  action
nick: (NSString *)  nick 

Received when an IRC client sends a CTCP ACTION message to the channel. used by lamers with no life to pretend that they are playing some form of MMORPG.

Parameters:
action the action message sent to the channel.
nick the nickname of the IRC client that sent the message.

- (void) onJoin: (NSString *)  nick  

When a client joins this channel, the onJoin event is fired. Note that the nickname is most likely in nick!user@host format, but may simply be a nickname, depending on the server implementation.

You should also expect to see this event when the client first joins a channel, with a parameter of the client's nickname.

Parameters:
nick The nickname of the user that joined the channel.

- (void) onKick: (NSString *)  nick
reason: (NSString *)  reason
byNick: (NSString *)  byNick 

Received when an IRC client is kicked from a channel.

Parameters:
nick nickname of the client that was kicked
reason reason message given for the kick
byNick nickname of the client that performed the kick command

- (void) onMode: (NSString *)  mode
params: (NSString *)  params
nick: (NSString *)  nick 

Received when an IRC client changes the channel mode. What modes are available for a given channel is an implementation detail for each server.

Parameters:
mode the new channel mode.
params any parameters with the mode (such as channel key).
nick the nickname of the IRC client that changed the mode.

- (void) onNotice: (NSString *)  notice
nick: (NSString *)  nick 

Received when an IRC client sends a public NOTICE to the channel. Note that the user may not necessarily be required to be on the channel to send a notice to it. Furthermore, the RFC states that the only difference between PRIVMSG and NOTICE is that a NOTICE may never be responded to automatically.

Parameters:
notice the notice sent to the channel.
nick the nickname of the IRC client that sent the notice.

- (void) onPart: (NSString *)  nick
reason: (NSString *)  reason 

When an IRC client parts a channel you are connect to, you will see an onPart event. You will also see this event when you part a channel.

Parameters:
nick (required) The nickname of the user that left the channel.
reason (optional) The reason, if any, that the user gave for leaving.

- (void) onPrivmsg: (NSString *)  message
nick: (NSString *)  nick 

Received when an IRC client sends a public PRIVMSG to the channel. Note that the user may not necessarily be required to be on the channel to send a message to it.

Parameters:
message the message sent to the channel.
nick the nickname of the IRC client that sent the message.

- (void) onTopic: (NSString *)  aTopic
nick: (NSString *)  nick 

Received when the topic is changed for the channel.

Parameters:
aTopic The new topic of the channel.
nick Nickname of the IRC client that changed the topic.


The documentation for this class was generated from the following file:

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/tabs.css0000644000000000000000000000012411132047270020063 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/tabs.css0000644000175000001440000000333211132047270020344 0ustar00timusers00000000000000/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ DIV.tabs { float : left; width : 100%; background : url("tab_b.gif") repeat-x bottom; margin-bottom : 4px; } DIV.tabs UL { margin : 0px; padding-left : 10px; list-style : none; } DIV.tabs LI, DIV.tabs FORM { display : inline; margin : 0px; padding : 0px; } DIV.tabs FORM { float : right; } DIV.tabs A { float : left; background : url("tab_r.gif") no-repeat right top; border-bottom : 1px solid #84B0C7; font-size : 8px; font-weight : bold; text-decoration : none; } DIV.tabs A:hover { background-position: 100% -150px; } DIV.tabs A:link, DIV.tabs A:visited, DIV.tabs A:active, DIV.tabs A:hover { color: #1A419D; } DIV.tabs SPAN { float : left; display : block; background : url("tab_l.gif") no-repeat left top; padding : 5px 9px; white-space : nowrap; } DIV.tabs INPUT { float : right; display : inline; font-size : 1em; } DIV.tabs TD { font-size : 8px; font-weight : bold; text-decoration : none; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ DIV.tabs SPAN {float : none;} /* End IE5-Mac hack */ DIV.tabs A:hover SPAN { background-position: 0% -150px; } DIV.tabs LI.current A { background-position: 100% -150px; border-width : 0px; } DIV.tabs LI.current SPAN { background-position: 0% -150px; padding-bottom : 6px; } DIV.navpath { background : none; border : none; border-bottom : 1px solid #84B0C7; } libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/_d_d_invocation_grabber_8h-source.html0000644000000000000000000000012411132047270026005 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/_d_d_invocation_grabber_8h-source.html0000644000175000001440000002656211132047270026300 0ustar00timusers00000000000000 IRCClient: DDInvocationGrabber.h Source File
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/_i_r_c_client_session_delegate_8h-source.html0000644000000000000000000000012411132047270027350 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/_i_r_c_client_session_delegate_8h-source.html0000644000175000001440000001132411132047270027631 0ustar00timusers00000000000000 IRCClient: IRCClientSessionDelegate.h Source File
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/interface_n_s_object_07_i_r_c_client_session_deleg0000644000000000000000000000012411132047270030372 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/interface_n_s_object_07_i_r_c_client_session_delegate_08.html0000644000175000001440000005716511132047270032634 0ustar00timusers00000000000000 IRCClient: NSObject(IRCClientSessionDelegate) Class Reference

NSObject(IRCClientSessionDelegate) Class Reference

Receives delegate messages from an IRCClientSession. More...

#import <IRCClientSessionDelegate.h>

List of all members.

Public Member Functions

(void) - onConnect
(void) - onNick:oldNick:
(void) - onQuit:reason:
(void) - onJoinChannel:
(void) - onMode:
(void) - onPrivmsg:nick:
(void) - onNotice:nick:
(void) - onInvite:nick:
(void) - onCtcpRequest:type:nick:
(void) - onCtcpReply:nick:
(void) - onAction:nick:
(void) - onUnknownEvent:origin:params:
(void) - onNumericEvent:origin:params:


Detailed Description

Receives delegate messages from an IRCClientSession.

Each IRCClientSession object needs a single delegate. Methods are called for each event that occurs on an IRC server that the client is connected to.

Note that for any given parameter, it may be optional, in which case a nil object may be supplied instead of the given parameter.


Member Function Documentation

- (void) onAction: (NSData *)  action
nick: (NSString *)  nick 

A private CTCP ACTION was sent to the IRC client.

CTCP ACTION is not limited to channels; it may also be sent directly to other users.

Parameters:
action the action message text.
nick the nickname of the client that sent the action.

- (void) onConnect  

The client has successfully connected to the IRC server.

- (void) onCtcpReply: (NSData *)  reply
nick: (NSString *)  nick 

A private CTCP reply was sent to the IRC client.

Parameters:
reply an NSData containing the raw C string of the reply.
nick the nickname of the user that sent the reply.

- (void) onCtcpRequest: (NSString *)  request
type: (NSString *)  type
nick: (NSString *)  nick 

A private CTCP request was sent to the IRC client.

Parameters:
request the CTCP request string (after the type)
type the CTCP request type
nick the nickname of the user that sent the request.

- (void) onInvite: (NSString *)  channel
nick: (NSString *)  nick 

The IRC client has been invited to a channel.

Parameters:
channel the channel for the invitation.
nick the nickname of the user that sent the invitation.

- (void) onJoinChannel: (IRCClientChannel *)  channel  

The IRC client has joined (connected) successfully to a new channel. This event creates an IRCClientChannel object, which you are expected to asign a delegate to, to handle events from the channel.

For example, on receipt of this message, a graphical IRC client would most likely open a new window, create an IRCClientChannelDelegate for the window, set the new IRCClientChannel's delegate to the new delegate, and then hook it up so that new events sent to the IRCClientChannelDelegate are sent to the window.

Parameters:
channel the IRCClientChannel object for the newly joined channel.

- (void) onMode: (NSString *)  mode  

The client has changed it's user mode.

Parameters:
mode the new mode.

- (void) onNick: (NSString *)  nick
oldNick: (NSString *)  oldNick 

An IRC client on a channel that this client is connected to has changed nickname, or this IRC client has changed nicknames.

Parameters:
nick the new nickname
oldNick the old nickname

- (void) onNotice: (NSData *)  notice
nick: (NSString *)  nick 

The client has received a private NOTICE from another client.

Parameters:
notice the text of the message
nick the nickname of the other IRC client that sent the message.

- (void) onNumericEvent: (NSUInteger)  event
origin: (NSString *)  origin
params: (NSArray *)  params 

An unhandled numeric was received from the IRC server

Parameters:
event the unknown event number
origin the sender of the event
params an NSArray of NSData objects that are the raw C strings of the event.

- (void) onPrivmsg: (NSData *)  message
nick: (NSString *)  nick 

The client has received a private PRIVMSG from another IRC client.

Parameters:
message the text of the message
nick the other IRC Client that sent the message.

- (void) onQuit: (NSString *)  nick
reason: (NSString *)  reason 

An IRC client on a channel that this client is connected to has quit IRC.

Parameters:
nick the nickname of the client that quit.
reason (optional) the quit message, if any.

- (void) onUnknownEvent: (NSString *)  event
origin: (NSString *)  origin
params: (NSArray *)  params 

An unhandled event was received from the IRC server.

Parameters:
event the unknown event name
origin the sender of the event
params an NSArray of NSData objects that are the raw C strings of the event.


The documentation for this class was generated from the following file:

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/doxygen.css0000644000000000000000000000012411132047270020607 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/doxygen.css0000644000175000001440000001311711132047270021072 0ustar00timusers00000000000000body, table, div, p, dl { font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; font-size: 12px; } /* @group Heading Levels */ h1 { text-align: center; font-size: 150%; } h2 { font-size: 120%; } h3 { font-size: 100%; } /* @end */ caption { font-weight: bold; } div.qindex, div.navpath, div.navtab{ background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; padding: 2px; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #153788; font-weight: normal; text-decoration: none; } .contents a:visited { color: #1b77c5; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #6666cc; color: #ffffff; border: 1px double #9295C2; } a.el { font-weight: bold; } a.elRef { } a.code { } a.codeRef { } /* @end */ dl.el { margin-left: -1cm; } .fragment { font-family: monospace, fixed; font-size: 105%; } pre.fragment { border: 1px solid #CCCCCC; background-color: #f5f5f5; padding: 4px 6px; margin: 4px 8px 4px 2px; } div.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } div.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background: white; color: black; margin-right: 20px; margin-left: 20px; } td.indexkey { background-color: #e8eef2; font-weight: bold; border: 1px solid #CCCCCC; margin: 2px 0px 2px 0; padding: 2px 10px; } td.indexvalue { background-color: #e8eef2; border: 1px solid #CCCCCC; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #f0f0f0; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } /* @end */ .search { color: #003399; font-weight: bold; } form.search { margin-bottom: 0px; margin-top: 0px; } input.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } td.tiny { font-size: 75%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #84b0c7; } th.dirtab { background: #e8eef2; font-weight: bold; } hr { height: 0; border: none; border-top: 1px solid #666; } /* @group Member Descriptions */ .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #FAFAFA; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memItemLeft, .memItemRight, .memTemplParams { border-top: 1px solid #ccc; } .memTemplParams { color: #606060; } /* @end */ /* @group Member Details */ /* Styles for detailed member documentation */ .memtemplate { font-size: 80%; color: #606060; font-weight: normal; margin-left: 3px; } .memnav { background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .memitem { padding: 0; } .memname { white-space: nowrap; font-weight: bold; } .memproto, .memdoc { border: 1px solid #84b0c7; } .memproto { padding: 0; background-color: #d5e1e8; font-weight: bold; -webkit-border-top-left-radius: 8px; -webkit-border-top-right-radius: 8px; -moz-border-radius-topleft: 8px; -moz-border-radius-topright: 8px; } .memdoc { padding: 2px 5px; background-color: #eef3f5; border-top-width: 0; -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px; } .memdoc p, .memdoc dl, .memdoc ul { margin: 6px 0; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } /* @end */ /* @group Directory (tree) */ /* for the tree view */ .ftvtree { font-family: sans-serif; margin: 0.5em; } /* these are for tree view when used as main index */ .directory { font-size: 9pt; font-weight: bold; } .directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } /* The following two styles can be used to replace the root node title with an image of your choice. Simply uncomment the next two styles, specify the name of your image and be sure to set 'height' to the proper pixel height of your image. */ /* .directory h3.swap { height: 61px; background-repeat: no-repeat; background-image: url("yourimage.gif"); } .directory h3.swap span { display: none; } */ .directory > h3 { margin-top: 0; } .directory p { margin: 0px; white-space: nowrap; } .directory div { display: none; margin: 0px; } .directory img { vertical-align: -30%; } /* these are for tree view when not used as main index */ .directory-alt { font-size: 100%; font-weight: bold; } .directory-alt h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } .directory-alt > h3 { margin-top: 0; } .directory-alt p { margin: 0px; white-space: nowrap; } .directory-alt div { display: none; margin: 0px; } .directory-alt img { vertical-align: -30%; } /* @end */ address { font-style: normal; color: #333; } libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/_i_r_c_client_session_8h-source.html0000644000000000000000000000012411132047270025516 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/_i_r_c_client_session_8h-source.html0000644000175000001440000002041411132047270025777 0ustar00timusers00000000000000 IRCClient: IRCClientSession.h Source File
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/tab_l.gif0000644000000000000000000000012411132047270020170 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/tab_l.gif0000644000175000001440000000130211132047270020444 0ustar00timusers00000000000000GIF89a ,薴ŝɯͻ, ,@P`H$!%CqVe2XJ(Ġ+3 2$ kv-u*"}|}|~q(" $f 'l(&&$r & !){rƲεҽͼиP?Bm A%V܈!k/Đ;^$Ɩ#Mf)f͇(WLK҄ I)L:eD Cx*4 Uh %A^NKbeXkx!2t !5t]$%X.i[]YfEkg`:zҞ;}jaaM׸c瞽vۺ8ȋ'?9積G_>yu_ߞ]zw߭Ǿm浏G~თ/>٫|W}v;libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/class_i_r_c_client_channel-members.html0000644000000000000000000000012411132047270026224 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/class_i_r_c_client_channel-members.html0000644000175000001440000001651011132047270026507 0ustar00timusers00000000000000 IRCClient: Member List
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/functions_func.html0000644000000000000000000000012411132047270022331 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/functions_func.html0000644000175000001440000002426311132047270022620 0ustar00timusers00000000000000 IRCClient: Class Members - Functions
 

- a -

- c -

- d -

- i -

- j -

- k -

- l -

- m -

- n -

- o -

- p -

- q -

- r -

- s -

- u -

- w -


Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/interface_i_r_c_client_session.png0000644000000000000000000000012411132047270025322 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/interface_i_r_c_client_session.png0000644000175000001440000000062111132047270025601 0ustar00timusers00000000000000PNG  IHDRlP(PLTE`{tRNS@f'IDATX햽0aq)ԝ/&MSE%~Z]a#,bVYML lPB'1Ҳ`1=!XtVHeL&5|d&Lvy7kȵ|5vĦz"v$6 l`&?S::N aT%hT'j փ^ T}*V~2z[ccH AQ;K*[kKsE( %$.' Dp',ʈOIENDB`libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/_i_r_c_client_session_8h.html0000644000000000000000000000012411132047270024220 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/_i_r_c_client_session_8h.html0000644000175000001440000000437211132047270024506 0ustar00timusers00000000000000 IRCClient: IRCClientSession.h File Reference

IRCClientSession.h File Reference

Represents a connected IRC Session. More...

#import <Cocoa/Cocoa.h>
#import "IRCClientSessionDelegate.h"
#include "libircclient.h"

Go to the source code of this file.

Classes

class  IRCClientSession
 Represents a connected IRC Session. More...


Detailed Description

Represents a connected IRC Session.

Author:
Nathan Ollerenshaw
Version:
1.0
Date:
01.2009

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/class_n_s_object_07_i_r_c_client_session_delegate_0000644000000000000000000000012411132047270030370 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/class_n_s_object_07_i_r_c_client_session_delegate_08-members.html0000644000175000001440000001320611132047270033415 0ustar00timusers00000000000000 IRCClient: Member List
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/annotated.html0000644000000000000000000000012411132047270021263 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/annotated.html0000644000175000001440000000453511132047270021552 0ustar00timusers00000000000000 IRCClient: Class List

Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
IRCClientChannelRepresents a connected IRC Channel
IRCClientSessionRepresents a connected IRC Session
NSObject(IRCClientChannelDelegate)Receives delegate messages from an IRCClientChannel
NSObject(IRCClientSessionDelegate)Receives delegate messages from an IRCClientSession

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/hierarchy.html0000644000000000000000000000012411132047270021264 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/hierarchy.html0000644000175000001440000000341511132047270021547 0ustar00timusers00000000000000 IRCClient: Hierarchical Index

Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/class_i_r_c_client_session-members.html0000644000000000000000000000012411132047270026277 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/class_i_r_c_client_session-members.html0000644000175000001440000002547111132047270026570 0ustar00timusers00000000000000 IRCClient: Member List
Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/_i_r_c_client_channel_8h.html0000644000000000000000000000012411132047270024145 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/doc/html/_i_r_c_client_channel_8h.html0000644000175000001440000000441411132047270024430 0ustar00timusers00000000000000 IRCClient: IRCClientChannel.h File Reference

IRCClientChannel.h File Reference

Represents a connected IRC Channel. More...

#import <Cocoa/Cocoa.h>
#import "IRCClientChannelDelegate.h"

Go to the source code of this file.

Classes

class  IRCClientChannel
 Represents a connected IRC Channel. More...


Detailed Description

Represents a connected IRC Channel.

Author:
Nathan Ollerenshaw
Version:
1.0
Date:
01.2009

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/doc/html/PaxHeaders.23204/interface_i_r_c_client_session.html0000644000000000000000000000012411132047270025502 xustar0027 mtime=1231572664.408484 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/cocoa/doc/html/interface_i_r_c_client_session.html0000644000175000001440000007456311132047270026001 0ustar00timusers00000000000000 IRCClient: IRCClientSession Class Reference

IRCClientSession Class Reference

Represents a connected IRC Session. More...

#import <IRCClientSession.h>

Inheritance diagram for IRCClientSession:

List of all members.

Public Member Functions

(int) - connect
(void) - disconnect
(bool) - isConnected
(void) - run
(int) - sendRawWithFormat:
(int) - quit:
(int) - join:key:
(int) - list:
(int) - userMode:
(int) - nick:
(int) - whois:
(int) - message:to:
(int) - action:to:
(int) - notice:to:
(int) - ctcpRequest:target:
(int) - ctcpReply:target:

Properties

id delegate
irc_session_t * session
NSString * version
NSString * server
NSString * port
NSString * password
NSString * nickname
NSString * username
NSString * realname
NSMutableDictionary * channels
NSStringEncoding encoding


Detailed Description

Represents a connected IRC Session.

IRCClientSession represents a single connection to an IRC server. On initialising the object, and setting the delegate, server, port, password, nickname, username and realname properties, you call the connect: and run: methods to connect to the IRC server and start a new thread.

This thread then sends messages back to the main runloop to the IRC server delegate, or to the IRCClientChannel delegate as required.


Member Function Documentation

- (int) action: (NSString *)  action
to: (NSString *)  target 

send a CTCP ACTION to another IRC client

Parameters:
action the action message to send
target the nickname of the irc client to send the message to.

- (int) connect  

Connect to the IRC server.

Note that this performs the initial DNS lookup and the TCP connection, so if there are any problems you will be notified via the return code of the message.

Look at the libircclient documentation for the different return codes.

- (int) ctcpReply: (NSString *)  reply
target: (NSString *)  target 

send a CTCP reply to another IRC client

Parameters:
reply the CTCP reply string to send
target the nickname of the IRC client to send the reply to.

- (int) ctcpRequest: (NSString *)  request
target: (NSString *)  target 

send a CTCP request to another IRC client

Parameters:
request the CTCP request string to send
target the nickname of the IRC client to send the request to.

- (void) disconnect  

Disconnect from the IRC server.

This always works, as it simply shuts down the socket. If you want to disconnect in a friendly way, you should use the quit: message.

- (bool) isConnected  

returns YES if the server is currently connected successfully, and NO if it is not.

- (int) join: (NSString *)  channel
key: (NSString *)  key 

Joins a channel with a given name and key

Parameters:
channel the channel to join
key they key for the channel (may be nil)

- (int) list: (NSString *)  channel  

lists channels on the IRC server.

Parameters:
channel a channel name or string to pass to the LIST command. Implementation specific.

- (int) message: (NSString *)  message
to: (NSString *)  target 

send a PRIVMSG to another IRC client

Parameters:
message message to send
target the other IRC client to send the message to.

- (int) nick: (NSString *)  newnick  

sets the IRC client nickname. On success, an onNick event will be sent to the delegate

Parameters:
newnick new nickname to set.

- (int) notice: (NSString *)  notice
to: (NSString *)  target 

send a NOTICE to another IRC client

Parameters:
notice the message text to send
target the nickname of the irc client to send the notice to.

- (int) quit: (NSString *)  reason  

quits the IRC server with the given reason. On success, an onQuit event will be sent to the IRCClientSessionDelegate with the nickname of the IRC client.

The format is a standard NSString format string, followed by optional arguments.

- (void) run  

Starts a new thread and starts the libircclient runloop, processing events and firing messages back to the main runloop as required. Calling this again will do nothing other than raise a warning in your logs.

- (int) sendRawWithFormat: (NSString *)  format
,   ... 

Sends a raw message to the IRC server. Please consult rfc1459 for the format of IRC commands.

- (int) userMode: (NSString *)  mode  

sets the user mode for the IRC client

Parameters:
mode string to set

- (int) whois: (NSString *)  nick  

sends a WHOIS request to the IRC server

Parameters:
nick nickname of the irc client to whois.


Property Documentation

- (NSMutableDictionary *) channels [read, assign]

An NSMutableDictionary of channels that the client is currently connected to.

You should not modify this.

- (id) delegate [read, write, assign]

delegate to send events to.

- (NSStringEncoding) encoding [read, write, assign]

The default text encoding for messages on this server.

This affects messages received via PRIVMSG and NOTICE, and TOPIC in a channel. You may change this at any time.

- (NSString *) nickname [read, write, copy]

Nickname of the connected client. Note that setting this after connection will not result in the client renaming on IRC. You need to send a nick: message instead.

- (NSString *) password [read, write, copy]

Server password to provide on connect (may be left empty or nil)

- (NSString *) port [read, write, copy]

IRC port to connect to

- (NSString *) realname [read, write, copy]

Realname of the connected client.

Setting this after connection does nothing.

- (NSString *) server [read, write, copy]

IRC server to connect to

- (irc_session_t *) session [read, write, assign]

The underlying libircclient handle

- (NSString *) username [read, write, copy]

Username of the connected client. Also known as the ident.

Setting this after connection does nothing.

- (NSString *) version [read, write, copy]

The version string for the client to send back on CTCP VERSION requests


The documentation for this class was generated from the following files:

Generated on Sat Jan 10 18:10:37 2009 for IRCClient by  doxygen 1.5.7.1
libircclient-1.10/cocoa/PaxHeaders.23204/Doxyfile0000644000000000000000000000012411132047270016415 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Doxyfile0000644000175000001440000002465011132047270016704 0ustar00timusers00000000000000# Doxyfile 1.5.7.1 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = IRCClient PROJECT_NUMBER = 1.0 OUTPUT_DIRECTORY = doc CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = NO STRIP_FROM_PATH = /Extra/ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 8 ALIASES = OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES TYPEDEF_HIDES_STRUCT = NO SYMBOL_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = NO EXTRACT_PRIVATE = NO EXTRACT_STATIC = NO EXTRACT_LOCAL_CLASSES = NO EXTRACT_LOCAL_METHODS = NO EXTRACT_ANON_NSPACES = NO HIDE_UNDOC_MEMBERS = YES HIDE_UNDOC_CLASSES = NO HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO HIDE_SCOPE_NAMES = NO SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO SORT_GROUP_NAMES = NO SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES SHOW_DIRECTORIES = NO SHOW_FILES = YES SHOW_NAMESPACES = YES FILE_VERSION_FILTER = LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = NO WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = Classes INPUT_ENCODING = UTF-8 FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ *.c++ \ *.d \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.idl \ *.odl \ *.cs \ *.php \ *.php3 \ *.inc \ *.m \ *.mm \ *.dox \ *.py \ *.f90 \ *.f \ *.vhd \ *.vhdl RECURSIVE = NO EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXCLUDE_SYMBOLS = EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = NO INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO REFERENCES_LINK_SOURCE = YES USE_HTAGS = NO VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES HTML_DYNAMIC_SECTIONS = NO GENERATE_DOCSET = NO DOCSET_FEEDNAME = "Doxygen generated docs" DOCSET_BUNDLE_ID = org.doxygen.Project GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO CHM_INDEX_ENCODING = BINARY_TOC = NO TOC_EXPAND = NO GENERATE_QHP = NO QCH_FILE = QHP_NAMESPACE = org.doxygen.Project QHP_VIRTUAL_FOLDER = doc QHG_LOCATION = DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = NONE TREEVIEW_WIDTH = 250 FORMULA_FONTSIZE = 10 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = NO LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4wide EXTRA_PACKAGES = LATEX_HEADER = PDF_HYPERLINKS = YES USE_PDFLATEX = YES LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml XML_SCHEMA = XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES MSCGEN_PATH = /Extra/Doxygen.app/Contents/Resources/ HIDE_UNDOC_RELATIONS = YES HAVE_DOT = NO DOT_FONTNAME = FreeSans DOT_FONTSIZE = 10 DOT_FONTPATH = CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES UML_LOOK = NO TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = NO CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png DOT_PATH = /usr/local/bin DOTFILE_DIRS = DOT_GRAPH_MAX_NODES = 50 MAX_DOT_GRAPH_DEPTH = 1000 DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO libircclient-1.10/cocoa/PaxHeaders.23204/LICENSE0000644000000000000000000000012411132047270015714 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/LICENSE0000644000175000001440000006130311132047270016177 0ustar00timusers00000000000000 GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, 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 this service 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 make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library 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 Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey 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 library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libircclient-1.10/cocoa/PaxHeaders.23204/IRCClient_Prefix.pch0000644000000000000000000000012411132047270020474 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/IRCClient_Prefix.pch0000644000175000001440000000022611132047270020754 0ustar00timusers00000000000000// // Prefix header for all source files of the 'IRCClient' target in the 'IRCClient' project. // #ifdef __OBJC__ #import #endif libircclient-1.10/cocoa/PaxHeaders.23204/README0000644000000000000000000000012411132052566015573 xustar0027 mtime=1231574390.999433 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/README0000644000175000001440000000157611132052566016064 0ustar00timusers00000000000000IRCClient.framework 1.0 by Nathan Ollerenshaw (chrome@stupendous.net) This is a Cocoa framework wrapper around Georgy Yunaev's (gyunaev@ulduzsoft.com) excellent libircclient library. While Georgy's library is portable, obviously this Cocoa framework is specific to Mac OS X systems. Though you might be able to get it working under cocotron or GNUstep, those implementations of Cocoa are not supported. To build the framework, you will need to configure libircclient library first. From the Terminal, run the following command in the distribution directory: ./configure --enable-thread --enable-ipv6 The Xcode project is configured to include the libircclient.c source. The framework is configured to build with a relative path of ../Frameworks/ so it can be easily embedded in your application. For documentation, examine the header files or read the Doxygen documentations in 'doc'. libircclient-1.10/cocoa/PaxHeaders.23204/IRCClient.xcodeproj0000644000000000000000000000013213340661224020405 xustar0030 mtime=1535337108.214355232 30 atime=1535337108.214355232 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/IRCClient.xcodeproj/0000755000175000001440000000000013340661224020743 5ustar00timusers00000000000000libircclient-1.10/cocoa/IRCClient.xcodeproj/PaxHeaders.23204/TemplateIcon.icns0000644000000000000000000000012411132047270023721 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/IRCClient.xcodeproj/TemplateIcon.icns0000644000175000001440000014613611132047270024214 0ustar00timusers00000000000000icns^is32g;g @Vg D]?8SyV0g o*T~Zb egK ϟ v+Xzpy뢀IeLʄSx~xyނdf}˨g4Ww⻵ߦaDwǀ`,̻؜vHG6:<ۍHJ];<<?e]< Fxqrd]GUiJv0/RO>LPB;Rh{tʝ(]p)0//-NL&CΒ;[:ܢW{"texWGỤ齃3ex8(X>i݅mnnq6iޯEa7>*p8. IPkxHG}WqOMF+8shPq(QjEAbт 赿c\w¿ ѷ|_{}ϢpQ7!EUĠɤdOHRrLIЪʤ澙{bPKX{ED8qo೑t[MK^88-qmµļ嫉mVKMht;<2jgŨuصϗhSJQu;@@:*6٪YŦkjvcQKXS?@@=/|µe;/(3_~iT@?1|u[\B~iT@?1"V}zDiT@?1*^#^tiT@?1-`*fy#SMiT@?1-`-fy-[ ?oSiT@?1ʏ򷥄) B&h7n/.,N5C&0@Uqy@p1N<#6:'8Pg\|Ub 1u43 $ǀ=}ĕSpoeo>,:b~*e ƻ92]څikk[X퍓ՑQ6>j yoPsjv)౰a]"i\*AL0 B+ MX$p@ $hw촬oA/Gbu꾮ͽvViq ȭ޶`F29tGƦײpWD>Fb@<ЫʥѦkUEAKk<;-pnɛ}dOB@Qu.-"ok¶ɔw^K@BZi11'ieƩw׵Ռt[H@Ef166/6ت[ǪaRcUE?KpG5663$~µe1$'Sqw]H64&|v[[?qw]H64&"W||@sy]H64&*_#^t|]H64&,a*fy#TM}]H64&-a-fy-\ ?oS~]H64&Ƽ񪔄ƽ$##=ֽ>,f21I)Hhgdy1h4I !9O7HqtGL4V ~7 w}K_feh_ 7_U̔ efF/ Jڅehh4Qcܼ{o94?@{t`\DgPtOe "L0eF2~Ix 2H6Y-Kd罀S,0F_wxapȤzvsp^BU\ʐgE6'(Zz4ʮɷmUB4/5Kj2,ӯ̪eR@519Sp.+trťw_M<21=\wusoĹyp[H911Ef~W""mjʰ׹ybsYE604Oq{$((!ٯgͲR,E@508Y~v8($ĸc" @[dL9(&}w[\;[dL9(&#X:[eL9(&*`"_xgL9(&-b*g|"VNhL9(&.b-g|-^ ?pTiL9(&l8mk 1?C7!  ''#.5;/.{_DYyxԬ  T*VS%0r( zF S#Gtc]PIq Rit32{'Ļ ôn`˾n=xvrtxwy}~̾sd&_ ʣqjlrx{~Ղ̿qe]S}=ܭjdilkigghknprpqu}{pbXRL=+ f?ӣxfgc^YXXZ^bfmqtwxy~yzömaXP?6BA)GCҡugd[USRSYbhlopruvuvy~|ǻh\XM6@`l_) ]jaTOOSYafghhiijm/lmv|˾bZVI5Oz~m`#t)FggOKLPYchiea_`beimoprw}ž~_XVH4[vfbW3I)GBPEHLU_dc`^]]`dgjiijjllipzɱǩ~WSVH4`thb\T:6)HcwBCGO[a_[WWY^bca][VTVVURPSY\_gmot~ŚWQPG5h~od]XQ,S)kf>DIS]^WRRTX[WVWL7/7KSU-XWVXZ`a]VX\duΦzPPRL5hsg^YUOr6Il_;EKU]YRNPTTPOLH5F|`3+Գ[uI㱉S[ehc5ӗK]d1IOGDBD>.,$ `}зúqspJh_kmDmKN8LLEECA3,$! Lɲrs{Wuϟydpl6ŘՕJ@?NHDEE;.) ¼¬nwy{TݧjuLj!-/.8&K̦:CLFFEB5/'|ķ򱛟ݖr|x{Z篇mr8ęOnmqQJ)ݖ7FKGHF=11'ŏӺܰe~ݕsgv|{pmpQjMU]\T~`J*ܓ6GJGHG9/2*!̾~tҋt~ϰƵPv~xt~}am8ř9`]\WsA&)ٕ9GKIJF603-,қ_qeusdlpcHlMU]\Wu%'֟AGLKLD40418]UxĤ>:Βέȁ񸫛vJ`kfn<͙9`]\Wuq%ǰJFMMOD4033EP4[#WΧԀ뭓YJvaJM=+塝qXqgTPVZ^uxmԇM=ebZeOgƖmWؤh[nlA405698458;@BFM4A֒n[fcvf][WW\fPKyzTJUNMs+HGF%ΥzFuŏae|\53367;768?ⓍNilh^bda`cn}qۈyTCHI(z?>7?6"lpΩjy>537:==;;>A=>@C9fn[nyʾOWWX^`admy}tuuoIDGC65.\02gŠzu967:>@@?AC;D̿b^YYX\`en|ukp?FH6W2KM&L!oš~>4;:@B1CF3VİrbZd]ZZ[ahs~wri~\=EGy86(8n|˥L2;>@C0DI6QxeVQU^im]Y`ekrwvؓoiNDIJ%L%7]9-}حk85AABCCGODG]XNMU]dilpnfclswwx~ulkxDHK?FLSY]^aa`^[[^nհsgkyzCDG0i?=E>AXۉʾѼ|tnmqrxའmfjuk@FG)wJ (_)֌ļͳrebep\AHH)"_!љûɿwi_YX^jyPDII%!KI`M'bܪ¹zqh^VOKKNValrw~GGJJ%\HWaYC[ⷈȿ~void^YVRMIDB@??CIPV[ajq{q@EGF)C\][;ׁ%޽Ⱦ{unha[UPKHECDGKOT[dnwc>FGC4Ӓ+NMBO+нȿxpjc]XSOJFDBCGLRXakt}VBIIF5БK>JDM5NȽȓzrkd]WRNIGDCDGKQW^gqzJBGGD0ˑJjiEjdN˓ȿ}unfa[UQLJHGHLPV\dmwzBCFF@9ڑJihDjE͕ƽxpic]XSPMJKPT[airzl=FGGB6ڐD:EDG.Xɾ̾Ļyrke_[URONOSX^ckt}_=GH#"DEEAȼŤxqke`[VSPOQUY_envSBJIIJ5\,POEQ-ژXtҡȿ}voic^ZURPOQU[`gpyJFJI*ЎC2E3#&ldeάŽ|tnhb]XTRORW\ajr{y@ADE  -.E-Իʢ㲯˰wxôúyslfa\WTQOSX]dlu}l;BD8@K0UTTU@cވ\yΫSOgqȸ~xqke`[VSPONPTY^fnw_=GI K~ThgheKilЮualـOpҾǿ}vpjc^ZURPOQU[`hqzT@HF-KMSYY]4~zԱjΧvn`Ȟuĕż|unhb]YURORV\bks|KCHF1όK*)*'̱Ɉs̝N={͚ºzsmfa\WTQOSX]dmu{CEGA;ٌKv$BADaJזѦ{}tug֣xrkf`[VSPONPTY^foxn=EF8PD:GH-X@ؽsΫ˩n|вǼzuoic^ZUSPOQUZ`iq{^?J;UK>?BGOZfsngb^fe_eYGIJ"fـ7uovmVMKKLLKJIHIKPZgppuwqajmse^fe_eYGIJ/]hhsٵ̻ybRHCA@>BDDEGJE:=inksdrore^fe_eYGIJ"h~xm^SHEA>=??Bjznserore^fe_eYGIJ/]h>nw޻z÷|vqnmora Bnserore^fe_eYGIJ"l1Cmyz»)oserore^fe_eYGIIJ/] K !@luhOmyserore^fe_eYGIIJ"  Af܀HdLdeǮ|  :rerore^fe_eYGIJ/]   [>aʴ^n~^Ϥ1  p}erore^fe_eYGKAgf  5VѳЏg;drore^fe_e[D('M4  .Qvˑ vorore^feac:+nʗM")FmױD;zpore^h]?L|ȚK# (>bw h~nreGF\НJ # 8X̞) 3leKj{Is# "-Mtس^  )x|G5# %'Eo%# %  #DhѰGJՃ!# %  %Bf~ фUL 5 !%   'Dfʧ-a ϽaNE!, $  *Eel) ڽ|N?'*   "3IfұR  ¿dO.! $!$(D@ ν^E $ '%# ¹WS%#*! ⽲P;%  ܾgJ#Ǹ ȸ|wʿŻ[R˺Ÿ~^/qֺseabffhlnrtw}ƺqeXY ƚw_WY_gjnrtxՂǼscXRIx=ڦvWPVZXVTSUX\]_]^bkrsvppɿudVMHB5+ f?јhSSPIECCEINSZ_aeeglqrtwzlrĹtaVNG7/:;)GCјeSPF@><=DMUZ]^_ccbcgmswz}oɾs\RND08T^S ) ]rWL>99=DLRTUVWZZYWZdjpwvx}~̿sXPMA/Eko_Up)F\nR9449DOTVRLJKLQVZ\\^ckrx~ֽpVOM@/PtgZUM)C)&>}9-16@KPPLJGGKPTWVUUVXXU]gnszpMIL@-Uxg[VQJ0/)H^b+,19FMKEABDJOPLFC<;=>=:8FHEAEKSdÿkEFHC._{h\SOJEm6IgI$-4AGC<8:@?70*(,hqH>;=>7247?DBCGB<:9D^{~G=I2U~kaUOLIE tJ]M!-4AE>65:;2*%%# 5;>D92>?C?$%BmžH0JncXOLLI?ŖK7_!-5@B835:2%!"'GQ,4w}@ <@>A*.Џy@og[PKLKG,>Ką!+5@A5156*!"w:&ŪK*D'>ҫWнuh^UKJKJGuM,#2>@6043$"f:|(|(4GKخj3ӱth`VNIJFÖ 9W-:@6/3/ =7GC1Lzҭfzs?ǯ͠^WOJGIKM3HϖK#$4?7/2.G77C`˳κV4AdsEȴչnKLFGKPQ?W/;:/0/ Apт,̷a|l:e,8F˷ҦRDFKQRF0hK+"6<2-/# XomtgDp»p/:Uǽټi\RGOICXۧd?aMU]\T}`;)ք03/1)q\]iP\a޺šz'RVJBK Dݨa)™9`]\WrB&'Ӈ"0422(nv}=Z­nf;MϭeR?B=S[RP@ܧ;bMU]\WtI%В)0543'$\6/S+$oZ룒U1L]ZFNDۢ1ʙ9`]\WtpH¤3/665'.u$ 1_]a~ ?s?>[?6"c_śiPf^'!7y9REL{nŰP"4559>?>BMOFdCHcEvӅjbC;??n21[4{RſiWqZ# !?<*BU|³*0/08;;>EO\VLLKbJb؏ijd>:=8*ޓ5.\02XϺnax[#  #ȷ{@:3217:=COZa^\Y\F[֐h`{d5=>*N1KM[L!bչwjd(  "4~hQ@8B8534:>EOW\^_^XAdЍf^rR3:<y76(8mru߾ts7 /%+nXD3.3=IL928;@EHORUYXYP@{ƒc^v{C:??L%7@9-kɝ}S" !$) 73))1:AFJNK=8@EHMOQORS?N׬xa`|l:?A1F2GK\L"hجwB !&++(+036:]8isE $+02359=>=>?BDDEFGE@FC7Dwˣ{b]mO7=<Ŕg:NM=NG2߼lַW0!),-.269:;=>?>AA92:Y̦e\bxzB;>4;_qt]vRv̵~`E0# $(.2356652/.3Ecg\^kn9:=%a?=>AX׀5ƶɷ|nbYRQTSXbpͩua[]fx_5<=oJ (_)ك~ĻչxfZVYbq||Q6=>"_!ӓz»yj]TOLP[irtw|~E:??!LI5M'aߦx}{'|~~|}|usld\SKEAACIS]chnu{r<=@@\HWVaXBZwyrle_ZVQMKHC?:97558?EIMS[bjsze5;=<B[\CZ9߾|¹~uoid^XSNHDA>;99:=@CHMV^gpyX4<=9)ђ)MLCN)ѿû~umg`ZUPKFC?<:989=AFKS\env~K8??;*͑K=JBL5NȽ̆»wphb[VPKFB?<:<@EKQYbks{z?9==:&ɑIihEicNωzrle^YSNIFB@==>@EJOV^gpwn79<<5.ؑJhgCjDҍſ|unga[UPLHEB@AEINSZcksz`3<==7*ؐD9EDF.Wʿ×ý|voic]WSNJGDCDHLQV]emu|T3="DEEAʾɡ{tnhc]XSOKHEDEIMRW_gow~I8@??@)S,PODQ-ۙZv֠yslfa[VRNJGDFJNSYbjqyx?;?>͎C2E3#&mfgЭƽ~wqke_ZUPMIFDGKOT[dlt{m68;< -.Իʣڀ+㲯ͱxzŶŻ}void^YTPLIFDHLPV^fnv}a19:-6K0UTTU@cމ]zϬTPhsʻù{tnhb]XSOKHEDCEIMQX`hpxU3=?}SgEeJjmЮvbmڀQqysmfa\VRMJGDFJNSZbjszI6><"KMRYY]4~{ԱkΧwpbɞwȈɽ~xrke`ZUQMIGDGKOT]emu|z@9>;&͌*F'̱ɉt̞P?|ҐǼ}wpid^YTOLIFDHLPV_gow~o8;=60׌Kv$BADbLחѧ{~vvhڟżztoic]XSOKHEDCEIMQXaiqyc3<=.GD:GH.X?ؽtϬ˩n}틍Ѳ{~xpie`[VQNJGDEJNS[ckt{S5?/LK?:,݋K:aKVrNຏq|jʹȯT㺆˵v~yrkf`[VQMIGDGJOV^gowC9A)ZKu1I'̄WHqrurvkSƝkzvqjd_ZUPLIFDHKPXaiqyX8EEDFLhtVe}z]\؍qymPÍg|rnic^XSOKHFDHLRZckt|d?LT8}|pEcxK̾Ģk\qyy{yvpmjd^XTQMIFDGKQYbjr{lLXQ=?A#UL%K:ukvMkVclopojeca\USOLIFDILS[dkszhMS^O=?@L'`tPRnPV`bdd`\ZVSPLIGDCDHMS[ckrx|}z{cSZV\O=?A#U,Ԁ O]X|bڿqRKSWUSQNKHECACFKRZaglnr~weT]ZU\O=?@LɦX\p|oζ_MHNNJGFDCB@>=>=?BGLRY`l{vXuS\ZU\O=?A#UgL{[ޓWrvWJGHIFB=:86565569=EPZeouzpa]YS\ZU\O=?@fـQvpxoYLGDBB@>=<=>>?CLYbbfifW`ci[}S\ZU\O=?A#UbhsڶͻzeUIC><9;<<=>B>66`eblZgdh[}S\ZU\O=?@h~ynaUKFB?>@ADbpdk[gdh[}S\ZU\O=?A#Uh>ny޻{ø|wrompra >ydk[gdh[}S\ZU\O=?@l1Cmy{¼*vek[gdh[}S\ZU\O=??A#U K !@lviOcok[gdh[}S\ZU\O=??@j  AfeMefǮ{ 5xj[gdh[}S\ZU\O=?A#U   [>aʴ_o_Ϥ0  ft[gdh[}S\ZU\O=A7gf  4Vѳяg7Zgdh[}S\ZU\Q:yM4  -Qvˑ ncgdh[}S\ZWZ.gǗM")FmװD7nfdh[}S^R3AtĚK# (>bw ]rch[~:9Q͝J # 8X~̞) /v`Z?a{qIs# "-Nuس^  !ksG5# %&EpŽ%# %  #DhѰGJՃ!# %  %Bg~ фUL 5 !%   'Deʧ-a ϽaNE!, $  *Eel) ڽ|N?'*   "3IgұR  ¿dO.! $!$(D@ ν^E $ '%# ¹WS%#*! ⽲P;%  ܾgJ#˲ ϬoY[ܫk>;ï}peGeЯpZICEHIKORVX]dlr{žrgYPEO_B79AINRXYXYZ]gorw~vsxւºth\OFA:r=֘^8/5;:64359=?@>?CMUVYftiV^uj_PF>95)+ f?̈M12/(" "',3;@CGGHOUTWZ^hq{~hWfɿĶvl^OF?8-&. 3)GCωJ20$!,5;?@ADECDHOV[^bfmtutqoouv[mƶxk]KC?7'-BI@)E ]Z6*!+24556579:869DJS[YZ`dloqljjgouzoɴxn]HA>5'7SVJBi)FJQ0 .562+()+.38:8:?GPW]a__bhiicbgimljquxwkZGA>4'?ZPFC<:)&9\ )0/+'&%)-/22358;=:CMRX^afiiddfilkmp}xxnY?;=4$B^QGC?:"%)HUA #+)#"&)-,**&'-/0.,07=:7t#V)!,/38, %/31#618gtfvw8!;t]TH?==:1 –K4=  =F $ls2 .2/3xrzk2s}_WKA<=<83Kg   k,Ť>5/ҫ@sveXOE<:<:8nM   a7w}'3<<خe#~eYPG@::;:6 65@  -D@/Hxӭeys6pPHA:8:;< ;ϖK   <54@YįɵV3@cf =`==67;>?L;7  4qh~°~^xn:f.=wD46:??3 hK  H_ctùکnbAmwy羶Ͼb0H[-:@CCjBLd Ga}qxs}ӱӸ}9.dq8AǰFp@db a]xox0   !!!صΑ)7'5P7D-'?1%)/RW>LU>İa(CjgZiTlșpY ā))*  ϸoC[Jph54E1$#%.?M9&94gƲqW92=54u.JI(Ш}FOa"2&  (ʳSFbd $+?A2)*(%%03@I.?M>ð\M,#J>AH K)kk(%N-7  5 ifju7:4(,/)),46UM;FM2y˯`W:)./ gBZ:&VCF&77  %i4J?Eoe?%&%(-.-19>8V=9E)ZķiTQ3+/0o43[7~8{D,A7 .6'(GƳpOKav@%,.wz:8:qbZƩz^KUM' gmYG5&!&0;>)!()+.37:<@6&]ȲhNKczh3+/0N&9@;.zOɳfV[Z:&##+26;>:+%-0167869:&2ū_LMgyyZ)/1 76JN\O%MʿqcdjS0 !#')+22,).3442//263$*_ѺvVIRnzsxL%-/;р$PȧmisoS2  #%()-/0.*,* +YȡbMIYsztur=(.-j=R=?>AJVdvĥr_NHIQ`jknty{y|M%-. dJ ('_)v`Ǹo`QGCDLYbcflsy}|zv?'./ ~#!X؊\ʹ}|}xmaUJC=:DKRZagnty}z}R%-.- H`ab_?؀$dxnf]VRNJFB=:630.+,-025:@HPX`flrw{~yyF%-.)͒.QP R.ـ2jyof^VQLGC?;852/-+*-148>EMU^ekpuy}}zq:)0/+ɑM@MDO8Rʿtxſ{qi`YTOID@<8520-,+,-048;8420.//048;AHOW_fkotx|z}\'+--&ՑPmCoJفm|tld_YTNIEA=:7421237;?ELSZbhlquy}~y|O$-..(֐F:FDG/Zʏiÿyrjd_ZUPKGC?<9643446:=AHNU\cimrwz~}yxB%./(HEIE"Нhwohb^YTOKGC@<975458;>BIPW^ekotx||zp8)0E0TSDU1ܠg~۟hƿ}umfa\XSNJFA>;96458;>DKRY`glquy}{{f/-0/ ɎD3E4$(woqԮjýzske`[VRMIDA=;85459<@FMT[binrwz~z|[&*,-w/0/ ͩۀ+㶲͵ɺqxqid_ZUPLGD@=:7546:=AHOV]ekotx|}y|O#+,(J6ZYYZEhޑiаa^s}s~vnhc^YTOKGB?<9747:>CJQX`glquy}}xxD$.0ZlEjPuvѲnxى]{q|tlfb]XSNJFB>;96458;?ELSZbhnrwz~|yq9'/,KQW]]a8䄍Զuϫ{mʤuzzrke`\WRMIEA=;85459<@GNU]djosx|~{{h0*.,Ɍ ,F*Ѹ̑~Σ]M甅فmwpje_[UQLHD@=:8546:DKRZahnrvz~}x|R$-.9F>IK0[?~ϱ̭xㅴ듓Բ^wsle`[VQMIEA>;96458;?FMT\cjosx|~|wwB&0>K@Z[Y?jZׯw}օrl~yrkea\VPLHD@=:86458;AHOV^ekpuy}~zyj2+0\KIijMӭӸƚw쩋׃V~xoid_[VQLHD@=:85469=CJQY`gmrvz~}w|T%/01zKrH\TEؘyѺptίƺ{䧘ԅݰ\rxrnhc^YTPKGC@<97547:>DLS[biotx|zwr:'0 K@OU0{LbԹ|ϸȸg~ÎSwqigc]XSOJFB>;96457;@FNU]dkquy}|v|W&/0+ۋK?eO[}Ŭ\߽{tηɲ`㽍˻d[wojd`\WRNIEA>;86458;86458:85469>DLS[binqtusuxY;JC.02HL(NH~uߧ[jAFRUUTQNLIFA?<:8547:@FMU\bhmoonvuT<97532359@FLSWZ_jtkcSDOLFN@.01MʪdgzyηcG9897654321/./.026;@FMXfnk_Dj|BMLFN@.02HKPfݙb{{ZE:6420.,*)+.5=GPX^bZOOKuwBMLFN@.01iڀ4zøt^LA941/,-.18BKLQTTFQV\LrwBMLFN@.02Hhs|ٹͼ}iYKB:502201274.-QYV_KWUZLrwBMLFN@.01hҵ{qdYNJEA@BCG"UdV\KWUZLrwBMLFN@.02Hh>o䁳ݾĸ}xspoqsb 7kV\KWUZLrwBMLFN@.01l1Coł䷃ý*iV\KWUZLrwBMLFN@.002H K @ms¼PW_\KWUZLrwBMLFN@.001C  AgqZpq؀#˱} 0h[KWUZLrwBMLFN@.02H   [>b͸kzlҦ1  XcKWUZLrwBMLFN@.3'gf  4VԸӘg0mJWUZLrwBMLFNC* nM4  -RwΓ `SWUZLrwBMLHK[×6"(Fn؀۳E1\VUZLrwCOC"1hK# '=cy M`TZLtq''BuɝJ #!8XϠ* (dPK-SocIs#!"-Nvܵ_  XfG5#!%&Eqď%#!%  #DiԱGJՃ!#!%  %Cg фUL 5 "%   'Cfͩ-a ϽaNE!, $  *Een) ڽ|N?'*   "3IgԳS  ¿dO.! $!$(D@ ν^E $ '%# ¹WS%#*! ⽲P;%  ܾgJ#t8mk@  %)5A?73565:@=8892%    $"*3>OOA;:>ADIGC@>7*%%    " %*.6=A;6;?@??=:4.*'#   "'%!%$ !$(2<>89BC=<72-**+%    !#()&"(,'*11359DD?9.(%$''"    #%%#%*&&&-/," &+),15;?>4+%"!##"    !#%&(%'("#+.,*'#,/.-+/4/+'$" #%"  #&(,-*!!)' $-+'&)%#..$"")*(&'$"$!  #+-/.("#&($&*('',,(#"$" "%%"   #+0/+%##%*,*&*.(&*,)# !!!$!   #)./*&%&+0/,(/3,%'*)($$(()#4kɯo%  !#))'()*.1/,19;2*++*($%),/'W  !&',/( %)..'9a   (D`|xjO1%('*'{ 3j۹d0%&Bd {E2,I4mQyew$H)FeM m-13B.GA!0?FT"tB.Vp0>ܢfC@Jq-_j +O i.f u7AzOA8nv?6vcD"MQZ%/h%l~6(|t8z1+8 =E"\h!WUJgAw4k"*_QFGBEKPYN&`/m?! icnV Blibircclient-1.10/cocoa/IRCClient.xcodeproj/PaxHeaders.23204/project.pbxproj0000644000000000000000000000012411134761141023535 xustar0027 mtime=1232331361.668394 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/IRCClient.xcodeproj/project.pbxproj0000644000175000001440000005440711134761141024027 0ustar00timusers00000000000000// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 45; objects = { /* Begin PBXBuildFile section */ 693CA3360F188B3400BF8670 /* libircclient.c in Sources */ = {isa = PBXBuildFile; fileRef = 693CA3350F188B3400BF8670 /* libircclient.c */; }; 694762D30F10AAAE002C0318 /* DDInvocationGrabber.h in Headers */ = {isa = PBXBuildFile; fileRef = 694762CB0F10AAAE002C0318 /* DDInvocationGrabber.h */; settings = {ATTRIBUTES = (Public, ); }; }; 694762D40F10AAAE002C0318 /* DDInvocationGrabber.m in Sources */ = {isa = PBXBuildFile; fileRef = 694762CC0F10AAAE002C0318 /* DDInvocationGrabber.m */; }; 694762D50F10AAAE002C0318 /* NSObject+DDExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 694762CD0F10AAAE002C0318 /* NSObject+DDExtensions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 694762D60F10AAAE002C0318 /* NSObject+DDExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 694762CE0F10AAAE002C0318 /* NSObject+DDExtensions.m */; }; 694762D70F10AAAE002C0318 /* IRCClientChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 694762CF0F10AAAE002C0318 /* IRCClientChannel.h */; settings = {ATTRIBUTES = (Public, ); }; }; 694762D80F10AAAE002C0318 /* IRCClientChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = 694762D00F10AAAE002C0318 /* IRCClientChannel.m */; }; 694762D90F10AAAE002C0318 /* IRCClientSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 694762D10F10AAAE002C0318 /* IRCClientSession.h */; settings = {ATTRIBUTES = (Public, ); }; }; 694762DA0F10AAAE002C0318 /* IRCClientSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 694762D20F10AAAE002C0318 /* IRCClientSession.m */; }; 6947631E0F10AE32002C0318 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 6947631D0F10AE32002C0318 /* LICENSE */; }; 694763200F10AE46002C0318 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 6947631F0F10AE46002C0318 /* README */; }; 6989EABC0F1861FB0083030A /* IRCClientChannelDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6989EABA0F1861FB0083030A /* IRCClientChannelDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6989EAC00F1862090083030A /* IRCClientSessionDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6989EABE0F1862090083030A /* IRCClientSessionDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6989EADD0F18810C0083030A /* Doxyfile in Resources */ = {isa = PBXBuildFile; fileRef = 6989EADC0F18810C0083030A /* Doxyfile */; }; 69B1CAAC0F1F2F1B00EF6DE2 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAA10F1F2F1B00EF6DE2 /* config.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAAD0F1F2F1B00EF6DE2 /* libirc_dcc.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAA20F1F2F1B00EF6DE2 /* libirc_dcc.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAAE0F1F2F1B00EF6DE2 /* libirc_doc.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAA30F1F2F1B00EF6DE2 /* libirc_doc.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAAF0F1F2F1B00EF6DE2 /* libirc_doc_faq.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAA40F1F2F1B00EF6DE2 /* libirc_doc_faq.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAB00F1F2F1B00EF6DE2 /* libirc_errors.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAA50F1F2F1B00EF6DE2 /* libirc_errors.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAB10F1F2F1B00EF6DE2 /* libirc_events.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAA60F1F2F1B00EF6DE2 /* libirc_events.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAB20F1F2F1B00EF6DE2 /* libirc_options.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAA70F1F2F1B00EF6DE2 /* libirc_options.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAB30F1F2F1B00EF6DE2 /* libirc_params.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAA80F1F2F1B00EF6DE2 /* libirc_params.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAB40F1F2F1B00EF6DE2 /* libirc_rfcnumeric.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAA90F1F2F1B00EF6DE2 /* libirc_rfcnumeric.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAB50F1F2F1B00EF6DE2 /* libirc_session.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAAA0F1F2F1B00EF6DE2 /* libirc_session.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69B1CAB60F1F2F1B00EF6DE2 /* libircclient.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B1CAAB0F1F2F1B00EF6DE2 /* libircclient.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 32DBCF5E0370ADEE00C91783 /* IRCClient_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClient_Prefix.pch; sourceTree = ""; }; 693CA3350F188B3400BF8670 /* libircclient.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = libircclient.c; path = ../src/libircclient.c; sourceTree = SOURCE_ROOT; }; 694762CB0F10AAAE002C0318 /* DDInvocationGrabber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDInvocationGrabber.h; sourceTree = ""; }; 694762CC0F10AAAE002C0318 /* DDInvocationGrabber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDInvocationGrabber.m; sourceTree = ""; }; 694762CD0F10AAAE002C0318 /* NSObject+DDExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+DDExtensions.h"; sourceTree = ""; }; 694762CE0F10AAAE002C0318 /* NSObject+DDExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+DDExtensions.m"; sourceTree = ""; }; 694762CF0F10AAAE002C0318 /* IRCClientChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClientChannel.h; sourceTree = ""; }; 694762D00F10AAAE002C0318 /* IRCClientChannel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IRCClientChannel.m; sourceTree = ""; }; 694762D10F10AAAE002C0318 /* IRCClientSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClientSession.h; sourceTree = ""; }; 694762D20F10AAAE002C0318 /* IRCClientSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IRCClientSession.m; sourceTree = ""; }; 6947631D0F10AE32002C0318 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; }; 6947631F0F10AE46002C0318 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; 6989EABA0F1861FB0083030A /* IRCClientChannelDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClientChannelDelegate.h; sourceTree = ""; }; 6989EABE0F1862090083030A /* IRCClientSessionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClientSessionDelegate.h; sourceTree = ""; }; 6989EADC0F18810C0083030A /* Doxyfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Doxyfile; sourceTree = SOURCE_ROOT; }; 69B1CAA10F1F2F1B00EF6DE2 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../include/config.h; sourceTree = SOURCE_ROOT; }; 69B1CAA20F1F2F1B00EF6DE2 /* libirc_dcc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libirc_dcc.h; path = ../include/libirc_dcc.h; sourceTree = SOURCE_ROOT; }; 69B1CAA30F1F2F1B00EF6DE2 /* libirc_doc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libirc_doc.h; path = ../include/libirc_doc.h; sourceTree = SOURCE_ROOT; }; 69B1CAA40F1F2F1B00EF6DE2 /* libirc_doc_faq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libirc_doc_faq.h; path = ../include/libirc_doc_faq.h; sourceTree = SOURCE_ROOT; }; 69B1CAA50F1F2F1B00EF6DE2 /* libirc_errors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libirc_errors.h; path = ../include/libirc_errors.h; sourceTree = SOURCE_ROOT; }; 69B1CAA60F1F2F1B00EF6DE2 /* libirc_events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libirc_events.h; path = ../include/libirc_events.h; sourceTree = SOURCE_ROOT; }; 69B1CAA70F1F2F1B00EF6DE2 /* libirc_options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libirc_options.h; path = ../include/libirc_options.h; sourceTree = SOURCE_ROOT; }; 69B1CAA80F1F2F1B00EF6DE2 /* libirc_params.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libirc_params.h; path = ../include/libirc_params.h; sourceTree = SOURCE_ROOT; }; 69B1CAA90F1F2F1B00EF6DE2 /* libirc_rfcnumeric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libirc_rfcnumeric.h; path = ../include/libirc_rfcnumeric.h; sourceTree = SOURCE_ROOT; }; 69B1CAAA0F1F2F1B00EF6DE2 /* libirc_session.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libirc_session.h; path = ../include/libirc_session.h; sourceTree = SOURCE_ROOT; }; 69B1CAAB0F1F2F1B00EF6DE2 /* libircclient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libircclient.h; path = ../include/libircclient.h; sourceTree = SOURCE_ROOT; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* IRCClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IRCClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 8DC2EF560486A6940098B216 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 034768DFFF38A50411DB9C8B /* Products */ = { isa = PBXGroup; children = ( 8DC2EF5B0486A6940098B216 /* IRCClient.framework */, ); name = Products; sourceTree = ""; }; 0867D691FE84028FC02AAC07 /* IRCClient */ = { isa = PBXGroup; children = ( 6947632B0F10AFD3002C0318 /* doc */, 6947631F0F10AE46002C0318 /* README */, 6947631D0F10AE32002C0318 /* LICENSE */, 6989EADC0F18810C0083030A /* Doxyfile */, 08FB77AEFE84172EC02AAC07 /* Classes */, 32C88DFF0371C24200C91783 /* Other Sources */, 089C1665FE841158C02AAC07 /* Resources */, 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */, 034768DFFF38A50411DB9C8B /* Products */, ); name = IRCClient; sourceTree = ""; }; 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */, 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */, ); name = "External Frameworks and Libraries"; sourceTree = ""; }; 089C1665FE841158C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( 8DC2EF5A0486A6940098B216 /* Info.plist */, 089C1666FE841158C02AAC07 /* InfoPlist.strings */, ); name = Resources; sourceTree = ""; }; 08FB77AEFE84172EC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( 694762CB0F10AAAE002C0318 /* DDInvocationGrabber.h */, 694762CC0F10AAAE002C0318 /* DDInvocationGrabber.m */, 694762CD0F10AAAE002C0318 /* NSObject+DDExtensions.h */, 694762CE0F10AAAE002C0318 /* NSObject+DDExtensions.m */, 6989EABA0F1861FB0083030A /* IRCClientChannelDelegate.h */, 694762CF0F10AAAE002C0318 /* IRCClientChannel.h */, 694762D00F10AAAE002C0318 /* IRCClientChannel.m */, 6989EABE0F1862090083030A /* IRCClientSessionDelegate.h */, 694762D10F10AAAE002C0318 /* IRCClientSession.h */, 694762D20F10AAAE002C0318 /* IRCClientSession.m */, ); path = Classes; sourceTree = ""; }; 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = { isa = PBXGroup; children = ( 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */, ); name = "Linked Frameworks"; sourceTree = ""; }; 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = { isa = PBXGroup; children = ( 0867D6A5FE840307C02AAC07 /* AppKit.framework */, D2F7E79907B2D74100F64583 /* CoreData.framework */, 0867D69BFE84028FC02AAC07 /* Foundation.framework */, ); name = "Other Frameworks"; sourceTree = ""; }; 32C88DFF0371C24200C91783 /* Other Sources */ = { isa = PBXGroup; children = ( 69B1CAA10F1F2F1B00EF6DE2 /* config.h */, 69B1CAA20F1F2F1B00EF6DE2 /* libirc_dcc.h */, 69B1CAA30F1F2F1B00EF6DE2 /* libirc_doc.h */, 69B1CAA40F1F2F1B00EF6DE2 /* libirc_doc_faq.h */, 69B1CAA50F1F2F1B00EF6DE2 /* libirc_errors.h */, 69B1CAA60F1F2F1B00EF6DE2 /* libirc_events.h */, 69B1CAA70F1F2F1B00EF6DE2 /* libirc_options.h */, 69B1CAA80F1F2F1B00EF6DE2 /* libirc_params.h */, 69B1CAA90F1F2F1B00EF6DE2 /* libirc_rfcnumeric.h */, 69B1CAAA0F1F2F1B00EF6DE2 /* libirc_session.h */, 69B1CAAB0F1F2F1B00EF6DE2 /* libircclient.h */, 32DBCF5E0370ADEE00C91783 /* IRCClient_Prefix.pch */, 693CA3350F188B3400BF8670 /* libircclient.c */, ); name = "Other Sources"; sourceTree = ""; }; 6947632B0F10AFD3002C0318 /* doc */ = { isa = PBXGroup; children = ( ); path = doc; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 8DC2EF500486A6940098B216 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 694762D30F10AAAE002C0318 /* DDInvocationGrabber.h in Headers */, 694762D50F10AAAE002C0318 /* NSObject+DDExtensions.h in Headers */, 694762D70F10AAAE002C0318 /* IRCClientChannel.h in Headers */, 694762D90F10AAAE002C0318 /* IRCClientSession.h in Headers */, 6989EABC0F1861FB0083030A /* IRCClientChannelDelegate.h in Headers */, 6989EAC00F1862090083030A /* IRCClientSessionDelegate.h in Headers */, 69B1CAAC0F1F2F1B00EF6DE2 /* config.h in Headers */, 69B1CAAD0F1F2F1B00EF6DE2 /* libirc_dcc.h in Headers */, 69B1CAAE0F1F2F1B00EF6DE2 /* libirc_doc.h in Headers */, 69B1CAAF0F1F2F1B00EF6DE2 /* libirc_doc_faq.h in Headers */, 69B1CAB00F1F2F1B00EF6DE2 /* libirc_errors.h in Headers */, 69B1CAB10F1F2F1B00EF6DE2 /* libirc_events.h in Headers */, 69B1CAB20F1F2F1B00EF6DE2 /* libirc_options.h in Headers */, 69B1CAB30F1F2F1B00EF6DE2 /* libirc_params.h in Headers */, 69B1CAB40F1F2F1B00EF6DE2 /* libirc_rfcnumeric.h in Headers */, 69B1CAB50F1F2F1B00EF6DE2 /* libirc_session.h in Headers */, 69B1CAB60F1F2F1B00EF6DE2 /* libircclient.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 8DC2EF4F0486A6940098B216 /* IRCClient */ = { isa = PBXNativeTarget; buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "IRCClient" */; buildPhases = ( 8DC2EF500486A6940098B216 /* Headers */, 8DC2EF520486A6940098B216 /* Resources */, 8DC2EF540486A6940098B216 /* Sources */, 8DC2EF560486A6940098B216 /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = IRCClient; productInstallPath = "$(HOME)/Library/Frameworks"; productName = IRCClient; productReference = 8DC2EF5B0486A6940098B216 /* IRCClient.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "IRCClient" */; compatibilityVersion = "Xcode 3.1"; hasScannedForEncodings = 1; mainGroup = 0867D691FE84028FC02AAC07 /* IRCClient */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 8DC2EF4F0486A6940098B216 /* IRCClient */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 8DC2EF520486A6940098B216 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */, 6947631E0F10AE32002C0318 /* LICENSE in Resources */, 694763200F10AE46002C0318 /* README in Resources */, 6989EADD0F18810C0083030A /* Doxyfile in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 8DC2EF540486A6940098B216 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 694762D40F10AAAE002C0318 /* DDInvocationGrabber.m in Sources */, 694762D60F10AAAE002C0318 /* NSObject+DDExtensions.m in Sources */, 694762D80F10AAAE002C0318 /* IRCClientChannel.m in Sources */, 694762DA0F10AAAE002C0318 /* IRCClientSession.m in Sources */, 693CA3360F188B3400BF8670 /* libircclient.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, ); name = InfoPlist.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 1DEB91AE08733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = IRCClient_Prefix.pch; HEADER_SEARCH_PATHS = ( ../src, ../include, ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Library/Frameworks"; LD_DYLIB_INSTALL_NAME = "@executable_path/../Frameworks/$(EXECUTABLE_PATH)"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", ../libircclient/trunk/src, "\"$(SRCROOT)/../src\"", ); PRODUCT_NAME = IRCClient; WRAPPER_EXTENSION = framework; }; name = Debug; }; 1DEB91AF08733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = IRCClient_Prefix.pch; HEADER_SEARCH_PATHS = ( ../src, ../include, ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Library/Frameworks"; LD_DYLIB_INSTALL_NAME = "../Frameworks/$(EXECUTABLE_PATH)"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", ../libircclient/trunk/src, "\"$(SRCROOT)/../src\"", ); PRODUCT_NAME = IRCClient; WRAPPER_EXTENSION = framework; }; name = Release; }; 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; SDKROOT = macosx10.5; }; name = Debug; }; 1DEB91B308733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; SDKROOT = macosx10.5; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "IRCClient" */ = { isa = XCConfigurationList; buildConfigurations = ( 1DEB91AE08733DA50010E9CD /* Debug */, 1DEB91AF08733DA50010E9CD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "IRCClient" */ = { isa = XCConfigurationList; buildConfigurations = ( 1DEB91B208733DA50010E9CD /* Debug */, 1DEB91B308733DA50010E9CD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 0867D690FE84028FC02AAC07 /* Project object */; } libircclient-1.10/cocoa/PaxHeaders.23204/English.lproj0000644000000000000000000000013213340661224017353 xustar0030 mtime=1535337108.214355232 30 atime=1535337108.214355232 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/English.lproj/0000755000175000001440000000000013340661224017711 5ustar00timusers00000000000000libircclient-1.10/cocoa/English.lproj/PaxHeaders.23204/InfoPlist.strings0000644000000000000000000000012411132047270022747 xustar0027 mtime=1231572664.408484 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/English.lproj/InfoPlist.strings0000644000175000001440000000013411132047270023225 0ustar00timusers00000000000000/* Localized versions of Info.plist keys */ libircclient-1.10/cocoa/PaxHeaders.23204/Info.plist0000644000000000000000000000012411132053547016663 xustar0027 mtime=1231574887.470006 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/cocoa/Info.plist0000644000175000001440000000142411132053547017144 0ustar00timusers00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier net.stupendous.${PRODUCT_NAME:identifier} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleSignature ???? CFBundleVersion 1.0 NSPrincipalClass libircclient-1.10/PaxHeaders.23204/examples0000644000000000000000000000013213340661224015367 xustar0030 mtime=1535337108.218355143 30 atime=1535337108.218355143 30 ctime=1535337108.218355143 libircclient-1.10/examples/0000755000175000001440000000000013340661224015725 5ustar00timusers00000000000000libircclient-1.10/examples/PaxHeaders.23204/Makefile.in0000644000000000000000000000012411705744556017527 xustar0027 mtime=1326958958.458837 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/examples/Makefile.in0000644000175000001440000000124711705744556020013 0ustar00timusers00000000000000CC = @CC@ CXX = @CXX@ CFLAGS = -Wall @CFLAGS@ LIBS = -L../src/ -lircclient -lpthread @LIBS@ INCLUDES=-I../include EXAMPLES=spammer censor irctest ircftp colors all: $(EXAMPLES) spammer: spammer.o $(CC) -o spammer spammer.o $(LIBS) colors: colors.o $(CXX) -o colors colors.o $(LIBS) irctest: irctest.o $(CC) -o irctest irctest.o $(LIBS) censor: censor.o $(CXX) -o censor censor.o $(LIBS) ircftp: ircftp.o $(CXX) -o ircftp ircftp.o $(LIBS) clean: -rm -f $(EXAMPLES) *.o *.exe distclean: clean -rm -f Makefile *.log .c.o: @echo "Compiling $<" @$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< .cpp.o: @echo "Compiling $<" @$(CXX) $(CFLAGS) $(INCLUDES) -c -o $@ $< libircclient-1.10/examples/PaxHeaders.23204/censor.cpp0000644000000000000000000000012411707420102017433 xustar0027 mtime=1327374402.183026 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/examples/censor.cpp0000644000175000001440000001261711707420102017722 0ustar00timusers00000000000000/* * Copyright (C) 2004-2009 Georgy Yunaev gyunaev@ulduzsoft.com * * This example is free, and not covered by LGPL license. There is no * restriction applied to their modification, redistribution, using and so on. * You can study them, modify them, use them in your own program - either * completely or partially. By using it you may give me some credits in your * program, but you don't have to. * * * This example 'guards' the channel against using abusive language. When * someone says a bad word, it takes some action against him/her, taking * in account the number of times the person uses it. The first time, it just * warns the person through a private message, the second time it warns him * publically in channel, and after the second time it will kicks the insolent * out of the channel. * * To keep it simple, this example reacts only on 'fuck' word, however * is is easy to add more. * * Features used: * - nickname parsing; * - handling 'channel' event to track the messages; * - handling 'nick' event to track nickname changes; * - generating channel and private messages, and kicking. */ #include #include #include #include #include #if !defined (_WIN32) #include #endif #include "libircclient.h" /* * We store data in IRC session context. */ typedef struct { char * channel; char * nick; std::map insolents; } irc_ctx_t; void event_connect (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { irc_ctx_t * ctx = (irc_ctx_t *) irc_get_ctx (session); irc_cmd_join (session, ctx->channel, 0); } void event_nick (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { char nickbuf[128]; irc_ctx_t * ctx = (irc_ctx_t *) irc_get_ctx (session); if ( !origin || count != 1 ) return; irc_target_get_nick (origin, nickbuf, sizeof(nickbuf)); if ( ctx->insolents.find(nickbuf) != ctx->insolents.end() ) { printf ("%s has changed its nick to %s to prevent penalties - no way!\n", nickbuf, params[0]); ctx->insolents[params[0]] = ctx->insolents[nickbuf]; ctx->insolents.erase (nickbuf); } } void event_channel (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { irc_ctx_t * ctx = (irc_ctx_t *) irc_get_ctx (session); if ( !origin || count != 2 ) return; if ( strstr (params[1], "fuck") == 0 ) return; char nickbuf[128], text[256]; irc_target_get_nick (origin, nickbuf, sizeof(nickbuf)); if ( ctx->insolents.find(nickbuf) == ctx->insolents.end() ) ctx->insolents[nickbuf] = 0; ctx->insolents[nickbuf]++; printf ("'%s' swears in the channel '%s' %d times\n", nickbuf, params[1], ctx->insolents[nickbuf]); switch (ctx->insolents[nickbuf]) { case 1: // Send a private message sprintf (text, "%s, please do not swear in this channel.", nickbuf); irc_cmd_msg (session, nickbuf, text); break; case 2: // Send a channel message sprintf (text, "%s, do not swear in this channel, or you'll leave it.", nickbuf); irc_cmd_msg (session, params[0], text); break; default: // Send a channel notice, and kick the insolent sprintf (text, "kicked %s from %s for swearing.", nickbuf, params[0]); irc_cmd_me (session, params[0], text); irc_cmd_kick (session, nickbuf, params[0], "swearing"); break; } } void event_numeric (irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count) { if ( event > 400 ) { std::string fulltext; for ( unsigned int i = 0; i < count; i++ ) { if ( i > 0 ) fulltext += " "; fulltext += params[i]; } printf ("ERROR %d: %s: %s\n", event, origin ? origin : "?", fulltext.c_str()); } } int main (int argc, char **argv) { irc_callbacks_t callbacks; irc_ctx_t ctx; unsigned short port = 6667; if ( argc != 4 ) { printf ("Usage: %s <[#]server[:port]> \n", argv[0]); return 1; } // Initialize the callbacks memset (&callbacks, 0, sizeof(callbacks)); // Set up the callbacks we will use callbacks.event_connect = event_connect; callbacks.event_channel = event_channel; callbacks.event_nick = event_nick; callbacks.event_numeric = event_numeric; // And create the IRC session; 0 means error irc_session_t * s = irc_create_session (&callbacks); if ( !s ) { printf ("Could not create IRC session\n"); return 1; } ctx.channel = argv[3]; ctx.nick = argv[2]; irc_set_ctx (s, &ctx); // If the port number is specified in the server string, use the port 0 so it gets parsed if ( strchr( argv[1], ':' ) != 0 ) port = 0; // To handle the "SSL certificate verify failed" from command line we allow passing ## in front // of the server name, and in this case tell libircclient not to verify the cert if ( argv[1][0] == '#' && argv[1][1] == '#' ) { // Skip the first character as libircclient needs only one # for SSL support, i.e. #irc.freenode.net argv[1]++; irc_option_set( s, LIBIRC_OPTION_SSL_NO_VERIFY ); } // Initiate the IRC server connection if ( irc_connect (s, argv[1], port, 0, argv[2], 0, 0) ) { printf ("Could not connect: %s\n", irc_strerror (irc_errno(s))); return 1; } // and run into forever loop, generating events if ( irc_run (s) ) { printf ("Could not connect or I/O error: %s\n", irc_strerror (irc_errno(s))); return 1; } return 0; } libircclient-1.10/examples/PaxHeaders.23204/colors.cpp0000644000000000000000000000012411705476441017462 xustar0027 mtime=1326873889.947326 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/examples/colors.cpp0000644000175000001440000001012411705476441017740 0ustar00timusers00000000000000/* * Copyright (C) 2004-2009 Georgy Yunaev gyunaev@ulduzsoft.com * * This example is free, and not covered by LGPL license. There is no * restriction applied to their modification, redistribution, using and so on. * You can study them, modify them, use them in your own program - either * completely or partially. By using it you may give me some credits in your * program, but you don't have to. * * * This program will test automatic color replacement features. It uses the * colors itself, generates colored string in reaction to 'test' word, and * dumps the de-colored messages. */ #include #include #include #include #include #include "libircclient.h" /* * We store data in IRC session context. */ typedef struct { char * channel; char * nick; } irc_ctx_t; void event_join (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { char * str = irc_color_convert_to_mirc ("[B]Hi[/B] [U]all[/U]. Could someone say 'test'?"); irc_cmd_msg (session, params[0], str); free (str); } void event_connect (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { irc_ctx_t * ctx = (irc_ctx_t *) irc_get_ctx (session); irc_cmd_join (session, ctx->channel, 0); } void event_channel (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { printf ("'%s' said in channel %s: %s\n", origin ? origin : "someone", params[0], params[1] ); char * stripped = irc_color_strip_from_mirc (params[1]); irc_cmd_msg (session, params[0], stripped); free (stripped); stripped = irc_color_convert_from_mirc (params[1]); irc_cmd_msg (session, params[0], stripped); free (stripped); if ( !strcmp (params[1], "test") ) { char * str = irc_color_convert_to_mirc ("normal, [B]bold[/B], [I]reverse[/I], [U]underline[/U], [COLOR=RED]red on white[/COLOR], [COLOR=YELLOW/BLACK]yellow on black[/COLOR]"); irc_cmd_msg (session, params[0], str); free (str); } if ( strstr (params[1], "testme") == params[1] ) { char * str = irc_color_convert_to_mirc (params[1] + 7); irc_cmd_msg (session, params[0], str); free (str); } } void event_numeric (irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count) { if ( event > 400 ) { std::string fulltext; for ( unsigned int i = 0; i < count; i++ ) { if ( i > 0 ) fulltext += " "; fulltext += params[i]; } printf ("ERROR %d: %s: %s\n", event, origin ? origin : "?", fulltext.c_str()); } } int main (int argc, char **argv) { irc_callbacks_t callbacks; irc_ctx_t ctx; irc_session_t * s; unsigned short port = 6667; if ( argc != 4 ) { printf ("Usage: %s \n", argv[0]); return 1; } memset (&callbacks, 0, sizeof(callbacks)); callbacks.event_connect = event_connect; callbacks.event_join = event_join; callbacks.event_channel = event_channel; callbacks.event_numeric = event_numeric; s = irc_create_session (&callbacks); if ( !s ) { printf ("Could not create session\n"); return 1; } ctx.channel = argv[3]; ctx.nick = argv[2]; irc_set_ctx (s, &ctx); // If the port number is specified in the server string, use the port 0 so it gets parsed if ( strchr( argv[1], ':' ) != 0 ) port = 0; // To handle the "SSL certificate verify failed" from command line we allow passing ## in front // of the server name, and in this case tell libircclient not to verify the cert if ( argv[1][0] == '#' && argv[1][1] == '#' ) { // Skip the first character as libircclient needs only one # for SSL support, i.e. #irc.freenode.net argv[1]++; irc_option_set( s, LIBIRC_OPTION_SSL_NO_VERIFY ); } // Initiate the IRC server connection if ( irc_connect (s, argv[1], port, 0, argv[2], 0, 0) ) { printf ("Could not connect: %s\n", irc_strerror (irc_errno(s))); return 1; } // and run into forever loop, generating events if ( irc_run (s) ) { printf ("Could not connect or I/O error: %s\n", irc_strerror (irc_errno(s))); return 1; } return 1; } libircclient-1.10/examples/PaxHeaders.23204/irctest.c0000644000000000000000000000012412245554052017271 xustar0027 mtime=1385617450.441522 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/examples/irctest.c0000644000175000001440000002064612245554052017561 0ustar00timusers00000000000000/* * Copyright (C) 2004-2009 Georgy Yunaev gyunaev@ulduzsoft.com * * This example is free, and not covered by LGPL license. There is no * restriction applied to their modification, redistribution, using and so on. * You can study them, modify them, use them in your own program - either * completely or partially. By using it you may give me some credits in your * program, but you don't have to. * * * This example tests most features of libirc. It can join the specific * channel, welcoming all the people there, and react on some messages - * 'help', 'quit', 'dcc chat', 'dcc send', 'ctcp'. Also it can reply to * CTCP requests, receive DCC files and accept DCC chats. * * Features used: * - nickname parsing; * - handling 'channel' event to track the messages; * - handling dcc and ctcp events; * - using internal ctcp rely procedure; * - generating channel messages; * - handling dcc send and dcc chat events; * - initiating dcc send and dcc chat. * * $Id: irctest.c 124 2013-11-28 05:44:10Z gyunaev $ */ #include #include #include #include #include "libircclient.h" /* * We store data in IRC session context. */ typedef struct { char * channel; char * nick; } irc_ctx_t; void addlog (const char * fmt, ...) { FILE * fp; char buf[1024]; va_list va_alist; va_start (va_alist, fmt); #if defined (_WIN32) _vsnprintf (buf, sizeof(buf), fmt, va_alist); #else vsnprintf (buf, sizeof(buf), fmt, va_alist); #endif va_end (va_alist); printf ("%s\n", buf); if ( (fp = fopen ("irctest.log", "ab")) != 0 ) { fprintf (fp, "%s\n", buf); fclose (fp); } } void dump_event (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { char buf[512]; int cnt; buf[0] = '\0'; for ( cnt = 0; cnt < count; cnt++ ) { if ( cnt ) strcat (buf, "|"); strcat (buf, params[cnt]); } addlog ("Event \"%s\", origin: \"%s\", params: %d [%s]", event, origin ? origin : "NULL", cnt, buf); } void event_join (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { dump_event (session, event, origin, params, count); irc_cmd_user_mode (session, "+i"); irc_cmd_msg (session, params[0], "Hi all"); } void event_connect (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { irc_ctx_t * ctx = (irc_ctx_t *) irc_get_ctx (session); dump_event (session, event, origin, params, count); irc_cmd_join (session, ctx->channel, 0); } void event_privmsg (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { dump_event (session, event, origin, params, count); printf ("'%s' said me (%s): %s\n", origin ? origin : "someone", params[0], params[1] ); } void dcc_recv_callback (irc_session_t * session, irc_dcc_t id, int status, void * ctx, const char * data, unsigned int length) { static int count = 1; char buf[12]; switch (status) { case LIBIRC_ERR_CLOSED: printf ("DCC %d: chat closed\n", id); break; case 0: if ( !data ) { printf ("DCC %d: chat connected\n", id); irc_dcc_msg (session, id, "Hehe"); } else { printf ("DCC %d: %s\n", id, data); sprintf (buf, "DCC [%d]: %d", id, count++); irc_dcc_msg (session, id, buf); } break; default: printf ("DCC %d: error %s\n", id, irc_strerror(status)); break; } } void dcc_file_recv_callback (irc_session_t * session, irc_dcc_t id, int status, void * ctx, const char * data, unsigned int length) { if ( status == 0 && length == 0 ) { printf ("File sent successfully\n"); if ( ctx ) fclose ((FILE*) ctx); } else if ( status ) { printf ("File sent error: %d\n", status); if ( ctx ) fclose ((FILE*) ctx); } else { if ( ctx ) fwrite (data, 1, length, (FILE*) ctx); printf ("File sent progress: %d\n", length); } } void event_channel (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { char nickbuf[128]; if ( count != 2 ) return; printf ("'%s' said in channel %s: %s\n", origin ? origin : "someone", params[0], params[1] ); if ( !origin ) return; irc_target_get_nick (origin, nickbuf, sizeof(nickbuf)); if ( !strcmp (params[1], "quit") ) irc_cmd_quit (session, "of course, Master!"); if ( !strcmp (params[1], "help") ) { irc_cmd_msg (session, params[0], "quit, help, dcc chat, dcc send, ctcp"); } if ( !strcmp (params[1], "ctcp") ) { irc_cmd_ctcp_request (session, nickbuf, "PING 223"); irc_cmd_ctcp_request (session, nickbuf, "FINGER"); irc_cmd_ctcp_request (session, nickbuf, "VERSION"); irc_cmd_ctcp_request (session, nickbuf, "TIME"); } if ( !strcmp (params[1], "dcc chat") ) { irc_dcc_t dccid; irc_dcc_chat (session, 0, nickbuf, dcc_recv_callback, &dccid); printf ("DCC chat ID: %d\n", dccid); } if ( !strcmp (params[1], "dcc send") ) { irc_dcc_t dccid; irc_dcc_sendfile (session, 0, nickbuf, "irctest.c", dcc_file_recv_callback, &dccid); printf ("DCC send ID: %d\n", dccid); } if ( !strcmp (params[1], "topic") ) irc_cmd_topic (session, params[0], 0); else if ( strstr (params[1], "topic ") == params[1] ) irc_cmd_topic (session, params[0], params[1] + 6); if ( strstr (params[1], "mode ") == params[1] ) irc_cmd_channel_mode (session, params[0], params[1] + 5); if ( strstr (params[1], "nick ") == params[1] ) irc_cmd_nick (session, params[1] + 5); if ( strstr (params[1], "whois ") == params[1] ) irc_cmd_whois (session, params[1] + 5); } void irc_event_dcc_chat (irc_session_t * session, const char * nick, const char * addr, irc_dcc_t dccid) { printf ("DCC chat [%d] requested from '%s' (%s)\n", dccid, nick, addr); irc_dcc_accept (session, dccid, 0, dcc_recv_callback); } void irc_event_dcc_send (irc_session_t * session, const char * nick, const char * addr, const char * filename, unsigned long size, irc_dcc_t dccid) { FILE * fp; printf ("DCC send [%d] requested from '%s' (%s): %s (%lu bytes)\n", dccid, nick, addr, filename, size); if ( (fp = fopen ("file", "wb")) == 0 ) abort(); irc_dcc_accept (session, dccid, fp, dcc_file_recv_callback); } void event_numeric (irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count) { char buf[24]; sprintf (buf, "%d", event); dump_event (session, buf, origin, params, count); } int main (int argc, char **argv) { irc_callbacks_t callbacks; irc_ctx_t ctx; irc_session_t * s; unsigned short port = 6667; if ( argc != 4 ) { printf ("Usage: %s \n", argv[0]); return 1; } memset (&callbacks, 0, sizeof(callbacks)); callbacks.event_connect = event_connect; callbacks.event_join = event_join; callbacks.event_nick = dump_event; callbacks.event_quit = dump_event; callbacks.event_part = dump_event; callbacks.event_mode = dump_event; callbacks.event_topic = dump_event; callbacks.event_kick = dump_event; callbacks.event_channel = event_channel; callbacks.event_privmsg = event_privmsg; callbacks.event_notice = dump_event; callbacks.event_invite = dump_event; callbacks.event_umode = dump_event; callbacks.event_ctcp_rep = dump_event; callbacks.event_ctcp_action = dump_event; callbacks.event_unknown = dump_event; callbacks.event_numeric = event_numeric; callbacks.event_dcc_chat_req = irc_event_dcc_chat; callbacks.event_dcc_send_req = irc_event_dcc_send; s = irc_create_session (&callbacks); if ( !s ) { printf ("Could not create session\n"); return 1; } ctx.channel = argv[3]; ctx.nick = argv[2]; irc_set_ctx (s, &ctx); // If the port number is specified in the server string, use the port 0 so it gets parsed if ( strchr( argv[1], ':' ) != 0 ) port = 0; // To handle the "SSL certificate verify failed" from command line we allow passing ## in front // of the server name, and in this case tell libircclient not to verify the cert if ( argv[1][0] == '#' && argv[1][1] == '#' ) { // Skip the first character as libircclient needs only one # for SSL support, i.e. #irc.freenode.net argv[1]++; irc_option_set( s, LIBIRC_OPTION_SSL_NO_VERIFY ); } // Initiate the IRC server connection if ( irc_connect (s, argv[1], port, 0, argv[2], 0, 0) ) { printf ("Could not connect: %s\n", irc_strerror (irc_errno(s))); return 1; } // and run into forever loop, generating events if ( irc_run (s) ) { printf ("Could not connect or I/O error: %s\n", irc_strerror (irc_errno(s))); return 1; } return 1; } libircclient-1.10/examples/PaxHeaders.23204/ircftp.cpp0000644000000000000000000000012411705476441017450 xustar0027 mtime=1326873889.947326 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/examples/ircftp.cpp0000644000175000001440000001053611705476441017735 0ustar00timusers00000000000000/* * Copyright (C) 2004-2009 Georgy Yunaev gyunaev@ulduzsoft.com * * This example is free, and not covered by LGPL license. There is no * restriction applied to their modification, redistribution, using and so on. * You can study them, modify them, use them in your own program - either * completely or partially. By using it you may give me some credits in your * program, but you don't have to. * * * This example emulates a simple file server. Only 'list' and 'get' commands * are supported. * * Features used: * - automatic nickname parsing using LIBIRC_OPTION_STRIPNICKS; * - handling privmsg events to parse commands; * - generating listings and DCC file transfer; * * $Id: ircftp.cpp 94 2012-01-18 08:04:49Z gyunaev $ */ #include #include #include #include #include #include #include #include "libircclient.h" #define FILES_DIR "." /* * We store data in IRC session context. */ typedef struct { std::string channel; std::string nick; } irc_ctx_t; void dcc_callback (irc_session_t * session, irc_dcc_t id, int status, void * ctx, const char * data, unsigned int length) { if ( status == 0 && length == 0 ) { printf ("File sent successfully\n"); } else if ( status ) { printf ("File sent error: %s (%d)\n", irc_strerror(status), status); } else { printf ("File sent progress: %d\n", length); } } void event_connect (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { irc_ctx_t * ctx = (irc_ctx_t *) irc_get_ctx (session); irc_cmd_join (session, ctx->channel.c_str(), 0); } void event_privmsg (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { if ( !origin || count != 2 ) return; if ( !strcasecmp (params[1], "list") ) { dirent *d; DIR *dir = opendir(FILES_DIR); if ( !dir ) return; while ( (d = readdir (dir)) != 0 ) { if ( !strcmp (d->d_name, ".") ) continue; irc_cmd_msg (session, origin, d->d_name); } closedir (dir); } else if ( strstr (params[1], "get ") == params[1] ) { irc_dcc_t dccid; if ( irc_dcc_sendfile (session, 0, origin, params[1] + 4, dcc_callback, &dccid) ) irc_cmd_msg (session, origin, "Could not send this file"); } else { irc_cmd_msg (session, origin, "Commands: send | list"); } } void event_numeric (irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count) { if ( event > 400 ) { std::string fulltext; for ( unsigned int i = 0; i < count; i++ ) { if ( i > 0 ) fulltext += " "; fulltext += params[i]; } printf ("ERROR %d: %s: %s\n", event, origin ? origin : "?", fulltext.c_str()); } } int main (int argc, char **argv) { irc_callbacks_t callbacks; irc_ctx_t ctx; unsigned short port = 6667; if ( argc != 4 ) { printf ("Usage: %s \n", argv[0]); return 1; } // Initialize the callbacks memset (&callbacks, 0, sizeof(callbacks)); // Set up the callbacks we will use callbacks.event_connect = event_connect; callbacks.event_privmsg = event_privmsg; callbacks.event_numeric = event_numeric; // And create the IRC session; 0 means error irc_session_t * s = irc_create_session (&callbacks); if ( !s ) { printf ("Could not create IRC session\n"); return 1; } ctx.channel = argv[3]; ctx.nick = argv[2]; irc_set_ctx (s, &ctx); irc_option_set (s, LIBIRC_OPTION_STRIPNICKS); // If the port number is specified in the server string, use the port 0 so it gets parsed if ( strchr( argv[1], ':' ) != 0 ) port = 0; // To handle the "SSL certificate verify failed" from command line we allow passing ## in front // of the server name, and in this case tell libircclient not to verify the cert if ( argv[1][0] == '#' && argv[1][1] == '#' ) { // Skip the first character as libircclient needs only one # for SSL support, i.e. #irc.freenode.net argv[1]++; irc_option_set( s, LIBIRC_OPTION_SSL_NO_VERIFY ); } // Initiate the IRC server connection if ( irc_connect (s, argv[1], port, 0, argv[2], 0, 0) ) { printf ("Could not connect: %s\n", irc_strerror (irc_errno(s))); return 1; } // and run into forever loop, generating events if ( irc_run (s) ) { printf ("Could not connect or I/O error: %s\n", irc_strerror (irc_errno(s))); return 1; } return 1; } libircclient-1.10/examples/PaxHeaders.23204/spammer.c0000644000000000000000000000012411707420102017246 xustar0027 mtime=1327374402.183026 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/examples/spammer.c0000644000175000001440000001215011707420102017525 0ustar00timusers00000000000000/* * Copyright (C) 2004-2009 Georgy Yunaev gyunaev@ulduzsoft.com * * This example is free, and not covered by LGPL license. There is no * restriction applied to their modification, redistribution, using and so on. * You can study them, modify them, use them in your own program - either * completely or partially. By using it you may give me some credits in your * program, but you don't have to. * * * This example spams the specified channels with words 'HAHA', 'HEHE' and * 'HUHU' using three threads. Its main purpose is to test multithreading * support of libircclient. */ #include #include #include #if defined (_WIN32) #include #define CREATE_THREAD(id,func,param) (CreateThread(0, 0, func, param, 0, id) == 0) #define THREAD_FUNCTION(funcname) static DWORD WINAPI funcname (LPVOID arg) #define thread_id_t DWORD #define sleep(a) Sleep (a*1000) #else #include #include #define CREATE_THREAD(id,func,param) (pthread_create (id, 0, func, (void *) param) != 0) #define THREAD_FUNCTION(funcname) static void * funcname (void * arg) #define thread_id_t pthread_t #endif #include "libircclient.h" /* * We store data in IRC session context. */ typedef struct { char * channel; char * nick; } irc_ctx_t; /* * Params that we give to our threads. */ typedef struct { irc_session_t * session; const char * phrase; const char * channel; int timer; } spam_params_t; THREAD_FUNCTION(gen_spam) { spam_params_t * sp = (spam_params_t *) arg; while ( 1 ) { if ( irc_cmd_msg (sp->session, sp->channel, sp->phrase) ) break; sleep(sp->timer); } return 0; } void event_join (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { irc_ctx_t * ctx = (irc_ctx_t *) irc_get_ctx (session); if ( !origin ) return; // We need to know whether WE are joining the channel, or someone else. // To do this, we compare the origin with our nick. // Note that we have set LIBIRC_OPTION_STRIPNICKS to obtain 'parsed' nicks. if ( !strcmp(origin, ctx->nick) ) { static spam_params_t spam1; static spam_params_t spam2; static spam_params_t spam3; thread_id_t tid; spam1.session = spam2.session = spam3.session = session; spam1.channel = spam2.channel = spam3.channel = ctx->channel; spam1.phrase = "HEHE"; spam2.phrase = "HAHA"; spam3.phrase = "HUHU"; spam1.timer = 2; spam2.timer = 3; spam3.timer = 4; printf ("We just joined the channel %s; starting the spam threads\n", params[1]); if ( CREATE_THREAD (&tid, gen_spam, &spam1) || CREATE_THREAD (&tid, gen_spam, &spam2) || CREATE_THREAD (&tid, gen_spam, &spam3) ) printf ("CREATE_THREAD failed: %s\n", strerror(errno)); else printf ("Spammer thread was started successfully.\n"); } else { char textbuf[168]; sprintf (textbuf, "Hey, %s, hi!", origin); irc_cmd_msg (session, params[0], textbuf); } } void event_connect (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { irc_ctx_t * ctx = (irc_ctx_t *) irc_get_ctx (session); irc_cmd_join (session, ctx->channel, 0); } void event_numeric (irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count) { if ( event > 400 ) { printf ("ERROR %d: %s: %s %s %s %s\n", event, origin ? origin : "unknown", params[0], count > 1 ? params[1] : "", count > 2 ? params[2] : "", count > 3 ? params[3] : ""); } } int main (int argc, char **argv) { irc_callbacks_t callbacks; irc_ctx_t ctx; irc_session_t * s; unsigned short port = 6667; if ( argc != 4 ) { printf ("Usage: %s \n", argv[0]); return 1; } // Initialize the callbacks memset (&callbacks, 0, sizeof(callbacks)); // Set up the callbacks we will use callbacks.event_connect = event_connect; callbacks.event_join = event_join; callbacks.event_numeric = event_numeric; ctx.channel = argv[3]; ctx.nick = argv[2]; // And create the IRC session; 0 means error s = irc_create_session (&callbacks); if ( !s ) { printf ("Could not create IRC session\n"); return 1; } irc_set_ctx (s, &ctx); irc_option_set (s, LIBIRC_OPTION_STRIPNICKS); // If the port number is specified in the server string, use the port 0 so it gets parsed if ( strchr( argv[1], ':' ) != 0 ) port = 0; // To handle the "SSL certificate verify failed" from command line we allow passing ## in front // of the server name, and in this case tell libircclient not to verify the cert if ( argv[1][0] == '#' && argv[1][1] == '#' ) { // Skip the first character as libircclient needs only one # for SSL support, i.e. #irc.freenode.net argv[1]++; irc_option_set( s, LIBIRC_OPTION_SSL_NO_VERIFY ); } // Initiate the IRC server connection if ( irc_connect (s, argv[1], port, 0, argv[2], 0, 0) ) { printf ("Could not connect: %s\n", irc_strerror (irc_errno(s))); return 1; } // and run into forever loop, generating events if ( irc_run (s) ) { printf ("Could not connect or I/O error: %s\n", irc_strerror (irc_errno(s))); return 1; } return 1; } libircclient-1.10/PaxHeaders.23204/configure.in0000644000000000000000000000012313340642401016133 xustar0026 mtime=1535329537.27239 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/configure.in0000644000175000001440000000605713340642401016424 0ustar00timusers00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) AC_INIT(libircclient, 1.3, gyunaev@ulduzsoft.com) AC_CONFIG_SRCDIR([include/libircclient.h]) AC_CONFIG_HEADER([src/config.h]) # Check for command-line AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [compile with debug information (no)])], [use_debug=$enableval], [use_debug=no]) AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared], [build a shared library (no)])], [build_shared=$enableval], [build_shared=no]) AC_ARG_ENABLE([threads], [AS_HELP_STRING([--enable-threads], [compile with multithread support (yes)])], [use_threads=$enableval], [use_threads=yes]) AC_ARG_ENABLE([ipv6], [AS_HELP_STRING([--enable-ipv6], [compile with IPv6 support (no)])], [use_ipv6=$enableval], [use_ipv6=no]) AC_ARG_ENABLE([openssl], [AS_HELP_STRING([--enable-openssl], [compile with OpenSSL support (no)])], [use_openssl=$enableval], [use_openssl=no]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_CHECK_TOOL(AR, ar, :) AC_PROG_RANLIB # Checks for header files. AC_HEADER_STDC # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_FUNC_STAT AC_CHECK_FUNCS([localtime_r socket]) AC_CHECK_LIB(socket, socket, AC_DEFINE(HAVE_SOCKET) LIBS="$LIBS -lsocket") if test "$use_debug" = "yes"; then CFLAGS="${CFLAGS} -g -DENABLE_DEBUG" else CFLAGS="${CFLAGS} -O3" fi # Choosing the target TARGET="static" if test "$build_shared" = "yes"; then CFLAGS="$CFLAGS -fpic" TARGET="shared" fi if test "$use_ipv6" = "yes"; then AC_CHECK_FUNCS([getaddrinfo inet_pton]) AC_CHECK_LIB(nsl, getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO) LIBS="$LIBS -lnsl") CFLAGS="$CFLAGS -DENABLE_IPV6" else AC_CHECK_FUNCS([gethostbyname_r inet_ntoa]) AC_CHECK_LIB(nsl, inet_ntoa, AC_DEFINE(HAVE_INET_NTOA) LIBS="$LIBS -lnsl") fi if test "$use_threads" = "yes"; then CFLAGS="$CFLAGS -DENABLE_THREADS -D_REENTRANT" fi # Checking for mingw AC_MSG_CHECKING([For MinGW32]) case "$host" in *-*-mingw*) AC_MSG_RESULT([yes]) CFLAGS="$CFLAGS -DWIN32_DLL" LIBS="$LIBS -lz -lwsock32 -lgdi32 -lkernel32" # for openssl TARGET="shared_mingw" ;; *) AC_MSG_RESULT([no]) ;; esac if test "$use_openssl" = "yes"; then AC_CHECK_LIB(crypto, [CRYPTO_free], [], [AC_MSG_ERROR([OpenSSL not found (libcrypto)])]) AC_CHECK_LIB(ssl, [SSL_CTX_new], [], [AC_MSG_ERROR([OpenSSL not found (libssl)])]) AC_CHECK_HEADER([openssl/ssl.h], [], [AC_MSG_ERROR([OpenSSL headers not found; did you install the -dev package?])]) CFLAGS="$CFLAGS -DENABLE_SSL" fi AC_SUBST(TARGET) AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(LIBS) AC_SUBST(PREFIX) AC_CONFIG_FILES([examples/Makefile src/Makefile]) AC_OUTPUT libircclient-1.10/PaxHeaders.23204/configure0000644000000000000000000000012313340642401015526 xustar0026 mtime=1535329537.27239 27 atime=1535337108.218355 30 ctime=1535337108.218355143 libircclient-1.10/configure0000755000175000001440000051331113340642401016016 0ustar00timusers00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for libircclient 1.3. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: gyunaev@ulduzsoft.com about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libircclient' PACKAGE_TARNAME='libircclient' PACKAGE_VERSION='1.3' PACKAGE_STRING='libircclient 1.3' PACKAGE_BUGREPORT='gyunaev@ulduzsoft.com' PACKAGE_URL='' ac_unique_file="include/libircclient.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS PREFIX TARGET LIBOBJS EGREP GREP CPP RANLIB AR ac_ct_CC CFLAGS CC OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_debug enable_shared enable_threads enable_ipv6 enable_openssl ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libircclient 1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/libircclient] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libircclient 1.3:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-debug compile with debug information (no) --enable-shared build a shared library (no) --enable-threads compile with multithread support (yes) --enable-ipv6 compile with IPv6 support (no) --enable-openssl compile with OpenSSL support (no) Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF libircclient configure 1.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------ ## ## Report this to gyunaev@ulduzsoft.com ## ## ------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libircclient $as_me 1.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers src/config.h" # Check for command-line # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; use_debug=$enableval else use_debug=no fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; build_shared=$enableval else build_shared=no fi # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then : enableval=$enable_threads; use_threads=$enableval else use_threads=yes fi # Check whether --enable-ipv6 was given. if test "${enable_ipv6+set}" = set; then : enableval=$enable_ipv6; use_ipv6=$enableval else use_ipv6=no fi # Check whether --enable-openssl was given. if test "${enable_openssl+set}" = set; then : enableval=$enable_openssl; use_openssl=$enableval else use_openssl=no fi # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi # Checks for header files. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # Checks for typedefs, structures, and compiler characteristics. # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # Checks for library functions. for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in localtime_r socket do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : $as_echo "#define HAVE_SOCKET 1" >>confdefs.h LIBS="$LIBS -lsocket" fi if test "$use_debug" = "yes"; then CFLAGS="${CFLAGS} -g -DENABLE_DEBUG" else CFLAGS="${CFLAGS} -O3" fi # Choosing the target TARGET="static" if test "$build_shared" = "yes"; then CFLAGS="$CFLAGS -fpic" TARGET="shared" fi if test "$use_ipv6" = "yes"; then for ac_func in getaddrinfo inet_pton do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnsl" >&5 $as_echo_n "checking for getaddrinfo in -lnsl... " >&6; } if ${ac_cv_lib_nsl_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_getaddrinfo=yes else ac_cv_lib_nsl_getaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_getaddrinfo" >&5 $as_echo "$ac_cv_lib_nsl_getaddrinfo" >&6; } if test "x$ac_cv_lib_nsl_getaddrinfo" = xyes; then : $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h LIBS="$LIBS -lnsl" fi CFLAGS="$CFLAGS -DENABLE_IPV6" else for ac_func in gethostbyname_r inet_ntoa do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5 $as_echo_n "checking for inet_ntoa in -lnsl... " >&6; } if ${ac_cv_lib_nsl_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_inet_ntoa=yes else ac_cv_lib_nsl_inet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_ntoa" >&5 $as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; } if test "x$ac_cv_lib_nsl_inet_ntoa" = xyes; then : $as_echo "#define HAVE_INET_NTOA 1" >>confdefs.h LIBS="$LIBS -lnsl" fi fi if test "$use_threads" = "yes"; then CFLAGS="$CFLAGS -DENABLE_THREADS -D_REENTRANT" fi # Checking for mingw { $as_echo "$as_me:${as_lineno-$LINENO}: checking For MinGW32" >&5 $as_echo_n "checking For MinGW32... " >&6; } case "$host" in *-*-mingw*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CFLAGS="$CFLAGS -DWIN32_DLL" LIBS="$LIBS -lz -lwsock32 -lgdi32 -lkernel32" # for openssl TARGET="shared_mingw" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac if test "$use_openssl" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_free in -lcrypto" >&5 $as_echo_n "checking for CRYPTO_free in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_CRYPTO_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char CRYPTO_free (); int main () { return CRYPTO_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_CRYPTO_free=yes else ac_cv_lib_crypto_CRYPTO_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_free" >&5 $as_echo "$ac_cv_lib_crypto_CRYPTO_free" >&6; } if test "x$ac_cv_lib_crypto_CRYPTO_free" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF LIBS="-lcrypto $LIBS" else as_fn_error $? "OpenSSL not found (libcrypto)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 $as_echo_n "checking for SSL_CTX_new in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_CTX_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_CTX_new (); int main () { return SSL_CTX_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ssl_SSL_CTX_new=yes else ac_cv_lib_ssl_SSL_CTX_new=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5 $as_echo "$ac_cv_lib_ssl_SSL_CTX_new" >&6; } if test "x$ac_cv_lib_ssl_SSL_CTX_new" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSSL 1 _ACEOF LIBS="-lssl $LIBS" else as_fn_error $? "OpenSSL not found (libssl)" "$LINENO" 5 fi ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : else as_fn_error $? "OpenSSL headers not found; did you install the -dev package?" "$LINENO" 5 fi CFLAGS="$CFLAGS -DENABLE_SSL" fi ac_config_files="$ac_config_files examples/Makefile src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by libircclient $as_me 1.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ libircclient config.status 1.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi libircclient-1.10/PaxHeaders.23204/THANKS0000644000000000000000000000012411127770077014552 xustar0027 mtime=1231024191.555675 27 atime=1535337108.214355 30 ctime=1535337108.214355232 libircclient-1.10/THANKS0000644000175000001440000000030211127770077015025 0ustar00timusers00000000000000I'd like to thank those people, who greatly helped to develop libircclient: - olifozzy (olifozzy@users.sourceforge.net) for great bug reports. - Lothar May for adding and testing IPv6 support. libircclient-1.10/PaxHeaders.23204/src0000644000000000000000000000013213340661224014340 xustar0030 mtime=1535337108.222355054 30 atime=1535337108.222355054 30 ctime=1535337108.222355054 libircclient-1.10/src/0000755000175000001440000000000013340661224014676 5ustar00timusers00000000000000libircclient-1.10/src/PaxHeaders.23204/params.h0000644000000000000000000000012413340650737016061 xustar0027 mtime=1535332831.371597 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/params.h0000644000175000001440000000224513340650737016344 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #ifndef INCLUDE_IRC_PARAMS_H #define INCLUDE_IRC_PARAMS_H #define LIBIRC_VERSION_HIGH 1 #define LIBIRC_VERSION_LOW 10 #define LIBIRC_BUFFER_SIZE 1024 #define LIBIRC_DCC_BUFFER_SIZE 1024 #define LIBIRC_STATE_INIT 0 #define LIBIRC_STATE_LISTENING 1 #define LIBIRC_STATE_CONNECTING 2 #define LIBIRC_STATE_CONNECTED 3 #define LIBIRC_STATE_DISCONNECTED 4 #define LIBIRC_STATE_CONFIRM_SIZE 5 // Used only by DCC send to confirm the amount of sent data #define LIBIRC_STATE_REMOVED 10 // this state is used only in DCC #define SSL_PREFIX '#' #endif /* INCLUDE_IRC_PARAMS_H */ libircclient-1.10/src/PaxHeaders.23204/Makefile.in0000644000000000000000000000012413340647654016476 xustar0027 mtime=1535332268.592295 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/Makefile.in0000644000175000001440000000273113340647654016761 0ustar00timusers00000000000000# $Id: Makefile.in 137 2018-08-27 01:11:08Z gyunaev $ CC = @CC@ CFLAGS = -Wall -Wno-misleading-indentation -Wno-unused-function -Wno-nonnull -DIN_BUILDING_LIBIRC @CFLAGS@ AR=@AR@ cr RANLIB=@RANLIB@ INCLUDES=-I../include DESTDIR= APIVERSION = 1 OBJS = libircclient.o all: @TARGET@ static: libircclient.a shared: libircclient.so shared_mingw: libircclient.dll install: -mkdir -p $(DESTDIR)@prefix@/include -mkdir -p $(DESTDIR)@libdir@ cp ../include/libircclient.h $(DESTDIR)@prefix@/include/libircclient.h cp ../include/libirc_errors.h $(DESTDIR)@prefix@/include/libirc_errors.h cp ../include/libirc_events.h $(DESTDIR)@prefix@/include/libirc_events.h cp ../include/libirc_options.h $(DESTDIR)@prefix@/include/libirc_options.h cp ../include/libirc_rfcnumeric.h $(DESTDIR)@prefix@/include/libirc_rfcnumeric.h cp libircclient.so $(DESTDIR)@libdir@/libircclient.so.$(APIVERSION) ln -fs libircclient.so.$(APIVERSION) $(DESTDIR)@libdir@/libircclient.so libircclient.so: libircclient.o $(CC) -shared -s -Wl,-soname,libircclient.so.$(APIVERSION) -o libircclient.so libircclient.o @LDFLAGS@ @LIBS@ libircclient.dll: libircclient.o $(CC) -shared -s -o libircclient.dll -Wl,-out-implib,libircclient.lib libircclient.o libircclient.def -lkernel32 -lwsock32 @LIBS@ libircclient.a: libircclient.o $(AR) libircclient.a libircclient.o $(RANLIB) libircclient.a clean: rm -f libircclient.a libircclient.o distclean: clean -rm -f Makefile .c.o: $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< libircclient-1.10/src/PaxHeaders.23204/colors.c0000644000000000000000000000012411705477072016074 xustar0027 mtime=1326874170.800417 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/colors.c0000644000175000001440000002067111705477072016362 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #include #define LIBIRC_COLORPARSER_BOLD (1<<1) #define LIBIRC_COLORPARSER_UNDERLINE (1<<2) #define LIBIRC_COLORPARSER_REVERSE (1<<3) #define LIBIRC_COLORPARSER_COLOR (1<<4) #define LIBIRC_COLORPARSER_MAXCOLORS 15 static const char * color_replacement_table[] = { "WHITE", "BLACK", "DARKBLUE", "DARKGREEN", "RED", "BROWN", "PURPLE", "OLIVE", "YELLOW", "GREEN", "TEAL", "CYAN", "BLUE", "MAGENTA", "DARKGRAY", "LIGHTGRAY", 0 }; static inline void libirc_colorparser_addorcat (char ** destline, unsigned int * destlen, const char * str) { unsigned int len = strlen(str); if ( *destline ) { strcpy (*destline, str); *destline += len; } else *destlen += len; } static void libirc_colorparser_applymask (unsigned int * mask, char ** destline, unsigned int * destlen, unsigned int bitmask, const char * start, const char * end) { if ( (*mask & bitmask) != 0 ) { *mask &= ~bitmask; libirc_colorparser_addorcat (destline, destlen, end); } else { *mask |= bitmask; libirc_colorparser_addorcat (destline, destlen, start); } } static void libirc_colorparser_applycolor (unsigned int * mask, char ** destline, unsigned int * destlen, unsigned int colorid, unsigned int bgcolorid) { const char * end = "[/COLOR]"; char startbuf[64]; if ( bgcolorid != 0 ) sprintf (startbuf, "[COLOR=%s/%s]", color_replacement_table[colorid], color_replacement_table[bgcolorid]); else sprintf (startbuf, "[COLOR=%s]", color_replacement_table[colorid]); if ( (*mask & LIBIRC_COLORPARSER_COLOR) != 0 ) libirc_colorparser_addorcat (destline, destlen, end); *mask |= LIBIRC_COLORPARSER_COLOR; libirc_colorparser_addorcat (destline, destlen, startbuf); } static void libirc_colorparser_closetags (unsigned int * mask, char ** destline, unsigned int * destlen) { if ( *mask & LIBIRC_COLORPARSER_BOLD ) libirc_colorparser_applymask (mask, destline, destlen, LIBIRC_COLORPARSER_BOLD, 0, "[/B]"); if ( *mask & LIBIRC_COLORPARSER_UNDERLINE ) libirc_colorparser_applymask (mask, destline, destlen, LIBIRC_COLORPARSER_UNDERLINE, 0, "[/U]"); if ( *mask & LIBIRC_COLORPARSER_REVERSE ) libirc_colorparser_applymask (mask, destline, destlen, LIBIRC_COLORPARSER_REVERSE, 0, "[/I]"); if ( *mask & LIBIRC_COLORPARSER_COLOR ) libirc_colorparser_applymask (mask, destline, destlen, LIBIRC_COLORPARSER_COLOR, 0, "[/COLOR]"); } /* * IRC to [code] color conversion. Or strip. */ static char * libirc_colorparser_irc2code (const char * source, int strip) { unsigned int mask = 0, destlen = 0; char * destline = 0, *d = 0; const char *p; int current_bg = 0; /* * There will be two passes. First pass calculates the total length of * the destination string. The second pass allocates memory for the string, * and fills it. */ while ( destline == 0 ) // destline will be set after the 2nd pass { if ( destlen > 0 ) { // This is the 2nd pass; allocate memory. if ( (destline = malloc (destlen)) == 0 ) return 0; d = destline; } for ( p = source; *p; p++ ) { switch (*p) { case 0x02: // bold if ( strip ) continue; libirc_colorparser_applymask (&mask, &d, &destlen, LIBIRC_COLORPARSER_BOLD, "[B]", "[/B]"); break; case 0x1F: // underline if ( strip ) continue; libirc_colorparser_applymask (&mask, &d, &destlen, LIBIRC_COLORPARSER_UNDERLINE, "[U]", "[/U]"); break; case 0x16: // reverse if ( strip ) continue; libirc_colorparser_applymask (&mask, &d, &destlen, LIBIRC_COLORPARSER_REVERSE, "[I]", "[/I]"); break; case 0x0F: // reset colors if ( strip ) continue; libirc_colorparser_closetags (&mask, &d, &destlen); break; case 0x03: // set color if ( isdigit (p[1]) ) { // Parse int bgcolor = -1, color = p[1] - 0x30; p++; if ( isdigit (p[1]) ) { color = color * 10 + (p[1] - 0x30); p++; } // If there is a comma, search for the following // background color if ( p[1] == ',' && isdigit (p[2]) ) { bgcolor = p[2] - 0x30; p += 2; if ( isdigit (p[1]) ) { bgcolor = bgcolor * 10 + (p[1] - 0x30); p++; } } // Check for range if ( color <= LIBIRC_COLORPARSER_MAXCOLORS && bgcolor <= LIBIRC_COLORPARSER_MAXCOLORS ) { if ( strip ) continue; if ( bgcolor != -1 ) current_bg = bgcolor; libirc_colorparser_applycolor (&mask, &d, &destlen, color, current_bg); } } break; default: if ( destline ) *d++ = *p; else destlen++; break; } } // Close all the opened tags libirc_colorparser_closetags (&mask, &d, &destlen); destlen++; // for 0-terminator } *d = '\0'; return destline; } static int libirc_colorparser_colorlookup (const char * color) { int i; for ( i = 0; color_replacement_table[i]; i++ ) if ( !strcmp (color, color_replacement_table[i]) ) return i; return -1; } /* * [code] to IRC color conversion. */ char * irc_color_convert_to_mirc (const char * source) { unsigned int destlen = 0; char * destline = 0, *d = 0; const char *p1, *p2, *cur; /* * There will be two passes. First pass calculates the total length of * the destination string. The second pass allocates memory for the string, * and fills it. */ while ( destline == 0 ) // destline will be set after the 2nd pass { if ( destlen > 0 ) { // This is the 2nd pass; allocate memory. if ( (destline = malloc (destlen)) == 0 ) return 0; d = destline; } cur = source; while ( (p1 = strchr (cur, '[')) != 0 ) { const char * replacedval = 0; p2 = 0; // Check if the closing bracket is available after p1 // and the tag length is suitable if ( p1[1] != '\0' && (p2 = strchr (p1, ']')) != 0 && (p2 - p1) > 1 && (p2 - p1) < 31 ) { // Get the tag char tagbuf[32]; int taglen = p2 - p1 - 1; memcpy (tagbuf, p1 + 1, taglen); tagbuf[taglen] = '\0'; if ( !strcmp (tagbuf, "/COLOR") ) replacedval = "\x0F"; else if ( strstr (tagbuf, "COLOR=") == tagbuf ) { int color, bgcolor = -2; char * bcol; bcol = strchr (tagbuf + 6, '/'); if ( bcol ) { *bcol++ = '\0'; bgcolor = libirc_colorparser_colorlookup (bcol); } color = libirc_colorparser_colorlookup (tagbuf + 6); if ( color != -1 && bgcolor == -2 ) { sprintf (tagbuf, "\x03%02d", color); replacedval = tagbuf; } else if ( color != -1 && bgcolor >= 0 ) { sprintf (tagbuf, "\x03%02d,%02d", color, bgcolor); replacedval = tagbuf; } } else if ( !strcmp (tagbuf, "B") || !strcmp (tagbuf, "/B") ) replacedval = "\x02"; else if ( !strcmp (tagbuf, "U") || !strcmp (tagbuf, "/U") ) replacedval = "\x1F"; else if ( !strcmp (tagbuf, "I") || !strcmp (tagbuf, "/I") ) replacedval = "\x16"; } if ( replacedval ) { // add a part before the tag int partlen = p1 - cur; if ( destline ) { memcpy (d, cur, partlen); d += partlen; } else destlen += partlen; // Add the replacement libirc_colorparser_addorcat (&d, &destlen, replacedval); // And move the pointer cur = p2 + 1; } else { // add a whole part before the end tag int partlen; if ( !p2 ) p2 = cur + strlen(cur); partlen = p2 - cur + 1; if ( destline ) { memcpy (d, cur, partlen); d += partlen; } else destlen += partlen; // And move the pointer cur = p2 + 1; } } // Add the rest of string libirc_colorparser_addorcat (&d, &destlen, cur); destlen++; // for 0-terminator } *d = '\0'; return destline; } char * irc_color_strip_from_mirc (const char * message) { return libirc_colorparser_irc2code (message, 1); } char * irc_color_convert_from_mirc (const char * message) { return libirc_colorparser_irc2code (message, 0); } libircclient-1.10/src/PaxHeaders.23204/ssl.c0000644000000000000000000000012413340647700015366 xustar0027 mtime=1535332288.031135 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/ssl.c0000644000175000001440000002523313340647700015653 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #if defined (ENABLE_SSL) // Nonzero if OpenSSL has been initialized static SSL_CTX * ssl_context = 0; #if defined (_WIN32) #include // This array will store all of the mutexes available to OpenSSL static CRITICAL_SECTION * mutex_buf = 0; // OpenSSL callback to utilize static locks static void cb_openssl_locking_function( int mode, int n, const char * file, int line ) { if ( mode & CRYPTO_LOCK) EnterCriticalSection( &mutex_buf[n] ); else LeaveCriticalSection( &mutex_buf[n] ); } // OpenSSL callback to get the thread ID static unsigned long cb_openssl_id_function(void) { return ((unsigned long) GetCurrentThreadId() ); } static int alloc_mutexes( unsigned int total ) { unsigned int i; // Enable thread safety in OpenSSL mutex_buf = (CRITICAL_SECTION*) malloc( total * sizeof(CRITICAL_SECTION) ); if ( !mutex_buf ) return -1; for ( i = 0; i < total; i++) InitializeCriticalSection( &(mutex_buf[i]) ); return 0; } #else // This array will store all of the mutexes available to OpenSSL static pthread_mutex_t * mutex_buf = 0; // OpenSSL callback to utilize static locks static void cb_openssl_locking_function( int mode, int n, const char * file, int line ) { (void)file; (void)line; if ( mode & CRYPTO_LOCK) pthread_mutex_lock( &mutex_buf[n] ); else pthread_mutex_unlock( &mutex_buf[n] ); } // OpenSSL callback to get the thread ID static void cb_openssl_id_function( CRYPTO_THREADID * id ) { CRYPTO_THREADID_set_pointer( id, pthread_self() ); } static int alloc_mutexes( unsigned int total ) { unsigned i; // Enable thread safety in OpenSSL mutex_buf = (pthread_mutex_t*) malloc( total * sizeof(pthread_mutex_t) ); if ( !mutex_buf ) return -1; for ( i = 0; i < total; i++) pthread_mutex_init( &(mutex_buf[i]), 0 ); return 0; } #endif static int ssl_init_context( irc_session_t * session ) { // Load the strings and init the library SSL_load_error_strings(); // Enable thread safety in OpenSSL if ( alloc_mutexes( CRYPTO_num_locks() ) ) return LIBIRC_ERR_NOMEM; // Register our callbacks CRYPTO_THREADID_set_callback( cb_openssl_id_function ); CRYPTO_set_locking_callback( cb_openssl_locking_function ); // Init it #if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_library_init(); #else OPENSSL_init_ssl(0, NULL); #endif if ( RAND_status() == 0 ) return LIBIRC_ERR_SSL_INIT_FAILED; // Create an SSL context; currently a single context is used for all connections ssl_context = SSL_CTX_new( SSLv23_method() ); if ( !ssl_context ) return LIBIRC_ERR_SSL_INIT_FAILED; // Disable SSLv2 as it is unsecure if ( (SSL_CTX_set_options( ssl_context, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2) == 0 ) return LIBIRC_ERR_SSL_INIT_FAILED; // Enable only strong ciphers if ( SSL_CTX_set_cipher_list( ssl_context, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH" ) != 1 ) return LIBIRC_ERR_SSL_INIT_FAILED; // Set the verification if ( session->options & LIBIRC_OPTION_SSL_NO_VERIFY ) SSL_CTX_set_verify( ssl_context, SSL_VERIFY_NONE, 0 ); else SSL_CTX_set_verify( ssl_context, SSL_VERIFY_PEER, 0 ); // Disable session caching SSL_CTX_set_session_cache_mode( ssl_context, SSL_SESS_CACHE_OFF ); // Enable SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER so we can move the buffer during sending SSL_CTX_set_mode( ssl_context, SSL_CTX_get_mode(ssl_context) | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER | SSL_MODE_ENABLE_PARTIAL_WRITE ); return 0; } #if defined (_WIN32) #define SSLINIT_LOCK_MUTEX(a) WaitForSingleObject( a, INFINITE ) #define SSLINIT_UNLOCK_MUTEX(a) ReleaseMutex( a ) #else #define SSLINIT_LOCK_MUTEX(a) pthread_mutex_lock( &a ) #define SSLINIT_UNLOCK_MUTEX(a) pthread_mutex_unlock( &a ) #endif // Initializes the SSL context. Must be called after the socket is created. static int ssl_init( irc_session_t * session ) { static int ssl_context_initialized = 0; #if defined (_WIN32) static HANDLE initmutex = 0; // First time run? Create the mutex if ( initmutex == 0 ) { HANDLE m = CreateMutex( 0, FALSE, 0 ); // Now we check if the mutex has already been created by another thread performing the init concurrently. // If it was, we close our mutex and use the original one. This could be done synchronously by using the // InterlockedCompareExchangePointer function. if ( InterlockedCompareExchangePointer( &m, m, 0 ) != 0 ) CloseHandle( m ); } #else static pthread_mutex_t initmutex = PTHREAD_MUTEX_INITIALIZER; #endif // This initialization needs to be performed only once. The problem is that it is called from // irc_connect() and this function may be called simultaneously from different threads. So we have // to use mutex on Linux because it allows static mutex initialization. Windows doesn't, so here // we do the sabre dance around it. SSLINIT_LOCK_MUTEX( initmutex ); if ( ssl_context_initialized == 0 ) { int res = ssl_init_context( session ); if ( res ) { SSLINIT_UNLOCK_MUTEX( initmutex ); return res; } ssl_context_initialized = 1; } SSLINIT_UNLOCK_MUTEX( initmutex ); // Get the SSL context session->ssl = SSL_new( ssl_context ); if ( !session->ssl ) return LIBIRC_ERR_SSL_INIT_FAILED; // Let OpenSSL use our socket if ( SSL_set_fd( session->ssl, session->sock) != 1 ) return LIBIRC_ERR_SSL_INIT_FAILED; // Since we're connecting on our own, tell openssl about it SSL_set_connect_state( session->ssl ); return 0; } static void ssl_handle_error( irc_session_t * session, int ssl_error ) { if ( ERR_GET_LIB(ssl_error) == ERR_LIB_SSL ) { if ( ERR_GET_REASON(ssl_error) == SSL_R_CERTIFICATE_VERIFY_FAILED ) { session->lasterror = LIBIRC_ERR_SSL_CERT_VERIFY_FAILED; return; } if ( ERR_GET_REASON(ssl_error) == SSL_R_UNKNOWN_PROTOCOL ) { session->lasterror = LIBIRC_ERR_CONNECT_SSL_FAILED; return; } } #if defined (ENABLE_DEBUG) if ( IS_DEBUG_ENABLED(session) ) fprintf (stderr, "[DEBUG] SSL error: %s\n\t(%d, %d)\n", ERR_error_string( ssl_error, NULL), ERR_GET_LIB( ssl_error), ERR_GET_REASON(ssl_error) ); #endif } static int ssl_recv( irc_session_t * session ) { int count; unsigned int amount = (sizeof (session->incoming_buf) - 1) - session->incoming_offset; ERR_clear_error(); // Read up to m_bufferLength bytes count = SSL_read( session->ssl, session->incoming_buf + session->incoming_offset, amount ); if ( count > 0 ) return count; else if ( count == 0 ) return -1; // remote connection closed else { int ssl_error = SSL_get_error( session->ssl, count ); // Handle SSL error since not all of them are actually errors switch ( ssl_error ) { case SSL_ERROR_WANT_READ: // This is not really an error. We received something, but // OpenSSL gave nothing to us because all it read was // internal data. Repeat the same read. return 0; case SSL_ERROR_WANT_WRITE: // This is not really an error. We received something, but // now OpenSSL needs to send the data before returning any // data to us (like negotiations). This means we'd need // to wait for WRITE event, but call SSL_read() again. session->flags |= SESSIONFL_SSL_READ_WANTS_WRITE; return 0; } // This is an SSL error, handle it ssl_handle_error( session, ERR_get_error() ); } return -1; } static int ssl_send( irc_session_t * session ) { int count; ERR_clear_error(); count = SSL_write( session->ssl, session->outgoing_buf, session->outgoing_offset ); if ( count > 0 ) return count; else if ( count == 0 ) return -1; else { int ssl_error = SSL_get_error( session->ssl, count ); switch ( ssl_error ) { case SSL_ERROR_WANT_READ: // This is not really an error. We sent some internal OpenSSL data, // but now it needs to read more data before it can send anything. // Thus we wait for READ event, but will call SSL_write() again. session->flags |= SESSIONFL_SSL_WRITE_WANTS_READ; return 0; case SSL_ERROR_WANT_WRITE: // This is not really an error. We sent some data, but now OpenSSL // wants to send some internal data before sending ours. // Repeat the same write. return 0; } // This is an SSL error, handle it ssl_handle_error( session, ERR_get_error() ); } return -1; } #endif // Handles both SSL and non-SSL reads. // Returns -1 in case there is an error and socket should be closed/connection terminated // Returns 0 in case there is a temporary error and the call should be retried (SSL_WANTS_WRITE case) // Returns a positive number if we actually read something static int session_socket_read( irc_session_t * session ) { int length; #if defined (ENABLE_SSL) if ( session->ssl ) { // Yes, I know this is tricky if ( session->flags & SESSIONFL_SSL_READ_WANTS_WRITE ) { session->flags &= ~SESSIONFL_SSL_READ_WANTS_WRITE; ssl_send( session ); return 0; } return ssl_recv( session ); } #endif length = socket_recv( &session->sock, session->incoming_buf + session->incoming_offset, (sizeof (session->incoming_buf) - 1) - session->incoming_offset ); // There is no "retry" errors for regular sockets if ( length <= 0 ) return -1; return length; } // Handles both SSL and non-SSL writes. // Returns -1 in case there is an error and socket should be closed/connection terminated // Returns 0 in case there is a temporary error and the call should be retried (SSL_WANTS_WRITE case) // Returns a positive number if we actually sent something static int session_socket_write( irc_session_t * session ) { int length; #if defined (ENABLE_SSL) if ( session->ssl ) { // Yep if ( session->flags & SESSIONFL_SSL_WRITE_WANTS_READ ) { session->flags &= ~SESSIONFL_SSL_WRITE_WANTS_READ; ssl_recv( session ); return 0; } return ssl_send( session ); } #endif length = socket_send (&session->sock, session->outgoing_buf, session->outgoing_offset); // There is no "retry" errors for regular sockets if ( length <= 0 ) return -1; return length; } libircclient-1.10/src/PaxHeaders.23204/sockets.c0000644000000000000000000000012412712240371016233 xustar0027 mtime=1462321401.984863 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/sockets.c0000644000175000001440000000601112712240371016511 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ /* * The sockets interface was moved out to simplify going OpenSSL integration. */ #if !defined (_WIN32) #include #include #include #include #include #define IS_SOCKET_ERROR(a) ((a)<0) typedef int socket_t; #else #include #include #include #define IS_SOCKET_ERROR(a) ((a)==SOCKET_ERROR) #if !defined(EWOULDBLOCK) #define EWOULDBLOCK WSAEWOULDBLOCK #endif #if !defined(EINPROGRESS) #define EINPROGRESS WSAEINPROGRESS #endif #if !defined(EINTR) #define EINTR WSAEINTR #endif #if !defined(EAGAIN) #define EAGAIN EWOULDBLOCK #endif typedef SOCKET socket_t; #endif #ifndef INADDR_NONE #define INADDR_NONE 0xFFFFFFFF #endif static int socket_error() { #if !defined (_WIN32) return errno; #else return WSAGetLastError(); #endif } static int socket_create (int domain, int type, socket_t * sock) { *sock = socket (domain, type, 0); return IS_SOCKET_ERROR(*sock) ? 1 : 0; } static int socket_make_nonblocking (socket_t * sock) { #if !defined (_WIN32) return fcntl (*sock, F_SETFL, fcntl (*sock, F_GETFL,0 ) | O_NONBLOCK) != 0; #else unsigned long mode = 1; return ioctlsocket (*sock, FIONBIO, &mode) == SOCKET_ERROR; #endif } static int socket_close (socket_t * sock) { #if !defined (_WIN32) close (*sock); #else closesocket (*sock); #endif *sock = -1; return 0; } static int socket_connect (socket_t * sock, const struct sockaddr *saddr, socklen_t len) { while ( 1 ) { if ( connect (*sock, saddr, len) < 0 ) { if ( socket_error() == EINTR ) continue; if ( socket_error() != EINPROGRESS && socket_error() != EWOULDBLOCK ) return 1; } return 0; } } static int socket_accept (socket_t * sock, socket_t * newsock, struct sockaddr *saddr, socklen_t * len) { while ( IS_SOCKET_ERROR(*newsock = accept (*sock, saddr, len)) ) { if ( socket_error() == EINTR ) continue; return 1; } return 0; } static int socket_recv (socket_t * sock, void * buf, size_t len) { int length; while ( (length = recv (*sock, buf, len, 0)) < 0 ) { int err = socket_error(); if ( err != EINTR && err != EAGAIN ) break; } return length; } static int socket_send (socket_t * sock, const void *buf, size_t len) { int length; while ( (length = send (*sock, buf, len, 0)) < 0 ) { int err = socket_error(); if ( err != EINTR && err != EAGAIN ) break; } return length; } libircclient-1.10/src/PaxHeaders.23204/utils.c0000644000000000000000000000012412333212511015712 xustar0027 mtime=1399657801.077183 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/utils.c0000644000175000001440000000627712333212511016206 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ static void libirc_add_to_set (int fd, fd_set *set, int * maxfd) { FD_SET (fd, set); if ( *maxfd < fd ) *maxfd = fd; } #if defined (ENABLE_DEBUG) static void libirc_dump_data (const char * prefix, const char * buf, unsigned int length) { printf ("%s: ", prefix); for ( ; length > 0; length -- ) printf ("%c", *buf++); } #endif /* * Finds a separator (\x0D\x0A), which separates two lines. */ static int libirc_findcrlf (const char * buf, int length) { int offset = 0; for ( ; offset < length; offset++ ) { if ( buf[offset] == 0x0D && offset < length - 1 && buf[offset+1] == 0x0A ) return offset; if ( buf[offset] == 0x0A) return offset; } return 0; } static int libirc_findcrlf_offset(const char *buf, int offset, const int length) { for(; offset < length; offset++) { if(buf[offset] != 0x0D && buf[offset] != 0x0A) { break; } } return offset; } static int libirc_findcrorlf (char * buf, int length) { int offset = 0; for ( ; offset < length; offset++ ) { if ( buf[offset] == 0x0D || buf[offset] == 0x0A ) { buf[offset++] = '\0'; if ( offset < (length - 1) && (buf[offset] == 0x0D || buf[offset] == 0x0A) ) offset++; return offset; } } return 0; } static void libirc_event_ctcp_internal (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { (void)event; (void)count; if ( origin ) { char nickbuf[128], textbuf[256]; irc_target_get_nick (origin, nickbuf, sizeof(nickbuf)); if ( strstr (params[0], "PING") == params[0] ) irc_cmd_ctcp_reply (session, nickbuf, params[0]); else if ( !strcmp (params[0], "VERSION") ) { if ( !session->ctcp_version ) { unsigned int high, low; irc_get_version (&high, &low); snprintf (textbuf, sizeof (textbuf), "VERSION libircclient by Georgy Yunaev ver.%d.%d", high, low); } else snprintf (textbuf, sizeof (textbuf), "VERSION %s", session->ctcp_version); irc_cmd_ctcp_reply (session, nickbuf, textbuf); } else if ( !strcmp (params[0], "FINGER") ) { sprintf (textbuf, "FINGER %s (%s) Idle 0 seconds", session->username ? session->username : "nobody", session->realname ? session->realname : "noname"); irc_cmd_ctcp_reply (session, nickbuf, textbuf); } else if ( !strcmp (params[0], "TIME") ) { time_t now = time(0); #if defined (ENABLE_THREADS) && defined (HAVE_LOCALTIME_R) struct tm tmtmp, *ltime = localtime_r (&now, &tmtmp); #else struct tm * ltime = localtime (&now); #endif strftime (textbuf, sizeof(textbuf), "%a %b %d %H:%M:%S %Z %Y", ltime); irc_cmd_ctcp_reply (session, nickbuf, textbuf); } } } libircclient-1.10/src/PaxHeaders.23204/libircclient.def0000644000000000000000000000012311127770134017542 xustar0026 mtime=1231024220.32802 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/libircclient.def0000644000175000001440000000144511127770134020027 0ustar00timusers00000000000000LIBRARY libircclient EXPORTS irc_create_session irc_destroy_session irc_connect irc_connect6 irc_disconnect irc_run irc_add_select_descriptors irc_process_select_descriptors irc_send_raw irc_cmd_quit irc_cmd_join irc_cmd_msg irc_cmd_me irc_cmd_notice irc_cmd_kick irc_cmd_ctcp_request irc_cmd_ctcp_reply irc_target_get_nick irc_target_get_host irc_dcc_chat irc_dcc_msg irc_dcc_accept irc_dcc_decline irc_dcc_sendfile irc_dcc_destroy irc_get_version irc_set_ctx irc_get_ctx irc_errno irc_strerror irc_option_set irc_option_reset irc_is_connected irc_cmd_part irc_cmd_invite irc_cmd_names irc_cmd_list irc_cmd_topic irc_cmd_channel_mode irc_cmd_user_mode irc_cmd_nick irc_cmd_whois irc_color_strip_from_mirc irc_color_convert_from_mirc irc_color_convert_to_mirc libircclient-1.10/src/PaxHeaders.23204/config.h.in0000644000000000000000000000012411705455314016445 xustar0027 mtime=1326865100.635729 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/config.h.in0000644000175000001440000000576711705455314016744 0ustar00timusers00000000000000/* include/config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the `gethostbyname_r' function. */ #undef HAVE_GETHOSTBYNAME_R /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA /* Define to 1 if you have the `inet_pton' function. */ #undef HAVE_INET_PTON /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `unsigned int' if does not define. */ #undef size_t libircclient-1.10/src/PaxHeaders.23204/errors.c0000644000000000000000000000012411705477072016107 xustar0027 mtime=1326874170.800417 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/errors.c0000644000175000001440000000260511705477072016372 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ static const char * libirc_strerror[LIBIRC_ERR_MAX] = { "No error", "Invalid argument", "Host not resolved", "Socket error", "Could not connect", "Remote connection closed", "Out of memory", "Could not accept new connection", "Object not found", "Could not DCC send this object", "Read error", "Write error", "Illegal operation for this state", "Timeout error", "Could not open file", "IRC session terminated", "IPv6 not supported", "SSL not supported", "SSL initialization failed", "SSL connection failed", "SSL certificate verify failed", }; int irc_errno (irc_session_t * session) { return session->lasterror; } const char * irc_strerror (int ircerrno) { if ( ircerrno >= 0 && ircerrno < LIBIRC_ERR_MAX ) return libirc_strerror[ircerrno]; else return "Invalid irc_errno value"; } libircclient-1.10/src/PaxHeaders.23204/session.h0000644000000000000000000000012412333212511016242 xustar0027 mtime=1399657801.077183 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/session.h0000644000175000001440000000331612333212511016525 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #ifndef INCLUDE_IRC_SESSION_H #define INCLUDE_IRC_SESSION_H #include "params.h" #include "dcc.h" #include "libirc_events.h" // Session flags #define SESSIONFL_MOTD_RECEIVED (0x00000001) #define SESSIONFL_SSL_CONNECTION (0x00000002) #define SESSIONFL_SSL_WRITE_WANTS_READ (0x00000004) #define SESSIONFL_SSL_READ_WANTS_WRITE (0x00000008) #define SESSIONFL_USES_IPV6 (0x00000010) struct irc_session_s { void * ctx; int dcc_timeout; int options; int lasterror; char incoming_buf[LIBIRC_BUFFER_SIZE]; unsigned int incoming_offset; char outgoing_buf[LIBIRC_BUFFER_SIZE]; unsigned int outgoing_offset; port_mutex_t mutex_session; socket_t sock; int state; int flags; char * server; char * server_password; char * realname; char * username; char * nick; char * ctcp_version; #if defined( ENABLE_IPV6 ) struct in6_addr local_addr6; #endif struct in_addr local_addr; irc_dcc_t dcc_last_id; irc_dcc_session_t * dcc_sessions; port_mutex_t mutex_dcc; irc_callbacks_t callbacks; #if defined (ENABLE_SSL) SSL * ssl; #endif }; #endif /* INCLUDE_IRC_SESSION_H */ libircclient-1.10/src/PaxHeaders.23204/dcc.c0000644000000000000000000000012412712240536015314 xustar0027 mtime=1462321502.257003 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/dcc.c0000644000175000001440000005712512712240536015606 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #define LIBIRC_DCC_CHAT 1 #define LIBIRC_DCC_SENDFILE 2 #define LIBIRC_DCC_RECVFILE 3 static irc_dcc_session_t * libirc_find_dcc_session (irc_session_t * session, irc_dcc_t dccid, int lock_list) { irc_dcc_session_t * s, *found = 0; if ( lock_list ) libirc_mutex_lock (&session->mutex_dcc); for ( s = session->dcc_sessions; s; s = s->next ) { if ( s->id == dccid ) { found = s; break; } } if ( found == 0 && lock_list ) libirc_mutex_unlock (&session->mutex_dcc); return found; } static void libirc_dcc_destroy_nolock (irc_session_t * session, irc_dcc_t dccid) { irc_dcc_session_t * dcc = libirc_find_dcc_session (session, dccid, 0); if ( dcc ) { if ( dcc->sock >= 0 ) socket_close (&dcc->sock); dcc->state = LIBIRC_STATE_REMOVED; } } static void libirc_remove_dcc_session (irc_session_t * session, irc_dcc_session_t * dcc, int lock_list) { if ( dcc->sock >= 0 ) socket_close (&dcc->sock); if ( dcc->dccsend_file_fp ) fclose (dcc->dccsend_file_fp); dcc->dccsend_file_fp = 0; libirc_mutex_destroy (&dcc->mutex_outbuf); if ( lock_list ) libirc_mutex_lock (&session->mutex_dcc); if ( session->dcc_sessions != dcc ) { irc_dcc_session_t * s; for ( s = session->dcc_sessions; s; s = s->next ) { if ( s->next == dcc ) { s->next = dcc->next; break; } } } else session->dcc_sessions = dcc->next; if ( lock_list ) libirc_mutex_unlock (&session->mutex_dcc); free (dcc); } static void libirc_dcc_add_descriptors (irc_session_t * ircsession, fd_set *in_set, fd_set *out_set, int * maxfd) { irc_dcc_session_t * dcc, *dcc_next; time_t now = time (0); libirc_mutex_lock (&ircsession->mutex_dcc); // Preprocessing DCC list: // - ask DCC send callbacks for data; // - remove unused DCC structures for ( dcc = ircsession->dcc_sessions; dcc; dcc = dcc_next ) { dcc_next = dcc->next; // Remove timed-out sessions if ( (dcc->state == LIBIRC_STATE_CONNECTING || dcc->state == LIBIRC_STATE_INIT || dcc->state == LIBIRC_STATE_LISTENING) && now - dcc->timeout > ircsession->dcc_timeout ) { // Inform the caller about DCC timeout. // Do not inform when state is LIBIRC_STATE_INIT - session // was initiated from someone else, and callbacks aren't set yet. if ( dcc->state != LIBIRC_STATE_INIT ) { libirc_mutex_unlock (&ircsession->mutex_dcc); if ( dcc->cb ) (*dcc->cb)(ircsession, dcc->id, LIBIRC_ERR_TIMEOUT, dcc->ctx, 0, 0); libirc_mutex_lock (&ircsession->mutex_dcc); } libirc_remove_dcc_session (ircsession, dcc, 0); } /* * If we're sending file, and the output buffer is empty, we need * to provide some data. */ if ( dcc->state == LIBIRC_STATE_CONNECTED && dcc->dccmode == LIBIRC_DCC_SENDFILE && dcc->dccsend_file_fp && dcc->outgoing_offset == 0 ) { int len = fread (dcc->outgoing_buf, 1, sizeof (dcc->outgoing_buf), dcc->dccsend_file_fp); if ( len <= 0 ) { int err = (len < 0 ? LIBIRC_ERR_READ : 0); libirc_mutex_unlock (&ircsession->mutex_dcc); (*dcc->cb)(ircsession, dcc->id, err, dcc->ctx, 0, 0); libirc_mutex_lock (&ircsession->mutex_dcc); libirc_dcc_destroy_nolock (ircsession, dcc->id); } else dcc->outgoing_offset = len; } // Clean up unused sessions if ( dcc->state == LIBIRC_STATE_REMOVED ) libirc_remove_dcc_session (ircsession, dcc, 0); } for ( dcc = ircsession->dcc_sessions; dcc; dcc = dcc->next ) { switch (dcc->state) { case LIBIRC_STATE_LISTENING: // While listening, only in_set descriptor should be set libirc_add_to_set (dcc->sock, in_set, maxfd); break; case LIBIRC_STATE_CONNECTING: // While connection, only out_set descriptor should be set libirc_add_to_set (dcc->sock, out_set, maxfd); break; case LIBIRC_STATE_CONNECTED: // Add input descriptor if there is space in input buffer // and it is DCC chat (during DCC send, there is nothing to recv) if ( dcc->incoming_offset < sizeof(dcc->incoming_buf) - 1 ) libirc_add_to_set (dcc->sock, in_set, maxfd); // Add output descriptor if there is something in output buffer libirc_mutex_lock (&dcc->mutex_outbuf); if ( dcc->outgoing_offset > 0 ) libirc_add_to_set (dcc->sock, out_set, maxfd); libirc_mutex_unlock (&dcc->mutex_outbuf); break; case LIBIRC_STATE_CONFIRM_SIZE: /* * If we're receiving file, then WE should confirm the transferred * part (so we have to sent data). But if we're sending the file, * then RECEIVER should confirm the packet, so we have to receive * data. * * We don't need to LOCK_DCC_OUTBUF - during file transfer, buffers * can't change asynchronously. */ if ( dcc->dccmode == LIBIRC_DCC_RECVFILE && dcc->outgoing_offset > 0 ) libirc_add_to_set (dcc->sock, out_set, maxfd); if ( dcc->dccmode == LIBIRC_DCC_SENDFILE && dcc->incoming_offset < 4 ) libirc_add_to_set (dcc->sock, in_set, maxfd); } } libirc_mutex_unlock (&ircsession->mutex_dcc); } static void libirc_dcc_process_descriptors (irc_session_t * ircsession, fd_set *in_set, fd_set *out_set) { irc_dcc_session_t * dcc; /* * We need to use such a complex scheme here, because on every callback * a number of DCC sessions could be destroyed. */ libirc_mutex_lock (&ircsession->mutex_dcc); for ( dcc = ircsession->dcc_sessions; dcc; dcc = dcc->next ) { if ( dcc->state == LIBIRC_STATE_LISTENING && FD_ISSET (dcc->sock, in_set) ) { socklen_t len = sizeof(dcc->remote_addr); #if defined(_WIN32) SOCKET nsock, err = 0; #else int nsock, err = 0; #endif // New connection is available; accept it. if ( socket_accept (&dcc->sock, &nsock, (struct sockaddr *) &dcc->remote_addr, &len) ) err = LIBIRC_ERR_ACCEPT; // On success, change the active socket and change the state if ( err == 0 ) { // close the listen socket, and replace it by a newly // accepted socket_close (&dcc->sock); dcc->sock = nsock; dcc->state = LIBIRC_STATE_CONNECTED; } // If this is DCC chat, inform the caller about accept() // success or failure. // Otherwise (DCC send) there is no reason. if ( dcc->dccmode == LIBIRC_DCC_CHAT ) { libirc_mutex_unlock (&ircsession->mutex_dcc); (*dcc->cb)(ircsession, dcc->id, err, dcc->ctx, 0, 0); libirc_mutex_lock (&ircsession->mutex_dcc); } if ( err ) libirc_dcc_destroy_nolock (ircsession, dcc->id); } if ( dcc->state == LIBIRC_STATE_CONNECTING && FD_ISSET (dcc->sock, out_set) ) { // Now we have to determine whether the socket is connected // or the connect is failed struct sockaddr_in saddr; socklen_t slen = sizeof(saddr); int err = 0; if ( getpeername (dcc->sock, (struct sockaddr*)&saddr, &slen) < 0 ) err = LIBIRC_ERR_CONNECT; // On success, change the state if ( err == 0 ) dcc->state = LIBIRC_STATE_CONNECTED; // If this is DCC chat, inform the caller about connect() // success or failure. // Otherwise (DCC send) there is no reason. if ( dcc->dccmode == LIBIRC_DCC_CHAT ) { libirc_mutex_unlock (&ircsession->mutex_dcc); (*dcc->cb)(ircsession, dcc->id, err, dcc->ctx, 0, 0); libirc_mutex_lock (&ircsession->mutex_dcc); } if ( err ) libirc_dcc_destroy_nolock (ircsession, dcc->id); } if ( dcc->state == LIBIRC_STATE_CONNECTED || dcc->state == LIBIRC_STATE_CONFIRM_SIZE ) { if ( FD_ISSET (dcc->sock, in_set) ) { int length, offset = 0, err = 0; unsigned int amount = sizeof (dcc->incoming_buf) - dcc->incoming_offset; length = socket_recv (&dcc->sock, dcc->incoming_buf + dcc->incoming_offset, amount); if ( length < 0 ) { err = LIBIRC_ERR_READ; } else if ( length == 0 ) { err = LIBIRC_ERR_CLOSED; if ( dcc->dccsend_file_fp ) { fclose (dcc->dccsend_file_fp); dcc->dccsend_file_fp = 0; } } else { dcc->incoming_offset += length; if ( dcc->dccmode != LIBIRC_DCC_CHAT ) offset = dcc->incoming_offset; else offset = libirc_findcrorlf (dcc->incoming_buf, dcc->incoming_offset); /* * In LIBIRC_STATE_CONFIRM_SIZE state we don't call any * callbacks (except there is an error). We just receive * the data, and compare it with the amount sent. */ if ( dcc->state == LIBIRC_STATE_CONFIRM_SIZE ) { if ( dcc->dccmode != LIBIRC_DCC_SENDFILE ) abort(); if ( dcc->incoming_offset == 4 ) { // The order is big-endian const unsigned char * bptr = (const unsigned char *) dcc->incoming_buf; unsigned int received_size = (bptr[0] << 24) | (bptr[1] << 16) | (bptr[2] << 8) | bptr[3]; // Sent size confirmed if ( dcc->file_confirm_offset == received_size ) { dcc->state = LIBIRC_STATE_CONNECTED; dcc->incoming_offset = 0; } else err = LIBIRC_ERR_WRITE; } } else { /* * If it is DCC_CHAT, we send a 0-terminated string * (which is smaller than offset). Otherwise we send * a full buffer. */ libirc_mutex_unlock (&ircsession->mutex_dcc); if ( dcc->dccmode != LIBIRC_DCC_CHAT ) { if ( dcc->dccmode != LIBIRC_DCC_RECVFILE ) abort(); (*dcc->cb)(ircsession, dcc->id, err, dcc->ctx, dcc->incoming_buf, offset); /* * If the session is not terminated in callback, * put the sent amount into the sent_packet_size_net_byteorder */ if ( dcc->state != LIBIRC_STATE_REMOVED ) { dcc->state = LIBIRC_STATE_CONFIRM_SIZE; dcc->file_confirm_offset += offset; // Store as big endian dcc->outgoing_buf[0] = (char) dcc->file_confirm_offset >> 24; dcc->outgoing_buf[1] = (char) dcc->file_confirm_offset >> 16; dcc->outgoing_buf[2] = (char) dcc->file_confirm_offset >> 8; dcc->outgoing_buf[3] = (char) dcc->file_confirm_offset; dcc->outgoing_offset = 4; } } else (*dcc->cb)(ircsession, dcc->id, err, dcc->ctx, dcc->incoming_buf, strlen(dcc->incoming_buf)); libirc_mutex_lock (&ircsession->mutex_dcc); if ( dcc->incoming_offset - offset > 0 ) memmove (dcc->incoming_buf, dcc->incoming_buf + offset, dcc->incoming_offset - offset); dcc->incoming_offset -= offset; } } /* * If error arises somewhere above, we inform the caller * of failure, and destroy this session. */ if ( err ) { libirc_mutex_unlock (&ircsession->mutex_dcc); (*dcc->cb)(ircsession, dcc->id, err, dcc->ctx, 0, 0); libirc_mutex_lock (&ircsession->mutex_dcc); libirc_dcc_destroy_nolock (ircsession, dcc->id); } } /* * Session might be closed (with sock = -1) after the in_set * processing, so before out_set processing we should check * for this case */ if ( dcc->state == LIBIRC_STATE_REMOVED ) continue; /* * Write bit set - we can send() something, and it won't block. */ if ( FD_ISSET (dcc->sock, out_set) ) { int length, offset, err = 0; /* * Because in some cases outgoing_buf could be changed * asynchronously (by another thread), we should lock * it. */ libirc_mutex_lock (&dcc->mutex_outbuf); offset = dcc->outgoing_offset; if ( offset > 0 ) { length = socket_send (&dcc->sock, dcc->outgoing_buf, offset); if ( length < 0 ) err = LIBIRC_ERR_WRITE; else if ( length == 0 ) err = LIBIRC_ERR_CLOSED; else { /* * If this was DCC_SENDFILE, and we just sent a packet, * change the state to wait for confirmation (and store * sent packet size) */ if ( dcc->state == LIBIRC_STATE_CONNECTED && dcc->dccmode == LIBIRC_DCC_SENDFILE ) { dcc->file_confirm_offset += offset; dcc->state = LIBIRC_STATE_CONFIRM_SIZE; libirc_mutex_unlock (&ircsession->mutex_dcc); libirc_mutex_unlock (&dcc->mutex_outbuf); (*dcc->cb)(ircsession, dcc->id, err, dcc->ctx, 0, offset); libirc_mutex_lock (&ircsession->mutex_dcc); libirc_mutex_lock (&dcc->mutex_outbuf); } if ( dcc->outgoing_offset - length > 0 ) memmove (dcc->outgoing_buf, dcc->outgoing_buf + length, dcc->outgoing_offset - length); dcc->outgoing_offset -= length; /* * If we just sent the confirmation data, change state * back. */ if ( dcc->state == LIBIRC_STATE_CONFIRM_SIZE && dcc->dccmode == LIBIRC_DCC_RECVFILE && dcc->outgoing_offset == 0 ) { /* * If the file is already received, we should inform * the caller, and close the session. */ if ( dcc->received_file_size == dcc->file_confirm_offset ) { libirc_mutex_unlock (&ircsession->mutex_dcc); libirc_mutex_unlock (&dcc->mutex_outbuf); (*dcc->cb)(ircsession, dcc->id, 0, dcc->ctx, 0, 0); libirc_dcc_destroy_nolock (ircsession, dcc->id); } else { /* Continue to receive the file */ dcc->state = LIBIRC_STATE_CONNECTED; } } } } libirc_mutex_unlock (&dcc->mutex_outbuf); /* * If error arises somewhere above, we inform the caller * of failure, and destroy this session. */ if ( err ) { libirc_mutex_unlock (&ircsession->mutex_dcc); (*dcc->cb)(ircsession, dcc->id, err, dcc->ctx, 0, 0); libirc_mutex_lock (&ircsession->mutex_dcc); libirc_dcc_destroy_nolock (ircsession, dcc->id); } } } } libirc_mutex_unlock (&ircsession->mutex_dcc); } static int libirc_new_dcc_session (irc_session_t * session, unsigned long ip, unsigned short port, int dccmode, void * ctx, irc_dcc_session_t ** pdcc) { irc_dcc_session_t * dcc = malloc (sizeof(irc_dcc_session_t)); if ( !dcc ) return LIBIRC_ERR_NOMEM; // setup memset (dcc, 0, sizeof(irc_dcc_session_t)); dcc->dccsend_file_fp = 0; if ( libirc_mutex_init (&dcc->mutex_outbuf) ) goto cleanup_exit_error; if ( socket_create (PF_INET, SOCK_STREAM, &dcc->sock) ) goto cleanup_exit_error; if ( !ip ) { unsigned long arg = 1; setsockopt (dcc->sock, SOL_SOCKET, SO_REUSEADDR, (char*)&arg, sizeof(arg)); #if defined (ENABLE_IPV6) if ( session->flags & SESSIONFL_USES_IPV6 ) { struct sockaddr_in6 saddr6; memset (&saddr6, 0, sizeof(saddr6)); saddr6.sin6_family = AF_INET6; memcpy (&saddr6.sin6_addr, &session->local_addr6, sizeof(session->local_addr6)); saddr6.sin6_port = htons (0); if ( bind (dcc->sock, (struct sockaddr *) &saddr6, sizeof(saddr6)) < 0 ) goto cleanup_exit_error; } else #endif { struct sockaddr_in saddr; memset (&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; memcpy (&saddr.sin_addr, &session->local_addr, sizeof(session->local_addr)); saddr.sin_port = htons (0); if ( bind (dcc->sock, (struct sockaddr *) &saddr, sizeof(saddr)) < 0 ) goto cleanup_exit_error; } if ( listen (dcc->sock, 5) < 0 ) goto cleanup_exit_error; dcc->state = LIBIRC_STATE_LISTENING; } else { // make socket non-blocking, so connect() call won't block if ( socket_make_nonblocking (&dcc->sock) ) goto cleanup_exit_error; memset (&dcc->remote_addr, 0, sizeof(dcc->remote_addr)); dcc->remote_addr.sin_family = AF_INET; dcc->remote_addr.sin_addr.s_addr = htonl (ip); // what idiot came up with idea to send IP address in host-byteorder? dcc->remote_addr.sin_port = htons(port); dcc->state = LIBIRC_STATE_INIT; } dcc->dccmode = dccmode; dcc->ctx = ctx; time (&dcc->timeout); // and store it libirc_mutex_lock (&session->mutex_dcc); dcc->id = session->dcc_last_id++; dcc->next = session->dcc_sessions; session->dcc_sessions = dcc; libirc_mutex_unlock (&session->mutex_dcc); *pdcc = dcc; return 0; cleanup_exit_error: if ( dcc->sock >= 0 ) socket_close (&dcc->sock); free (dcc); return LIBIRC_ERR_SOCKET; } int irc_dcc_destroy (irc_session_t * session, irc_dcc_t dccid) { // This function doesn't actually destroy the session; it just changes // its state to "removed" and closes the socket. The memory is actually // freed after the processing loop. irc_dcc_session_t * dcc = libirc_find_dcc_session (session, dccid, 1); if ( !dcc ) return 1; if ( dcc->sock >= 0 ) socket_close (&dcc->sock); dcc->state = LIBIRC_STATE_REMOVED; libirc_mutex_unlock (&session->mutex_dcc); return 0; } int irc_dcc_chat (irc_session_t * session, void * ctx, const char * nick, irc_dcc_callback_t callback, irc_dcc_t * dccid) { struct sockaddr_in saddr; socklen_t len = sizeof(saddr); char cmdbuf[128], notbuf[128]; irc_dcc_session_t * dcc; int err; if ( session->state != LIBIRC_STATE_CONNECTED ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } err = libirc_new_dcc_session (session, 0, 0, LIBIRC_DCC_CHAT, ctx, &dcc); if ( err ) { session->lasterror = err; return 1; } if ( getsockname (dcc->sock, (struct sockaddr*) &saddr, &len) < 0 ) { session->lasterror = LIBIRC_ERR_SOCKET; libirc_remove_dcc_session (session, dcc, 1); return 1; } sprintf (notbuf, "DCC Chat (%s)", inet_ntoa (saddr.sin_addr)); sprintf (cmdbuf, "DCC CHAT chat %lu %u", (unsigned long) ntohl (saddr.sin_addr.s_addr), ntohs (saddr.sin_port)); if ( irc_cmd_notice (session, nick, notbuf) || irc_cmd_ctcp_request (session, nick, cmdbuf) ) { libirc_remove_dcc_session (session, dcc, 1); return 1; } *dccid = dcc->id; dcc->cb = callback; dcc->dccmode = LIBIRC_DCC_CHAT; return 0; } int irc_dcc_msg (irc_session_t * session, irc_dcc_t dccid, const char * text) { irc_dcc_session_t * dcc = libirc_find_dcc_session (session, dccid, 1); if ( !dcc ) return 1; if ( dcc->dccmode != LIBIRC_DCC_CHAT ) { session->lasterror = LIBIRC_ERR_INVAL; libirc_mutex_unlock (&session->mutex_dcc); return 1; } if ( (strlen(text) + 2) >= (sizeof(dcc->outgoing_buf) - dcc->outgoing_offset) ) { session->lasterror = LIBIRC_ERR_NOMEM; libirc_mutex_unlock (&session->mutex_dcc); return 1; } libirc_mutex_lock (&dcc->mutex_outbuf); strcpy (dcc->outgoing_buf + dcc->outgoing_offset, text); dcc->outgoing_offset += strlen (text); dcc->outgoing_buf[dcc->outgoing_offset++] = 0x0D; dcc->outgoing_buf[dcc->outgoing_offset++] = 0x0A; libirc_mutex_unlock (&dcc->mutex_outbuf); libirc_mutex_unlock (&session->mutex_dcc); return 0; } static void libirc_dcc_request (irc_session_t * session, const char * nick, const char * req) { char filenamebuf[256]; unsigned long ip, size; unsigned short port; if ( sscanf (req, "DCC CHAT chat %lu %hu", &ip, &port) == 2 ) { if ( session->callbacks.event_dcc_chat_req ) { irc_dcc_session_t * dcc; int err = libirc_new_dcc_session (session, ip, port, LIBIRC_DCC_CHAT, 0, &dcc); if ( err ) { session->lasterror = err; return; } (*session->callbacks.event_dcc_chat_req) (session, nick, inet_ntoa (dcc->remote_addr.sin_addr), dcc->id); } return; } else if ( sscanf (req, "DCC SEND %s %lu %hu %lu", filenamebuf, &ip, &port, &size) == 4 ) { if ( session->callbacks.event_dcc_send_req ) { irc_dcc_session_t * dcc; int err = libirc_new_dcc_session (session, ip, port, LIBIRC_DCC_RECVFILE, 0, &dcc); if ( err ) { session->lasterror = err; return; } (*session->callbacks.event_dcc_send_req) (session, nick, inet_ntoa (dcc->remote_addr.sin_addr), filenamebuf, size, dcc->id); dcc->received_file_size = size; } return; } #if defined (ENABLE_DEBUG) fprintf (stderr, "BUG: Unhandled DCC message: %s\n", req); abort(); #endif } int irc_dcc_accept (irc_session_t * session, irc_dcc_t dccid, void * ctx, irc_dcc_callback_t callback) { irc_dcc_session_t * dcc = libirc_find_dcc_session (session, dccid, 1); if ( !dcc ) return 1; if ( dcc->state != LIBIRC_STATE_INIT ) { session->lasterror = LIBIRC_ERR_STATE; libirc_mutex_unlock (&session->mutex_dcc); return 1; } dcc->cb = callback; dcc->ctx = ctx; // Initiate the connect if ( socket_connect (&dcc->sock, (struct sockaddr *) &dcc->remote_addr, sizeof(dcc->remote_addr)) ) { libirc_dcc_destroy_nolock (session, dccid); libirc_mutex_unlock (&session->mutex_dcc); session->lasterror = LIBIRC_ERR_CONNECT; return 1; } dcc->state = LIBIRC_STATE_CONNECTING; libirc_mutex_unlock (&session->mutex_dcc); return 0; } int irc_dcc_decline (irc_session_t * session, irc_dcc_t dccid) { irc_dcc_session_t * dcc = libirc_find_dcc_session (session, dccid, 1); if ( !dcc ) return 1; if ( dcc->state != LIBIRC_STATE_INIT ) { session->lasterror = LIBIRC_ERR_STATE; libirc_mutex_unlock (&session->mutex_dcc); return 1; } libirc_dcc_destroy_nolock (session, dccid); libirc_mutex_unlock (&session->mutex_dcc); return 0; } int irc_dcc_sendfile (irc_session_t * session, void * ctx, const char * nick, const char * filename, irc_dcc_callback_t callback, irc_dcc_t * dccid) { struct sockaddr_in saddr; socklen_t len = sizeof(saddr); char cmdbuf[128], notbuf[128]; irc_dcc_session_t * dcc; const char * p; int err; long filesize; if ( !session || !dccid || !filename || !callback ) { session->lasterror = LIBIRC_ERR_INVAL; return 1; } if ( session->state != LIBIRC_STATE_CONNECTED ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } if ( (err = libirc_new_dcc_session (session, 0, 0, LIBIRC_DCC_SENDFILE, ctx, &dcc)) != 0 ) { session->lasterror = err; return 1; } if ( (dcc->dccsend_file_fp = fopen (filename, "rb")) == 0 ) { libirc_remove_dcc_session (session, dcc, 1); session->lasterror = LIBIRC_ERR_OPENFILE; return 1; } /* Get file length */ if ( fseek (dcc->dccsend_file_fp, 0, SEEK_END) || (filesize = ftell (dcc->dccsend_file_fp)) == -1 || fseek (dcc->dccsend_file_fp, 0, SEEK_SET) ) { libirc_remove_dcc_session (session, dcc, 1); session->lasterror = LIBIRC_ERR_NODCCSEND; return 1; } if ( getsockname (dcc->sock, (struct sockaddr*) &saddr, &len) < 0 ) { libirc_remove_dcc_session (session, dcc, 1); session->lasterror = LIBIRC_ERR_SOCKET; return 1; } // Remove path from the filename if ( (p = strrchr (filename, '\\')) == 0 && (p = strrchr (filename, '/')) == 0 ) p = filename; else p++; // skip directory slash sprintf (notbuf, "DCC Send %s (%s)", p, inet_ntoa (saddr.sin_addr)); sprintf (cmdbuf, "DCC SEND %s %lu %u %ld", p, (unsigned long) ntohl (saddr.sin_addr.s_addr), ntohs (saddr.sin_port), filesize); if ( irc_cmd_notice (session, nick, notbuf) || irc_cmd_ctcp_request (session, nick, cmdbuf) ) { libirc_remove_dcc_session (session, dcc, 1); return 1; } *dccid = dcc->id; dcc->cb = callback; return 0; } libircclient-1.10/src/PaxHeaders.23204/libircclient.c0000644000000000000000000000012412712252212017220 xustar0027 mtime=1462326410.688766 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/libircclient.c0000644000175000001440000007472112712252212017513 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #define IS_DEBUG_ENABLED(s) ((s)->options & LIBIRC_OPTION_DEBUG) #include "portable.c" #include "sockets.c" #include "libircclient.h" #include "session.h" #include "utils.c" #include "errors.c" #include "colors.c" #include "dcc.c" #include "ssl.c" #ifdef _MSC_VER /* * The debugger of MSVC 2005 does not like strdup. * It complains about heap corruption when free is called. * Use _strdup instead. */ #undef strdup #define strdup _strdup #endif #if defined (WIN32_DLL) static int winsock_refcount = 0; #endif irc_session_t * irc_create_session (irc_callbacks_t * callbacks) { irc_session_t * session; #if defined (WIN32_DLL) // From MSDN: The WSAStartup function typically leads to protocol-specific helper // DLLs being loaded. As a result, the WSAStartup function should not be called // from the DllMain function in a application DLL. This can potentially cause deadlocks. if ( winsock_refcount == 0 ) { WORD wVersionRequested = MAKEWORD (1, 1); WSADATA wsaData; if ( WSAStartup (wVersionRequested, &wsaData) != 0 ) return 0; winsock_refcount++; } #endif session = malloc (sizeof(irc_session_t)); if ( !session ) return 0; memset (session, 0, sizeof(irc_session_t)); session->sock = -1; if ( libirc_mutex_init (&session->mutex_session) || libirc_mutex_init (&session->mutex_dcc) ) { free (session); return 0; } session->dcc_last_id = 1; session->dcc_timeout = 60; memcpy (&session->callbacks, callbacks, sizeof(irc_callbacks_t)); if ( !session->callbacks.event_ctcp_req ) session->callbacks.event_ctcp_req = libirc_event_ctcp_internal; return session; } static void free_ircsession_strings (irc_session_t * session) { if ( session->realname ) free (session->realname); if ( session->username ) free (session->username); if ( session->nick ) free (session->nick); if ( session->server ) free (session->server); if ( session->server_password ) free (session->server_password); session->realname = 0; session->username = 0; session->nick = 0; session->server = 0; session->server_password = 0; } void irc_destroy_session (irc_session_t * session) { free_ircsession_strings( session ); // The CTCP VERSION must be freed only now if ( session->ctcp_version ) free (session->ctcp_version); if ( session->sock >= 0 ) socket_close (&session->sock); #if defined (ENABLE_THREADS) libirc_mutex_destroy (&session->mutex_session); #endif #if defined (ENABLE_SSL) if ( session->ssl ) SSL_free( session->ssl ); #endif /* * delete DCC data * libirc_remove_dcc_session removes the DCC session from the list. */ while ( session->dcc_sessions ) libirc_remove_dcc_session (session, session->dcc_sessions, 0); libirc_mutex_destroy (&session->mutex_dcc); free (session); #if defined (WIN32_DLL) if ( --winsock_refcount == 0 ) WSACleanup(); #endif } int irc_connect (irc_session_t * session, const char * server, unsigned short port, const char * server_password, const char * nick, const char * username, const char * realname) { struct sockaddr_in saddr; char * p; // Check and copy all the specified fields if ( !server || !nick ) { session->lasterror = LIBIRC_ERR_INVAL; return 1; } if ( session->state != LIBIRC_STATE_INIT ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } // Free the strings if defined; may be the case when the session is reused after the connection fails free_ircsession_strings( session ); // Handle the server # prefix (SSL) if ( server[0] == SSL_PREFIX ) { #if defined (ENABLE_SSL) server++; session->flags |= SESSIONFL_SSL_CONNECTION; #else session->lasterror = LIBIRC_ERR_SSL_NOT_SUPPORTED; return 1; #endif } if ( username ) session->username = strdup (username); if ( server_password ) session->server_password = strdup (server_password); if ( realname ) session->realname = strdup (realname); session->nick = strdup (nick); session->server = strdup (server); // If port number is zero and server contains the port, parse it if ( port == 0 && (p = strchr( session->server, ':' )) != 0 ) { // Terminate the string and parse the port number *p++ = '\0'; port = atoi( p ); } // IPv4 address resolving memset( &saddr, 0, sizeof(saddr) ); saddr.sin_family = AF_INET; saddr.sin_port = htons (port); saddr.sin_addr.s_addr = inet_addr( session->server ); if ( saddr.sin_addr.s_addr == INADDR_NONE ) { struct hostent *hp; #if defined HAVE_GETHOSTBYNAME_R int tmp_errno; struct hostent tmp_hostent; char buf[2048]; if ( gethostbyname_r (session->server, &tmp_hostent, buf, sizeof(buf), &hp, &tmp_errno) ) hp = 0; #else hp = gethostbyname (session->server); #endif // HAVE_GETHOSTBYNAME_R if ( !hp ) { session->lasterror = LIBIRC_ERR_RESOLV; return 1; } memcpy (&saddr.sin_addr, hp->h_addr, (size_t) hp->h_length); } // create the IRC server socket if ( socket_create( PF_INET, SOCK_STREAM, &session->sock) || socket_make_nonblocking (&session->sock) ) { session->lasterror = LIBIRC_ERR_SOCKET; return 1; } #if defined (ENABLE_SSL) // Init the SSL stuff if ( session->flags & SESSIONFL_SSL_CONNECTION ) { int rc = ssl_init( session ); if ( rc != 0 ) { session->lasterror = rc; return 1; } } #endif // and connect to the IRC server if ( socket_connect (&session->sock, (struct sockaddr *) &saddr, sizeof(saddr)) ) { session->lasterror = LIBIRC_ERR_CONNECT; return 1; } session->state = LIBIRC_STATE_CONNECTING; session->flags = SESSIONFL_USES_IPV6; // reset in case of reconnect return 0; } int irc_connect6 (irc_session_t * session, const char * server, unsigned short port, const char * server_password, const char * nick, const char * username, const char * realname) { #if defined (ENABLE_IPV6) struct sockaddr_in6 saddr; struct addrinfo ainfo, *res = NULL; char portStr[32], *p; #if defined (_WIN32) int addrlen = sizeof(saddr); HMODULE hWsock; getaddrinfo_ptr_t getaddrinfo_ptr; freeaddrinfo_ptr_t freeaddrinfo_ptr; int resolvesuccess = 0; #endif // Check and copy all the specified fields if ( !server || !nick ) { session->lasterror = LIBIRC_ERR_INVAL; return 1; } if ( session->state != LIBIRC_STATE_INIT ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } // Free the strings if defined; may be the case when the session is reused after the connection fails free_ircsession_strings( session ); // Handle the server # prefix (SSL) if ( server[0] == SSL_PREFIX ) { #if defined (ENABLE_SSL) server++; session->flags |= SESSIONFL_SSL_CONNECTION; #else session->lasterror = LIBIRC_ERR_SSL_NOT_SUPPORTED; return 1; #endif } if ( username ) session->username = strdup (username); if ( server_password ) session->server_password = strdup (server_password); if ( realname ) session->realname = strdup (realname); session->nick = strdup (nick); session->server = strdup (server); // If port number is zero and server contains the port, parse it if ( port == 0 && (p = strchr( session->server, ':' )) != 0 ) { // Terminate the string and parse the port number *p++ = '\0'; port = atoi( p ); } memset( &saddr, 0, sizeof(saddr) ); saddr.sin6_family = AF_INET6; saddr.sin6_port = htons (port); sprintf( portStr, "%u", (unsigned)port ); #if defined (_WIN32) if ( WSAStringToAddressA( (LPSTR)session->server, AF_INET6, NULL, (struct sockaddr *)&saddr, &addrlen ) == SOCKET_ERROR ) { hWsock = LoadLibraryA("ws2_32"); if (hWsock) { /* Determine functions at runtime, because windows systems < XP do not * support getaddrinfo. */ getaddrinfo_ptr = (getaddrinfo_ptr_t)GetProcAddress(hWsock, "getaddrinfo"); freeaddrinfo_ptr = (freeaddrinfo_ptr_t)GetProcAddress(hWsock, "freeaddrinfo"); if (getaddrinfo_ptr && freeaddrinfo_ptr) { memset(&ainfo, 0, sizeof(ainfo)); ainfo.ai_family = AF_INET6; ainfo.ai_socktype = SOCK_STREAM; ainfo.ai_protocol = 0; if ( getaddrinfo_ptr(session->server, portStr, &ainfo, &res) == 0 && res ) { resolvesuccess = 1; memcpy( &saddr, res->ai_addr, res->ai_addrlen ); freeaddrinfo_ptr( res ); } } FreeLibrary(hWsock); } if (!resolvesuccess) { session->lasterror = LIBIRC_ERR_RESOLV; return 1; } } #else if ( inet_pton( AF_INET6, session->server, (void*) &saddr.sin6_addr ) <= 0 ) { memset( &ainfo, 0, sizeof(ainfo) ); ainfo.ai_family = AF_INET6; ainfo.ai_socktype = SOCK_STREAM; ainfo.ai_protocol = 0; if ( getaddrinfo( session->server, portStr, &ainfo, &res ) || !res ) { session->lasterror = LIBIRC_ERR_RESOLV; return 1; } memcpy( &saddr, res->ai_addr, res->ai_addrlen ); freeaddrinfo( res ); } #endif // create the IRC server socket if ( socket_create( PF_INET6, SOCK_STREAM, &session->sock) || socket_make_nonblocking (&session->sock) ) { session->lasterror = LIBIRC_ERR_SOCKET; return 1; } #if defined (ENABLE_SSL) // Init the SSL stuff if ( session->flags & SESSIONFL_SSL_CONNECTION ) { int rc = ssl_init( session ); if ( rc != 0 ) return rc; } #endif // and connect to the IRC server if ( socket_connect (&session->sock, (struct sockaddr *) &saddr, sizeof(saddr)) ) { session->lasterror = LIBIRC_ERR_CONNECT; return 1; } session->state = LIBIRC_STATE_CONNECTING; session->flags = 0; // reset in case of reconnect return 0; #else session->lasterror = LIBIRC_ERR_NOIPV6; return 1; #endif } int irc_is_connected (irc_session_t * session) { return (session->state == LIBIRC_STATE_CONNECTED || session->state == LIBIRC_STATE_CONNECTING) ? 1 : 0; } int irc_run (irc_session_t * session) { if ( session->state != LIBIRC_STATE_CONNECTING ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } while ( irc_is_connected(session) ) { struct timeval tv; fd_set in_set, out_set; int maxfd = 0; tv.tv_usec = 250000; tv.tv_sec = 0; // Init sets FD_ZERO (&in_set); FD_ZERO (&out_set); irc_add_select_descriptors (session, &in_set, &out_set, &maxfd); if ( select (maxfd + 1, &in_set, &out_set, 0, &tv) < 0 ) { if ( socket_error() == EINTR ) continue; session->lasterror = LIBIRC_ERR_TERMINATED; return 1; } if ( irc_process_select_descriptors (session, &in_set, &out_set) ) return 1; } return 0; } int irc_add_select_descriptors (irc_session_t * session, fd_set *in_set, fd_set *out_set, int * maxfd) { if ( session->sock < 0 || session->state == LIBIRC_STATE_INIT || session->state == LIBIRC_STATE_DISCONNECTED ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } libirc_mutex_lock (&session->mutex_session); switch (session->state) { case LIBIRC_STATE_CONNECTING: // While connection, only out_set descriptor should be set libirc_add_to_set (session->sock, out_set, maxfd); break; case LIBIRC_STATE_CONNECTED: // Add input descriptor if there is space in input buffer if ( session->incoming_offset < (sizeof (session->incoming_buf) - 1) || (session->flags & SESSIONFL_SSL_WRITE_WANTS_READ) != 0 ) libirc_add_to_set (session->sock, in_set, maxfd); // Add output descriptor if there is something in output buffer if ( libirc_findcrlf (session->outgoing_buf, session->outgoing_offset) > 0 || (session->flags & SESSIONFL_SSL_READ_WANTS_WRITE) != 0 ) libirc_add_to_set (session->sock, out_set, maxfd); break; } libirc_mutex_unlock (&session->mutex_session); libirc_dcc_add_descriptors (session, in_set, out_set, maxfd); return 0; } static void libirc_process_incoming_data (irc_session_t * session, size_t process_length) { #define MAX_PARAMS_ALLOWED 10 char buf[2*512], *p, *s; const char * command = 0, *prefix = 0, *params[MAX_PARAMS_ALLOWED+1]; int code = 0, paramindex = 0; char *buf_end = buf + process_length; if ( process_length > sizeof(buf) ) abort(); // should be impossible memcpy (buf, session->incoming_buf, process_length); buf[process_length] = '\0'; memset ((char *)params, 0, sizeof(params)); p = buf; /* * From RFC 1459: * ::= [':' ] * ::= | [ '!' ] [ '@' ] * ::= { } | * ::= ' ' { ' ' } * ::= [ ':' | ] * ::= * ::= */ // Parse if ( buf[0] == ':' ) { while ( *p && *p != ' ') p++; *p++ = '\0'; // we use buf+1 to skip the leading colon prefix = buf + 1; // If LIBIRC_OPTION_STRIPNICKS is set, we should 'clean up' nick // right here if ( session->options & LIBIRC_OPTION_STRIPNICKS ) { for ( s = buf + 1; *s; s++ ) { if ( *s == '@' || *s == '!' ) { *s = '\0'; break; } } } } // Parse if ( isdigit (p[0]) && isdigit (p[1]) && isdigit (p[2]) ) { p[3] = '\0'; code = atoi (p); p += 4; } else { s = p; while ( *p && *p != ' ') p++; *p++ = '\0'; command = s; } // Parse middle/params while ( *p && paramindex < MAX_PARAMS_ALLOWED ) { // beginning from ':', this is the last param if ( *p == ':' ) { params[paramindex++] = p + 1; // skip : break; } // Just a param for ( s = p; *p && *p != ' '; p++ ) ; params[paramindex++] = s; if ( !*p ) break; *p++ = '\0'; } // Handle PING/PONG if ( command && !strncmp (command, "PING", buf_end - command) && params[0] ) { irc_send_raw (session, "PONG %s", params[0]); return; } // and dump if ( code ) { // We use SESSIONFL_MOTD_RECEIVED flag to check whether it is the first // RPL_ENDOFMOTD or ERR_NOMOTD after the connection. if ( (code == 1 || code == 376 || code == 422) && !(session->flags & SESSIONFL_MOTD_RECEIVED ) ) { session->flags |= SESSIONFL_MOTD_RECEIVED; if ( session->callbacks.event_connect ) (*session->callbacks.event_connect) (session, "CONNECT", prefix, params, paramindex); } if ( session->callbacks.event_numeric ) (*session->callbacks.event_numeric) (session, code, prefix, params, paramindex); } else { if ( !strncmp (command, "NICK", buf_end - command) ) { /* * If we're changed our nick, we should save it. */ char nickbuf[256]; irc_target_get_nick (prefix, nickbuf, sizeof(nickbuf)); if ( !strncmp (nickbuf, session->nick, strlen(session->nick)) && paramindex > 0 ) { free (session->nick); session->nick = strdup (params[0]); } if ( session->callbacks.event_nick ) (*session->callbacks.event_nick) (session, command, prefix, params, paramindex); } else if ( !strncmp (command, "QUIT", buf_end - command) ) { if ( session->callbacks.event_quit ) (*session->callbacks.event_quit) (session, command, prefix, params, paramindex); } else if ( !strncmp (command, "JOIN", buf_end - command) ) { if ( session->callbacks.event_join ) (*session->callbacks.event_join) (session, command, prefix, params, paramindex); } else if ( !strncmp (command, "PART", buf_end - command) ) { if ( session->callbacks.event_part ) (*session->callbacks.event_part) (session, command, prefix, params, paramindex); } else if ( !strncmp (command, "MODE", buf_end - command) ) { if ( paramindex > 0 && !strncmp (params[0], session->nick, strlen(session->nick)) ) { params[0] = params[1]; paramindex = 1; if ( session->callbacks.event_umode ) (*session->callbacks.event_umode) (session, command, prefix, params, paramindex); } else { if ( session->callbacks.event_mode ) (*session->callbacks.event_mode) (session, command, prefix, params, paramindex); } } else if ( !strncmp (command, "TOPIC", buf_end - command) ) { if ( session->callbacks.event_topic ) (*session->callbacks.event_topic) (session, command, prefix, params, paramindex); } else if ( !strncmp (command, "KICK", buf_end - command) ) { if ( session->callbacks.event_kick ) (*session->callbacks.event_kick) (session, command, prefix, params, paramindex); } else if ( !strncmp (command, "PRIVMSG", buf_end - command) ) { if ( paramindex > 1 ) { size_t msglen = strlen (params[1]); /* * Check for CTCP request (a CTCP message starts from 0x01 * and ends by 0x01 */ if ( params[1][0] == 0x01 && params[1][msglen-1] == 0x01 ) { char ctcp_buf[128]; msglen -= 2; if ( msglen > sizeof(ctcp_buf) - 1 ) msglen = sizeof(ctcp_buf) - 1; memcpy (ctcp_buf, params[1] + 1, msglen); ctcp_buf[msglen] = '\0'; if ( !strncasecmp(ctcp_buf, "DCC ", 4) ) libirc_dcc_request (session, prefix, ctcp_buf); else if ( !strncasecmp( ctcp_buf, "ACTION ", 7) && session->callbacks.event_ctcp_action ) { params[1] = ctcp_buf + 7; // the length of "ACTION " paramindex = 2; (*session->callbacks.event_ctcp_action) (session, "ACTION", prefix, params, paramindex); } else { params[0] = ctcp_buf; paramindex = 1; if ( session->callbacks.event_ctcp_req ) (*session->callbacks.event_ctcp_req) (session, "CTCP", prefix, params, paramindex); } } else if ( !strncasecmp (params[0], session->nick, strlen(session->nick) ) ) { if ( session->callbacks.event_privmsg ) (*session->callbacks.event_privmsg) (session, "PRIVMSG", prefix, params, paramindex); } else { if ( session->callbacks.event_channel ) (*session->callbacks.event_channel) (session, "CHANNEL", prefix, params, paramindex); } } } else if ( !strncmp (command, "NOTICE", buf_end - command) ) { size_t msglen = strlen (params[1]); /* * Check for CTCP request (a CTCP message starts from 0x01 * and ends by 0x01 */ if ( paramindex > 1 && params[1][0] == 0x01 && params[1][msglen-1] == 0x01 ) { char ctcp_buf[512]; msglen -= 2; if ( msglen > sizeof(ctcp_buf) - 1 ) msglen = sizeof(ctcp_buf) - 1; memcpy (ctcp_buf, params[1] + 1, msglen); ctcp_buf[msglen] = '\0'; params[0] = ctcp_buf; paramindex = 1; if ( session->callbacks.event_ctcp_rep ) (*session->callbacks.event_ctcp_rep) (session, "CTCP", prefix, params, paramindex); } else if ( !strncasecmp (params[0], session->nick, strlen(session->nick) ) ) { if ( session->callbacks.event_notice ) (*session->callbacks.event_notice) (session, command, prefix, params, paramindex); } else { if ( session->callbacks.event_channel_notice ) (*session->callbacks.event_channel_notice) (session, command, prefix, params, paramindex); } } else if ( !strncmp (command, "INVITE", buf_end - command) ) { if ( session->callbacks.event_invite ) (*session->callbacks.event_invite) (session, command, prefix, params, paramindex); } else if ( !strncmp (command, "KILL", buf_end - command) ) { ; /* ignore this event - not all servers generate this */ } else { /* * The "unknown" event is triggered upon receipt of any number of * unclassifiable miscellaneous messages, which aren't handled by * the library. */ if ( session->callbacks.event_unknown ) (*session->callbacks.event_unknown) (session, command, prefix, params, paramindex); } } } int irc_process_select_descriptors (irc_session_t * session, fd_set *in_set, fd_set *out_set) { char buf[256], hname[256]; if ( session->sock < 0 || session->state == LIBIRC_STATE_INIT || session->state == LIBIRC_STATE_DISCONNECTED ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } session->lasterror = 0; libirc_dcc_process_descriptors (session, in_set, out_set); // Handle "connection succeed" / "connection failed" if ( session->state == LIBIRC_STATE_CONNECTING ) { // If the socket is not connected yet, wait longer - it is not an error if ( !FD_ISSET (session->sock, out_set) ) return 0; // Now we have to determine whether the socket is connected // or the connect is failed struct sockaddr_storage saddr, laddr; socklen_t slen = sizeof(saddr); socklen_t llen = sizeof(laddr); if ( getsockname (session->sock, (struct sockaddr*)&laddr, &llen) < 0 || getpeername (session->sock, (struct sockaddr*)&saddr, &slen) < 0 ) { // connection failed session->lasterror = LIBIRC_ERR_CONNECT; session->state = LIBIRC_STATE_DISCONNECTED; return 1; } if (saddr.ss_family == AF_INET) memcpy (&session->local_addr, &((struct sockaddr_in *)&laddr)->sin_addr, sizeof(struct in_addr)); else memcpy (&session->local_addr, &((struct sockaddr_in6 *)&laddr)->sin6_addr, sizeof(struct in6_addr)); #if defined (ENABLE_DEBUG) if ( IS_DEBUG_ENABLED(session) ) fprintf (stderr, "[DEBUG] Detected local address: %s\n", inet_ntoa(session->local_addr)); #endif session->state = LIBIRC_STATE_CONNECTED; // Get the hostname if ( gethostname (hname, sizeof(hname)) < 0 ) strcpy (hname, "unknown"); // Prepare the data, which should be sent to the server if ( session->server_password ) { snprintf (buf, sizeof(buf), "PASS %s", session->server_password); irc_send_raw (session, buf); } snprintf (buf, sizeof(buf), "NICK %s", session->nick); irc_send_raw (session, buf); /* * RFC 1459 states that "hostname and servername are normally * ignored by the IRC server when the USER command comes from * a directly connected client (for security reasons)", therefore * we don't need them. */ snprintf (buf, sizeof(buf), "USER %s unknown unknown :%s", session->username ? session->username : "nobody", session->realname ? session->realname : "noname"); irc_send_raw (session, buf); return 0; } if ( session->state != LIBIRC_STATE_CONNECTED ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } // Hey, we've got something to read! if ( FD_ISSET (session->sock, in_set) ) { int offset, length = session_socket_read( session ); if ( length < 0 ) { if ( session->lasterror == 0 ) session->lasterror = (length == 0 ? LIBIRC_ERR_CLOSED : LIBIRC_ERR_TERMINATED); session->state = LIBIRC_STATE_DISCONNECTED; return 1; } session->incoming_offset += length; // process the incoming data while ( (offset = libirc_findcrlf (session->incoming_buf, session->incoming_offset)) > 0 ) { #if defined (ENABLE_DEBUG) if ( IS_DEBUG_ENABLED(session) ) libirc_dump_data ("RECV", session->incoming_buf, offset); #endif // parse the string libirc_process_incoming_data (session, offset); offset = libirc_findcrlf_offset(session->incoming_buf, offset, session->incoming_offset); if ( session->incoming_offset - offset > 0 ) memmove (session->incoming_buf, session->incoming_buf + offset, session->incoming_offset - offset); session->incoming_offset -= offset; } } // We can write a stored buffer if ( FD_ISSET (session->sock, out_set) ) { int length; // Because outgoing_buf could be changed asynchronously, we should lock any change libirc_mutex_lock (&session->mutex_session); length = session_socket_write( session ); if ( length < 0 ) { if ( session->lasterror == 0 ) session->lasterror = (length == 0 ? LIBIRC_ERR_CLOSED : LIBIRC_ERR_TERMINATED); session->state = LIBIRC_STATE_DISCONNECTED; libirc_mutex_unlock (&session->mutex_session); return 1; } #if defined (ENABLE_DEBUG) if ( IS_DEBUG_ENABLED(session) ) libirc_dump_data ("SEND", session->outgoing_buf, length); #endif if ( length > 0 && session->outgoing_offset - length > 0 ) memmove (session->outgoing_buf, session->outgoing_buf + length, session->outgoing_offset - length); session->outgoing_offset -= length; libirc_mutex_unlock (&session->mutex_session); } return 0; } int irc_send_raw (irc_session_t * session, const char * format, ...) { char buf[1024]; va_list va_alist; if ( session->state != LIBIRC_STATE_CONNECTED ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } va_start (va_alist, format); vsnprintf (buf, sizeof(buf), format, va_alist); va_end (va_alist); libirc_mutex_lock (&session->mutex_session); if ( (strlen(buf) + 2) >= (sizeof(session->outgoing_buf) - session->outgoing_offset) ) { libirc_mutex_unlock (&session->mutex_session); session->lasterror = LIBIRC_ERR_NOMEM; return 1; } strcpy (session->outgoing_buf + session->outgoing_offset, buf); session->outgoing_offset += strlen (buf); session->outgoing_buf[session->outgoing_offset++] = 0x0D; session->outgoing_buf[session->outgoing_offset++] = 0x0A; libirc_mutex_unlock (&session->mutex_session); return 0; } int irc_cmd_quit (irc_session_t * session, const char * reason) { return irc_send_raw (session, "QUIT :%s", reason ? reason : "quit"); } int irc_cmd_join (irc_session_t * session, const char * channel, const char * key) { if ( !channel ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } if ( key ) return irc_send_raw (session, "JOIN %s :%s", channel, key); else return irc_send_raw (session, "JOIN %s", channel); } int irc_cmd_part (irc_session_t * session, const char * channel) { if ( !channel ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } return irc_send_raw (session, "PART %s", channel); } int irc_cmd_topic (irc_session_t * session, const char * channel, const char * topic) { if ( !channel ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } if ( topic ) return irc_send_raw (session, "TOPIC %s :%s", channel, topic); else return irc_send_raw (session, "TOPIC %s", channel); } int irc_cmd_names (irc_session_t * session, const char * channel) { if ( !channel ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } return irc_send_raw (session, "NAMES %s", channel); } int irc_cmd_list (irc_session_t * session, const char * channel) { if ( channel ) return irc_send_raw (session, "LIST %s", channel); else return irc_send_raw (session, "LIST"); } int irc_cmd_invite (irc_session_t * session, const char * nick, const char * channel) { if ( !channel || !nick ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } return irc_send_raw (session, "INVITE %s %s", nick, channel); } int irc_cmd_kick (irc_session_t * session, const char * nick, const char * channel, const char * comment) { if ( !channel || !nick ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } if ( comment ) return irc_send_raw (session, "KICK %s %s :%s", channel, nick, comment); else return irc_send_raw (session, "KICK %s %s", channel, nick); } int irc_cmd_msg (irc_session_t * session, const char * nch, const char * text) { if ( !nch || !text ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } return irc_send_raw (session, "PRIVMSG %s :%s", nch, text); } int irc_cmd_notice (irc_session_t * session, const char * nch, const char * text) { if ( !nch || !text ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } return irc_send_raw (session, "NOTICE %s :%s", nch, text); } void irc_target_get_nick (const char * target, char *nick, size_t size) { char *p = strstr (target, "!"); unsigned int len; if ( p ) len = p - target; else len = strlen (target); if ( len > size-1 ) len = size - 1; memcpy (nick, target, len); nick[len] = '\0'; } void irc_target_get_host (const char * target, char *host, size_t size) { unsigned int len; const char *p = strstr (target, "!"); if ( !p ) p = target; len = strlen (p); if ( len > size-1 ) len = size - 1; memcpy (host, p, len); host[len] = '\0'; } int irc_cmd_ctcp_request (irc_session_t * session, const char * nick, const char * reply) { if ( !nick || !reply ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } return irc_send_raw (session, "PRIVMSG %s :\x01%s\x01", nick, reply); } int irc_cmd_ctcp_reply (irc_session_t * session, const char * nick, const char * reply) { if ( !nick || !reply ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } return irc_send_raw (session, "NOTICE %s :\x01%s\x01", nick, reply); } void irc_get_version (unsigned int * high, unsigned int * low) { *high = LIBIRC_VERSION_HIGH; *low = LIBIRC_VERSION_LOW; } void irc_set_ctx (irc_session_t * session, void * ctx) { session->ctx = ctx; } void * irc_get_ctx (irc_session_t * session) { return session->ctx; } void irc_set_ctcp_version (irc_session_t * session, const char * version) { if ( session->ctcp_version ) free(session->ctcp_version); session->ctcp_version = strdup(version); } void irc_disconnect (irc_session_t * session) { if ( session->sock >= 0 ) socket_close (&session->sock); session->sock = -1; session->state = LIBIRC_STATE_INIT; } int irc_cmd_me (irc_session_t * session, const char * nch, const char * text) { if ( !nch || !text ) { session->lasterror = LIBIRC_ERR_STATE; return 1; } return irc_send_raw (session, "PRIVMSG %s :\x01" "ACTION %s\x01", nch, text); } void irc_option_set (irc_session_t * session, unsigned int option) { session->options |= option; } void irc_option_reset (irc_session_t * session, unsigned int option) { session->options &= ~option; } int irc_cmd_channel_mode (irc_session_t * session, const char * channel, const char * mode) { if ( !channel ) { session->lasterror = LIBIRC_ERR_INVAL; return 1; } if ( mode ) return irc_send_raw (session, "MODE %s %s", channel, mode); else return irc_send_raw (session, "MODE %s", channel); } int irc_cmd_user_mode (irc_session_t * session, const char * mode) { if ( mode ) return irc_send_raw (session, "MODE %s %s", session->nick, mode); else return irc_send_raw (session, "MODE %s", session->nick); } int irc_cmd_nick (irc_session_t * session, const char * newnick) { if ( !newnick ) { session->lasterror = LIBIRC_ERR_INVAL; return 1; } return irc_send_raw (session, "NICK %s", newnick); } int irc_cmd_whois (irc_session_t * session, const char * nick) { if ( !nick ) { session->lasterror = LIBIRC_ERR_INVAL; return 1; } return irc_send_raw (session, "WHOIS %s %s", nick, nick); } libircclient-1.10/src/PaxHeaders.23204/dcc.h0000644000000000000000000000012411705477072015331 xustar0027 mtime=1326874170.800417 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/dcc.h0000644000175000001440000000304211705477072015610 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #ifndef INCLUDE_IRC_DCC_H #define INCLUDE_IRC_DCC_H /* * This structure keeps the state of a single DCC connection. */ struct irc_dcc_session_s { irc_dcc_session_t * next; irc_dcc_t id; void * ctx; socket_t sock; /*!< DCC socket */ int dccmode; /*!< Boolean value to differ chat vs send requests. Changes the cb behavior - when it is chat, data is sent by lines with stripped CRLFs. In file mode, the data is sent as-is */ int state; time_t timeout; FILE * dccsend_file_fp; unsigned int received_file_size; unsigned int file_confirm_offset; struct sockaddr_in remote_addr; char incoming_buf[LIBIRC_DCC_BUFFER_SIZE]; unsigned int incoming_offset; char outgoing_buf[LIBIRC_DCC_BUFFER_SIZE]; unsigned int outgoing_offset; port_mutex_t mutex_outbuf; irc_dcc_callback_t cb; }; #endif /* INCLUDE_IRC_DCC_H */ libircclient-1.10/src/PaxHeaders.23204/portable.c0000644000000000000000000000012412712252212016365 xustar0027 mtime=1462326410.688766 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/src/portable.c0000644000175000001440000000644112712252212016652 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ #if !defined (_WIN32) #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined (ENABLE_THREADS) #include typedef pthread_mutex_t port_mutex_t; #if !defined (PTHREAD_MUTEX_RECURSIVE) && defined (PTHREAD_MUTEX_RECURSIVE_NP) #define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP #endif #endif #else #include #include #include #include #include #include #include #include #include #if defined (ENABLE_THREADS) typedef CRITICAL_SECTION port_mutex_t; #endif #define inline #define snprintf _snprintf #define vsnprintf _vsnprintf #define strncasecmp _strnicmp #endif #if defined (ENABLE_SSL) #include #include #include #endif #if defined (ENABLE_THREADS) static inline int libirc_mutex_init (port_mutex_t * mutex) { #if defined (_WIN32) InitializeCriticalSection (mutex); return 0; #elif defined (PTHREAD_MUTEX_RECURSIVE) pthread_mutexattr_t attr; return (pthread_mutexattr_init (&attr) || pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE) || pthread_mutex_init (mutex, &attr)); #else /* !defined (PTHREAD_MUTEX_RECURSIVE) */ return pthread_mutex_init (mutex, 0); #endif /* defined (_WIN32) */ } static inline void libirc_mutex_destroy (port_mutex_t * mutex) { #if defined (_WIN32) DeleteCriticalSection (mutex); #else pthread_mutex_destroy (mutex); #endif } static inline void libirc_mutex_lock (port_mutex_t * mutex) { #if defined (_WIN32) EnterCriticalSection (mutex); #else pthread_mutex_lock (mutex); #endif } static inline void libirc_mutex_unlock (port_mutex_t * mutex) { #if defined (_WIN32) LeaveCriticalSection (mutex); #else pthread_mutex_unlock (mutex); #endif } #else typedef void * port_mutex_t; static inline int libirc_mutex_init (port_mutex_t * mutex) { return 0; } static inline void libirc_mutex_destroy (port_mutex_t * mutex) {} static inline void libirc_mutex_lock (port_mutex_t * mutex) {} static inline void libirc_mutex_unlock (port_mutex_t * mutex) {} #endif /* * Stub for WIN32 dll to initialize winsock API */ #if defined (WIN32_DLL) BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) { switch(fdwReason) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls (hinstDll); break; case DLL_PROCESS_DETACH: break; } return TRUE; } #endif libircclient-1.10/PaxHeaders.23204/include0000644000000000000000000000013213340661224015174 xustar0030 mtime=1535337108.222355054 30 atime=1535337108.218355143 30 ctime=1535337108.222355054 libircclient-1.10/include/0000755000175000001440000000000013340661224015532 5ustar00timusers00000000000000libircclient-1.10/include/PaxHeaders.23204/libirc_rfcnumeric.h0000644000000000000000000000012411707104775021114 xustar0027 mtime=1327270397.687192 27 atime=1535337108.222355 30 ctime=1535337108.222355054 libircclient-1.10/include/libirc_rfcnumeric.h0000644000175000001440000010063111707104775021375 0ustar00timusers00000000000000/* * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This library 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 Lesser General Public * License for more details. */ /*! * \file libirc_rfcnumeric.h * \author Georgy Yunaev * \version 1.0 * \date 09.2004 * \brief This file defines RFC numeric reply codes, which should be used in * ::event_numeric callback. Every code also has a comment regarding its * arguments. */ #ifndef INCLUDE_IRC_RFCNUMERIC_H #define INCLUDE_IRC_RFCNUMERIC_H /*! \brief 001 Welcome to the Internet Relay Network \!\\@\ * * The server sends replies 001 to 004 to a user upon successful registration. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_WELCOME 001 /*! \brief 002 Your host is \, running version \ * * The server sends replies 001 to 004 to a user upon successful registration. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_YOURHOST 002 /*! \brief 003 This server was created \ * * The server sends replies 001 to 004 to a user upon successful registration. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_CREATED 003 /*! \brief 004 \ \ \ \ * * The server sends replies 001 to 004 to a user upon successful registration. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_MYINFO 004 /*! \brief 005 Try server \, port \ * * Sent by the server to a user to suggest an alternative server. This is often used when the connection is refused because the server is already full. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_BOUNCE 005 /*! \brief 302 :*1\ *( * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_USERHOST 302 /*! \brief 303 :*1\ *( * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ISON 303 /*! \brief 301 \ :\ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_AWAY 301 /*! \brief 305 :You are no longer marked as being away * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_UNAWAY 305 /*! \brief 306 :You have been marked as being away * * These replies are used with the AWAY command (if allowed). RPL_AWAY is sent to any client sending a PRIVMSG to a client which is away. RPL_AWAY is only sent by the server to which the client is connected. Replies RPL_UNAWAY and RPL_NOWAWAY are sent when the client removes and sets an AWAY message. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_NOWAWAY 306 /*! \brief 311 \ \ \ * :\ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_WHOISUSER 311 /*! \brief 312 \ \ :\ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_WHOISSERVER 312 /*! \brief 313 \ :is an IRC operator * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_WHOISOPERATOR 313 /*! \brief 317 \ \ :seconds idle * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_WHOISIDLE 317 /*! \brief 318 \ :End of WHOIS list * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFWHOIS 318 /*! \brief 319 " :*( ( "\@" / "+" ) \ " " )" * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_WHOISCHANNELS 319 /*! \brief 314 \ \ \ * :\ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_WHOWASUSER 314 /*! \brief 369 \ :End of WHOWAS * * When replying to a WHOWAS message, a server MUST use the replies RPL_WHOWASUSER, RPL_WHOISSERVER or ERR_WASNOSUCHNICK for each nickname in the presented list. At the end of all reply batches, there MUST be RPL_ENDOFWHOWAS (even if there was only one reply and it was an error). * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFWHOWAS 369 /*! \brief 322 \ \<# visible\> :\ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_LIST 322 /*! \brief 323 :End of LIST * * Replies RPL_LIST, RPL_LISTEND mark the actual replies with data and end of the server's response to a LIST command. If there are no channels available to return, only the end reply MUST be sent. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_LISTEND 323 /*! \brief 325 \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_UNIQOPIS 325 /*! \brief 324 \ \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_CHANNELMODEIS 324 /*! \brief 331 \ :No topic is set * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_NOTOPIC 331 /*! \brief 332 \ :\ * * When sending a TOPIC message to determine the channel topic, one of two replies is sent. If the topic is set, RPL_TOPIC is sent back else RPL_NOTOPIC. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TOPIC 332 /*! \brief 341 \ \ * * Returned by the server to indicate that the attempted INVITE message was successful and is being passed onto the end client. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_INVITING 341 /*! \brief 342 \ :Summoning user to IRC * * Returned by a server answering a SUMMON message to indicate that it is summoning that user. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_SUMMONING 342 /*! \brief 346 \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_INVITELIST 346 /*! \brief 347 \ :End of channel invite list * * When listing the 'invitations masks' for a given channel, a server is required to send the list back using the RPL_INVITELIST and RPL_ENDOFINVITELIST messages. A separate RPL_INVITELIST is sent for each active mask. After the masks have been listed (or if none present) a RPL_ENDOFINVITELIST MUST be sent. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFINVITELIST 347 /*! \brief 348 \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_EXCEPTLIST 348 /*! \brief 349 \ :End of channel exception list * * When listing the 'exception masks' for a given channel, a server is required to send the list back using the RPL_EXCEPTLIST and RPL_ENDOFEXCEPTLIST messages. A separate RPL_EXCEPTLIST is sent for each active mask. After the masks have been listed (or if none present) a RPL_ENDOFEXCEPTLIST MUST be sent. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFEXCEPTLIST 349 /*! \brief 351 \.\ \ :\ * * Reply by the server showing its version details. The \ is the version of the software being used (including any patchlevel revisions) and the \ is used to indicate if the server is running in "debug mode". The "comments" field may contain any comments about the version or further version details. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_VERSION 351 /*! \brief 352 \ \ \ \ \ ( "H * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_WHOREPLY 352 /*! \brief 315 \ :End of WHO list * * The RPL_WHOREPLY and RPL_ENDOFWHO pair are used to answer a WHO message. The RPL_WHOREPLY is only sent if there is an appropriate match to the WHO query. If there is a list of parameters supplied with a WHO message, a RPL_ENDOFWHO MUST be sent after processing each list item with \ being the item. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFWHO 315 /*! \brief 353 ( "= * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_NAMREPLY 353 /*! \brief 366 \ :End of NAMES list * * To reply to a NAMES message, a reply pair consisting of RPL_NAMREPLY and RPL_ENDOFNAMES is sent by the server back to the client. If there is no channel found as in the query, then only RPL_ENDOFNAMES is returned. The exception to this is when a NAMES message is sent with no parameters and all visible channels and contents are sent back in a series of RPL_NAMEREPLY messages with a RPL_ENDOFNAMES to mark the end. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFNAMES 366 /*! \brief 364 \ \ :\ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_LINKS 364 /*! \brief 365 \ :End of LINKS list * * In replying to the LINKS message, a server MUST send replies back using the RPL_LINKS numeric and mark the end of the list using an RPL_ENDOFLINKS reply. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFLINKS 365 /*! \brief 367 \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_BANLIST 367 /*! \brief 368 \ :End of channel ban list * * When listing the active 'bans' for a given channel, a server is required to send the list back using the RPL_BANLIST and RPL_ENDOFBANLIST messages. A separate RPL_BANLIST is sent for each active banmask. After the banmasks have been listed (or if none present) a RPL_ENDOFBANLIST MUST be sent. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFBANLIST 368 /*! \brief 371 :\ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_INFO 371 /*! \brief 374 :End of INFO list * * A server responding to an INFO message is required to send all its 'info' in a series of RPL_INFO messages with a RPL_ENDOFINFO reply to indicate the end of the replies. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFINFO 374 /*! \brief 375 :- \ Message of the day - * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_MOTDSTART 375 /*! \brief 372 :- \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_MOTD 372 /*! \brief 376 :End of MOTD command * * When responding to the MOTD message and the MOTD file is found, the file is displayed line by line, with each line no longer than 80 characters, using RPL_MOTD format replies. These MUST be surrounded by a RPL_MOTDSTART (before the RPL_MOTDs) and an RPL_ENDOFMOTD (after). * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFMOTD 376 /*! \brief 381 :You are now an IRC operator * * RPL_YOUREOPER is sent back to a client which has just successfully issued an OPER message and gained operator status. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_YOUREOPER 381 /*! \brief 382 \ :Rehashing * * If the REHASH option is used and an operator sends a REHASH message, an RPL_REHASHING is sent back to the operator. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_REHASHING 382 /*! \brief 383 You are service \ * * Sent by the server to a service upon successful registration. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_YOURESERVICE 383 /*! \brief 391 \ :\ * * When replying to the TIME message, a server MUST send the reply using the RPL_TIME format above. The string showing the time need only contain the correct day and time there. There is no further requirement for the time string. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TIME 391 /*! \brief 392 :UserID Terminal Host * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_USERSSTART 392 /*! \brief 393 :\ \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_USERS 393 /*! \brief 394 :End of users * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_ENDOFUSERS 394 /*! \brief 395 :Nobody logged in * * If the USERS message is handled by a server, the replies RPL_USERSTART, RPL_USERS, RPL_ENDOFUSERS and RPL_NOUSERS are used. RPL_USERSSTART MUST be sent first, following by either a sequence of RPL_USERS or a single RPL_NOUSER. Following this is RPL_ENDOFUSERS. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_NOUSERS 395 /*! \brief 200 Link \ \ \ V\ \ \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACELINK 200 /*! \brief 201 Try. \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACECONNECTING 201 /*! \brief 202 H.S. \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACEHANDSHAKE 202 /*! \brief 203 ???? \ [\] * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACEUNKNOWN 203 /*! \brief 204 Oper \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACEOPERATOR 204 /*! \brief 205 User \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACEUSER 205 /*! \brief 206 Serv \ \S \C \ \\@\ V\ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACESERVER 206 /*! \brief 207 Service \ \ \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACESERVICE 207 /*! \brief 208 \ 0 \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACENEWTYPE 208 /*! \brief 209 Class \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACECLASS 209 /*! \brief 261 File \ \ * * No description available in RFC * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACELOG 261 /*! \brief 262 \ \ :End of TRACE * * The RPL_TRACE* are all returned by the server in response to the TRACE message. How many are returned is dependent on the TRACE message and whether it was sent by an operator or not. There is no predefined order for which occurs first. Replies RPL_TRACEUNKNOWN, RPL_TRACECONNECTING and RPL_TRACEHANDSHAKE are all used for connections which have not been fully established and are either unknown, still attempting to connect or in the process of completing the 'server handshake'. RPL_TRACELINK is sent by any server which handles a TRACE message and has to pass it on to another server. The list of RPL_TRACELINKs sent in response to a TRACE command traversing the IRC network should reflect the actual connectivity of the servers themselves along that path. RPL_TRACENEWTYPE is to be used for any connection which does not fit in the other categories but is being displayed anyway. RPL_TRACEEND is sent to indicate the end of the list. * * \ingroup rfcnumbers */ #define LIBIRC_RFC_RPL_TRACEEND 262 /*! \brief 211 \ \ \ \ \ \ \