summaryrefslogtreecommitdiff
path: root/docs/module-doc/users_8h-source.html
blob: 8a6aee69e841642126ebf3e2e68501ab169e425d (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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!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: users.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>users.h</h1><a href="users_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="channels_8h.html">channels.h</a>"</span>
00019 <span class="preprocessor">#include "<a class="code" href="connection_8h.html">connection.h</a>"</span>
00020 <span class="preprocessor">#include "inspstring.h"</span>
00021 <span class="preprocessor">#include &lt;string&gt;</span>
00022  
00023 <span class="preprocessor">#ifndef __USERS_H__ </span>
00024 <span class="preprocessor"></span><span class="preprocessor">#define __USERS_H__ </span>
00025 <span class="preprocessor"></span> 
<a name="l00026"></a><a class="code" href="users_8h.html#a0">00026</a> <span class="preprocessor">#define STATUS_OP       4</span>
<a name="l00027"></a><a class="code" href="users_8h.html#a1">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define STATUS_HOP      2</span>
<a name="l00028"></a><a class="code" href="users_8h.html#a2">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define STATUS_VOICE    1</span>
<a name="l00029"></a><a class="code" href="users_8h.html#a3">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define STATUS_NORMAL   0</span>
00030 <span class="preprocessor"></span>
<a name="l00031"></a><a class="code" href="users_8h.html#a4">00031</a> <span class="preprocessor">#define CC_ALLOW        0</span>
<a name="l00032"></a><a class="code" href="users_8h.html#a5">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define CC_DENY         1</span>
00033 <span class="preprocessor"></span>
<a name="l00036"></a><a class="code" href="classInvited.html">00036</a> <span class="keyword">class </span><a class="code" href="classInvited.html">Invited</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="classInvited.html#o0">00039</a>         <span class="keywordtype">char</span> <a class="code" href="classInvited.html#o0">channel</a>[CHANMAX];
00040 };
00041 
00042 
<a name="l00045"></a><a class="code" href="classConnectClass.html">00045</a> <span class="keyword">class </span><a class="code" href="classConnectClass.html">ConnectClass</a> : <span class="keyword">public</span> <a class="code" href="classclassbase.html">classbase</a>
00046 {
00047  <span class="keyword">public</span>:
<a name="l00050"></a><a class="code" href="classConnectClass.html#o0">00050</a>         <span class="keywordtype">int</span> <a class="code" href="classConnectClass.html#o0">type</a>;
<a name="l00053"></a><a class="code" href="classConnectClass.html#o1">00053</a>         <span class="keywordtype">int</span> <a class="code" href="classConnectClass.html#o1">registration_timeout</a>;
<a name="l00056"></a><a class="code" href="classConnectClass.html#o2">00056</a>         <span class="keywordtype">int</span> <a class="code" href="classConnectClass.html#o2">flood</a>;
<a name="l00059"></a><a class="code" href="classConnectClass.html#o3">00059</a>         <span class="keywordtype">char</span> <a class="code" href="classConnectClass.html#o3">host</a>[MAXBUF];
<a name="l00062"></a><a class="code" href="classConnectClass.html#o4">00062</a>         <span class="keywordtype">int</span> <a class="code" href="classConnectClass.html#o4">pingtime</a>;
<a name="l00065"></a><a class="code" href="classConnectClass.html#o5">00065</a>         <span class="keywordtype">char</span> <a class="code" href="classConnectClass.html#o5">pass</a>[MAXBUF];
00066 
<a name="l00069"></a><a class="code" href="classConnectClass.html#o6">00069</a>         <span class="keywordtype">long</span> <a class="code" href="classConnectClass.html#o6">threshold</a>;
00070 
<a name="l00073"></a><a class="code" href="classConnectClass.html#o7">00073</a>         <span class="keywordtype">long</span> <a class="code" href="classConnectClass.html#o7">sendqmax</a>;
00074 
<a name="l00077"></a><a class="code" href="classConnectClass.html#o8">00077</a>         <span class="keywordtype">long</span> <a class="code" href="classConnectClass.html#o8">recvqmax</a>;
00078         
<a name="l00079"></a><a class="code" href="classConnectClass.html#a0">00079</a>         <a class="code" href="classConnectClass.html#a0">ConnectClass</a>()
00080         {
00081                 <a class="code" href="classConnectClass.html#o1">registration_timeout</a> = 0;
00082                 <a class="code" href="classConnectClass.html#o2">flood</a> = 0;
00083                 <a class="code" href="classConnectClass.html#o4">pingtime</a> = 0;
00084                 <a class="code" href="classConnectClass.html#o6">threshold</a> = 0;
00085                 <a class="code" href="classConnectClass.html#o7">sendqmax</a> = 0;
00086                 <a class="code" href="classConnectClass.html#o8">recvqmax</a> = 0;
00087                 strlcpy(<a class="code" href="classConnectClass.html#o3">host</a>,<span class="stringliteral">""</span>,MAXBUF);
00088                 strlcpy(<a class="code" href="classConnectClass.html#o5">pass</a>,<span class="stringliteral">""</span>,MAXBUF);
00089         }
00090 };
00091 
<a name="l00094"></a><a class="code" href="users_8h.html#a6">00094</a> <span class="keyword">typedef</span> std::vector&lt;Invited&gt; <a class="code" href="users_8h.html#a6">InvitedList</a>;
00095 
00096 
00097 
<a name="l00100"></a><a class="code" href="users_8h.html#a7">00100</a> <span class="keyword">typedef</span> std::vector&lt;ConnectClass&gt; <a class="code" href="users_8h.html#a7">ClassVector</a>;
00101 
<a name="l00108"></a><a class="code" href="classuserrec.html">00108</a> <span class="keyword">class </span><a class="code" href="classuserrec.html">userrec</a> : <span class="keyword">public</span> <a class="code" href="classconnection.html">connection</a>
00109 {
00110  <span class="keyword">private</span>:
00111 
<a name="l00114"></a><a class="code" href="classuserrec.html#r0">00114</a>         <a class="code" href="users_8h.html#a6">InvitedList</a> <a class="code" href="classuserrec.html#r0">invites</a>;
00115  <span class="keyword">public</span>:
00116         
<a name="l00121"></a><a class="code" href="classuserrec.html#o0">00121</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o0">nick</a>[NICKMAX];
00122         
<a name="l00125"></a><a class="code" href="classuserrec.html#o1">00125</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o1">ident</a>[64];
00126 
<a name="l00130"></a><a class="code" href="classuserrec.html#o2">00130</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o2">dhost</a>[256];
00131         
<a name="l00134"></a><a class="code" href="classuserrec.html#o3">00134</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o3">fullname</a>[128];
00135         
<a name="l00140"></a><a class="code" href="classuserrec.html#o4">00140</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o4">modes</a>[MAXBUF];
00141         
<a name="l00142"></a><a class="code" href="classuserrec.html#o5">00142</a>         <a class="code" href="classucrec.html">ucrec</a> <a class="code" href="classuserrec.html#o5">chans</a>[MAXCHANS];
00143         
<a name="l00146"></a><a class="code" href="classuserrec.html#o6">00146</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o6">server</a>[256];
00147         
<a name="l00151"></a><a class="code" href="classuserrec.html#o7">00151</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o7">awaymsg</a>[512];
00152         
<a name="l00156"></a><a class="code" href="classuserrec.html#o8">00156</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o8">result</a>[256];
00157         
<a name="l00162"></a><a class="code" href="classuserrec.html#o9">00162</a>         <span class="keywordtype">int</span> <a class="code" href="classuserrec.html#o9">flood</a>;
00163         
<a name="l00168"></a><a class="code" href="classuserrec.html#o10">00168</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classuserrec.html#o10">timeout</a>;
00169         
<a name="l00175"></a><a class="code" href="classuserrec.html#o11">00175</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o11">oper</a>[NICKMAX];
00176 
<a name="l00179"></a><a class="code" href="classuserrec.html#o12">00179</a>         <span class="keywordtype">bool</span> <a class="code" href="classuserrec.html#o12">dns_done</a>;
00180 
<a name="l00183"></a><a class="code" href="classuserrec.html#o13">00183</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classuserrec.html#o13">pingmax</a>;
00184 
<a name="l00189"></a><a class="code" href="classuserrec.html#o14">00189</a>         <span class="keywordtype">char</span> <a class="code" href="classuserrec.html#o14">password</a>[MAXBUF];
00190 
<a name="l00195"></a><a class="code" href="classuserrec.html#o15">00195</a>         std::string <a class="code" href="classuserrec.html#o15">recvq</a>;
00196 
<a name="l00200"></a><a class="code" href="classuserrec.html#o16">00200</a>         std::string <a class="code" href="classuserrec.html#o16">sendq</a>;
00201 
<a name="l00204"></a><a class="code" href="classuserrec.html#o17">00204</a>         <span class="keywordtype">long</span> <a class="code" href="classuserrec.html#o17">lines_in</a>;
<a name="l00205"></a><a class="code" href="classuserrec.html#o18">00205</a>         time_t <a class="code" href="classuserrec.html#o18">reset_due</a>;
<a name="l00206"></a><a class="code" href="classuserrec.html#o19">00206</a>         <span class="keywordtype">long</span> <a class="code" href="classuserrec.html#o19">threshold</a>;
00207 
00208         <span class="comment">/* Write error string</span>
00209 <span class="comment">         */</span>
<a name="l00210"></a><a class="code" href="classuserrec.html#o20">00210</a>         std::string <a class="code" href="classuserrec.html#o20">WriteError</a>;
00211 
<a name="l00214"></a><a class="code" href="classuserrec.html#o21">00214</a>         <span class="keywordtype">long</span> <a class="code" href="classuserrec.html#o21">sendqmax</a>;
00215 
<a name="l00218"></a><a class="code" href="classuserrec.html#o22">00218</a>         <span class="keywordtype">long</span> <a class="code" href="classuserrec.html#o22">recvqmax</a>;
00219 
00220         <a class="code" href="classuserrec.html#a0">userrec</a>();
00221         
<a name="l00222"></a><a class="code" href="classuserrec.html#a1">00222</a>         <span class="keyword">virtual</span> <a class="code" href="classuserrec.html#a1">~userrec</a>() {  }
00223         
00228         <span class="keyword">virtual</span> <span class="keywordtype">char</span>* <a class="code" href="classuserrec.html#a2">GetFullHost</a>();
00229         
00235         <span class="keyword">virtual</span> <span class="keywordtype">char</span>* <a class="code" href="classuserrec.html#a3">GetFullRealHost</a>();
00236         
00239         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classuserrec.html#a4">IsInvited</a>(<span class="keywordtype">char</span>* channel);
00240         
00243         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classuserrec.html#a5">InviteTo</a>(<span class="keywordtype">char</span>* channel);
00244         
00249         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classuserrec.html#a6">RemoveInvite</a>(<span class="keywordtype">char</span>* channel);
00250         
00255         <span class="keywordtype">bool</span> <a class="code" href="classuserrec.html#a7">HasPermission</a>(<span class="keywordtype">char</span>* command);
00256 
00264         <span class="keywordtype">bool</span> <a class="code" href="classuserrec.html#a8">AddBuffer</a>(std::string a);
00265 
00269         <span class="keywordtype">bool</span> <a class="code" href="classuserrec.html#a9">BufferIsReady</a>();
00270 
00273         <span class="keywordtype">void</span> <a class="code" href="classuserrec.html#a10">ClearBuffer</a>();
00274 
00282         std::string <a class="code" href="classuserrec.html#a11">GetBuffer</a>();
00283 
00289         <span class="keywordtype">void</span> <a class="code" href="classuserrec.html#a12">SetWriteError</a>(std::string error);
00290 
00294         std::string <a class="code" href="classuserrec.html#a13">GetWriteError</a>();
00295 
00301         <span class="keywordtype">void</span> <a class="code" href="classuserrec.html#a14">AddWriteBuf</a>(std::string data);
00302 
00309         <span class="keywordtype">void</span> <a class="code" href="classuserrec.html#a15">FlushWriteBuf</a>();
00310 
00311 };
00312 
00313 
00314 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu May 12 02:25:14 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>