summaryrefslogtreecommitdiff
path: root/docs/module-doc/channels_8h-source.html
blob: d2ae710637c72693d7f7b2b2aafa047b3d8e003d (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 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.4.4-20050815 -->
<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>
<div class="nav">
<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>
<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>
<a name="l00002"></a>00002 <span class="comment"> *       | Inspire Internet Relay Chat Daemon |</span>
<a name="l00003"></a>00003 <span class="comment"> *       +------------------------------------+</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.</span>
<a name="l00006"></a>00006 <span class="comment"> *                       E-mail:</span>
<a name="l00007"></a>00007 <span class="comment"> *                &lt;brain@chatspike.net&gt;</span>
<a name="l00008"></a>00008 <span class="comment"> *                &lt;Craig@chatspike.net&gt;</span>
<a name="l00009"></a>00009 <span class="comment"> *     </span>
<a name="l00010"></a>00010 <span class="comment"> * Written by Craig Edwards, Craig McLure, and others.</span>
<a name="l00011"></a>00011 <span class="comment"> * This program is free but copyrighted software; see</span>
<a name="l00012"></a>00012 <span class="comment"> *            the file COPYING for details.</span>
<a name="l00013"></a>00013 <span class="comment"> *</span>
<a name="l00014"></a>00014 <span class="comment"> * ---------------------------------------------------</span>
<a name="l00015"></a>00015 <span class="comment"> */</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#include "inspircd_config.h"</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include "<a class="code" href="base_8h.html">base.h</a>"</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef __CHANNELS_H__</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __CHANNELS_H__</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a><a class="code" href="channels_8h.html#CM_5FTOPICLOCK">00026</a> <span class="preprocessor">#define CM_TOPICLOCK 1</span>
<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>
<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>
<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>
<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>
<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>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="keyword">class </span><a class="code" href="classuserrec.html">userrec</a>;
<a name="l00034"></a>00034 
<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>
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040  <span class="keyword">public</span>:
<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>;
<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];
<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];
<a name="l00044"></a>00044 
<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> }
<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> }
<a name="l00047"></a>00047 };
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 <span class="comment">// banlist is inherited from HostList mainly for readability</span>
<a name="l00050"></a>00050 <span class="comment">// reasons only</span>
<a name="l00051"></a>00051 
<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>
<a name="l00055"></a>00055 {
<a name="l00056"></a>00056 };
<a name="l00057"></a>00057 
<a name="l00058"></a>00058 <span class="comment">// same with this...</span>
<a name="l00059"></a>00059 
<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>
<a name="l00063"></a>00063 {
<a name="l00064"></a>00064 };
<a name="l00065"></a>00065 
<a name="l00066"></a>00066 <span class="comment">// and this...</span>
<a name="l00067"></a>00067 
<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>
<a name="l00071"></a>00071 {
<a name="l00072"></a>00072 };
<a name="l00073"></a>00073 
<a name="l00074"></a>00074 
<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>
<a name="l00080"></a>00080 {
<a name="l00081"></a>00081  <span class="keyword">public</span>:
<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>;
<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];
<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];
<a name="l00085"></a>00085 };
<a name="l00086"></a>00086 
<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>;
<a name="l00090"></a>00090 
<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>;
<a name="l00094"></a>00094 
<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>;
<a name="l00098"></a>00098 
<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>
<a name="l00104"></a>00104 {
<a name="l00105"></a>00105  <span class="keyword">public</span>:
<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>
<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>
<a name="l00113"></a>00113 
<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>;
<a name="l00118"></a>00118         
<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];
<a name="l00125"></a><a class="code" href="classchanrec.html#created">00125</a>         time_t <a class="code" href="classchanrec.html#created">created</a>;
<a name="l00129"></a><a class="code" href="classchanrec.html#topicset">00129</a>         time_t <a class="code" href="classchanrec.html#topicset">topicset</a>;
<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];
<a name="l00134"></a>00134 
<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>;
<a name="l00139"></a>00139         
<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];
<a name="l00144"></a>00144         
<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>;
<a name="l00148"></a>00148         
<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>;
<a name="l00152"></a>00152         
<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);
<a name="l00158"></a>00158 
<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);
<a name="l00165"></a>00165  
<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);
<a name="l00171"></a>00171 
<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);
<a name="l00183"></a>00183 
<a name="l00191"></a>00191         <span class="keywordtype">long</span> <a class="code" href="classchanrec.html#GetUserCounter_28_29">GetUserCounter</a>();
<a name="l00192"></a>00192 
<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);
<a name="l00201"></a>00201 
<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);
<a name="l00210"></a>00210 
<a name="l00220"></a>00220         std::vector&lt;char*&gt; *<a class="code" href="classchanrec.html#GetUsers_28_29">GetUsers</a>();
<a name="l00221"></a>00221 
<a name="l00224"></a>00224         <a class="code" href="classchanrec.html#chanrec_28_29">chanrec</a>();
<a name="l00225"></a>00225 
<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> }
<a name="l00227"></a>00227 };
<a name="l00228"></a>00228 
<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>
<a name="l00230"></a>00230 <span class="comment"> * needs to come AFTER struct chanrec */</span>
<a name="l00231"></a>00231 
<a name="l00232"></a><a class="code" href="channels_8h.html#UCMODE_5FOP">00232</a> <span class="preprocessor">#define UCMODE_OP      1</span>
<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>
<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>
<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>
<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>
<a name="l00237"></a>00237 <span class="preprocessor"></span> 
<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>
<a name="l00244"></a>00244 {
<a name="l00245"></a>00245  <span class="keyword">public</span>:
<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>;
<a name="l00250"></a>00250         
<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>;
<a name="l00255"></a>00255 
<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> }
<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> }
<a name="l00258"></a>00258 };
<a name="l00259"></a>00259 
<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);
<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);
<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);
<a name="l00263"></a>00263 
<a name="l00264"></a>00264 <span class="preprocessor">#endif</span>
<a name="l00265"></a>00265 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Dec 14 19:16:11 2005 for InspIRCd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>
</body>
</html>