]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
New documentation!
[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">SendFrom</a> (int Socket, <a class="el" href="classuserrec.html">userrec</a> *User, std::string s)</td></tr>
37
38 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to a socket. </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">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>
40
41 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to another user. </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">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>
43
44 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to a channel (mulicast). </em> <a href="#a8"></a><em><br><br></td></tr>
45 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a9">CommonChannels</a> (<a class="el" href="classuserrec.html">userrec</a> *u1, <a class="el" href="classuserrec.html">userrec</a> *u2)</td></tr>
46
47 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if two users share a common channel. </em> <a href="#a9"></a><em><br><br></td></tr>
48 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a10">SendCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *User, std::string text, bool IncludeSender)</td></tr>
49
50 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to one or more channels (mulicast). </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">SendWallops</a> (<a class="el" href="classuserrec.html">userrec</a> *User, std::string text)</td></tr>
52
53 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a WALLOPS message. </em> <a href="#a11"></a><em><br><br></td></tr>
54 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a12">IsNick</a> (std::string nick)</td></tr>
55
56 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if a nick is valid. </em> <a href="#a12"></a><em><br><br></td></tr>
57 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a13">CountUsers</a> (<a class="el" href="classchanrec.html">chanrec</a> *c)</td></tr>
58
59 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a count of the number of users on a channel. </em> <a href="#a13"></a><em><br><br></td></tr>
60 <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#a14">FindNick</a> (std::string nick)</td></tr>
61
62 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to look up a nick and return a pointer to it. </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="classchanrec.html">chanrec</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a15">FindChannel</a> (std::string channel)</td></tr>
64
65 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to look up a channel 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 std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a16">ChanMode</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Chan)</td></tr>
67
68 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to look up a user's privilages on a channel. </em> <a href="#a16"></a><em><br><br></td></tr>
69 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a17">IsOnChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Chan)</td></tr>
70
71 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks if a user is on a channel. </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">GetServerName</a> ()</td></tr>
73
74 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the server name of the server where the module is loaded. </em> <a href="#a18"></a><em><br><br></td></tr>
75 <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#a19">GetNetworkName</a> ()</td></tr>
76
77 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the network name, global to all linked servers. </em> <a href="#a19"></a><em><br><br></td></tr>
78 <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#a20">GetAdmin</a> ()</td></tr>
79
80 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the information of the server as returned by the /ADMIN command. </em> <a href="#a20"></a><em><br><br></td></tr>
81 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a21">AddExtendedMode</a> (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)</td></tr>
82
83 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds an extended mode letter which is parsed by a module. </em> <a href="#a21"></a><em><br><br></td></tr>
84 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a22">AddExtendedListMode</a> (char modechar)</td></tr>
85
86 <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="#a22"></a><em><br><br></td></tr>
87 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a23">AddCommand</a> (char *cmd, handlerfunc f, char flags, int minparams, char *source)</td></tr>
88
89 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a command to the command table. </em> <a href="#a23"></a><em><br><br></td></tr>
90 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a24">SendMode</a> (char **parameters, int pcnt, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
91
92 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a servermode. </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">SendToModeMask</a> (std::string modes, int flags, std::string text)</td></tr>
94
95 <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="#a25"></a><em><br><br></td></tr>
96 <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#a26">JoinUserToChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string cname, std::string key)</td></tr>
97
98 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user to join a channel. </em> <a href="#a26"></a><em><br><br></td></tr>
99 <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#a27">PartUserFromChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string cname, std::string reason)</td></tr>
100
101 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user to part a channel. </em> <a href="#a27"></a><em><br><br></td></tr>
102 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a28">ChangeUserNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string nickname)</td></tr>
103
104 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user nickchange. </em> <a href="#a28"></a><em><br><br></td></tr>
105 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a29">QuitUser</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string reason)</td></tr>
106
107 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user to quit with the specified reason. </em> <a href="#a29"></a><em><br><br></td></tr>
108 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a30">MatchText</a> (std::string sliteral, std::string spattern)</td></tr>
109
110 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Matches text against a glob pattern. </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">CallCommandHandler</a> (std::string commandname, char **parameters, int pcnt, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
112
113 <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="#a31"></a><em><br><br></td></tr>
114 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a32">ChangeHost</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string host)</td></tr>
115
116 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change displayed hostname of a user. </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">ChangeGECOS</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string gecos)</td></tr>
118
119 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change GECOS (fullname) of a user. </em> <a href="#a33"></a><em><br><br></td></tr>
120 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a34">IsUlined</a> (std::string server)</td></tr>
121
122 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the servername you give is ulined. </em> <a href="#a34"></a><em><br><br></td></tr>
123 <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#a35">GetUsers</a> (<a class="el" href="classchanrec.html">chanrec</a> *chan)</td></tr>
124
125 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetches the userlist of a channel. </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">UserToPseudo</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string message)</td></tr>
127
128 <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="#a36"></a><em><br><br></td></tr>
129 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a37">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>
130
131 <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="#a37"></a><em><br><br></td></tr>
132 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a38">AddGLine</a> (long duration, std::string source, std::string reason, std::string hostmask)</td></tr>
133
134 <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="#a38"></a><em><br><br></td></tr>
135 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a39">AddQLine</a> (long duration, std::string source, std::string reason, std::string nickname)</td></tr>
136
137 <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="#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">AddZLine</a> (long duration, std::string source, std::string reason, std::string ipaddr)</td></tr>
139
140 <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="#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">AddKLine</a> (long duration, std::string source, std::string reason, std::string hostmask)</td></tr>
142
143 <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="#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">AddELine</a> (long duration, std::string source, std::string reason, std::string hostmask)</td></tr>
145
146 <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="#a42"></a><em><br><br></td></tr>
147 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a43">DelGLine</a> (std::string hostmask)</td></tr>
148
149 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a G-Line from all servers on the mesh. </em> <a href="#a43"></a><em><br><br></td></tr>
150 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a44">DelQLine</a> (std::string nickname)</td></tr>
151
152 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a Q-Line from all servers on the mesh. </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">DelZLine</a> (std::string ipaddr)</td></tr>
154
155 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a Z-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">DelKLine</a> (std::string hostmask)</td></tr>
157
158 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a local K-Line. </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">DelELine</a> (std::string hostmask)</td></tr>
160
161 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a local E-Line. </em> <a href="#a47"></a><em><br><br></td></tr>
162 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a48">CalcDuration</a> (std::string duration)</td></tr>
163
164 <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="#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">IsValidMask</a> (std::string mask)</td></tr>
166
167 <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="#a49"></a><em><br><br></td></tr>
168 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a50">MeshSendAll</a> (std::string text)</td></tr>
169
170 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a line of text to all connected servers. </em> <a href="#a50"></a><em><br><br></td></tr>
171 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a51">MeshSendCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string text)</td></tr>
172
173 <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="#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">MeshSendAllAlive</a> (std::string text)</td></tr>
175
176 <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="#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">MeshSendUnicast</a> (std::string destination, std::string text)</td></tr>
178
179 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function sends a line of text directly to a server. </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">MeshSendAllExcept</a> (std::string target, std::string text)</td></tr>
181
182 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function sends to all servers EXCEPT the one you specify. </em> <a href="#a54"></a><em><br><br></td></tr>
183 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a55">MeshCheckChan</a> (<a class="el" href="classchanrec.html">chanrec</a> *c, std::string servername)</td></tr>
184
185 <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="#a55"></a><em><br><br></td></tr>
186 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a56">MeshCheckCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *u, std::string servername)</td></tr>
187
188 <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="#a56"></a><em><br><br></td></tr>
189 <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#a57">FindModule</a> (std::string name)</td></tr>
190
191 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function finds a module by name. </em> <a href="#a57"></a><em><br><br></td></tr>
192 </table>
193 <hr><a name="_details"></a><h2>Detailed Description</h2>
194 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. 
195 <p>
196 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. 
197 <p>
198
199 <p>
200 Definition at line <a class="el" href="modules_8h-source.html#l00652">652</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
201 <a name="a0" doxytag="Server::Server"></a><p>
202 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
203   <tr>
204     <td class="mdRow">
205       <table cellpadding="0" cellspacing="0" border="0">
206         <tr>
207           <td class="md" nowrap valign="top"> Server::Server </td>
208           <td class="md" valign="top">(&nbsp;</td>
209           <td class="mdname1" valign="top" nowrap>          </td>
210           <td class="md" valign="top">&nbsp;)&nbsp;</td>
211           <td class="md" nowrap></td>
212         </tr>
213
214       </table>
215     </td>
216   </tr>
217 </table>
218 <table cellspacing=5 cellpadding=0 border=0>
219   <tr>
220     <td>
221       &nbsp;
222     </td>
223     <td>
224
225 <p>
226 Default constructor. 
227 <p>
228 Creates a Server object.
229 <p>
230 Definition at line <a class="el" href="modules_8cpp-source.html#l00416">416</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
231 <p>
232 <div class="fragment"><pre>00417 {
233 00418 }
234 </pre></div>    </td>
235   </tr>
236 </table>
237 <a name="a1" doxytag="Server::~Server"></a><p>
238 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
239   <tr>
240     <td class="mdRow">
241       <table cellpadding="0" cellspacing="0" border="0">
242         <tr>
243           <td class="md" nowrap valign="top"> Server::~<a class="el" href="classServer.html">Server</a> </td>
244           <td class="md" valign="top">(&nbsp;</td>
245           <td class="mdname1" valign="top" nowrap>          </td>
246           <td class="md" valign="top">&nbsp;)&nbsp;</td>
247           <td class="md" nowrap><code> [virtual]</code></td>
248         </tr>
249
250       </table>
251     </td>
252   </tr>
253 </table>
254 <table cellspacing=5 cellpadding=0 border=0>
255   <tr>
256     <td>
257       &nbsp;
258     </td>
259     <td>
260
261 <p>
262 Default destructor. 
263 <p>
264 Destroys a Server object.
265 <p>
266 Definition at line <a class="el" href="modules_8cpp-source.html#l00420">420</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
267 <p>
268 <div class="fragment"><pre>00421 {
269 00422 }
270 </pre></div>    </td>
271   </tr>
272 </table>
273 <hr><h2>Member Function Documentation</h2>
274 <a name="a23" doxytag="Server::AddCommand"></a><p>
275 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
276   <tr>
277     <td class="mdRow">
278       <table cellpadding="0" cellspacing="0" border="0">
279         <tr>
280           <td class="md" nowrap valign="top"> void Server::AddCommand </td>
281           <td class="md" valign="top">(&nbsp;</td>
282           <td class="md" nowrap valign="top">char *&nbsp;</td>
283           <td class="mdname" nowrap> <em>cmd</em>, </td>
284         </tr>
285         <tr>
286           <td></td>
287           <td></td>
288           <td class="md" nowrap>handlerfunc&nbsp;</td>
289           <td class="mdname" nowrap> <em>f</em>, </td>
290         </tr>
291         <tr>
292           <td></td>
293           <td></td>
294           <td class="md" nowrap>char&nbsp;</td>
295           <td class="mdname" nowrap> <em>flags</em>, </td>
296         </tr>
297         <tr>
298           <td></td>
299           <td></td>
300           <td class="md" nowrap>int&nbsp;</td>
301           <td class="mdname" nowrap> <em>minparams</em>, </td>
302         </tr>
303         <tr>
304           <td></td>
305           <td></td>
306           <td class="md" nowrap>char *&nbsp;</td>
307           <td class="mdname" nowrap> <em>source</em></td>
308         </tr>
309         <tr>
310           <td></td>
311           <td class="md">)&nbsp;</td>
312           <td class="md" colspan="2"><code> [virtual]</code></td>
313         </tr>
314
315       </table>
316     </td>
317   </tr>
318 </table>
319 <table cellspacing=5 cellpadding=0 border=0>
320   <tr>
321     <td>
322       &nbsp;
323     </td>
324     <td>
325
326 <p>
327 Adds a command to the command table. 
328 <p>
329 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>
330 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>
331 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.
332 <p>
333 Definition at line <a class="el" href="modules_8cpp-source.html#l00497">497</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
334 <p>
335 References <a class="el" href="modules_8h.html#a35">createcommand()</a>.
336 <p>
337 <div class="fragment"><pre>00498 {
338 00499         <a class="code" href="modules_8h.html#a35">createcommand</a>(cmd,f,flags,minparams,source);
339 00500 }
340 </pre></div>    </td>
341   </tr>
342 </table>
343 <a name="a42" doxytag="Server::AddELine"></a><p>
344 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
345   <tr>
346     <td class="mdRow">
347       <table cellpadding="0" cellspacing="0" border="0">
348         <tr>
349           <td class="md" nowrap valign="top"> void Server::AddELine </td>
350           <td class="md" valign="top">(&nbsp;</td>
351           <td class="md" nowrap valign="top">long&nbsp;</td>
352           <td class="mdname" nowrap> <em>duration</em>, </td>
353         </tr>
354         <tr>
355           <td></td>
356           <td></td>
357           <td class="md" nowrap>std::string&nbsp;</td>
358           <td class="mdname" nowrap> <em>source</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>reason</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>hostmask</em></td>
371         </tr>
372         <tr>
373           <td></td>
374           <td class="md">)&nbsp;</td>
375           <td class="md" colspan="2"><code> [virtual]</code></td>
376         </tr>
377
378       </table>
379     </td>
380   </tr>
381 </table>
382 <table cellspacing=5 cellpadding=0 border=0>
383   <tr>
384     <td>
385       &nbsp;
386     </td>
387     <td>
388
389 <p>
390 Adds a E-line The E-line is enforced as soon as it is added. 
391 <p>
392 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a48">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. 
393 <p>
394 Definition at line <a class="el" href="modules_8cpp-source.html#l00715">715</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
395 <p>
396 References <a class="el" href="xline_8h.html#a5">add_eline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
397 <p>
398 <div class="fragment"><pre>00716 {
399 00717         <a class="code" href="xline_8h.html#a5">add_eline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
400 00718 }
401 </pre></div>    </td>
402   </tr>
403 </table>
404 <a name="a22" doxytag="Server::AddExtendedListMode"></a><p>
405 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
406   <tr>
407     <td class="mdRow">
408       <table cellpadding="0" cellspacing="0" border="0">
409         <tr>
410           <td class="md" nowrap valign="top"> bool Server::AddExtendedListMode </td>
411           <td class="md" valign="top">(&nbsp;</td>
412           <td class="md" nowrap valign="top">char&nbsp;</td>
413           <td class="mdname1" valign="top" nowrap> <em>modechar</em>          </td>
414           <td class="md" valign="top">&nbsp;)&nbsp;</td>
415           <td class="md" nowrap><code> [virtual]</code></td>
416         </tr>
417
418       </table>
419     </td>
420   </tr>
421 </table>
422 <table cellspacing=5 cellpadding=0 border=0>
423   <tr>
424     <td>
425       &nbsp;
426     </td>
427     <td>
428
429 <p>
430 Adds an extended mode letter which is parsed by a module and handled in a list fashion. 
431 <p>
432 This call is used to implement modes like +q and +a. The characteristics of these modes are as follows:<p>
433 (1) They are ALWAYS on channels, not on users, therefore their type is MT_CHANNEL<p>
434 (2) They always take exactly one parameter when being added or removed<p>
435 (3) They can be set multiple times, usually on users in channels<p>
436 (4) The mode and its parameter are NOT stored in the channels modes structure<p>
437 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.
438 <p>
439 Definition at line <a class="el" href="modules_8cpp-source.html#l00642">642</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
440 <p>
441 References <a class="el" href="modules_8cpp-source.html#l00277">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00287">ModeMakeList()</a>, and <a class="el" href="modules_8h-source.html#l00031">MT_CHANNEL</a>.
442 <p>
443 <div class="fragment"><pre>00643 {
444 00644         <span class="keywordtype">bool</span> res = <a class="code" href="modules_8cpp.html#a57">DoAddExtendedMode</a>(modechar,MT_CHANNEL,<span class="keyword">false</span>,1,1);
445 00645         <span class="keywordflow">if</span> (res)
446 00646                 <a class="code" href="modules_8cpp.html#a58">ModeMakeList</a>(modechar);
447 00647         <span class="keywordflow">return</span> res;
448 00648 }
449 </pre></div>    </td>
450   </tr>
451 </table>
452 <a name="a21" doxytag="Server::AddExtendedMode"></a><p>
453 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
454   <tr>
455     <td class="mdRow">
456       <table cellpadding="0" cellspacing="0" border="0">
457         <tr>
458           <td class="md" nowrap valign="top"> bool Server::AddExtendedMode </td>
459           <td class="md" valign="top">(&nbsp;</td>
460           <td class="md" nowrap valign="top">char&nbsp;</td>
461           <td class="mdname" nowrap> <em>modechar</em>, </td>
462         </tr>
463         <tr>
464           <td></td>
465           <td></td>
466           <td class="md" nowrap>int&nbsp;</td>
467           <td class="mdname" nowrap> <em>type</em>, </td>
468         </tr>
469         <tr>
470           <td></td>
471           <td></td>
472           <td class="md" nowrap>bool&nbsp;</td>
473           <td class="mdname" nowrap> <em>requires_oper</em>, </td>
474         </tr>
475         <tr>
476           <td></td>
477           <td></td>
478           <td class="md" nowrap>int&nbsp;</td>
479           <td class="mdname" nowrap> <em>params_when_on</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_off</em></td>
486         </tr>
487         <tr>
488           <td></td>
489           <td class="md">)&nbsp;</td>
490           <td class="md" colspan="2"><code> [virtual]</code></td>
491         </tr>
492
493       </table>
494     </td>
495   </tr>
496 </table>
497 <table cellspacing=5 cellpadding=0 border=0>
498   <tr>
499     <td>
500       &nbsp;
501     </td>
502     <td>
503
504 <p>
505 Adds an extended mode letter which is parsed by a module. 
506 <p>
507 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.
508 <p>
509 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>.
510 <p>
511 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, <a class="el" href="modules_8cpp-source.html#l00277">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>.
512 <p>
513 <div class="fragment"><pre>00623 {
514 00624         <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>)
515 00625         {
516 00626                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
517 00627                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
518 00628         }
519 00629         <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>))
520 00630         {
521 00631                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
522 00632                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
523 00633         }
524 00634         <span class="keywordflow">if</span> ((params_when_on&gt;1) || (params_when_off&gt;1))
525 00635         {
526 00636                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
527 00637                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
528 00638         }
529 00639         <span class="keywordflow">return</span> <a class="code" href="modules_8cpp.html#a57">DoAddExtendedMode</a>(modechar,type,requires_oper,params_when_on,params_when_off);
530 00640 }
531 </pre></div>    </td>
532   </tr>
533 </table>
534 <a name="a38" doxytag="Server::AddGLine"></a><p>
535 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
536   <tr>
537     <td class="mdRow">
538       <table cellpadding="0" cellspacing="0" border="0">
539         <tr>
540           <td class="md" nowrap valign="top"> void Server::AddGLine </td>
541           <td class="md" valign="top">(&nbsp;</td>
542           <td class="md" nowrap valign="top">long&nbsp;</td>
543           <td class="mdname" nowrap> <em>duration</em>, </td>
544         </tr>
545         <tr>
546           <td></td>
547           <td></td>
548           <td class="md" nowrap>std::string&nbsp;</td>
549           <td class="mdname" nowrap> <em>source</em>, </td>
550         </tr>
551         <tr>
552           <td></td>
553           <td></td>
554           <td class="md" nowrap>std::string&nbsp;</td>
555           <td class="mdname" nowrap> <em>reason</em>, </td>
556         </tr>
557         <tr>
558           <td></td>
559           <td></td>
560           <td class="md" nowrap>std::string&nbsp;</td>
561           <td class="mdname" nowrap> <em>hostmask</em></td>
562         </tr>
563         <tr>
564           <td></td>
565           <td class="md">)&nbsp;</td>
566           <td class="md" colspan="2"><code> [virtual]</code></td>
567         </tr>
568
569       </table>
570     </td>
571   </tr>
572 </table>
573 <table cellspacing=5 cellpadding=0 border=0>
574   <tr>
575     <td>
576       &nbsp;
577     </td>
578     <td>
579
580 <p>
581 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. 
582 <p>
583 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a48">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.
584 <p>
585 Definition at line <a class="el" href="modules_8cpp-source.html#l00695">695</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
586 <p>
587 References <a class="el" href="xline_8h.html#a1">add_gline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
588 <p>
589 <div class="fragment"><pre>00696 {
590 00697         <a class="code" href="xline_8h.html#a1">add_gline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
591 00698 }
592 </pre></div>    </td>
593   </tr>
594 </table>
595 <a name="a41" doxytag="Server::AddKLine"></a><p>
596 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
597   <tr>
598     <td class="mdRow">
599       <table cellpadding="0" cellspacing="0" border="0">
600         <tr>
601           <td class="md" nowrap valign="top"> void Server::AddKLine </td>
602           <td class="md" valign="top">(&nbsp;</td>
603           <td class="md" nowrap valign="top">long&nbsp;</td>
604           <td class="mdname" nowrap> <em>duration</em>, </td>
605         </tr>
606         <tr>
607           <td></td>
608           <td></td>
609           <td class="md" nowrap>std::string&nbsp;</td>
610           <td class="mdname" nowrap> <em>source</em>, </td>
611         </tr>
612         <tr>
613           <td></td>
614           <td></td>
615           <td class="md" nowrap>std::string&nbsp;</td>
616           <td class="mdname" nowrap> <em>reason</em>, </td>
617         </tr>
618         <tr>
619           <td></td>
620           <td></td>
621           <td class="md" nowrap>std::string&nbsp;</td>
622           <td class="mdname" nowrap> <em>hostmask</em></td>
623         </tr>
624         <tr>
625           <td></td>
626           <td class="md">)&nbsp;</td>
627           <td class="md" colspan="2"><code> [virtual]</code></td>
628         </tr>
629
630       </table>
631     </td>
632   </tr>
633 </table>
634 <table cellspacing=5 cellpadding=0 border=0>
635   <tr>
636     <td>
637       &nbsp;
638     </td>
639     <td>
640
641 <p>
642 Adds a K-line The K-line is enforced as soon as it is added. 
643 <p>
644 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a48">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. 
645 <p>
646 Definition at line <a class="el" href="modules_8cpp-source.html#l00710">710</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
647 <p>
648 References <a class="el" href="xline_8h.html#a4">add_kline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
649 <p>
650 <div class="fragment"><pre>00711 {
651 00712         <a class="code" href="xline_8h.html#a4">add_kline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
652 00713 }
653 </pre></div>    </td>
654   </tr>
655 </table>
656 <a name="a39" doxytag="Server::AddQLine"></a><p>
657 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
658   <tr>
659     <td class="mdRow">
660       <table cellpadding="0" cellspacing="0" border="0">
661         <tr>
662           <td class="md" nowrap valign="top"> void Server::AddQLine </td>
663           <td class="md" valign="top">(&nbsp;</td>
664           <td class="md" nowrap valign="top">long&nbsp;</td>
665           <td class="mdname" nowrap> <em>duration</em>, </td>
666         </tr>
667         <tr>
668           <td></td>
669           <td></td>
670           <td class="md" nowrap>std::string&nbsp;</td>
671           <td class="mdname" nowrap> <em>source</em>, </td>
672         </tr>
673         <tr>
674           <td></td>
675           <td></td>
676           <td class="md" nowrap>std::string&nbsp;</td>
677           <td class="mdname" nowrap> <em>reason</em>, </td>
678         </tr>
679         <tr>
680           <td></td>
681           <td></td>
682           <td class="md" nowrap>std::string&nbsp;</td>
683           <td class="mdname" nowrap> <em>nickname</em></td>
684         </tr>
685         <tr>
686           <td></td>
687           <td class="md">)&nbsp;</td>
688           <td class="md" colspan="2"><code> [virtual]</code></td>
689         </tr>
690
691       </table>
692     </td>
693   </tr>
694 </table>
695 <table cellspacing=5 cellpadding=0 border=0>
696   <tr>
697     <td>
698       &nbsp;
699     </td>
700     <td>
701
702 <p>
703 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. 
704 <p>
705 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a48">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. 
706 <p>
707 Definition at line <a class="el" href="modules_8cpp-source.html#l00700">700</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
708 <p>
709 References <a class="el" href="xline_8h.html#a2">add_qline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
710 <p>
711 <div class="fragment"><pre>00701 {
712 00702         <a class="code" href="xline_8h.html#a2">add_qline</a>(duration, source.c_str(), reason.c_str(), nickname.c_str());
713 00703 }
714 </pre></div>    </td>
715   </tr>
716 </table>
717 <a name="a40" doxytag="Server::AddZLine"></a><p>
718 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
719   <tr>
720     <td class="mdRow">
721       <table cellpadding="0" cellspacing="0" border="0">
722         <tr>
723           <td class="md" nowrap valign="top"> void Server::AddZLine </td>
724           <td class="md" valign="top">(&nbsp;</td>
725           <td class="md" nowrap valign="top">long&nbsp;</td>
726           <td class="mdname" nowrap> <em>duration</em>, </td>
727         </tr>
728         <tr>
729           <td></td>
730           <td></td>
731           <td class="md" nowrap>std::string&nbsp;</td>
732           <td class="mdname" nowrap> <em>source</em>, </td>
733         </tr>
734         <tr>
735           <td></td>
736           <td></td>
737           <td class="md" nowrap>std::string&nbsp;</td>
738           <td class="mdname" nowrap> <em>reason</em>, </td>
739         </tr>
740         <tr>
741           <td></td>
742           <td></td>
743           <td class="md" nowrap>std::string&nbsp;</td>
744           <td class="mdname" nowrap> <em>ipaddr</em></td>
745         </tr>
746         <tr>
747           <td></td>
748           <td class="md">)&nbsp;</td>
749           <td class="md" colspan="2"><code> [virtual]</code></td>
750         </tr>
751
752       </table>
753     </td>
754   </tr>
755 </table>
756 <table cellspacing=5 cellpadding=0 border=0>
757   <tr>
758     <td>
759       &nbsp;
760     </td>
761     <td>
762
763 <p>
764 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. 
765 <p>
766 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a48">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. 
767 <p>
768 Definition at line <a class="el" href="modules_8cpp-source.html#l00705">705</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
769 <p>
770 References <a class="el" href="xline_8h.html#a3">add_zline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
771 <p>
772 <div class="fragment"><pre>00706 {
773 00707         <a class="code" href="xline_8h.html#a3">add_zline</a>(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
774 00708 }
775 </pre></div>    </td>
776   </tr>
777 </table>
778 <a name="a48" doxytag="Server::CalcDuration"></a><p>
779 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
780   <tr>
781     <td class="mdRow">
782       <table cellpadding="0" cellspacing="0" border="0">
783         <tr>
784           <td class="md" nowrap valign="top"> long Server::CalcDuration </td>
785           <td class="md" valign="top">(&nbsp;</td>
786           <td class="md" nowrap valign="top">std::string&nbsp;</td>
787           <td class="mdname1" valign="top" nowrap> <em>duration</em>          </td>
788           <td class="md" valign="top">&nbsp;)&nbsp;</td>
789           <td class="md" nowrap><code> [virtual]</code></td>
790         </tr>
791
792       </table>
793     </td>
794   </tr>
795 </table>
796 <table cellspacing=5 cellpadding=0 border=0>
797   <tr>
798     <td>
799       &nbsp;
800     </td>
801     <td>
802
803 <p>
804 Calculates a duration This method will take a string containing a formatted duration (e.g. 
805 <p>
806 "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.
807 <p>
808 Definition at line <a class="el" href="modules_8cpp-source.html#l00745">745</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
809 <p>
810 References <a class="el" href="commands_8h.html#a75">duration()</a>.
811 <p>
812 <div class="fragment"><pre>00746 {
813 00747         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#a75">duration</a>(delta.c_str());
814 00748 }
815 </pre></div>    </td>
816   </tr>
817 </table>
818 <a name="a31" doxytag="Server::CallCommandHandler"></a><p>
819 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
820   <tr>
821     <td class="mdRow">
822       <table cellpadding="0" cellspacing="0" border="0">
823         <tr>
824           <td class="md" nowrap valign="top"> void Server::CallCommandHandler </td>
825           <td class="md" valign="top">(&nbsp;</td>
826           <td class="md" nowrap valign="top">std::string&nbsp;</td>
827           <td class="mdname" nowrap> <em>commandname</em>, </td>
828         </tr>
829         <tr>
830           <td></td>
831           <td></td>
832           <td class="md" nowrap>char **&nbsp;</td>
833           <td class="mdname" nowrap> <em>parameters</em>, </td>
834         </tr>
835         <tr>
836           <td></td>
837           <td></td>
838           <td class="md" nowrap>int&nbsp;</td>
839           <td class="mdname" nowrap> <em>pcnt</em>, </td>
840         </tr>
841         <tr>
842           <td></td>
843           <td></td>
844           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
845           <td class="mdname" nowrap> <em>user</em></td>
846         </tr>
847         <tr>
848           <td></td>
849           <td class="md">)&nbsp;</td>
850           <td class="md" colspan="2"><code> [virtual]</code></td>
851         </tr>
852
853       </table>
854     </td>
855   </tr>
856 </table>
857 <table cellspacing=5 cellpadding=0 border=0>
858   <tr>
859     <td>
860       &nbsp;
861     </td>
862     <td>
863
864 <p>
865 Calls the handler for a command, either implemented by the core or by another module. 
866 <p>
867 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>
868 ) 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#a23">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.
869 <p>
870 Definition at line <a class="el" href="modules_8cpp-source.html#l00487">487</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
871 <p>
872 <div class="fragment"><pre>00488 {
873 00489         call_handler(commandname.c_str(),parameters,pcnt,user);
874 00490 }
875 </pre></div>    </td>
876   </tr>
877 </table>
878 <a name="a33" doxytag="Server::ChangeGECOS"></a><p>
879 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
880   <tr>
881     <td class="mdRow">
882       <table cellpadding="0" cellspacing="0" border="0">
883         <tr>
884           <td class="md" nowrap valign="top"> void Server::ChangeGECOS </td>
885           <td class="md" valign="top">(&nbsp;</td>
886           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
887           <td class="mdname" nowrap> <em>user</em>, </td>
888         </tr>
889         <tr>
890           <td></td>
891           <td></td>
892           <td class="md" nowrap>std::string&nbsp;</td>
893           <td class="mdname" nowrap> <em>gecos</em></td>
894         </tr>
895         <tr>
896           <td></td>
897           <td class="md">)&nbsp;</td>
898           <td class="md" colspan="2"><code> [virtual]</code></td>
899         </tr>
900
901       </table>
902     </td>
903   </tr>
904 </table>
905 <table cellspacing=5 cellpadding=0 border=0>
906   <tr>
907     <td>
908       &nbsp;
909     </td>
910     <td>
911
912 <p>
913 Change GECOS (fullname) of a user. 
914 <p>
915 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.
916 <p>
917 Definition at line <a class="el" href="modules_8cpp-source.html#l00575">575</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
918 <p>
919 References <a class="el" href="message_8h.html#a10">ChangeName()</a>.
920 <p>
921 <div class="fragment"><pre>00576 {
922 00577         <a class="code" href="message_8h.html#a10">ChangeName</a>(user,gecos.c_str());
923 00578 }
924 </pre></div>    </td>
925   </tr>
926 </table>
927 <a name="a32" doxytag="Server::ChangeHost"></a><p>
928 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
929   <tr>
930     <td class="mdRow">
931       <table cellpadding="0" cellspacing="0" border="0">
932         <tr>
933           <td class="md" nowrap valign="top"> void Server::ChangeHost </td>
934           <td class="md" valign="top">(&nbsp;</td>
935           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
936           <td class="mdname" nowrap> <em>user</em>, </td>
937         </tr>
938         <tr>
939           <td></td>
940           <td></td>
941           <td class="md" nowrap>std::string&nbsp;</td>
942           <td class="mdname" nowrap> <em>host</em></td>
943         </tr>
944         <tr>
945           <td></td>
946           <td class="md">)&nbsp;</td>
947           <td class="md" colspan="2"><code> [virtual]</code></td>
948         </tr>
949
950       </table>
951     </td>
952   </tr>
953 </table>
954 <table cellspacing=5 cellpadding=0 border=0>
955   <tr>
956     <td>
957       &nbsp;
958     </td>
959     <td>
960
961 <p>
962 Change displayed hostname of a user. 
963 <p>
964 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.
965 <p>
966 Definition at line <a class="el" href="modules_8cpp-source.html#l00570">570</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
967 <p>
968 References <a class="el" href="message_8h.html#a11">ChangeDisplayedHost()</a>.
969 <p>
970 <div class="fragment"><pre>00571 {
971 00572         <a class="code" href="message_8h.html#a11">ChangeDisplayedHost</a>(user,host.c_str());
972 00573 }
973 </pre></div>    </td>
974   </tr>
975 </table>
976 <a name="a28" doxytag="Server::ChangeUserNick"></a><p>
977 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
978   <tr>
979     <td class="mdRow">
980       <table cellpadding="0" cellspacing="0" border="0">
981         <tr>
982           <td class="md" nowrap valign="top"> void Server::ChangeUserNick </td>
983           <td class="md" valign="top">(&nbsp;</td>
984           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
985           <td class="mdname" nowrap> <em>user</em>, </td>
986         </tr>
987         <tr>
988           <td></td>
989           <td></td>
990           <td class="md" nowrap>std::string&nbsp;</td>
991           <td class="mdname" nowrap> <em>nickname</em></td>
992         </tr>
993         <tr>
994           <td></td>
995           <td class="md">)&nbsp;</td>
996           <td class="md" colspan="2"><code> [virtual]</code></td>
997         </tr>
998
999       </table>
1000     </td>
1001   </tr>
1002 </table>
1003 <table cellspacing=5 cellpadding=0 border=0>
1004   <tr>
1005     <td>
1006       &nbsp;
1007     </td>
1008     <td>
1009
1010 <p>
1011 Forces a user nickchange. 
1012 <p>
1013 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.
1014 <p>
1015 Definition at line <a class="el" href="modules_8cpp-source.html#l00471">471</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1016 <p>
1017 <div class="fragment"><pre>00472 {
1018 00473         force_nickchange(user,nickname.c_str());
1019 00474 }
1020 </pre></div>    </td>
1021   </tr>
1022 </table>
1023 <a name="a16" doxytag="Server::ChanMode"></a><p>
1024 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1025   <tr>
1026     <td class="mdRow">
1027       <table cellpadding="0" cellspacing="0" border="0">
1028         <tr>
1029           <td class="md" nowrap valign="top"> std::string Server::ChanMode </td>
1030           <td class="md" valign="top">(&nbsp;</td>
1031           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1032           <td class="mdname" nowrap> <em>User</em>, </td>
1033         </tr>
1034         <tr>
1035           <td></td>
1036           <td></td>
1037           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1038           <td class="mdname" nowrap> <em>Chan</em></td>
1039         </tr>
1040         <tr>
1041           <td></td>
1042           <td class="md">)&nbsp;</td>
1043           <td class="md" colspan="2"><code> [virtual]</code></td>
1044         </tr>
1045
1046       </table>
1047     </td>
1048   </tr>
1049 </table>
1050 <table cellspacing=5 cellpadding=0 border=0>
1051   <tr>
1052     <td>
1053       &nbsp;
1054     </td>
1055     <td>
1056
1057 <p>
1058 Attempts to look up a user's privilages on a channel. 
1059 <p>
1060 This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
1061 <p>
1062 Definition at line <a class="el" href="modules_8cpp-source.html#l00595">595</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1063 <p>
1064 References <a class="el" href="message_8h.html#a14">cmode()</a>.
1065 <p>
1066 <div class="fragment"><pre>00596 {
1067 00597         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a14">cmode</a>(User,Chan);
1068 00598 }
1069 </pre></div>    </td>
1070   </tr>
1071 </table>
1072 <a name="a9" doxytag="Server::CommonChannels"></a><p>
1073 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1074   <tr>
1075     <td class="mdRow">
1076       <table cellpadding="0" cellspacing="0" border="0">
1077         <tr>
1078           <td class="md" nowrap valign="top"> bool Server::CommonChannels </td>
1079           <td class="md" valign="top">(&nbsp;</td>
1080           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1081           <td class="mdname" nowrap> <em>u1</em>, </td>
1082         </tr>
1083         <tr>
1084           <td></td>
1085           <td></td>
1086           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1087           <td class="mdname" nowrap> <em>u2</em></td>
1088         </tr>
1089         <tr>
1090           <td></td>
1091           <td class="md">)&nbsp;</td>
1092           <td class="md" colspan="2"><code> [virtual]</code></td>
1093         </tr>
1094
1095       </table>
1096     </td>
1097   </tr>
1098 </table>
1099 <table cellspacing=5 cellpadding=0 border=0>
1100   <tr>
1101     <td>
1102       &nbsp;
1103     </td>
1104     <td>
1105
1106 <p>
1107 Returns true if two users share a common channel. 
1108 <p>
1109 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a10">Server::SendCommon</a> method.
1110 <p>
1111 Definition at line <a class="el" href="modules_8cpp-source.html#l00548">548</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1112 <p>
1113 References <a class="el" href="message_8h.html#a0">common_channels()</a>.
1114 <p>
1115 <div class="fragment"><pre>00549 {
1116 00550         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a0">common_channels</a>(u1,u2) != 0);
1117 00551 }
1118 </pre></div>    </td>
1119   </tr>
1120 </table>
1121 <a name="a13" doxytag="Server::CountUsers"></a><p>
1122 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1123   <tr>
1124     <td class="mdRow">
1125       <table cellpadding="0" cellspacing="0" border="0">
1126         <tr>
1127           <td class="md" nowrap valign="top"> int Server::CountUsers </td>
1128           <td class="md" valign="top">(&nbsp;</td>
1129           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1130           <td class="mdname1" valign="top" nowrap> <em>c</em>          </td>
1131           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1132           <td class="md" nowrap><code> [virtual]</code></td>
1133         </tr>
1134
1135       </table>
1136     </td>
1137   </tr>
1138 </table>
1139 <table cellspacing=5 cellpadding=0 border=0>
1140   <tr>
1141     <td>
1142       &nbsp;
1143     </td>
1144     <td>
1145
1146 <p>
1147 Returns a count of the number of users on a channel. 
1148 <p>
1149 This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.
1150 <p>
1151 Definition at line <a class="el" href="modules_8cpp-source.html#l00650">650</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1152 <p>
1153 <div class="fragment"><pre>00651 {
1154 00652         <span class="keywordflow">return</span> usercount(c);
1155 00653 }
1156 </pre></div>    </td>
1157   </tr>
1158 </table>
1159 <a name="a47" doxytag="Server::DelELine"></a><p>
1160 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1161   <tr>
1162     <td class="mdRow">
1163       <table cellpadding="0" cellspacing="0" border="0">
1164         <tr>
1165           <td class="md" nowrap valign="top"> bool Server::DelELine </td>
1166           <td class="md" valign="top">(&nbsp;</td>
1167           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1168           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1169           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1170           <td class="md" nowrap><code> [virtual]</code></td>
1171         </tr>
1172
1173       </table>
1174     </td>
1175   </tr>
1176 </table>
1177 <table cellspacing=5 cellpadding=0 border=0>
1178   <tr>
1179     <td>
1180       &nbsp;
1181     </td>
1182     <td>
1183
1184 <p>
1185 Deletes a local E-Line. 
1186 <p>
1187
1188 <p>
1189 Definition at line <a class="el" href="modules_8cpp-source.html#l00740">740</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1190 <p>
1191 References <a class="el" href="xline_8h.html#a10">del_eline()</a>.
1192 <p>
1193 <div class="fragment"><pre>00741 {
1194 00742         <a class="code" href="xline_8h.html#a10">del_eline</a>(hostmask.c_str());
1195 00743 }
1196 </pre></div>    </td>
1197   </tr>
1198 </table>
1199 <a name="a43" doxytag="Server::DelGLine"></a><p>
1200 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1201   <tr>
1202     <td class="mdRow">
1203       <table cellpadding="0" cellspacing="0" border="0">
1204         <tr>
1205           <td class="md" nowrap valign="top"> bool Server::DelGLine </td>
1206           <td class="md" valign="top">(&nbsp;</td>
1207           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1208           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1209           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1210           <td class="md" nowrap><code> [virtual]</code></td>
1211         </tr>
1212
1213       </table>
1214     </td>
1215   </tr>
1216 </table>
1217 <table cellspacing=5 cellpadding=0 border=0>
1218   <tr>
1219     <td>
1220       &nbsp;
1221     </td>
1222     <td>
1223
1224 <p>
1225 Deletes a G-Line from all servers on the mesh. 
1226 <p>
1227
1228 <p>
1229 Definition at line <a class="el" href="modules_8cpp-source.html#l00720">720</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1230 <p>
1231 References <a class="el" href="xline_8h.html#a6">del_gline()</a>.
1232 <p>
1233 <div class="fragment"><pre>00721 {
1234 00722         <a class="code" href="xline_8h.html#a6">del_gline</a>(hostmask.c_str());
1235 00723 }
1236 </pre></div>    </td>
1237   </tr>
1238 </table>
1239 <a name="a46" doxytag="Server::DelKLine"></a><p>
1240 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1241   <tr>
1242     <td class="mdRow">
1243       <table cellpadding="0" cellspacing="0" border="0">
1244         <tr>
1245           <td class="md" nowrap valign="top"> bool Server::DelKLine </td>
1246           <td class="md" valign="top">(&nbsp;</td>
1247           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1248           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1249           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1250           <td class="md" nowrap><code> [virtual]</code></td>
1251         </tr>
1252
1253       </table>
1254     </td>
1255   </tr>
1256 </table>
1257 <table cellspacing=5 cellpadding=0 border=0>
1258   <tr>
1259     <td>
1260       &nbsp;
1261     </td>
1262     <td>
1263
1264 <p>
1265 Deletes a local K-Line. 
1266 <p>
1267
1268 <p>
1269 Definition at line <a class="el" href="modules_8cpp-source.html#l00735">735</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1270 <p>
1271 References <a class="el" href="xline_8h.html#a9">del_kline()</a>.
1272 <p>
1273 <div class="fragment"><pre>00736 {
1274 00737         <a class="code" href="xline_8h.html#a9">del_kline</a>(hostmask.c_str());
1275 00738 }
1276 </pre></div>    </td>
1277   </tr>
1278 </table>
1279 <a name="a44" doxytag="Server::DelQLine"></a><p>
1280 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1281   <tr>
1282     <td class="mdRow">
1283       <table cellpadding="0" cellspacing="0" border="0">
1284         <tr>
1285           <td class="md" nowrap valign="top"> bool Server::DelQLine </td>
1286           <td class="md" valign="top">(&nbsp;</td>
1287           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1288           <td class="mdname1" valign="top" nowrap> <em>nickname</em>          </td>
1289           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1290           <td class="md" nowrap><code> [virtual]</code></td>
1291         </tr>
1292
1293       </table>
1294     </td>
1295   </tr>
1296 </table>
1297 <table cellspacing=5 cellpadding=0 border=0>
1298   <tr>
1299     <td>
1300       &nbsp;
1301     </td>
1302     <td>
1303
1304 <p>
1305 Deletes a Q-Line from all servers on the mesh. 
1306 <p>
1307
1308 <p>
1309 Definition at line <a class="el" href="modules_8cpp-source.html#l00725">725</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1310 <p>
1311 References <a class="el" href="xline_8h.html#a7">del_qline()</a>.
1312 <p>
1313 <div class="fragment"><pre>00726 {
1314 00727         <a class="code" href="xline_8h.html#a7">del_qline</a>(nickname.c_str());
1315 00728 }
1316 </pre></div>    </td>
1317   </tr>
1318 </table>
1319 <a name="a45" doxytag="Server::DelZLine"></a><p>
1320 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1321   <tr>
1322     <td class="mdRow">
1323       <table cellpadding="0" cellspacing="0" border="0">
1324         <tr>
1325           <td class="md" nowrap valign="top"> bool Server::DelZLine </td>
1326           <td class="md" valign="top">(&nbsp;</td>
1327           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1328           <td class="mdname1" valign="top" nowrap> <em>ipaddr</em>          </td>
1329           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1330           <td class="md" nowrap><code> [virtual]</code></td>
1331         </tr>
1332
1333       </table>
1334     </td>
1335   </tr>
1336 </table>
1337 <table cellspacing=5 cellpadding=0 border=0>
1338   <tr>
1339     <td>
1340       &nbsp;
1341     </td>
1342     <td>
1343
1344 <p>
1345 Deletes a Z-Line from all servers on the mesh. 
1346 <p>
1347
1348 <p>
1349 Definition at line <a class="el" href="modules_8cpp-source.html#l00730">730</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1350 <p>
1351 References <a class="el" href="xline_8h.html#a8">del_zline()</a>.
1352 <p>
1353 <div class="fragment"><pre>00731 {
1354 00732         <a class="code" href="xline_8h.html#a8">del_zline</a>(ipaddr.c_str());
1355 00733 }
1356 </pre></div>    </td>
1357   </tr>
1358 </table>
1359 <a name="a15" doxytag="Server::FindChannel"></a><p>
1360 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1361   <tr>
1362     <td class="mdRow">
1363       <table cellpadding="0" cellspacing="0" border="0">
1364         <tr>
1365           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
1366           <td class="md" valign="top">(&nbsp;</td>
1367           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1368           <td class="mdname1" valign="top" nowrap> <em>channel</em>          </td>
1369           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1370           <td class="md" nowrap><code> [virtual]</code></td>
1371         </tr>
1372
1373       </table>
1374     </td>
1375   </tr>
1376 </table>
1377 <table cellspacing=5 cellpadding=0 border=0>
1378   <tr>
1379     <td>
1380       &nbsp;
1381     </td>
1382     <td>
1383
1384 <p>
1385 Attempts to look up a channel and return a pointer to it. 
1386 <p>
1387 This function will return NULL if the channel does not exist.
1388 <p>
1389 Definition at line <a class="el" href="modules_8cpp-source.html#l00590">590</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1390 <p>
1391 <div class="fragment"><pre>00591 {
1392 00592         <span class="keywordflow">return</span> FindChan(channel.c_str());
1393 00593 }
1394 </pre></div>    </td>
1395   </tr>
1396 </table>
1397 <a name="a57" doxytag="Server::FindModule"></a><p>
1398 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1399   <tr>
1400     <td class="mdRow">
1401       <table cellpadding="0" cellspacing="0" border="0">
1402         <tr>
1403           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Server::FindModule </td>
1404           <td class="md" valign="top">(&nbsp;</td>
1405           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1406           <td class="mdname1" valign="top" nowrap> <em>name</em>          </td>
1407           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1408           <td class="md" nowrap><code> [virtual]</code></td>
1409         </tr>
1410
1411       </table>
1412     </td>
1413   </tr>
1414 </table>
1415 <table cellspacing=5 cellpadding=0 border=0>
1416   <tr>
1417     <td>
1418       &nbsp;
1419     </td>
1420     <td>
1421
1422 <p>
1423 This function finds a module by name. 
1424 <p>
1425 You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.
1426 <p>
1427 Definition at line <a class="el" href="modules_8cpp-source.html#l00823">823</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1428 <p>
1429 References <a class="el" href="modules_8cpp-source.html#l01032">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>.
1430 <p>
1431 <div class="fragment"><pre>00824 {
1432 00825         <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++)
1433 00826         {
1434 00827                 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a27">module_names</a>[i] == name)
1435 00828                 {
1436 00829                         <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#a2">modules</a>[i];
1437 00830                 }
1438 00831         }
1439 00832         <span class="keywordflow">return</span> NULL;
1440 00833 }
1441 </pre></div>    </td>
1442   </tr>
1443 </table>
1444 <a name="a14" doxytag="Server::FindNick"></a><p>
1445 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1446   <tr>
1447     <td class="mdRow">
1448       <table cellpadding="0" cellspacing="0" border="0">
1449         <tr>
1450           <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
1451           <td class="md" valign="top">(&nbsp;</td>
1452           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1453           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1454           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1455           <td class="md" nowrap><code> [virtual]</code></td>
1456         </tr>
1457
1458       </table>
1459     </td>
1460   </tr>
1461 </table>
1462 <table cellspacing=5 cellpadding=0 border=0>
1463   <tr>
1464     <td>
1465       &nbsp;
1466     </td>
1467     <td>
1468
1469 <p>
1470 Attempts to look up a nick and return a pointer to it. 
1471 <p>
1472 This function will return NULL if the nick does not exist.
1473 <p>
1474 Definition at line <a class="el" href="modules_8cpp-source.html#l00585">585</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1475 <p>
1476 <div class="fragment"><pre>00586 {
1477 00587         <span class="keywordflow">return</span> Find(nick);
1478 00588 }
1479 </pre></div>    </td>
1480   </tr>
1481 </table>
1482 <a name="a20" doxytag="Server::GetAdmin"></a><p>
1483 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1484   <tr>
1485     <td class="mdRow">
1486       <table cellpadding="0" cellspacing="0" border="0">
1487         <tr>
1488           <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
1489           <td class="md" valign="top">(&nbsp;</td>
1490           <td class="mdname1" valign="top" nowrap>          </td>
1491           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1492           <td class="md" nowrap><code> [virtual]</code></td>
1493         </tr>
1494
1495       </table>
1496     </td>
1497   </tr>
1498 </table>
1499 <table cellspacing=5 cellpadding=0 border=0>
1500   <tr>
1501     <td>
1502       &nbsp;
1503     </td>
1504     <td>
1505
1506 <p>
1507 Returns the information of the server as returned by the /ADMIN command. 
1508 <p>
1509 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.
1510 <p>
1511 Definition at line <a class="el" href="modules_8cpp-source.html#l00615">615</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1512 <p>
1513 <div class="fragment"><pre>00616 {
1514 00617         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
1515 00618 }
1516 </pre></div>    </td>
1517   </tr>
1518 </table>
1519 <a name="a19" doxytag="Server::GetNetworkName"></a><p>
1520 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1521   <tr>
1522     <td class="mdRow">
1523       <table cellpadding="0" cellspacing="0" border="0">
1524         <tr>
1525           <td class="md" nowrap valign="top"> std::string Server::GetNetworkName </td>
1526           <td class="md" valign="top">(&nbsp;</td>
1527           <td class="mdname1" valign="top" nowrap>          </td>
1528           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1529           <td class="md" nowrap><code> [virtual]</code></td>
1530         </tr>
1531
1532       </table>
1533     </td>
1534   </tr>
1535 </table>
1536 <table cellspacing=5 cellpadding=0 border=0>
1537   <tr>
1538     <td>
1539       &nbsp;
1540     </td>
1541     <td>
1542
1543 <p>
1544 Returns the network name, global to all linked servers. 
1545 <p>
1546
1547 <p>
1548 Definition at line <a class="el" href="modules_8cpp-source.html#l00610">610</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1549 <p>
1550 <div class="fragment"><pre>00611 {
1551 00612         <span class="keywordflow">return</span> getnetworkname();
1552 00613 }
1553 </pre></div>    </td>
1554   </tr>
1555 </table>
1556 <a name="a18" doxytag="Server::GetServerName"></a><p>
1557 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1558   <tr>
1559     <td class="mdRow">
1560       <table cellpadding="0" cellspacing="0" border="0">
1561         <tr>
1562           <td class="md" nowrap valign="top"> std::string Server::GetServerName </td>
1563           <td class="md" valign="top">(&nbsp;</td>
1564           <td class="mdname1" valign="top" nowrap>          </td>
1565           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1566           <td class="md" nowrap><code> [virtual]</code></td>
1567         </tr>
1568
1569       </table>
1570     </td>
1571   </tr>
1572 </table>
1573 <table cellspacing=5 cellpadding=0 border=0>
1574   <tr>
1575     <td>
1576       &nbsp;
1577     </td>
1578     <td>
1579
1580 <p>
1581 Returns the server name of the server where the module is loaded. 
1582 <p>
1583
1584 <p>
1585 Definition at line <a class="el" href="modules_8cpp-source.html#l00605">605</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1586 <p>
1587 <div class="fragment"><pre>00606 {
1588 00607         <span class="keywordflow">return</span> getservername();
1589 00608 }
1590 </pre></div>    </td>
1591   </tr>
1592 </table>
1593 <a name="a35" doxytag="Server::GetUsers"></a><p>
1594 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1595   <tr>
1596     <td class="mdRow">
1597       <table cellpadding="0" cellspacing="0" border="0">
1598         <tr>
1599           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a33">chanuserlist</a> Server::GetUsers </td>
1600           <td class="md" valign="top">(&nbsp;</td>
1601           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1602           <td class="mdname1" valign="top" nowrap> <em>chan</em>          </td>
1603           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1604           <td class="md" nowrap><code> [virtual]</code></td>
1605         </tr>
1606
1607       </table>
1608     </td>
1609   </tr>
1610 </table>
1611 <table cellspacing=5 cellpadding=0 border=0>
1612   <tr>
1613     <td>
1614       &nbsp;
1615     </td>
1616     <td>
1617
1618 <p>
1619 Fetches the userlist of a channel. 
1620 <p>
1621 This function must be here and not a member of userrec or chanrec due to include constraints.
1622 <p>
1623 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>.
1624 <p>
1625 References <a class="el" href="modules_8h-source.html#l00072">chanuserlist</a>, <a class="el" href="modules_8cpp-source.html#l00181">clientlist</a>, <a class="el" href="message_8h.html#a16">has_channel()</a>, and <a class="el" href="message_8h.html#a13">isnick()</a>.
1626 <p>
1627 <div class="fragment"><pre>00453 {
1628 00454         <a class="code" href="modules_8h.html#a33">chanuserlist</a> userl;
1629 00455         userl.clear();
1630 00456         <span class="keywordflow">for</span> (user_hash::const_iterator i = <a class="code" href="modules_8cpp.html#a42">clientlist</a>.begin(); i != <a class="code" href="modules_8cpp.html#a42">clientlist</a>.end(); i++)
1631 00457         {
1632 00458                 <span class="keywordflow">if</span> (i-&gt;second)
1633 00459                 {
1634 00460                         <span class="keywordflow">if</span> (<a class="code" href="message_8h.html#a16">has_channel</a>(i-&gt;second,chan))
1635 00461                         {
1636 00462                                 <span class="keywordflow">if</span> (<a class="code" href="message_8h.html#a13">isnick</a>(i-&gt;second-&gt;nick))
1637 00463                                 {
1638 00464                                         userl.push_back(i-&gt;second);
1639 00465                                 }
1640 00466                         }
1641 00467                 }
1642 00468         }
1643 00469         <span class="keywordflow">return</span> userl;
1644 00470 }
1645 </pre></div>    </td>
1646   </tr>
1647 </table>
1648 <a name="a12" doxytag="Server::IsNick"></a><p>
1649 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1650   <tr>
1651     <td class="mdRow">
1652       <table cellpadding="0" cellspacing="0" border="0">
1653         <tr>
1654           <td class="md" nowrap valign="top"> bool Server::IsNick </td>
1655           <td class="md" valign="top">(&nbsp;</td>
1656           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1657           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1658           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1659           <td class="md" nowrap><code> [virtual]</code></td>
1660         </tr>
1661
1662       </table>
1663     </td>
1664   </tr>
1665 </table>
1666 <table cellspacing=5 cellpadding=0 border=0>
1667   <tr>
1668     <td>
1669       &nbsp;
1670     </td>
1671     <td>
1672
1673 <p>
1674 Returns true if a nick is valid. 
1675 <p>
1676 Nicks for unregistered connections will return false.
1677 <p>
1678 Definition at line <a class="el" href="modules_8cpp-source.html#l00580">580</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1679 <p>
1680 References <a class="el" href="message_8h.html#a13">isnick()</a>.
1681 <p>
1682 <div class="fragment"><pre>00581 {
1683 00582         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a13">isnick</a>(nick.c_str()) != 0);
1684 00583 }
1685 </pre></div>    </td>
1686   </tr>
1687 </table>
1688 <a name="a17" doxytag="Server::IsOnChannel"></a><p>
1689 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1690   <tr>
1691     <td class="mdRow">
1692       <table cellpadding="0" cellspacing="0" border="0">
1693         <tr>
1694           <td class="md" nowrap valign="top"> bool Server::IsOnChannel </td>
1695           <td class="md" valign="top">(&nbsp;</td>
1696           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1697           <td class="mdname" nowrap> <em>User</em>, </td>
1698         </tr>
1699         <tr>
1700           <td></td>
1701           <td></td>
1702           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1703           <td class="mdname" nowrap> <em>Chan</em></td>
1704         </tr>
1705         <tr>
1706           <td></td>
1707           <td class="md">)&nbsp;</td>
1708           <td class="md" colspan="2"><code> [virtual]</code></td>
1709         </tr>
1710
1711       </table>
1712     </td>
1713   </tr>
1714 </table>
1715 <table cellspacing=5 cellpadding=0 border=0>
1716   <tr>
1717     <td>
1718       &nbsp;
1719     </td>
1720     <td>
1721
1722 <p>
1723 Checks if a user is on a channel. 
1724 <p>
1725 This function will return true or false to indicate if user 'User' is on channel 'Chan'.
1726 <p>
1727 Definition at line <a class="el" href="modules_8cpp-source.html#l00600">600</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1728 <p>
1729 References <a class="el" href="message_8h.html#a16">has_channel()</a>.
1730 <p>
1731 <div class="fragment"><pre>00601 {
1732 00602         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a16">has_channel</a>(User,Chan);
1733 00603 }
1734 </pre></div>    </td>
1735   </tr>
1736 </table>
1737 <a name="a34" doxytag="Server::IsUlined"></a><p>
1738 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1739   <tr>
1740     <td class="mdRow">
1741       <table cellpadding="0" cellspacing="0" border="0">
1742         <tr>
1743           <td class="md" nowrap valign="top"> bool Server::IsUlined </td>
1744           <td class="md" valign="top">(&nbsp;</td>
1745           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1746           <td class="mdname1" valign="top" nowrap> <em>server</em>          </td>
1747           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1748           <td class="md" nowrap><code> [virtual]</code></td>
1749         </tr>
1750
1751       </table>
1752     </td>
1753   </tr>
1754 </table>
1755 <table cellspacing=5 cellpadding=0 border=0>
1756   <tr>
1757     <td>
1758       &nbsp;
1759     </td>
1760     <td>
1761
1762 <p>
1763 Returns true if the servername you give is ulined. 
1764 <p>
1765 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.
1766 <p>
1767 Definition at line <a class="el" href="modules_8cpp-source.html#l00482">482</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1768 <p>
1769 References <a class="el" href="commands_8h.html#a74">is_uline()</a>.
1770 <p>
1771 <div class="fragment"><pre>00483 {
1772 00484         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#a74">is_uline</a>(server.c_str());
1773 00485 }
1774 </pre></div>    </td>
1775   </tr>
1776 </table>
1777 <a name="a49" doxytag="Server::IsValidMask"></a><p>
1778 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1779   <tr>
1780     <td class="mdRow">
1781       <table cellpadding="0" cellspacing="0" border="0">
1782         <tr>
1783           <td class="md" nowrap valign="top"> bool Server::IsValidMask </td>
1784           <td class="md" valign="top">(&nbsp;</td>
1785           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1786           <td class="mdname1" valign="top" nowrap> <em>mask</em>          </td>
1787           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1788           <td class="md" nowrap><code> [virtual]</code></td>
1789         </tr>
1790
1791       </table>
1792     </td>
1793   </tr>
1794 </table>
1795 <table cellspacing=5 cellpadding=0 border=0>
1796   <tr>
1797     <td>
1798       &nbsp;
1799     </td>
1800     <td>
1801
1802 <p>
1803 Returns true if a nick!ident string is correctly formatted, false if otherwise. 
1804 <p>
1805
1806 <p>
1807 Definition at line <a class="el" href="modules_8cpp-source.html#l00750">750</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1808 <p>
1809 <div class="fragment"><pre>00751 {
1810 00752         <span class="keyword">const</span> <span class="keywordtype">char</span>* dest = mask.c_str();
1811 00753         <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'!'</span>)==0)
1812 00754                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1813 00755         <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'@'</span>)==0)
1814 00756                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1815 00757         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1816 00758                 <span class="keywordflow">if</span> (dest[i] &lt; 32)
1817 00759                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
1818 00760         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1819 00761                 <span class="keywordflow">if</span> (dest[i] &gt; 126)
1820 00762                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
1821 00763         <span class="keywordtype">int</span> c = 0;
1822 00764         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1823 00765                 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'!'</span>)
1824 00766                         c++;
1825 00767         <span class="keywordflow">if</span> (c&gt;1)
1826 00768                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1827 00769         c = 0;
1828 00770         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1829 00771                 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'@'</span>)
1830 00772                         c++;
1831 00773         <span class="keywordflow">if</span> (c&gt;1)
1832 00774                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1833 00775 
1834 00776         <span class="keywordflow">return</span> <span class="keyword">true</span>;
1835 00777 }
1836 </pre></div>    </td>
1837   </tr>
1838 </table>
1839 <a name="a26" doxytag="Server::JoinUserToChannel"></a><p>
1840 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1841   <tr>
1842     <td class="mdRow">
1843       <table cellpadding="0" cellspacing="0" border="0">
1844         <tr>
1845           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::JoinUserToChannel </td>
1846           <td class="md" valign="top">(&nbsp;</td>
1847           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1848           <td class="mdname" nowrap> <em>user</em>, </td>
1849         </tr>
1850         <tr>
1851           <td></td>
1852           <td></td>
1853           <td class="md" nowrap>std::string&nbsp;</td>
1854           <td class="mdname" nowrap> <em>cname</em>, </td>
1855         </tr>
1856         <tr>
1857           <td></td>
1858           <td></td>
1859           <td class="md" nowrap>std::string&nbsp;</td>
1860           <td class="mdname" nowrap> <em>key</em></td>
1861         </tr>
1862         <tr>
1863           <td></td>
1864           <td class="md">)&nbsp;</td>
1865           <td class="md" colspan="2"><code> [virtual]</code></td>
1866         </tr>
1867
1868       </table>
1869     </td>
1870   </tr>
1871 </table>
1872 <table cellspacing=5 cellpadding=0 border=0>
1873   <tr>
1874     <td>
1875       &nbsp;
1876     </td>
1877     <td>
1878
1879 <p>
1880 Forces a user to join a channel. 
1881 <p>
1882 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.
1883 <p>
1884 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>.
1885 <p>
1886 <div class="fragment"><pre>00443 {
1887 00444         <span class="keywordflow">return</span> add_channel(user,cname.c_str(),key.c_str(),<span class="keyword">true</span>);
1888 00445 }
1889 </pre></div>    </td>
1890   </tr>
1891 </table>
1892 <a name="a3" doxytag="Server::Log"></a><p>
1893 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1894   <tr>
1895     <td class="mdRow">
1896       <table cellpadding="0" cellspacing="0" border="0">
1897         <tr>
1898           <td class="md" nowrap valign="top"> void Server::Log </td>
1899           <td class="md" valign="top">(&nbsp;</td>
1900           <td class="md" nowrap valign="top">int&nbsp;</td>
1901           <td class="mdname" nowrap> <em>level</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>s</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 Writes a log string. 
1928 <p>
1929 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.
1930 <p>
1931 Definition at line <a class="el" href="modules_8cpp-source.html#l00492">492</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1932 <p>
1933 <div class="fragment"><pre>00493 {
1934 00494         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
1935 00495 }
1936 </pre></div>    </td>
1937   </tr>
1938 </table>
1939 <a name="a30" doxytag="Server::MatchText"></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"> bool Server::MatchText </td>
1946           <td class="md" valign="top">(&nbsp;</td>
1947           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1948           <td class="mdname" nowrap> <em>sliteral</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>spattern</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 Matches text against a glob pattern. 
1975 <p>
1976 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.
1977 <p>
1978 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>.
1979 <p>
1980 <div class="fragment"><pre>00430 {
1981 00431         <span class="keywordtype">char</span> literal[MAXBUF],pattern[MAXBUF];
1982 00432         strlcpy(literal,sliteral.c_str(),MAXBUF);
1983 00433         strlcpy(pattern,spattern.c_str(),MAXBUF);
1984 00434         <span class="keywordflow">return</span> match(literal,pattern);
1985 00435 }
1986 </pre></div>    </td>
1987   </tr>
1988 </table>
1989 <a name="a55" doxytag="Server::MeshCheckChan"></a><p>
1990 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1991   <tr>
1992     <td class="mdRow">
1993       <table cellpadding="0" cellspacing="0" border="0">
1994         <tr>
1995           <td class="md" nowrap valign="top"> bool Server::MeshCheckChan </td>
1996           <td class="md" valign="top">(&nbsp;</td>
1997           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1998           <td class="mdname" nowrap> <em>c</em>, </td>
1999         </tr>
2000         <tr>
2001           <td></td>
2002           <td></td>
2003           <td class="md" nowrap>std::string&nbsp;</td>
2004           <td class="mdname" nowrap> <em>servername</em></td>
2005         </tr>
2006         <tr>
2007           <td></td>
2008           <td class="md">)&nbsp;</td>
2009           <td class="md" colspan="2"><code> [virtual]</code></td>
2010         </tr>
2011
2012       </table>
2013     </td>
2014   </tr>
2015 </table>
2016 <table cellspacing=5 cellpadding=0 border=0>
2017   <tr>
2018     <td>
2019       &nbsp;
2020     </td>
2021     <td>
2022
2023 <p>
2024 This function is used to check if any users on channel c are on server servername. 
2025 <p>
2026 This is used internally by PRIVMSG etc. You should not need to use it.
2027 <p>
2028 Definition at line <a class="el" href="modules_8cpp-source.html#l00805">805</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2029 <p>
2030 <div class="fragment"><pre>00806 {
2031 00807         <span class="keywordflow">if</span> (c)
2032 00808         {
2033 00809                 <span class="keywordflow">return</span> ChanAnyOnThisServer(c,(<span class="keywordtype">char</span>*)servername.c_str());
2034 00810         }
2035 00811         <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
2036 00812 }
2037 </pre></div>    </td>
2038   </tr>
2039 </table>
2040 <a name="a56" doxytag="Server::MeshCheckCommon"></a><p>
2041 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2042   <tr>
2043     <td class="mdRow">
2044       <table cellpadding="0" cellspacing="0" border="0">
2045         <tr>
2046           <td class="md" nowrap valign="top"> bool Server::MeshCheckCommon </td>
2047           <td class="md" valign="top">(&nbsp;</td>
2048           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2049           <td class="mdname" nowrap> <em>u</em>, </td>
2050         </tr>
2051         <tr>
2052           <td></td>
2053           <td></td>
2054           <td class="md" nowrap>std::string&nbsp;</td>
2055           <td class="mdname" nowrap> <em>servername</em></td>
2056         </tr>
2057         <tr>
2058           <td></td>
2059           <td class="md">)&nbsp;</td>
2060           <td class="md" colspan="2"><code> [virtual]</code></td>
2061         </tr>
2062
2063       </table>
2064     </td>
2065   </tr>
2066 </table>
2067 <table cellspacing=5 cellpadding=0 border=0>
2068   <tr>
2069     <td>
2070       &nbsp;
2071     </td>
2072     <td>
2073
2074 <p>
2075 This function is used to check if user u has any channels in common with users on servername. 
2076 <p>
2077 This is used internally by <a class="el" href="classServer.html#a51">Server::MeshSendCommon</a>. You should very rarely need to use it.
2078 <p>
2079 Definition at line <a class="el" href="modules_8cpp-source.html#l00814">814</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2080 <p>
2081 <div class="fragment"><pre>00815 {
2082 00816         <span class="keywordflow">if</span> (u)
2083 00817         {
2084 00818                 <span class="keywordflow">return</span> CommonOnThisServer(u,(<span class="keywordtype">char</span>*)servername.c_str());
2085 00819         }
2086 00820         <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
2087 00821 }
2088 </pre></div>    </td>
2089   </tr>
2090 </table>
2091 <a name="a50" doxytag="Server::MeshSendAll"></a><p>
2092 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2093   <tr>
2094     <td class="mdRow">
2095       <table cellpadding="0" cellspacing="0" border="0">
2096         <tr>
2097           <td class="md" nowrap valign="top"> void Server::MeshSendAll </td>
2098           <td class="md" valign="top">(&nbsp;</td>
2099           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2100           <td class="mdname1" valign="top" nowrap> <em>text</em>          </td>
2101           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2102           <td class="md" nowrap><code> [virtual]</code></td>
2103         </tr>
2104
2105       </table>
2106     </td>
2107   </tr>
2108 </table>
2109 <table cellspacing=5 cellpadding=0 border=0>
2110   <tr>
2111     <td>
2112       &nbsp;
2113     </td>
2114     <td>
2115
2116 <p>
2117 Sends a line of text to all connected servers. 
2118 <p>
2119 If a server is not directly reachable, the core deals with routing the message, and will also deal with failures transparently.
2120 <p>
2121 Definition at line <a class="el" href="modules_8cpp-source.html#l00779">779</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2122 <p>
2123 <div class="fragment"><pre>00780 {
2124 00781         NetSendToAll((<span class="keywordtype">char</span>*)text.c_str());
2125 00782 }
2126 </pre></div>    </td>
2127   </tr>
2128 </table>
2129 <a name="a52" doxytag="Server::MeshSendAllAlive"></a><p>
2130 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2131   <tr>
2132     <td class="mdRow">
2133       <table cellpadding="0" cellspacing="0" border="0">
2134         <tr>
2135           <td class="md" nowrap valign="top"> void Server::MeshSendAllAlive </td>
2136           <td class="md" valign="top">(&nbsp;</td>
2137           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2138           <td class="mdname1" valign="top" nowrap> <em>text</em>          </td>
2139           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2140           <td class="md" nowrap><code> [virtual]</code></td>
2141         </tr>
2142
2143       </table>
2144     </td>
2145   </tr>
2146 </table>
2147 <table cellspacing=5 cellpadding=0 border=0>
2148   <tr>
2149     <td>
2150       &nbsp;
2151     </td>
2152     <td>
2153
2154 <p>
2155 This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable. 
2156 <p>
2157
2158 <p>
2159 Definition at line <a class="el" href="modules_8cpp-source.html#l00790">790</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2160 <p>
2161 <div class="fragment"><pre>00791 {
2162 00792         NetSendToAllAlive((<span class="keywordtype">char</span>*)text.c_str());
2163 00793 }
2164 </pre></div>    </td>
2165   </tr>
2166 </table>
2167 <a name="a54" doxytag="Server::MeshSendAllExcept"></a><p>
2168 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2169   <tr>
2170     <td class="mdRow">
2171       <table cellpadding="0" cellspacing="0" border="0">
2172         <tr>
2173           <td class="md" nowrap valign="top"> void Server::MeshSendAllExcept </td>
2174           <td class="md" valign="top">(&nbsp;</td>
2175           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2176           <td class="mdname" nowrap> <em>target</em>, </td>
2177         </tr>
2178         <tr>
2179           <td></td>
2180           <td></td>
2181           <td class="md" nowrap>std::string&nbsp;</td>
2182           <td class="mdname" nowrap> <em>text</em></td>
2183         </tr>
2184         <tr>
2185           <td></td>
2186           <td class="md">)&nbsp;</td>
2187           <td class="md" colspan="2"><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 sends to all servers EXCEPT the one you specify. 
2203 <p>
2204 You should usually use this function to send messages, specifying the SENDER of your message as 'target'. This will prevent message loops.
2205 <p>
2206 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>.
2207 <p>
2208 <div class="fragment"><pre>00801 {
2209 00802         NetSendToAllExcept(target.c_str(),(<span class="keywordtype">char</span>*)text.c_str());
2210 00803 }
2211 </pre></div>    </td>
2212   </tr>
2213 </table>
2214 <a name="a51" doxytag="Server::MeshSendCommon"></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::MeshSendCommon </td>
2221           <td class="md" valign="top">(&nbsp;</td>
2222           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2223           <td class="mdname" nowrap> <em>user</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 method sends a line of text to all servers who have users which share common channels with the user you provide. 
2250 <p>
2251 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!)
2252 <p>
2253 Definition at line <a class="el" href="modules_8cpp-source.html#l00784">784</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2254 <p>
2255 <div class="fragment"><pre>00785 {
2256 00786         <span class="keywordflow">if</span> (user)
2257 00787                 NetSendToCommon(user,(<span class="keywordtype">char</span>*)text.c_str());
2258 00788 }
2259 </pre></div>    </td>
2260   </tr>
2261 </table>
2262 <a name="a53" doxytag="Server::MeshSendUnicast"></a><p>
2263 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2264   <tr>
2265     <td class="mdRow">
2266       <table cellpadding="0" cellspacing="0" border="0">
2267         <tr>
2268           <td class="md" nowrap valign="top"> void Server::MeshSendUnicast </td>
2269           <td class="md" valign="top">(&nbsp;</td>
2270           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2271           <td class="mdname" nowrap> <em>destination</em>, </td>
2272         </tr>
2273         <tr>
2274           <td></td>
2275           <td></td>
2276           <td class="md" nowrap>std::string&nbsp;</td>
2277           <td class="mdname" nowrap> <em>text</em></td>
2278         </tr>
2279         <tr>
2280           <td></td>
2281           <td class="md">)&nbsp;</td>
2282           <td class="md" colspan="2"><code> [virtual]</code></td>
2283         </tr>
2284
2285       </table>
2286     </td>
2287   </tr>
2288 </table>
2289 <table cellspacing=5 cellpadding=0 border=0>
2290   <tr>
2291     <td>
2292       &nbsp;
2293     </td>
2294     <td>
2295
2296 <p>
2297 This function sends a line of text directly to a server. 
2298 <p>
2299 If the server is not directly routable at this time, the server attempts to route text through the mesh.
2300 <p>
2301 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>.
2302 <p>
2303 <div class="fragment"><pre>00796 {
2304 00797         NetSendToOne((<span class="keywordtype">char</span>*)destination.c_str(),(<span class="keywordtype">char</span>*)text.c_str());
2305 00798 }
2306 </pre></div>    </td>
2307   </tr>
2308 </table>
2309 <a name="a27" doxytag="Server::PartUserFromChannel"></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"> <a class="el" href="classchanrec.html">chanrec</a> * Server::PartUserFromChannel </td>
2316           <td class="md" valign="top">(&nbsp;</td>
2317           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2318           <td class="mdname" nowrap> <em>user</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>cname</em>, </td>
2325         </tr>
2326         <tr>
2327           <td></td>
2328           <td></td>
2329           <td class="md" nowrap>std::string&nbsp;</td>
2330           <td class="mdname" nowrap> <em>reason</em></td>
2331         </tr>
2332         <tr>
2333           <td></td>
2334           <td class="md">)&nbsp;</td>
2335           <td class="md" colspan="2"><code> [virtual]</code></td>
2336         </tr>
2337
2338       </table>
2339     </td>
2340   </tr>
2341 </table>
2342 <table cellspacing=5 cellpadding=0 border=0>
2343   <tr>
2344     <td>
2345       &nbsp;
2346     </td>
2347     <td>
2348
2349 <p>
2350 Forces a user to part a channel. 
2351 <p>
2352 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.
2353 <p>
2354 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>.
2355 <p>
2356 <div class="fragment"><pre>00448 {
2357 00449         <span class="keywordflow">return</span> del_channel(user,cname.c_str(),reason.c_str(),<span class="keyword">false</span>);
2358 00450 }
2359 </pre></div>    </td>
2360   </tr>
2361 </table>
2362 <a name="a37" doxytag="Server::PseudoToUser"></a><p>
2363 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2364   <tr>
2365     <td class="mdRow">
2366       <table cellpadding="0" cellspacing="0" border="0">
2367         <tr>
2368           <td class="md" nowrap valign="top"> bool Server::PseudoToUser </td>
2369           <td class="md" valign="top">(&nbsp;</td>
2370           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2371           <td class="mdname" nowrap> <em>alive</em>, </td>
2372         </tr>
2373         <tr>
2374           <td></td>
2375           <td></td>
2376           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2377           <td class="mdname" nowrap> <em>zombie</em>, </td>
2378         </tr>
2379         <tr>
2380           <td></td>
2381           <td></td>
2382           <td class="md" nowrap>std::string&nbsp;</td>
2383           <td class="mdname" nowrap> <em>message</em></td>
2384         </tr>
2385         <tr>
2386           <td></td>
2387           <td class="md">)&nbsp;</td>
2388           <td class="md" colspan="2"><code> [virtual]</code></td>
2389         </tr>
2390
2391       </table>
2392     </td>
2393   </tr>
2394 </table>
2395 <table cellspacing=5 cellpadding=0 border=0>
2396   <tr>
2397     <td>
2398       &nbsp;
2399     </td>
2400     <td>
2401
2402 <p>
2403 This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other. 
2404 <p>
2405 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.
2406 <p>
2407 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>.
2408 <p>
2409 References <a class="el" href="channels_8h-source.html#l00268">ucrec::channel</a>, <a class="el" href="users_8h-source.html#l00127">userrec::chans</a>, <a class="el" href="connection_8h-source.html#l00183">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00099">FD_MAGIC_NUMBER</a>, <a class="el" href="connection_8h-source.html#l00187">connection::host</a>, <a class="el" href="users_8h-source.html#l00110">userrec::ident</a>, <a class="el" href="channels_8h-source.html#l00099">chanrec::name</a>, <a class="el" href="users_8h-source.html#l00106">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>.
2410 <p>
2411 <div class="fragment"><pre>00666 {
2412 00667         zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a> = alive-&gt;<a class="code" href="classconnection.html#o0">fd</a>;
2413 00668         alive-&gt;<a class="code" href="classconnection.html#o0">fd</a> = <a class="code" href="modules_8h.html#a26">FD_MAGIC_NUMBER</a>;
2414 00669         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>);
2415 00670         kill_link(alive,message.c_str());
2416 00671         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i != MAXCHANS; i++)
2417 00672         {
2418 00673                 <span class="keywordflow">if</span> (zombie-&gt;<a class="code" href="classuserrec.html#o5">chans</a>[i].<a class="code" href="classucrec.html#o1">channel</a> != NULL)
2419 00674                 {
2420 00675                         <span class="keywordflow">if</span> (zombie-&gt;<a class="code" href="classuserrec.html#o5">chans</a>[i].<a class="code" href="classucrec.html#o1">channel</a>-&gt;<a class="code" href="classchanrec.html#o0">name</a>)
2421 00676                         {
2422 00677                                 <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>;
2423 00678                                 WriteFrom(zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>,zombie,<span class="stringliteral">"JOIN %s"</span>,Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>);
2424 00679                                 <span class="keywordflow">if</span> (Ptr-&gt;<a class="code" href="classchanrec.html#o6">topicset</a>)
2425 00680                                 {
2426 00681                                         WriteServ(zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">"332 %s %s :%s"</span>, zombie-&gt;<a class="code" href="classuserrec.html#o0">nick</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o4">topic</a>);
2427 00682                                         WriteServ(zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">"333 %s %s %s %d"</span>, zombie-&gt;<a class="code" href="classuserrec.html#o0">nick</a>, 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>);
2428 00683                                 }
2429 00684                                 userlist(zombie,Ptr);
2430 00685                                 WriteServ(zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">"366 %s %s :End of /NAMES list."</span>, zombie-&gt;<a class="code" href="classuserrec.html#o0">nick</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>);
2431 00686                                 <span class="comment">//WriteServ(zombie-&gt;fd,"324 %s %s +%s",zombie-&gt;nick, Ptr-&gt;name,chanmodes(Ptr));</span>
2432 00687                                 <span class="comment">//WriteServ(zombie-&gt;fd,"329 %s %s %d", zombie-&gt;nick, Ptr-&gt;name, Ptr-&gt;created);</span>
2433 00688 
2434 00689                         }
2435 00690                 }
2436 00691         }
2437 00692 
2438 00693 }
2439 </pre></div>    </td>
2440   </tr>
2441 </table>
2442 <a name="a29" doxytag="Server::QuitUser"></a><p>
2443 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2444   <tr>
2445     <td class="mdRow">
2446       <table cellpadding="0" cellspacing="0" border="0">
2447         <tr>
2448           <td class="md" nowrap valign="top"> void Server::QuitUser </td>
2449           <td class="md" valign="top">(&nbsp;</td>
2450           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2451           <td class="mdname" nowrap> <em>user</em>, </td>
2452         </tr>
2453         <tr>
2454           <td></td>
2455           <td></td>
2456           <td class="md" nowrap>std::string&nbsp;</td>
2457           <td class="mdname" nowrap> <em>reason</em></td>
2458         </tr>
2459         <tr>
2460           <td></td>
2461           <td class="md">)&nbsp;</td>
2462           <td class="md" colspan="2"><code> [virtual]</code></td>
2463         </tr>
2464
2465       </table>
2466     </td>
2467   </tr>
2468 </table>
2469 <table cellspacing=5 cellpadding=0 border=0>
2470   <tr>
2471     <td>
2472       &nbsp;
2473     </td>
2474     <td>
2475
2476 <p>
2477 Forces a user to quit with the specified reason. 
2478 <p>
2479 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>
2480 WARNING!<p>
2481 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.
2482 <p>
2483 Definition at line <a class="el" href="modules_8cpp-source.html#l00476">476</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2484 <p>
2485 References <a class="el" href="users_8h-source.html#l00106">userrec::nick</a>, and <a class="el" href="message_8h.html#a19">send_network_quit()</a>.
2486 <p>
2487 <div class="fragment"><pre>00477 {
2488 00478         <a class="code" href="message_8h.html#a19">send_network_quit</a>(user-&gt;<a class="code" href="classuserrec.html#o0">nick</a>,reason.c_str());
2489 00479         kill_link(user,reason.c_str());
2490 00480 }
2491 </pre></div>    </td>
2492   </tr>
2493 </table>
2494 <a name="a4" doxytag="Server::Send"></a><p>
2495 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2496   <tr>
2497     <td class="mdRow">
2498       <table cellpadding="0" cellspacing="0" border="0">
2499         <tr>
2500           <td class="md" nowrap valign="top"> void Server::Send </td>
2501           <td class="md" valign="top">(&nbsp;</td>
2502           <td class="md" nowrap valign="top">int&nbsp;</td>
2503           <td class="mdname" nowrap> <em>Socket</em>, </td>
2504         </tr>
2505         <tr>
2506           <td></td>
2507           <td></td>
2508           <td class="md" nowrap>std::string&nbsp;</td>
2509           <td class="mdname" nowrap> <em>s</em></td>
2510         </tr>
2511         <tr>
2512           <td></td>
2513           <td class="md">)&nbsp;</td>
2514           <td class="md" colspan="2"><code> [virtual]</code></td>
2515         </tr>
2516
2517       </table>
2518     </td>
2519   </tr>
2520 </table>
2521 <table cellspacing=5 cellpadding=0 border=0>
2522   <tr>
2523     <td>
2524       &nbsp;
2525     </td>
2526     <td>
2527
2528 <p>
2529 Sends a line of text down a TCP/IP socket. 
2530 <p>
2531 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
2532 <p>
2533 Definition at line <a class="el" href="modules_8cpp-source.html#l00507">507</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2534 <p>
2535 <div class="fragment"><pre>00508 {
2536 00509         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2537 00510 }
2538 </pre></div>    </td>
2539   </tr>
2540 </table>
2541 <a name="a8" doxytag="Server::SendChannel"></a><p>
2542 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2543   <tr>
2544     <td class="mdRow">
2545       <table cellpadding="0" cellspacing="0" border="0">
2546         <tr>
2547           <td class="md" nowrap valign="top"> void Server::SendChannel </td>
2548           <td class="md" valign="top">(&nbsp;</td>
2549           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2550           <td class="mdname" nowrap> <em>User</em>, </td>
2551         </tr>
2552         <tr>
2553           <td></td>
2554           <td></td>
2555           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2556           <td class="mdname" nowrap> <em>Channel</em>, </td>
2557         </tr>
2558         <tr>
2559           <td></td>
2560           <td></td>
2561           <td class="md" nowrap>std::string&nbsp;</td>
2562           <td class="mdname" nowrap> <em>s</em>, </td>
2563         </tr>
2564         <tr>
2565           <td></td>
2566           <td></td>
2567           <td class="md" nowrap>bool&nbsp;</td>
2568           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2569         </tr>
2570         <tr>
2571           <td></td>
2572           <td class="md">)&nbsp;</td>
2573           <td class="md" colspan="2"><code> [virtual]</code></td>
2574         </tr>
2575
2576       </table>
2577     </td>
2578   </tr>
2579 </table>
2580 <table cellspacing=5 cellpadding=0 border=0>
2581   <tr>
2582     <td>
2583       &nbsp;
2584     </td>
2585     <td>
2586
2587 <p>
2588 Sends text from a user to a channel (mulicast). 
2589 <p>
2590 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).
2591 <p>
2592 Definition at line <a class="el" href="modules_8cpp-source.html#l00536">536</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2593 <p>
2594 <div class="fragment"><pre>00537 {
2595 00538         <span class="keywordflow">if</span> (IncludeSender)
2596 00539         {
2597 00540                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2598 00541         }
2599 00542         <span class="keywordflow">else</span>
2600 00543         {
2601 00544                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2602 00545         }
2603 00546 }
2604 </pre></div>    </td>
2605   </tr>
2606 </table>
2607 <a name="a10" doxytag="Server::SendCommon"></a><p>
2608 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2609   <tr>
2610     <td class="mdRow">
2611       <table cellpadding="0" cellspacing="0" border="0">
2612         <tr>
2613           <td class="md" nowrap valign="top"> void Server::SendCommon </td>
2614           <td class="md" valign="top">(&nbsp;</td>
2615           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2616           <td class="mdname" nowrap> <em>User</em>, </td>
2617         </tr>
2618         <tr>
2619           <td></td>
2620           <td></td>
2621           <td class="md" nowrap>std::string&nbsp;</td>
2622           <td class="mdname" nowrap> <em>text</em>, </td>
2623         </tr>
2624         <tr>
2625           <td></td>
2626           <td></td>
2627           <td class="md" nowrap>bool&nbsp;</td>
2628           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2629         </tr>
2630         <tr>
2631           <td></td>
2632           <td class="md">)&nbsp;</td>
2633           <td class="md" colspan="2"><code> [virtual]</code></td>
2634         </tr>
2635
2636       </table>
2637     </td>
2638   </tr>
2639 </table>
2640 <table cellspacing=5 cellpadding=0 border=0>
2641   <tr>
2642     <td>
2643       &nbsp;
2644     </td>
2645     <td>
2646
2647 <p>
2648 Sends text from a user to one or more channels (mulicast). 
2649 <p>
2650 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.
2651 <p>
2652 Definition at line <a class="el" href="modules_8cpp-source.html#l00553">553</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2653 <p>
2654 <div class="fragment"><pre>00554 {
2655 00555         <span class="keywordflow">if</span> (IncludeSender)
2656 00556         {
2657 00557                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
2658 00558         }
2659 00559         <span class="keywordflow">else</span>
2660 00560         {
2661 00561                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
2662 00562         }
2663 00563 }
2664 </pre></div>    </td>
2665   </tr>
2666 </table>
2667 <a name="a6" doxytag="Server::SendFrom"></a><p>
2668 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2669   <tr>
2670     <td class="mdRow">
2671       <table cellpadding="0" cellspacing="0" border="0">
2672         <tr>
2673           <td class="md" nowrap valign="top"> void Server::SendFrom </td>
2674           <td class="md" valign="top">(&nbsp;</td>
2675           <td class="md" nowrap valign="top">int&nbsp;</td>
2676           <td class="mdname" nowrap> <em>Socket</em>, </td>
2677         </tr>
2678         <tr>
2679           <td></td>
2680           <td></td>
2681           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2682           <td class="mdname" nowrap> <em>User</em>, </td>
2683         </tr>
2684         <tr>
2685           <td></td>
2686           <td></td>
2687           <td class="md" nowrap>std::string&nbsp;</td>
2688           <td class="mdname" nowrap> <em>s</em></td>
2689         </tr>
2690         <tr>
2691           <td></td>
2692           <td class="md">)&nbsp;</td>
2693           <td class="md" colspan="2"><code> [virtual]</code></td>
2694         </tr>
2695
2696       </table>
2697     </td>
2698   </tr>
2699 </table>
2700 <table cellspacing=5 cellpadding=0 border=0>
2701   <tr>
2702     <td>
2703       &nbsp;
2704     </td>
2705     <td>
2706
2707 <p>
2708 Sends text from a user to a socket. 
2709 <p>
2710 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)
2711 <p>
2712 Definition at line <a class="el" href="modules_8cpp-source.html#l00517">517</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2713 <p>
2714 <div class="fragment"><pre>00518 {
2715 00519         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
2716 00520 }
2717 </pre></div>    </td>
2718   </tr>
2719 </table>
2720 <a name="a24" doxytag="Server::SendMode"></a><p>
2721 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2722   <tr>
2723     <td class="mdRow">
2724       <table cellpadding="0" cellspacing="0" border="0">
2725         <tr>
2726           <td class="md" nowrap valign="top"> void Server::SendMode </td>
2727           <td class="md" valign="top">(&nbsp;</td>
2728           <td class="md" nowrap valign="top">char **&nbsp;</td>
2729           <td class="mdname" nowrap> <em>parameters</em>, </td>
2730         </tr>
2731         <tr>
2732           <td></td>
2733           <td></td>
2734           <td class="md" nowrap>int&nbsp;</td>
2735           <td class="mdname" nowrap> <em>pcnt</em>, </td>
2736         </tr>
2737         <tr>
2738           <td></td>
2739           <td></td>
2740           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2741           <td class="mdname" nowrap> <em>user</em></td>
2742         </tr>
2743         <tr>
2744           <td></td>
2745           <td class="md">)&nbsp;</td>
2746           <td class="md" colspan="2"><code> [virtual]</code></td>
2747         </tr>
2748
2749       </table>
2750     </td>
2751   </tr>
2752 </table>
2753 <table cellspacing=5 cellpadding=0 border=0>
2754   <tr>
2755     <td>
2756       &nbsp;
2757     </td>
2758     <td>
2759
2760 <p>
2761 Sends a servermode. 
2762 <p>
2763 you must format the parameters array with the target, modes and parameters for those modes.<p>
2764 For example:<p>
2765 char *modes[3];<p>
2766 modes[0] = ChannelName;<p>
2767 modes[1] = "+o";<p>
2768 modes[2] = user-&gt;nick;<p>
2769 Srv-&gt;SendMode(modes,3,user);<p>
2770 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!
2771 <p>
2772 Definition at line <a class="el" href="modules_8cpp-source.html#l00502">502</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2773 <p>
2774 References <a class="el" href="modules_8h.html#a36">server_mode()</a>.
2775 <p>
2776 <div class="fragment"><pre>00503 {
2777 00504         <a class="code" href="modules_8h.html#a36">server_mode</a>(parameters,pcnt,user);
2778 00505 }
2779 </pre></div>    </td>
2780   </tr>
2781 </table>
2782 <a name="a2" doxytag="Server::SendOpers"></a><p>
2783 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2784   <tr>
2785     <td class="mdRow">
2786       <table cellpadding="0" cellspacing="0" border="0">
2787         <tr>
2788           <td class="md" nowrap valign="top"> void Server::SendOpers </td>
2789           <td class="md" valign="top">(&nbsp;</td>
2790           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2791           <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
2792           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2793           <td class="md" nowrap><code> [virtual]</code></td>
2794         </tr>
2795
2796       </table>
2797     </td>
2798   </tr>
2799 </table>
2800 <table cellspacing=5 cellpadding=0 border=0>
2801   <tr>
2802     <td>
2803       &nbsp;
2804     </td>
2805     <td>
2806
2807 <p>
2808 Sends text to all opers. 
2809 <p>
2810 This method sends a server notice to all opers with the usermode +s.
2811 <p>
2812 Definition at line <a class="el" href="modules_8cpp-source.html#l00424">424</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2813 <p>
2814 <div class="fragment"><pre>00425 {
2815 00426         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
2816 00427 }
2817 </pre></div>    </td>
2818   </tr>
2819 </table>
2820 <a name="a5" doxytag="Server::SendServ"></a><p>
2821 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2822   <tr>
2823     <td class="mdRow">
2824       <table cellpadding="0" cellspacing="0" border="0">
2825         <tr>
2826           <td class="md" nowrap valign="top"> void Server::SendServ </td>
2827           <td class="md" valign="top">(&nbsp;</td>
2828           <td class="md" nowrap valign="top">int&nbsp;</td>
2829           <td class="mdname" nowrap> <em>Socket</em>, </td>
2830         </tr>
2831         <tr>
2832           <td></td>
2833           <td></td>
2834           <td class="md" nowrap>std::string&nbsp;</td>
2835           <td class="mdname" nowrap> <em>s</em></td>
2836         </tr>
2837         <tr>
2838           <td></td>
2839           <td class="md">)&nbsp;</td>
2840           <td class="md" colspan="2"><code> [virtual]</code></td>
2841         </tr>
2842
2843       </table>
2844     </td>
2845   </tr>
2846 </table>
2847 <table cellspacing=5 cellpadding=0 border=0>
2848   <tr>
2849     <td>
2850       &nbsp;
2851     </td>
2852     <td>
2853
2854 <p>
2855 Sends text from the server to a socket. 
2856 <p>
2857 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
2858 <p>
2859 Definition at line <a class="el" href="modules_8cpp-source.html#l00512">512</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2860 <p>
2861 <div class="fragment"><pre>00513 {
2862 00514         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2863 00515 }
2864 </pre></div>    </td>
2865   </tr>
2866 </table>
2867 <a name="a7" doxytag="Server::SendTo"></a><p>
2868 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2869   <tr>
2870     <td class="mdRow">
2871       <table cellpadding="0" cellspacing="0" border="0">
2872         <tr>
2873           <td class="md" nowrap valign="top"> void Server::SendTo </td>
2874           <td class="md" valign="top">(&nbsp;</td>
2875           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2876           <td class="mdname" nowrap> <em>Source</em>, </td>
2877         </tr>
2878         <tr>
2879           <td></td>
2880           <td></td>
2881           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2882           <td class="mdname" nowrap> <em>Dest</em>, </td>
2883         </tr>
2884         <tr>
2885           <td></td>
2886           <td></td>
2887           <td class="md" nowrap>std::string&nbsp;</td>
2888           <td class="mdname" nowrap> <em>s</em></td>
2889         </tr>
2890         <tr>
2891           <td></td>
2892           <td class="md">)&nbsp;</td>
2893           <td class="md" colspan="2"><code> [virtual]</code></td>
2894         </tr>
2895
2896       </table>
2897     </td>
2898   </tr>
2899 </table>
2900 <table cellspacing=5 cellpadding=0 border=0>
2901   <tr>
2902     <td>
2903       &nbsp;
2904     </td>
2905     <td>
2906
2907 <p>
2908 Sends text from a user to another user. 
2909 <p>
2910 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>
2911 :user!ident TEXT<p>
2912 The format will become:<p>
2913 :localserver TEXT<p>
2914 Which is useful for numerics and server notices to single users, etc.
2915 <p>
2916 Definition at line <a class="el" href="modules_8cpp-source.html#l00522">522</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2917 <p>
2918 References <a class="el" href="connection_8h-source.html#l00183">connection::fd</a>.
2919 <p>
2920 <div class="fragment"><pre>00523 {
2921 00524         <span class="keywordflow">if</span> (!Source)
2922 00525         {
2923 00526                 <span class="comment">// if source is NULL, then the message originates from the local server</span>
2924 00527                 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());
2925 00528         }
2926 00529         <span class="keywordflow">else</span>
2927 00530         {
2928 00531                 <span class="comment">// otherwise it comes from the user specified</span>
2929 00532                 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
2930 00533         }
2931 00534 }
2932 </pre></div>    </td>
2933   </tr>
2934 </table>
2935 <a name="a25" doxytag="Server::SendToModeMask"></a><p>
2936 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2937   <tr>
2938     <td class="mdRow">
2939       <table cellpadding="0" cellspacing="0" border="0">
2940         <tr>
2941           <td class="md" nowrap valign="top"> void Server::SendToModeMask </td>
2942           <td class="md" valign="top">(&nbsp;</td>
2943           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2944           <td class="mdname" nowrap> <em>modes</em>, </td>
2945         </tr>
2946         <tr>
2947           <td></td>
2948           <td></td>
2949           <td class="md" nowrap>int&nbsp;</td>
2950           <td class="mdname" nowrap> <em>flags</em>, </td>
2951         </tr>
2952         <tr>
2953           <td></td>
2954           <td></td>
2955           <td class="md" nowrap>std::string&nbsp;</td>
2956           <td class="mdname" nowrap> <em>text</em></td>
2957         </tr>
2958         <tr>
2959           <td></td>
2960           <td class="md">)&nbsp;</td>
2961           <td class="md" colspan="2"><code> [virtual]</code></td>
2962         </tr>
2963
2964       </table>
2965     </td>
2966   </tr>
2967 </table>
2968 <table cellspacing=5 cellpadding=0 border=0>
2969   <tr>
2970     <td>
2971       &nbsp;
2972     </td>
2973     <td>
2974
2975 <p>
2976 Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter. 
2977 <p>
2978 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>
2979 Serv-&gt;SendToModeMask("xi", WM_OR, "m00");<p>
2980 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.
2981 <p>
2982 Definition at line <a class="el" href="modules_8cpp-source.html#l00437">437</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2983 <p>
2984 <div class="fragment"><pre>00438 {
2985 00439         WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
2986 00440 }
2987 </pre></div>    </td>
2988   </tr>
2989 </table>
2990 <a name="a11" doxytag="Server::SendWallops"></a><p>
2991 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2992   <tr>
2993     <td class="mdRow">
2994       <table cellpadding="0" cellspacing="0" border="0">
2995         <tr>
2996           <td class="md" nowrap valign="top"> void Server::SendWallops </td>
2997           <td class="md" valign="top">(&nbsp;</td>
2998           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2999           <td class="mdname" nowrap> <em>User</em>, </td>
3000         </tr>
3001         <tr>
3002           <td></td>
3003           <td></td>
3004           <td class="md" nowrap>std::string&nbsp;</td>
3005           <td class="mdname" nowrap> <em>text</em></td>
3006         </tr>
3007         <tr>
3008           <td></td>
3009           <td class="md">)&nbsp;</td>
3010           <td class="md" colspan="2"><code> [virtual]</code></td>
3011         </tr>
3012
3013       </table>
3014     </td>
3015   </tr>
3016 </table>
3017 <table cellspacing=5 cellpadding=0 border=0>
3018   <tr>
3019     <td>
3020       &nbsp;
3021     </td>
3022     <td>
3023
3024 <p>
3025 Sends a WALLOPS message. 
3026 <p>
3027 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
3028 <p>
3029 Definition at line <a class="el" href="modules_8cpp-source.html#l00565">565</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3030 <p>
3031 <div class="fragment"><pre>00566 {
3032 00567         WriteWallOps(User,<span class="keyword">false</span>,<span class="stringliteral">"%s"</span>,text.c_str());
3033 00568 }
3034 </pre></div>    </td>
3035   </tr>
3036 </table>
3037 <a name="a36" doxytag="Server::UserToPseudo"></a><p>
3038 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
3039   <tr>
3040     <td class="mdRow">
3041       <table cellpadding="0" cellspacing="0" border="0">
3042         <tr>
3043           <td class="md" nowrap valign="top"> bool Server::UserToPseudo </td>
3044           <td class="md" valign="top">(&nbsp;</td>
3045           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
3046           <td class="mdname" nowrap> <em>user</em>, </td>
3047         </tr>
3048         <tr>
3049           <td></td>
3050           <td></td>
3051           <td class="md" nowrap>std::string&nbsp;</td>
3052           <td class="mdname" nowrap> <em>message</em></td>
3053         </tr>
3054         <tr>
3055           <td></td>
3056           <td class="md">)&nbsp;</td>
3057           <td class="md" colspan="2"><code> [virtual]</code></td>
3058         </tr>
3059
3060       </table>
3061     </td>
3062   </tr>
3063 </table>
3064 <table cellspacing=5 cellpadding=0 border=0>
3065   <tr>
3066     <td>
3067       &nbsp;
3068     </td>
3069     <td>
3070
3071 <p>
3072 Remove a user's connection to the irc server, but leave their client in existence in the user hash. 
3073 <p>
3074 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.
3075 <p>
3076 Definition at line <a class="el" href="modules_8cpp-source.html#l00656">656</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3077 <p>
3078 References <a class="el" href="connection_8h-source.html#l00183">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00099">FD_MAGIC_NUMBER</a>, <a class="el" href="connection_8h-source.html#l00187">connection::host</a>, and <a class="el" href="users_8h-source.html#l00110">userrec::ident</a>.
3079 <p>
3080 <div class="fragment"><pre>00657 {
3081 00658         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> old_fd = user-&gt;<a class="code" href="classconnection.html#o0">fd</a>;
3082 00659         user-&gt;<a class="code" href="classconnection.html#o0">fd</a> = <a class="code" href="modules_8h.html#a26">FD_MAGIC_NUMBER</a>;
3083 00660         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());
3084 00661         close(old_fd);
3085 00662         shutdown (old_fd,2);
3086 00663 }
3087 </pre></div>    </td>
3088   </tr>
3089 </table>
3090 <hr>The documentation for this class was generated from the following files:<ul>
3091 <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>
3092 <hr size="1"><address style="align: right;"><small>Generated on Tue Apr 26 17:11:51 2005 for InspIRCd by
3093 <a href="http://www.doxygen.org/index.html">
3094 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
3095 </a>1.3.3 </small></address>
3096 </body>
3097 </html>