summaryrefslogtreecommitdiff
path: root/docs/module-doc/channels_8h-source.html
blob: e5b46e8e7920909f5299f4452808357546da1477 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 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.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<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">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>channels.h</h1><a href="channels_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*       +------------------------------------+</span>
00002 <span class="comment"> *       | Inspire Internet Relay Chat Daemon |</span>
00003 <span class="comment"> *       +------------------------------------+</span>
00004 <span class="comment"> *</span>
00005 <span class="comment"> *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.</span>
00006 <span class="comment"> *                       E-mail:</span>
00007 <span class="comment"> *                &lt;brain@chatspike.net&gt;</span>
00008 <span class="comment"> *                &lt;Craig@chatspike.net&gt;</span>
00009 <span class="comment"> *     </span>
00010 <span class="comment"> * Written by Craig Edwards, Craig McLure, and others.</span>
00011 <span class="comment"> * This program is free but copyrighted software; see</span>
00012 <span class="comment"> *            the file COPYING for details.</span>
00013 <span class="comment"> *</span>
00014 <span class="comment"> * ---------------------------------------------------</span>
00015 <span class="comment"> */</span>
00016 
00017 <span class="preprocessor">#include "inspircd_config.h"</span>
00018 <span class="preprocessor">#include "<a class="code" href="base_8h.html">base.h</a>"</span>
00019 <span class="preprocessor">#include &lt;time.h&gt;</span>
00020 <span class="preprocessor">#include &lt;vector&gt;</span>
00021 <span class="preprocessor">#include &lt;string&gt;</span>
00022 
00023 <span class="preprocessor">#ifndef __CHANNELS_H__</span>
00024 <span class="preprocessor"></span><span class="preprocessor">#define __CHANNELS_H__</span>
00025 <span class="preprocessor"></span>
<a name="l00029"></a><a class="code" href="classHostItem.html">00029</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>
00030 {
00031  <span class="keyword">public</span>:
<a name="l00032"></a><a class="code" href="classHostItem.html#o0">00032</a>         time_t <a class="code" href="classHostItem.html#o0">set_time</a>;
<a name="l00033"></a><a class="code" href="classHostItem.html#o1">00033</a>         <span class="keywordtype">char</span> <a class="code" href="classHostItem.html#o1">set_by</a>[NICKMAX];
<a name="l00034"></a><a class="code" href="classHostItem.html#o2">00034</a>         <span class="keywordtype">char</span> <a class="code" href="classHostItem.html#o2">data</a>[MAXBUF];
00035 
<a name="l00036"></a><a class="code" href="classHostItem.html#a0">00036</a>         <a class="code" href="classHostItem.html#a0">HostItem</a>() { <span class="comment">/* stub */</span> }
<a name="l00037"></a><a class="code" href="classHostItem.html#a1">00037</a>         <span class="keyword">virtual</span> <a class="code" href="classHostItem.html#a1">~HostItem</a>() { <span class="comment">/* stub */</span> }
00038 };
00039 
00040 <span class="comment">// banlist is inherited from HostList mainly for readability</span>
00041 <span class="comment">// reasons only</span>
00042 
<a name="l00045"></a><a class="code" href="classBanItem.html">00045</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>
00046 {
00047 };
00048 
00049 <span class="comment">// same with this...</span>
00050 
<a name="l00053"></a><a class="code" href="classExemptItem.html">00053</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>
00054 {
00055 };
00056 
00057 <span class="comment">// and this...</span>
00058 
<a name="l00061"></a><a class="code" href="classInviteItem.html">00061</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>
00062 {
00063 };
00064 
00065 
<a name="l00070"></a><a class="code" href="classModeParameter.html">00070</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>
00071 {
00072  <span class="keyword">public</span>:
<a name="l00073"></a><a class="code" href="classModeParameter.html#o0">00073</a>         <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#o0">mode</a>;
<a name="l00074"></a><a class="code" href="classModeParameter.html#o1">00074</a>         <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#o1">parameter</a>[MAXBUF];
<a name="l00075"></a><a class="code" href="classModeParameter.html#o2">00075</a>         <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#o2">channel</a>[CHANMAX];
00076 };
00077 
<a name="l00080"></a><a class="code" href="channels_8h.html#a5">00080</a> <span class="keyword">typedef</span> std::vector&lt;BanItem&gt;    <a class="code" href="channels_8h.html#a5">BanList</a>;
00081 
<a name="l00084"></a><a class="code" href="channels_8h.html#a6">00084</a> <span class="keyword">typedef</span> std::vector&lt;ExemptItem&gt; <a class="code" href="channels_8h.html#a6">ExemptList</a>;
00085 
<a name="l00088"></a><a class="code" href="channels_8h.html#a7">00088</a> <span class="keyword">typedef</span> std::vector&lt;InviteItem&gt; <a class="code" href="channels_8h.html#a7">InviteList</a>;
00089 
<a name="l00094"></a><a class="code" href="classchanrec.html">00094</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>
00095 {
00096  <span class="keyword">public</span>:
<a name="l00099"></a><a class="code" href="classchanrec.html#o0">00099</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o0">name</a>[CHANMAX]; <span class="comment">/* channel name */</span>
<a name="l00103"></a><a class="code" href="classchanrec.html#o1">00103</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o1">custom_modes</a>[MAXMODES];     <span class="comment">/* modes handled by modules */</span>
00104 
<a name="l00107"></a><a class="code" href="classchanrec.html#o2">00107</a>         <span class="keywordtype">long</span> <a class="code" href="classchanrec.html#o2">users</a>;
00108 
<a name="l00112"></a><a class="code" href="classchanrec.html#o3">00112</a>         std::vector&lt;char*&gt; <a class="code" href="classchanrec.html#o3">internal_userlist</a>;
00113         
<a name="l00117"></a><a class="code" href="classchanrec.html#o4">00117</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o4">topic</a>[MAXBUF];
<a name="l00120"></a><a class="code" href="classchanrec.html#o5">00120</a>         time_t <a class="code" href="classchanrec.html#o5">created</a>;
<a name="l00124"></a><a class="code" href="classchanrec.html#o6">00124</a>         time_t <a class="code" href="classchanrec.html#o6">topicset</a>;
<a name="l00128"></a><a class="code" href="classchanrec.html#o7">00128</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o7">setby</a>[NICKMAX];
00129 
<a name="l00133"></a><a class="code" href="classchanrec.html#o8">00133</a>         <span class="keywordtype">long</span> <a class="code" href="classchanrec.html#o8">limit</a>;
00134         
<a name="l00138"></a><a class="code" href="classchanrec.html#o9">00138</a>         <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o9">key</a>[32];
00139         
<a name="l00142"></a><a class="code" href="classchanrec.html#o10">00142</a>         <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o10">topiclock</a>;
00143         
<a name="l00146"></a><a class="code" href="classchanrec.html#o11">00146</a>         <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o11">noexternal</a>;
00147         
<a name="l00150"></a><a class="code" href="classchanrec.html#o12">00150</a>         <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o12">inviteonly</a>;
00151         
<a name="l00154"></a><a class="code" href="classchanrec.html#o13">00154</a>         <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o13">moderated</a>;
00155         
<a name="l00159"></a><a class="code" href="classchanrec.html#o14">00159</a>         <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o14">secret</a>;
00160         
<a name="l00164"></a><a class="code" href="classchanrec.html#o15">00164</a>         <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o15">c_private</a>;
00165         
<a name="l00168"></a><a class="code" href="classchanrec.html#o16">00168</a>         <a class="code" href="channels_8h.html#a5">BanList</a> <a class="code" href="classchanrec.html#o16">bans</a>;
00169         
00172         <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a0">SetCustomMode</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">bool</span> mode_on);
00173 
00176         <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a1">SetCustomModeParam</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">char</span>* parameter,<span class="keywordtype">bool</span> mode_on);
00177  
00180         <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#a2">IsCustomModeSet</a>(<span class="keywordtype">char</span> mode);
00181 
00188         std::string <a class="code" href="classchanrec.html#a3">GetModeParameter</a>(<span class="keywordtype">char</span> mode);
00189 
00195         <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a4">IncUserCounter</a>();
00196 
00204         <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a5">DecUserCounter</a>();
00205 
00211         <span class="keywordtype">long</span> <a class="code" href="classchanrec.html#a6">GetUserCounter</a>();
00212 
00218         <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a7">AddUser</a>(<span class="keywordtype">char</span>* castuser);
00219 
00225         <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a8">DelUser</a>(<span class="keywordtype">char</span>* castuser);
00226 
00234         std::vector&lt;char*&gt; *<a class="code" href="classchanrec.html#a9">GetUsers</a>();
00235 
00238         <a class="code" href="classchanrec.html#a10">chanrec</a>();
00239 
<a name="l00240"></a><a class="code" href="classchanrec.html#a11">00240</a>         <span class="keyword">virtual</span> <a class="code" href="classchanrec.html#a11">~chanrec</a>() { <span class="comment">/* stub */</span> }
00241 };
00242 
00243 <span class="comment">/* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o</span>
00244 <span class="comment"> * needs to come AFTER struct chanrec */</span>
00245 
<a name="l00246"></a><a class="code" href="channels_8h.html#a0">00246</a> <span class="preprocessor">#define UCMODE_OP      1</span>
<a name="l00247"></a><a class="code" href="channels_8h.html#a1">00247</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_VOICE   2</span>
<a name="l00248"></a><a class="code" href="channels_8h.html#a2">00248</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_HOP     4</span>
<a name="l00249"></a><a class="code" href="channels_8h.html#a3">00249</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_PROTECT 8</span>
<a name="l00250"></a><a class="code" href="channels_8h.html#a4">00250</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_FOUNDER 16</span>
00251 <span class="preprocessor"></span> 
<a name="l00257"></a><a class="code" href="classucrec.html">00257</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>
00258 {
00259  <span class="keyword">public</span>:
<a name="l00263"></a><a class="code" href="classucrec.html#o0">00263</a>         <span class="keywordtype">long</span> <a class="code" href="classucrec.html#o0">uc_modes</a>;
00264         
<a name="l00268"></a><a class="code" href="classucrec.html#o1">00268</a>         <a class="code" href="classchanrec.html">chanrec</a> *<a class="code" href="classucrec.html#o1">channel</a>;
00269 
<a name="l00270"></a><a class="code" href="classucrec.html#a0">00270</a>         <a class="code" href="classucrec.html#a0">ucrec</a>() { <span class="comment">/* stub */</span> }
<a name="l00271"></a><a class="code" href="classucrec.html#a1">00271</a>         <span class="keyword">virtual</span> <a class="code" href="classucrec.html#a1">~ucrec</a>() { <span class="comment">/* stub */</span> }
00272 };
00273 
00274 <span class="preprocessor">#endif</span>
00275 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat May 7 15:34:20 2005 for InspIRCd by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.3 </small></address>
</body>
</html>