<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>InspIRCd: channels.h Source File</title> <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4-20050815 --> <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div> <div class="nav"> <a class="el" href="dir_000000.html">home</a> » <a class="el" href="dir_000001.html">brain</a> » <a class="el" href="dir_000002.html">inspircd-cvs</a> » <a class="el" href="dir_000003.html">inspircd</a> » <a class="el" href="dir_000004.html">include</a></div> <h1>channels.h</h1><a href="channels_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"> * | Inspire Internet Relay Chat Daemon |</span> <a name="l00003"></a>00003 <span class="comment"> * +------------------------------------+</span> <a name="l00004"></a>00004 <span class="comment"> *</span> <a name="l00005"></a>00005 <span class="comment"> * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.</span> <a name="l00006"></a>00006 <span class="comment"> * E-mail:</span> <a name="l00007"></a>00007 <span class="comment"> * <brain@chatspike.net></span> <a name="l00008"></a>00008 <span class="comment"> * <Craig@chatspike.net></span> <a name="l00009"></a>00009 <span class="comment"> * </span> <a name="l00010"></a>00010 <span class="comment"> * Written by Craig Edwards, Craig McLure, and others.</span> <a name="l00011"></a>00011 <span class="comment"> * This program is free but copyrighted software; see</span> <a name="l00012"></a>00012 <span class="comment"> * the file COPYING for details.</span> <a name="l00013"></a>00013 <span class="comment"> *</span> <a name="l00014"></a>00014 <span class="comment"> * ---------------------------------------------------</span> <a name="l00015"></a>00015 <span class="comment"> */</span> <a name="l00016"></a>00016 <a name="l00017"></a>00017 <span class="preprocessor">#include "inspircd_config.h"</span> <a name="l00018"></a>00018 <span class="preprocessor">#include "<a class="code" href="base_8h.html">base.h</a>"</span> <a name="l00019"></a>00019 <span class="preprocessor">#include <time.h></span> <a name="l00020"></a>00020 <span class="preprocessor">#include <vector></span> <a name="l00021"></a>00021 <span class="preprocessor">#include <string></span> <a name="l00022"></a>00022 <a name="l00023"></a>00023 <span class="preprocessor">#ifndef __CHANNELS_H__</span> <a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __CHANNELS_H__</span> <a name="l00025"></a>00025 <span class="preprocessor"></span> <a name="l00026"></a><a class="code" href="channels_8h.html#CM_5FTOPICLOCK">00026</a> <span class="preprocessor">#define CM_TOPICLOCK 1</span> <a name="l00027"></a><a class="code" href="channels_8h.html#CM_5FNOEXTERNAL">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define CM_NOEXTERNAL 2</span> <a name="l00028"></a><a class="code" href="channels_8h.html#CM_5FINVITEONLY">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define CM_INVITEONLY 4</span> <a name="l00029"></a><a class="code" href="channels_8h.html#CM_5FMODERATED">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define CM_MODERATED 8</span> <a name="l00030"></a><a class="code" href="channels_8h.html#CM_5FSECRET">00030</a> <span class="preprocessor"></span><span class="preprocessor">#define CM_SECRET 16</span> <a name="l00031"></a><a class="code" href="channels_8h.html#CM_5FPRIVATE">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define CM_PRIVATE 32</span> <a name="l00032"></a>00032 <span class="preprocessor"></span> <a name="l00036"></a><a class="code" href="classHostItem.html">00036</a> <span class="keyword">class </span><a class="code" href="classHostItem.html">HostItem</a> : <span class="keyword">public</span> <a class="code" href="classclassbase.html">classbase</a> <a name="l00037"></a>00037 { <a name="l00038"></a>00038 <span class="keyword">public</span>: <a name="l00039"></a><a class="code" href="classHostItem.html#set_5Ftime">00039</a> time_t <a class="code" href="classHostItem.html#set_5Ftime">set_time</a>; <a name="l00040"></a><a class="code" href="classHostItem.html#set_5Fby_5BNICKMAX_5D">00040</a> <span class="keywordtype">char</span> <a class="code" href="classHostItem.html#set_5Fby_5BNICKMAX_5D">set_by</a>[NICKMAX]; <a name="l00041"></a><a class="code" href="classHostItem.html#data_5BMAXBUF_5D">00041</a> <span class="keywordtype">char</span> <a class="code" href="classHostItem.html#data_5BMAXBUF_5D">data</a>[MAXBUF]; <a name="l00042"></a>00042 <a name="l00043"></a><a class="code" href="classHostItem.html#HostItem_28_29">00043</a> <a class="code" href="classHostItem.html#HostItem_28_29">HostItem</a>() { <span class="comment">/* stub */</span> } <a name="l00044"></a><a class="code" href="classHostItem.html#_7EHostItem_28_29">00044</a> <span class="keyword">virtual</span> <a class="code" href="classHostItem.html#_7EHostItem_28_29">~HostItem</a>() { <span class="comment">/* stub */</span> } <a name="l00045"></a>00045 }; <a name="l00046"></a>00046 <a name="l00047"></a>00047 <span class="comment">// banlist is inherited from HostList mainly for readability</span> <a name="l00048"></a>00048 <span class="comment">// reasons only</span> <a name="l00049"></a>00049 <a name="l00052"></a><a class="code" href="classBanItem.html">00052</a> <span class="keyword">class </span><a class="code" href="classBanItem.html">BanItem</a> : <span class="keyword">public</span> <a class="code" href="classHostItem.html">HostItem</a> <a name="l00053"></a>00053 { <a name="l00054"></a>00054 }; <a name="l00055"></a>00055 <a name="l00056"></a>00056 <span class="comment">// same with this...</span> <a name="l00057"></a>00057 <a name="l00060"></a><a class="code" href="classExemptItem.html">00060</a> <span class="keyword">class </span><a class="code" href="classExemptItem.html">ExemptItem</a> : <span class="keyword">public</span> <a class="code" href="classHostItem.html">HostItem</a> <a name="l00061"></a>00061 { <a name="l00062"></a>00062 }; <a name="l00063"></a>00063 <a name="l00064"></a>00064 <span class="comment">// and this...</span> <a name="l00065"></a>00065 <a name="l00068"></a><a class="code" href="classInviteItem.html">00068</a> <span class="keyword">class </span><a class="code" href="classInviteItem.html">InviteItem</a> : <span class="keyword">public</span> <a class="code" href="classHostItem.html">HostItem</a> <a name="l00069"></a>00069 { <a name="l00070"></a>00070 }; <a name="l00071"></a>00071 <a name="l00072"></a>00072 <a name="l00077"></a><a class="code" href="classModeParameter.html">00077</a> <span class="keyword">class </span><a class="code" href="classModeParameter.html">ModeParameter</a> : <span class="keyword">public</span> <a class="code" href="classclassbase.html">classbase</a> <a name="l00078"></a>00078 { <a name="l00079"></a>00079 <span class="keyword">public</span>: <a name="l00080"></a><a class="code" href="classModeParameter.html#mode">00080</a> <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#mode">mode</a>; <a name="l00081"></a><a class="code" href="classModeParameter.html#parameter_5BMAXBUF_5D">00081</a> <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#parameter_5BMAXBUF_5D">parameter</a>[MAXBUF]; <a name="l00082"></a><a class="code" href="classModeParameter.html#channel_5BCHANMAX_5D">00082</a> <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#channel_5BCHANMAX_5D">channel</a>[CHANMAX]; <a name="l00083"></a>00083 }; <a name="l00084"></a>00084 <a name="l00087"></a><a class="code" href="channels_8h.html#BanList">00087</a> <span class="keyword">typedef</span> std::vector<BanItem> <a class="code" href="channels_8h.html#BanList">BanList</a>; <a name="l00088"></a>00088 <a name="l00091"></a><a class="code" href="channels_8h.html#ExemptList">00091</a> <span class="keyword">typedef</span> std::vector<ExemptItem> <a class="code" href="channels_8h.html#ExemptList">ExemptList</a>; <a name="l00092"></a>00092 <a name="l00095"></a><a class="code" href="channels_8h.html#InviteList">00095</a> <span class="keyword">typedef</span> std::vector<InviteItem> <a class="code" href="channels_8h.html#InviteList">InviteList</a>; <a name="l00096"></a>00096 <a name="l00101"></a><a class="code" href="classchanrec.html">00101</a> <span class="keyword">class </span><a class="code" href="classchanrec.html">chanrec</a> : <span class="keyword">public</span> <a class="code" href="classExtensible.html">Extensible</a> <a name="l00102"></a>00102 { <a name="l00103"></a>00103 <span class="keyword">public</span>: <a name="l00106"></a><a class="code" href="classchanrec.html#name_5BCHANMAX_5D">00106</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>[CHANMAX]; <span class="comment">/* channel name */</span> <a name="l00110"></a><a class="code" href="classchanrec.html#custom_5Fmodes_5BMAXMODES_5D">00110</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#custom_5Fmodes_5BMAXMODES_5D">custom_modes</a>[MAXMODES]; <span class="comment">/* modes handled by modules */</span> <a name="l00111"></a>00111 <a name="l00115"></a><a class="code" href="classchanrec.html#internal_5Fuserlist">00115</a> std::vector<char*> <a class="code" href="classchanrec.html#internal_5Fuserlist">internal_userlist</a>; <a name="l00116"></a>00116 <a name="l00120"></a><a class="code" href="classchanrec.html#topic_5BMAXBUF_5D">00120</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#topic_5BMAXBUF_5D">topic</a>[MAXBUF]; <a name="l00123"></a><a class="code" href="classchanrec.html#created">00123</a> time_t <a class="code" href="classchanrec.html#created">created</a>; <a name="l00127"></a><a class="code" href="classchanrec.html#topicset">00127</a> time_t <a class="code" href="classchanrec.html#topicset">topicset</a>; <a name="l00131"></a><a class="code" href="classchanrec.html#setby_5BNICKMAX_5D">00131</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#setby_5BNICKMAX_5D">setby</a>[NICKMAX]; <a name="l00132"></a>00132 <a name="l00136"></a><a class="code" href="classchanrec.html#limit">00136</a> <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#limit">limit</a>; <a name="l00137"></a>00137 <a name="l00141"></a><a class="code" href="classchanrec.html#key_5B_33_32_5D">00141</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#key_5B_33_32_5D">key</a>[32]; <a name="l00142"></a>00142 <a name="l00145"></a><a class="code" href="classchanrec.html#binarymodes">00145</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#binarymodes">binarymodes</a>; <a name="l00146"></a>00146 <a name="l00149"></a><a class="code" href="classchanrec.html#bans">00149</a> <a class="code" href="channels_8h.html#BanList">BanList</a> <a class="code" href="classchanrec.html#bans">bans</a>; <a name="l00150"></a>00150 <a name="l00155"></a>00155 <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#SetCustomMode_28char_20mode_2C_20bool_20mode_5Fon_29">SetCustomMode</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">bool</span> mode_on); <a name="l00156"></a>00156 <a name="l00162"></a>00162 <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#SetCustomModeParam_28char_20mode_2C_20char_20_2Aparameter_2C_20bool_20mode_5Fon_29">SetCustomModeParam</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">char</span>* parameter,<span class="keywordtype">bool</span> mode_on); <a name="l00163"></a>00163 <a name="l00168"></a>00168 <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#IsCustomModeSet_28char_20mode_29">IsCustomModeSet</a>(<span class="keywordtype">char</span> mode); <a name="l00169"></a>00169 <a name="l00180"></a>00180 <a class="code" href="namespaceirc.html#string">std::string</a> <a class="code" href="classchanrec.html#GetModeParameter_28char_20mode_29">GetModeParameter</a>(<span class="keywordtype">char</span> mode); <a name="l00181"></a>00181 <a name="l00189"></a>00189 <span class="keywordtype">long</span> <a class="code" href="classchanrec.html#GetUserCounter_28_29">GetUserCounter</a>(); <a name="l00190"></a>00190 <a name="l00198"></a>00198 <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#AddUser_28char_20_2Acastuser_29">AddUser</a>(<span class="keywordtype">char</span>* castuser); <a name="l00199"></a>00199 <a name="l00207"></a>00207 <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#DelUser_28char_20_2Acastuser_29">DelUser</a>(<span class="keywordtype">char</span>* castuser); <a name="l00208"></a>00208 <a name="l00218"></a>00218 std::vector<char*> *<a class="code" href="classchanrec.html#GetUsers_28_29">GetUsers</a>(); <a name="l00219"></a>00219 <a name="l00222"></a>00222 <a class="code" href="classchanrec.html#chanrec_28_29">chanrec</a>(); <a name="l00223"></a>00223 <a name="l00224"></a><a class="code" href="classchanrec.html#_7Echanrec_28_29">00224</a> <span class="keyword">virtual</span> <a class="code" href="classchanrec.html#_7Echanrec_28_29">~chanrec</a>() { <span class="comment">/* stub */</span> } <a name="l00225"></a>00225 }; <a name="l00226"></a>00226 <a name="l00227"></a>00227 <span class="comment">/* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o</span> <a name="l00228"></a>00228 <span class="comment"> * needs to come AFTER struct chanrec */</span> <a name="l00229"></a>00229 <a name="l00230"></a><a class="code" href="channels_8h.html#UCMODE_5FOP">00230</a> <span class="preprocessor">#define UCMODE_OP 1</span> <a name="l00231"></a><a class="code" href="channels_8h.html#UCMODE_5FVOICE">00231</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_VOICE 2</span> <a name="l00232"></a><a class="code" href="channels_8h.html#UCMODE_5FHOP">00232</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_HOP 4</span> <a name="l00233"></a><a class="code" href="channels_8h.html#UCMODE_5FPROTECT">00233</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_PROTECT 8</span> <a name="l00234"></a><a class="code" href="channels_8h.html#UCMODE_5FFOUNDER">00234</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_FOUNDER 16</span> <a name="l00235"></a>00235 <span class="preprocessor"></span> <a name="l00241"></a><a class="code" href="classucrec.html">00241</a> <span class="keyword">class </span><a class="code" href="classucrec.html">ucrec</a> : <span class="keyword">public</span> <a class="code" href="classclassbase.html">classbase</a> <a name="l00242"></a>00242 { <a name="l00243"></a>00243 <span class="keyword">public</span>: <a name="l00247"></a><a class="code" href="classucrec.html#uc_5Fmodes">00247</a> <span class="keywordtype">char</span> <a class="code" href="classucrec.html#uc_5Fmodes">uc_modes</a>; <a name="l00248"></a>00248 <a name="l00252"></a><a class="code" href="classucrec.html#channel">00252</a> <a class="code" href="classchanrec.html">chanrec</a> *<a class="code" href="classucrec.html#channel">channel</a>; <a name="l00253"></a>00253 <a name="l00254"></a><a class="code" href="classucrec.html#ucrec_28_29">00254</a> <a class="code" href="classucrec.html#ucrec_28_29">ucrec</a>() { <span class="comment">/* stub */</span> } <a name="l00255"></a><a class="code" href="classucrec.html#_7Eucrec_28_29">00255</a> <span class="keyword">virtual</span> <a class="code" href="classucrec.html#_7Eucrec_28_29">~ucrec</a>() { <span class="comment">/* stub */</span> } <a name="l00256"></a>00256 }; <a name="l00257"></a>00257 <a name="l00258"></a>00258 <span class="preprocessor">#endif</span> <a name="l00259"></a>00259 <span class="preprocessor"></span> </pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address> </body> </html>