log.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           log.h  -  description
00003                              -------------------
00004     begin                : Thu Dec 9 2004
00005     copyright            : (C) 2004 by VooDooMan
00006     email                : vdmfun@hotmail.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010 
00011 VooDoo cIRCle - an IRC (ro)bot
00012 Copyright (C) 2004 by Marian VooDooMan Meravy (vdmfun@hotmail.com)
00013 
00014 This program is free software; you can redistribute it and/or
00015 modify it under the terms of the GNU General Public License
00016 as published by the Free Software Foundation; either version 2
00017 of the License, or (at your option) any later version.
00018 
00019 This program is distributed in the hope that it will be useful,
00020 but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022 GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License
00025 along with this program; if not, write to the Free Software
00026 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00027 
00028 ****************************************************************************/
00029 
00030 /*!
00031     \file
00032     \brief Handles log files
00033 */
00034 
00035 //---------------------------------------------------------------------------
00036 
00037 #ifndef logH
00038 #define logH
00039 //---------------------------------------------------------------------------
00040 
00041 #include <string>
00042 
00043 using namespace std;
00044 
00045 void log_debug(const char* msg);
00046 void log_irc(bool from_server, const char* msg);
00047 void log_socket(int sock_error, const char* os_msg, const char* msg);
00048 void log_bot(const char* msg);
00049 void log_identd(const char* msg);
00050 
00051 bool log_init();
00052 string log_done(int exit_code, string eol);
00053 
00054 /*!
00055     \def TYPE_PRIVMSG
00056     \brief Type: PRIVMSG
00057 */
00058 #define TYPE_PRIVMSG    1               //!< Type: PRIVMSG
00059 /*!
00060     \def TYPE_NOTICE
00061     \brief Type: NOTICE
00062 */
00063 #define TYPE_NOTICE     2               //!< Type: NOTICE
00064 /*!
00065     \def TYPE_JOIN
00066     \brief Type: JOIN
00067 */
00068 #define TYPE_JOIN       3               //!< Type: JOIN
00069 /*!
00070     \def TYPE_PART
00071     \brief Type: PART
00072 */
00073 #define TYPE_PART       4               //!< Type: PART
00074 /*!
00075     \def TYPE_QUIT
00076     \brief Type: QUIT
00077 */
00078 #define TYPE_QUIT       5               //!< Type: QUIT
00079 /*!
00080     \def TYPE_KICK
00081     \brief Type: KICK
00082 */
00083 #define TYPE_KICK       6               //!< Type: KICK
00084 /*!
00085     \def TYPE_MODE
00086     \brief Type: MODE
00087 */
00088 #define TYPE_MODE       7               //!< Type: MODE
00089 /*!
00090     \def TYPE_NICK
00091     \brief Type: NICK
00092 */
00093 #define TYPE_NICK       8               //!< Type: NICK
00094 /*!
00095     \def TYPE_SCRIPT
00096     \brief Type: Message from script
00097 */
00098 #define TYPE_SCRIPT     9               //!< Type: Message from script
00099 /*!
00100     \def TYPE_TOPIC
00101     \brief Type TOPIC (not for flood!)
00102 */
00103 #define TYPE_TOPIC      10              //!< Type TOPIC (not for flood!)
00104 /*!
00105     \def TYPE_QUIT_PART_KICK
00106     \brief QUIT/PART/been KICK-ed (only for irc_check_flood())
00107 */
00108 #define TYPE_QUIT_PART_KICK     128     //!< Type: QUIT/PART/been KICK-ed (only for irc_check_flood())
00109 /*!
00110     \def TYPE_REPEAT
00111     \brief Type: repeat (only for irc_check_flood())
00112 */
00113 #define TYPE_REPEAT             129     //!< Type: repeat (only for irc_check_flood())
00114 /*!
00115     \def TYPE_CTCP
00116     \brief Type: CTCP (only for irc_check_flood())
00117 */
00118 #define TYPE_CTCP               130     //!< Type: CTCP (only for irc_check_flood())
00119 /*!
00120     \def TYPE_IRCOP_JOIN
00121     \brief Type: For logging, that user is an IRC operator (has joined)
00122 */
00123 #define TYPE_IRCOP_JOIN         131     //!< Type: TYPE_IRCOP_JOIN
00124 /*!
00125     \def TYPE_IRCOP_LEFT
00126     \brief Type: For logging, that user is an IRC operator (has quit, part, or has been kicked = wow! ;-)
00127 */
00128 #define TYPE_IRCOP_LEFT         132     //!< Type: TYPE_IRCOP_LEFT
00129 void log_channel(const char* channel, int type, const char* who, const char* whom, const char* msg, const char* user_modes);
00130 
00131 void log_botnet_debug(const char* myname, const char* remote_name, int packet_type, int command, const char* msg);
00132 void log_botnet(const char* myname, const char* remote_name, const char* msg);
00133 void log_ssl(const char* msg);
00134 void log_broadcast(string bcast_mask, int type, string who, string msg, string server, unsigned short server_port);
00135 void log_free_locks();
00136 
00137 #endif

Generated on Sun Jul 10 03:22:56 2005 for VooDoo cIRCle by doxygen 1.4.3

Hosted by SourceForge.net Logo