blob: a06c535421be31ce0848b536523776620ab9475c (
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
|
<!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 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="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="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<BanItem> <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<ExemptItem> <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<InviteItem> <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="l00108"></a><a class="code" href="classchanrec.html#o2">00108</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o2">topic</a>[MAXBUF];
<a name="l00111"></a><a class="code" href="classchanrec.html#o3">00111</a> time_t <a class="code" href="classchanrec.html#o3">created</a>;
<a name="l00115"></a><a class="code" href="classchanrec.html#o4">00115</a> time_t <a class="code" href="classchanrec.html#o4">topicset</a>;
<a name="l00119"></a><a class="code" href="classchanrec.html#o5">00119</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o5">setby</a>[NICKMAX];
00120
<a name="l00124"></a><a class="code" href="classchanrec.html#o6">00124</a> <span class="keywordtype">long</span> <a class="code" href="classchanrec.html#o6">limit</a>;
00125
<a name="l00129"></a><a class="code" href="classchanrec.html#o7">00129</a> <span class="keywordtype">char</span> <a class="code" href="classchanrec.html#o7">key</a>[32];
00130
<a name="l00133"></a><a class="code" href="classchanrec.html#o8">00133</a> <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o8">topiclock</a>;
00134
<a name="l00137"></a><a class="code" href="classchanrec.html#o9">00137</a> <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o9">noexternal</a>;
00138
<a name="l00141"></a><a class="code" href="classchanrec.html#o10">00141</a> <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o10">inviteonly</a>;
00142
<a name="l00145"></a><a class="code" href="classchanrec.html#o11">00145</a> <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o11">moderated</a>;
00146
<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">secret</a>;
00151
<a name="l00155"></a><a class="code" href="classchanrec.html#o13">00155</a> <span class="keywordtype">short</span> <span class="keywordtype">int</span> <a class="code" href="classchanrec.html#o13">c_private</a>;
00156
<a name="l00159"></a><a class="code" href="classchanrec.html#o14">00159</a> <a class="code" href="channels_8h.html#a5">BanList</a> <a class="code" href="classchanrec.html#o14">bans</a>;
00160
00163 <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);
00164
00167 <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);
00168
00171 <span class="keywordtype">bool</span> <a class="code" href="classchanrec.html#a2">IsCustomModeSet</a>(<span class="keywordtype">char</span> mode);
00172
00179 std::string <a class="code" href="classchanrec.html#a3">GetModeParameter</a>(<span class="keywordtype">char</span> mode);
00180
00183 <a class="code" href="classchanrec.html#a4">chanrec</a>();
00184
<a name="l00185"></a><a class="code" href="classchanrec.html#a5">00185</a> <span class="keyword">virtual</span> <a class="code" href="classchanrec.html#a5">~chanrec</a>() { <span class="comment">/* stub */</span> }
00186 };
00187
00188 <span class="comment">/* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o</span>
00189 <span class="comment"> * needs to come AFTER struct chanrec */</span>
00190
<a name="l00191"></a><a class="code" href="channels_8h.html#a0">00191</a> <span class="preprocessor">#define UCMODE_OP 1</span>
<a name="l00192"></a><a class="code" href="channels_8h.html#a1">00192</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_VOICE 2</span>
<a name="l00193"></a><a class="code" href="channels_8h.html#a2">00193</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_HOP 4</span>
<a name="l00194"></a><a class="code" href="channels_8h.html#a3">00194</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_PROTECT 8</span>
<a name="l00195"></a><a class="code" href="channels_8h.html#a4">00195</a> <span class="preprocessor"></span><span class="preprocessor">#define UCMODE_FOUNDER 16</span>
00196 <span class="preprocessor"></span>
<a name="l00202"></a><a class="code" href="classucrec.html">00202</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>
00203 {
00204 <span class="keyword">public</span>:
<a name="l00208"></a><a class="code" href="classucrec.html#o0">00208</a> <span class="keywordtype">long</span> <a class="code" href="classucrec.html#o0">uc_modes</a>;
00209
<a name="l00213"></a><a class="code" href="classucrec.html#o1">00213</a> <a class="code" href="classchanrec.html">chanrec</a> *<a class="code" href="classucrec.html#o1">channel</a>;
00214
<a name="l00215"></a><a class="code" href="classucrec.html#a0">00215</a> <a class="code" href="classucrec.html#a0">ucrec</a>() { <span class="comment">/* stub */</span> }
<a name="l00216"></a><a class="code" href="classucrec.html#a1">00216</a> <span class="keyword">virtual</span> <a class="code" href="classucrec.html#a1">~ucrec</a>() { <span class="comment">/* stub */</span> }
00217 };
00218
00219 <span class="preprocessor">#endif</span>
00220 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 13 13:06:51 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>
|