]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
Added final documentation for inspircd Beta 4
[user/henk/code/inspircd.git] / docs / module-doc / classServer.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: Server class Reference</title>
4 <link href="inspircd.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.3 -->
7 <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>
8 <h1>Server Class Reference</h1>Allows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers.  
9 <a href="#_details">More...</a>
10 <p>
11 <code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
12 <p>
13 Inherits <a class="el" href="classclassbase.html">classbase</a>.
14 <p>
15 <a href="classServer-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
16 <tr><td></td></tr>
17 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
18 <tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a0">Server</a> ()</td></tr>
19
20 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. </em> <a href="#a0"></a><em><br><br></td></tr>
21 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a1">~Server</a> ()</td></tr>
22
23 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default destructor. </em> <a href="#a1"></a><em><br><br></td></tr>
24 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a2">SendOpers</a> (std::string s)</td></tr>
25
26 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text to all opers. </em> <a href="#a2"></a><em><br><br></td></tr>
27 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a3">Log</a> (int level, std::string s)</td></tr>
28
29 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes a log string. </em> <a href="#a3"></a><em><br><br></td></tr>
30 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a4">Send</a> (int Socket, std::string s)</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a line of text down a TCP/IP socket. </em> <a href="#a4"></a><em><br><br></td></tr>
33 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a5">SendServ</a> (int Socket, std::string s)</td></tr>
34
35 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from the server to a socket. </em> <a href="#a5"></a><em><br><br></td></tr>
36 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a6">SendChannelServerNotice</a> (std::string ServName, <a class="el" href="classchanrec.html">chanrec</a> *Channel, std::string text)</td></tr>
37
38 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes text to a channel, but from a server, including all. </em> <a href="#a6"></a><em><br><br></td></tr>
39 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a7">SendFrom</a> (int Socket, <a class="el" href="classuserrec.html">userrec</a> *User, std::string s)</td></tr>
40
41 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to a socket. </em> <a href="#a7"></a><em><br><br></td></tr>
42 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a8">SendTo</a> (<a class="el" href="classuserrec.html">userrec</a> *Source, <a class="el" href="classuserrec.html">userrec</a> *Dest, std::string s)</td></tr>
43
44 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to another user. </em> <a href="#a8"></a><em><br><br></td></tr>
45 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a9">SendChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Channel, std::string s, bool IncludeSender)</td></tr>
46
47 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to a channel (mulicast). </em> <a href="#a9"></a><em><br><br></td></tr>
48 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a10">CommonChannels</a> (<a class="el" href="classuserrec.html">userrec</a> *u1, <a class="el" href="classuserrec.html">userrec</a> *u2)</td></tr>
49
50 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if two users share a common channel. </em> <a href="#a10"></a><em><br><br></td></tr>
51 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a11">SendCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *User, std::string text, bool IncludeSender)</td></tr>
52
53 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to one or more channels (mulicast). </em> <a href="#a11"></a><em><br><br></td></tr>
54 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a12">SendWallops</a> (<a class="el" href="classuserrec.html">userrec</a> *User, std::string text)</td></tr>
55
56 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a WALLOPS message. </em> <a href="#a12"></a><em><br><br></td></tr>
57 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a13">IsNick</a> (std::string nick)</td></tr>
58
59 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if a nick is valid. </em> <a href="#a13"></a><em><br><br></td></tr>
60 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a14">CountUsers</a> (<a class="el" href="classchanrec.html">chanrec</a> *c)</td></tr>
61
62 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a count of the number of users on a channel. </em> <a href="#a14"></a><em><br><br></td></tr>
63 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a15">FindNick</a> (std::string nick)</td></tr>
64
65 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to look up a nick and return a pointer to it. </em> <a href="#a15"></a><em><br><br></td></tr>
66 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a16">FindDescriptor</a> (int socket)</td></tr>
67
68 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to look up a nick using the file descriptor associated with that nick. </em> <a href="#a16"></a><em><br><br></td></tr>
69 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a17">FindChannel</a> (std::string channel)</td></tr>
70
71 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to look up a channel and return a pointer to it. </em> <a href="#a17"></a><em><br><br></td></tr>
72 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a18">ChanMode</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Chan)</td></tr>
73
74 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to look up a user's privilages on a channel. </em> <a href="#a18"></a><em><br><br></td></tr>
75 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a19">IsOnChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Chan)</td></tr>
76
77 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks if a user is on a channel. </em> <a href="#a19"></a><em><br><br></td></tr>
78 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a20">GetServerName</a> ()</td></tr>
79
80 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the server name of the server where the module is loaded. </em> <a href="#a20"></a><em><br><br></td></tr>
81 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a21">GetNetworkName</a> ()</td></tr>
82
83 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the network name, global to all linked servers. </em> <a href="#a21"></a><em><br><br></td></tr>
84 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classAdmin.html">Admin</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a22">GetAdmin</a> ()</td></tr>
85
86 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the information of the server as returned by the /ADMIN command. </em> <a href="#a22"></a><em><br><br></td></tr>
87 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a23">AddExtendedMode</a> (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)</td></tr>
88
89 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds an extended mode letter which is parsed by a module. </em> <a href="#a23"></a><em><br><br></td></tr>
90 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a24">AddExtendedListMode</a> (char modechar)</td></tr>
91
92 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds an extended mode letter which is parsed by a module and handled in a list fashion. </em> <a href="#a24"></a><em><br><br></td></tr>
93 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a25">AddCommand</a> (char *cmd, handlerfunc f, char flags, int minparams, char *source)</td></tr>
94
95 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a command to the command table. </em> <a href="#a25"></a><em><br><br></td></tr>
96 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a26">SendMode</a> (char **parameters, int pcnt, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
97
98 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a servermode. </em> <a href="#a26"></a><em><br><br></td></tr>
99 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a27">SendToModeMask</a> (std::string modes, int flags, std::string text)</td></tr>
100
101 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter. </em> <a href="#a27"></a><em><br><br></td></tr>
102 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a28">JoinUserToChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string cname, std::string key)</td></tr>
103
104 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user to join a channel. </em> <a href="#a28"></a><em><br><br></td></tr>
105 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a29">PartUserFromChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string cname, std::string reason)</td></tr>
106
107 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user to part a channel. </em> <a href="#a29"></a><em><br><br></td></tr>
108 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a30">ChangeUserNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string nickname)</td></tr>
109
110 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user nickchange. </em> <a href="#a30"></a><em><br><br></td></tr>
111 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a31">QuitUser</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string reason)</td></tr>
112
113 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user to quit with the specified reason. </em> <a href="#a31"></a><em><br><br></td></tr>
114 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a32">MatchText</a> (std::string sliteral, std::string spattern)</td></tr>
115
116 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Matches text against a glob pattern. </em> <a href="#a32"></a><em><br><br></td></tr>
117 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a33">CallCommandHandler</a> (std::string commandname, char **parameters, int pcnt, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
118
119 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calls the handler for a command, either implemented by the core or by another module. </em> <a href="#a33"></a><em><br><br></td></tr>
120 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a34">ChangeHost</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string host)</td></tr>
121
122 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change displayed hostname of a user. </em> <a href="#a34"></a><em><br><br></td></tr>
123 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a35">ChangeGECOS</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string gecos)</td></tr>
124
125 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change GECOS (fullname) of a user. </em> <a href="#a35"></a><em><br><br></td></tr>
126 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a36">IsUlined</a> (std::string server)</td></tr>
127
128 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the servername you give is ulined. </em> <a href="#a36"></a><em><br><br></td></tr>
129 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="modules_8h.html#a33">chanuserlist</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a37">GetUsers</a> (<a class="el" href="classchanrec.html">chanrec</a> *chan)</td></tr>
130
131 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetches the userlist of a channel. </em> <a href="#a37"></a><em><br><br></td></tr>
132 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a38">UserToPseudo</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string message)</td></tr>
133
134 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a user's connection to the irc server, but leave their client in existence in the user hash. </em> <a href="#a38"></a><em><br><br></td></tr>
135 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a39">PseudoToUser</a> (<a class="el" href="classuserrec.html">userrec</a> *alive, <a class="el" href="classuserrec.html">userrec</a> *zombie, std::string message)</td></tr>
136
137 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other. </em> <a href="#a39"></a><em><br><br></td></tr>
138 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a40">AddGLine</a> (long duration, std::string source, std::string reason, std::string hostmask)</td></tr>
139
140 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added. </em> <a href="#a40"></a><em><br><br></td></tr>
141 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a41">AddQLine</a> (long duration, std::string source, std::string reason, std::string nickname)</td></tr>
142
143 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added. </em> <a href="#a41"></a><em><br><br></td></tr>
144 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a42">AddZLine</a> (long duration, std::string source, std::string reason, std::string ipaddr)</td></tr>
145
146 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added. </em> <a href="#a42"></a><em><br><br></td></tr>
147 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a43">AddKLine</a> (long duration, std::string source, std::string reason, std::string hostmask)</td></tr>
148
149 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a K-line The K-line is enforced as soon as it is added. </em> <a href="#a43"></a><em><br><br></td></tr>
150 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a44">AddELine</a> (long duration, std::string source, std::string reason, std::string hostmask)</td></tr>
151
152 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a E-line The E-line is enforced as soon as it is added. </em> <a href="#a44"></a><em><br><br></td></tr>
153 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a45">DelGLine</a> (std::string hostmask)</td></tr>
154
155 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a G-Line from all servers on the mesh. </em> <a href="#a45"></a><em><br><br></td></tr>
156 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a46">DelQLine</a> (std::string nickname)</td></tr>
157
158 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a Q-Line from all servers on the mesh. </em> <a href="#a46"></a><em><br><br></td></tr>
159 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a47">DelZLine</a> (std::string ipaddr)</td></tr>
160
161 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a Z-Line from all servers on the mesh. </em> <a href="#a47"></a><em><br><br></td></tr>
162 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a48">DelKLine</a> (std::string hostmask)</td></tr>
163
164 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a local K-Line. </em> <a href="#a48"></a><em><br><br></td></tr>
165 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a49">DelELine</a> (std::string hostmask)</td></tr>
166
167 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a local E-Line. </em> <a href="#a49"></a><em><br><br></td></tr>
168 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a50">CalcDuration</a> (std::string duration)</td></tr>
169
170 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculates a duration This method will take a string containing a formatted duration (e.g. </em> <a href="#a50"></a><em><br><br></td></tr>
171 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a51">IsValidMask</a> (std::string mask)</td></tr>
172
173 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if a nick!ident string is correctly formatted, false if otherwise. </em> <a href="#a51"></a><em><br><br></td></tr>
174 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a52">MeshSendAll</a> (std::string text)</td></tr>
175
176 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a line of text to all connected servers. </em> <a href="#a52"></a><em><br><br></td></tr>
177 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a53">MeshSendCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string text)</td></tr>
178
179 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method sends a line of text to all servers who have users which share common channels with the user you provide. </em> <a href="#a53"></a><em><br><br></td></tr>
180 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a54">MeshSendAllAlive</a> (std::string text)</td></tr>
181
182 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable. </em> <a href="#a54"></a><em><br><br></td></tr>
183 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a55">MeshSendUnicast</a> (std::string destination, std::string text)</td></tr>
184
185 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function sends a line of text directly to a server. </em> <a href="#a55"></a><em><br><br></td></tr>
186 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a56">MeshSendAllExcept</a> (std::string target, std::string text)</td></tr>
187
188 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function sends to all servers EXCEPT the one you specify. </em> <a href="#a56"></a><em><br><br></td></tr>
189 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a57">MeshCheckChan</a> (<a class="el" href="classchanrec.html">chanrec</a> *c, std::string servername)</td></tr>
190
191 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function is used to check if any users on channel c are on server servername. </em> <a href="#a57"></a><em><br><br></td></tr>
192 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a58">MeshCheckCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *u, std::string servername)</td></tr>
193
194 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function is used to check if user u has any channels in common with users on servername. </em> <a href="#a58"></a><em><br><br></td></tr>
195 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classModule.html">Module</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a59">FindModule</a> (std::string name)</td></tr>
196
197 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function finds a module by name. </em> <a href="#a59"></a><em><br><br></td></tr>
198 </table>
199 <hr><a name="_details"></a><h2>Detailed Description</h2>
200 Allows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers. 
201 <p>
202 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. 
203 <p>
204
205 <p>
206 Definition at line <a class="el" href="modules_8h-source.html#l00694">694</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
207 <a name="a0" doxytag="Server::Server"></a><p>
208 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
209   <tr>
210     <td class="mdRow">
211       <table cellpadding="0" cellspacing="0" border="0">
212         <tr>
213           <td class="md" nowrap valign="top"> Server::Server </td>
214           <td class="md" valign="top">(&nbsp;</td>
215           <td class="mdname1" valign="top" nowrap>          </td>
216           <td class="md" valign="top">&nbsp;)&nbsp;</td>
217           <td class="md" nowrap></td>
218         </tr>
219
220       </table>
221     </td>
222   </tr>
223 </table>
224 <table cellspacing=5 cellpadding=0 border=0>
225   <tr>
226     <td>
227       &nbsp;
228     </td>
229     <td>
230
231 <p>
232 Default constructor. 
233 <p>
234 Creates a Server object.
235 <p>
236 Definition at line <a class="el" href="modules_8cpp-source.html#l00421">421</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
237 <p>
238 <div class="fragment"><pre>00422 {
239 00423 }
240 </pre></div>    </td>
241   </tr>
242 </table>
243 <a name="a1" doxytag="Server::~Server"></a><p>
244 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
245   <tr>
246     <td class="mdRow">
247       <table cellpadding="0" cellspacing="0" border="0">
248         <tr>
249           <td class="md" nowrap valign="top"> Server::~<a class="el" href="classServer.html">Server</a> </td>
250           <td class="md" valign="top">(&nbsp;</td>
251           <td class="mdname1" valign="top" nowrap>          </td>
252           <td class="md" valign="top">&nbsp;)&nbsp;</td>
253           <td class="md" nowrap><code> [virtual]</code></td>
254         </tr>
255
256       </table>
257     </td>
258   </tr>
259 </table>
260 <table cellspacing=5 cellpadding=0 border=0>
261   <tr>
262     <td>
263       &nbsp;
264     </td>
265     <td>
266
267 <p>
268 Default destructor. 
269 <p>
270 Destroys a Server object.
271 <p>
272 Definition at line <a class="el" href="modules_8cpp-source.html#l00425">425</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
273 <p>
274 <div class="fragment"><pre>00426 {
275 00427 }
276 </pre></div>    </td>
277   </tr>
278 </table>
279 <hr><h2>Member Function Documentation</h2>
280 <a name="a25" doxytag="Server::AddCommand"></a><p>
281 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
282   <tr>
283     <td class="mdRow">
284       <table cellpadding="0" cellspacing="0" border="0">
285         <tr>
286           <td class="md" nowrap valign="top"> void Server::AddCommand </td>
287           <td class="md" valign="top">(&nbsp;</td>
288           <td class="md" nowrap valign="top">char *&nbsp;</td>
289           <td class="mdname" nowrap> <em>cmd</em>, </td>
290         </tr>
291         <tr>
292           <td></td>
293           <td></td>
294           <td class="md" nowrap>handlerfunc&nbsp;</td>
295           <td class="mdname" nowrap> <em>f</em>, </td>
296         </tr>
297         <tr>
298           <td></td>
299           <td></td>
300           <td class="md" nowrap>char&nbsp;</td>
301           <td class="mdname" nowrap> <em>flags</em>, </td>
302         </tr>
303         <tr>
304           <td></td>
305           <td></td>
306           <td class="md" nowrap>int&nbsp;</td>
307           <td class="mdname" nowrap> <em>minparams</em>, </td>
308         </tr>
309         <tr>
310           <td></td>
311           <td></td>
312           <td class="md" nowrap>char *&nbsp;</td>
313           <td class="mdname" nowrap> <em>source</em></td>
314         </tr>
315         <tr>
316           <td></td>
317           <td class="md">)&nbsp;</td>
318           <td class="md" colspan="2"><code> [virtual]</code></td>
319         </tr>
320
321       </table>
322     </td>
323   </tr>
324 </table>
325 <table cellspacing=5 cellpadding=0 border=0>
326   <tr>
327     <td>
328       &nbsp;
329     </td>
330     <td>
331
332 <p>
333 Adds a command to the command table. 
334 <p>
335 This allows modules to add extra commands into the command table. You must place a function within your module which is is of type handlerfunc:<p>
336 typedef void (handlerfunc) (char**, int, userrec*); ... void <a class="el" href="commands_8h.html#a5">handle_kill(char **parameters, int pcnt, userrec *user)</a><p>
337 When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'. The source parameter is used for resource tracking, and should contain the name of your module (with file extension) e.g. "m_blarp.so". If you place the wrong identifier here, you can cause crashes if your module is unloaded.
338 <p>
339 Definition at line <a class="el" href="modules_8cpp-source.html#l00494">494</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
340 <p>
341 References <a class="el" href="modules_8h.html#a35">createcommand()</a>.
342 <p>
343 <div class="fragment"><pre>00495 {
344 00496         <a class="code" href="modules_8h.html#a35">createcommand</a>(cmd,f,flags,minparams,source);
345 00497 }
346 </pre></div>    </td>
347   </tr>
348 </table>
349 <a name="a44" doxytag="Server::AddELine"></a><p>
350 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
351   <tr>
352     <td class="mdRow">
353       <table cellpadding="0" cellspacing="0" border="0">
354         <tr>
355           <td class="md" nowrap valign="top"> void Server::AddELine </td>
356           <td class="md" valign="top">(&nbsp;</td>
357           <td class="md" nowrap valign="top">long&nbsp;</td>
358           <td class="mdname" nowrap> <em>duration</em>, </td>
359         </tr>
360         <tr>
361           <td></td>
362           <td></td>
363           <td class="md" nowrap>std::string&nbsp;</td>
364           <td class="mdname" nowrap> <em>source</em>, </td>
365         </tr>
366         <tr>
367           <td></td>
368           <td></td>
369           <td class="md" nowrap>std::string&nbsp;</td>
370           <td class="mdname" nowrap> <em>reason</em>, </td>
371         </tr>
372         <tr>
373           <td></td>
374           <td></td>
375           <td class="md" nowrap>std::string&nbsp;</td>
376           <td class="mdname" nowrap> <em>hostmask</em></td>
377         </tr>
378         <tr>
379           <td></td>
380           <td class="md">)&nbsp;</td>
381           <td class="md" colspan="2"><code> [virtual]</code></td>
382         </tr>
383
384       </table>
385     </td>
386   </tr>
387 </table>
388 <table cellspacing=5 cellpadding=0 border=0>
389   <tr>
390     <td>
391       &nbsp;
392     </td>
393     <td>
394
395 <p>
396 Adds a E-line The E-line is enforced as soon as it is added. 
397 <p>
398 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a50">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. 
399 <p>
400 Definition at line <a class="el" href="modules_8cpp-source.html#l00731">731</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
401 <p>
402 References <a class="el" href="xline_8h.html#a5">add_eline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
403 <p>
404 <div class="fragment"><pre>00732 {
405 00733         <a class="code" href="xline_8h.html#a5">add_eline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
406 00734 }
407 </pre></div>    </td>
408   </tr>
409 </table>
410 <a name="a24" doxytag="Server::AddExtendedListMode"></a><p>
411 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
412   <tr>
413     <td class="mdRow">
414       <table cellpadding="0" cellspacing="0" border="0">
415         <tr>
416           <td class="md" nowrap valign="top"> bool Server::AddExtendedListMode </td>
417           <td class="md" valign="top">(&nbsp;</td>
418           <td class="md" nowrap valign="top">char&nbsp;</td>
419           <td class="mdname1" valign="top" nowrap> <em>modechar</em>          </td>
420           <td class="md" valign="top">&nbsp;)&nbsp;</td>
421           <td class="md" nowrap><code> [virtual]</code></td>
422         </tr>
423
424       </table>
425     </td>
426   </tr>
427 </table>
428 <table cellspacing=5 cellpadding=0 border=0>
429   <tr>
430     <td>
431       &nbsp;
432     </td>
433     <td>
434
435 <p>
436 Adds an extended mode letter which is parsed by a module and handled in a list fashion. 
437 <p>
438 This call is used to implement modes like +q and +a. The characteristics of these modes are as follows:<p>
439 (1) They are ALWAYS on channels, not on users, therefore their type is MT_CHANNEL<p>
440 (2) They always take exactly one parameter when being added or removed<p>
441 (3) They can be set multiple times, usually on users in channels<p>
442 (4) The mode and its parameter are NOT stored in the channels modes structure<p>
443 It is down to the module handling the mode to maintain state and determine what 'items' (e.g. users, or a banlist) have the mode set on them, and process the modes at the correct times, e.g. during access checks on channels, etc. When the extended mode is triggered the OnExtendedMode method will be triggered as above. Note that the target you are given will be a channel, if for example your mode is set 'on a user' (in for example +a) you must use Server::Find to locate the user the mode is operating on. Your mode handler may return 1 to handle the mode AND tell the core to display the mode change, e.g. '+aaa one two three' in the case of the mode for 'two', or it may return -1 to 'eat' the mode change, so the above example would become '+aa one three' after processing.
444 <p>
445 Definition at line <a class="el" href="modules_8cpp-source.html#l00657">657</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
446 <p>
447 References <a class="el" href="modules_8cpp-source.html#l00275">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00285">ModeMakeList()</a>, and <a class="el" href="modules_8h-source.html#l00031">MT_CHANNEL</a>.
448 <p>
449 <div class="fragment"><pre>00658 {
450 00659         <span class="keywordtype">bool</span> res = <a class="code" href="modules_8cpp.html#a58">DoAddExtendedMode</a>(modechar,MT_CHANNEL,<span class="keyword">false</span>,1,1);
451 00660         <span class="keywordflow">if</span> (res)
452 00661                 <a class="code" href="modules_8cpp.html#a59">ModeMakeList</a>(modechar);
453 00662         <span class="keywordflow">return</span> res;
454 00663 }
455 </pre></div>    </td>
456   </tr>
457 </table>
458 <a name="a23" doxytag="Server::AddExtendedMode"></a><p>
459 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
460   <tr>
461     <td class="mdRow">
462       <table cellpadding="0" cellspacing="0" border="0">
463         <tr>
464           <td class="md" nowrap valign="top"> bool Server::AddExtendedMode </td>
465           <td class="md" valign="top">(&nbsp;</td>
466           <td class="md" nowrap valign="top">char&nbsp;</td>
467           <td class="mdname" nowrap> <em>modechar</em>, </td>
468         </tr>
469         <tr>
470           <td></td>
471           <td></td>
472           <td class="md" nowrap>int&nbsp;</td>
473           <td class="mdname" nowrap> <em>type</em>, </td>
474         </tr>
475         <tr>
476           <td></td>
477           <td></td>
478           <td class="md" nowrap>bool&nbsp;</td>
479           <td class="mdname" nowrap> <em>requires_oper</em>, </td>
480         </tr>
481         <tr>
482           <td></td>
483           <td></td>
484           <td class="md" nowrap>int&nbsp;</td>
485           <td class="mdname" nowrap> <em>params_when_on</em>, </td>
486         </tr>
487         <tr>
488           <td></td>
489           <td></td>
490           <td class="md" nowrap>int&nbsp;</td>
491           <td class="mdname" nowrap> <em>params_when_off</em></td>
492         </tr>
493         <tr>
494           <td></td>
495           <td class="md">)&nbsp;</td>
496           <td class="md" colspan="2"><code> [virtual]</code></td>
497         </tr>
498
499       </table>
500     </td>
501   </tr>
502 </table>
503 <table cellspacing=5 cellpadding=0 border=0>
504   <tr>
505     <td>
506       &nbsp;
507     </td>
508     <td>
509
510 <p>
511 Adds an extended mode letter which is parsed by a module. 
512 <p>
513 This allows modules to add extra mode letters, e.g. +x for hostcloak. the "type" parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects.
514 <p>
515 Definition at line <a class="el" href="modules_8cpp-source.html#l00629">629</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
516 <p>
517 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, <a class="el" href="modules_8cpp-source.html#l00275">DoAddExtendedMode()</a>, <a class="el" href="modules_8h-source.html#l00032">MT_CLIENT</a>, and <a class="el" href="modules_8h-source.html#l00033">MT_SERVER</a>.
518 <p>
519 <div class="fragment"><pre>00630 {
520 00631         <span class="keywordflow">if</span> (((modechar &gt;= <span class="charliteral">'A'</span>) &amp;&amp; (modechar &lt;= 'Z')) || ((modechar &gt;= <span class="charliteral">'a'</span>) &amp;&amp; (modechar &lt;= <span class="charliteral">'z'</span>)))
521 00632         {
522 00633                 <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>)
523 00634                 {
524 00635                         log(DEBUG,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
525 00636                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
526 00637                 }
527 00638                 <span class="keywordflow">if</span> (((params_when_on&gt;0) || (params_when_off&gt;0)) &amp;&amp; (type == <a class="code" href="modules_8h.html#a6">MT_CLIENT</a>))
528 00639                 {
529 00640                         log(DEBUG,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
530 00641                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
531 00642                 }
532 00643                 <span class="keywordflow">if</span> ((params_when_on&gt;1) || (params_when_off&gt;1))
533 00644                 {
534 00645                         log(DEBUG,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
535 00646                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
536 00647                 }
537 00648                 <span class="keywordflow">return</span> <a class="code" href="modules_8cpp.html#a58">DoAddExtendedMode</a>(modechar,type,requires_oper,params_when_on,params_when_off);
538 00649         }
539 00650         <span class="keywordflow">else</span>
540 00651         {
541 00652                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Muppet modechar detected."</span>);
542 00653         }
543 00654         <span class="keywordflow">return</span> <span class="keyword">false</span>;
544 00655 }
545 </pre></div>    </td>
546   </tr>
547 </table>
548 <a name="a40" doxytag="Server::AddGLine"></a><p>
549 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
550   <tr>
551     <td class="mdRow">
552       <table cellpadding="0" cellspacing="0" border="0">
553         <tr>
554           <td class="md" nowrap valign="top"> void Server::AddGLine </td>
555           <td class="md" valign="top">(&nbsp;</td>
556           <td class="md" nowrap valign="top">long&nbsp;</td>
557           <td class="mdname" nowrap> <em>duration</em>, </td>
558         </tr>
559         <tr>
560           <td></td>
561           <td></td>
562           <td class="md" nowrap>std::string&nbsp;</td>
563           <td class="mdname" nowrap> <em>source</em>, </td>
564         </tr>
565         <tr>
566           <td></td>
567           <td></td>
568           <td class="md" nowrap>std::string&nbsp;</td>
569           <td class="mdname" nowrap> <em>reason</em>, </td>
570         </tr>
571         <tr>
572           <td></td>
573           <td></td>
574           <td class="md" nowrap>std::string&nbsp;</td>
575           <td class="mdname" nowrap> <em>hostmask</em></td>
576         </tr>
577         <tr>
578           <td></td>
579           <td class="md">)&nbsp;</td>
580           <td class="md" colspan="2"><code> [virtual]</code></td>
581         </tr>
582
583       </table>
584     </td>
585   </tr>
586 </table>
587 <table cellspacing=5 cellpadding=0 border=0>
588   <tr>
589     <td>
590       &nbsp;
591     </td>
592     <td>
593
594 <p>
595 Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added. 
596 <p>
597 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a50">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
598 <p>
599 Definition at line <a class="el" href="modules_8cpp-source.html#l00711">711</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
600 <p>
601 References <a class="el" href="xline_8h.html#a1">add_gline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
602 <p>
603 <div class="fragment"><pre>00712 {
604 00713         <a class="code" href="xline_8h.html#a1">add_gline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
605 00714 }
606 </pre></div>    </td>
607   </tr>
608 </table>
609 <a name="a43" doxytag="Server::AddKLine"></a><p>
610 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
611   <tr>
612     <td class="mdRow">
613       <table cellpadding="0" cellspacing="0" border="0">
614         <tr>
615           <td class="md" nowrap valign="top"> void Server::AddKLine </td>
616           <td class="md" valign="top">(&nbsp;</td>
617           <td class="md" nowrap valign="top">long&nbsp;</td>
618           <td class="mdname" nowrap> <em>duration</em>, </td>
619         </tr>
620         <tr>
621           <td></td>
622           <td></td>
623           <td class="md" nowrap>std::string&nbsp;</td>
624           <td class="mdname" nowrap> <em>source</em>, </td>
625         </tr>
626         <tr>
627           <td></td>
628           <td></td>
629           <td class="md" nowrap>std::string&nbsp;</td>
630           <td class="mdname" nowrap> <em>reason</em>, </td>
631         </tr>
632         <tr>
633           <td></td>
634           <td></td>
635           <td class="md" nowrap>std::string&nbsp;</td>
636           <td class="mdname" nowrap> <em>hostmask</em></td>
637         </tr>
638         <tr>
639           <td></td>
640           <td class="md">)&nbsp;</td>
641           <td class="md" colspan="2"><code> [virtual]</code></td>
642         </tr>
643
644       </table>
645     </td>
646   </tr>
647 </table>
648 <table cellspacing=5 cellpadding=0 border=0>
649   <tr>
650     <td>
651       &nbsp;
652     </td>
653     <td>
654
655 <p>
656 Adds a K-line The K-line is enforced as soon as it is added. 
657 <p>
658 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a50">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. 
659 <p>
660 Definition at line <a class="el" href="modules_8cpp-source.html#l00726">726</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
661 <p>
662 References <a class="el" href="xline_8h.html#a4">add_kline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
663 <p>
664 <div class="fragment"><pre>00727 {
665 00728         <a class="code" href="xline_8h.html#a4">add_kline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
666 00729 }
667 </pre></div>    </td>
668   </tr>
669 </table>
670 <a name="a41" doxytag="Server::AddQLine"></a><p>
671 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
672   <tr>
673     <td class="mdRow">
674       <table cellpadding="0" cellspacing="0" border="0">
675         <tr>
676           <td class="md" nowrap valign="top"> void Server::AddQLine </td>
677           <td class="md" valign="top">(&nbsp;</td>
678           <td class="md" nowrap valign="top">long&nbsp;</td>
679           <td class="mdname" nowrap> <em>duration</em>, </td>
680         </tr>
681         <tr>
682           <td></td>
683           <td></td>
684           <td class="md" nowrap>std::string&nbsp;</td>
685           <td class="mdname" nowrap> <em>source</em>, </td>
686         </tr>
687         <tr>
688           <td></td>
689           <td></td>
690           <td class="md" nowrap>std::string&nbsp;</td>
691           <td class="mdname" nowrap> <em>reason</em>, </td>
692         </tr>
693         <tr>
694           <td></td>
695           <td></td>
696           <td class="md" nowrap>std::string&nbsp;</td>
697           <td class="mdname" nowrap> <em>nickname</em></td>
698         </tr>
699         <tr>
700           <td></td>
701           <td class="md">)&nbsp;</td>
702           <td class="md" colspan="2"><code> [virtual]</code></td>
703         </tr>
704
705       </table>
706     </td>
707   </tr>
708 </table>
709 <table cellspacing=5 cellpadding=0 border=0>
710   <tr>
711     <td>
712       &nbsp;
713     </td>
714     <td>
715
716 <p>
717 Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added. 
718 <p>
719 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a50">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. 
720 <p>
721 Definition at line <a class="el" href="modules_8cpp-source.html#l00716">716</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
722 <p>
723 References <a class="el" href="xline_8h.html#a2">add_qline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
724 <p>
725 <div class="fragment"><pre>00717 {
726 00718         <a class="code" href="xline_8h.html#a2">add_qline</a>(duration, source.c_str(), reason.c_str(), nickname.c_str());
727 00719 }
728 </pre></div>    </td>
729   </tr>
730 </table>
731 <a name="a42" doxytag="Server::AddZLine"></a><p>
732 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
733   <tr>
734     <td class="mdRow">
735       <table cellpadding="0" cellspacing="0" border="0">
736         <tr>
737           <td class="md" nowrap valign="top"> void Server::AddZLine </td>
738           <td class="md" valign="top">(&nbsp;</td>
739           <td class="md" nowrap valign="top">long&nbsp;</td>
740           <td class="mdname" nowrap> <em>duration</em>, </td>
741         </tr>
742         <tr>
743           <td></td>
744           <td></td>
745           <td class="md" nowrap>std::string&nbsp;</td>
746           <td class="mdname" nowrap> <em>source</em>, </td>
747         </tr>
748         <tr>
749           <td></td>
750           <td></td>
751           <td class="md" nowrap>std::string&nbsp;</td>
752           <td class="mdname" nowrap> <em>reason</em>, </td>
753         </tr>
754         <tr>
755           <td></td>
756           <td></td>
757           <td class="md" nowrap>std::string&nbsp;</td>
758           <td class="mdname" nowrap> <em>ipaddr</em></td>
759         </tr>
760         <tr>
761           <td></td>
762           <td class="md">)&nbsp;</td>
763           <td class="md" colspan="2"><code> [virtual]</code></td>
764         </tr>
765
766       </table>
767     </td>
768   </tr>
769 </table>
770 <table cellspacing=5 cellpadding=0 border=0>
771   <tr>
772     <td>
773       &nbsp;
774     </td>
775     <td>
776
777 <p>
778 Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added. 
779 <p>
780 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a50">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. 
781 <p>
782 Definition at line <a class="el" href="modules_8cpp-source.html#l00721">721</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
783 <p>
784 References <a class="el" href="xline_8h.html#a3">add_zline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
785 <p>
786 <div class="fragment"><pre>00722 {
787 00723         <a class="code" href="xline_8h.html#a3">add_zline</a>(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
788 00724 }
789 </pre></div>    </td>
790   </tr>
791 </table>
792 <a name="a50" doxytag="Server::CalcDuration"></a><p>
793 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
794   <tr>
795     <td class="mdRow">
796       <table cellpadding="0" cellspacing="0" border="0">
797         <tr>
798           <td class="md" nowrap valign="top"> long Server::CalcDuration </td>
799           <td class="md" valign="top">(&nbsp;</td>
800           <td class="md" nowrap valign="top">std::string&nbsp;</td>
801           <td class="mdname1" valign="top" nowrap> <em>duration</em>          </td>
802           <td class="md" valign="top">&nbsp;)&nbsp;</td>
803           <td class="md" nowrap><code> [virtual]</code></td>
804         </tr>
805
806       </table>
807     </td>
808   </tr>
809 </table>
810 <table cellspacing=5 cellpadding=0 border=0>
811   <tr>
812     <td>
813       &nbsp;
814     </td>
815     <td>
816
817 <p>
818 Calculates a duration This method will take a string containing a formatted duration (e.g. 
819 <p>
820 "1w2d") and return its value as a total number of seconds. This is the same function used internally by /GLINE etc to set the ban times.
821 <p>
822 Definition at line <a class="el" href="modules_8cpp-source.html#l00761">761</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
823 <p>
824 References <a class="el" href="commands_8h.html#a75">duration()</a>.
825 <p>
826 <div class="fragment"><pre>00762 {
827 00763         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#a75">duration</a>(delta.c_str());
828 00764 }
829 </pre></div>    </td>
830   </tr>
831 </table>
832 <a name="a33" doxytag="Server::CallCommandHandler"></a><p>
833 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
834   <tr>
835     <td class="mdRow">
836       <table cellpadding="0" cellspacing="0" border="0">
837         <tr>
838           <td class="md" nowrap valign="top"> void Server::CallCommandHandler </td>
839           <td class="md" valign="top">(&nbsp;</td>
840           <td class="md" nowrap valign="top">std::string&nbsp;</td>
841           <td class="mdname" nowrap> <em>commandname</em>, </td>
842         </tr>
843         <tr>
844           <td></td>
845           <td></td>
846           <td class="md" nowrap>char **&nbsp;</td>
847           <td class="mdname" nowrap> <em>parameters</em>, </td>
848         </tr>
849         <tr>
850           <td></td>
851           <td></td>
852           <td class="md" nowrap>int&nbsp;</td>
853           <td class="mdname" nowrap> <em>pcnt</em>, </td>
854         </tr>
855         <tr>
856           <td></td>
857           <td></td>
858           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
859           <td class="mdname" nowrap> <em>user</em></td>
860         </tr>
861         <tr>
862           <td></td>
863           <td class="md">)&nbsp;</td>
864           <td class="md" colspan="2"><code> [virtual]</code></td>
865         </tr>
866
867       </table>
868     </td>
869   </tr>
870 </table>
871 <table cellspacing=5 cellpadding=0 border=0>
872   <tr>
873     <td>
874       &nbsp;
875     </td>
876     <td>
877
878 <p>
879 Calls the handler for a command, either implemented by the core or by another module. 
880 <p>
881 You can use this function to trigger other commands in the ircd, such as PRIVMSG, JOIN, KICK etc, or even as a method of callback. By defining command names that are untypeable for users on irc (e.g. those which contain a  or <br>
882 ) you may use them as callback identifiers. The first parameter to this method is the name of the command handler you wish to call, e.g. PRIVMSG. This will be a command handler previously registered by the core or wih <a class="el" href="classServer.html#a25">AddCommand()</a>. The second parameter is an array of parameters, and the third parameter is a count of parameters in the array. If you do not pass enough parameters to meet the minimum needed by the handler, the functiom will silently ignore it. The final parameter is the user executing the command handler, used for privilage checks, etc.
883 <p>
884 Definition at line <a class="el" href="modules_8cpp-source.html#l00484">484</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
885 <p>
886 <div class="fragment"><pre>00485 {
887 00486         call_handler(commandname.c_str(),parameters,pcnt,user);
888 00487 }
889 </pre></div>    </td>
890   </tr>
891 </table>
892 <a name="a35" doxytag="Server::ChangeGECOS"></a><p>
893 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
894   <tr>
895     <td class="mdRow">
896       <table cellpadding="0" cellspacing="0" border="0">
897         <tr>
898           <td class="md" nowrap valign="top"> void Server::ChangeGECOS </td>
899           <td class="md" valign="top">(&nbsp;</td>
900           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
901           <td class="mdname" nowrap> <em>user</em>, </td>
902         </tr>
903         <tr>
904           <td></td>
905           <td></td>
906           <td class="md" nowrap>std::string&nbsp;</td>
907           <td class="mdname" nowrap> <em>gecos</em></td>
908         </tr>
909         <tr>
910           <td></td>
911           <td class="md">)&nbsp;</td>
912           <td class="md" colspan="2"><code> [virtual]</code></td>
913         </tr>
914
915       </table>
916     </td>
917   </tr>
918 </table>
919 <table cellspacing=5 cellpadding=0 border=0>
920   <tr>
921     <td>
922       &nbsp;
923     </td>
924     <td>
925
926 <p>
927 Change GECOS (fullname) of a user. 
928 <p>
929 You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers.
930 <p>
931 Definition at line <a class="el" href="modules_8cpp-source.html#l00577">577</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
932 <p>
933 References <a class="el" href="message_8h.html#a10">ChangeName()</a>.
934 <p>
935 <div class="fragment"><pre>00578 {
936 00579         <a class="code" href="message_8h.html#a10">ChangeName</a>(user,gecos.c_str());
937 00580 }
938 </pre></div>    </td>
939   </tr>
940 </table>
941 <a name="a34" doxytag="Server::ChangeHost"></a><p>
942 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
943   <tr>
944     <td class="mdRow">
945       <table cellpadding="0" cellspacing="0" border="0">
946         <tr>
947           <td class="md" nowrap valign="top"> void Server::ChangeHost </td>
948           <td class="md" valign="top">(&nbsp;</td>
949           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
950           <td class="mdname" nowrap> <em>user</em>, </td>
951         </tr>
952         <tr>
953           <td></td>
954           <td></td>
955           <td class="md" nowrap>std::string&nbsp;</td>
956           <td class="mdname" nowrap> <em>host</em></td>
957         </tr>
958         <tr>
959           <td></td>
960           <td class="md">)&nbsp;</td>
961           <td class="md" colspan="2"><code> [virtual]</code></td>
962         </tr>
963
964       </table>
965     </td>
966   </tr>
967 </table>
968 <table cellspacing=5 cellpadding=0 border=0>
969   <tr>
970     <td>
971       &nbsp;
972     </td>
973     <td>
974
975 <p>
976 Change displayed hostname of a user. 
977 <p>
978 You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers.
979 <p>
980 Definition at line <a class="el" href="modules_8cpp-source.html#l00572">572</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
981 <p>
982 References <a class="el" href="message_8h.html#a11">ChangeDisplayedHost()</a>.
983 <p>
984 <div class="fragment"><pre>00573 {
985 00574         <a class="code" href="message_8h.html#a11">ChangeDisplayedHost</a>(user,host.c_str());
986 00575 }
987 </pre></div>    </td>
988   </tr>
989 </table>
990 <a name="a30" doxytag="Server::ChangeUserNick"></a><p>
991 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
992   <tr>
993     <td class="mdRow">
994       <table cellpadding="0" cellspacing="0" border="0">
995         <tr>
996           <td class="md" nowrap valign="top"> void Server::ChangeUserNick </td>
997           <td class="md" valign="top">(&nbsp;</td>
998           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
999           <td class="mdname" nowrap> <em>user</em>, </td>
1000         </tr>
1001         <tr>
1002           <td></td>
1003           <td></td>
1004           <td class="md" nowrap>std::string&nbsp;</td>
1005           <td class="mdname" nowrap> <em>nickname</em></td>
1006         </tr>
1007         <tr>
1008           <td></td>
1009           <td class="md">)&nbsp;</td>
1010           <td class="md" colspan="2"><code> [virtual]</code></td>
1011         </tr>
1012
1013       </table>
1014     </td>
1015   </tr>
1016 </table>
1017 <table cellspacing=5 cellpadding=0 border=0>
1018   <tr>
1019     <td>
1020       &nbsp;
1021     </td>
1022     <td>
1023
1024 <p>
1025 Forces a user nickchange. 
1026 <p>
1027 This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it.
1028 <p>
1029 Definition at line <a class="el" href="modules_8cpp-source.html#l00469">469</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1030 <p>
1031 <div class="fragment"><pre>00470 {
1032 00471         force_nickchange(user,nickname.c_str());
1033 00472 }
1034 </pre></div>    </td>
1035   </tr>
1036 </table>
1037 <a name="a18" doxytag="Server::ChanMode"></a><p>
1038 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1039   <tr>
1040     <td class="mdRow">
1041       <table cellpadding="0" cellspacing="0" border="0">
1042         <tr>
1043           <td class="md" nowrap valign="top"> std::string Server::ChanMode </td>
1044           <td class="md" valign="top">(&nbsp;</td>
1045           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1046           <td class="mdname" nowrap> <em>User</em>, </td>
1047         </tr>
1048         <tr>
1049           <td></td>
1050           <td></td>
1051           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1052           <td class="mdname" nowrap> <em>Chan</em></td>
1053         </tr>
1054         <tr>
1055           <td></td>
1056           <td class="md">)&nbsp;</td>
1057           <td class="md" colspan="2"><code> [virtual]</code></td>
1058         </tr>
1059
1060       </table>
1061     </td>
1062   </tr>
1063 </table>
1064 <table cellspacing=5 cellpadding=0 border=0>
1065   <tr>
1066     <td>
1067       &nbsp;
1068     </td>
1069     <td>
1070
1071 <p>
1072 Attempts to look up a user's privilages on a channel. 
1073 <p>
1074 This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
1075 <p>
1076 Definition at line <a class="el" href="modules_8cpp-source.html#l00602">602</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1077 <p>
1078 References <a class="el" href="message_8h.html#a14">cmode()</a>.
1079 <p>
1080 <div class="fragment"><pre>00603 {
1081 00604         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a14">cmode</a>(User,Chan);
1082 00605 }
1083 </pre></div>    </td>
1084   </tr>
1085 </table>
1086 <a name="a10" doxytag="Server::CommonChannels"></a><p>
1087 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1088   <tr>
1089     <td class="mdRow">
1090       <table cellpadding="0" cellspacing="0" border="0">
1091         <tr>
1092           <td class="md" nowrap valign="top"> bool Server::CommonChannels </td>
1093           <td class="md" valign="top">(&nbsp;</td>
1094           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1095           <td class="mdname" nowrap> <em>u1</em>, </td>
1096         </tr>
1097         <tr>
1098           <td></td>
1099           <td></td>
1100           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1101           <td class="mdname" nowrap> <em>u2</em></td>
1102         </tr>
1103         <tr>
1104           <td></td>
1105           <td class="md">)&nbsp;</td>
1106           <td class="md" colspan="2"><code> [virtual]</code></td>
1107         </tr>
1108
1109       </table>
1110     </td>
1111   </tr>
1112 </table>
1113 <table cellspacing=5 cellpadding=0 border=0>
1114   <tr>
1115     <td>
1116       &nbsp;
1117     </td>
1118     <td>
1119
1120 <p>
1121 Returns true if two users share a common channel. 
1122 <p>
1123 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a11">Server::SendCommon</a> method.
1124 <p>
1125 Definition at line <a class="el" href="modules_8cpp-source.html#l00550">550</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1126 <p>
1127 References <a class="el" href="message_8h.html#a0">common_channels()</a>.
1128 <p>
1129 <div class="fragment"><pre>00551 {
1130 00552         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a0">common_channels</a>(u1,u2) != 0);
1131 00553 }
1132 </pre></div>    </td>
1133   </tr>
1134 </table>
1135 <a name="a14" doxytag="Server::CountUsers"></a><p>
1136 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1137   <tr>
1138     <td class="mdRow">
1139       <table cellpadding="0" cellspacing="0" border="0">
1140         <tr>
1141           <td class="md" nowrap valign="top"> int Server::CountUsers </td>
1142           <td class="md" valign="top">(&nbsp;</td>
1143           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1144           <td class="mdname1" valign="top" nowrap> <em>c</em>          </td>
1145           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1146           <td class="md" nowrap><code> [virtual]</code></td>
1147         </tr>
1148
1149       </table>
1150     </td>
1151   </tr>
1152 </table>
1153 <table cellspacing=5 cellpadding=0 border=0>
1154   <tr>
1155     <td>
1156       &nbsp;
1157     </td>
1158     <td>
1159
1160 <p>
1161 Returns a count of the number of users on a channel. 
1162 <p>
1163 This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.
1164 <p>
1165 Definition at line <a class="el" href="modules_8cpp-source.html#l00665">665</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1166 <p>
1167 <div class="fragment"><pre>00666 {
1168 00667         <span class="keywordflow">return</span> usercount(c);
1169 00668 }
1170 </pre></div>    </td>
1171   </tr>
1172 </table>
1173 <a name="a49" doxytag="Server::DelELine"></a><p>
1174 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1175   <tr>
1176     <td class="mdRow">
1177       <table cellpadding="0" cellspacing="0" border="0">
1178         <tr>
1179           <td class="md" nowrap valign="top"> bool Server::DelELine </td>
1180           <td class="md" valign="top">(&nbsp;</td>
1181           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1182           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1183           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1184           <td class="md" nowrap><code> [virtual]</code></td>
1185         </tr>
1186
1187       </table>
1188     </td>
1189   </tr>
1190 </table>
1191 <table cellspacing=5 cellpadding=0 border=0>
1192   <tr>
1193     <td>
1194       &nbsp;
1195     </td>
1196     <td>
1197
1198 <p>
1199 Deletes a local E-Line. 
1200 <p>
1201
1202 <p>
1203 Definition at line <a class="el" href="modules_8cpp-source.html#l00756">756</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1204 <p>
1205 References <a class="el" href="xline_8h.html#a10">del_eline()</a>.
1206 <p>
1207 <div class="fragment"><pre>00757 {
1208 00758         <a class="code" href="xline_8h.html#a10">del_eline</a>(hostmask.c_str());
1209 00759 }
1210 </pre></div>    </td>
1211   </tr>
1212 </table>
1213 <a name="a45" doxytag="Server::DelGLine"></a><p>
1214 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1215   <tr>
1216     <td class="mdRow">
1217       <table cellpadding="0" cellspacing="0" border="0">
1218         <tr>
1219           <td class="md" nowrap valign="top"> bool Server::DelGLine </td>
1220           <td class="md" valign="top">(&nbsp;</td>
1221           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1222           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1223           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1224           <td class="md" nowrap><code> [virtual]</code></td>
1225         </tr>
1226
1227       </table>
1228     </td>
1229   </tr>
1230 </table>
1231 <table cellspacing=5 cellpadding=0 border=0>
1232   <tr>
1233     <td>
1234       &nbsp;
1235     </td>
1236     <td>
1237
1238 <p>
1239 Deletes a G-Line from all servers on the mesh. 
1240 <p>
1241
1242 <p>
1243 Definition at line <a class="el" href="modules_8cpp-source.html#l00736">736</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1244 <p>
1245 References <a class="el" href="xline_8h.html#a6">del_gline()</a>.
1246 <p>
1247 <div class="fragment"><pre>00737 {
1248 00738         <a class="code" href="xline_8h.html#a6">del_gline</a>(hostmask.c_str());
1249 00739 }
1250 </pre></div>    </td>
1251   </tr>
1252 </table>
1253 <a name="a48" doxytag="Server::DelKLine"></a><p>
1254 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1255   <tr>
1256     <td class="mdRow">
1257       <table cellpadding="0" cellspacing="0" border="0">
1258         <tr>
1259           <td class="md" nowrap valign="top"> bool Server::DelKLine </td>
1260           <td class="md" valign="top">(&nbsp;</td>
1261           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1262           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1263           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1264           <td class="md" nowrap><code> [virtual]</code></td>
1265         </tr>
1266
1267       </table>
1268     </td>
1269   </tr>
1270 </table>
1271 <table cellspacing=5 cellpadding=0 border=0>
1272   <tr>
1273     <td>
1274       &nbsp;
1275     </td>
1276     <td>
1277
1278 <p>
1279 Deletes a local K-Line. 
1280 <p>
1281
1282 <p>
1283 Definition at line <a class="el" href="modules_8cpp-source.html#l00751">751</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1284 <p>
1285 References <a class="el" href="xline_8h.html#a9">del_kline()</a>.
1286 <p>
1287 <div class="fragment"><pre>00752 {
1288 00753         <a class="code" href="xline_8h.html#a9">del_kline</a>(hostmask.c_str());
1289 00754 }
1290 </pre></div>    </td>
1291   </tr>
1292 </table>
1293 <a name="a46" doxytag="Server::DelQLine"></a><p>
1294 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1295   <tr>
1296     <td class="mdRow">
1297       <table cellpadding="0" cellspacing="0" border="0">
1298         <tr>
1299           <td class="md" nowrap valign="top"> bool Server::DelQLine </td>
1300           <td class="md" valign="top">(&nbsp;</td>
1301           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1302           <td class="mdname1" valign="top" nowrap> <em>nickname</em>          </td>
1303           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1304           <td class="md" nowrap><code> [virtual]</code></td>
1305         </tr>
1306
1307       </table>
1308     </td>
1309   </tr>
1310 </table>
1311 <table cellspacing=5 cellpadding=0 border=0>
1312   <tr>
1313     <td>
1314       &nbsp;
1315     </td>
1316     <td>
1317
1318 <p>
1319 Deletes a Q-Line from all servers on the mesh. 
1320 <p>
1321
1322 <p>
1323 Definition at line <a class="el" href="modules_8cpp-source.html#l00741">741</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1324 <p>
1325 References <a class="el" href="xline_8h.html#a7">del_qline()</a>.
1326 <p>
1327 <div class="fragment"><pre>00742 {
1328 00743         <a class="code" href="xline_8h.html#a7">del_qline</a>(nickname.c_str());
1329 00744 }
1330 </pre></div>    </td>
1331   </tr>
1332 </table>
1333 <a name="a47" doxytag="Server::DelZLine"></a><p>
1334 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1335   <tr>
1336     <td class="mdRow">
1337       <table cellpadding="0" cellspacing="0" border="0">
1338         <tr>
1339           <td class="md" nowrap valign="top"> bool Server::DelZLine </td>
1340           <td class="md" valign="top">(&nbsp;</td>
1341           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1342           <td class="mdname1" valign="top" nowrap> <em>ipaddr</em>          </td>
1343           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1344           <td class="md" nowrap><code> [virtual]</code></td>
1345         </tr>
1346
1347       </table>
1348     </td>
1349   </tr>
1350 </table>
1351 <table cellspacing=5 cellpadding=0 border=0>
1352   <tr>
1353     <td>
1354       &nbsp;
1355     </td>
1356     <td>
1357
1358 <p>
1359 Deletes a Z-Line from all servers on the mesh. 
1360 <p>
1361
1362 <p>
1363 Definition at line <a class="el" href="modules_8cpp-source.html#l00746">746</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1364 <p>
1365 References <a class="el" href="xline_8h.html#a8">del_zline()</a>.
1366 <p>
1367 <div class="fragment"><pre>00747 {
1368 00748         <a class="code" href="xline_8h.html#a8">del_zline</a>(ipaddr.c_str());
1369 00749 }
1370 </pre></div>    </td>
1371   </tr>
1372 </table>
1373 <a name="a17" doxytag="Server::FindChannel"></a><p>
1374 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1375   <tr>
1376     <td class="mdRow">
1377       <table cellpadding="0" cellspacing="0" border="0">
1378         <tr>
1379           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
1380           <td class="md" valign="top">(&nbsp;</td>
1381           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1382           <td class="mdname1" valign="top" nowrap> <em>channel</em>          </td>
1383           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1384           <td class="md" nowrap><code> [virtual]</code></td>
1385         </tr>
1386
1387       </table>
1388     </td>
1389   </tr>
1390 </table>
1391 <table cellspacing=5 cellpadding=0 border=0>
1392   <tr>
1393     <td>
1394       &nbsp;
1395     </td>
1396     <td>
1397
1398 <p>
1399 Attempts to look up a channel and return a pointer to it. 
1400 <p>
1401 This function will return NULL if the channel does not exist.
1402 <p>
1403 Definition at line <a class="el" href="modules_8cpp-source.html#l00597">597</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1404 <p>
1405 <div class="fragment"><pre>00598 {
1406 00599         <span class="keywordflow">return</span> FindChan(channel.c_str());
1407 00600 }
1408 </pre></div>    </td>
1409   </tr>
1410 </table>
1411 <a name="a16" doxytag="Server::FindDescriptor"></a><p>
1412 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1413   <tr>
1414     <td class="mdRow">
1415       <table cellpadding="0" cellspacing="0" border="0">
1416         <tr>
1417           <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindDescriptor </td>
1418           <td class="md" valign="top">(&nbsp;</td>
1419           <td class="md" nowrap valign="top">int&nbsp;</td>
1420           <td class="mdname1" valign="top" nowrap> <em>socket</em>          </td>
1421           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1422           <td class="md" nowrap><code> [virtual]</code></td>
1423         </tr>
1424
1425       </table>
1426     </td>
1427   </tr>
1428 </table>
1429 <table cellspacing=5 cellpadding=0 border=0>
1430   <tr>
1431     <td>
1432       &nbsp;
1433     </td>
1434     <td>
1435
1436 <p>
1437 Attempts to look up a nick using the file descriptor associated with that nick. 
1438 <p>
1439 This function will return NULL if the file descriptor is not associated with a valid user.
1440 <p>
1441 Definition at line <a class="el" href="modules_8cpp-source.html#l00592">592</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1442 <p>
1443 References <a class="el" href="modules_8cpp-source.html#l00110">fd_ref_table</a>.
1444 <p>
1445 <div class="fragment"><pre>00593 {
1446 00594         <span class="keywordflow">return</span> (socket &lt; 65536 ? <a class="code" href="modules_8cpp.html#a38">fd_ref_table</a>[socket] : NULL);
1447 00595 }
1448 </pre></div>    </td>
1449   </tr>
1450 </table>
1451 <a name="a59" doxytag="Server::FindModule"></a><p>
1452 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1453   <tr>
1454     <td class="mdRow">
1455       <table cellpadding="0" cellspacing="0" border="0">
1456         <tr>
1457           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Server::FindModule </td>
1458           <td class="md" valign="top">(&nbsp;</td>
1459           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1460           <td class="mdname1" valign="top" nowrap> <em>name</em>          </td>
1461           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1462           <td class="md" nowrap><code> [virtual]</code></td>
1463         </tr>
1464
1465       </table>
1466     </td>
1467   </tr>
1468 </table>
1469 <table cellspacing=5 cellpadding=0 border=0>
1470   <tr>
1471     <td>
1472       &nbsp;
1473     </td>
1474     <td>
1475
1476 <p>
1477 This function finds a module by name. 
1478 <p>
1479 You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.
1480 <p>
1481 Definition at line <a class="el" href="modules_8cpp-source.html#l00839">839</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1482 <p>
1483 References <a class="el" href="modules_8cpp-source.html#l01048">MODCOUNT</a>, <a class="el" href="channels_8cpp-source.html#l00092">module_names</a>, and <a class="el" href="channels_8cpp-source.html#l00064">modules</a>.
1484 <p>
1485 <div class="fragment"><pre>00840 {
1486 00841         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt;= <a class="code" href="modules_8cpp.html#a1">MODCOUNT</a>; i++)
1487 00842         {
1488 00843                 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a27">module_names</a>[i] == name)
1489 00844                 {
1490 00845                         <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#a2">modules</a>[i];
1491 00846                 }
1492 00847         }
1493 00848         <span class="keywordflow">return</span> NULL;
1494 00849 }
1495 </pre></div>    </td>
1496   </tr>
1497 </table>
1498 <a name="a15" doxytag="Server::FindNick"></a><p>
1499 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1500   <tr>
1501     <td class="mdRow">
1502       <table cellpadding="0" cellspacing="0" border="0">
1503         <tr>
1504           <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
1505           <td class="md" valign="top">(&nbsp;</td>
1506           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1507           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1508           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1509           <td class="md" nowrap><code> [virtual]</code></td>
1510         </tr>
1511
1512       </table>
1513     </td>
1514   </tr>
1515 </table>
1516 <table cellspacing=5 cellpadding=0 border=0>
1517   <tr>
1518     <td>
1519       &nbsp;
1520     </td>
1521     <td>
1522
1523 <p>
1524 Attempts to look up a nick and return a pointer to it. 
1525 <p>
1526 This function will return NULL if the nick does not exist.
1527 <p>
1528 Definition at line <a class="el" href="modules_8cpp-source.html#l00587">587</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1529 <p>
1530 <div class="fragment"><pre>00588 {
1531 00589         <span class="keywordflow">return</span> Find(nick);
1532 00590 }
1533 </pre></div>    </td>
1534   </tr>
1535 </table>
1536 <a name="a22" doxytag="Server::GetAdmin"></a><p>
1537 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1538   <tr>
1539     <td class="mdRow">
1540       <table cellpadding="0" cellspacing="0" border="0">
1541         <tr>
1542           <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
1543           <td class="md" valign="top">(&nbsp;</td>
1544           <td class="mdname1" valign="top" nowrap>          </td>
1545           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1546           <td class="md" nowrap><code> [virtual]</code></td>
1547         </tr>
1548
1549       </table>
1550     </td>
1551   </tr>
1552 </table>
1553 <table cellspacing=5 cellpadding=0 border=0>
1554   <tr>
1555     <td>
1556       &nbsp;
1557     </td>
1558     <td>
1559
1560 <p>
1561 Returns the information of the server as returned by the /ADMIN command. 
1562 <p>
1563 See the <a class="el" href="classAdmin.html">Admin</a> class for further information of the return value. The members <a class="el" href="classAdmin.html#o2">Admin::Nick</a>, <a class="el" href="classAdmin.html#o1">Admin::Email</a> and <a class="el" href="classAdmin.html#o0">Admin::Name</a> contain the information for the server where the module is loaded.
1564 <p>
1565 Definition at line <a class="el" href="modules_8cpp-source.html#l00622">622</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1566 <p>
1567 <div class="fragment"><pre>00623 {
1568 00624         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
1569 00625 }
1570 </pre></div>    </td>
1571   </tr>
1572 </table>
1573 <a name="a21" doxytag="Server::GetNetworkName"></a><p>
1574 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1575   <tr>
1576     <td class="mdRow">
1577       <table cellpadding="0" cellspacing="0" border="0">
1578         <tr>
1579           <td class="md" nowrap valign="top"> std::string Server::GetNetworkName </td>
1580           <td class="md" valign="top">(&nbsp;</td>
1581           <td class="mdname1" valign="top" nowrap>          </td>
1582           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1583           <td class="md" nowrap><code> [virtual]</code></td>
1584         </tr>
1585
1586       </table>
1587     </td>
1588   </tr>
1589 </table>
1590 <table cellspacing=5 cellpadding=0 border=0>
1591   <tr>
1592     <td>
1593       &nbsp;
1594     </td>
1595     <td>
1596
1597 <p>
1598 Returns the network name, global to all linked servers. 
1599 <p>
1600
1601 <p>
1602 Definition at line <a class="el" href="modules_8cpp-source.html#l00617">617</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1603 <p>
1604 <div class="fragment"><pre>00618 {
1605 00619         <span class="keywordflow">return</span> getnetworkname();
1606 00620 }
1607 </pre></div>    </td>
1608   </tr>
1609 </table>
1610 <a name="a20" doxytag="Server::GetServerName"></a><p>
1611 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1612   <tr>
1613     <td class="mdRow">
1614       <table cellpadding="0" cellspacing="0" border="0">
1615         <tr>
1616           <td class="md" nowrap valign="top"> std::string Server::GetServerName </td>
1617           <td class="md" valign="top">(&nbsp;</td>
1618           <td class="mdname1" valign="top" nowrap>          </td>
1619           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1620           <td class="md" nowrap><code> [virtual]</code></td>
1621         </tr>
1622
1623       </table>
1624     </td>
1625   </tr>
1626 </table>
1627 <table cellspacing=5 cellpadding=0 border=0>
1628   <tr>
1629     <td>
1630       &nbsp;
1631     </td>
1632     <td>
1633
1634 <p>
1635 Returns the server name of the server where the module is loaded. 
1636 <p>
1637
1638 <p>
1639 Definition at line <a class="el" href="modules_8cpp-source.html#l00612">612</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1640 <p>
1641 <div class="fragment"><pre>00613 {
1642 00614         <span class="keywordflow">return</span> getservername();
1643 00615 }
1644 </pre></div>    </td>
1645   </tr>
1646 </table>
1647 <a name="a37" doxytag="Server::GetUsers"></a><p>
1648 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1649   <tr>
1650     <td class="mdRow">
1651       <table cellpadding="0" cellspacing="0" border="0">
1652         <tr>
1653           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a33">chanuserlist</a> Server::GetUsers </td>
1654           <td class="md" valign="top">(&nbsp;</td>
1655           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1656           <td class="mdname1" valign="top" nowrap> <em>chan</em>          </td>
1657           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1658           <td class="md" nowrap><code> [virtual]</code></td>
1659         </tr>
1660
1661       </table>
1662     </td>
1663   </tr>
1664 </table>
1665 <table cellspacing=5 cellpadding=0 border=0>
1666   <tr>
1667     <td>
1668       &nbsp;
1669     </td>
1670     <td>
1671
1672 <p>
1673 Fetches the userlist of a channel. 
1674 <p>
1675 This function must be here and not a member of userrec or chanrec due to include constraints.
1676 <p>
1677 Definition at line <a class="el" href="modules_8cpp-source.html#l00457">457</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1678 <p>
1679 References <a class="el" href="modules_8h-source.html#l00072">chanuserlist</a>, <a class="el" href="channels_8cpp-source.html#l00240">chanrec::GetUsers()</a>, and <a class="el" href="channels_8cpp-source.html#l00078">list</a>.
1680 <p>
1681 <div class="fragment"><pre>00458 {
1682 00459         <a class="code" href="modules_8h.html#a33">chanuserlist</a> userl;
1683 00460         userl.clear();
1684 00461         std::vector&lt;char*&gt; *<a class="code" href="channels_8cpp.html#a15">list</a> = chan-&gt;<a class="code" href="classchanrec.html#a9">GetUsers</a>();
1685 00462         <span class="keywordflow">for</span> (std::vector&lt;char*&gt;::iterator i = <a class="code" href="channels_8cpp.html#a15">list</a>-&gt;begin(); i != <a class="code" href="channels_8cpp.html#a15">list</a>-&gt;end(); i++)
1686 00463         {
1687 00464                 <span class="keywordtype">char</span>* o = *i;
1688 00465                 userl.push_back((<a class="code" href="classuserrec.html">userrec</a>*)o);
1689 00466         }
1690 00467         <span class="keywordflow">return</span> userl;
1691 00468 }
1692 </pre></div>    </td>
1693   </tr>
1694 </table>
1695 <a name="a13" doxytag="Server::IsNick"></a><p>
1696 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1697   <tr>
1698     <td class="mdRow">
1699       <table cellpadding="0" cellspacing="0" border="0">
1700         <tr>
1701           <td class="md" nowrap valign="top"> bool Server::IsNick </td>
1702           <td class="md" valign="top">(&nbsp;</td>
1703           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1704           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1705           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1706           <td class="md" nowrap><code> [virtual]</code></td>
1707         </tr>
1708
1709       </table>
1710     </td>
1711   </tr>
1712 </table>
1713 <table cellspacing=5 cellpadding=0 border=0>
1714   <tr>
1715     <td>
1716       &nbsp;
1717     </td>
1718     <td>
1719
1720 <p>
1721 Returns true if a nick is valid. 
1722 <p>
1723 Nicks for unregistered connections will return false.
1724 <p>
1725 Definition at line <a class="el" href="modules_8cpp-source.html#l00582">582</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1726 <p>
1727 References <a class="el" href="message_8h.html#a13">isnick()</a>.
1728 <p>
1729 <div class="fragment"><pre>00583 {
1730 00584         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a13">isnick</a>(nick.c_str()) != 0);
1731 00585 }
1732 </pre></div>    </td>
1733   </tr>
1734 </table>
1735 <a name="a19" doxytag="Server::IsOnChannel"></a><p>
1736 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1737   <tr>
1738     <td class="mdRow">
1739       <table cellpadding="0" cellspacing="0" border="0">
1740         <tr>
1741           <td class="md" nowrap valign="top"> bool Server::IsOnChannel </td>
1742           <td class="md" valign="top">(&nbsp;</td>
1743           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1744           <td class="mdname" nowrap> <em>User</em>, </td>
1745         </tr>
1746         <tr>
1747           <td></td>
1748           <td></td>
1749           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1750           <td class="mdname" nowrap> <em>Chan</em></td>
1751         </tr>
1752         <tr>
1753           <td></td>
1754           <td class="md">)&nbsp;</td>
1755           <td class="md" colspan="2"><code> [virtual]</code></td>
1756         </tr>
1757
1758       </table>
1759     </td>
1760   </tr>
1761 </table>
1762 <table cellspacing=5 cellpadding=0 border=0>
1763   <tr>
1764     <td>
1765       &nbsp;
1766     </td>
1767     <td>
1768
1769 <p>
1770 Checks if a user is on a channel. 
1771 <p>
1772 This function will return true or false to indicate if user 'User' is on channel 'Chan'.
1773 <p>
1774 Definition at line <a class="el" href="modules_8cpp-source.html#l00607">607</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1775 <p>
1776 References <a class="el" href="message_8h.html#a16">has_channel()</a>.
1777 <p>
1778 <div class="fragment"><pre>00608 {
1779 00609         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a16">has_channel</a>(User,Chan);
1780 00610 }
1781 </pre></div>    </td>
1782   </tr>
1783 </table>
1784 <a name="a36" doxytag="Server::IsUlined"></a><p>
1785 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1786   <tr>
1787     <td class="mdRow">
1788       <table cellpadding="0" cellspacing="0" border="0">
1789         <tr>
1790           <td class="md" nowrap valign="top"> bool Server::IsUlined </td>
1791           <td class="md" valign="top">(&nbsp;</td>
1792           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1793           <td class="mdname1" valign="top" nowrap> <em>server</em>          </td>
1794           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1795           <td class="md" nowrap><code> [virtual]</code></td>
1796         </tr>
1797
1798       </table>
1799     </td>
1800   </tr>
1801 </table>
1802 <table cellspacing=5 cellpadding=0 border=0>
1803   <tr>
1804     <td>
1805       &nbsp;
1806     </td>
1807     <td>
1808
1809 <p>
1810 Returns true if the servername you give is ulined. 
1811 <p>
1812 ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner.
1813 <p>
1814 Definition at line <a class="el" href="modules_8cpp-source.html#l00479">479</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1815 <p>
1816 References <a class="el" href="commands_8h.html#a74">is_uline()</a>.
1817 <p>
1818 <div class="fragment"><pre>00480 {
1819 00481         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#a74">is_uline</a>(server.c_str());
1820 00482 }
1821 </pre></div>    </td>
1822   </tr>
1823 </table>
1824 <a name="a51" doxytag="Server::IsValidMask"></a><p>
1825 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1826   <tr>
1827     <td class="mdRow">
1828       <table cellpadding="0" cellspacing="0" border="0">
1829         <tr>
1830           <td class="md" nowrap valign="top"> bool Server::IsValidMask </td>
1831           <td class="md" valign="top">(&nbsp;</td>
1832           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1833           <td class="mdname1" valign="top" nowrap> <em>mask</em>          </td>
1834           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1835           <td class="md" nowrap><code> [virtual]</code></td>
1836         </tr>
1837
1838       </table>
1839     </td>
1840   </tr>
1841 </table>
1842 <table cellspacing=5 cellpadding=0 border=0>
1843   <tr>
1844     <td>
1845       &nbsp;
1846     </td>
1847     <td>
1848
1849 <p>
1850 Returns true if a nick!ident string is correctly formatted, false if otherwise. 
1851 <p>
1852
1853 <p>
1854 Definition at line <a class="el" href="modules_8cpp-source.html#l00766">766</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1855 <p>
1856 <div class="fragment"><pre>00767 {
1857 00768         <span class="keyword">const</span> <span class="keywordtype">char</span>* dest = mask.c_str();
1858 00769         <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'!'</span>)==0)
1859 00770                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1860 00771         <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'@'</span>)==0)
1861 00772                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1862 00773         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1863 00774                 <span class="keywordflow">if</span> (dest[i] &lt; 32)
1864 00775                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
1865 00776         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1866 00777                 <span class="keywordflow">if</span> (dest[i] &gt; 126)
1867 00778                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
1868 00779         <span class="keywordtype">int</span> c = 0;
1869 00780         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1870 00781                 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'!'</span>)
1871 00782                         c++;
1872 00783         <span class="keywordflow">if</span> (c&gt;1)
1873 00784                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1874 00785         c = 0;
1875 00786         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1876 00787                 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'@'</span>)
1877 00788                         c++;
1878 00789         <span class="keywordflow">if</span> (c&gt;1)
1879 00790                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1880 00791 
1881 00792         <span class="keywordflow">return</span> <span class="keyword">true</span>;
1882 00793 }
1883 </pre></div>    </td>
1884   </tr>
1885 </table>
1886 <a name="a28" doxytag="Server::JoinUserToChannel"></a><p>
1887 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1888   <tr>
1889     <td class="mdRow">
1890       <table cellpadding="0" cellspacing="0" border="0">
1891         <tr>
1892           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::JoinUserToChannel </td>
1893           <td class="md" valign="top">(&nbsp;</td>
1894           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1895           <td class="mdname" nowrap> <em>user</em>, </td>
1896         </tr>
1897         <tr>
1898           <td></td>
1899           <td></td>
1900           <td class="md" nowrap>std::string&nbsp;</td>
1901           <td class="mdname" nowrap> <em>cname</em>, </td>
1902         </tr>
1903         <tr>
1904           <td></td>
1905           <td></td>
1906           <td class="md" nowrap>std::string&nbsp;</td>
1907           <td class="mdname" nowrap> <em>key</em></td>
1908         </tr>
1909         <tr>
1910           <td></td>
1911           <td class="md">)&nbsp;</td>
1912           <td class="md" colspan="2"><code> [virtual]</code></td>
1913         </tr>
1914
1915       </table>
1916     </td>
1917   </tr>
1918 </table>
1919 <table cellspacing=5 cellpadding=0 border=0>
1920   <tr>
1921     <td>
1922       &nbsp;
1923     </td>
1924     <td>
1925
1926 <p>
1927 Forces a user to join a channel. 
1928 <p>
1929 This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL.
1930 <p>
1931 Definition at line <a class="el" href="modules_8cpp-source.html#l00447">447</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1932 <p>
1933 <div class="fragment"><pre>00448 {
1934 00449         <span class="keywordflow">return</span> add_channel(user,cname.c_str(),key.c_str(),<span class="keyword">false</span>);
1935 00450 }
1936 </pre></div>    </td>
1937   </tr>
1938 </table>
1939 <a name="a3" doxytag="Server::Log"></a><p>
1940 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1941   <tr>
1942     <td class="mdRow">
1943       <table cellpadding="0" cellspacing="0" border="0">
1944         <tr>
1945           <td class="md" nowrap valign="top"> void Server::Log </td>
1946           <td class="md" valign="top">(&nbsp;</td>
1947           <td class="md" nowrap valign="top">int&nbsp;</td>
1948           <td class="mdname" nowrap> <em>level</em>, </td>
1949         </tr>
1950         <tr>
1951           <td></td>
1952           <td></td>
1953           <td class="md" nowrap>std::string&nbsp;</td>
1954           <td class="mdname" nowrap> <em>s</em></td>
1955         </tr>
1956         <tr>
1957           <td></td>
1958           <td class="md">)&nbsp;</td>
1959           <td class="md" colspan="2"><code> [virtual]</code></td>
1960         </tr>
1961
1962       </table>
1963     </td>
1964   </tr>
1965 </table>
1966 <table cellspacing=5 cellpadding=0 border=0>
1967   <tr>
1968     <td>
1969       &nbsp;
1970     </td>
1971     <td>
1972
1973 <p>
1974 Writes a log string. 
1975 <p>
1976 This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.
1977 <p>
1978 Definition at line <a class="el" href="modules_8cpp-source.html#l00489">489</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1979 <p>
1980 <div class="fragment"><pre>00490 {
1981 00491         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
1982 00492 }
1983 </pre></div>    </td>
1984   </tr>
1985 </table>
1986 <a name="a32" doxytag="Server::MatchText"></a><p>
1987 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1988   <tr>
1989     <td class="mdRow">
1990       <table cellpadding="0" cellspacing="0" border="0">
1991         <tr>
1992           <td class="md" nowrap valign="top"> bool Server::MatchText </td>
1993           <td class="md" valign="top">(&nbsp;</td>
1994           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1995           <td class="mdname" nowrap> <em>sliteral</em>, </td>
1996         </tr>
1997         <tr>
1998           <td></td>
1999           <td></td>
2000           <td class="md" nowrap>std::string&nbsp;</td>
2001           <td class="mdname" nowrap> <em>spattern</em></td>
2002         </tr>
2003         <tr>
2004           <td></td>
2005           <td class="md">)&nbsp;</td>
2006           <td class="md" colspan="2"><code> [virtual]</code></td>
2007         </tr>
2008
2009       </table>
2010     </td>
2011   </tr>
2012 </table>
2013 <table cellspacing=5 cellpadding=0 border=0>
2014   <tr>
2015     <td>
2016       &nbsp;
2017     </td>
2018     <td>
2019
2020 <p>
2021 Matches text against a glob pattern. 
2022 <p>
2023 Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise.
2024 <p>
2025 Definition at line <a class="el" href="modules_8cpp-source.html#l00434">434</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2026 <p>
2027 <div class="fragment"><pre>00435 {
2028 00436         <span class="keywordtype">char</span> literal[MAXBUF],pattern[MAXBUF];
2029 00437         strlcpy(literal,sliteral.c_str(),MAXBUF);
2030 00438         strlcpy(pattern,spattern.c_str(),MAXBUF);
2031 00439         <span class="keywordflow">return</span> match(literal,pattern);
2032 00440 }
2033 </pre></div>    </td>
2034   </tr>
2035 </table>
2036 <a name="a57" doxytag="Server::MeshCheckChan"></a><p>
2037 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2038   <tr>
2039     <td class="mdRow">
2040       <table cellpadding="0" cellspacing="0" border="0">
2041         <tr>
2042           <td class="md" nowrap valign="top"> bool Server::MeshCheckChan </td>
2043           <td class="md" valign="top">(&nbsp;</td>
2044           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2045           <td class="mdname" nowrap> <em>c</em>, </td>
2046         </tr>
2047         <tr>
2048           <td></td>
2049           <td></td>
2050           <td class="md" nowrap>std::string&nbsp;</td>
2051           <td class="mdname" nowrap> <em>servername</em></td>
2052         </tr>
2053         <tr>
2054           <td></td>
2055           <td class="md">)&nbsp;</td>
2056           <td class="md" colspan="2"><code> [virtual]</code></td>
2057         </tr>
2058
2059       </table>
2060     </td>
2061   </tr>
2062 </table>
2063 <table cellspacing=5 cellpadding=0 border=0>
2064   <tr>
2065     <td>
2066       &nbsp;
2067     </td>
2068     <td>
2069
2070 <p>
2071 This function is used to check if any users on channel c are on server servername. 
2072 <p>
2073 This is used internally by PRIVMSG etc. You should not need to use it.
2074 <p>
2075 Definition at line <a class="el" href="modules_8cpp-source.html#l00821">821</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2076 <p>
2077 <div class="fragment"><pre>00822 {
2078 00823         <span class="keywordflow">if</span> (c)
2079 00824         {
2080 00825                 <span class="keywordflow">return</span> ChanAnyOnThisServer(c,(<span class="keywordtype">char</span>*)servername.c_str());
2081 00826         }
2082 00827         <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
2083 00828 }
2084 </pre></div>    </td>
2085   </tr>
2086 </table>
2087 <a name="a58" doxytag="Server::MeshCheckCommon"></a><p>
2088 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2089   <tr>
2090     <td class="mdRow">
2091       <table cellpadding="0" cellspacing="0" border="0">
2092         <tr>
2093           <td class="md" nowrap valign="top"> bool Server::MeshCheckCommon </td>
2094           <td class="md" valign="top">(&nbsp;</td>
2095           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2096           <td class="mdname" nowrap> <em>u</em>, </td>
2097         </tr>
2098         <tr>
2099           <td></td>
2100           <td></td>
2101           <td class="md" nowrap>std::string&nbsp;</td>
2102           <td class="mdname" nowrap> <em>servername</em></td>
2103         </tr>
2104         <tr>
2105           <td></td>
2106           <td class="md">)&nbsp;</td>
2107           <td class="md" colspan="2"><code> [virtual]</code></td>
2108         </tr>
2109
2110       </table>
2111     </td>
2112   </tr>
2113 </table>
2114 <table cellspacing=5 cellpadding=0 border=0>
2115   <tr>
2116     <td>
2117       &nbsp;
2118     </td>
2119     <td>
2120
2121 <p>
2122 This function is used to check if user u has any channels in common with users on servername. 
2123 <p>
2124 This is used internally by <a class="el" href="classServer.html#a53">Server::MeshSendCommon</a>. You should very rarely need to use it.
2125 <p>
2126 Definition at line <a class="el" href="modules_8cpp-source.html#l00830">830</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2127 <p>
2128 <div class="fragment"><pre>00831 {
2129 00832         <span class="keywordflow">if</span> (u)
2130 00833         {
2131 00834                 <span class="keywordflow">return</span> CommonOnThisServer(u,(<span class="keywordtype">char</span>*)servername.c_str());
2132 00835         }
2133 00836         <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
2134 00837 }
2135 </pre></div>    </td>
2136   </tr>
2137 </table>
2138 <a name="a52" doxytag="Server::MeshSendAll"></a><p>
2139 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2140   <tr>
2141     <td class="mdRow">
2142       <table cellpadding="0" cellspacing="0" border="0">
2143         <tr>
2144           <td class="md" nowrap valign="top"> void Server::MeshSendAll </td>
2145           <td class="md" valign="top">(&nbsp;</td>
2146           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2147           <td class="mdname1" valign="top" nowrap> <em>text</em>          </td>
2148           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2149           <td class="md" nowrap><code> [virtual]</code></td>
2150         </tr>
2151
2152       </table>
2153     </td>
2154   </tr>
2155 </table>
2156 <table cellspacing=5 cellpadding=0 border=0>
2157   <tr>
2158     <td>
2159       &nbsp;
2160     </td>
2161     <td>
2162
2163 <p>
2164 Sends a line of text to all connected servers. 
2165 <p>
2166 If a server is not directly reachable, the core deals with routing the message, and will also deal with failures transparently.
2167 <p>
2168 Definition at line <a class="el" href="modules_8cpp-source.html#l00795">795</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2169 <p>
2170 <div class="fragment"><pre>00796 {
2171 00797         NetSendToAll((<span class="keywordtype">char</span>*)text.c_str());
2172 00798 }
2173 </pre></div>    </td>
2174   </tr>
2175 </table>
2176 <a name="a54" doxytag="Server::MeshSendAllAlive"></a><p>
2177 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2178   <tr>
2179     <td class="mdRow">
2180       <table cellpadding="0" cellspacing="0" border="0">
2181         <tr>
2182           <td class="md" nowrap valign="top"> void Server::MeshSendAllAlive </td>
2183           <td class="md" valign="top">(&nbsp;</td>
2184           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2185           <td class="mdname1" valign="top" nowrap> <em>text</em>          </td>
2186           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2187           <td class="md" nowrap><code> [virtual]</code></td>
2188         </tr>
2189
2190       </table>
2191     </td>
2192   </tr>
2193 </table>
2194 <table cellspacing=5 cellpadding=0 border=0>
2195   <tr>
2196     <td>
2197       &nbsp;
2198     </td>
2199     <td>
2200
2201 <p>
2202 This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable. 
2203 <p>
2204
2205 <p>
2206 Definition at line <a class="el" href="modules_8cpp-source.html#l00806">806</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2207 <p>
2208 <div class="fragment"><pre>00807 {
2209 00808         NetSendToAllAlive((<span class="keywordtype">char</span>*)text.c_str());
2210 00809 }
2211 </pre></div>    </td>
2212   </tr>
2213 </table>
2214 <a name="a56" doxytag="Server::MeshSendAllExcept"></a><p>
2215 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2216   <tr>
2217     <td class="mdRow">
2218       <table cellpadding="0" cellspacing="0" border="0">
2219         <tr>
2220           <td class="md" nowrap valign="top"> void Server::MeshSendAllExcept </td>
2221           <td class="md" valign="top">(&nbsp;</td>
2222           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2223           <td class="mdname" nowrap> <em>target</em>, </td>
2224         </tr>
2225         <tr>
2226           <td></td>
2227           <td></td>
2228           <td class="md" nowrap>std::string&nbsp;</td>
2229           <td class="mdname" nowrap> <em>text</em></td>
2230         </tr>
2231         <tr>
2232           <td></td>
2233           <td class="md">)&nbsp;</td>
2234           <td class="md" colspan="2"><code> [virtual]</code></td>
2235         </tr>
2236
2237       </table>
2238     </td>
2239   </tr>
2240 </table>
2241 <table cellspacing=5 cellpadding=0 border=0>
2242   <tr>
2243     <td>
2244       &nbsp;
2245     </td>
2246     <td>
2247
2248 <p>
2249 This function sends to all servers EXCEPT the one you specify. 
2250 <p>
2251 You should usually use this function to send messages, specifying the SENDER of your message as 'target'. This will prevent message loops.
2252 <p>
2253 Definition at line <a class="el" href="modules_8cpp-source.html#l00816">816</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2254 <p>
2255 <div class="fragment"><pre>00817 {
2256 00818         NetSendToAllExcept(target.c_str(),(<span class="keywordtype">char</span>*)text.c_str());
2257 00819 }
2258 </pre></div>    </td>
2259   </tr>
2260 </table>
2261 <a name="a53" doxytag="Server::MeshSendCommon"></a><p>
2262 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2263   <tr>
2264     <td class="mdRow">
2265       <table cellpadding="0" cellspacing="0" border="0">
2266         <tr>
2267           <td class="md" nowrap valign="top"> void Server::MeshSendCommon </td>
2268           <td class="md" valign="top">(&nbsp;</td>
2269           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2270           <td class="mdname" nowrap> <em>user</em>, </td>
2271         </tr>
2272         <tr>
2273           <td></td>
2274           <td></td>
2275           <td class="md" nowrap>std::string&nbsp;</td>
2276           <td class="mdname" nowrap> <em>text</em></td>
2277         </tr>
2278         <tr>
2279           <td></td>
2280           <td class="md">)&nbsp;</td>
2281           <td class="md" colspan="2"><code> [virtual]</code></td>
2282         </tr>
2283
2284       </table>
2285     </td>
2286   </tr>
2287 </table>
2288 <table cellspacing=5 cellpadding=0 border=0>
2289   <tr>
2290     <td>
2291       &nbsp;
2292     </td>
2293     <td>
2294
2295 <p>
2296 This method sends a line of text to all servers who have users which share common channels with the user you provide. 
2297 <p>
2298 For example, if user A is on server A, and they are on channels #one and #two, and user B is on server B, and also on channel #one, but user C is on server C and on neither #one or #two, this function will cause the text to only be sent to server B. However, if server B is only reachable via C, it will route it to C (you do not have to worry about this routing, it is done transparently, but its good to know how things work!)
2299 <p>
2300 Definition at line <a class="el" href="modules_8cpp-source.html#l00800">800</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2301 <p>
2302 <div class="fragment"><pre>00801 {
2303 00802         <span class="keywordflow">if</span> (user)
2304 00803                 NetSendToCommon(user,(<span class="keywordtype">char</span>*)text.c_str());
2305 00804 }
2306 </pre></div>    </td>
2307   </tr>
2308 </table>
2309 <a name="a55" doxytag="Server::MeshSendUnicast"></a><p>
2310 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2311   <tr>
2312     <td class="mdRow">
2313       <table cellpadding="0" cellspacing="0" border="0">
2314         <tr>
2315           <td class="md" nowrap valign="top"> void Server::MeshSendUnicast </td>
2316           <td class="md" valign="top">(&nbsp;</td>
2317           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2318           <td class="mdname" nowrap> <em>destination</em>, </td>
2319         </tr>
2320         <tr>
2321           <td></td>
2322           <td></td>
2323           <td class="md" nowrap>std::string&nbsp;</td>
2324           <td class="mdname" nowrap> <em>text</em></td>
2325         </tr>
2326         <tr>
2327           <td></td>
2328           <td class="md">)&nbsp;</td>
2329           <td class="md" colspan="2"><code> [virtual]</code></td>
2330         </tr>
2331
2332       </table>
2333     </td>
2334   </tr>
2335 </table>
2336 <table cellspacing=5 cellpadding=0 border=0>
2337   <tr>
2338     <td>
2339       &nbsp;
2340     </td>
2341     <td>
2342
2343 <p>
2344 This function sends a line of text directly to a server. 
2345 <p>
2346 If the server is not directly routable at this time, the server attempts to route text through the mesh.
2347 <p>
2348 Definition at line <a class="el" href="modules_8cpp-source.html#l00811">811</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2349 <p>
2350 <div class="fragment"><pre>00812 {
2351 00813         NetSendToOne((<span class="keywordtype">char</span>*)destination.c_str(),(<span class="keywordtype">char</span>*)text.c_str());
2352 00814 }
2353 </pre></div>    </td>
2354   </tr>
2355 </table>
2356 <a name="a29" doxytag="Server::PartUserFromChannel"></a><p>
2357 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2358   <tr>
2359     <td class="mdRow">
2360       <table cellpadding="0" cellspacing="0" border="0">
2361         <tr>
2362           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::PartUserFromChannel </td>
2363           <td class="md" valign="top">(&nbsp;</td>
2364           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2365           <td class="mdname" nowrap> <em>user</em>, </td>
2366         </tr>
2367         <tr>
2368           <td></td>
2369           <td></td>
2370           <td class="md" nowrap>std::string&nbsp;</td>
2371           <td class="mdname" nowrap> <em>cname</em>, </td>
2372         </tr>
2373         <tr>
2374           <td></td>
2375           <td></td>
2376           <td class="md" nowrap>std::string&nbsp;</td>
2377           <td class="mdname" nowrap> <em>reason</em></td>
2378         </tr>
2379         <tr>
2380           <td></td>
2381           <td class="md">)&nbsp;</td>
2382           <td class="md" colspan="2"><code> [virtual]</code></td>
2383         </tr>
2384
2385       </table>
2386     </td>
2387   </tr>
2388 </table>
2389 <table cellspacing=5 cellpadding=0 border=0>
2390   <tr>
2391     <td>
2392       &nbsp;
2393     </td>
2394     <td>
2395
2396 <p>
2397 Forces a user to part a channel. 
2398 <p>
2399 This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version.
2400 <p>
2401 Definition at line <a class="el" href="modules_8cpp-source.html#l00452">452</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2402 <p>
2403 <div class="fragment"><pre>00453 {
2404 00454         <span class="keywordflow">return</span> del_channel(user,cname.c_str(),reason.c_str(),<span class="keyword">false</span>);
2405 00455 }
2406 </pre></div>    </td>
2407   </tr>
2408 </table>
2409 <a name="a39" doxytag="Server::PseudoToUser"></a><p>
2410 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2411   <tr>
2412     <td class="mdRow">
2413       <table cellpadding="0" cellspacing="0" border="0">
2414         <tr>
2415           <td class="md" nowrap valign="top"> bool Server::PseudoToUser </td>
2416           <td class="md" valign="top">(&nbsp;</td>
2417           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2418           <td class="mdname" nowrap> <em>alive</em>, </td>
2419         </tr>
2420         <tr>
2421           <td></td>
2422           <td></td>
2423           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2424           <td class="mdname" nowrap> <em>zombie</em>, </td>
2425         </tr>
2426         <tr>
2427           <td></td>
2428           <td></td>
2429           <td class="md" nowrap>std::string&nbsp;</td>
2430           <td class="mdname" nowrap> <em>message</em></td>
2431         </tr>
2432         <tr>
2433           <td></td>
2434           <td class="md">)&nbsp;</td>
2435           <td class="md" colspan="2"><code> [virtual]</code></td>
2436         </tr>
2437
2438       </table>
2439     </td>
2440   </tr>
2441 </table>
2442 <table cellspacing=5 cellpadding=0 border=0>
2443   <tr>
2444     <td>
2445       &nbsp;
2446     </td>
2447     <td>
2448
2449 <p>
2450 This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other. 
2451 <p>
2452 The user in 'alive' is booted off the server with the given message. The user referred to by 'zombie' should have previously been locked with Server::ZombifyUser, otherwise stale sockets and file descriptor leaks can occur. After this call, the pointer to alive will be invalid, and the pointer to zombie will be equivalent in effect to the old pointer to alive.
2453 <p>
2454 Definition at line <a class="el" href="modules_8cpp-source.html#l00681">681</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2455 <p>
2456 References <a class="el" href="channels_8h-source.html#l00268">ucrec::channel</a>, <a class="el" href="users_8h-source.html#l00132">userrec::chans</a>, <a class="el" href="users_8cpp-source.html#l00198">userrec::ClearBuffer()</a>, <a class="el" href="connection_8h-source.html#l00215">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00099">FD_MAGIC_NUMBER</a>, <a class="el" href="modules_8cpp-source.html#l00110">fd_ref_table</a>, <a class="el" href="connection_8h-source.html#l00219">connection::host</a>, <a class="el" href="users_8h-source.html#l00115">userrec::ident</a>, <a class="el" href="channels_8h-source.html#l00099">chanrec::name</a>, <a class="el" href="users_8h-source.html#l00111">userrec::nick</a>, <a class="el" href="channels_8h-source.html#l00128">chanrec::setby</a>, <a class="el" href="channels_8h-source.html#l00117">chanrec::topic</a>, and <a class="el" href="channels_8h-source.html#l00124">chanrec::topicset</a>.
2457 <p>
2458 <div class="fragment"><pre>00682 {
2459 00683         zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a> = alive-&gt;<a class="code" href="classconnection.html#o0">fd</a>;
2460 00684         alive-&gt;<a class="code" href="classconnection.html#o0">fd</a> = <a class="code" href="modules_8h.html#a26">FD_MAGIC_NUMBER</a>;
2461 00685         alive-&gt;<a class="code" href="classuserrec.html#a10">ClearBuffer</a>();
2462 00686         Write(zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">":%s!%s@%s NICK %s"</span>,alive-&gt;<a class="code" href="classuserrec.html#o0">nick</a>,alive-&gt;<a class="code" href="classuserrec.html#o1">ident</a>,alive-&gt;<a class="code" href="classconnection.html#o1">host</a>,zombie-&gt;<a class="code" href="classuserrec.html#o0">nick</a>);
2463 00687         kill_link(alive,message.c_str());
2464 00688         <a class="code" href="modules_8cpp.html#a38">fd_ref_table</a>[zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>] = zombie;
2465 00689         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i != MAXCHANS; i++)
2466 00690         {
2467 00691                 <span class="keywordflow">if</span> (zombie-&gt;chans[i].channel != NULL)
2468 00692                 {
2469 00693                         <span class="keywordflow">if</span> (zombie-&gt;chans[i].channel-&gt;name)
2470 00694                         {
2471 00695                                 <a class="code" href="classchanrec.html">chanrec</a>* Ptr = zombie-&gt;<a class="code" href="classuserrec.html#o5">chans</a>[i].<a class="code" href="classucrec.html#o1">channel</a>;
2472 00696                                 WriteFrom(zombie-&gt;fd,zombie,<span class="stringliteral">"JOIN %s"</span>,Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>);
2473 00697                                 <span class="keywordflow">if</span> (Ptr-&gt;<a class="code" href="classchanrec.html#o6">topicset</a>)
2474 00698                                 {
2475 00699                                         WriteServ(zombie-&gt;fd,<span class="stringliteral">"332 %s %s :%s"</span>, zombie-&gt;nick, Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o4">topic</a>);
2476 00700                                         WriteServ(zombie-&gt;fd,<span class="stringliteral">"333 %s %s %s %d"</span>, zombie-&gt;nick, Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o7">setby</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o6">topicset</a>);
2477 00701                                 }
2478 00702                                 userlist(zombie,Ptr);
2479 00703                                 WriteServ(zombie-&gt;fd,<span class="stringliteral">"366 %s %s :End of /NAMES list."</span>, zombie-&gt;nick, Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>);
2480 00704 
2481 00705                         }
2482 00706                 }
2483 00707         }
2484 00708 
2485 00709 }
2486 </pre></div>    </td>
2487   </tr>
2488 </table>
2489 <a name="a31" doxytag="Server::QuitUser"></a><p>
2490 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2491   <tr>
2492     <td class="mdRow">
2493       <table cellpadding="0" cellspacing="0" border="0">
2494         <tr>
2495           <td class="md" nowrap valign="top"> void Server::QuitUser </td>
2496           <td class="md" valign="top">(&nbsp;</td>
2497           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2498           <td class="mdname" nowrap> <em>user</em>, </td>
2499         </tr>
2500         <tr>
2501           <td></td>
2502           <td></td>
2503           <td class="md" nowrap>std::string&nbsp;</td>
2504           <td class="mdname" nowrap> <em>reason</em></td>
2505         </tr>
2506         <tr>
2507           <td></td>
2508           <td class="md">)&nbsp;</td>
2509           <td class="md" colspan="2"><code> [virtual]</code></td>
2510         </tr>
2511
2512       </table>
2513     </td>
2514   </tr>
2515 </table>
2516 <table cellspacing=5 cellpadding=0 border=0>
2517   <tr>
2518     <td>
2519       &nbsp;
2520     </td>
2521     <td>
2522
2523 <p>
2524 Forces a user to quit with the specified reason. 
2525 <p>
2526 To the user, it will appear as if they typed /QUIT themselves, except for the fact that this function may bypass the quit prefix specified in the config file.<p>
2527 WARNING!<p>
2528 Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.
2529 <p>
2530 Definition at line <a class="el" href="modules_8cpp-source.html#l00474">474</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2531 <p>
2532 <div class="fragment"><pre>00475 {
2533 00476         kill_link(user,reason.c_str());
2534 00477 }
2535 </pre></div>    </td>
2536   </tr>
2537 </table>
2538 <a name="a4" doxytag="Server::Send"></a><p>
2539 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2540   <tr>
2541     <td class="mdRow">
2542       <table cellpadding="0" cellspacing="0" border="0">
2543         <tr>
2544           <td class="md" nowrap valign="top"> void Server::Send </td>
2545           <td class="md" valign="top">(&nbsp;</td>
2546           <td class="md" nowrap valign="top">int&nbsp;</td>
2547           <td class="mdname" nowrap> <em>Socket</em>, </td>
2548         </tr>
2549         <tr>
2550           <td></td>
2551           <td></td>
2552           <td class="md" nowrap>std::string&nbsp;</td>
2553           <td class="mdname" nowrap> <em>s</em></td>
2554         </tr>
2555         <tr>
2556           <td></td>
2557           <td class="md">)&nbsp;</td>
2558           <td class="md" colspan="2"><code> [virtual]</code></td>
2559         </tr>
2560
2561       </table>
2562     </td>
2563   </tr>
2564 </table>
2565 <table cellspacing=5 cellpadding=0 border=0>
2566   <tr>
2567     <td>
2568       &nbsp;
2569     </td>
2570     <td>
2571
2572 <p>
2573 Sends a line of text down a TCP/IP socket. 
2574 <p>
2575 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
2576 <p>
2577 Definition at line <a class="el" href="modules_8cpp-source.html#l00504">504</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2578 <p>
2579 <div class="fragment"><pre>00505 {
2580 00506         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2581 00507 }
2582 </pre></div>    </td>
2583   </tr>
2584 </table>
2585 <a name="a9" doxytag="Server::SendChannel"></a><p>
2586 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2587   <tr>
2588     <td class="mdRow">
2589       <table cellpadding="0" cellspacing="0" border="0">
2590         <tr>
2591           <td class="md" nowrap valign="top"> void Server::SendChannel </td>
2592           <td class="md" valign="top">(&nbsp;</td>
2593           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2594           <td class="mdname" nowrap> <em>User</em>, </td>
2595         </tr>
2596         <tr>
2597           <td></td>
2598           <td></td>
2599           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2600           <td class="mdname" nowrap> <em>Channel</em>, </td>
2601         </tr>
2602         <tr>
2603           <td></td>
2604           <td></td>
2605           <td class="md" nowrap>std::string&nbsp;</td>
2606           <td class="mdname" nowrap> <em>s</em>, </td>
2607         </tr>
2608         <tr>
2609           <td></td>
2610           <td></td>
2611           <td class="md" nowrap>bool&nbsp;</td>
2612           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2613         </tr>
2614         <tr>
2615           <td></td>
2616           <td class="md">)&nbsp;</td>
2617           <td class="md" colspan="2"><code> [virtual]</code></td>
2618         </tr>
2619
2620       </table>
2621     </td>
2622   </tr>
2623 </table>
2624 <table cellspacing=5 cellpadding=0 border=0>
2625   <tr>
2626     <td>
2627       &nbsp;
2628     </td>
2629     <td>
2630
2631 <p>
2632 Sends text from a user to a channel (mulicast). 
2633 <p>
2634 This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).
2635 <p>
2636 Definition at line <a class="el" href="modules_8cpp-source.html#l00538">538</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2637 <p>
2638 <div class="fragment"><pre>00539 {
2639 00540         <span class="keywordflow">if</span> (IncludeSender)
2640 00541         {
2641 00542                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2642 00543         }
2643 00544         <span class="keywordflow">else</span>
2644 00545         {
2645 00546                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2646 00547         }
2647 00548 }
2648 </pre></div>    </td>
2649   </tr>
2650 </table>
2651 <a name="a6" doxytag="Server::SendChannelServerNotice"></a><p>
2652 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2653   <tr>
2654     <td class="mdRow">
2655       <table cellpadding="0" cellspacing="0" border="0">
2656         <tr>
2657           <td class="md" nowrap valign="top"> void Server::SendChannelServerNotice </td>
2658           <td class="md" valign="top">(&nbsp;</td>
2659           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2660           <td class="mdname" nowrap> <em>ServName</em>, </td>
2661         </tr>
2662         <tr>
2663           <td></td>
2664           <td></td>
2665           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2666           <td class="mdname" nowrap> <em>Channel</em>, </td>
2667         </tr>
2668         <tr>
2669           <td></td>
2670           <td></td>
2671           <td class="md" nowrap>std::string&nbsp;</td>
2672           <td class="mdname" nowrap> <em>text</em></td>
2673         </tr>
2674         <tr>
2675           <td></td>
2676           <td class="md">)&nbsp;</td>
2677           <td class="md" colspan="2"><code> [virtual]</code></td>
2678         </tr>
2679
2680       </table>
2681     </td>
2682   </tr>
2683 </table>
2684 <table cellspacing=5 cellpadding=0 border=0>
2685   <tr>
2686     <td>
2687       &nbsp;
2688     </td>
2689     <td>
2690
2691 <p>
2692 Writes text to a channel, but from a server, including all. 
2693 <p>
2694 This can be used to send server notices to a group of users.
2695 <p>
2696 Definition at line <a class="el" href="modules_8cpp-source.html#l00533">533</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2697 <p>
2698 <div class="fragment"><pre>00534 {
2699 00535         WriteChannelWithServ((<span class="keywordtype">char</span>*)ServName.c_str(), Channel, <span class="stringliteral">"%s"</span>, text.c_str());
2700 00536 }
2701 </pre></div>    </td>
2702   </tr>
2703 </table>
2704 <a name="a11" doxytag="Server::SendCommon"></a><p>
2705 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2706   <tr>
2707     <td class="mdRow">
2708       <table cellpadding="0" cellspacing="0" border="0">
2709         <tr>
2710           <td class="md" nowrap valign="top"> void Server::SendCommon </td>
2711           <td class="md" valign="top">(&nbsp;</td>
2712           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2713           <td class="mdname" nowrap> <em>User</em>, </td>
2714         </tr>
2715         <tr>
2716           <td></td>
2717           <td></td>
2718           <td class="md" nowrap>std::string&nbsp;</td>
2719           <td class="mdname" nowrap> <em>text</em>, </td>
2720         </tr>
2721         <tr>
2722           <td></td>
2723           <td></td>
2724           <td class="md" nowrap>bool&nbsp;</td>
2725           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2726         </tr>
2727         <tr>
2728           <td></td>
2729           <td class="md">)&nbsp;</td>
2730           <td class="md" colspan="2"><code> [virtual]</code></td>
2731         </tr>
2732
2733       </table>
2734     </td>
2735   </tr>
2736 </table>
2737 <table cellspacing=5 cellpadding=0 border=0>
2738   <tr>
2739     <td>
2740       &nbsp;
2741     </td>
2742     <td>
2743
2744 <p>
2745 Sends text from a user to one or more channels (mulicast). 
2746 <p>
2747 This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.
2748 <p>
2749 Definition at line <a class="el" href="modules_8cpp-source.html#l00555">555</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2750 <p>
2751 <div class="fragment"><pre>00556 {
2752 00557         <span class="keywordflow">if</span> (IncludeSender)
2753 00558         {
2754 00559                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
2755 00560         }
2756 00561         <span class="keywordflow">else</span>
2757 00562         {
2758 00563                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
2759 00564         }
2760 00565 }
2761 </pre></div>    </td>
2762   </tr>
2763 </table>
2764 <a name="a7" doxytag="Server::SendFrom"></a><p>
2765 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2766   <tr>
2767     <td class="mdRow">
2768       <table cellpadding="0" cellspacing="0" border="0">
2769         <tr>
2770           <td class="md" nowrap valign="top"> void Server::SendFrom </td>
2771           <td class="md" valign="top">(&nbsp;</td>
2772           <td class="md" nowrap valign="top">int&nbsp;</td>
2773           <td class="mdname" nowrap> <em>Socket</em>, </td>
2774         </tr>
2775         <tr>
2776           <td></td>
2777           <td></td>
2778           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2779           <td class="mdname" nowrap> <em>User</em>, </td>
2780         </tr>
2781         <tr>
2782           <td></td>
2783           <td></td>
2784           <td class="md" nowrap>std::string&nbsp;</td>
2785           <td class="mdname" nowrap> <em>s</em></td>
2786         </tr>
2787         <tr>
2788           <td></td>
2789           <td class="md">)&nbsp;</td>
2790           <td class="md" colspan="2"><code> [virtual]</code></td>
2791         </tr>
2792
2793       </table>
2794     </td>
2795   </tr>
2796 </table>
2797 <table cellspacing=5 cellpadding=0 border=0>
2798   <tr>
2799     <td>
2800       &nbsp;
2801     </td>
2802     <td>
2803
2804 <p>
2805 Sends text from a user to a socket. 
2806 <p>
2807 This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)
2808 <p>
2809 Definition at line <a class="el" href="modules_8cpp-source.html#l00514">514</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2810 <p>
2811 <div class="fragment"><pre>00515 {
2812 00516         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
2813 00517 }
2814 </pre></div>    </td>
2815   </tr>
2816 </table>
2817 <a name="a26" doxytag="Server::SendMode"></a><p>
2818 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2819   <tr>
2820     <td class="mdRow">
2821       <table cellpadding="0" cellspacing="0" border="0">
2822         <tr>
2823           <td class="md" nowrap valign="top"> void Server::SendMode </td>
2824           <td class="md" valign="top">(&nbsp;</td>
2825           <td class="md" nowrap valign="top">char **&nbsp;</td>
2826           <td class="mdname" nowrap> <em>parameters</em>, </td>
2827         </tr>
2828         <tr>
2829           <td></td>
2830           <td></td>
2831           <td class="md" nowrap>int&nbsp;</td>
2832           <td class="mdname" nowrap> <em>pcnt</em>, </td>
2833         </tr>
2834         <tr>
2835           <td></td>
2836           <td></td>
2837           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2838           <td class="mdname" nowrap> <em>user</em></td>
2839         </tr>
2840         <tr>
2841           <td></td>
2842           <td class="md">)&nbsp;</td>
2843           <td class="md" colspan="2"><code> [virtual]</code></td>
2844         </tr>
2845
2846       </table>
2847     </td>
2848   </tr>
2849 </table>
2850 <table cellspacing=5 cellpadding=0 border=0>
2851   <tr>
2852     <td>
2853       &nbsp;
2854     </td>
2855     <td>
2856
2857 <p>
2858 Sends a servermode. 
2859 <p>
2860 you must format the parameters array with the target, modes and parameters for those modes.<p>
2861 For example:<p>
2862 char *modes[3];<p>
2863 modes[0] = ChannelName;<p>
2864 modes[1] = "+o";<p>
2865 modes[2] = user-&gt;nick;<p>
2866 Srv-&gt;SendMode(modes,3,user);<p>
2867 The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!
2868 <p>
2869 Definition at line <a class="el" href="modules_8cpp-source.html#l00499">499</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2870 <p>
2871 References <a class="el" href="modules_8h.html#a36">server_mode()</a>.
2872 <p>
2873 <div class="fragment"><pre>00500 {
2874 00501         <a class="code" href="modules_8h.html#a36">server_mode</a>(parameters,pcnt,user);
2875 00502 }
2876 </pre></div>    </td>
2877   </tr>
2878 </table>
2879 <a name="a2" doxytag="Server::SendOpers"></a><p>
2880 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2881   <tr>
2882     <td class="mdRow">
2883       <table cellpadding="0" cellspacing="0" border="0">
2884         <tr>
2885           <td class="md" nowrap valign="top"> void Server::SendOpers </td>
2886           <td class="md" valign="top">(&nbsp;</td>
2887           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2888           <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
2889           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2890           <td class="md" nowrap><code> [virtual]</code></td>
2891         </tr>
2892
2893       </table>
2894     </td>
2895   </tr>
2896 </table>
2897 <table cellspacing=5 cellpadding=0 border=0>
2898   <tr>
2899     <td>
2900       &nbsp;
2901     </td>
2902     <td>
2903
2904 <p>
2905 Sends text to all opers. 
2906 <p>
2907 This method sends a server notice to all opers with the usermode +s.
2908 <p>
2909 Definition at line <a class="el" href="modules_8cpp-source.html#l00429">429</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2910 <p>
2911 <div class="fragment"><pre>00430 {
2912 00431         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
2913 00432 }
2914 </pre></div>    </td>
2915   </tr>
2916 </table>
2917 <a name="a5" doxytag="Server::SendServ"></a><p>
2918 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2919   <tr>
2920     <td class="mdRow">
2921       <table cellpadding="0" cellspacing="0" border="0">
2922         <tr>
2923           <td class="md" nowrap valign="top"> void Server::SendServ </td>
2924           <td class="md" valign="top">(&nbsp;</td>
2925           <td class="md" nowrap valign="top">int&nbsp;</td>
2926           <td class="mdname" nowrap> <em>Socket</em>, </td>
2927         </tr>
2928         <tr>
2929           <td></td>
2930           <td></td>
2931           <td class="md" nowrap>std::string&nbsp;</td>
2932           <td class="mdname" nowrap> <em>s</em></td>
2933         </tr>
2934         <tr>
2935           <td></td>
2936           <td class="md">)&nbsp;</td>
2937           <td class="md" colspan="2"><code> [virtual]</code></td>
2938         </tr>
2939
2940       </table>
2941     </td>
2942   </tr>
2943 </table>
2944 <table cellspacing=5 cellpadding=0 border=0>
2945   <tr>
2946     <td>
2947       &nbsp;
2948     </td>
2949     <td>
2950
2951 <p>
2952 Sends text from the server to a socket. 
2953 <p>
2954 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
2955 <p>
2956 Definition at line <a class="el" href="modules_8cpp-source.html#l00509">509</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2957 <p>
2958 <div class="fragment"><pre>00510 {
2959 00511         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2960 00512 }
2961 </pre></div>    </td>
2962   </tr>
2963 </table>
2964 <a name="a8" doxytag="Server::SendTo"></a><p>
2965 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2966   <tr>
2967     <td class="mdRow">
2968       <table cellpadding="0" cellspacing="0" border="0">
2969         <tr>
2970           <td class="md" nowrap valign="top"> void Server::SendTo </td>
2971           <td class="md" valign="top">(&nbsp;</td>
2972           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2973           <td class="mdname" nowrap> <em>Source</em>, </td>
2974         </tr>
2975         <tr>
2976           <td></td>
2977           <td></td>
2978           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2979           <td class="mdname" nowrap> <em>Dest</em>, </td>
2980         </tr>
2981         <tr>
2982           <td></td>
2983           <td></td>
2984           <td class="md" nowrap>std::string&nbsp;</td>
2985           <td class="mdname" nowrap> <em>s</em></td>
2986         </tr>
2987         <tr>
2988           <td></td>
2989           <td class="md">)&nbsp;</td>
2990           <td class="md" colspan="2"><code> [virtual]</code></td>
2991         </tr>
2992
2993       </table>
2994     </td>
2995   </tr>
2996 </table>
2997 <table cellspacing=5 cellpadding=0 border=0>
2998   <tr>
2999     <td>
3000       &nbsp;
3001     </td>
3002     <td>
3003
3004 <p>
3005 Sends text from a user to another user. 
3006 <p>
3007 This method writes a line of text to a user, with a user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459) If you specify NULL as the source, then the data will originate from the local server, e.g. instead of:<p>
3008 :user!ident TEXT<p>
3009 The format will become:<p>
3010 :localserver TEXT<p>
3011 Which is useful for numerics and server notices to single users, etc.
3012 <p>
3013 Definition at line <a class="el" href="modules_8cpp-source.html#l00519">519</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3014 <p>
3015 References <a class="el" href="connection_8h-source.html#l00215">connection::fd</a>.
3016 <p>
3017 <div class="fragment"><pre>00520 {
3018 00521         <span class="keywordflow">if</span> (!Source)
3019 00522         {
3020 00523                 <span class="comment">// if source is NULL, then the message originates from the local server</span>
3021 00524                 Write(Dest-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">":%s %s"</span>,this-&gt;GetServerName().c_str(),s.c_str());
3022 00525         }
3023 00526         <span class="keywordflow">else</span>
3024 00527         {
3025 00528                 <span class="comment">// otherwise it comes from the user specified</span>
3026 00529                 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
3027 00530         }
3028 00531 }
3029 </pre></div>    </td>
3030   </tr>
3031 </table>
3032 <a name="a27" doxytag="Server::SendToModeMask"></a><p>
3033 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
3034   <tr>
3035     <td class="mdRow">
3036       <table cellpadding="0" cellspacing="0" border="0">
3037         <tr>
3038           <td class="md" nowrap valign="top"> void Server::SendToModeMask </td>
3039           <td class="md" valign="top">(&nbsp;</td>
3040           <td class="md" nowrap valign="top">std::string&nbsp;</td>
3041           <td class="mdname" nowrap> <em>modes</em>, </td>
3042         </tr>
3043         <tr>
3044           <td></td>
3045           <td></td>
3046           <td class="md" nowrap>int&nbsp;</td>
3047           <td class="mdname" nowrap> <em>flags</em>, </td>
3048         </tr>
3049         <tr>
3050           <td></td>
3051           <td></td>
3052           <td class="md" nowrap>std::string&nbsp;</td>
3053           <td class="mdname" nowrap> <em>text</em></td>
3054         </tr>
3055         <tr>
3056           <td></td>
3057           <td class="md">)&nbsp;</td>
3058           <td class="md" colspan="2"><code> [virtual]</code></td>
3059         </tr>
3060
3061       </table>
3062     </td>
3063   </tr>
3064 </table>
3065 <table cellspacing=5 cellpadding=0 border=0>
3066   <tr>
3067     <td>
3068       &nbsp;
3069     </td>
3070     <td>
3071
3072 <p>
3073 Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter. 
3074 <p>
3075 These can be RFC specified modes such as +i, or module provided modes, including ones provided by your own module. In the second parameter you must place a flag value which indicates wether the modes you have given will be logically ANDed or OR'ed. You may use one of either WM_AND or WM_OR. for example, if you were to use:<p>
3076 Serv-&gt;SendToModeMask("xi", WM_OR, "m00");<p>
3077 Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.
3078 <p>
3079 Definition at line <a class="el" href="modules_8cpp-source.html#l00442">442</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3080 <p>
3081 <div class="fragment"><pre>00443 {
3082 00444         WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
3083 00445 }
3084 </pre></div>    </td>
3085   </tr>
3086 </table>
3087 <a name="a12" doxytag="Server::SendWallops"></a><p>
3088 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
3089   <tr>
3090     <td class="mdRow">
3091       <table cellpadding="0" cellspacing="0" border="0">
3092         <tr>
3093           <td class="md" nowrap valign="top"> void Server::SendWallops </td>
3094           <td class="md" valign="top">(&nbsp;</td>
3095           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
3096           <td class="mdname" nowrap> <em>User</em>, </td>
3097         </tr>
3098         <tr>
3099           <td></td>
3100           <td></td>
3101           <td class="md" nowrap>std::string&nbsp;</td>
3102           <td class="mdname" nowrap> <em>text</em></td>
3103         </tr>
3104         <tr>
3105           <td></td>
3106           <td class="md">)&nbsp;</td>
3107           <td class="md" colspan="2"><code> [virtual]</code></td>
3108         </tr>
3109
3110       </table>
3111     </td>
3112   </tr>
3113 </table>
3114 <table cellspacing=5 cellpadding=0 border=0>
3115   <tr>
3116     <td>
3117       &nbsp;
3118     </td>
3119     <td>
3120
3121 <p>
3122 Sends a WALLOPS message. 
3123 <p>
3124 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
3125 <p>
3126 Definition at line <a class="el" href="modules_8cpp-source.html#l00567">567</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3127 <p>
3128 <div class="fragment"><pre>00568 {
3129 00569         WriteWallOps(User,<span class="keyword">false</span>,<span class="stringliteral">"%s"</span>,text.c_str());
3130 00570 }
3131 </pre></div>    </td>
3132   </tr>
3133 </table>
3134 <a name="a38" doxytag="Server::UserToPseudo"></a><p>
3135 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
3136   <tr>
3137     <td class="mdRow">
3138       <table cellpadding="0" cellspacing="0" border="0">
3139         <tr>
3140           <td class="md" nowrap valign="top"> bool Server::UserToPseudo </td>
3141           <td class="md" valign="top">(&nbsp;</td>
3142           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
3143           <td class="mdname" nowrap> <em>user</em>, </td>
3144         </tr>
3145         <tr>
3146           <td></td>
3147           <td></td>
3148           <td class="md" nowrap>std::string&nbsp;</td>
3149           <td class="mdname" nowrap> <em>message</em></td>
3150         </tr>
3151         <tr>
3152           <td></td>
3153           <td class="md">)&nbsp;</td>
3154           <td class="md" colspan="2"><code> [virtual]</code></td>
3155         </tr>
3156
3157       </table>
3158     </td>
3159   </tr>
3160 </table>
3161 <table cellspacing=5 cellpadding=0 border=0>
3162   <tr>
3163     <td>
3164       &nbsp;
3165     </td>
3166     <td>
3167
3168 <p>
3169 Remove a user's connection to the irc server, but leave their client in existence in the user hash. 
3170 <p>
3171 When you call this function, the user's file descriptor will be replaced with the value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will remain until it is restored with a valid file descriptor, or is removed from IRC by an operator After this call, the pointer to user will be invalid.
3172 <p>
3173 Definition at line <a class="el" href="modules_8cpp-source.html#l00671">671</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3174 <p>
3175 References <a class="el" href="users_8cpp-source.html#l00198">userrec::ClearBuffer()</a>, <a class="el" href="connection_8h-source.html#l00215">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00099">FD_MAGIC_NUMBER</a>, <a class="el" href="connection_8h-source.html#l00219">connection::host</a>, and <a class="el" href="users_8h-source.html#l00115">userrec::ident</a>.
3176 <p>
3177 <div class="fragment"><pre>00672 {
3178 00673         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> old_fd = user-&gt;<a class="code" href="classconnection.html#o0">fd</a>;
3179 00674         user-&gt;<a class="code" href="classconnection.html#o0">fd</a> = <a class="code" href="modules_8h.html#a26">FD_MAGIC_NUMBER</a>;
3180 00675         user-&gt;<a class="code" href="classuserrec.html#a10">ClearBuffer</a>();
3181 00676         Write(old_fd,<span class="stringliteral">"ERROR :Closing link (%s@%s) [%s]"</span>,user-&gt;<a class="code" href="classuserrec.html#o1">ident</a>,user-&gt;<a class="code" href="classconnection.html#o1">host</a>,message.c_str());
3182 00677         shutdown(old_fd,2);
3183 00678         close(old_fd);
3184 00679 }
3185 </pre></div>    </td>
3186   </tr>
3187 </table>
3188 <hr>The documentation for this class was generated from the following files:<ul>
3189 <li><a class="el" href="modules_8h-source.html">modules.h</a><li><a class="el" href="modules_8cpp-source.html">modules.cpp</a></ul>
3190 <hr size="1"><address style="align: right;"><small>Generated on Sat May 7 15:34:28 2005 for InspIRCd by
3191 <a href="http://www.doxygen.org/index.html">
3192 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
3193 </a>1.3.3 </small></address>
3194 </body>
3195 </html>