summaryrefslogtreecommitdiff
path: root/docs/module-doc/channels_8cpp-source.html
blob: 0ad69366d73a84c53645c6c3eaef3adf6e41b632 (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
<!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>channels.cpp Source File</title>
<link href="inspircd.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3-rc3 -->
<center>
<a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>channels.cpp</h1><a href="channels_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="preprocessor">#include "inspircd_config.h"</span> 
00002 <span class="preprocessor">#include "<a class="code" href="channels_8h.html">channels.h</a>"</span>
00003 <span class="preprocessor">#include "inspircd.h"</span>
00004 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
00005 
<a name="l00006"></a><a class="code" href="classchanrec.html#a2">00006</a> <a class="code" href="classchanrec.html#a2">chanrec::chanrec</a>()
00007 {
00008         strcpy(name,<span class="stringliteral">""</span>);
00009         strcpy(custom_modes,<span class="stringliteral">""</span>);
00010         strcpy(topic,<span class="stringliteral">""</span>);
00011         strcpy(setby,<span class="stringliteral">""</span>);
00012         strcpy(key,<span class="stringliteral">""</span>);
00013         <a class="code" href="classchanrec.html#m3">created</a> = <a class="code" href="classchanrec.html#m4">topicset</a> = <a class="code" href="classchanrec.html#m6">limit</a> = 0;
00014         <a class="code" href="classchanrec.html#m8">topiclock</a> = <a class="code" href="classchanrec.html#m9">noexternal</a> = <a class="code" href="classchanrec.html#m10">inviteonly</a> = <a class="code" href="classchanrec.html#m11">moderated</a> = <a class="code" href="classchanrec.html#m12">secret</a> = <a class="code" href="classchanrec.html#m13">c_private</a> = <span class="keyword">false</span>;
00015 }
00016 
<a name="l00017"></a><a class="code" href="classchanrec.html#a0">00017</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a0">chanrec::SetCustomMode</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">bool</span> mode_on)
00018 {
00019         <span class="keywordflow">if</span> (mode_on) {
00020                 <span class="keywordtype">char</span> m[3];
00021                 m[0] = mode;
00022                 m[1] = <span class="charliteral">'\0'</span>;
00023                 <span class="keywordflow">if</span> (!strchr(this-&gt;custom_modes,mode))
00024                 {
00025                         strncat(custom_modes,m,MAXMODES);
00026                 }
00027                 log(DEBUG,<span class="stringliteral">"Custom mode %c set"</span>,mode);
00028         }
00029         <span class="keywordflow">else</span> {
00030                 <span class="keywordtype">char</span> temp[MAXMODES];
00031                 <span class="keywordtype">int</span> count = 0;
00032                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> q = 0; q &lt; strlen(custom_modes); q++) {
00033                         <span class="keywordflow">if</span> (<a class="code" href="classchanrec.html#m1">custom_modes</a>[q] != mode) {
00034                                 temp[count++] = mode;
00035                         }
00036                 }
00037                 temp[count] = <span class="charliteral">'\0'</span>;
00038                 strncpy(custom_modes,temp,MAXMODES);
00039                 log(DEBUG,<span class="stringliteral">"Custom mode %c removed"</span>,mode);
00040         }
00041 }
00042 
<a name="l00043"></a><a class="code" href="classchanrec.html#a1">00043</a> <span class="keywordtype">void</span> <a class="code" href="classchanrec.html#a1">chanrec::SetCustomModeParam</a>(<span class="keywordtype">char</span> mode,<span class="keywordtype">char</span>* parameter,<span class="keywordtype">bool</span> mode_on)
00044 {
00045 }
00046 
00047 
00048 
</pre></div><hr><address style="align: right;"><small>Generated on Sat Apr 3 16:36:02 2004 for InspIRCd by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.3-rc3 </small></address>
</body>
</html>