blob: d705ff120dbbecab686825f21ea605d610dbd00b (
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
|
<!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.doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<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">Compound List</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">Compound Members</a> | <a class="qindex" href="globals.html">File 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"> * <brain@chatspike.net></span>
00008 <span class="comment"> * <Craig@chatspike.net></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 <time.h></span>
00020 <span class="preprocessor">#include <vector></span>
00021 <span class="preprocessor">#include <string></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="l00026"></a><a class="code" href="channels_8h.html#a0">00026</a> <span class="preprocessor">#define CM_TOPICLOCK 1</span>
<a name="l00027"></a><a class="code" href="channels_8h.html#a1">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#a2">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#a3">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#a4">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#a5">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define CM_PRIVATE 32</span>
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>
00037 {
00038 <span class="keyword">public</span>:
<a name="l00039"></a><a class="code" href="classHostItem.html#o0">00039</a> time_t <a class="code" href="classHostItem.html#o0">set_time</a>;
<a name="l00040"></a><a class="code" href="classHostItem.html#o1">00040</a> <span class="keywordtype">char</span> <a class="code" href="classHostItem.html#o1">set_by</a>[NICKMAX];
<a name="l00041"></a><a class="code" href="classHostItem.html#o2">00041</a> <span class="keywordtype">char</span> <a class="code" href="classHostItem.html#o2">data</a>[MAXBUF];
00042
<a name="l00043"></a><a class="code" href="classHostItem.html#a0">00043</a> <a class="code" href="classHostItem.html#a0">HostItem</a>() { <span class="comment">/* stub */</span> }
<a name="l00044"></a><a class="code" href="classHostItem.html#a1">00044</a> <span class="keyword">virtual</span> <a class="code" href="classHostItem.html#a1">~HostItem</a>() { <span class="comment">/* stub */</span> }
00045 };
00046
00047 <span class="comment">// banlist is inherited from HostList mainly for readability</span>
00048 <span class="comment">// reasons only</span>
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>
00053 {
00054 };
00055
00056 <span class="comment">// same with this...</span>
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>
00061 {
00062 };
00063
00064 <span class="comment">// and this...</span>
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>
00069 {
00070 };
00071
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>
00078 {
00079 <span class="keyword">public</span>:
<a name="l00080"></a><a class="code" href="classModeParameter.html#o0">00080</a> <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#o0">mode</a>;
<a name="l00081"></a><a class="code" href="classModeParameter.html#o1">00081</a> <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#o1">parameter</a>[MAXBUF];
<a name="l00082"></a><a class="code" href="classModeParameter.html#o2">00082</a> <span class="keywordtype">char</span> <a class="code" href="classModeParameter.html#o2">channel</a>[CHANMAX];
00083 };
00084
<a name="l00087"></a><a class="code" href="channels_8h.html#a11">00087</a> <span class="keyword">typedef</span> std::vector<BanItem> <a class="code" href="channels_8h.html#a11">BanList</a>;
00088
<a name="l00091"></a><a class="code" href="channels_8h.html#a12">00091</a> <span class="keyword">typedef</span> std::vector<ExemptItem> <a class="code" href="channels_8h.html#a12">ExemptList</a>;
00092
<a name="l00095"></a><a class="code" href="channels_8h.html#a13">00095</a> <span class="keyword">typedef</span> std::vector<InviteItem> <a class="code" href="channels_8h.html#a13">InviteList</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>
00102 {
00103 <span class="keyword">public</span>:
<a name="l00106"></a><a class="code" href="classchanrec.html#o0">00106</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o0">name</a>[CHANMAX]; <span class="comment">/* channel name */</span>
<a name="l00110"></a><a class="code" href="classchanrec.html#o1">00110</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>
00111
<a name="l00115"></a><a class="code" href="classchanrec.html#o2">00115</a> std::vector<char*> <a class="code" href="classchanrec.html#o2">internal_userlist</a>;
00116
<a name="l00120"></a><a class="code" href="classchanrec.html#o3">00120</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o3">topic</a>[MAXBUF];
<a name="l00123"></a><a class="code" href="classchanrec.html#o4">00123</a> time_t <a class="code" href="classchanrec.html#o4">created</a>;
<a name="l00127"></a><a class="code" href="classchanrec.html#o5">00127</a> time_t <a class="code" href="classchanrec.html#o5">topicset</a>;
<a name="l00131"></a><a class="code" href="classchanrec.html#o6">00131</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o6">setby</a>[NICKMAX];
00132
<a name="l00136"></a><a class="code" href="classchanrec.html#o7">00136</a> <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o7">limit</a>;
00137
<a name="l00141"></a><a class="code" href="classchanrec.html#o8">00141</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o8">key</a>[32];
00142
<a name="l00145"></a><a class="code" href="classchanrec.html#o9">00145</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o9">binarymodes</a>;
00146
<a name="l00149"></a><a class="code" href="classchanrec.html#o10">00149</a> <a class="code" href="channels_8h.html#a11">BanList</a> <a class="code" href="classchanrec.html#o10">bans</a>;
00150
00153 <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);
00154
00157 <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);
00158
00161 <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#a2">IsCustomModeSet</a>(<span class="keywordtype">char</span> mode);
00162
00169 std::string <a class="code" href="classchanrec.html#a3">GetModeParameter</a>(<span class="keywordtype">char</span> mode);
00170
00176 <span class="keywordtype">long</span> <a class="code" href="classchanrec.html#a4">GetUserCounter</a>();
00177
00183 <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a5">AddUser</a>(<span class="keywordtype">char</span>* castuser);
00184
00190 <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a6">DelUser</a>(<span class="keywordtype">char</span>* castuser);
00191
00199 std::vector<char*> *<a class="code" href="classchanrec.html#a7">GetUsers</a>();
00200
00203 <a class="code" href="classchanrec.html#a8">chanrec</a>();
00204
<a name="l00205"></a><a class="code" href="classchanrec.html#a9">00205</a> <span class="keyword">virtual</span> <a class="code" href="classchanrec.html#a9">~chanrec</a>() { <span class="comment">/* stub */</span> }
00206 };
00207
00208 <span class="comment">/* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o</span>
00209 <span class="comment"> * needs to come AFTER struct chanrec */</span>
00210
<a name="l00211"></a><a class="code" href="channels_8h.html#a6">00211</a> <span class="preprocessor">#define UCMODE_OP 1</span>
<a name="l00212"></a><a class="code" href="channels_8h.html#a7">00212</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_VOICE 2</span>
<a name="l00213"></a><a class="code" href="channels_8h.html#a8">00213</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_HOP 4</span>
<a name="l00214"></a><a class="code" href="channels_8h.html#a9">00214</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_PROTECT 8</span>
<a name="l00215"></a><a class="code" href="channels_8h.html#a10">00215</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_FOUNDER 16</span>
00216 <span class="preprocessor"></span>
<a name="l00222"></a><a class="code" href="classucrec.html">00222</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>
00223 {
00224 <span class="keyword">public</span>:
<a name="l00228"></a><a class="code" href="classucrec.html#o0">00228</a> <span class="keywordtype">char</span> <a class="code" href="classucrec.html#o0">uc_modes</a>;
00229
<a name="l00233"></a><a class="code" href="classucrec.html#o1">00233</a> <a class="code" href="classchanrec.html">chanrec</a> *<a class="code" href="classucrec.html#o1">channel</a>;
00234
<a name="l00235"></a><a class="code" href="classucrec.html#a0">00235</a> <a class="code" href="classucrec.html#a0">ucrec</a>() { <span class="comment">/* stub */</span> }
<a name="l00236"></a><a class="code" href="classucrec.html#a1">00236</a> <span class="keyword">virtual</span> <a class="code" href="classucrec.html#a1">~ucrec</a>() { <span class="comment">/* stub */</span> }
00237 };
00238
00239 <span class="preprocessor">#endif</span>
00240 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue May 24 02:30:01 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>
|