inital import of libircclient v1.10

This commit is contained in:
Green Sky 2023-11-22 22:58:01 +01:00
commit a72a4d97b3
No known key found for this signature in database
100 changed files with 32336 additions and 0 deletions

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
.vs/
*.o
*.swp
~*
*~
.idea/
cmake-build-debug/
cmake-build-debugandtest/
cmake-build-release/
*.stackdump
*.coredump
compile_commands.json
/build*
.clangd
.cache
.DS_Store
.AppleDouble
.LSOverride
CMakeLists.txt.user*
CMakeCache.txt

28
CMakeLists.txt Normal file
View File

@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
# cmake setup begin
project(libircclient)
add_library(libircclient
./libircclient/include/libircclient.h
./libircclient/include/libirc_rfcnumeric.h
./libircclient/include/libirc_errors.h
./libircclient/include/libirc_events.h
./libircclient/include/libirc_options.h
./libircclient/src/colors.c
./libircclient/src/dcc.h
./libircclient/src/dcc.c
./libircclient/src/errors.c
./libircclient/src/libircclient.c
./libircclient/src/params.h
./libircclient/src/portable.c
./libircclient/src/session.h
./libircclient/src/sockets.c
./libircclient/src/ssl.c
./libircclient/src/utils.c
)
target_include_directories(libircclient PUBLIC ./libircclient/include)

129
libircclient/Changelog Normal file
View File

@ -0,0 +1,129 @@
2018-08-26 George Yunaev
* libircclient 1.10 released.
* Fixed compatibility with OpenSSL 1.1.x (thanks Antoine Amarilli)
2016-05-03 George Yunaev
* libircclient 1.9 released.
* Fixed a few minor Win32 compatibility bugs.
* Fixed an error if the TCP connection to the IRC server couldn't be established under 250ms.
* Fixed a potential deadlock caused by WSAStartup() being called in DllMain()
2014-05-10 George Yunaev
* libircclient 1.8 released.
* A few minor bugfixes and minor feature enchancements.
2013-06-23 George Yunaev
* libircclient 1.7 released.
* Documentation rewritten using RST, and is now much better.
* Fixed a race condition when multiple threads attempt to call irc_connect while using SSL.
* Merged a fix for the IRC servers which (incorrectly) terminate lines with CR instead of CRLF as required by RFC.
* Several small bugfixes.
2012-01-22 George Yunaev
* libircclient 1.6 released.
* Fixed PRIVMSG events incorrectly reported as CHANNEL (thx Dennis Bretjes)
* Added -fpic option for the shared library; fixed make install
* WIN32 macro replaced by _WIN32 (Lothar May)
* Fixed IPv6 and IPv4 connections being used simultaneously (Lothar May)
* Fixed DCC file transfer with IPv6 build (Lothar May)
2012-01-18 George Yunaev
* libircclient 1.5 released.
* Added SSL support
* Fixed some compilation warnings
2009-01-03 George Yunaev
* libircclient 1.3 released.
* Added IPv6 support (thanks Lothar May)
* Now provides more information about ACTION (thx chromerium)
* Updated contact info and copyrights.
* Removed ircmud sample as it never worked anyway.
2006-08-29 George Yunaev
* libircclient 1.2 released.
* Windows: added missed expored functions from .def file.
2005-03-10 George Yunaev
* libircclient 1.1 released.
* Fixed DCC buffer size which resulted extra callback on DCC tranfers
(thanks flohimself).
2004-11-12 George Yunaev
* libircclient 1.0 released.
* Fixed compilation on FreeBSD.
2004-10-31 George Yunaev
* When more than one DCC chat sessions were active, only the latest
generated callbacks.
* libircclient 0.8 released.
2004-10-17 George Yunaev
* libircclient 0.7 released.
* Fixed DCC chat lockup in multithread programs (thanks olifozzy).
2004-10-15 George Yunaev
* Win32 static library does not have dllmain anymore (thanks olifozzy).
* DCC chat crashed if there were several DCC session, and one of them was
closed (thanks olifozzy).
* DCC chat speed increased when several messages are stored in buffer.
2004-10-10 George Yunaev
* libircclient 0.6 released.
* Added color support.
2004-10-07 George Yunaev
* CTCP TIME reply was malformed on some platforms with buggy locales.
* Socket stuff rewritten to be signal-safe and more portable.
* Data and commands are now sent faster to IRC server.
* event_umode now works.
2004-10-06 George Yunaev
* CHANGED BEHAVIOR: the built-in CTCP handler is used if not set.
Therefore, irc_event_ctcp_internal() is not public anymore.
* Added a small (as yet) FAQ.
* Add extra numeric codes from RFC2812.
2004-10-03 George Yunaev
* Libircclient error codes are now well-documented.
* Modules documentation is extended.
* Added new methods: 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.
* Added the improved error handling for NULL pointers to all the irc_cmd*
methods.
* Fixed the nickname tracking bug (after the nickname changing, all
privmsgs were treaten as channel messages).
* All the numeric reply codes from RFC1459 are now documented.
* Numeric reply codes for every command are now described.
2004-09-30 George Yunaev
* libircclient 0.4 released
* exported an irc_is_connected method.
* fixed error output in examples.
* fixed several errors in Win32 build (there were no multithread support)
* add a Win32 dsp/dsw to build the library from VC6/7
* add a .dsp for an example.
2004-09-14 George Yunaev
* libircclient 0.3 released
* Fix CTCP time bug.
* Added working Win32 Visual Studio build, and libs.
* Added ircmud example, which allows people to play MUD through IRC client.
* Some stuff rewritten in more portable way.
2004-09-13 George Yunaev
* Fix solaris x86/sparc compilation.
2004-09-12 George Yunaev
* libircclient 0.2 released
* select() timeout decreased to 0.25sec (was 1 sec). The reason: when
the output buffer is empty, and server doesn't send anything, but a
command was asynchronously added, it will be processed only after
select() timeout.
* Fixed bug in DCC sessions - all DCC sessions requested by bots were
terminated in 60 secs with TIMEOUT error.
* Add DCC error description in irctest example.
2004-09-08 George Yunaev
* libircclient 0.1 released

1153
libircclient/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

482
libircclient/LICENSE Normal file
View File

@ -0,0 +1,482 @@
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.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

26
libircclient/Makefile Normal file
View File

@ -0,0 +1,26 @@
# $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

14
libircclient/README Normal file
View File

@ -0,0 +1,14 @@
Building 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/

4
libircclient/THANKS Normal file
View File

@ -0,0 +1,4 @@
I'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.

73
libircclient/build-release.sh Executable file
View File

@ -0,0 +1,73 @@
#!/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!"

View File

@ -0,0 +1,114 @@
/*
* 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 <Foundation/Foundation.h>
/*
* @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

View File

@ -0,0 +1,171 @@
/*
* 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

View File

@ -0,0 +1,153 @@
/*
* 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 <Cocoa/Cocoa.h>
#import <IRCClient/IRCClientChannelDelegate.h>
/** \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

View File

@ -0,0 +1,157 @@
/*
* 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

View File

@ -0,0 +1,116 @@
/*
* 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 <Cocoa/Cocoa.h>
/** @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

View File

@ -0,0 +1,264 @@
/*! \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
*
* <PRE>
* 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.
* </PRE>
*/
/**
* @file IRCClientSession.h
* @author Nathan Ollerenshaw
* @version 1.0
* @date 01.2009
* @brief Represents a connected IRC Session.
*/
#import <Cocoa/Cocoa.h>
#import <IRCClient/IRCClientSessionDelegate.h>
#include <IRCClient/libircclient.h>
/** @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

View File

@ -0,0 +1,744 @@
/*
* 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];
}

View File

@ -0,0 +1,152 @@
/*
* 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 <Cocoa/Cocoa.h>
#include <IRCClient/libircclient.h>
/**
* @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

View File

@ -0,0 +1,35 @@
/*
* 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 <Foundation/Foundation.h>
@interface NSObject (DDExtensions)
- (id)dd_invokeOnMainThread;
- (id)dd_invokeOnMainThreadAndWaitUntilDone:(BOOL)waitUntilDone;
@end
#define ddsynthesize(_X_) @synthesize _X_ = _##_X_

View File

@ -0,0 +1,43 @@
/*
* 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

293
libircclient/cocoa/Doxyfile Normal file
View File

@ -0,0 +1,293 @@
# 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

Binary file not shown.

View File

@ -0,0 +1,408 @@
// !$*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 = "<absolute>"; };
0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
32DBCF5E0370ADEE00C91783 /* IRCClient_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClient_Prefix.pch; sourceTree = "<group>"; };
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 = "<group>"; };
694762CC0F10AAAE002C0318 /* DDInvocationGrabber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDInvocationGrabber.m; sourceTree = "<group>"; };
694762CD0F10AAAE002C0318 /* NSObject+DDExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+DDExtensions.h"; sourceTree = "<group>"; };
694762CE0F10AAAE002C0318 /* NSObject+DDExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+DDExtensions.m"; sourceTree = "<group>"; };
694762CF0F10AAAE002C0318 /* IRCClientChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClientChannel.h; sourceTree = "<group>"; };
694762D00F10AAAE002C0318 /* IRCClientChannel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IRCClientChannel.m; sourceTree = "<group>"; };
694762D10F10AAAE002C0318 /* IRCClientSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClientSession.h; sourceTree = "<group>"; };
694762D20F10AAAE002C0318 /* IRCClientSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IRCClientSession.m; sourceTree = "<group>"; };
6947631D0F10AE32002C0318 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; };
6947631F0F10AE46002C0318 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
6989EABA0F1861FB0083030A /* IRCClientChannelDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClientChannelDelegate.h; sourceTree = "<group>"; };
6989EABE0F1862090083030A /* IRCClientSessionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRCClientSessionDelegate.h; sourceTree = "<group>"; };
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 = "<group>"; };
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 = "<absolute>"; };
/* 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 = "<group>";
};
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 = "<group>";
};
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
};
089C1665FE841158C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
8DC2EF5A0486A6940098B216 /* Info.plist */,
089C1666FE841158C02AAC07 /* InfoPlist.strings */,
);
name = Resources;
sourceTree = "<group>";
};
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 = "<group>";
};
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
0867D6A5FE840307C02AAC07 /* AppKit.framework */,
D2F7E79907B2D74100F64583 /* CoreData.framework */,
0867D69BFE84028FC02AAC07 /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
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 = "<group>";
};
6947632B0F10AFD3002C0318 /* doc */ = {
isa = PBXGroup;
children = (
);
path = doc;
sourceTree = "<group>";
};
/* 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 = "<group>";
};
/* 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 */;
}

View File

@ -0,0 +1,7 @@
//
// Prefix header for all source files of the 'IRCClient' target in the 'IRCClient' project.
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>net.stupendous.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

482
libircclient/cocoa/LICENSE Normal file
View File

@ -0,0 +1,482 @@
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.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

21
libircclient/cocoa/README Normal file
View File

@ -0,0 +1,21 @@
IRCClient.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'.

View File

@ -0,0 +1,140 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: DDInvocationGrabber.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>DDInvocationGrabber.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 2007-2008 Dave Dribin</span>
<a name="l00003"></a>00003 <span class="comment"> * </span>
<a name="l00004"></a>00004 <span class="comment"> * Permission is hereby granted, free of charge, to any person</span>
<a name="l00005"></a>00005 <span class="comment"> * obtaining a copy of this software and associated documentation</span>
<a name="l00006"></a>00006 <span class="comment"> * files (the "Software"), to deal in the Software without</span>
<a name="l00007"></a>00007 <span class="comment"> * restriction, including without limitation the rights to use, copy,</span>
<a name="l00008"></a>00008 <span class="comment"> * modify, merge, publish, distribute, sublicense, and/or sell copies</span>
<a name="l00009"></a>00009 <span class="comment"> * of the Software, and to permit persons to whom the Software is</span>
<a name="l00010"></a>00010 <span class="comment"> * furnished to do so, subject to the following conditions:</span>
<a name="l00011"></a>00011 <span class="comment"> * </span>
<a name="l00012"></a>00012 <span class="comment"> * The above copyright notice and this permission notice shall be</span>
<a name="l00013"></a>00013 <span class="comment"> * included in all copies or substantial portions of the Software.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span>
<a name="l00016"></a>00016 <span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span>
<a name="l00017"></a>00017 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span>
<a name="l00018"></a>00018 <span class="comment"> * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS</span>
<a name="l00019"></a>00019 <span class="comment"> * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN</span>
<a name="l00020"></a>00020 <span class="comment"> * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN</span>
<a name="l00021"></a>00021 <span class="comment"> * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<a name="l00022"></a>00022 <span class="comment"> * SOFTWARE.</span>
<a name="l00023"></a>00023 <span class="comment"> */</span>
<a name="l00024"></a>00024
<a name="l00025"></a>00025
<a name="l00026"></a>00026 <span class="comment">/*</span>
<a name="l00027"></a>00027 <span class="comment"> * This class is based on CInvocationGrabber:</span>
<a name="l00028"></a>00028 <span class="comment"> *</span>
<a name="l00029"></a>00029 <span class="comment"> * Copyright (c) 2007, Toxic Software</span>
<a name="l00030"></a>00030 <span class="comment"> * All rights reserved.</span>
<a name="l00031"></a>00031 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00032"></a>00032 <span class="comment"> * modification, are permitted provided that the following conditions are</span>
<a name="l00033"></a>00033 <span class="comment"> * met:</span>
<a name="l00034"></a>00034 <span class="comment"> * </span>
<a name="l00035"></a>00035 <span class="comment"> * * Redistributions of source code must retain the above copyright notice,</span>
<a name="l00036"></a>00036 <span class="comment"> * this list of conditions and the following disclaimer.</span>
<a name="l00037"></a>00037 <span class="comment"> * </span>
<a name="l00038"></a>00038 <span class="comment"> * * Redistributions in binary form must reproduce the above copyright</span>
<a name="l00039"></a>00039 <span class="comment"> * notice, this list of conditions and the following disclaimer in the</span>
<a name="l00040"></a>00040 <span class="comment"> * documentation and/or other materials provided with the distribution.</span>
<a name="l00041"></a>00041 <span class="comment"> * </span>
<a name="l00042"></a>00042 <span class="comment"> * * Neither the name of the Toxic Software nor the names of its</span>
<a name="l00043"></a>00043 <span class="comment"> * contributors may be used to endorse or promote products derived from</span>
<a name="l00044"></a>00044 <span class="comment"> * this software without specific prior written permission.</span>
<a name="l00045"></a>00045 <span class="comment"> * </span>
<a name="l00046"></a>00046 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND</span>
<a name="l00047"></a>00047 <span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
<a name="l00048"></a>00048 <span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR</span>
<a name="l00049"></a>00049 <span class="comment"> * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE</span>
<a name="l00050"></a>00050 <span class="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span>
<a name="l00051"></a>00051 <span class="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span>
<a name="l00052"></a>00052 <span class="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span>
<a name="l00053"></a>00053 <span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span>
<a name="l00054"></a>00054 <span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span>
<a name="l00055"></a>00055 <span class="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF</span>
<a name="l00056"></a>00056 <span class="comment"> * THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00057"></a>00057 <span class="comment"> *</span>
<a name="l00058"></a>00058 <span class="comment"> */</span>
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="preprocessor">#import &lt;Foundation/Foundation.h&gt;</span>
<a name="l00061"></a>00061
<a name="l00062"></a>00062 <span class="comment">/*</span>
<a name="l00063"></a>00063 <span class="comment"> * @class DDInvocationGrabber</span>
<a name="l00064"></a>00064 <span class="comment"> * @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.</span>
<a name="l00065"></a>00065 <span class="comment"> </span>
<a name="l00066"></a>00066 <span class="comment"> DDInvocationGrabber *theGrabber = [DDInvocationGrabber invocationGrabber];</span>
<a name="l00067"></a>00067 <span class="comment"> [theGrabber setTarget:someObject]</span>
<a name="l00068"></a>00068 <span class="comment"> [theGrabber doSomethingWithParameter:someParameter]; // Send messages to 'theGrabber' as if it were 'someObject'</span>
<a name="l00069"></a>00069 <span class="comment"> NSInvocation *theInvocation = [theGrabber invocation];</span>
<a name="l00070"></a>00070 <span class="comment"> </span>
<a name="l00071"></a>00071 <span class="comment"> A slightly more concise version (using the covenience category) follows:</span>
<a name="l00072"></a>00072 <span class="comment"> </span>
<a name="l00073"></a>00073 <span class="comment"> DDInvocationGrabber *theGrabber = [DDInvocationGrabber invocationGrabber];</span>
<a name="l00074"></a>00074 <span class="comment"> [[theGrabber prepareWithInvocationTarget:someObject] doSomethingWithParameter:someParameter];</span>
<a name="l00075"></a>00075 <span class="comment"> NSInvocation *theInvocation = [theGrabber invocation];</span>
<a name="l00076"></a>00076 <span class="comment"> </span>
<a name="l00077"></a>00077 <span class="comment"> */</span>
<a name="l00078"></a>00078 <span class="keyword">@interface </span>DDInvocationGrabber : NSProxy
<a name="l00079"></a>00079 {
<a name="l00080"></a>00080 <span class="keywordtype">id</span> _target;
<a name="l00081"></a>00081 NSInvocation * _invocation;
<a name="l00082"></a>00082 BOOL _forwardInvokesOnMainThread;
<a name="l00083"></a>00083 BOOL _waitUntilDone;
<a name="l00084"></a>00084 }
<a name="l00085"></a>00085
<a name="l00086"></a>00086 <span class="comment">/*</span>
<a name="l00087"></a>00087 <span class="comment"> * @method invocationGrabber</span>
<a name="l00088"></a>00088 <span class="comment"> * @abstract Returns a newly allocated, inited, autoreleased DDInvocationGrabber object.</span>
<a name="l00089"></a>00089 <span class="comment"> */</span>
<a name="l00090"></a>00090 + (id)invocationGrabber;
<a name="l00091"></a>00091
<a name="l00092"></a>00092 - (id)target;
<a name="l00093"></a>00093 - (void)setTarget:(<span class="keywordtype">id</span>)inTarget;
<a name="l00094"></a>00094
<a name="l00095"></a>00095 - (NSInvocation *)invocation;
<a name="l00096"></a>00096 - (void)setInvocation:(NSInvocation *)inInvocation;
<a name="l00097"></a>00097
<a name="l00098"></a>00098 - (BOOL)forwardInvokesOnMainThread;
<a name="l00099"></a>00099 - (void)setForwardInvokesOnMainThread:(BOOL)forwardInvokesOnMainThread;
<a name="l00100"></a>00100
<a name="l00101"></a>00101 - (BOOL)waitUntilDone;
<a name="l00102"></a>00102 - (void)setWaitUntilDone:(BOOL)waitUntilDone;
<a name="l00103"></a>00103
<a name="l00104"></a>00104 <span class="keyword">@end</span>
<a name="l00105"></a>00105
<a name="l00106"></a>00106 <span class="keyword">@interface </span>DDInvocationGrabber (DDInvocationGrabber_Conveniences)
<a name="l00107"></a>00107
<a name="l00108"></a>00108 <span class="comment">/*</span>
<a name="l00109"></a>00109 <span class="comment"> * @method prepareWithInvocationTarget:</span>
<a name="l00110"></a>00110 <span class="comment"> * @abstract Sets the target object of the receiver and returns itself. The sender can then send a message to the </span>
<a name="l00111"></a>00111 <span class="comment"> */</span>
<a name="l00112"></a>00112 - (id)prepareWithInvocationTarget:(<span class="keywordtype">id</span>)inTarget;
<a name="l00113"></a>00113
<a name="l00114"></a>00114 <span class="keyword">@end</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,89 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClientChannel.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>IRCClientChannel.h</h1><a href="_i_r_c_client_channel_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* </span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * This library is free software; you can redistribute it and/or modify it </span>
<a name="l00005"></a>00005 <span class="comment"> * under the terms of the GNU Lesser General Public License as published by </span>
<a name="l00006"></a>00006 <span class="comment"> * the Free Software Foundation; either version 2 of the License, or (at your </span>
<a name="l00007"></a>00007 <span class="comment"> * option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * This library is distributed in the hope that it will be useful, but WITHOUT </span>
<a name="l00010"></a>00010 <span class="comment"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or </span>
<a name="l00011"></a>00011 <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public </span>
<a name="l00012"></a>00012 <span class="comment"> * License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"> */</span>
<a name="l00014"></a>00014
<a name="l00023"></a>00023 <span class="preprocessor">#import &lt;Cocoa/Cocoa.h&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#import "<a class="code" href="_i_r_c_client_channel_delegate_8h.html" title="Receives delegate messages from an IRCClientChannel.">IRCClientChannelDelegate.h</a>"</span>
<a name="l00025"></a>00025
<a name="l00035"></a>00035 <span class="keyword">@class</span> <a class="code" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a>;
<a name="l00036"></a><a class="code" href="interface_i_r_c_client_channel.html">00036</a> <span class="keyword">@interface </span><a class="code" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> : NSObject {
<a name="l00037"></a><a class="code" href="interface_i_r_c_client_channel.html#a24a320a08bb515f3ef5862d7bb1e6b2">00037</a> <span class="keywordtype">id</span> <a class="code" href="interface_i_r_c_client_channel.html#a24a320a08bb515f3ef5862d7bb1e6b2">delegate</a>;
<a name="l00038"></a><a class="code" href="interface_i_r_c_client_channel.html#fe81a99a24e3bc66fc5f05742fb52096">00038</a> NSString *<a class="code" href="interface_i_r_c_client_channel.html#fe81a99a24e3bc66fc5f05742fb52096">name</a>;
<a name="l00039"></a><a class="code" href="interface_i_r_c_client_channel.html#b2c7c8cea97e6f0dfd50f5ac2576a328">00039</a> NSStringEncoding <a class="code" href="interface_i_r_c_client_channel.html#b2c7c8cea97e6f0dfd50f5ac2576a328">encoding</a>;
<a name="l00040"></a><a class="code" href="interface_i_r_c_client_channel.html#1edd5edd8ec30f8763a8ad703e0bf0b1">00040</a> <a class="code" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> *<a class="code" href="interface_i_r_c_client_channel.html#1edd5edd8ec30f8763a8ad703e0bf0b1">session</a>;
<a name="l00041"></a><a class="code" href="interface_i_r_c_client_channel.html#eb5124389861d676b3332cca7c8dc000">00041</a> NSString *<a class="code" href="interface_i_r_c_client_channel.html#eb5124389861d676b3332cca7c8dc000">topic</a>;
<a name="l00042"></a><a class="code" href="interface_i_r_c_client_channel.html#b1d93e3a44e0f306b0bf9034c9d73ba3">00042</a> NSString *<a class="code" href="interface_i_r_c_client_channel.html#b1d93e3a44e0f306b0bf9034c9d73ba3">modes</a>;
<a name="l00043"></a><a class="code" href="interface_i_r_c_client_channel.html#d60403088ddc1434db87825e62c57d5c">00043</a> NSMutableArray *<a class="code" href="interface_i_r_c_client_channel.html#d60403088ddc1434db87825e62c57d5c">names</a>;
<a name="l00044"></a>00044 }
<a name="l00045"></a>00045
<a name="l00047"></a>00047 @property (assign) id delegate;
<a name="l00048"></a>00048
<a name="l00050"></a>00050 @property (copy) NSString *name;
<a name="l00051"></a>00051
<a name="l00053"></a>00053 @property (assign) NSStringEncoding encoding;
<a name="l00054"></a>00054
<a name="l00056"></a>00056 @property (assign) <a class="code" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> *session;
<a name="l00057"></a>00057
<a name="l00059"></a>00059 @property (copy) NSString *topic;
<a name="l00060"></a>00060
<a name="l00062"></a>00062 @property (copy) NSString *modes;
<a name="l00063"></a>00063
<a name="l00066"></a>00066 @property (assign, readonly) NSMutableArray *names;
<a name="l00067"></a>00067
<a name="l00078"></a>00078 - (<span class="keywordtype">id</span>)initWithName:(NSString *)aName;
<a name="l00079"></a>00079
<a name="l00083"></a>00083 - (<span class="keywordtype">int</span>)part;
<a name="l00084"></a>00084
<a name="l00090"></a>00090 - (<span class="keywordtype">int</span>)invite:(NSString *)nick;
<a name="l00091"></a>00091
<a name="l00100"></a>00100 - (<span class="keywordtype">void</span>)setTopic:(NSString *)aTopic;
<a name="l00101"></a>00101
<a name="l00111"></a>00111 - (<span class="keywordtype">int</span>)setMode:(NSString *)mode params:(NSString *)params;
<a name="l00112"></a>00112
<a name="l00119"></a>00119 - (<span class="keywordtype">int</span>)message:(NSString *)message;
<a name="l00120"></a>00120
<a name="l00126"></a>00126 - (<span class="keywordtype">int</span>)action:(NSString *)action;
<a name="l00127"></a>00127
<a name="l00133"></a>00133 - (<span class="keywordtype">int</span>)notice:(NSString *)notice;
<a name="l00134"></a>00134
<a name="l00141"></a>00141 - (<span class="keywordtype">int</span>)kick:(NSString *)nick reason:(NSString *)reason;
<a name="l00142"></a>00142
<a name="l00151"></a>00151 - (<span class="keywordtype">int</span>)ctcpRequest:(NSString *)request;
<a name="l00152"></a>00152
<a name="l00153"></a>00153 @end
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,48 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClientChannel.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>IRCClientChannel.h File Reference</h1>Represents a connected IRC Channel.
<a href="#_details">More...</a>
<p>
<code>#import &lt;Cocoa/Cocoa.h&gt;</code><br>
<code>#import &quot;<a class="el" href="_i_r_c_client_channel_delegate_8h-source.html">IRCClientChannelDelegate.h</a>&quot;</code><br>
<p>
<a href="_i_r_c_client_channel_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents a connected IRC Channel. <a href="interface_i_r_c_client_channel.html#_details">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Represents a connected IRC Channel.
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Nathan Ollerenshaw </dd></dl>
<dl class="version" compact><dt><b>Version:</b></dt><dd>1.0 </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>01.2009 </dd></dl>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,61 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClientChannelDelegate.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>IRCClientChannelDelegate.h</h1><a href="_i_r_c_client_channel_delegate_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* </span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * This library is free software; you can redistribute it and/or modify it </span>
<a name="l00005"></a>00005 <span class="comment"> * under the terms of the GNU Lesser General Public License as published by </span>
<a name="l00006"></a>00006 <span class="comment"> * the Free Software Foundation; either version 2 of the License, or (at your </span>
<a name="l00007"></a>00007 <span class="comment"> * option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * This library is distributed in the hope that it will be useful, but WITHOUT </span>
<a name="l00010"></a>00010 <span class="comment"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or </span>
<a name="l00011"></a>00011 <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public </span>
<a name="l00012"></a>00012 <span class="comment"> * License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"> */</span>
<a name="l00014"></a>00014
<a name="l00024"></a>00024 <span class="preprocessor">#import &lt;Cocoa/Cocoa.h&gt;</span>
<a name="l00025"></a>00025
<a name="l00035"></a><a class="code" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">00035</a> <span class="keyword">@interface </span>NSObject (IRCClientChannelDelegate)
<a name="l00036"></a>00036
<a name="l00047"></a>00047 - (void)onJoin:(NSString *)nick;
<a name="l00048"></a>00048
<a name="l00056"></a>00056 - (void)onPart:(NSString *)nick reason:(NSString *)reason;
<a name="l00057"></a>00057
<a name="l00066"></a>00066 - (void)onMode:(NSString *)mode params:(NSString *)params nick:(NSString *)nick;
<a name="l00067"></a>00067
<a name="l00074"></a>00074 - (void)onTopic:(NSString *)aTopic nick:(NSString *)nick;
<a name="l00075"></a>00075
<a name="l00083"></a>00083 - (void)onKick:(NSString *)nick reason:(NSString *)reason byNick:(NSString *)byNick;
<a name="l00084"></a>00084
<a name="l00093"></a>00093 - (void)onPrivmsg:(NSString *)message nick:(NSString *)nick;
<a name="l00094"></a>00094
<a name="l00104"></a>00104 - (void)onNotice:(NSString *)notice nick:(NSString *)nick;
<a name="l00105"></a>00105
<a name="l00114"></a>00114 - (void)onAction:(NSString *)action nick:(NSString *)nick;
<a name="l00115"></a>00115
<a name="l00116"></a>00116 <span class="keyword">@end</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,51 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClientChannelDelegate.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>IRCClientChannelDelegate.h File Reference</h1>Receives delegate messages from an <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a>.
<a href="#_details">More...</a>
<p>
<code>#import &lt;Cocoa/Cocoa.h&gt;</code><br>
<p>
<a href="_i_r_c_client_channel_delegate_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Receives delegate messages from an <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a>. <a href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#_details">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Receives delegate messages from an <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a>.
<p>
Receives delegate messages from an <a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a>.<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Nathan Ollerenshaw </dd></dl>
<dl class="version" compact><dt><b>Version:</b></dt><dd>1.0 </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>01.2009</dd></dl>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Nathan Ollerenshaw </dd></dl>
<dl class="version" compact><dt><b>Version:</b></dt><dd>1.0 </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>01.2009 </dd></dl>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,107 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClientSession.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>IRCClientSession.h</h1><a href="_i_r_c_client_session_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
<a name="l00064"></a>00064 <span class="preprocessor">#import &lt;Cocoa/Cocoa.h&gt;</span>
<a name="l00065"></a>00065 <span class="preprocessor">#import "IRCClientSessionDelegate.h"</span>
<a name="l00066"></a>00066 <span class="preprocessor">#include "libircclient.h"</span>
<a name="l00067"></a>00067
<a name="l00080"></a>00080 <span class="keyword">@class</span> <a class="code" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a>;
<a name="l00081"></a><a class="code" href="interface_i_r_c_client_session.html">00081</a> <span class="keyword">@interface </span><a class="code" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> : NSObject {
<a name="l00082"></a><a class="code" href="interface_i_r_c_client_session.html#ff1874c72e785b2097b9ef7ea8856557">00082</a> <span class="keywordtype">id</span> <a class="code" href="interface_i_r_c_client_session.html#ff1874c72e785b2097b9ef7ea8856557">delegate</a>;
<a name="l00083"></a>00083 irc_callbacks_t callbacks;
<a name="l00084"></a><a class="code" href="interface_i_r_c_client_session.html#7f3f3efa9e35c82bc92d89b2f264ca88">00084</a> irc_session_t *<a class="code" href="interface_i_r_c_client_session.html#7f3f3efa9e35c82bc92d89b2f264ca88">session</a>;
<a name="l00085"></a>00085 NSThread *thread;
<a name="l00086"></a>00086
<a name="l00087"></a><a class="code" href="interface_i_r_c_client_session.html#6d2142efde508caf40c8b86e7dd1756c">00087</a> NSString *<a class="code" href="interface_i_r_c_client_session.html#6d2142efde508caf40c8b86e7dd1756c">version</a>;
<a name="l00088"></a><a class="code" href="interface_i_r_c_client_session.html#cb1376cfad37cc503c21fa1235f39fa0">00088</a> NSString *<a class="code" href="interface_i_r_c_client_session.html#cb1376cfad37cc503c21fa1235f39fa0">server</a>;
<a name="l00089"></a><a class="code" href="interface_i_r_c_client_session.html#f4d8a5d0747ecb6ed2f55f282582e8cf">00089</a> NSString *<a class="code" href="interface_i_r_c_client_session.html#f4d8a5d0747ecb6ed2f55f282582e8cf">port</a>;
<a name="l00090"></a><a class="code" href="interface_i_r_c_client_session.html#6e304e45ddb942ead5b3c044a2b09e0b">00090</a> NSString *<a class="code" href="interface_i_r_c_client_session.html#6e304e45ddb942ead5b3c044a2b09e0b">password</a>;
<a name="l00091"></a>00091
<a name="l00092"></a><a class="code" href="interface_i_r_c_client_session.html#4f678f5ad868a7e3d739b1e9ad415249">00092</a> NSString *<a class="code" href="interface_i_r_c_client_session.html#4f678f5ad868a7e3d739b1e9ad415249">nickname</a>;
<a name="l00093"></a><a class="code" href="interface_i_r_c_client_session.html#281dfe78f639e87899d3aff71983484e">00093</a> NSString *<a class="code" href="interface_i_r_c_client_session.html#281dfe78f639e87899d3aff71983484e">username</a>;
<a name="l00094"></a><a class="code" href="interface_i_r_c_client_session.html#c124ffbdf87a785981c3e330f5a90088">00094</a> NSString *<a class="code" href="interface_i_r_c_client_session.html#c124ffbdf87a785981c3e330f5a90088">realname</a>;
<a name="l00095"></a>00095
<a name="l00096"></a><a class="code" href="interface_i_r_c_client_session.html#fd38f656f1f7b03495e26fe982bb9e2a">00096</a> NSMutableDictionary *<a class="code" href="interface_i_r_c_client_session.html#fd38f656f1f7b03495e26fe982bb9e2a">channels</a>;
<a name="l00097"></a>00097 NSMutableDictionary *nicks;
<a name="l00098"></a><a class="code" href="interface_i_r_c_client_session.html#2b8b240d57a57acce3186768308c667c">00098</a> NSStringEncoding <a class="code" href="interface_i_r_c_client_session.html#2b8b240d57a57acce3186768308c667c">encoding</a>;
<a name="l00099"></a>00099 }
<a name="l00100"></a>00100
<a name="l00102"></a>00102 @property (assign) id delegate;
<a name="l00103"></a>00103
<a name="l00105"></a>00105 @property (assign) irc_session_t *session;
<a name="l00106"></a>00106
<a name="l00108"></a>00108 @property (copy) NSString *version;
<a name="l00109"></a>00109
<a name="l00111"></a>00111 @property (copy) NSString *server;
<a name="l00112"></a>00112
<a name="l00114"></a>00114 @property (copy) NSString *port;
<a name="l00115"></a>00115
<a name="l00117"></a>00117 @property (copy) NSString *password;
<a name="l00118"></a>00118
<a name="l00122"></a>00122 @property (copy) NSString *nickname;
<a name="l00123"></a>00123
<a name="l00128"></a>00128 @property (copy) NSString *username;
<a name="l00129"></a>00129
<a name="l00133"></a>00133 @property (copy) NSString *realname;
<a name="l00134"></a>00134
<a name="l00138"></a>00138 @property (assign,readonly) NSMutableDictionary *channels;
<a name="l00139"></a>00139
<a name="l00146"></a>00146 @property (assign) NSStringEncoding encoding;
<a name="l00147"></a>00147
<a name="l00155"></a>00155 - (<span class="keywordtype">int</span>)connect;
<a name="l00156"></a>00156
<a name="l00162"></a>00162 - (<span class="keywordtype">void</span>)disconnect;
<a name="l00163"></a>00163
<a name="l00167"></a>00167 - (<span class="keywordtype">bool</span>)isConnected;
<a name="l00168"></a>00168
<a name="l00173"></a>00173 - (<span class="keywordtype">void</span>)run;
<a name="l00174"></a>00174
<a name="l00178"></a>00178 - (<span class="keywordtype">int</span>)sendRawWithFormat:(NSString *)format, ...;
<a name="l00179"></a>00179
<a name="l00186"></a>00186 - (<span class="keywordtype">int</span>)quit:(NSString *)reason;
<a name="l00187"></a>00187
<a name="l00194"></a>00194 - (<span class="keywordtype">int</span>)join:(NSString *)channel key:(NSString *)key;
<a name="l00195"></a>00195
<a name="l00201"></a>00201 - (<span class="keywordtype">int</span>)list:(NSString *)channel;
<a name="l00202"></a>00202
<a name="l00208"></a>00208 - (<span class="keywordtype">int</span>)userMode:(NSString *)mode;
<a name="l00209"></a>00209
<a name="l00215"></a>00215 - (<span class="keywordtype">int</span>)nick:(NSString *)newnick;
<a name="l00216"></a>00216
<a name="l00222"></a>00222 - (<span class="keywordtype">int</span>)whois:(NSString *)nick;
<a name="l00223"></a>00223
<a name="l00230"></a>00230 - (<span class="keywordtype">int</span>)message:(NSString *)message to:(NSString *)target;
<a name="l00231"></a>00231
<a name="l00238"></a>00238 - (<span class="keywordtype">int</span>)action:(NSString *)action to:(NSString *)target;
<a name="l00239"></a>00239
<a name="l00246"></a>00246 - (<span class="keywordtype">int</span>)notice:(NSString *)notice to:(NSString *)target;
<a name="l00247"></a>00247
<a name="l00254"></a>00254 - (<span class="keywordtype">int</span>)ctcpRequest:(NSString *)request target:(NSString *)target;
<a name="l00255"></a>00255
<a name="l00262"></a>00262 - (<span class="keywordtype">int</span>)ctcpReply:(NSString *)reply target:(NSString *)target;
<a name="l00263"></a>00263
<a name="l00264"></a>00264 @end
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,49 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClientSession.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>IRCClientSession.h File Reference</h1>Represents a connected IRC Session.
<a href="#_details">More...</a>
<p>
<code>#import &lt;Cocoa/Cocoa.h&gt;</code><br>
<code>#import &quot;IRCClientSessionDelegate.h&quot;</code><br>
<code>#include &quot;libircclient.h&quot;</code><br>
<p>
<a href="_i_r_c_client_session_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents a connected IRC Session. <a href="interface_i_r_c_client_session.html#_details">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Represents a connected IRC Session.
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Nathan Ollerenshaw </dd></dl>
<dl class="version" compact><dt><b>Version:</b></dt><dd>1.0 </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>01.2009 </dd></dl>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,74 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClientSessionDelegate.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>IRCClientSessionDelegate.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* </span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2009 Nathan Ollerenshaw chrome@stupendous.net</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * This library is free software; you can redistribute it and/or modify it </span>
<a name="l00005"></a>00005 <span class="comment"> * under the terms of the GNU Lesser General Public License as published by </span>
<a name="l00006"></a>00006 <span class="comment"> * the Free Software Foundation; either version 2 of the License, or (at your </span>
<a name="l00007"></a>00007 <span class="comment"> * option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * This library is distributed in the hope that it will be useful, but WITHOUT </span>
<a name="l00010"></a>00010 <span class="comment"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or </span>
<a name="l00011"></a>00011 <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public </span>
<a name="l00012"></a>00012 <span class="comment"> * License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"> */</span>
<a name="l00014"></a>00014
<a name="l00015"></a>00015 <span class="preprocessor">#import &lt;Cocoa/Cocoa.h&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include "libircclient.h"</span>
<a name="l00017"></a>00017
<a name="l00027"></a>00027 <span class="keyword">@class</span> <a class="code" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a>;
<a name="l00028"></a>00028
<a name="l00038"></a><a class="code" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">00038</a> <span class="keyword">@interface </span>NSObject (IRCClientSessionDelegate)
<a name="l00039"></a>00039
<a name="l00042"></a>00042 - (void)onConnect;
<a name="l00043"></a>00043
<a name="l00051"></a>00051 - (void)onNick:(NSString *)nick oldNick:(NSString *)oldNick;
<a name="l00052"></a>00052
<a name="l00059"></a>00059 - (void)onQuit:(NSString *)nick reason:(NSString *)reason;
<a name="l00060"></a>00060
<a name="l00074"></a>00074 - (void)onJoinChannel:(<a class="code" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> *)channel;
<a name="l00075"></a>00075
<a name="l00081"></a>00081 - (void)onMode:(NSString *)mode;
<a name="l00082"></a>00082
<a name="l00089"></a>00089 - (void)onPrivmsg:(NSData *)message nick:(NSString *)nick;
<a name="l00090"></a>00090
<a name="l00097"></a>00097 - (void)onNotice:(NSData *)notice nick:(NSString *)nick;
<a name="l00098"></a>00098
<a name="l00105"></a>00105 - (void)onInvite:(NSString *)channel nick:(NSString *)nick;
<a name="l00106"></a>00106
<a name="l00114"></a>00114 - (void)onCtcpRequest:(NSString *)request type:(NSString *)type nick:(NSString *)nick;
<a name="l00115"></a>00115
<a name="l00122"></a>00122 - (void)onCtcpReply:(NSData *)reply nick:(NSString *)nick;
<a name="l00123"></a>00123
<a name="l00132"></a>00132 - (void)onAction:(NSData *)action nick:(NSString *)nick;
<a name="l00133"></a>00133
<a name="l00141"></a>00141 - (void)onUnknownEvent:(NSString *)event origin:(NSString *)origin params:(NSArray *)params;
<a name="l00142"></a>00142
<a name="l00150"></a>00150 - (void)onNumericEvent:(NSUInteger)event origin:(NSString *)origin params:(NSArray *)params;
<a name="l00151"></a>00151
<a name="l00152"></a>00152 <span class="keyword">@end</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,61 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: NSObject+DDExtensions.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>NSObject+DDExtensions.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 2007-2008 Dave Dribin</span>
<a name="l00003"></a>00003 <span class="comment"> * </span>
<a name="l00004"></a>00004 <span class="comment"> * Permission is hereby granted, free of charge, to any person</span>
<a name="l00005"></a>00005 <span class="comment"> * obtaining a copy of this software and associated documentation</span>
<a name="l00006"></a>00006 <span class="comment"> * files (the "Software"), to deal in the Software without</span>
<a name="l00007"></a>00007 <span class="comment"> * restriction, including without limitation the rights to use, copy,</span>
<a name="l00008"></a>00008 <span class="comment"> * modify, merge, publish, distribute, sublicense, and/or sell copies</span>
<a name="l00009"></a>00009 <span class="comment"> * of the Software, and to permit persons to whom the Software is</span>
<a name="l00010"></a>00010 <span class="comment"> * furnished to do so, subject to the following conditions:</span>
<a name="l00011"></a>00011 <span class="comment"> * </span>
<a name="l00012"></a>00012 <span class="comment"> * The above copyright notice and this permission notice shall be</span>
<a name="l00013"></a>00013 <span class="comment"> * included in all copies or substantial portions of the Software.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span>
<a name="l00016"></a>00016 <span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span>
<a name="l00017"></a>00017 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span>
<a name="l00018"></a>00018 <span class="comment"> * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS</span>
<a name="l00019"></a>00019 <span class="comment"> * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN</span>
<a name="l00020"></a>00020 <span class="comment"> * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN</span>
<a name="l00021"></a>00021 <span class="comment"> * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<a name="l00022"></a>00022 <span class="comment"> * SOFTWARE.</span>
<a name="l00023"></a>00023 <span class="comment"> */</span>
<a name="l00024"></a>00024
<a name="l00025"></a>00025 <span class="preprocessor">#import &lt;Foundation/Foundation.h&gt;</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="keyword">@interface </span>NSObject (DDExtensions)
<a name="l00029"></a>00029
<a name="l00030"></a>00030 - (id)dd_invokeOnMainThread;
<a name="l00031"></a>00031 - (id)dd_invokeOnMainThreadAndWaitUntilDone:(BOOL)waitUntilDone;
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="keyword">@end</span>
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="preprocessor">#define ddsynthesize(_X_) @synthesize _X_ = _##_X_</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Class List</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li class="current"><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
<tr><td class="indexkey"><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td class="indexvalue">Represents a connected IRC Channel </td></tr>
<tr><td class="indexkey"><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td class="indexvalue">Represents a connected IRC Session </td></tr>
<tr><td class="indexkey"><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td><td class="indexvalue">Receives delegate messages from an <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> </td></tr>
<tr><td class="indexkey"><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td class="indexvalue">Receives delegate messages from an <a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> </td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,55 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Member List</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>IRCClientChannel Member List</h1>This is the complete list of members for <a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a>, including all inherited members.<p><table>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#3dce7913593cee47fff8f6d052139e84">action:</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#e48470def47fee0442f84d6cbb61805f">ctcpRequest:</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#a24a320a08bb515f3ef5862d7bb1e6b2">delegate</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#a24a320a08bb515f3ef5862d7bb1e6b2">delegate</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#b2c7c8cea97e6f0dfd50f5ac2576a328">encoding</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#b2c7c8cea97e6f0dfd50f5ac2576a328">encoding</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#01568915fb1763dbbe851598bf6111a3">initWithName:</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#6a3081eee9d9f576a554e451f38a85af">invite:</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#a11844c7c48140a83464b5da453411db">kick:reason:</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#4c130a850d288754d0bb80a50be50b3c">message:</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#b1d93e3a44e0f306b0bf9034c9d73ba3">modes</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#b1d93e3a44e0f306b0bf9034c9d73ba3">modes</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#fe81a99a24e3bc66fc5f05742fb52096">name</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#fe81a99a24e3bc66fc5f05742fb52096">name</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#d60403088ddc1434db87825e62c57d5c">names</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#d60403088ddc1434db87825e62c57d5c">names</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#d3ff98549b3bf39c581d2c5b62d6de8d">notice:</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#374315cc58c1e27ee74f15f6da4da699">part</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#1edd5edd8ec30f8763a8ad703e0bf0b1">session</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#1edd5edd8ec30f8763a8ad703e0bf0b1">session</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#2a7b182090c69541c9b1d5919da842de">setMode:params:</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_channel.html#5a30badfcab9de2b95a9546758355850">setTopic:</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#eb5124389861d676b3332cca7c8dc000">topic</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_channel.html#eb5124389861d676b3332cca7c8dc000">topic</a></td><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a></td><td></td></tr>
</table></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,69 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Member List</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>IRCClientSession Member List</h1>This is the complete list of members for <a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a>, including all inherited members.<p><table>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#c8c975193f7798f195d69b984aaa21fd">action:to:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#fd38f656f1f7b03495e26fe982bb9e2a">channels</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#fd38f656f1f7b03495e26fe982bb9e2a">channels</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#c9a0b7a41adeb92cf89fc53038ebc00b">connect</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#2cef231ee53c6ad6a5d9d96283084996">ctcpReply:target:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#6388c4f1f5cf3ffc14057984e29a4635">ctcpRequest:target:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#ff1874c72e785b2097b9ef7ea8856557">delegate</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#ff1874c72e785b2097b9ef7ea8856557">delegate</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#9cb82eac49784ccafbd6cf7dd262a766">disconnect</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#2b8b240d57a57acce3186768308c667c">encoding</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#2b8b240d57a57acce3186768308c667c">encoding</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#2295d13bd62cbc7a0bd722953c3f4c64">isConnected</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#12ce6d4e08abe1ac26d0a1c0e9c5387e">join:key:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#77e26b8a7488ac2e8298fe01eb1f729c">list:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#613d3215bf84eb7f99c088284321eb0d">message:to:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#608235f250367bdb74c05b8caa404d11">nick:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#4f678f5ad868a7e3d739b1e9ad415249">nickname</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#4f678f5ad868a7e3d739b1e9ad415249">nickname</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#2657fa7a70ddb705819b8b176692e6a0">notice:to:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#6e304e45ddb942ead5b3c044a2b09e0b">password</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#6e304e45ddb942ead5b3c044a2b09e0b">password</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#f4d8a5d0747ecb6ed2f55f282582e8cf">port</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#f4d8a5d0747ecb6ed2f55f282582e8cf">port</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#bfa66744f91a4408f40efaf752fe6071">quit:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#c124ffbdf87a785981c3e330f5a90088">realname</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#c124ffbdf87a785981c3e330f5a90088">realname</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#5ba88ff09ef13c00d8b7379b30c9eced">run</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#dcb54b817c20fa3c3beba65a944bca19">sendRawWithFormat:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#cb1376cfad37cc503c21fa1235f39fa0">server</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#cb1376cfad37cc503c21fa1235f39fa0">server</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#7f3f3efa9e35c82bc92d89b2f264ca88">session</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#7f3f3efa9e35c82bc92d89b2f264ca88">session</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#869e09863a186b409d140c8f8161a93a">userMode:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#281dfe78f639e87899d3aff71983484e">username</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#281dfe78f639e87899d3aff71983484e">username</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#6d2142efde508caf40c8b86e7dd1756c">version</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td></td><td><a class="el" href="interface_i_r_c_client_session.html#6d2142efde508caf40c8b86e7dd1756c">version</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_i_r_c_client_session.html#20ded6131f5bf067363a4701d2164907">whois:</a></td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a></td><td></td></tr>
</table></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Member List</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>NSObject(IRCClientChannelDelegate) Member List</h1>This is the complete list of members for <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a>, including all inherited members.<p><table>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#79d5aa388db46960369ccbd250b8a5b5">onAction:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#d3e8a2612f8b6e2d65b407a0dffcd68b">onJoin:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#681261027838b019ea101a75c836a487">onKick:reason:byNick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#96106caa4eb6dc9f36a4a2ad7536de9a">onMode:params:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#6d73e8a2cb435d1f28d954104c0bd3c1">onNotice:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#5e606c4445b697158029bcf99949eb40">onPart:reason:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#2414fbf1731d8b70a79bc071e25d8d33">onPrivmsg:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#a1672182357b1768c817238a23564b7e">onTopic:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a></td><td></td></tr>
</table></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,44 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Member List</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>NSObject(IRCClientSessionDelegate) Member List</h1>This is the complete list of members for <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a>, including all inherited members.<p><table>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#53420eee82af0529518a4780850e9e66">onAction:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#ba6db2dd75596bf702c62efc9e14eb0f">onConnect</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#a2e3129f7210795c4c300fc06e22d146">onCtcpReply:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#31937b6b464b76943f1beab9226fdc57">onCtcpRequest:type:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#44f7535a12086d212300b71c36ee3f2a">onInvite:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#08bfc81348865b7501c75d9ca8fe32cb">onJoinChannel:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#9f6346c5e3452c528bb74be8d7ecd4dc">onMode:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#dae74e3cd13af45e6b94a1cc0638493b">onNick:oldNick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#76e1eaab848008d9d310495358672369">onNotice:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#16bc977438e490a4bb8e50769c4c46dc">onNumericEvent:origin:params:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#4e992d543d6241fa70b600b541c84bf5">onPrivmsg:nick:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#31660c57ebf15aca5a1d5706a384d758">onQuit:reason:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
<tr class="memlist"><td>-&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#05bda6cfa9d696b1af1ab7da5f8ca271">onUnknownEvent:origin:params:</a></td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a></td><td></td></tr>
</table></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Alphabetical List</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Class Index</h1><p><div class="qindex"><a class="qindex" href="#letter_I">I</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_N">N</a></div><p>
<table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
<tr><td><a name="letter_I"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;I&nbsp;&nbsp;</div></td></tr></table>
</td><td><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a>&nbsp;&nbsp;&nbsp;</td><td><a name="letter_N"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;N&nbsp;&nbsp;</div></td></tr></table>
</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a>&nbsp;&nbsp;&nbsp;</td></tr><tr><td><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a>&nbsp;&nbsp;&nbsp;</td></tr></table><p><div class="qindex"><a class="qindex" href="#letter_I">I</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_N">N</a></div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,441 @@
body, 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;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: File Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li class="current"><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>File List</h1>Here is a list of all documented files with brief descriptions:<table>
<tr><td class="indexkey"><b>DDInvocationGrabber.h</b> <a href="_d_d_invocation_grabber_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="_i_r_c_client_channel_8h.html">IRCClientChannel.h</a> <a href="_i_r_c_client_channel_8h-source.html">[code]</a></td><td class="indexvalue">Represents a connected IRC Channel </td></tr>
<tr><td class="indexkey"><a class="el" href="_i_r_c_client_channel_delegate_8h.html">IRCClientChannelDelegate.h</a> <a href="_i_r_c_client_channel_delegate_8h-source.html">[code]</a></td><td class="indexvalue">Receives delegate messages from an <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> </td></tr>
<tr><td class="indexkey"><a class="el" href="_i_r_c_client_session_8h.html">IRCClientSession.h</a> <a href="_i_r_c_client_session_8h-source.html">[code]</a></td><td class="indexvalue">Represents a connected IRC Session </td></tr>
<tr><td class="indexkey"><b>IRCClientSessionDelegate.h</b> <a href="_i_r_c_client_session_delegate_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><b>NSObject+DDExtensions.h</b> <a href="_n_s_object_09_d_d_extensions_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,224 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Class Members</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li class="current"><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li class="current"><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_prop.html"><span>Properties</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="#index_a"><span>a</span></a></li>
<li><a href="#index_c"><span>c</span></a></li>
<li><a href="#index_d"><span>d</span></a></li>
<li><a href="#index_e"><span>e</span></a></li>
<li><a href="#index_i"><span>i</span></a></li>
<li><a href="#index_j"><span>j</span></a></li>
<li><a href="#index_k"><span>k</span></a></li>
<li><a href="#index_l"><span>l</span></a></li>
<li><a href="#index_m"><span>m</span></a></li>
<li><a href="#index_n"><span>n</span></a></li>
<li><a href="#index_o"><span>o</span></a></li>
<li><a href="#index_p"><span>p</span></a></li>
<li><a href="#index_q"><span>q</span></a></li>
<li><a href="#index_r"><span>r</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
<li><a href="#index_t"><span>t</span></a></li>
<li><a href="#index_u"><span>u</span></a></li>
<li><a href="#index_v"><span>v</span></a></li>
<li><a href="#index_w"><span>w</span></a></li>
</ul>
</div>
</div>
<div class="contents">
Here is a list of all documented class members with links to the class documentation for each member:
<p>
<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
<li>action:
: <a class="el" href="interface_i_r_c_client_channel.html#3dce7913593cee47fff8f6d052139e84">IRCClientChannel</a>
<li>action:to:
: <a class="el" href="interface_i_r_c_client_session.html#c8c975193f7798f195d69b984aaa21fd">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_c">- c -</a></h3><ul>
<li>channels
: <a class="el" href="interface_i_r_c_client_session.html#fd38f656f1f7b03495e26fe982bb9e2a">IRCClientSession</a>
<li>connect
: <a class="el" href="interface_i_r_c_client_session.html#c9a0b7a41adeb92cf89fc53038ebc00b">IRCClientSession</a>
<li>ctcpReply:target:
: <a class="el" href="interface_i_r_c_client_session.html#2cef231ee53c6ad6a5d9d96283084996">IRCClientSession</a>
<li>ctcpRequest:
: <a class="el" href="interface_i_r_c_client_channel.html#e48470def47fee0442f84d6cbb61805f">IRCClientChannel</a>
<li>ctcpRequest:target:
: <a class="el" href="interface_i_r_c_client_session.html#6388c4f1f5cf3ffc14057984e29a4635">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
<li>delegate
: <a class="el" href="interface_i_r_c_client_channel.html#a24a320a08bb515f3ef5862d7bb1e6b2">IRCClientChannel</a>
, <a class="el" href="interface_i_r_c_client_session.html#ff1874c72e785b2097b9ef7ea8856557">IRCClientSession</a>
<li>disconnect
: <a class="el" href="interface_i_r_c_client_session.html#9cb82eac49784ccafbd6cf7dd262a766">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_e">- e -</a></h3><ul>
<li>encoding
: <a class="el" href="interface_i_r_c_client_channel.html#b2c7c8cea97e6f0dfd50f5ac2576a328">IRCClientChannel</a>
, <a class="el" href="interface_i_r_c_client_session.html#2b8b240d57a57acce3186768308c667c">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
<li>initWithName:
: <a class="el" href="interface_i_r_c_client_channel.html#01568915fb1763dbbe851598bf6111a3">IRCClientChannel</a>
<li>invite:
: <a class="el" href="interface_i_r_c_client_channel.html#6a3081eee9d9f576a554e451f38a85af">IRCClientChannel</a>
<li>isConnected
: <a class="el" href="interface_i_r_c_client_session.html#2295d13bd62cbc7a0bd722953c3f4c64">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_j">- j -</a></h3><ul>
<li>join:key:
: <a class="el" href="interface_i_r_c_client_session.html#12ce6d4e08abe1ac26d0a1c0e9c5387e">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_k">- k -</a></h3><ul>
<li>kick:reason:
: <a class="el" href="interface_i_r_c_client_channel.html#a11844c7c48140a83464b5da453411db">IRCClientChannel</a>
</ul>
<h3><a class="anchor" name="index_l">- l -</a></h3><ul>
<li>list:
: <a class="el" href="interface_i_r_c_client_session.html#77e26b8a7488ac2e8298fe01eb1f729c">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_m">- m -</a></h3><ul>
<li>message:
: <a class="el" href="interface_i_r_c_client_channel.html#4c130a850d288754d0bb80a50be50b3c">IRCClientChannel</a>
<li>message:to:
: <a class="el" href="interface_i_r_c_client_session.html#613d3215bf84eb7f99c088284321eb0d">IRCClientSession</a>
<li>modes
: <a class="el" href="interface_i_r_c_client_channel.html#b1d93e3a44e0f306b0bf9034c9d73ba3">IRCClientChannel</a>
</ul>
<h3><a class="anchor" name="index_n">- n -</a></h3><ul>
<li>name
: <a class="el" href="interface_i_r_c_client_channel.html#fe81a99a24e3bc66fc5f05742fb52096">IRCClientChannel</a>
<li>names
: <a class="el" href="interface_i_r_c_client_channel.html#d60403088ddc1434db87825e62c57d5c">IRCClientChannel</a>
<li>nick:
: <a class="el" href="interface_i_r_c_client_session.html#608235f250367bdb74c05b8caa404d11">IRCClientSession</a>
<li>nickname
: <a class="el" href="interface_i_r_c_client_session.html#4f678f5ad868a7e3d739b1e9ad415249">IRCClientSession</a>
<li>notice:
: <a class="el" href="interface_i_r_c_client_channel.html#d3ff98549b3bf39c581d2c5b62d6de8d">IRCClientChannel</a>
<li>notice:to:
: <a class="el" href="interface_i_r_c_client_session.html#2657fa7a70ddb705819b8b176692e6a0">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_o">- o -</a></h3><ul>
<li>onAction:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#79d5aa388db46960369ccbd250b8a5b5">NSObject(IRCClientChannelDelegate)</a>
, <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#53420eee82af0529518a4780850e9e66">NSObject(IRCClientSessionDelegate)</a>
<li>onConnect
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#ba6db2dd75596bf702c62efc9e14eb0f">NSObject(IRCClientSessionDelegate)</a>
<li>onCtcpReply:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#a2e3129f7210795c4c300fc06e22d146">NSObject(IRCClientSessionDelegate)</a>
<li>onCtcpRequest:type:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#31937b6b464b76943f1beab9226fdc57">NSObject(IRCClientSessionDelegate)</a>
<li>onInvite:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#44f7535a12086d212300b71c36ee3f2a">NSObject(IRCClientSessionDelegate)</a>
<li>onJoin:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#d3e8a2612f8b6e2d65b407a0dffcd68b">NSObject(IRCClientChannelDelegate)</a>
<li>onJoinChannel:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#08bfc81348865b7501c75d9ca8fe32cb">NSObject(IRCClientSessionDelegate)</a>
<li>onKick:reason:byNick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#681261027838b019ea101a75c836a487">NSObject(IRCClientChannelDelegate)</a>
<li>onMode:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#9f6346c5e3452c528bb74be8d7ecd4dc">NSObject(IRCClientSessionDelegate)</a>
<li>onMode:params:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#96106caa4eb6dc9f36a4a2ad7536de9a">NSObject(IRCClientChannelDelegate)</a>
<li>onNick:oldNick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#dae74e3cd13af45e6b94a1cc0638493b">NSObject(IRCClientSessionDelegate)</a>
<li>onNotice:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#6d73e8a2cb435d1f28d954104c0bd3c1">NSObject(IRCClientChannelDelegate)</a>
, <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#76e1eaab848008d9d310495358672369">NSObject(IRCClientSessionDelegate)</a>
<li>onNumericEvent:origin:params:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#16bc977438e490a4bb8e50769c4c46dc">NSObject(IRCClientSessionDelegate)</a>
<li>onPart:reason:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#5e606c4445b697158029bcf99949eb40">NSObject(IRCClientChannelDelegate)</a>
<li>onPrivmsg:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#2414fbf1731d8b70a79bc071e25d8d33">NSObject(IRCClientChannelDelegate)</a>
, <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#4e992d543d6241fa70b600b541c84bf5">NSObject(IRCClientSessionDelegate)</a>
<li>onQuit:reason:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#31660c57ebf15aca5a1d5706a384d758">NSObject(IRCClientSessionDelegate)</a>
<li>onTopic:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#a1672182357b1768c817238a23564b7e">NSObject(IRCClientChannelDelegate)</a>
<li>onUnknownEvent:origin:params:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#05bda6cfa9d696b1af1ab7da5f8ca271">NSObject(IRCClientSessionDelegate)</a>
</ul>
<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
<li>part
: <a class="el" href="interface_i_r_c_client_channel.html#374315cc58c1e27ee74f15f6da4da699">IRCClientChannel</a>
<li>password
: <a class="el" href="interface_i_r_c_client_session.html#6e304e45ddb942ead5b3c044a2b09e0b">IRCClientSession</a>
<li>port
: <a class="el" href="interface_i_r_c_client_session.html#f4d8a5d0747ecb6ed2f55f282582e8cf">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_q">- q -</a></h3><ul>
<li>quit:
: <a class="el" href="interface_i_r_c_client_session.html#bfa66744f91a4408f40efaf752fe6071">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_r">- r -</a></h3><ul>
<li>realname
: <a class="el" href="interface_i_r_c_client_session.html#c124ffbdf87a785981c3e330f5a90088">IRCClientSession</a>
<li>run
: <a class="el" href="interface_i_r_c_client_session.html#5ba88ff09ef13c00d8b7379b30c9eced">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
<li>sendRawWithFormat:
: <a class="el" href="interface_i_r_c_client_session.html#dcb54b817c20fa3c3beba65a944bca19">IRCClientSession</a>
<li>server
: <a class="el" href="interface_i_r_c_client_session.html#cb1376cfad37cc503c21fa1235f39fa0">IRCClientSession</a>
<li>session
: <a class="el" href="interface_i_r_c_client_session.html#7f3f3efa9e35c82bc92d89b2f264ca88">IRCClientSession</a>
, <a class="el" href="interface_i_r_c_client_channel.html#1edd5edd8ec30f8763a8ad703e0bf0b1">IRCClientChannel</a>
<li>setMode:params:
: <a class="el" href="interface_i_r_c_client_channel.html#2a7b182090c69541c9b1d5919da842de">IRCClientChannel</a>
<li>setTopic:
: <a class="el" href="interface_i_r_c_client_channel.html#5a30badfcab9de2b95a9546758355850">IRCClientChannel</a>
</ul>
<h3><a class="anchor" name="index_t">- t -</a></h3><ul>
<li>topic
: <a class="el" href="interface_i_r_c_client_channel.html#eb5124389861d676b3332cca7c8dc000">IRCClientChannel</a>
</ul>
<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
<li>userMode:
: <a class="el" href="interface_i_r_c_client_session.html#869e09863a186b409d140c8f8161a93a">IRCClientSession</a>
<li>username
: <a class="el" href="interface_i_r_c_client_session.html#281dfe78f639e87899d3aff71983484e">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_v">- v -</a></h3><ul>
<li>version
: <a class="el" href="interface_i_r_c_client_session.html#6d2142efde508caf40c8b86e7dd1756c">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_w">- w -</a></h3><ul>
<li>whois:
: <a class="el" href="interface_i_r_c_client_session.html#20ded6131f5bf067363a4701d2164907">IRCClientSession</a>
</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,182 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Class Members - Functions</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li class="current"><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="functions.html"><span>All</span></a></li>
<li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_prop.html"><span>Properties</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="#index_a"><span>a</span></a></li>
<li><a href="#index_c"><span>c</span></a></li>
<li><a href="#index_d"><span>d</span></a></li>
<li><a href="#index_i"><span>i</span></a></li>
<li><a href="#index_j"><span>j</span></a></li>
<li><a href="#index_k"><span>k</span></a></li>
<li><a href="#index_l"><span>l</span></a></li>
<li><a href="#index_m"><span>m</span></a></li>
<li><a href="#index_n"><span>n</span></a></li>
<li><a href="#index_o"><span>o</span></a></li>
<li><a href="#index_p"><span>p</span></a></li>
<li><a href="#index_q"><span>q</span></a></li>
<li><a href="#index_r"><span>r</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
<li><a href="#index_u"><span>u</span></a></li>
<li><a href="#index_w"><span>w</span></a></li>
</ul>
</div>
</div>
<div class="contents">
&nbsp;
<p>
<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
<li>action:
: <a class="el" href="interface_i_r_c_client_channel.html#3dce7913593cee47fff8f6d052139e84">IRCClientChannel</a>
<li>action:to:
: <a class="el" href="interface_i_r_c_client_session.html#c8c975193f7798f195d69b984aaa21fd">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_c">- c -</a></h3><ul>
<li>connect
: <a class="el" href="interface_i_r_c_client_session.html#c9a0b7a41adeb92cf89fc53038ebc00b">IRCClientSession</a>
<li>ctcpReply:target:
: <a class="el" href="interface_i_r_c_client_session.html#2cef231ee53c6ad6a5d9d96283084996">IRCClientSession</a>
<li>ctcpRequest:
: <a class="el" href="interface_i_r_c_client_channel.html#e48470def47fee0442f84d6cbb61805f">IRCClientChannel</a>
<li>ctcpRequest:target:
: <a class="el" href="interface_i_r_c_client_session.html#6388c4f1f5cf3ffc14057984e29a4635">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
<li>disconnect
: <a class="el" href="interface_i_r_c_client_session.html#9cb82eac49784ccafbd6cf7dd262a766">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
<li>initWithName:
: <a class="el" href="interface_i_r_c_client_channel.html#01568915fb1763dbbe851598bf6111a3">IRCClientChannel</a>
<li>invite:
: <a class="el" href="interface_i_r_c_client_channel.html#6a3081eee9d9f576a554e451f38a85af">IRCClientChannel</a>
<li>isConnected
: <a class="el" href="interface_i_r_c_client_session.html#2295d13bd62cbc7a0bd722953c3f4c64">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_j">- j -</a></h3><ul>
<li>join:key:
: <a class="el" href="interface_i_r_c_client_session.html#12ce6d4e08abe1ac26d0a1c0e9c5387e">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_k">- k -</a></h3><ul>
<li>kick:reason:
: <a class="el" href="interface_i_r_c_client_channel.html#a11844c7c48140a83464b5da453411db">IRCClientChannel</a>
</ul>
<h3><a class="anchor" name="index_l">- l -</a></h3><ul>
<li>list:
: <a class="el" href="interface_i_r_c_client_session.html#77e26b8a7488ac2e8298fe01eb1f729c">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_m">- m -</a></h3><ul>
<li>message:
: <a class="el" href="interface_i_r_c_client_channel.html#4c130a850d288754d0bb80a50be50b3c">IRCClientChannel</a>
<li>message:to:
: <a class="el" href="interface_i_r_c_client_session.html#613d3215bf84eb7f99c088284321eb0d">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_n">- n -</a></h3><ul>
<li>nick:
: <a class="el" href="interface_i_r_c_client_session.html#608235f250367bdb74c05b8caa404d11">IRCClientSession</a>
<li>notice:
: <a class="el" href="interface_i_r_c_client_channel.html#d3ff98549b3bf39c581d2c5b62d6de8d">IRCClientChannel</a>
<li>notice:to:
: <a class="el" href="interface_i_r_c_client_session.html#2657fa7a70ddb705819b8b176692e6a0">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_o">- o -</a></h3><ul>
<li>onAction:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#79d5aa388db46960369ccbd250b8a5b5">NSObject(IRCClientChannelDelegate)</a>
, <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#53420eee82af0529518a4780850e9e66">NSObject(IRCClientSessionDelegate)</a>
<li>onConnect
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#ba6db2dd75596bf702c62efc9e14eb0f">NSObject(IRCClientSessionDelegate)</a>
<li>onCtcpReply:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#a2e3129f7210795c4c300fc06e22d146">NSObject(IRCClientSessionDelegate)</a>
<li>onCtcpRequest:type:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#31937b6b464b76943f1beab9226fdc57">NSObject(IRCClientSessionDelegate)</a>
<li>onInvite:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#44f7535a12086d212300b71c36ee3f2a">NSObject(IRCClientSessionDelegate)</a>
<li>onJoin:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#d3e8a2612f8b6e2d65b407a0dffcd68b">NSObject(IRCClientChannelDelegate)</a>
<li>onJoinChannel:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#08bfc81348865b7501c75d9ca8fe32cb">NSObject(IRCClientSessionDelegate)</a>
<li>onKick:reason:byNick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#681261027838b019ea101a75c836a487">NSObject(IRCClientChannelDelegate)</a>
<li>onMode:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#9f6346c5e3452c528bb74be8d7ecd4dc">NSObject(IRCClientSessionDelegate)</a>
<li>onMode:params:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#96106caa4eb6dc9f36a4a2ad7536de9a">NSObject(IRCClientChannelDelegate)</a>
<li>onNick:oldNick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#dae74e3cd13af45e6b94a1cc0638493b">NSObject(IRCClientSessionDelegate)</a>
<li>onNotice:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#6d73e8a2cb435d1f28d954104c0bd3c1">NSObject(IRCClientChannelDelegate)</a>
, <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#76e1eaab848008d9d310495358672369">NSObject(IRCClientSessionDelegate)</a>
<li>onNumericEvent:origin:params:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#16bc977438e490a4bb8e50769c4c46dc">NSObject(IRCClientSessionDelegate)</a>
<li>onPart:reason:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#5e606c4445b697158029bcf99949eb40">NSObject(IRCClientChannelDelegate)</a>
<li>onPrivmsg:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#2414fbf1731d8b70a79bc071e25d8d33">NSObject(IRCClientChannelDelegate)</a>
, <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#4e992d543d6241fa70b600b541c84bf5">NSObject(IRCClientSessionDelegate)</a>
<li>onQuit:reason:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#31660c57ebf15aca5a1d5706a384d758">NSObject(IRCClientSessionDelegate)</a>
<li>onTopic:nick:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#a1672182357b1768c817238a23564b7e">NSObject(IRCClientChannelDelegate)</a>
<li>onUnknownEvent:origin:params:
: <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#05bda6cfa9d696b1af1ab7da5f8ca271">NSObject(IRCClientSessionDelegate)</a>
</ul>
<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
<li>part
: <a class="el" href="interface_i_r_c_client_channel.html#374315cc58c1e27ee74f15f6da4da699">IRCClientChannel</a>
</ul>
<h3><a class="anchor" name="index_q">- q -</a></h3><ul>
<li>quit:
: <a class="el" href="interface_i_r_c_client_session.html#bfa66744f91a4408f40efaf752fe6071">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_r">- r -</a></h3><ul>
<li>run
: <a class="el" href="interface_i_r_c_client_session.html#5ba88ff09ef13c00d8b7379b30c9eced">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
<li>sendRawWithFormat:
: <a class="el" href="interface_i_r_c_client_session.html#dcb54b817c20fa3c3beba65a944bca19">IRCClientSession</a>
<li>setMode:params:
: <a class="el" href="interface_i_r_c_client_channel.html#2a7b182090c69541c9b1d5919da842de">IRCClientChannel</a>
<li>setTopic:
: <a class="el" href="interface_i_r_c_client_channel.html#5a30badfcab9de2b95a9546758355850">IRCClientChannel</a>
</ul>
<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
<li>userMode:
: <a class="el" href="interface_i_r_c_client_session.html#869e09863a186b409d140c8f8161a93a">IRCClientSession</a>
</ul>
<h3><a class="anchor" name="index_w">- w -</a></h3><ul>
<li>whois:
: <a class="el" href="interface_i_r_c_client_session.html#20ded6131f5bf067363a4701d2164907">IRCClientSession</a>
</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,74 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Class Members - Properties</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li class="current"><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li class="current"><a href="functions_prop.html"><span>Properties</span></a></li>
</ul>
</div>
</div>
<div class="contents">
&nbsp;
<p>
<ul>
<li>channels
: <a class="el" href="interface_i_r_c_client_session.html#fd38f656f1f7b03495e26fe982bb9e2a">IRCClientSession</a>
<li>delegate
: <a class="el" href="interface_i_r_c_client_channel.html#a24a320a08bb515f3ef5862d7bb1e6b2">IRCClientChannel</a>
, <a class="el" href="interface_i_r_c_client_session.html#ff1874c72e785b2097b9ef7ea8856557">IRCClientSession</a>
<li>encoding
: <a class="el" href="interface_i_r_c_client_channel.html#b2c7c8cea97e6f0dfd50f5ac2576a328">IRCClientChannel</a>
, <a class="el" href="interface_i_r_c_client_session.html#2b8b240d57a57acce3186768308c667c">IRCClientSession</a>
<li>modes
: <a class="el" href="interface_i_r_c_client_channel.html#b1d93e3a44e0f306b0bf9034c9d73ba3">IRCClientChannel</a>
<li>name
: <a class="el" href="interface_i_r_c_client_channel.html#fe81a99a24e3bc66fc5f05742fb52096">IRCClientChannel</a>
<li>names
: <a class="el" href="interface_i_r_c_client_channel.html#d60403088ddc1434db87825e62c57d5c">IRCClientChannel</a>
<li>nickname
: <a class="el" href="interface_i_r_c_client_session.html#4f678f5ad868a7e3d739b1e9ad415249">IRCClientSession</a>
<li>password
: <a class="el" href="interface_i_r_c_client_session.html#6e304e45ddb942ead5b3c044a2b09e0b">IRCClientSession</a>
<li>port
: <a class="el" href="interface_i_r_c_client_session.html#f4d8a5d0747ecb6ed2f55f282582e8cf">IRCClientSession</a>
<li>realname
: <a class="el" href="interface_i_r_c_client_session.html#c124ffbdf87a785981c3e330f5a90088">IRCClientSession</a>
<li>server
: <a class="el" href="interface_i_r_c_client_session.html#cb1376cfad37cc503c21fa1235f39fa0">IRCClientSession</a>
<li>session
: <a class="el" href="interface_i_r_c_client_session.html#7f3f3efa9e35c82bc92d89b2f264ca88">IRCClientSession</a>
, <a class="el" href="interface_i_r_c_client_channel.html#1edd5edd8ec30f8763a8ad703e0bf0b1">IRCClientChannel</a>
<li>topic
: <a class="el" href="interface_i_r_c_client_channel.html#eb5124389861d676b3332cca7c8dc000">IRCClientChannel</a>
<li>username
: <a class="el" href="interface_i_r_c_client_session.html#281dfe78f639e87899d3aff71983484e">IRCClientSession</a>
<li>version
: <a class="el" href="interface_i_r_c_client_session.html#6d2142efde508caf40c8b86e7dd1756c">IRCClientSession</a>
</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,38 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: Hierarchical Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li class="current"><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Class Hierarchy</h1>This inheritance list is sorted roughly, but not completely, alphabetically:<ul>
<li><b>NSObject</b><ul>
<li><a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a>
<li><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a>
</ul>
<li><a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html">NSObject(IRCClientChannelDelegate)</a>
<li><a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html">NSObject(IRCClientSessionDelegate)</a>
</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,59 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClient - a Cocoa IRC Framework to create IRC clients</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li class="current"><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>IRCClient - a Cocoa IRC Framework to create IRC clients</h1>
<p>
<h3 align="center">1.0 </h3><h2><a class="anchor" name="intro_sec">
Introduction</a></h2>
IRCClient is a Cocoa Framework that uses the excellent libircclient library written by Georgy Yunaev.<h2><a class="anchor" name="usage">
Basic Usage</a></h2>
To use this framework, you will need to write an <a class="el" href="protocol_i_r_c_client_session_delegate-p.html">IRCClientSessionDelegate</a> to handle all of the events generated by the server, and an <a class="el" href="protocol_i_r_c_client_channel_delegate-p.html">IRCClientChannelDelegate</a> to handle all of the events generated by channels on that server.<p>
You then create an <a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> 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:<p>
<div class="fragment"><pre class="fragment"> <a class="code" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> *session = [[<a class="code" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> alloc] init];
MyIRCClientSessionDelegate *controller = [[MyIRCClientSessionDelegate alloc] init];
[session setDelegate:controller];
[controller setSession:session];
[session setServer:<span class="stringliteral">@"irc.dal.net"</span>];
[session setPort:<span class="stringliteral">@"6667"</span>];
[session setNickname:<span class="stringliteral">@"test"</span>];
[session setUsername:<span class="stringliteral">@"test"</span>];
[session setRealname:<span class="stringliteral">@"test"</span>];
[session connect];
[session run]; <span class="comment">//starts the thread</span>
</pre></div><h2><a class="anchor" name="author">
Author, copyright, support.</a></h2>
If you have any questions, bug reports, suggestions regarding libircclient or the IRCClient framework, please visit <a href="http://libircclient.sourceforge.net">http://libircclient.sourceforge.net</a><p>
<pre>
libircclient Copyright (C) 2004-2009 Georgy Yunaev <a href="mailto:gyunaev@ulduzsoft.com">gyunaev@ulduzsoft.com</a>
IRCClient Copyright (C) 2009 Nathan Ollerenshaw <a href="mailto:chrome@stupendous.net">chrome@stupendous.net</a></pre><p>
<pre> 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.</pre><p>
<pre> 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.
</pre> </div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,473 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClientChannel Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>IRCClientChannel Class Reference</h1><!-- doxytag: class="IRCClientChannel" --><!-- doxytag: inherits="NSObject" -->Represents a connected IRC Channel.
<a href="#_details">More...</a>
<p>
<code>#import &lt;<a class="el" href="_i_r_c_client_channel_8h-source.html">IRCClientChannel.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for IRCClientChannel:</div>
<div class="dynsection">
<p><center><img src="interface_i_r_c_client_channel.png" usemap="#IRCClientChannel_map" border="0" alt=""></center>
<map name="IRCClientChannel_map">
</map>
</div>
<p>
<a href="class_i_r_c_client_channel-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(id)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#01568915fb1763dbbe851598bf6111a3">initWithName:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#374315cc58c1e27ee74f15f6da4da699">part</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#6a3081eee9d9f576a554e451f38a85af">invite:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#5a30badfcab9de2b95a9546758355850">setTopic:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#2a7b182090c69541c9b1d5919da842de">setMode:params:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#4c130a850d288754d0bb80a50be50b3c">message:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#3dce7913593cee47fff8f6d052139e84">action:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#d3ff98549b3bf39c581d2c5b62d6de8d">notice:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#a11844c7c48140a83464b5da453411db">kick:reason:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_channel.html#e48470def47fee0442f84d6cbb61805f">ctcpRequest:</a></td></tr>
<tr><td colspan="2"><br><h2>Properties</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">id&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_channel.html#a24a320a08bb515f3ef5862d7bb1e6b2">delegate</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_channel.html#fe81a99a24e3bc66fc5f05742fb52096">name</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSStringEncoding&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_channel.html#b2c7c8cea97e6f0dfd50f5ac2576a328">encoding</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_channel.html#1edd5edd8ec30f8763a8ad703e0bf0b1">session</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_channel.html#eb5124389861d676b3332cca7c8dc000">topic</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_channel.html#b1d93e3a44e0f306b0bf9034c9d73ba3">modes</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSMutableArray *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_channel.html#d60403088ddc1434db87825e62c57d5c">names</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Represents a connected IRC Channel.
<p>
<a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> objects are created by the <a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> 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 <a class="el" href="protocol_i_r_c_client_channel_delegate-p.html">IRCClientChannelDelegate</a> interface. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="3dce7913593cee47fff8f6d052139e84"></a><!-- doxytag: member="IRCClientChannel::action:" ref="3dce7913593cee47fff8f6d052139e84" args="(NSString *action)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) action: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>action</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sends a public CTCP ACTION to the channel.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>action</em>&nbsp;</td><td>action to send to the channel. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="e48470def47fee0442f84d6cbb61805f"></a><!-- doxytag: member="IRCClientChannel::ctcpRequest:" ref="e48470def47fee0442f84d6cbb61805f" args="(NSString *request)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) ctcpRequest: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>request</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sends a CTCP request to the channel.<p>
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.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>request</em>&nbsp;</td><td>the string of the request, in CTCP format. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="01568915fb1763dbbe851598bf6111a3"></a><!-- doxytag: member="IRCClientChannel::initWithName:" ref="01568915fb1763dbbe851598bf6111a3" args="(NSString *aName)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (id) initWithName: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>aName</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
initWithName:<p>
Returns an initialised <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> with a given channel name. You are not expected to initialise your own <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> objects; if you wish to join a channel you should send a [<a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> join:key:] message to your <a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>aName</em>&nbsp;</td><td>Name of the channel. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="6a3081eee9d9f576a554e451f38a85af"></a><!-- doxytag: member="IRCClientChannel::invite:" ref="6a3081eee9d9f576a554e451f38a85af" args="(NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) invite: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Invites another IRC client to the channel.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the client to invite. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="a11844c7c48140a83464b5da453411db"></a><!-- doxytag: member="IRCClientChannel::kick:reason:" ref="a11844c7c48140a83464b5da453411db" args="(NSString *nick,[reason] NSString *reason)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) kick: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td>
</tr>
<tr>
<td class="paramkey">reason:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>reason</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Kicks someone from a channel.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the IRC client to kick from the channel. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>reason</em>&nbsp;</td><td>the message to give to the channel and the IRC client for the kick. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="4c130a850d288754d0bb80a50be50b3c"></a><!-- doxytag: member="IRCClientChannel::message:" ref="4c130a850d288754d0bb80a50be50b3c" args="(NSString *message)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) message: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>message</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sends a public PRIVMSG to the channel. If you try to send more than can fit on an IRC buffer, it will be truncated.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>the message to send to the channel. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="d3ff98549b3bf39c581d2c5b62d6de8d"></a><!-- doxytag: member="IRCClientChannel::notice:" ref="d3ff98549b3bf39c581d2c5b62d6de8d" args="(NSString *notice)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) notice: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>notice</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sends a public NOTICE to the channel.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>notice</em>&nbsp;</td><td>message to send to the channel. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="374315cc58c1e27ee74f15f6da4da699"></a><!-- doxytag: member="IRCClientChannel::part" ref="374315cc58c1e27ee74f15f6da4da699" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) part </td>
<td></td>
<td class="paramname"> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Parts the channel.
</div>
</div><p>
<a class="anchor" name="2a7b182090c69541c9b1d5919da842de"></a><!-- doxytag: member="IRCClientChannel::setMode:params:" ref="2a7b182090c69541c9b1d5919da842de" args="(NSString *mode,[params] NSString *params)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) setMode: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>mode</em></td>
</tr>
<tr>
<td class="paramkey">params:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>params</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the mode of the channel.<p>
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 <a class="el" href="protocol_i_r_c_client_channel_delegate-p.html">IRCClientChannelDelegate</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>the mode to set the channel to </td></tr>
<tr><td valign="top"></td><td valign="top"><em>params</em>&nbsp;</td><td>paramaters for the mode, if it requires parameters. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="5a30badfcab9de2b95a9546758355850"></a><!-- doxytag: member="IRCClientChannel::setTopic:" ref="5a30badfcab9de2b95a9546758355850" args="(NSString *aTopic)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) setTopic: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>aTopic</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the topic of the channel.<p>
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 <a class="el" href="protocol_i_r_c_client_channel_delegate-p.html">IRCClientChannelDelegate</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>aTopic</em>&nbsp;</td><td>the topic the client wishes to set for the channel. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Property Documentation</h2>
<a class="anchor" name="a24a320a08bb515f3ef5862d7bb1e6b2"></a><!-- doxytag: member="IRCClientChannel::delegate" ref="a24a320a08bb515f3ef5862d7bb1e6b2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (id) delegate<code> [read, write, assign]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Delegate to send events to
</div>
</div><p>
<a class="anchor" name="b2c7c8cea97e6f0dfd50f5ac2576a328"></a><!-- doxytag: member="IRCClientChannel::encoding" ref="b2c7c8cea97e6f0dfd50f5ac2576a328" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSStringEncoding) encoding<code> [read, write, assign]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Encoding used by this channel
</div>
</div><p>
<a class="anchor" name="b1d93e3a44e0f306b0bf9034c9d73ba3"></a><!-- doxytag: member="IRCClientChannel::modes" ref="b1d93e3a44e0f306b0bf9034c9d73ba3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) modes<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Mode of the channel
</div>
</div><p>
<a class="anchor" name="fe81a99a24e3bc66fc5f05742fb52096"></a><!-- doxytag: member="IRCClientChannel::name" ref="fe81a99a24e3bc66fc5f05742fb52096" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) name<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Name of the channel
</div>
</div><p>
<a class="anchor" name="d60403088ddc1434db87825e62c57d5c"></a><!-- doxytag: member="IRCClientChannel::names" ref="d60403088ddc1434db87825e62c57d5c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSMutableArray *) names<code> [read, assign]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
An array of nicknames stored as NSStrings that list the connected users for the channel
</div>
</div><p>
<a class="anchor" name="1edd5edd8ec30f8763a8ad703e0bf0b1"></a><!-- doxytag: member="IRCClientChannel::session" ref="1edd5edd8ec30f8763a8ad703e0bf0b1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (<a class="el" href="interface_i_r_c_client_session.html">IRCClientSession</a> *) session<code> [read, write, assign]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Associated <a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> object
</div>
</div><p>
<a class="anchor" name="eb5124389861d676b3332cca7c8dc000"></a><!-- doxytag: member="IRCClientChannel::topic" ref="eb5124389861d676b3332cca7c8dc000" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) topic<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Topic of the channel
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_i_r_c_client_channel_8h-source.html">IRCClientChannel.h</a><li>IRCClientChannel.m</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

View File

@ -0,0 +1,730 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: IRCClientSession Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>IRCClientSession Class Reference</h1><!-- doxytag: class="IRCClientSession" --><!-- doxytag: inherits="NSObject" -->Represents a connected IRC Session.
<a href="#_details">More...</a>
<p>
<code>#import &lt;<a class="el" href="_i_r_c_client_session_8h-source.html">IRCClientSession.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for IRCClientSession:</div>
<div class="dynsection">
<p><center><img src="interface_i_r_c_client_session.png" usemap="#IRCClientSession_map" border="0" alt=""></center>
<map name="IRCClientSession_map">
</map>
</div>
<p>
<a href="class_i_r_c_client_session-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#c9a0b7a41adeb92cf89fc53038ebc00b">connect</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#9cb82eac49784ccafbd6cf7dd262a766">disconnect</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(bool)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#2295d13bd62cbc7a0bd722953c3f4c64">isConnected</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#5ba88ff09ef13c00d8b7379b30c9eced">run</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#dcb54b817c20fa3c3beba65a944bca19">sendRawWithFormat:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#bfa66744f91a4408f40efaf752fe6071">quit:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#12ce6d4e08abe1ac26d0a1c0e9c5387e">join:key:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#77e26b8a7488ac2e8298fe01eb1f729c">list:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#869e09863a186b409d140c8f8161a93a">userMode:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#608235f250367bdb74c05b8caa404d11">nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#20ded6131f5bf067363a4701d2164907">whois:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#613d3215bf84eb7f99c088284321eb0d">message:to:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#c8c975193f7798f195d69b984aaa21fd">action:to:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#2657fa7a70ddb705819b8b176692e6a0">notice:to:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#6388c4f1f5cf3ffc14057984e29a4635">ctcpRequest:target:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(int)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_i_r_c_client_session.html#2cef231ee53c6ad6a5d9d96283084996">ctcpReply:target:</a></td></tr>
<tr><td colspan="2"><br><h2>Properties</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">id&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#ff1874c72e785b2097b9ef7ea8856557">delegate</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">irc_session_t *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#7f3f3efa9e35c82bc92d89b2f264ca88">session</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#6d2142efde508caf40c8b86e7dd1756c">version</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#cb1376cfad37cc503c21fa1235f39fa0">server</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#f4d8a5d0747ecb6ed2f55f282582e8cf">port</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#6e304e45ddb942ead5b3c044a2b09e0b">password</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#4f678f5ad868a7e3d739b1e9ad415249">nickname</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#281dfe78f639e87899d3aff71983484e">username</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSString *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#c124ffbdf87a785981c3e330f5a90088">realname</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSMutableDictionary *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#fd38f656f1f7b03495e26fe982bb9e2a">channels</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">NSStringEncoding&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_i_r_c_client_session.html#2b8b240d57a57acce3186768308c667c">encoding</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Represents a connected IRC Session.
<p>
<a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> 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.<p>
This thread then sends messages back to the main runloop to the IRC server delegate, or to the <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> delegate as required. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="c8c975193f7798f195d69b984aaa21fd"></a><!-- doxytag: member="IRCClientSession::action:to:" ref="c8c975193f7798f195d69b984aaa21fd" args="(NSString *action,[to] NSString *target)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) action: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>action</em></td>
</tr>
<tr>
<td class="paramkey">to:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>target</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
send a CTCP ACTION to another IRC client<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>action</em>&nbsp;</td><td>the action message to send </td></tr>
<tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the nickname of the irc client to send the message to. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="c9a0b7a41adeb92cf89fc53038ebc00b"></a><!-- doxytag: member="IRCClientSession::connect" ref="c9a0b7a41adeb92cf89fc53038ebc00b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) connect </td>
<td></td>
<td class="paramname"> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Connect to the IRC server.<p>
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.<p>
Look at the libircclient documentation for the different return codes.
</div>
</div><p>
<a class="anchor" name="2cef231ee53c6ad6a5d9d96283084996"></a><!-- doxytag: member="IRCClientSession::ctcpReply:target:" ref="2cef231ee53c6ad6a5d9d96283084996" args="(NSString *reply,[target] NSString *target)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) ctcpReply: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>reply</em></td>
</tr>
<tr>
<td class="paramkey">target:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>target</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
send a CTCP reply to another IRC client<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>reply</em>&nbsp;</td><td>the CTCP reply string to send </td></tr>
<tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the nickname of the IRC client to send the reply to. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="6388c4f1f5cf3ffc14057984e29a4635"></a><!-- doxytag: member="IRCClientSession::ctcpRequest:target:" ref="6388c4f1f5cf3ffc14057984e29a4635" args="(NSString *request,[target] NSString *target)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) ctcpRequest: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>request</em></td>
</tr>
<tr>
<td class="paramkey">target:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>target</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
send a CTCP request to another IRC client<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>request</em>&nbsp;</td><td>the CTCP request string to send </td></tr>
<tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the nickname of the IRC client to send the request to. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="9cb82eac49784ccafbd6cf7dd262a766"></a><!-- doxytag: member="IRCClientSession::disconnect" ref="9cb82eac49784ccafbd6cf7dd262a766" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) disconnect </td>
<td></td>
<td class="paramname"> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Disconnect from the IRC server.<p>
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.
</div>
</div><p>
<a class="anchor" name="2295d13bd62cbc7a0bd722953c3f4c64"></a><!-- doxytag: member="IRCClientSession::isConnected" ref="2295d13bd62cbc7a0bd722953c3f4c64" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (bool) isConnected </td>
<td></td>
<td class="paramname"> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
returns YES if the server is currently connected successfully, and NO if it is not.
</div>
</div><p>
<a class="anchor" name="12ce6d4e08abe1ac26d0a1c0e9c5387e"></a><!-- doxytag: member="IRCClientSession::join:key:" ref="12ce6d4e08abe1ac26d0a1c0e9c5387e" args="(NSString *channel,[key] NSString *key)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) join: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>channel</em></td>
</tr>
<tr>
<td class="paramkey">key:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>key</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Joins a channel with a given name and key<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>channel</em>&nbsp;</td><td>the channel to join </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>they key for the channel (may be nil) </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="77e26b8a7488ac2e8298fe01eb1f729c"></a><!-- doxytag: member="IRCClientSession::list:" ref="77e26b8a7488ac2e8298fe01eb1f729c" args="(NSString *channel)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) list: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>channel</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
lists channels on the IRC server.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>channel</em>&nbsp;</td><td>a channel name or string to pass to the LIST command. Implementation specific. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="613d3215bf84eb7f99c088284321eb0d"></a><!-- doxytag: member="IRCClientSession::message:to:" ref="613d3215bf84eb7f99c088284321eb0d" args="(NSString *message,[to] NSString *target)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) message: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>message</em></td>
</tr>
<tr>
<td class="paramkey">to:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>target</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
send a PRIVMSG to another IRC client<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>message to send </td></tr>
<tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the other IRC client to send the message to. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="608235f250367bdb74c05b8caa404d11"></a><!-- doxytag: member="IRCClientSession::nick:" ref="608235f250367bdb74c05b8caa404d11" args="(NSString *newnick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) nick: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>newnick</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
sets the IRC client nickname. On success, an onNick event will be sent to the delegate<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>newnick</em>&nbsp;</td><td>new nickname to set. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="2657fa7a70ddb705819b8b176692e6a0"></a><!-- doxytag: member="IRCClientSession::notice:to:" ref="2657fa7a70ddb705819b8b176692e6a0" args="(NSString *notice,[to] NSString *target)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) notice: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>notice</em></td>
</tr>
<tr>
<td class="paramkey">to:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>target</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
send a NOTICE to another IRC client<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>notice</em>&nbsp;</td><td>the message text to send </td></tr>
<tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the nickname of the irc client to send the notice to. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="bfa66744f91a4408f40efaf752fe6071"></a><!-- doxytag: member="IRCClientSession::quit:" ref="bfa66744f91a4408f40efaf752fe6071" args="(NSString *reason)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) quit: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>reason</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
quits the IRC server with the given reason. On success, an onQuit event will be sent to the <a class="el" href="protocol_i_r_c_client_session_delegate-p.html">IRCClientSessionDelegate</a> with the nickname of the IRC client.<p>
The format is a standard NSString format string, followed by optional arguments.
</div>
</div><p>
<a class="anchor" name="5ba88ff09ef13c00d8b7379b30c9eced"></a><!-- doxytag: member="IRCClientSession::run" ref="5ba88ff09ef13c00d8b7379b30c9eced" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) run </td>
<td></td>
<td class="paramname"> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
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.
</div>
</div><p>
<a class="anchor" name="dcb54b817c20fa3c3beba65a944bca19"></a><!-- doxytag: member="IRCClientSession::sendRawWithFormat:" ref="dcb54b817c20fa3c3beba65a944bca19" args="(NSString *format,[,]...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) sendRawWithFormat: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>format</em></td>
</tr>
<tr>
<td class="paramkey">,</td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"> <em>...</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sends a raw message to the IRC server. Please consult rfc1459 for the format of IRC commands.
</div>
</div><p>
<a class="anchor" name="869e09863a186b409d140c8f8161a93a"></a><!-- doxytag: member="IRCClientSession::userMode:" ref="869e09863a186b409d140c8f8161a93a" args="(NSString *mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) userMode: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>mode</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
sets the user mode for the IRC client<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>string to set </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="20ded6131f5bf067363a4701d2164907"></a><!-- doxytag: member="IRCClientSession::whois:" ref="20ded6131f5bf067363a4701d2164907" args="(NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (int) whois: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
sends a WHOIS request to the IRC server<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>nickname of the irc client to whois. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Property Documentation</h2>
<a class="anchor" name="fd38f656f1f7b03495e26fe982bb9e2a"></a><!-- doxytag: member="IRCClientSession::channels" ref="fd38f656f1f7b03495e26fe982bb9e2a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSMutableDictionary *) channels<code> [read, assign]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
An NSMutableDictionary of channels that the client is currently connected to.<p>
You should not modify this.
</div>
</div><p>
<a class="anchor" name="ff1874c72e785b2097b9ef7ea8856557"></a><!-- doxytag: member="IRCClientSession::delegate" ref="ff1874c72e785b2097b9ef7ea8856557" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (id) delegate<code> [read, write, assign]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
delegate to send events to.
</div>
</div><p>
<a class="anchor" name="2b8b240d57a57acce3186768308c667c"></a><!-- doxytag: member="IRCClientSession::encoding" ref="2b8b240d57a57acce3186768308c667c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSStringEncoding) encoding<code> [read, write, assign]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The default text encoding for messages on this server.<p>
This affects messages received via PRIVMSG and NOTICE, and TOPIC in a channel. You may change this at any time.
</div>
</div><p>
<a class="anchor" name="4f678f5ad868a7e3d739b1e9ad415249"></a><!-- doxytag: member="IRCClientSession::nickname" ref="4f678f5ad868a7e3d739b1e9ad415249" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) nickname<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
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.
</div>
</div><p>
<a class="anchor" name="6e304e45ddb942ead5b3c044a2b09e0b"></a><!-- doxytag: member="IRCClientSession::password" ref="6e304e45ddb942ead5b3c044a2b09e0b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) password<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Server password to provide on connect (may be left empty or nil)
</div>
</div><p>
<a class="anchor" name="f4d8a5d0747ecb6ed2f55f282582e8cf"></a><!-- doxytag: member="IRCClientSession::port" ref="f4d8a5d0747ecb6ed2f55f282582e8cf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) port<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
IRC port to connect to
</div>
</div><p>
<a class="anchor" name="c124ffbdf87a785981c3e330f5a90088"></a><!-- doxytag: member="IRCClientSession::realname" ref="c124ffbdf87a785981c3e330f5a90088" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) realname<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Realname of the connected client.<p>
Setting this after connection does nothing.
</div>
</div><p>
<a class="anchor" name="cb1376cfad37cc503c21fa1235f39fa0"></a><!-- doxytag: member="IRCClientSession::server" ref="cb1376cfad37cc503c21fa1235f39fa0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) server<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
IRC server to connect to
</div>
</div><p>
<a class="anchor" name="7f3f3efa9e35c82bc92d89b2f264ca88"></a><!-- doxytag: member="IRCClientSession::session" ref="7f3f3efa9e35c82bc92d89b2f264ca88" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (irc_session_t *) session<code> [read, write, assign]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The underlying libircclient handle
</div>
</div><p>
<a class="anchor" name="281dfe78f639e87899d3aff71983484e"></a><!-- doxytag: member="IRCClientSession::username" ref="281dfe78f639e87899d3aff71983484e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) username<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Username of the connected client. Also known as the ident.<p>
Setting this after connection does nothing.
</div>
</div><p>
<a class="anchor" name="6d2142efde508caf40c8b86e7dd1756c"></a><!-- doxytag: member="IRCClientSession::version" ref="6d2142efde508caf40c8b86e7dd1756c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (NSString *) version<code> [read, write, copy]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The version string for the client to send back on CTCP VERSION requests
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_i_r_c_client_session_8h-source.html">IRCClientSession.h</a><li>IRCClientSession.m</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

View File

@ -0,0 +1,357 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: NSObject(IRCClientChannelDelegate) Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>NSObject(IRCClientChannelDelegate) Class Reference</h1><!-- doxytag: class="NSObject(IRCClientChannelDelegate)" -->Receives delegate messages from an <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a>.
<a href="#_details">More...</a>
<p>
<code>#import &lt;<a class="el" href="_i_r_c_client_channel_delegate_8h-source.html">IRCClientChannelDelegate.h</a>&gt;</code>
<p>
<p>
<a href="class_n_s_object_07_i_r_c_client_channel_delegate_08-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#d3e8a2612f8b6e2d65b407a0dffcd68b">onJoin:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#5e606c4445b697158029bcf99949eb40">onPart:reason:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#96106caa4eb6dc9f36a4a2ad7536de9a">onMode:params:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#a1672182357b1768c817238a23564b7e">onTopic:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#681261027838b019ea101a75c836a487">onKick:reason:byNick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#2414fbf1731d8b70a79bc071e25d8d33">onPrivmsg:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#6d73e8a2cb435d1f28d954104c0bd3c1">onNotice:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_channel_delegate_08.html#79d5aa388db46960369ccbd250b8a5b5">onAction:nick:</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Receives delegate messages from an <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a>.
<p>
Each <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> object needs a delegate. Delegate methods are called for each event that occurs on an IRC channel that the client is current on.<p>
Note that for any given parameter, it may be optional, in which case a nil object may be supplied instead of the given parameter. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="79d5aa388db46960369ccbd250b8a5b5"></a><!-- doxytag: member="NSObject(IRCClientChannelDelegate)::onAction:nick:" ref="79d5aa388db46960369ccbd250b8a5b5" args="(NSString *action,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onAction: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>action</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
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.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>action</em>&nbsp;</td><td>the action message sent to the channel. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the IRC client that sent the message. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="d3e8a2612f8b6e2d65b407a0dffcd68b"></a><!-- doxytag: member="NSObject(IRCClientChannelDelegate)::onJoin:" ref="d3e8a2612f8b6e2d65b407a0dffcd68b" args="(NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onJoin: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
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.<p>
You should also expect to see this event when the client first joins a channel, with a parameter of the client's nickname.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>The nickname of the user that joined the channel. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="681261027838b019ea101a75c836a487"></a><!-- doxytag: member="NSObject(IRCClientChannelDelegate)::onKick:reason:byNick:" ref="681261027838b019ea101a75c836a487" args="(NSString *nick,[reason] NSString *reason,[byNick] NSString *byNick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onKick: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td>
</tr>
<tr>
<td class="paramkey">reason:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>reason</em></td>
</tr>
<tr>
<td class="paramkey">byNick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>byNick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Received when an IRC client is kicked from a channel.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>nickname of the client that was kicked </td></tr>
<tr><td valign="top"></td><td valign="top"><em>reason</em>&nbsp;</td><td>reason message given for the kick </td></tr>
<tr><td valign="top"></td><td valign="top"><em>byNick</em>&nbsp;</td><td>nickname of the client that performed the kick command </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="96106caa4eb6dc9f36a4a2ad7536de9a"></a><!-- doxytag: member="NSObject(IRCClientChannelDelegate)::onMode:params:nick:" ref="96106caa4eb6dc9f36a4a2ad7536de9a" args="(NSString *mode,[params] NSString *params,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onMode: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>mode</em></td>
</tr>
<tr>
<td class="paramkey">params:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>params</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Received when an IRC client changes the channel mode. What modes are available for a given channel is an implementation detail for each server.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>the new channel mode. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>params</em>&nbsp;</td><td>any parameters with the mode (such as channel key). </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the IRC client that changed the mode. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="6d73e8a2cb435d1f28d954104c0bd3c1"></a><!-- doxytag: member="NSObject(IRCClientChannelDelegate)::onNotice:nick:" ref="6d73e8a2cb435d1f28d954104c0bd3c1" args="(NSString *notice,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onNotice: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>notice</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
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.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>notice</em>&nbsp;</td><td>the notice sent to the channel. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the IRC client that sent the notice. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="5e606c4445b697158029bcf99949eb40"></a><!-- doxytag: member="NSObject(IRCClientChannelDelegate)::onPart:reason:" ref="5e606c4445b697158029bcf99949eb40" args="(NSString *nick,[reason] NSString *reason)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onPart: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td>
</tr>
<tr>
<td class="paramkey">reason:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>reason</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
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.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>(required) The nickname of the user that left the channel. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>reason</em>&nbsp;</td><td>(optional) The reason, if any, that the user gave for leaving. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="2414fbf1731d8b70a79bc071e25d8d33"></a><!-- doxytag: member="NSObject(IRCClientChannelDelegate)::onPrivmsg:nick:" ref="2414fbf1731d8b70a79bc071e25d8d33" args="(NSString *message,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onPrivmsg: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>message</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
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.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>the message sent to the channel. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the IRC client that sent the message. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="a1672182357b1768c817238a23564b7e"></a><!-- doxytag: member="NSObject(IRCClientChannelDelegate)::onTopic:nick:" ref="a1672182357b1768c817238a23564b7e" args="(NSString *aTopic,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onTopic: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>aTopic</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Received when the topic is changed for the channel.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>aTopic</em>&nbsp;</td><td>The new topic of the channel. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>Nickname of the IRC client that changed the topic. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_i_r_c_client_channel_delegate_8h-source.html">IRCClientChannelDelegate.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,528 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>IRCClient: NSObject(IRCClientSessionDelegate) Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>NSObject(IRCClientSessionDelegate) Class Reference</h1><!-- doxytag: class="NSObject(IRCClientSessionDelegate)" -->Receives delegate messages from an <a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a>.
<a href="#_details">More...</a>
<p>
<code>#import &lt;<a class="el" href="_i_r_c_client_session_delegate_8h-source.html">IRCClientSessionDelegate.h</a>&gt;</code>
<p>
<p>
<a href="class_n_s_object_07_i_r_c_client_session_delegate_08-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#ba6db2dd75596bf702c62efc9e14eb0f">onConnect</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#dae74e3cd13af45e6b94a1cc0638493b">onNick:oldNick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#31660c57ebf15aca5a1d5706a384d758">onQuit:reason:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#08bfc81348865b7501c75d9ca8fe32cb">onJoinChannel:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#9f6346c5e3452c528bb74be8d7ecd4dc">onMode:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#4e992d543d6241fa70b600b541c84bf5">onPrivmsg:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#76e1eaab848008d9d310495358672369">onNotice:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#44f7535a12086d212300b71c36ee3f2a">onInvite:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#31937b6b464b76943f1beab9226fdc57">onCtcpRequest:type:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#a2e3129f7210795c4c300fc06e22d146">onCtcpReply:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#53420eee82af0529518a4780850e9e66">onAction:nick:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#05bda6cfa9d696b1af1ab7da5f8ca271">onUnknownEvent:origin:params:</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">(void)&nbsp;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_n_s_object_07_i_r_c_client_session_delegate_08.html#16bc977438e490a4bb8e50769c4c46dc">onNumericEvent:origin:params:</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Receives delegate messages from an <a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a>.
<p>
Each <a class="el" href="interface_i_r_c_client_session.html" title="Represents a connected IRC Session.">IRCClientSession</a> object needs a single delegate. Methods are called for each event that occurs on an IRC server that the client is connected to.<p>
Note that for any given parameter, it may be optional, in which case a nil object may be supplied instead of the given parameter. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="53420eee82af0529518a4780850e9e66"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onAction:nick:" ref="53420eee82af0529518a4780850e9e66" args="(NSData *action,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onAction: </td>
<td></td>
<td class="paramtype">(NSData *)&nbsp;</td>
<td class="paramname"> <em>action</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
A private CTCP ACTION was sent to the IRC client.<p>
CTCP ACTION is not limited to channels; it may also be sent directly to other users.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>action</em>&nbsp;</td><td>the action message text. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the client that sent the action. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="ba6db2dd75596bf702c62efc9e14eb0f"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onConnect" ref="ba6db2dd75596bf702c62efc9e14eb0f" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onConnect </td>
<td></td>
<td class="paramname"> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The client has successfully connected to the IRC server.
</div>
</div><p>
<a class="anchor" name="a2e3129f7210795c4c300fc06e22d146"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onCtcpReply:nick:" ref="a2e3129f7210795c4c300fc06e22d146" args="(NSData *reply,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onCtcpReply: </td>
<td></td>
<td class="paramtype">(NSData *)&nbsp;</td>
<td class="paramname"> <em>reply</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
A private CTCP reply was sent to the IRC client.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>reply</em>&nbsp;</td><td>an NSData containing the raw C string of the reply. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the user that sent the reply. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="31937b6b464b76943f1beab9226fdc57"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onCtcpRequest:type:nick:" ref="31937b6b464b76943f1beab9226fdc57" args="(NSString *request,[type] NSString *type,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onCtcpRequest: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>request</em></td>
</tr>
<tr>
<td class="paramkey">type:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>type</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
A private CTCP request was sent to the IRC client.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>request</em>&nbsp;</td><td>the CTCP request string (after the type) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>the CTCP request type </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the user that sent the request. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="44f7535a12086d212300b71c36ee3f2a"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onInvite:nick:" ref="44f7535a12086d212300b71c36ee3f2a" args="(NSString *channel,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onInvite: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>channel</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The IRC client has been invited to a channel.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>channel</em>&nbsp;</td><td>the channel for the invitation. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the user that sent the invitation. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="08bfc81348865b7501c75d9ca8fe32cb"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onJoinChannel:" ref="08bfc81348865b7501c75d9ca8fe32cb" args="(IRCClientChannel *channel)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onJoinChannel: </td>
<td></td>
<td class="paramtype">(<a class="el" href="interface_i_r_c_client_channel.html">IRCClientChannel</a> *)&nbsp;</td>
<td class="paramname"> <em>channel</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The IRC client has joined (connected) successfully to a new channel. This event creates an <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> object, which you are expected to asign a delegate to, to handle events from the channel.<p>
For example, on receipt of this message, a graphical IRC client would most likely open a new window, create an <a class="el" href="protocol_i_r_c_client_channel_delegate-p.html">IRCClientChannelDelegate</a> 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 <a class="el" href="protocol_i_r_c_client_channel_delegate-p.html">IRCClientChannelDelegate</a> are sent to the window.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>channel</em>&nbsp;</td><td>the <a class="el" href="interface_i_r_c_client_channel.html" title="Represents a connected IRC Channel.">IRCClientChannel</a> object for the newly joined channel. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="9f6346c5e3452c528bb74be8d7ecd4dc"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onMode:" ref="9f6346c5e3452c528bb74be8d7ecd4dc" args="(NSString *mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onMode: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>mode</em> </td>
<td>&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The client has changed it's user mode.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>the new mode. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="dae74e3cd13af45e6b94a1cc0638493b"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onNick:oldNick:" ref="dae74e3cd13af45e6b94a1cc0638493b" args="(NSString *nick,[oldNick] NSString *oldNick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onNick: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td>
</tr>
<tr>
<td class="paramkey">oldNick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>oldNick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
An IRC client on a channel that this client is connected to has changed nickname, or this IRC client has changed nicknames.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the new nickname </td></tr>
<tr><td valign="top"></td><td valign="top"><em>oldNick</em>&nbsp;</td><td>the old nickname </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="76e1eaab848008d9d310495358672369"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onNotice:nick:" ref="76e1eaab848008d9d310495358672369" args="(NSData *notice,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onNotice: </td>
<td></td>
<td class="paramtype">(NSData *)&nbsp;</td>
<td class="paramname"> <em>notice</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The client has received a private NOTICE from another client.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>notice</em>&nbsp;</td><td>the text of the message </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the other IRC client that sent the message. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="16bc977438e490a4bb8e50769c4c46dc"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onNumericEvent:origin:params:" ref="16bc977438e490a4bb8e50769c4c46dc" args="(NSUInteger event,[origin] NSString *origin,[params] NSArray *params)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onNumericEvent: </td>
<td></td>
<td class="paramtype">(NSUInteger)&nbsp;</td>
<td class="paramname"> <em>event</em></td>
</tr>
<tr>
<td class="paramkey">origin:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>origin</em></td>
</tr>
<tr>
<td class="paramkey">params:</td>
<td></td>
<td class="paramtype">(NSArray *)&nbsp;</td>
<td class="paramname"> <em>params</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
An unhandled numeric was received from the IRC server<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>event</em>&nbsp;</td><td>the unknown event number </td></tr>
<tr><td valign="top"></td><td valign="top"><em>origin</em>&nbsp;</td><td>the sender of the event </td></tr>
<tr><td valign="top"></td><td valign="top"><em>params</em>&nbsp;</td><td>an NSArray of NSData objects that are the raw C strings of the event. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="4e992d543d6241fa70b600b541c84bf5"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onPrivmsg:nick:" ref="4e992d543d6241fa70b600b541c84bf5" args="(NSData *message,[nick] NSString *nick)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onPrivmsg: </td>
<td></td>
<td class="paramtype">(NSData *)&nbsp;</td>
<td class="paramname"> <em>message</em></td>
</tr>
<tr>
<td class="paramkey">nick:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The client has received a private PRIVMSG from another IRC client.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>the text of the message </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the other IRC Client that sent the message. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="31660c57ebf15aca5a1d5706a384d758"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onQuit:reason:" ref="31660c57ebf15aca5a1d5706a384d758" args="(NSString *nick,[reason] NSString *reason)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onQuit: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>nick</em></td>
</tr>
<tr>
<td class="paramkey">reason:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>reason</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
An IRC client on a channel that this client is connected to has quit IRC.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nick</em>&nbsp;</td><td>the nickname of the client that quit. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>reason</em>&nbsp;</td><td>(optional) the quit message, if any. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="05bda6cfa9d696b1af1ab7da5f8ca271"></a><!-- doxytag: member="NSObject(IRCClientSessionDelegate)::onUnknownEvent:origin:params:" ref="05bda6cfa9d696b1af1ab7da5f8ca271" args="(NSString *event,[origin] NSString *origin,[params] NSArray *params)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (void) onUnknownEvent: </td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>event</em></td>
</tr>
<tr>
<td class="paramkey">origin:</td>
<td></td>
<td class="paramtype">(NSString *)&nbsp;</td>
<td class="paramname"> <em>origin</em></td>
</tr>
<tr>
<td class="paramkey">params:</td>
<td></td>
<td class="paramtype">(NSArray *)&nbsp;</td>
<td class="paramname"> <em>params</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
An unhandled event was received from the IRC server.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>event</em>&nbsp;</td><td>the unknown event name </td></tr>
<tr><td valign="top"></td><td valign="top"><em>origin</em>&nbsp;</td><td>the sender of the event </td></tr>
<tr><td valign="top"></td><td valign="top"><em>params</em>&nbsp;</td><td>an NSArray of NSData objects that are the raw C strings of the event. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_i_r_c_client_session_delegate_8h-source.html">IRCClientSessionDelegate.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 10 18:10:37 2009 for IRCClient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,102 @@
/* 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;
}

5939
libircclient/configure vendored Executable file

File diff suppressed because it is too large Load Diff

115
libircclient/configure.in Normal file
View File

@ -0,0 +1,115 @@
# -*- 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

156
libircclient/doc/Makefile Normal file
View File

@ -0,0 +1,156 @@
# 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 <target>' where <target> 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."

296
libircclient/doc/conf.py Normal file
View File

@ -0,0 +1,296 @@
# -*- 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
# "<project> v<release> 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 <link> 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'

View File

@ -0,0 +1,52 @@
.. 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`

190
libircclient/doc/make.bat Normal file
View File

@ -0,0 +1,190 @@
@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 ^<target^>` where ^<target^> 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

View File

@ -0,0 +1,173 @@
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`.

View File

@ -0,0 +1,126 @@
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.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,365 @@
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.

View File

@ -0,0 +1,134 @@
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 theyre 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,
youll 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.

View File

@ -0,0 +1,68 @@
GNU LESSER GENERAL PUBLIC LICENSE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
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.

View File

@ -0,0 +1,58 @@
=====================
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 <faq_epoll>`.
- 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.

View File

@ -0,0 +1,608 @@
=====================
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 <irc_callbacks_t>`. 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 <irc_session_t>` 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 <faq_epoll>` 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 <irc_dcc_callback_t>`:
.. 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 <irc_dcc_callback_t>`.
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.

View File

@ -0,0 +1,40 @@
CC = @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 $@ $<

View File

@ -0,0 +1,213 @@
/*
* 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 <map>
#include <string>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#if !defined (_WIN32)
#include <unistd.h>
#endif
#include "libircclient.h"
/*
* We store data in IRC session context.
*/
typedef struct
{
char * channel;
char * nick;
std::map <std::string, unsigned int> 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]> <nick> <channel>\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;
}

View File

@ -0,0 +1,164 @@
/*
* 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 <string>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#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 <server> <nick> <channel>\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;
}

View File

@ -0,0 +1,191 @@
/*
* 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 <map>
#include <string>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <dirent.h>
#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 <server> <nick> <channel>\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;
}

View File

@ -0,0 +1,343 @@
/*
* 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 <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#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 <server> <nick> <channel>\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;
}

View File

@ -0,0 +1,213 @@
/*
* 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 <stdio.h>
#include <errno.h>
#include <string.h>
#if defined (_WIN32)
#include <windows.h>
#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 <unistd.h>
#include <pthread.h>
#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 <server> <nick> <channel>\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;
}

View File

@ -0,0 +1,235 @@
/*
* 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_ERRORS_H
#define INCLUDE_IRC_ERRORS_H
#ifndef IN_INCLUDE_LIBIRC_H
#error This file should not be included directly, include just libircclient.h
#endif
/*! brief No error
* \ingroup errorcodes
*/
#define LIBIRC_ERR_OK 0
/*! \brief Invalid argument
*
* An invalid value was given for one of the arguments to a function.
* For example, supplying the NULL value for \a channel argument of
* irc_cmd_join() produces LIBIRC_ERR_INVAL error. You should fix the code.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_INVAL 1
/*! \brief Could not resolve host.
*
* The host name supplied for irc_connect() function could not be resolved
* into valid IP address. Usually means that host name is invalid.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_RESOLV 2
/*! \brief Could not create socket.
*
* The new socket could not be created or made non-blocking. Usually means
* that the server is out of resources, or (rarely :) a bug in libircclient.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_SOCKET 3
/*! \brief Could not connect.
*
* 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.
*
* \sa irc_run irc_connect
* \ingroup errorcodes
*/
#define LIBIRC_ERR_CONNECT 4
/*! \brief Connection closed by remote peer.
*
* The IRC connection was closed by the IRC server (which could mean that an
* IRC operator just have banned you from the server :)), or the DCC connection
* was closed by remote peer - for example, the other side just quits his mIrc.
* Usually it is not an error.
*
* \sa irc_run irc_connect irc_dcc_callback_t
* \ingroup errorcodes
*/
#define LIBIRC_ERR_CLOSED 5
/*! \brief Out of memory
*
* There are two possible reasons for this error. First is that memory could
* not be allocated for libircclient use, and this error usually is fatal.
* Second reason is that the command queue (which keeps command ready to be
* sent to the IRC server) is full, and could not accept more commands yet.
* In this case you should just wait, and repeat the command later.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_NOMEM 6
/*! \brief Could not accept new connection
*
* 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.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_ACCEPT 7
/*! \brief Could not send this
*
* A \a filename supplied to irc_dcc_sendfile() could not be sent. Either is
* is not a file (a directory or a socket, for example), or it is not readable. *
*
* \sa LIBIRC_ERR_OPENFILE
* \ingroup errorcodes
*/
#define LIBIRC_ERR_NODCCSEND 9
/*! \brief Could not read DCC file or socket
*
* 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.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_READ 10
/*! \brief Could not write DCC file or socket
*
* 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.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_WRITE 11
/*! \brief Invalid state
*
* The function is called when it is not allowed to be called. For example,
* irc_cmd_join() was called before the connection to IRC server succeed, and
* ::event_connect is called.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_STATE 12
/*! \brief Operation timed out
*
* 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 60 seconds. If the DCC request was not connected, accepted
* or declined during this time, it will be terminated with this error.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_TIMEOUT 13
/*! \brief Could not open file for DCC send
*
* The file specified in irc_dcc_sendfile() could not be opened.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_OPENFILE 14
/*! \brief IRC server connection terminated
*
* The connection to the IRC server was terminated - possibly, by network
* error. Try to irc_connect() again.
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_TERMINATED 15
/*! \brief IPv6 not supported
*
* The function which requires IPv6 support was called, but the IPv6 support was not compiled
* into the application
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_NOIPV6 16
/*! \brief SSL not supported
*
* The SSL connection was required but the library was not compiled with SSL support
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_SSL_NOT_SUPPORTED 17
/*! \brief SSL initialization failed
*
* The SSL connection was required but the library was not compiled with SSL support
*
* \ingroup errorcodes
*/
#define LIBIRC_ERR_SSL_INIT_FAILED 18
/*! \brief SSL connection failed
*
* 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.
* \ingroup errorcodes
*/
#define LIBIRC_ERR_CONNECT_SSL_FAILED 19
/*! \brief SSL certificate verify failed
*
* The server is using the self-signed certificate. Use LIBIRC_OPTION_SSL_NO_VERIFY option to connect to it.
* \ingroup errorcodes
*/
#define LIBIRC_ERR_SSL_CERT_VERIFY_FAILED 20
// Internal max error value count.
// If you added more errors, add them to errors.c too!
#define LIBIRC_ERR_MAX 21
#endif /* INCLUDE_IRC_ERRORS_H */

View File

@ -0,0 +1,389 @@
/*
* 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_EVENTS_H
#define INCLUDE_IRC_EVENTS_H
#ifndef IN_INCLUDE_LIBIRC_H
#error This file should not be included directly, include just libircclient.h
#endif
/*!
* \fn typedef void (*irc_event_callback_t) (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count)
* \brief A most common event callback
*
* \param session the session, which generates an event
* \param event the text name of the event. Useful in case you use a single
* event handler for several events simultaneously.
* \param origin the originator of the event. See the note below.
* \param params a list of event params. Depending on the event nature, it
* could have zero or more params. The actual number of params
* is specified in count. None of the params can be NULL, but
* 'params' pointer itself could be NULL for some events.
* \param count the total number of params supplied.
*
* Every event generates a callback. This callback is generated by most events.
* Depending on the event nature, it can provide zero or more params. For each
* event, the number of provided params is fixed, and their meaning is
* described.
*
* Every event has origin, though the \a origin variable may be NULL, which
* means that event origin is unknown. The origin usually looks like
* nick!host\@ircserver, i.e. like tim!home\@irc.krasnogorsk.ru. 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
* explicitly, by calling irc_target_get_nick(), or implicitly for all the
* events - by setting the #LIBIRC_OPTION_STRIPNICKS option with irc_option_set().
*
* \ingroup events
*/
typedef void (*irc_event_callback_t) (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count);
/*!
* \fn typedef void (*irc_eventcode_callback_t) (irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count)
* \brief A numeric event callback
*
* \param session the session, which generates an event
* \param event the numeric code of the event. Useful in case you use a
* single event handler for several events simultaneously.
* \param origin the originator of the event. See the note below.
* \param params a list of event params. Depending on the event nature, it
* could have zero or more params. The actual number of params
* is specified in count. None of the params can be NULL, but
* 'params' pointer itself could be NULL for some events.
* \param count the total number of params supplied.
*
* Most times in reply to your actions the IRC server generates numeric
* callbacks. Most of them are error codes, and some of them mark list start
* and list stop markers. Every code has its own set of params; for details
* you can either experiment, or read RFC 1459.
*
* Every event has origin, though the \a origin variable may be NULL, which
* means that event origin is unknown. The origin usually looks like
* nick!host\@ircserver, i.e. like tim!home\@irc.krasnogorsk.ru. 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
* explicitly, by calling irc_target_get_nick(), or implicitly for all the
* events - by setting the #LIBIRC_OPTION_STRIPNICKS option with irc_option_set().
*
* \ingroup events
*/
typedef void (*irc_eventcode_callback_t) (irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count);
/*!
* \fn typedef void (*irc_event_dcc_chat_t) (irc_session_t * session, const char * nick, const char * addr, irc_dcc_t dccid)
* \brief A remote DCC CHAT request callback
*
* \param session the session, which generates an event
* \param nick the person who requested DCC CHAT with you.
* \param addr the person's IP address in decimal-dot notation.
* \param dccid an id associated with this request. Use it in calls to
* irc_dcc_accept() or irc_dcc_decline().
*
* This callback is called when someone requests DCC CHAT with you. In respond
* you should call either irc_dcc_accept() to accept chat request, or
* irc_dcc_decline() to decline chat request.
*
* \sa irc_dcc_accept or irc_dcc_decline
* \ingroup events
*/
typedef void (*irc_event_dcc_chat_t) (irc_session_t * session, const char * nick, const char * addr, irc_dcc_t dccid);
/*!
* \fn 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)
* \brief A remote DCC CHAT request callback
*
* \param session the session, which generates an event
* \param nick the person who requested DCC CHAT with you.
* \param addr the person's IP address in decimal-dot notation.
* \param filename the sent filename.
* \param size the filename size.
* \param dccid an id associated with this request. Use it in calls to
* irc_dcc_accept() or irc_dcc_decline().
*
* This callback is called when someone wants to send a file to you using
* DCC SEND. As with chat, in respond you should call either irc_dcc_accept()
* to accept this request and receive the file, or irc_dcc_decline() to
* decline this request.
*
* \sa irc_dcc_accept or irc_dcc_decline
* \ingroup events
*/
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);
/*! \brief Event callbacks structure.
*
* 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.
*
* Most event callbacks are the types of ::irc_event_callback_t. There are
* also events, which generate ::irc_eventcode_callback_t,
* ::irc_event_dcc_chat_t and ::irc_event_dcc_send_t callbacks.
*
* \ingroup events
*/
typedef struct
{
/*!
* 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.
*/
irc_event_callback_t event_connect;
/*!
* 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.
*/
irc_event_callback_t event_nick;
/*!
* 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).
*/
irc_event_callback_t event_quit;
/*!
* 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.
*/
irc_event_callback_t event_join;
/*!
* 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).
*/
irc_event_callback_t event_part;
/*!
* 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)
*/
irc_event_callback_t event_mode;
/*!
* 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.
*/
irc_event_callback_t event_umode;
/*!
* 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.
*/
irc_event_callback_t event_topic;
/*!
* 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[0] optional, contains the nick of kicked person.
* \param params[1] optional, contains the kick text
*/
irc_event_callback_t event_kick;
/*!
* 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
*/
irc_event_callback_t event_channel;
/*!
* 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
*/
irc_event_callback_t event_privmsg;
/*!
* 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 target nick name.
* \param params[1] optional, contains the message text
*/
irc_event_callback_t event_notice;
/*!
* The "channel_notice" event is triggered upon receipt of a NOTICE
* message which means that someone has sent the client a public
* 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
*/
irc_event_callback_t event_channel_notice;
/*!
* 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
*/
irc_event_callback_t event_invite;
/*!
* 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
*/
irc_event_callback_t event_ctcp_req;
/*!
* 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.
*/
irc_event_callback_t event_ctcp_rep;
/*!
* 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 ACTION message.
*/
irc_event_callback_t event_ctcp_action;
/*!
* The "unknown" event is triggered upon receipt of any number of
* unclassifiable miscellaneous messages, which aren't handled by the
* library.
*/
irc_event_callback_t event_unknown;
/*!
* 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.
*/
irc_eventcode_callback_t event_numeric;
/*!
* The "dcc chat" event is triggered when someone requests a DCC CHAT from
* you.
*
* See the params in ::irc_event_dcc_chat_t specification.
*/
irc_event_dcc_chat_t event_dcc_chat_req;
/*!
* The "dcc chat" event is triggered when someone wants to send a file
* to you via DCC SEND request.
*
* See the params in ::irc_event_dcc_send_t specification.
*/
irc_event_dcc_send_t event_dcc_send_req;
} irc_callbacks_t;
#endif /* INCLUDE_IRC_EVENTS_H */

View File

@ -0,0 +1,56 @@
/*
* 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_OPTIONS_H
#define INCLUDE_IRC_OPTIONS_H
#ifndef IN_INCLUDE_LIBIRC_H
#error This file should not be included directly, include just libircclient.h
#endif
/*!
* enables additional debug output
* \ingroup options
*/
#define LIBIRC_OPTION_DEBUG (1 << 1)
/*! \brief allows to strip origins automatically.
*
* For every IRC server event, the event origin is sent in standard form:
* nick!host\@ircserver, i.e. like tim!home\@irc.freenet.org. 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
* explicitly, by calling irc_target_get_nick(), or implicitly for all the
* events - by setting this option with irc_option_set().
* \ingroup options
*/
#define LIBIRC_OPTION_STRIPNICKS (1 << 2)
/*! \brief Disables the certificate verification for SSL connections
*
* By default the SSL connection authenticy is ensured 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 irc_connect function is called.
* \ingroup options
*/
#define LIBIRC_OPTION_SSL_NO_VERIFY (1 << 3)
#endif /* INCLUDE_IRC_OPTIONS_H */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
# $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 $@ $<

388
libircclient/src/colors.c Normal file
View File

@ -0,0 +1,388 @@
/*
* 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 <ctype.h>
#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);
}

View File

@ -0,0 +1,109 @@
/* 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 <inttypes.h> 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 <memory.h> 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 <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> 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 <sys/time.h> and <time.h>. */
#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 <sys/types.h> does not define. */
#undef size_t

897
libircclient/src/dcc.c Normal file
View File

@ -0,0 +1,897 @@
/*
* 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;
}

54
libircclient/src/dcc.h Normal file
View File

@ -0,0 +1,54 @@
/*
* 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 */

54
libircclient/src/errors.c Normal file
View File

@ -0,0 +1,54 @@
/*
* 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";
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,47 @@
LIBRARY 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

36
libircclient/src/params.h Normal file
View File

@ -0,0 +1,36 @@
/*
* 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 */

149
libircclient/src/portable.c Normal file
View File

@ -0,0 +1,149 @@
/*
* 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 <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <errno.h>
#include <ctype.h>
#include <time.h>
#if defined (ENABLE_THREADS)
#include <pthread.h>
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 <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <time.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#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 <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#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

View File

@ -0,0 +1,79 @@
/*
* 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 */

159
libircclient/src/sockets.c Normal file
View File

@ -0,0 +1,159 @@
/*
* 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 <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <fcntl.h>
#define IS_SOCKET_ERROR(a) ((a)<0)
typedef int socket_t;
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#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;
}

394
libircclient/src/ssl.c Normal file
View File

@ -0,0 +1,394 @@
/*
* 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 <windows.h>
// 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;
}

130
libircclient/src/utils.c Normal file
View File

@ -0,0 +1,130 @@
/*
* 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);
}
}
}