]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/channels_8h-source.html
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2578 e03df62e-2008...
[user/henk/code/inspircd.git] / docs / module-doc / channels_8h-source.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: channels.h Source File</title>
4 <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.4.4-20050815 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <div class="nav">
9 <a class="el" href="dir_000000.html">home</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000001.html">brain</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000002.html">inspircd-cvs</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000003.html">inspircd</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000004.html">include</a></div>
10 <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>
11 <a name="l00002"></a>00002 <span class="comment"> *       | Inspire Internet Relay Chat Daemon |</span>
12 <a name="l00003"></a>00003 <span class="comment"> *       +------------------------------------+</span>
13 <a name="l00004"></a>00004 <span class="comment"> *</span>
14 <a name="l00005"></a>00005 <span class="comment"> *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.</span>
15 <a name="l00006"></a>00006 <span class="comment"> *                       E-mail:</span>
16 <a name="l00007"></a>00007 <span class="comment"> *                &lt;brain@chatspike.net&gt;</span>
17 <a name="l00008"></a>00008 <span class="comment"> *                &lt;Craig@chatspike.net&gt;</span>
18 <a name="l00009"></a>00009 <span class="comment"> *     </span>
19 <a name="l00010"></a>00010 <span class="comment"> * Written by Craig Edwards, Craig McLure, and others.</span>
20 <a name="l00011"></a>00011 <span class="comment"> * This program is free but copyrighted software; see</span>
21 <a name="l00012"></a>00012 <span class="comment"> *            the file COPYING for details.</span>
22 <a name="l00013"></a>00013 <span class="comment"> *</span>
23 <a name="l00014"></a>00014 <span class="comment"> * ---------------------------------------------------</span>
24 <a name="l00015"></a>00015 <span class="comment"> */</span>
25 <a name="l00016"></a>00016 
26 <a name="l00017"></a>00017 <span class="preprocessor">#include "inspircd_config.h"</span>
27 <a name="l00018"></a>00018 <span class="preprocessor">#include "<a class="code" href="base_8h.html">base.h</a>"</span>
28 <a name="l00019"></a>00019 <span class="preprocessor">#include &lt;time.h&gt;</span>
29 <a name="l00020"></a>00020 <span class="preprocessor">#include &lt;vector&gt;</span>
30 <a name="l00021"></a>00021 <span class="preprocessor">#include &lt;string&gt;</span>
31 <a name="l00022"></a>00022 
32 <a name="l00023"></a>00023 <span class="preprocessor">#ifndef __CHANNELS_H__</span>
33 <a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __CHANNELS_H__</span>
34 <a name="l00025"></a>00025 <span class="preprocessor"></span>
35 <a name="l00026"></a><a class="code" href="channels_8h.html#CM_5FTOPICLOCK">00026</a> <span class="preprocessor">#define CM_TOPICLOCK 1</span>
36 <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>
37 <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>
38 <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>
39 <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>
40 <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>
41 <a name="l00032"></a>00032 <span class="preprocessor"></span>
42 <a name="l00033"></a>00033 <span class="keyword">class </span><a class="code" href="classuserrec.html">userrec</a>;
43 <a name="l00034"></a>00034 
44 <a name="l00038"></a><a class="code" href="classHostItem.html">00038</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>
45 <a name="l00039"></a>00039 {
46 <a name="l00040"></a>00040  <span class="keyword">public</span>:
47 <a name="l00041"></a><a class="code" href="classHostItem.html#set_5Ftime">00041</a>         time_t <a class="code" href="classHostItem.html#set_5Ftime">set_time</a>;
48 <a name="l00042"></a><a class="code" href="classHostItem.html#set_5Fby_5BNICKMAX_5D">00042</a>         <span class="keywordtype">char</span> <a class="code" href="classHostItem.html#set_5Fby_5BNICKMAX_5D">set_by</a>[NICKMAX];
49 <a name="l00043"></a><a class="code" href="classHostItem.html#data_5BMAXBUF_5D">00043</a>         <span class="keywordtype">char</span> <a class="code" href="classHostItem.html#data_5BMAXBUF_5D">data</a>[MAXBUF];
50 <a name="l00044"></a>00044 
51 <a name="l00045"></a><a class="code" href="classHostItem.html#HostItem_28_29">00045</a>         <a class="code" href="classHostItem.html#HostItem_28_29">HostItem</a>() { <span class="comment">/* stub */</span> }
52 <a name="l00046"></a><a class="code" href="classHostItem.html#_7EHostItem_28_29">00046</a>         <span class="keyword">virtual</span> <a class="code" href="classHostItem.html#_7EHostItem_28_29">~HostItem</a>() { <span class="comment">/* stub */</span> }
53 <a name="l00047"></a>00047 };
54 <a name="l00048"></a>00048 
55 <a name="l00049"></a>00049 <span class="comment">// banlist is inherited from HostList mainly for readability</span>
56 <a name="l00050"></a>00050 <span class="comment">// reasons only</span>
57 <a name="l00051"></a>00051 
58 <a name="l00054"></a><a class="code" href="classBanItem.html">00054</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>
59 <a name="l00055"></a>00055 {
60 <a name="l00056"></a>00056 };
61 <a name="l00057"></a>00057 
62 <a name="l00058"></a>00058 <span class="comment">// same with this...</span>
63 <a name="l00059"></a>00059 
64 <a name="l00062"></a><a class="code" href="classExemptItem.html">00062</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>
65 <a name="l00063"></a>00063 {
66 <a name="l00064"></a>00064 };
67 <a name="l00065"></a>00065 
68 <a name="l00066"></a>00066 <span class="comment">// and this...</span>
69 <a name="l00067"></a>00067 
70 <a name="l00070"></a><a class="code" href="classInviteItem.html">00070</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>
71 <a name="l00071"></a>00071 {
72 <a name="l00072"></a>00072 };
73 <a name="l00073"></a>00073 
74 <a name="l00074"></a>00074 
75 <a name="l00079"></a><a class="code" href="classModeParameter.html">00079</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>
76 <a name="l00080"></a>00080 {
77 <a name="l00081"></a>00081  <span class="keyword">public</span>:
78 <a name="l00082"></a><a class="code" href="classModeParameter.html#mode">00082</a>         <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#mode">mode</a>;
79 <a name="l00083"></a><a class="code" href="classModeParameter.html#parameter_5BMAXBUF_5D">00083</a>         <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#parameter_5BMAXBUF_5D">parameter</a>[MAXBUF];
80 <a name="l00084"></a><a class="code" href="classModeParameter.html#channel_5BCHANMAX_5D">00084</a>         <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#channel_5BCHANMAX_5D">channel</a>[CHANMAX];
81 <a name="l00085"></a>00085 };
82 <a name="l00086"></a>00086 
83 <a name="l00089"></a><a class="code" href="channels_8h.html#BanList">00089</a> <span class="keyword">typedef</span> std::vector&lt;BanItem&gt;    <a class="code" href="channels_8h.html#BanList">BanList</a>;
84 <a name="l00090"></a>00090 
85 <a name="l00093"></a><a class="code" href="channels_8h.html#ExemptList">00093</a> <span class="keyword">typedef</span> std::vector&lt;ExemptItem&gt; <a class="code" href="channels_8h.html#ExemptList">ExemptList</a>;
86 <a name="l00094"></a>00094 
87 <a name="l00097"></a><a class="code" href="channels_8h.html#InviteList">00097</a> <span class="keyword">typedef</span> std::vector&lt;InviteItem&gt; <a class="code" href="channels_8h.html#InviteList">InviteList</a>;
88 <a name="l00098"></a>00098 
89 <a name="l00103"></a><a class="code" href="classchanrec.html">00103</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>
90 <a name="l00104"></a>00104 {
91 <a name="l00105"></a>00105  <span class="keyword">public</span>:
92 <a name="l00108"></a><a class="code" href="classchanrec.html#name_5BCHANMAX_5D">00108</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>[CHANMAX]; <span class="comment">/* channel name */</span>
93 <a name="l00112"></a><a class="code" href="classchanrec.html#custom_5Fmodes_5BMAXMODES_5D">00112</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>
94 <a name="l00113"></a>00113 
95 <a name="l00117"></a><a class="code" href="classchanrec.html#internal_5Fuserlist">00117</a>         std::vector&lt;char*&gt; <a class="code" href="classchanrec.html#internal_5Fuserlist">internal_userlist</a>;
96 <a name="l00118"></a>00118         
97 <a name="l00122"></a><a class="code" href="classchanrec.html#topic_5BMAXBUF_5D">00122</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#topic_5BMAXBUF_5D">topic</a>[MAXBUF];
98 <a name="l00125"></a><a class="code" href="classchanrec.html#created">00125</a>         time_t <a class="code" href="classchanrec.html#created">created</a>;
99 <a name="l00129"></a><a class="code" href="classchanrec.html#topicset">00129</a>         time_t <a class="code" href="classchanrec.html#topicset">topicset</a>;
100 <a name="l00133"></a><a class="code" href="classchanrec.html#setby_5BNICKMAX_5D">00133</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#setby_5BNICKMAX_5D">setby</a>[NICKMAX];
101 <a name="l00134"></a>00134 
102 <a name="l00138"></a><a class="code" href="classchanrec.html#limit">00138</a>         <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#limit">limit</a>;
103 <a name="l00139"></a>00139         
104 <a name="l00143"></a><a class="code" href="classchanrec.html#key_5B_33_32_5D">00143</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#key_5B_33_32_5D">key</a>[32];
105 <a name="l00144"></a>00144         
106 <a name="l00147"></a><a class="code" href="classchanrec.html#binarymodes">00147</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#binarymodes">binarymodes</a>;
107 <a name="l00148"></a>00148         
108 <a name="l00151"></a><a class="code" href="classchanrec.html#bans">00151</a>         <a class="code" href="channels_8h.html#BanList">BanList</a> <a class="code" href="classchanrec.html#bans">bans</a>;
109 <a name="l00152"></a>00152         
110 <a name="l00157"></a>00157         <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);
111 <a name="l00158"></a>00158 
112 <a name="l00164"></a>00164         <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);
113 <a name="l00165"></a>00165  
114 <a name="l00170"></a>00170         <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#IsCustomModeSet_28char_20mode_29">IsCustomModeSet</a>(<span class="keywordtype">char</span> mode);
115 <a name="l00171"></a>00171 
116 <a name="l00182"></a>00182         <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);
117 <a name="l00183"></a>00183 
118 <a name="l00191"></a>00191         <span class="keywordtype">long</span> <a class="code" href="classchanrec.html#GetUserCounter_28_29">GetUserCounter</a>();
119 <a name="l00192"></a>00192 
120 <a name="l00200"></a>00200         <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#AddUser_28char_20_2Acastuser_29">AddUser</a>(<span class="keywordtype">char</span>* castuser);
121 <a name="l00201"></a>00201 
122 <a name="l00209"></a>00209         <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#DelUser_28char_20_2Acastuser_29">DelUser</a>(<span class="keywordtype">char</span>* castuser);
123 <a name="l00210"></a>00210 
124 <a name="l00220"></a>00220         std::vector&lt;char*&gt; *<a class="code" href="classchanrec.html#GetUsers_28_29">GetUsers</a>();
125 <a name="l00221"></a>00221 
126 <a name="l00224"></a>00224         <a class="code" href="classchanrec.html#chanrec_28_29">chanrec</a>();
127 <a name="l00225"></a>00225 
128 <a name="l00226"></a><a class="code" href="classchanrec.html#_7Echanrec_28_29">00226</a>         <span class="keyword">virtual</span> <a class="code" href="classchanrec.html#_7Echanrec_28_29">~chanrec</a>() { <span class="comment">/* stub */</span> }
129 <a name="l00227"></a>00227 };
130 <a name="l00228"></a>00228 
131 <a name="l00229"></a>00229 <span class="comment">/* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o</span>
132 <a name="l00230"></a>00230 <span class="comment"> * needs to come AFTER struct chanrec */</span>
133 <a name="l00231"></a>00231 
134 <a name="l00232"></a><a class="code" href="channels_8h.html#UCMODE_5FOP">00232</a> <span class="preprocessor">#define UCMODE_OP      1</span>
135 <a name="l00233"></a><a class="code" href="channels_8h.html#UCMODE_5FVOICE">00233</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_VOICE   2</span>
136 <a name="l00234"></a><a class="code" href="channels_8h.html#UCMODE_5FHOP">00234</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_HOP     4</span>
137 <a name="l00235"></a><a class="code" href="channels_8h.html#UCMODE_5FPROTECT">00235</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_PROTECT 8</span>
138 <a name="l00236"></a><a class="code" href="channels_8h.html#UCMODE_5FFOUNDER">00236</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_FOUNDER 16</span>
139 <a name="l00237"></a>00237 <span class="preprocessor"></span> 
140 <a name="l00243"></a><a class="code" href="classucrec.html">00243</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>
141 <a name="l00244"></a>00244 {
142 <a name="l00245"></a>00245  <span class="keyword">public</span>:
143 <a name="l00249"></a><a class="code" href="classucrec.html#uc_5Fmodes">00249</a>         <span class="keywordtype">char</span> <a class="code" href="classucrec.html#uc_5Fmodes">uc_modes</a>;
144 <a name="l00250"></a>00250         
145 <a name="l00254"></a><a class="code" href="classucrec.html#channel">00254</a>         <a class="code" href="classchanrec.html">chanrec</a> *<a class="code" href="classucrec.html#channel">channel</a>;
146 <a name="l00255"></a>00255 
147 <a name="l00256"></a><a class="code" href="classucrec.html#ucrec_28_29">00256</a>         <a class="code" href="classucrec.html#ucrec_28_29">ucrec</a>() { <span class="comment">/* stub */</span> }
148 <a name="l00257"></a><a class="code" href="classucrec.html#_7Eucrec_28_29">00257</a>         <span class="keyword">virtual</span> <a class="code" href="classucrec.html#_7Eucrec_28_29">~ucrec</a>() { <span class="comment">/* stub */</span> }
149 <a name="l00258"></a>00258 };
150 <a name="l00259"></a>00259 
151 <a name="l00260"></a>00260 <a class="code" href="classchanrec.html">chanrec</a>* <a class="code" href="channels_8cpp.html#add_5Fchannel_28userrec_20_2Auser_2C_20const_20char_20_2Acn_2C_20const_20char_20_2Akey_2C_20bool_20override_29">add_channel</a>(<a class="code" href="classuserrec.html">userrec</a> *user, <span class="keyword">const</span> <span class="keywordtype">char</span>* cn, <span class="keyword">const</span> <span class="keywordtype">char</span>* key, <span class="keywordtype">bool</span> override);
152 <a name="l00261"></a>00261 <a class="code" href="classchanrec.html">chanrec</a>* <a class="code" href="channels_8cpp.html#del_5Fchannel_28userrec_20_2Auser_2C_20const_20char_20_2Acname_2C_20const_20char_20_2Areason_2C_20bool_20local_29">del_channel</a>(<a class="code" href="classuserrec.html">userrec</a> *user, <span class="keyword">const</span> <span class="keywordtype">char</span>* cname, <span class="keyword">const</span> <span class="keywordtype">char</span>* reason, <span class="keywordtype">bool</span> local);
153 <a name="l00262"></a>00262 <span class="keywordtype">void</span> <a class="code" href="channels_8cpp.html#kick_5Fchannel_28userrec_20_2Asrc_2C_20userrec_20_2Auser_2C_20chanrec_20_2APtr_2C_20char_20_2Areason_29">kick_channel</a>(<a class="code" href="classuserrec.html">userrec</a> *src,<a class="code" href="classuserrec.html">userrec</a> *user, <a class="code" href="classchanrec.html">chanrec</a> *Ptr, <span class="keywordtype">char</span>* reason);
154 <a name="l00263"></a>00263 
155 <a name="l00264"></a>00264 <span class="preprocessor">#endif</span>
156 <a name="l00265"></a>00265 <span class="preprocessor"></span>
157 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Dec 19 18:02:13 2005 for InspIRCd by&nbsp;
158 <a href="http://www.doxygen.org/index.html">
159 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>
160 </body>
161 </html>