]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
Added Server::AddGLine
[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 </table>
166 <hr><a name="_details"></a><h2>Detailed Description</h2>
167 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. 
168 <p>
169 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. 
170 <p>
171
172 <p>
173 Definition at line <a class="el" href="modules_8h-source.html#l00385">385</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
174 <a name="a0" doxytag="Server::Server"></a><p>
175 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
176   <tr>
177     <td class="mdRow">
178       <table cellpadding="0" cellspacing="0" border="0">
179         <tr>
180           <td class="md" nowrap valign="top"> Server::Server </td>
181           <td class="md" valign="top">(&nbsp;</td>
182           <td class="mdname1" valign="top" nowrap>          </td>
183           <td class="md" valign="top">&nbsp;)&nbsp;</td>
184           <td class="md" nowrap></td>
185         </tr>
186
187       </table>
188     </td>
189   </tr>
190 </table>
191 <table cellspacing=5 cellpadding=0 border=0>
192   <tr>
193     <td>
194       &nbsp;
195     </td>
196     <td>
197
198 <p>
199 Default constructor. 
200 <p>
201 Creates a Server object.
202 <p>
203 Definition at line <a class="el" href="modules_8cpp-source.html#l00339">339</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
204 <p>
205 <div class="fragment"><pre>00340 {
206 00341 }
207 </pre></div>    </td>
208   </tr>
209 </table>
210 <a name="a1" doxytag="Server::~Server"></a><p>
211 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
212   <tr>
213     <td class="mdRow">
214       <table cellpadding="0" cellspacing="0" border="0">
215         <tr>
216           <td class="md" nowrap valign="top"> Server::~<a class="el" href="classServer.html">Server</a> </td>
217           <td class="md" valign="top">(&nbsp;</td>
218           <td class="mdname1" valign="top" nowrap>          </td>
219           <td class="md" valign="top">&nbsp;)&nbsp;</td>
220           <td class="md" nowrap><code> [virtual]</code></td>
221         </tr>
222
223       </table>
224     </td>
225   </tr>
226 </table>
227 <table cellspacing=5 cellpadding=0 border=0>
228   <tr>
229     <td>
230       &nbsp;
231     </td>
232     <td>
233
234 <p>
235 Default destructor. 
236 <p>
237 Destroys a Server object.
238 <p>
239 Definition at line <a class="el" href="modules_8cpp-source.html#l00343">343</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
240 <p>
241 <div class="fragment"><pre>00344 {
242 00345 }
243 </pre></div>    </td>
244   </tr>
245 </table>
246 <hr><h2>Member Function Documentation</h2>
247 <a name="a23" doxytag="Server::AddCommand"></a><p>
248 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
249   <tr>
250     <td class="mdRow">
251       <table cellpadding="0" cellspacing="0" border="0">
252         <tr>
253           <td class="md" nowrap valign="top"> void Server::AddCommand </td>
254           <td class="md" valign="top">(&nbsp;</td>
255           <td class="md" nowrap valign="top">char *&nbsp;</td>
256           <td class="mdname" nowrap> <em>cmd</em>, </td>
257         </tr>
258         <tr>
259           <td></td>
260           <td></td>
261           <td class="md" nowrap>handlerfunc&nbsp;</td>
262           <td class="mdname" nowrap> <em>f</em>, </td>
263         </tr>
264         <tr>
265           <td></td>
266           <td></td>
267           <td class="md" nowrap>char&nbsp;</td>
268           <td class="mdname" nowrap> <em>flags</em>, </td>
269         </tr>
270         <tr>
271           <td></td>
272           <td></td>
273           <td class="md" nowrap>int&nbsp;</td>
274           <td class="mdname" nowrap> <em>minparams</em>, </td>
275         </tr>
276         <tr>
277           <td></td>
278           <td></td>
279           <td class="md" nowrap>char *&nbsp;</td>
280           <td class="mdname" nowrap> <em>source</em></td>
281         </tr>
282         <tr>
283           <td></td>
284           <td class="md">)&nbsp;</td>
285           <td class="md" colspan="2"><code> [virtual]</code></td>
286         </tr>
287
288       </table>
289     </td>
290   </tr>
291 </table>
292 <table cellspacing=5 cellpadding=0 border=0>
293   <tr>
294     <td>
295       &nbsp;
296     </td>
297     <td>
298
299 <p>
300 Adds a command to the command table. 
301 <p>
302 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>
303 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>
304 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.
305 <p>
306 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>.
307 <p>
308 References <a class="el" href="modules_8h.html#a35">createcommand()</a>.
309 <p>
310 <div class="fragment"><pre>00421 {
311 00422         <a class="code" href="modules_8h.html#a35">createcommand</a>(cmd,f,flags,minparams,source);
312 00423 }
313 </pre></div>    </td>
314   </tr>
315 </table>
316 <a name="a42" doxytag="Server::AddELine"></a><p>
317 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
318   <tr>
319     <td class="mdRow">
320       <table cellpadding="0" cellspacing="0" border="0">
321         <tr>
322           <td class="md" nowrap valign="top"> void Server::AddELine </td>
323           <td class="md" valign="top">(&nbsp;</td>
324           <td class="md" nowrap valign="top">long&nbsp;</td>
325           <td class="mdname" nowrap> <em>duration</em>, </td>
326         </tr>
327         <tr>
328           <td></td>
329           <td></td>
330           <td class="md" nowrap>std::string&nbsp;</td>
331           <td class="mdname" nowrap> <em>source</em>, </td>
332         </tr>
333         <tr>
334           <td></td>
335           <td></td>
336           <td class="md" nowrap>std::string&nbsp;</td>
337           <td class="mdname" nowrap> <em>reason</em>, </td>
338         </tr>
339         <tr>
340           <td></td>
341           <td></td>
342           <td class="md" nowrap>std::string&nbsp;</td>
343           <td class="mdname" nowrap> <em>hostmask</em></td>
344         </tr>
345         <tr>
346           <td></td>
347           <td class="md">)&nbsp;</td>
348           <td class="md" colspan="2"><code> [virtual]</code></td>
349         </tr>
350
351       </table>
352     </td>
353   </tr>
354 </table>
355 <table cellspacing=5 cellpadding=0 border=0>
356   <tr>
357     <td>
358       &nbsp;
359     </td>
360     <td>
361
362 <p>
363 Adds a E-line The E-line is enforced as soon as it is added. 
364 <p>
365 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. 
366 <p>
367 Definition at line <a class="el" href="modules_8cpp-source.html#l00638">638</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
368 <p>
369 References <a class="el" href="xline_8h.html#a5">add_eline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
370 <p>
371 <div class="fragment"><pre>00639 {
372 00640         <a class="code" href="xline_8h.html#a5">add_eline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
373 00641 }
374 </pre></div>    </td>
375   </tr>
376 </table>
377 <a name="a22" doxytag="Server::AddExtendedListMode"></a><p>
378 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
379   <tr>
380     <td class="mdRow">
381       <table cellpadding="0" cellspacing="0" border="0">
382         <tr>
383           <td class="md" nowrap valign="top"> bool Server::AddExtendedListMode </td>
384           <td class="md" valign="top">(&nbsp;</td>
385           <td class="md" nowrap valign="top">char&nbsp;</td>
386           <td class="mdname1" valign="top" nowrap> <em>modechar</em>          </td>
387           <td class="md" valign="top">&nbsp;)&nbsp;</td>
388           <td class="md" nowrap><code> [virtual]</code></td>
389         </tr>
390
391       </table>
392     </td>
393   </tr>
394 </table>
395 <table cellspacing=5 cellpadding=0 border=0>
396   <tr>
397     <td>
398       &nbsp;
399     </td>
400     <td>
401
402 <p>
403 Adds an extended mode letter which is parsed by a module and handled in a list fashion. 
404 <p>
405 This call is used to implement modes like +q and +a. The characteristics of these modes are as follows:<p>
406 (1) They are ALWAYS on channels, not on users, therefore their type is MT_CHANNEL<p>
407 (2) They always take exactly one parameter when being added or removed<p>
408 (3) They can be set multiple times, usually on users in channels<p>
409 (4) The mode and its parameter are NOT stored in the channels modes structure<p>
410 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.
411 <p>
412 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>.
413 <p>
414 References <a class="el" href="modules_8cpp-source.html#l00275">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00285">ModeMakeList()</a>, and <a class="el" href="modules_8h-source.html#l00031">MT_CHANNEL</a>.
415 <p>
416 <div class="fragment"><pre>00566 {
417 00567         <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);
418 00568         <span class="keywordflow">if</span> (res)
419 00569                 <a class="code" href="modules_8cpp.html#a58">ModeMakeList</a>(modechar);
420 00570         <span class="keywordflow">return</span> res;
421 00571 }
422 </pre></div>    </td>
423   </tr>
424 </table>
425 <a name="a21" doxytag="Server::AddExtendedMode"></a><p>
426 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
427   <tr>
428     <td class="mdRow">
429       <table cellpadding="0" cellspacing="0" border="0">
430         <tr>
431           <td class="md" nowrap valign="top"> bool Server::AddExtendedMode </td>
432           <td class="md" valign="top">(&nbsp;</td>
433           <td class="md" nowrap valign="top">char&nbsp;</td>
434           <td class="mdname" nowrap> <em>modechar</em>, </td>
435         </tr>
436         <tr>
437           <td></td>
438           <td></td>
439           <td class="md" nowrap>int&nbsp;</td>
440           <td class="mdname" nowrap> <em>type</em>, </td>
441         </tr>
442         <tr>
443           <td></td>
444           <td></td>
445           <td class="md" nowrap>bool&nbsp;</td>
446           <td class="mdname" nowrap> <em>requires_oper</em>, </td>
447         </tr>
448         <tr>
449           <td></td>
450           <td></td>
451           <td class="md" nowrap>int&nbsp;</td>
452           <td class="mdname" nowrap> <em>params_when_on</em>, </td>
453         </tr>
454         <tr>
455           <td></td>
456           <td></td>
457           <td class="md" nowrap>int&nbsp;</td>
458           <td class="mdname" nowrap> <em>params_when_off</em></td>
459         </tr>
460         <tr>
461           <td></td>
462           <td class="md">)&nbsp;</td>
463           <td class="md" colspan="2"><code> [virtual]</code></td>
464         </tr>
465
466       </table>
467     </td>
468   </tr>
469 </table>
470 <table cellspacing=5 cellpadding=0 border=0>
471   <tr>
472     <td>
473       &nbsp;
474     </td>
475     <td>
476
477 <p>
478 Adds an extended mode letter which is parsed by a module. 
479 <p>
480 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.
481 <p>
482 Definition at line <a class="el" href="modules_8cpp-source.html#l00545">545</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
483 <p>
484 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, <a class="el" href="modules_8cpp-source.html#l00275">DoAddExtendedMode()</a>, <a class="el" href="modules_8h-source.html#l00032">MT_CLIENT</a>, and <a class="el" href="modules_8h-source.html#l00033">MT_SERVER</a>.
485 <p>
486 <div class="fragment"><pre>00546 {
487 00547         <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>)
488 00548         {
489 00549                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
490 00550                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
491 00551         }
492 00552         <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>))
493 00553         {
494 00554                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
495 00555                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
496 00556         }
497 00557         <span class="keywordflow">if</span> ((params_when_on&gt;1) || (params_when_off&gt;1))
498 00558         {
499 00559                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
500 00560                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
501 00561         }
502 00562         <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);
503 00563 }
504 </pre></div>    </td>
505   </tr>
506 </table>
507 <a name="a38" doxytag="Server::AddGLine"></a><p>
508 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
509   <tr>
510     <td class="mdRow">
511       <table cellpadding="0" cellspacing="0" border="0">
512         <tr>
513           <td class="md" nowrap valign="top"> void Server::AddGLine </td>
514           <td class="md" valign="top">(&nbsp;</td>
515           <td class="md" nowrap valign="top">long&nbsp;</td>
516           <td class="mdname" nowrap> <em>duration</em>, </td>
517         </tr>
518         <tr>
519           <td></td>
520           <td></td>
521           <td class="md" nowrap>std::string&nbsp;</td>
522           <td class="mdname" nowrap> <em>source</em>, </td>
523         </tr>
524         <tr>
525           <td></td>
526           <td></td>
527           <td class="md" nowrap>std::string&nbsp;</td>
528           <td class="mdname" nowrap> <em>reason</em>, </td>
529         </tr>
530         <tr>
531           <td></td>
532           <td></td>
533           <td class="md" nowrap>std::string&nbsp;</td>
534           <td class="mdname" nowrap> <em>hostmask</em></td>
535         </tr>
536         <tr>
537           <td></td>
538           <td class="md">)&nbsp;</td>
539           <td class="md" colspan="2"><code> [virtual]</code></td>
540         </tr>
541
542       </table>
543     </td>
544   </tr>
545 </table>
546 <table cellspacing=5 cellpadding=0 border=0>
547   <tr>
548     <td>
549       &nbsp;
550     </td>
551     <td>
552
553 <p>
554 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. 
555 <p>
556 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.
557 <p>
558 Definition at line <a class="el" href="modules_8cpp-source.html#l00618">618</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
559 <p>
560 References <a class="el" href="xline_8h.html#a1">add_gline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
561 <p>
562 <div class="fragment"><pre>00619 {
563 00620         <a class="code" href="xline_8h.html#a1">add_gline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
564 00621 }
565 </pre></div>    </td>
566   </tr>
567 </table>
568 <a name="a41" doxytag="Server::AddKLine"></a><p>
569 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
570   <tr>
571     <td class="mdRow">
572       <table cellpadding="0" cellspacing="0" border="0">
573         <tr>
574           <td class="md" nowrap valign="top"> void Server::AddKLine </td>
575           <td class="md" valign="top">(&nbsp;</td>
576           <td class="md" nowrap valign="top">long&nbsp;</td>
577           <td class="mdname" nowrap> <em>duration</em>, </td>
578         </tr>
579         <tr>
580           <td></td>
581           <td></td>
582           <td class="md" nowrap>std::string&nbsp;</td>
583           <td class="mdname" nowrap> <em>source</em>, </td>
584         </tr>
585         <tr>
586           <td></td>
587           <td></td>
588           <td class="md" nowrap>std::string&nbsp;</td>
589           <td class="mdname" nowrap> <em>reason</em>, </td>
590         </tr>
591         <tr>
592           <td></td>
593           <td></td>
594           <td class="md" nowrap>std::string&nbsp;</td>
595           <td class="mdname" nowrap> <em>hostmask</em></td>
596         </tr>
597         <tr>
598           <td></td>
599           <td class="md">)&nbsp;</td>
600           <td class="md" colspan="2"><code> [virtual]</code></td>
601         </tr>
602
603       </table>
604     </td>
605   </tr>
606 </table>
607 <table cellspacing=5 cellpadding=0 border=0>
608   <tr>
609     <td>
610       &nbsp;
611     </td>
612     <td>
613
614 <p>
615 Adds a K-line The K-line is enforced as soon as it is added. 
616 <p>
617 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. 
618 <p>
619 Definition at line <a class="el" href="modules_8cpp-source.html#l00633">633</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
620 <p>
621 References <a class="el" href="xline_8h.html#a4">add_kline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
622 <p>
623 <div class="fragment"><pre>00634 {
624 00635         <a class="code" href="xline_8h.html#a4">add_kline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
625 00636 }
626 </pre></div>    </td>
627   </tr>
628 </table>
629 <a name="a39" doxytag="Server::AddQLine"></a><p>
630 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
631   <tr>
632     <td class="mdRow">
633       <table cellpadding="0" cellspacing="0" border="0">
634         <tr>
635           <td class="md" nowrap valign="top"> void Server::AddQLine </td>
636           <td class="md" valign="top">(&nbsp;</td>
637           <td class="md" nowrap valign="top">long&nbsp;</td>
638           <td class="mdname" nowrap> <em>duration</em>, </td>
639         </tr>
640         <tr>
641           <td></td>
642           <td></td>
643           <td class="md" nowrap>std::string&nbsp;</td>
644           <td class="mdname" nowrap> <em>source</em>, </td>
645         </tr>
646         <tr>
647           <td></td>
648           <td></td>
649           <td class="md" nowrap>std::string&nbsp;</td>
650           <td class="mdname" nowrap> <em>reason</em>, </td>
651         </tr>
652         <tr>
653           <td></td>
654           <td></td>
655           <td class="md" nowrap>std::string&nbsp;</td>
656           <td class="mdname" nowrap> <em>nickname</em></td>
657         </tr>
658         <tr>
659           <td></td>
660           <td class="md">)&nbsp;</td>
661           <td class="md" colspan="2"><code> [virtual]</code></td>
662         </tr>
663
664       </table>
665     </td>
666   </tr>
667 </table>
668 <table cellspacing=5 cellpadding=0 border=0>
669   <tr>
670     <td>
671       &nbsp;
672     </td>
673     <td>
674
675 <p>
676 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. 
677 <p>
678 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. 
679 <p>
680 Definition at line <a class="el" href="modules_8cpp-source.html#l00623">623</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
681 <p>
682 References <a class="el" href="xline_8h.html#a2">add_qline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
683 <p>
684 <div class="fragment"><pre>00624 {
685 00625         <a class="code" href="xline_8h.html#a2">add_qline</a>(duration, source.c_str(), reason.c_str(), nickname.c_str());
686 00626 }
687 </pre></div>    </td>
688   </tr>
689 </table>
690 <a name="a40" doxytag="Server::AddZLine"></a><p>
691 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
692   <tr>
693     <td class="mdRow">
694       <table cellpadding="0" cellspacing="0" border="0">
695         <tr>
696           <td class="md" nowrap valign="top"> void Server::AddZLine </td>
697           <td class="md" valign="top">(&nbsp;</td>
698           <td class="md" nowrap valign="top">long&nbsp;</td>
699           <td class="mdname" nowrap> <em>duration</em>, </td>
700         </tr>
701         <tr>
702           <td></td>
703           <td></td>
704           <td class="md" nowrap>std::string&nbsp;</td>
705           <td class="mdname" nowrap> <em>source</em>, </td>
706         </tr>
707         <tr>
708           <td></td>
709           <td></td>
710           <td class="md" nowrap>std::string&nbsp;</td>
711           <td class="mdname" nowrap> <em>reason</em>, </td>
712         </tr>
713         <tr>
714           <td></td>
715           <td></td>
716           <td class="md" nowrap>std::string&nbsp;</td>
717           <td class="mdname" nowrap> <em>ipaddr</em></td>
718         </tr>
719         <tr>
720           <td></td>
721           <td class="md">)&nbsp;</td>
722           <td class="md" colspan="2"><code> [virtual]</code></td>
723         </tr>
724
725       </table>
726     </td>
727   </tr>
728 </table>
729 <table cellspacing=5 cellpadding=0 border=0>
730   <tr>
731     <td>
732       &nbsp;
733     </td>
734     <td>
735
736 <p>
737 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. 
738 <p>
739 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. 
740 <p>
741 Definition at line <a class="el" href="modules_8cpp-source.html#l00628">628</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
742 <p>
743 References <a class="el" href="xline_8h.html#a3">add_zline()</a>, and <a class="el" href="commands_8h.html#a75">duration()</a>.
744 <p>
745 <div class="fragment"><pre>00629 {
746 00630         <a class="code" href="xline_8h.html#a3">add_zline</a>(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
747 00631 }
748 </pre></div>    </td>
749   </tr>
750 </table>
751 <a name="a48" doxytag="Server::CalcDuration"></a><p>
752 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
753   <tr>
754     <td class="mdRow">
755       <table cellpadding="0" cellspacing="0" border="0">
756         <tr>
757           <td class="md" nowrap valign="top"> long Server::CalcDuration </td>
758           <td class="md" valign="top">(&nbsp;</td>
759           <td class="md" nowrap valign="top">std::string&nbsp;</td>
760           <td class="mdname1" valign="top" nowrap> <em>duration</em>          </td>
761           <td class="md" valign="top">&nbsp;)&nbsp;</td>
762           <td class="md" nowrap><code> [virtual]</code></td>
763         </tr>
764
765       </table>
766     </td>
767   </tr>
768 </table>
769 <table cellspacing=5 cellpadding=0 border=0>
770   <tr>
771     <td>
772       &nbsp;
773     </td>
774     <td>
775
776 <p>
777 Calculates a duration This method will take a string containing a formatted duration (e.g. 
778 <p>
779 "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.
780 <p>
781 Definition at line <a class="el" href="modules_8cpp-source.html#l00668">668</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
782 <p>
783 References <a class="el" href="commands_8h.html#a75">duration()</a>.
784 <p>
785 <div class="fragment"><pre>00669 {
786 00670         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#a75">duration</a>(delta.c_str());
787 00671 }
788 </pre></div>    </td>
789   </tr>
790 </table>
791 <a name="a31" doxytag="Server::CallCommandHandler"></a><p>
792 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
793   <tr>
794     <td class="mdRow">
795       <table cellpadding="0" cellspacing="0" border="0">
796         <tr>
797           <td class="md" nowrap valign="top"> void Server::CallCommandHandler </td>
798           <td class="md" valign="top">(&nbsp;</td>
799           <td class="md" nowrap valign="top">std::string&nbsp;</td>
800           <td class="mdname" nowrap> <em>commandname</em>, </td>
801         </tr>
802         <tr>
803           <td></td>
804           <td></td>
805           <td class="md" nowrap>char **&nbsp;</td>
806           <td class="mdname" nowrap> <em>parameters</em>, </td>
807         </tr>
808         <tr>
809           <td></td>
810           <td></td>
811           <td class="md" nowrap>int&nbsp;</td>
812           <td class="mdname" nowrap> <em>pcnt</em>, </td>
813         </tr>
814         <tr>
815           <td></td>
816           <td></td>
817           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
818           <td class="mdname" nowrap> <em>user</em></td>
819         </tr>
820         <tr>
821           <td></td>
822           <td class="md">)&nbsp;</td>
823           <td class="md" colspan="2"><code> [virtual]</code></td>
824         </tr>
825
826       </table>
827     </td>
828   </tr>
829 </table>
830 <table cellspacing=5 cellpadding=0 border=0>
831   <tr>
832     <td>
833       &nbsp;
834     </td>
835     <td>
836
837 <p>
838 Calls the handler for a command, either implemented by the core or by another module. 
839 <p>
840 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>
841 ) 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.
842 <p>
843 Definition at line <a class="el" href="modules_8cpp-source.html#l00410">410</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
844 <p>
845 <div class="fragment"><pre>00411 {
846 00412         call_handler(commandname.c_str(),parameters,pcnt,user);
847 00413 }
848 </pre></div>    </td>
849   </tr>
850 </table>
851 <a name="a33" doxytag="Server::ChangeGECOS"></a><p>
852 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
853   <tr>
854     <td class="mdRow">
855       <table cellpadding="0" cellspacing="0" border="0">
856         <tr>
857           <td class="md" nowrap valign="top"> void Server::ChangeGECOS </td>
858           <td class="md" valign="top">(&nbsp;</td>
859           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
860           <td class="mdname" nowrap> <em>user</em>, </td>
861         </tr>
862         <tr>
863           <td></td>
864           <td></td>
865           <td class="md" nowrap>std::string&nbsp;</td>
866           <td class="mdname" nowrap> <em>gecos</em></td>
867         </tr>
868         <tr>
869           <td></td>
870           <td class="md">)&nbsp;</td>
871           <td class="md" colspan="2"><code> [virtual]</code></td>
872         </tr>
873
874       </table>
875     </td>
876   </tr>
877 </table>
878 <table cellspacing=5 cellpadding=0 border=0>
879   <tr>
880     <td>
881       &nbsp;
882     </td>
883     <td>
884
885 <p>
886 Change GECOS (fullname) of a user. 
887 <p>
888 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.
889 <p>
890 Definition at line <a class="el" href="modules_8cpp-source.html#l00498">498</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
891 <p>
892 References <a class="el" href="message_8h.html#a10">ChangeName()</a>.
893 <p>
894 <div class="fragment"><pre>00499 {
895 00500         <a class="code" href="message_8h.html#a10">ChangeName</a>(user,gecos.c_str());
896 00501 }
897 </pre></div>    </td>
898   </tr>
899 </table>
900 <a name="a32" doxytag="Server::ChangeHost"></a><p>
901 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
902   <tr>
903     <td class="mdRow">
904       <table cellpadding="0" cellspacing="0" border="0">
905         <tr>
906           <td class="md" nowrap valign="top"> void Server::ChangeHost </td>
907           <td class="md" valign="top">(&nbsp;</td>
908           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
909           <td class="mdname" nowrap> <em>user</em>, </td>
910         </tr>
911         <tr>
912           <td></td>
913           <td></td>
914           <td class="md" nowrap>std::string&nbsp;</td>
915           <td class="mdname" nowrap> <em>host</em></td>
916         </tr>
917         <tr>
918           <td></td>
919           <td class="md">)&nbsp;</td>
920           <td class="md" colspan="2"><code> [virtual]</code></td>
921         </tr>
922
923       </table>
924     </td>
925   </tr>
926 </table>
927 <table cellspacing=5 cellpadding=0 border=0>
928   <tr>
929     <td>
930       &nbsp;
931     </td>
932     <td>
933
934 <p>
935 Change displayed hostname of a user. 
936 <p>
937 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.
938 <p>
939 Definition at line <a class="el" href="modules_8cpp-source.html#l00493">493</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
940 <p>
941 References <a class="el" href="message_8h.html#a11">ChangeDisplayedHost()</a>.
942 <p>
943 <div class="fragment"><pre>00494 {
944 00495         <a class="code" href="message_8h.html#a11">ChangeDisplayedHost</a>(user,host.c_str());
945 00496 }
946 </pre></div>    </td>
947   </tr>
948 </table>
949 <a name="a28" doxytag="Server::ChangeUserNick"></a><p>
950 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
951   <tr>
952     <td class="mdRow">
953       <table cellpadding="0" cellspacing="0" border="0">
954         <tr>
955           <td class="md" nowrap valign="top"> void Server::ChangeUserNick </td>
956           <td class="md" valign="top">(&nbsp;</td>
957           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
958           <td class="mdname" nowrap> <em>user</em>, </td>
959         </tr>
960         <tr>
961           <td></td>
962           <td></td>
963           <td class="md" nowrap>std::string&nbsp;</td>
964           <td class="mdname" nowrap> <em>nickname</em></td>
965         </tr>
966         <tr>
967           <td></td>
968           <td class="md">)&nbsp;</td>
969           <td class="md" colspan="2"><code> [virtual]</code></td>
970         </tr>
971
972       </table>
973     </td>
974   </tr>
975 </table>
976 <table cellspacing=5 cellpadding=0 border=0>
977   <tr>
978     <td>
979       &nbsp;
980     </td>
981     <td>
982
983 <p>
984 Forces a user nickchange. 
985 <p>
986 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.
987 <p>
988 Definition at line <a class="el" href="modules_8cpp-source.html#l00394">394</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
989 <p>
990 <div class="fragment"><pre>00395 {
991 00396         force_nickchange(user,nickname.c_str());
992 00397 }
993 </pre></div>    </td>
994   </tr>
995 </table>
996 <a name="a16" doxytag="Server::ChanMode"></a><p>
997 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
998   <tr>
999     <td class="mdRow">
1000       <table cellpadding="0" cellspacing="0" border="0">
1001         <tr>
1002           <td class="md" nowrap valign="top"> std::string Server::ChanMode </td>
1003           <td class="md" valign="top">(&nbsp;</td>
1004           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1005           <td class="mdname" nowrap> <em>User</em>, </td>
1006         </tr>
1007         <tr>
1008           <td></td>
1009           <td></td>
1010           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1011           <td class="mdname" nowrap> <em>Chan</em></td>
1012         </tr>
1013         <tr>
1014           <td></td>
1015           <td class="md">)&nbsp;</td>
1016           <td class="md" colspan="2"><code> [virtual]</code></td>
1017         </tr>
1018
1019       </table>
1020     </td>
1021   </tr>
1022 </table>
1023 <table cellspacing=5 cellpadding=0 border=0>
1024   <tr>
1025     <td>
1026       &nbsp;
1027     </td>
1028     <td>
1029
1030 <p>
1031 Attempts to look up a user's privilages on a channel. 
1032 <p>
1033 This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
1034 <p>
1035 Definition at line <a class="el" href="modules_8cpp-source.html#l00518">518</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1036 <p>
1037 References <a class="el" href="message_8h.html#a14">cmode()</a>.
1038 <p>
1039 <div class="fragment"><pre>00519 {
1040 00520         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a14">cmode</a>(User,Chan);
1041 00521 }
1042 </pre></div>    </td>
1043   </tr>
1044 </table>
1045 <a name="a9" doxytag="Server::CommonChannels"></a><p>
1046 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1047   <tr>
1048     <td class="mdRow">
1049       <table cellpadding="0" cellspacing="0" border="0">
1050         <tr>
1051           <td class="md" nowrap valign="top"> bool Server::CommonChannels </td>
1052           <td class="md" valign="top">(&nbsp;</td>
1053           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1054           <td class="mdname" nowrap> <em>u1</em>, </td>
1055         </tr>
1056         <tr>
1057           <td></td>
1058           <td></td>
1059           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1060           <td class="mdname" nowrap> <em>u2</em></td>
1061         </tr>
1062         <tr>
1063           <td></td>
1064           <td class="md">)&nbsp;</td>
1065           <td class="md" colspan="2"><code> [virtual]</code></td>
1066         </tr>
1067
1068       </table>
1069     </td>
1070   </tr>
1071 </table>
1072 <table cellspacing=5 cellpadding=0 border=0>
1073   <tr>
1074     <td>
1075       &nbsp;
1076     </td>
1077     <td>
1078
1079 <p>
1080 Returns true if two users share a common channel. 
1081 <p>
1082 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a10">Server::SendCommon</a> method.
1083 <p>
1084 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>.
1085 <p>
1086 References <a class="el" href="message_8h.html#a0">common_channels()</a>.
1087 <p>
1088 <div class="fragment"><pre>00472 {
1089 00473         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a0">common_channels</a>(u1,u2) != 0);
1090 00474 }
1091 </pre></div>    </td>
1092   </tr>
1093 </table>
1094 <a name="a13" doxytag="Server::CountUsers"></a><p>
1095 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1096   <tr>
1097     <td class="mdRow">
1098       <table cellpadding="0" cellspacing="0" border="0">
1099         <tr>
1100           <td class="md" nowrap valign="top"> int Server::CountUsers </td>
1101           <td class="md" valign="top">(&nbsp;</td>
1102           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1103           <td class="mdname1" valign="top" nowrap> <em>c</em>          </td>
1104           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1105           <td class="md" nowrap><code> [virtual]</code></td>
1106         </tr>
1107
1108       </table>
1109     </td>
1110   </tr>
1111 </table>
1112 <table cellspacing=5 cellpadding=0 border=0>
1113   <tr>
1114     <td>
1115       &nbsp;
1116     </td>
1117     <td>
1118
1119 <p>
1120 Returns a count of the number of users on a channel. 
1121 <p>
1122 This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.
1123 <p>
1124 Definition at line <a class="el" href="modules_8cpp-source.html#l00573">573</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1125 <p>
1126 <div class="fragment"><pre>00574 {
1127 00575         <span class="keywordflow">return</span> usercount(c);
1128 00576 }
1129 </pre></div>    </td>
1130   </tr>
1131 </table>
1132 <a name="a47" doxytag="Server::DelELine"></a><p>
1133 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1134   <tr>
1135     <td class="mdRow">
1136       <table cellpadding="0" cellspacing="0" border="0">
1137         <tr>
1138           <td class="md" nowrap valign="top"> bool Server::DelELine </td>
1139           <td class="md" valign="top">(&nbsp;</td>
1140           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1141           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1142           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1143           <td class="md" nowrap><code> [virtual]</code></td>
1144         </tr>
1145
1146       </table>
1147     </td>
1148   </tr>
1149 </table>
1150 <table cellspacing=5 cellpadding=0 border=0>
1151   <tr>
1152     <td>
1153       &nbsp;
1154     </td>
1155     <td>
1156
1157 <p>
1158 Deletes a local E-Line. 
1159 <p>
1160
1161 <p>
1162 Definition at line <a class="el" href="modules_8cpp-source.html#l00663">663</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1163 <p>
1164 References <a class="el" href="xline_8h.html#a10">del_eline()</a>.
1165 <p>
1166 <div class="fragment"><pre>00664 {
1167 00665         <a class="code" href="xline_8h.html#a10">del_eline</a>(hostmask.c_str());
1168 00666 }
1169 </pre></div>    </td>
1170   </tr>
1171 </table>
1172 <a name="a43" doxytag="Server::DelGLine"></a><p>
1173 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1174   <tr>
1175     <td class="mdRow">
1176       <table cellpadding="0" cellspacing="0" border="0">
1177         <tr>
1178           <td class="md" nowrap valign="top"> bool Server::DelGLine </td>
1179           <td class="md" valign="top">(&nbsp;</td>
1180           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1181           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1182           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1183           <td class="md" nowrap><code> [virtual]</code></td>
1184         </tr>
1185
1186       </table>
1187     </td>
1188   </tr>
1189 </table>
1190 <table cellspacing=5 cellpadding=0 border=0>
1191   <tr>
1192     <td>
1193       &nbsp;
1194     </td>
1195     <td>
1196
1197 <p>
1198 Deletes a G-Line from all servers on the mesh. 
1199 <p>
1200
1201 <p>
1202 Definition at line <a class="el" href="modules_8cpp-source.html#l00643">643</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1203 <p>
1204 References <a class="el" href="xline_8h.html#a6">del_gline()</a>.
1205 <p>
1206 <div class="fragment"><pre>00644 {
1207 00645         <a class="code" href="xline_8h.html#a6">del_gline</a>(hostmask.c_str());
1208 00646 }
1209 </pre></div>    </td>
1210   </tr>
1211 </table>
1212 <a name="a46" doxytag="Server::DelKLine"></a><p>
1213 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1214   <tr>
1215     <td class="mdRow">
1216       <table cellpadding="0" cellspacing="0" border="0">
1217         <tr>
1218           <td class="md" nowrap valign="top"> bool Server::DelKLine </td>
1219           <td class="md" valign="top">(&nbsp;</td>
1220           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1221           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1222           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1223           <td class="md" nowrap><code> [virtual]</code></td>
1224         </tr>
1225
1226       </table>
1227     </td>
1228   </tr>
1229 </table>
1230 <table cellspacing=5 cellpadding=0 border=0>
1231   <tr>
1232     <td>
1233       &nbsp;
1234     </td>
1235     <td>
1236
1237 <p>
1238 Deletes a local K-Line. 
1239 <p>
1240
1241 <p>
1242 Definition at line <a class="el" href="modules_8cpp-source.html#l00658">658</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1243 <p>
1244 References <a class="el" href="xline_8h.html#a9">del_kline()</a>.
1245 <p>
1246 <div class="fragment"><pre>00659 {
1247 00660         <a class="code" href="xline_8h.html#a9">del_kline</a>(hostmask.c_str());
1248 00661 }
1249 </pre></div>    </td>
1250   </tr>
1251 </table>
1252 <a name="a44" doxytag="Server::DelQLine"></a><p>
1253 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1254   <tr>
1255     <td class="mdRow">
1256       <table cellpadding="0" cellspacing="0" border="0">
1257         <tr>
1258           <td class="md" nowrap valign="top"> bool Server::DelQLine </td>
1259           <td class="md" valign="top">(&nbsp;</td>
1260           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1261           <td class="mdname1" valign="top" nowrap> <em>nickname</em>          </td>
1262           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1263           <td class="md" nowrap><code> [virtual]</code></td>
1264         </tr>
1265
1266       </table>
1267     </td>
1268   </tr>
1269 </table>
1270 <table cellspacing=5 cellpadding=0 border=0>
1271   <tr>
1272     <td>
1273       &nbsp;
1274     </td>
1275     <td>
1276
1277 <p>
1278 Deletes a Q-Line from all servers on the mesh. 
1279 <p>
1280
1281 <p>
1282 Definition at line <a class="el" href="modules_8cpp-source.html#l00648">648</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1283 <p>
1284 References <a class="el" href="xline_8h.html#a7">del_qline()</a>.
1285 <p>
1286 <div class="fragment"><pre>00649 {
1287 00650         <a class="code" href="xline_8h.html#a7">del_qline</a>(nickname.c_str());
1288 00651 }
1289 </pre></div>    </td>
1290   </tr>
1291 </table>
1292 <a name="a45" doxytag="Server::DelZLine"></a><p>
1293 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1294   <tr>
1295     <td class="mdRow">
1296       <table cellpadding="0" cellspacing="0" border="0">
1297         <tr>
1298           <td class="md" nowrap valign="top"> bool Server::DelZLine </td>
1299           <td class="md" valign="top">(&nbsp;</td>
1300           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1301           <td class="mdname1" valign="top" nowrap> <em>ipaddr</em>          </td>
1302           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1303           <td class="md" nowrap><code> [virtual]</code></td>
1304         </tr>
1305
1306       </table>
1307     </td>
1308   </tr>
1309 </table>
1310 <table cellspacing=5 cellpadding=0 border=0>
1311   <tr>
1312     <td>
1313       &nbsp;
1314     </td>
1315     <td>
1316
1317 <p>
1318 Deletes a Z-Line from all servers on the mesh. 
1319 <p>
1320
1321 <p>
1322 Definition at line <a class="el" href="modules_8cpp-source.html#l00653">653</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1323 <p>
1324 References <a class="el" href="xline_8h.html#a8">del_zline()</a>.
1325 <p>
1326 <div class="fragment"><pre>00654 {
1327 00655         <a class="code" href="xline_8h.html#a8">del_zline</a>(ipaddr.c_str());
1328 00656 }
1329 </pre></div>    </td>
1330   </tr>
1331 </table>
1332 <a name="a15" doxytag="Server::FindChannel"></a><p>
1333 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1334   <tr>
1335     <td class="mdRow">
1336       <table cellpadding="0" cellspacing="0" border="0">
1337         <tr>
1338           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
1339           <td class="md" valign="top">(&nbsp;</td>
1340           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1341           <td class="mdname1" valign="top" nowrap> <em>channel</em>          </td>
1342           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1343           <td class="md" nowrap><code> [virtual]</code></td>
1344         </tr>
1345
1346       </table>
1347     </td>
1348   </tr>
1349 </table>
1350 <table cellspacing=5 cellpadding=0 border=0>
1351   <tr>
1352     <td>
1353       &nbsp;
1354     </td>
1355     <td>
1356
1357 <p>
1358 Attempts to look up a channel and return a pointer to it. 
1359 <p>
1360 This function will return NULL if the channel does not exist.
1361 <p>
1362 Definition at line <a class="el" href="modules_8cpp-source.html#l00513">513</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1363 <p>
1364 <div class="fragment"><pre>00514 {
1365 00515         <span class="keywordflow">return</span> FindChan(channel.c_str());
1366 00516 }
1367 </pre></div>    </td>
1368   </tr>
1369 </table>
1370 <a name="a14" doxytag="Server::FindNick"></a><p>
1371 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1372   <tr>
1373     <td class="mdRow">
1374       <table cellpadding="0" cellspacing="0" border="0">
1375         <tr>
1376           <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
1377           <td class="md" valign="top">(&nbsp;</td>
1378           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1379           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1380           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1381           <td class="md" nowrap><code> [virtual]</code></td>
1382         </tr>
1383
1384       </table>
1385     </td>
1386   </tr>
1387 </table>
1388 <table cellspacing=5 cellpadding=0 border=0>
1389   <tr>
1390     <td>
1391       &nbsp;
1392     </td>
1393     <td>
1394
1395 <p>
1396 Attempts to look up a nick and return a pointer to it. 
1397 <p>
1398 This function will return NULL if the nick does not exist.
1399 <p>
1400 Definition at line <a class="el" href="modules_8cpp-source.html#l00508">508</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1401 <p>
1402 <div class="fragment"><pre>00509 {
1403 00510         <span class="keywordflow">return</span> Find(nick);
1404 00511 }
1405 </pre></div>    </td>
1406   </tr>
1407 </table>
1408 <a name="a20" doxytag="Server::GetAdmin"></a><p>
1409 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1410   <tr>
1411     <td class="mdRow">
1412       <table cellpadding="0" cellspacing="0" border="0">
1413         <tr>
1414           <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
1415           <td class="md" valign="top">(&nbsp;</td>
1416           <td class="mdname1" valign="top" nowrap>          </td>
1417           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1418           <td class="md" nowrap><code> [virtual]</code></td>
1419         </tr>
1420
1421       </table>
1422     </td>
1423   </tr>
1424 </table>
1425 <table cellspacing=5 cellpadding=0 border=0>
1426   <tr>
1427     <td>
1428       &nbsp;
1429     </td>
1430     <td>
1431
1432 <p>
1433 Returns the information of the server as returned by the /ADMIN command. 
1434 <p>
1435 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.
1436 <p>
1437 Definition at line <a class="el" href="modules_8cpp-source.html#l00538">538</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1438 <p>
1439 <div class="fragment"><pre>00539 {
1440 00540         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
1441 00541 }
1442 </pre></div>    </td>
1443   </tr>
1444 </table>
1445 <a name="a19" doxytag="Server::GetNetworkName"></a><p>
1446 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1447   <tr>
1448     <td class="mdRow">
1449       <table cellpadding="0" cellspacing="0" border="0">
1450         <tr>
1451           <td class="md" nowrap valign="top"> std::string Server::GetNetworkName </td>
1452           <td class="md" valign="top">(&nbsp;</td>
1453           <td class="mdname1" valign="top" nowrap>          </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 Returns the network name, global to all linked servers. 
1471 <p>
1472
1473 <p>
1474 Definition at line <a class="el" href="modules_8cpp-source.html#l00533">533</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1475 <p>
1476 <div class="fragment"><pre>00534 {
1477 00535         <span class="keywordflow">return</span> getnetworkname();
1478 00536 }
1479 </pre></div>    </td>
1480   </tr>
1481 </table>
1482 <a name="a18" doxytag="Server::GetServerName"></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"> std::string Server::GetServerName </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 server name of the server where the module is loaded. 
1508 <p>
1509
1510 <p>
1511 Definition at line <a class="el" href="modules_8cpp-source.html#l00528">528</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1512 <p>
1513 <div class="fragment"><pre>00529 {
1514 00530         <span class="keywordflow">return</span> getservername();
1515 00531 }
1516 </pre></div>    </td>
1517   </tr>
1518 </table>
1519 <a name="a35" doxytag="Server::GetUsers"></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"> <a class="el" href="modules_8h.html#a33">chanuserlist</a> Server::GetUsers </td>
1526           <td class="md" valign="top">(&nbsp;</td>
1527           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1528           <td class="mdname1" valign="top" nowrap> <em>chan</em>          </td>
1529           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1530           <td class="md" nowrap><code> [virtual]</code></td>
1531         </tr>
1532
1533       </table>
1534     </td>
1535   </tr>
1536 </table>
1537 <table cellspacing=5 cellpadding=0 border=0>
1538   <tr>
1539     <td>
1540       &nbsp;
1541     </td>
1542     <td>
1543
1544 <p>
1545 Fetches the userlist of a channel. 
1546 <p>
1547 This function must be here and not a member of userrec or chanrec due to include constraints.
1548 <p>
1549 Definition at line <a class="el" href="modules_8cpp-source.html#l00375">375</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1550 <p>
1551 References <a class="el" href="modules_8h-source.html#l00072">chanuserlist</a>, <a class="el" href="modules_8cpp-source.html#l00179">clientlist</a>, <a class="el" href="message_8h.html#a16">has_channel()</a>, and <a class="el" href="message_8h.html#a13">isnick()</a>.
1552 <p>
1553 <div class="fragment"><pre>00376 {
1554 00377         <a class="code" href="modules_8h.html#a33">chanuserlist</a> userl;
1555 00378         userl.clear();
1556 00379         <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++)
1557 00380         {
1558 00381                 <span class="keywordflow">if</span> (i-&gt;second)
1559 00382                 {
1560 00383                         <span class="keywordflow">if</span> (<a class="code" href="message_8h.html#a16">has_channel</a>(i-&gt;second,chan))
1561 00384                         {
1562 00385                                 <span class="keywordflow">if</span> (<a class="code" href="message_8h.html#a13">isnick</a>(i-&gt;second-&gt;nick))
1563 00386                                 {
1564 00387                                         userl.push_back(i-&gt;second);
1565 00388                                 }
1566 00389                         }
1567 00390                 }
1568 00391         }
1569 00392         <span class="keywordflow">return</span> userl;
1570 00393 }
1571 </pre></div>    </td>
1572   </tr>
1573 </table>
1574 <a name="a12" doxytag="Server::IsNick"></a><p>
1575 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1576   <tr>
1577     <td class="mdRow">
1578       <table cellpadding="0" cellspacing="0" border="0">
1579         <tr>
1580           <td class="md" nowrap valign="top"> bool Server::IsNick </td>
1581           <td class="md" valign="top">(&nbsp;</td>
1582           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1583           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1584           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1585           <td class="md" nowrap><code> [virtual]</code></td>
1586         </tr>
1587
1588       </table>
1589     </td>
1590   </tr>
1591 </table>
1592 <table cellspacing=5 cellpadding=0 border=0>
1593   <tr>
1594     <td>
1595       &nbsp;
1596     </td>
1597     <td>
1598
1599 <p>
1600 Returns true if a nick is valid. 
1601 <p>
1602 Nicks for unregistered connections will return false.
1603 <p>
1604 Definition at line <a class="el" href="modules_8cpp-source.html#l00503">503</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1605 <p>
1606 References <a class="el" href="message_8h.html#a13">isnick()</a>.
1607 <p>
1608 <div class="fragment"><pre>00504 {
1609 00505         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a13">isnick</a>(nick.c_str()) != 0);
1610 00506 }
1611 </pre></div>    </td>
1612   </tr>
1613 </table>
1614 <a name="a17" doxytag="Server::IsOnChannel"></a><p>
1615 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1616   <tr>
1617     <td class="mdRow">
1618       <table cellpadding="0" cellspacing="0" border="0">
1619         <tr>
1620           <td class="md" nowrap valign="top"> bool Server::IsOnChannel </td>
1621           <td class="md" valign="top">(&nbsp;</td>
1622           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1623           <td class="mdname" nowrap> <em>User</em>, </td>
1624         </tr>
1625         <tr>
1626           <td></td>
1627           <td></td>
1628           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1629           <td class="mdname" nowrap> <em>Chan</em></td>
1630         </tr>
1631         <tr>
1632           <td></td>
1633           <td class="md">)&nbsp;</td>
1634           <td class="md" colspan="2"><code> [virtual]</code></td>
1635         </tr>
1636
1637       </table>
1638     </td>
1639   </tr>
1640 </table>
1641 <table cellspacing=5 cellpadding=0 border=0>
1642   <tr>
1643     <td>
1644       &nbsp;
1645     </td>
1646     <td>
1647
1648 <p>
1649 Checks if a user is on a channel. 
1650 <p>
1651 This function will return true or false to indicate if user 'User' is on channel 'Chan'.
1652 <p>
1653 Definition at line <a class="el" href="modules_8cpp-source.html#l00523">523</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1654 <p>
1655 References <a class="el" href="message_8h.html#a16">has_channel()</a>.
1656 <p>
1657 <div class="fragment"><pre>00524 {
1658 00525         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a16">has_channel</a>(User,Chan);
1659 00526 }
1660 </pre></div>    </td>
1661   </tr>
1662 </table>
1663 <a name="a34" doxytag="Server::IsUlined"></a><p>
1664 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1665   <tr>
1666     <td class="mdRow">
1667       <table cellpadding="0" cellspacing="0" border="0">
1668         <tr>
1669           <td class="md" nowrap valign="top"> bool Server::IsUlined </td>
1670           <td class="md" valign="top">(&nbsp;</td>
1671           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1672           <td class="mdname1" valign="top" nowrap> <em>server</em>          </td>
1673           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1674           <td class="md" nowrap><code> [virtual]</code></td>
1675         </tr>
1676
1677       </table>
1678     </td>
1679   </tr>
1680 </table>
1681 <table cellspacing=5 cellpadding=0 border=0>
1682   <tr>
1683     <td>
1684       &nbsp;
1685     </td>
1686     <td>
1687
1688 <p>
1689 Returns true if the servername you give is ulined. 
1690 <p>
1691 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.
1692 <p>
1693 Definition at line <a class="el" href="modules_8cpp-source.html#l00405">405</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1694 <p>
1695 References <a class="el" href="commands_8h.html#a74">is_uline()</a>.
1696 <p>
1697 <div class="fragment"><pre>00406 {
1698 00407         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#a74">is_uline</a>(server.c_str());
1699 00408 }
1700 </pre></div>    </td>
1701   </tr>
1702 </table>
1703 <a name="a26" doxytag="Server::JoinUserToChannel"></a><p>
1704 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1705   <tr>
1706     <td class="mdRow">
1707       <table cellpadding="0" cellspacing="0" border="0">
1708         <tr>
1709           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::JoinUserToChannel </td>
1710           <td class="md" valign="top">(&nbsp;</td>
1711           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1712           <td class="mdname" nowrap> <em>user</em>, </td>
1713         </tr>
1714         <tr>
1715           <td></td>
1716           <td></td>
1717           <td class="md" nowrap>std::string&nbsp;</td>
1718           <td class="mdname" nowrap> <em>cname</em>, </td>
1719         </tr>
1720         <tr>
1721           <td></td>
1722           <td></td>
1723           <td class="md" nowrap>std::string&nbsp;</td>
1724           <td class="mdname" nowrap> <em>key</em></td>
1725         </tr>
1726         <tr>
1727           <td></td>
1728           <td class="md">)&nbsp;</td>
1729           <td class="md" colspan="2"><code> [virtual]</code></td>
1730         </tr>
1731
1732       </table>
1733     </td>
1734   </tr>
1735 </table>
1736 <table cellspacing=5 cellpadding=0 border=0>
1737   <tr>
1738     <td>
1739       &nbsp;
1740     </td>
1741     <td>
1742
1743 <p>
1744 Forces a user to join a channel. 
1745 <p>
1746 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.
1747 <p>
1748 Definition at line <a class="el" href="modules_8cpp-source.html#l00365">365</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1749 <p>
1750 <div class="fragment"><pre>00366 {
1751 00367         <span class="keywordflow">return</span> add_channel(user,cname.c_str(),key.c_str(),<span class="keyword">true</span>);
1752 00368 }
1753 </pre></div>    </td>
1754   </tr>
1755 </table>
1756 <a name="a3" doxytag="Server::Log"></a><p>
1757 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1758   <tr>
1759     <td class="mdRow">
1760       <table cellpadding="0" cellspacing="0" border="0">
1761         <tr>
1762           <td class="md" nowrap valign="top"> void Server::Log </td>
1763           <td class="md" valign="top">(&nbsp;</td>
1764           <td class="md" nowrap valign="top">int&nbsp;</td>
1765           <td class="mdname" nowrap> <em>level</em>, </td>
1766         </tr>
1767         <tr>
1768           <td></td>
1769           <td></td>
1770           <td class="md" nowrap>std::string&nbsp;</td>
1771           <td class="mdname" nowrap> <em>s</em></td>
1772         </tr>
1773         <tr>
1774           <td></td>
1775           <td class="md">)&nbsp;</td>
1776           <td class="md" colspan="2"><code> [virtual]</code></td>
1777         </tr>
1778
1779       </table>
1780     </td>
1781   </tr>
1782 </table>
1783 <table cellspacing=5 cellpadding=0 border=0>
1784   <tr>
1785     <td>
1786       &nbsp;
1787     </td>
1788     <td>
1789
1790 <p>
1791 Writes a log string. 
1792 <p>
1793 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.
1794 <p>
1795 Definition at line <a class="el" href="modules_8cpp-source.html#l00415">415</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1796 <p>
1797 <div class="fragment"><pre>00416 {
1798 00417         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
1799 00418 }
1800 </pre></div>    </td>
1801   </tr>
1802 </table>
1803 <a name="a30" doxytag="Server::MatchText"></a><p>
1804 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1805   <tr>
1806     <td class="mdRow">
1807       <table cellpadding="0" cellspacing="0" border="0">
1808         <tr>
1809           <td class="md" nowrap valign="top"> bool Server::MatchText </td>
1810           <td class="md" valign="top">(&nbsp;</td>
1811           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1812           <td class="mdname" nowrap> <em>sliteral</em>, </td>
1813         </tr>
1814         <tr>
1815           <td></td>
1816           <td></td>
1817           <td class="md" nowrap>std::string&nbsp;</td>
1818           <td class="mdname" nowrap> <em>spattern</em></td>
1819         </tr>
1820         <tr>
1821           <td></td>
1822           <td class="md">)&nbsp;</td>
1823           <td class="md" colspan="2"><code> [virtual]</code></td>
1824         </tr>
1825
1826       </table>
1827     </td>
1828   </tr>
1829 </table>
1830 <table cellspacing=5 cellpadding=0 border=0>
1831   <tr>
1832     <td>
1833       &nbsp;
1834     </td>
1835     <td>
1836
1837 <p>
1838 Matches text against a glob pattern. 
1839 <p>
1840 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.
1841 <p>
1842 Definition at line <a class="el" href="modules_8cpp-source.html#l00352">352</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1843 <p>
1844 <div class="fragment"><pre>00353 {
1845 00354         <span class="keywordtype">char</span> literal[MAXBUF],pattern[MAXBUF];
1846 00355         strlcpy(literal,sliteral.c_str(),MAXBUF);
1847 00356         strlcpy(pattern,spattern.c_str(),MAXBUF);
1848 00357         <span class="keywordflow">return</span> match(literal,pattern);
1849 00358 }
1850 </pre></div>    </td>
1851   </tr>
1852 </table>
1853 <a name="a27" doxytag="Server::PartUserFromChannel"></a><p>
1854 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1855   <tr>
1856     <td class="mdRow">
1857       <table cellpadding="0" cellspacing="0" border="0">
1858         <tr>
1859           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::PartUserFromChannel </td>
1860           <td class="md" valign="top">(&nbsp;</td>
1861           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1862           <td class="mdname" nowrap> <em>user</em>, </td>
1863         </tr>
1864         <tr>
1865           <td></td>
1866           <td></td>
1867           <td class="md" nowrap>std::string&nbsp;</td>
1868           <td class="mdname" nowrap> <em>cname</em>, </td>
1869         </tr>
1870         <tr>
1871           <td></td>
1872           <td></td>
1873           <td class="md" nowrap>std::string&nbsp;</td>
1874           <td class="mdname" nowrap> <em>reason</em></td>
1875         </tr>
1876         <tr>
1877           <td></td>
1878           <td class="md">)&nbsp;</td>
1879           <td class="md" colspan="2"><code> [virtual]</code></td>
1880         </tr>
1881
1882       </table>
1883     </td>
1884   </tr>
1885 </table>
1886 <table cellspacing=5 cellpadding=0 border=0>
1887   <tr>
1888     <td>
1889       &nbsp;
1890     </td>
1891     <td>
1892
1893 <p>
1894 Forces a user to part a channel. 
1895 <p>
1896 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.
1897 <p>
1898 Definition at line <a class="el" href="modules_8cpp-source.html#l00370">370</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1899 <p>
1900 <div class="fragment"><pre>00371 {
1901 00372         <span class="keywordflow">return</span> del_channel(user,cname.c_str(),reason.c_str(),<span class="keyword">false</span>);
1902 00373 }
1903 </pre></div>    </td>
1904   </tr>
1905 </table>
1906 <a name="a37" doxytag="Server::PseudoToUser"></a><p>
1907 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1908   <tr>
1909     <td class="mdRow">
1910       <table cellpadding="0" cellspacing="0" border="0">
1911         <tr>
1912           <td class="md" nowrap valign="top"> bool Server::PseudoToUser </td>
1913           <td class="md" valign="top">(&nbsp;</td>
1914           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1915           <td class="mdname" nowrap> <em>alive</em>, </td>
1916         </tr>
1917         <tr>
1918           <td></td>
1919           <td></td>
1920           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1921           <td class="mdname" nowrap> <em>zombie</em>, </td>
1922         </tr>
1923         <tr>
1924           <td></td>
1925           <td></td>
1926           <td class="md" nowrap>std::string&nbsp;</td>
1927           <td class="mdname" nowrap> <em>message</em></td>
1928         </tr>
1929         <tr>
1930           <td></td>
1931           <td class="md">)&nbsp;</td>
1932           <td class="md" colspan="2"><code> [virtual]</code></td>
1933         </tr>
1934
1935       </table>
1936     </td>
1937   </tr>
1938 </table>
1939 <table cellspacing=5 cellpadding=0 border=0>
1940   <tr>
1941     <td>
1942       &nbsp;
1943     </td>
1944     <td>
1945
1946 <p>
1947 This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other. 
1948 <p>
1949 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.
1950 <p>
1951 Definition at line <a class="el" href="modules_8cpp-source.html#l00588">588</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1952 <p>
1953 References <a class="el" href="channels_8h-source.html#l00213">ucrec::channel</a>, <a class="el" href="users_8h-source.html#l00127">userrec::chans</a>, <a class="el" href="channels_8h-source.html#l00111">chanrec::created</a>, <a class="el" href="connection_8h-source.html#l00178">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00099">FD_MAGIC_NUMBER</a>, <a class="el" href="connection_8h-source.html#l00182">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#l00119">chanrec::setby</a>, <a class="el" href="channels_8h-source.html#l00108">chanrec::topic</a>, and <a class="el" href="channels_8h-source.html#l00115">chanrec::topicset</a>.
1954 <p>
1955 <div class="fragment"><pre>00589 {
1956 00590         zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a> = alive-&gt;<a class="code" href="classconnection.html#o0">fd</a>;
1957 00591         alive-&gt;<a class="code" href="classconnection.html#o0">fd</a> = <a class="code" href="modules_8h.html#a26">FD_MAGIC_NUMBER</a>;
1958 00592         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>);
1959 00593         kill_link(alive,message.c_str());
1960 00594         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i != MAXCHANS; i++)
1961 00595         {
1962 00596                 <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)
1963 00597                 {
1964 00598                         <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>)
1965 00599                         {
1966 00600                                 <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>;
1967 00601                                 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>);
1968 00602                                 <span class="keywordflow">if</span> (Ptr-&gt;<a class="code" href="classchanrec.html#o4">topicset</a>)
1969 00603                                 {
1970 00604                                         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#o2">topic</a>);
1971 00605                                         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#o5">setby</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o4">topicset</a>);
1972 00606                                 }
1973 00607                                 userlist(zombie,Ptr);
1974 00608                                 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>);
1975 00609                                 WriteServ(zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">"324 %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>,chanmodes(Ptr));
1976 00610                                 WriteServ(zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">"329 %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#o3">created</a>);
1977 00611 
1978 00612                         }
1979 00613                 }
1980 00614         }
1981 00615 
1982 00616 }
1983 </pre></div>    </td>
1984   </tr>
1985 </table>
1986 <a name="a29" doxytag="Server::QuitUser"></a><p>
1987 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1988   <tr>
1989     <td class="mdRow">
1990       <table cellpadding="0" cellspacing="0" border="0">
1991         <tr>
1992           <td class="md" nowrap valign="top"> void Server::QuitUser </td>
1993           <td class="md" valign="top">(&nbsp;</td>
1994           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1995           <td class="mdname" nowrap> <em>user</em>, </td>
1996         </tr>
1997         <tr>
1998           <td></td>
1999           <td></td>
2000           <td class="md" nowrap>std::string&nbsp;</td>
2001           <td class="mdname" nowrap> <em>reason</em></td>
2002         </tr>
2003         <tr>
2004           <td></td>
2005           <td class="md">)&nbsp;</td>
2006           <td class="md" colspan="2"><code> [virtual]</code></td>
2007         </tr>
2008
2009       </table>
2010     </td>
2011   </tr>
2012 </table>
2013 <table cellspacing=5 cellpadding=0 border=0>
2014   <tr>
2015     <td>
2016       &nbsp;
2017     </td>
2018     <td>
2019
2020 <p>
2021 Forces a user to quit with the specified reason. 
2022 <p>
2023 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>
2024 WARNING!<p>
2025 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.
2026 <p>
2027 Definition at line <a class="el" href="modules_8cpp-source.html#l00399">399</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2028 <p>
2029 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>.
2030 <p>
2031 <div class="fragment"><pre>00400 {
2032 00401         <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());
2033 00402         kill_link(user,reason.c_str());
2034 00403 }
2035 </pre></div>    </td>
2036   </tr>
2037 </table>
2038 <a name="a4" doxytag="Server::Send"></a><p>
2039 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2040   <tr>
2041     <td class="mdRow">
2042       <table cellpadding="0" cellspacing="0" border="0">
2043         <tr>
2044           <td class="md" nowrap valign="top"> void Server::Send </td>
2045           <td class="md" valign="top">(&nbsp;</td>
2046           <td class="md" nowrap valign="top">int&nbsp;</td>
2047           <td class="mdname" nowrap> <em>Socket</em>, </td>
2048         </tr>
2049         <tr>
2050           <td></td>
2051           <td></td>
2052           <td class="md" nowrap>std::string&nbsp;</td>
2053           <td class="mdname" nowrap> <em>s</em></td>
2054         </tr>
2055         <tr>
2056           <td></td>
2057           <td class="md">)&nbsp;</td>
2058           <td class="md" colspan="2"><code> [virtual]</code></td>
2059         </tr>
2060
2061       </table>
2062     </td>
2063   </tr>
2064 </table>
2065 <table cellspacing=5 cellpadding=0 border=0>
2066   <tr>
2067     <td>
2068       &nbsp;
2069     </td>
2070     <td>
2071
2072 <p>
2073 Sends a line of text down a TCP/IP socket. 
2074 <p>
2075 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
2076 <p>
2077 Definition at line <a class="el" href="modules_8cpp-source.html#l00430">430</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2078 <p>
2079 <div class="fragment"><pre>00431 {
2080 00432         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2081 00433 }
2082 </pre></div>    </td>
2083   </tr>
2084 </table>
2085 <a name="a8" doxytag="Server::SendChannel"></a><p>
2086 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2087   <tr>
2088     <td class="mdRow">
2089       <table cellpadding="0" cellspacing="0" border="0">
2090         <tr>
2091           <td class="md" nowrap valign="top"> void Server::SendChannel </td>
2092           <td class="md" valign="top">(&nbsp;</td>
2093           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2094           <td class="mdname" nowrap> <em>User</em>, </td>
2095         </tr>
2096         <tr>
2097           <td></td>
2098           <td></td>
2099           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2100           <td class="mdname" nowrap> <em>Channel</em>, </td>
2101         </tr>
2102         <tr>
2103           <td></td>
2104           <td></td>
2105           <td class="md" nowrap>std::string&nbsp;</td>
2106           <td class="mdname" nowrap> <em>s</em>, </td>
2107         </tr>
2108         <tr>
2109           <td></td>
2110           <td></td>
2111           <td class="md" nowrap>bool&nbsp;</td>
2112           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2113         </tr>
2114         <tr>
2115           <td></td>
2116           <td class="md">)&nbsp;</td>
2117           <td class="md" colspan="2"><code> [virtual]</code></td>
2118         </tr>
2119
2120       </table>
2121     </td>
2122   </tr>
2123 </table>
2124 <table cellspacing=5 cellpadding=0 border=0>
2125   <tr>
2126     <td>
2127       &nbsp;
2128     </td>
2129     <td>
2130
2131 <p>
2132 Sends text from a user to a channel (mulicast). 
2133 <p>
2134 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).
2135 <p>
2136 Definition at line <a class="el" href="modules_8cpp-source.html#l00459">459</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2137 <p>
2138 <div class="fragment"><pre>00460 {
2139 00461         <span class="keywordflow">if</span> (IncludeSender)
2140 00462         {
2141 00463                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2142 00464         }
2143 00465         <span class="keywordflow">else</span>
2144 00466         {
2145 00467                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2146 00468         }
2147 00469 }
2148 </pre></div>    </td>
2149   </tr>
2150 </table>
2151 <a name="a10" doxytag="Server::SendCommon"></a><p>
2152 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2153   <tr>
2154     <td class="mdRow">
2155       <table cellpadding="0" cellspacing="0" border="0">
2156         <tr>
2157           <td class="md" nowrap valign="top"> void Server::SendCommon </td>
2158           <td class="md" valign="top">(&nbsp;</td>
2159           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2160           <td class="mdname" nowrap> <em>User</em>, </td>
2161         </tr>
2162         <tr>
2163           <td></td>
2164           <td></td>
2165           <td class="md" nowrap>std::string&nbsp;</td>
2166           <td class="mdname" nowrap> <em>text</em>, </td>
2167         </tr>
2168         <tr>
2169           <td></td>
2170           <td></td>
2171           <td class="md" nowrap>bool&nbsp;</td>
2172           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2173         </tr>
2174         <tr>
2175           <td></td>
2176           <td class="md">)&nbsp;</td>
2177           <td class="md" colspan="2"><code> [virtual]</code></td>
2178         </tr>
2179
2180       </table>
2181     </td>
2182   </tr>
2183 </table>
2184 <table cellspacing=5 cellpadding=0 border=0>
2185   <tr>
2186     <td>
2187       &nbsp;
2188     </td>
2189     <td>
2190
2191 <p>
2192 Sends text from a user to one or more channels (mulicast). 
2193 <p>
2194 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.
2195 <p>
2196 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>.
2197 <p>
2198 <div class="fragment"><pre>00477 {
2199 00478         <span class="keywordflow">if</span> (IncludeSender)
2200 00479         {
2201 00480                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
2202 00481         }
2203 00482         <span class="keywordflow">else</span>
2204 00483         {
2205 00484                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
2206 00485         }
2207 00486 }
2208 </pre></div>    </td>
2209   </tr>
2210 </table>
2211 <a name="a6" doxytag="Server::SendFrom"></a><p>
2212 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2213   <tr>
2214     <td class="mdRow">
2215       <table cellpadding="0" cellspacing="0" border="0">
2216         <tr>
2217           <td class="md" nowrap valign="top"> void Server::SendFrom </td>
2218           <td class="md" valign="top">(&nbsp;</td>
2219           <td class="md" nowrap valign="top">int&nbsp;</td>
2220           <td class="mdname" nowrap> <em>Socket</em>, </td>
2221         </tr>
2222         <tr>
2223           <td></td>
2224           <td></td>
2225           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2226           <td class="mdname" nowrap> <em>User</em>, </td>
2227         </tr>
2228         <tr>
2229           <td></td>
2230           <td></td>
2231           <td class="md" nowrap>std::string&nbsp;</td>
2232           <td class="mdname" nowrap> <em>s</em></td>
2233         </tr>
2234         <tr>
2235           <td></td>
2236           <td class="md">)&nbsp;</td>
2237           <td class="md" colspan="2"><code> [virtual]</code></td>
2238         </tr>
2239
2240       </table>
2241     </td>
2242   </tr>
2243 </table>
2244 <table cellspacing=5 cellpadding=0 border=0>
2245   <tr>
2246     <td>
2247       &nbsp;
2248     </td>
2249     <td>
2250
2251 <p>
2252 Sends text from a user to a socket. 
2253 <p>
2254 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)
2255 <p>
2256 Definition at line <a class="el" href="modules_8cpp-source.html#l00440">440</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2257 <p>
2258 <div class="fragment"><pre>00441 {
2259 00442         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
2260 00443 }
2261 </pre></div>    </td>
2262   </tr>
2263 </table>
2264 <a name="a24" doxytag="Server::SendMode"></a><p>
2265 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2266   <tr>
2267     <td class="mdRow">
2268       <table cellpadding="0" cellspacing="0" border="0">
2269         <tr>
2270           <td class="md" nowrap valign="top"> void Server::SendMode </td>
2271           <td class="md" valign="top">(&nbsp;</td>
2272           <td class="md" nowrap valign="top">char **&nbsp;</td>
2273           <td class="mdname" nowrap> <em>parameters</em>, </td>
2274         </tr>
2275         <tr>
2276           <td></td>
2277           <td></td>
2278           <td class="md" nowrap>int&nbsp;</td>
2279           <td class="mdname" nowrap> <em>pcnt</em>, </td>
2280         </tr>
2281         <tr>
2282           <td></td>
2283           <td></td>
2284           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2285           <td class="mdname" nowrap> <em>user</em></td>
2286         </tr>
2287         <tr>
2288           <td></td>
2289           <td class="md">)&nbsp;</td>
2290           <td class="md" colspan="2"><code> [virtual]</code></td>
2291         </tr>
2292
2293       </table>
2294     </td>
2295   </tr>
2296 </table>
2297 <table cellspacing=5 cellpadding=0 border=0>
2298   <tr>
2299     <td>
2300       &nbsp;
2301     </td>
2302     <td>
2303
2304 <p>
2305 Sends a servermode. 
2306 <p>
2307 you must format the parameters array with the target, modes and parameters for those modes.<p>
2308 For example:<p>
2309 char *modes[3];<p>
2310 modes[0] = ChannelName;<p>
2311 modes[1] = "+o";<p>
2312 modes[2] = user-&gt;nick;<p>
2313 Srv-&gt;SendMode(modes,3,user);<p>
2314 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!
2315 <p>
2316 Definition at line <a class="el" href="modules_8cpp-source.html#l00425">425</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2317 <p>
2318 References <a class="el" href="modules_8h.html#a36">server_mode()</a>.
2319 <p>
2320 <div class="fragment"><pre>00426 {
2321 00427         <a class="code" href="modules_8h.html#a36">server_mode</a>(parameters,pcnt,user);
2322 00428 }
2323 </pre></div>    </td>
2324   </tr>
2325 </table>
2326 <a name="a2" doxytag="Server::SendOpers"></a><p>
2327 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2328   <tr>
2329     <td class="mdRow">
2330       <table cellpadding="0" cellspacing="0" border="0">
2331         <tr>
2332           <td class="md" nowrap valign="top"> void Server::SendOpers </td>
2333           <td class="md" valign="top">(&nbsp;</td>
2334           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2335           <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
2336           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2337           <td class="md" nowrap><code> [virtual]</code></td>
2338         </tr>
2339
2340       </table>
2341     </td>
2342   </tr>
2343 </table>
2344 <table cellspacing=5 cellpadding=0 border=0>
2345   <tr>
2346     <td>
2347       &nbsp;
2348     </td>
2349     <td>
2350
2351 <p>
2352 Sends text to all opers. 
2353 <p>
2354 This method sends a server notice to all opers with the usermode +s.
2355 <p>
2356 Definition at line <a class="el" href="modules_8cpp-source.html#l00347">347</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2357 <p>
2358 <div class="fragment"><pre>00348 {
2359 00349         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
2360 00350 }
2361 </pre></div>    </td>
2362   </tr>
2363 </table>
2364 <a name="a5" doxytag="Server::SendServ"></a><p>
2365 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2366   <tr>
2367     <td class="mdRow">
2368       <table cellpadding="0" cellspacing="0" border="0">
2369         <tr>
2370           <td class="md" nowrap valign="top"> void Server::SendServ </td>
2371           <td class="md" valign="top">(&nbsp;</td>
2372           <td class="md" nowrap valign="top">int&nbsp;</td>
2373           <td class="mdname" nowrap> <em>Socket</em>, </td>
2374         </tr>
2375         <tr>
2376           <td></td>
2377           <td></td>
2378           <td class="md" nowrap>std::string&nbsp;</td>
2379           <td class="mdname" nowrap> <em>s</em></td>
2380         </tr>
2381         <tr>
2382           <td></td>
2383           <td class="md">)&nbsp;</td>
2384           <td class="md" colspan="2"><code> [virtual]</code></td>
2385         </tr>
2386
2387       </table>
2388     </td>
2389   </tr>
2390 </table>
2391 <table cellspacing=5 cellpadding=0 border=0>
2392   <tr>
2393     <td>
2394       &nbsp;
2395     </td>
2396     <td>
2397
2398 <p>
2399 Sends text from the server to a socket. 
2400 <p>
2401 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
2402 <p>
2403 Definition at line <a class="el" href="modules_8cpp-source.html#l00435">435</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2404 <p>
2405 <div class="fragment"><pre>00436 {
2406 00437         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2407 00438 }
2408 </pre></div>    </td>
2409   </tr>
2410 </table>
2411 <a name="a7" doxytag="Server::SendTo"></a><p>
2412 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2413   <tr>
2414     <td class="mdRow">
2415       <table cellpadding="0" cellspacing="0" border="0">
2416         <tr>
2417           <td class="md" nowrap valign="top"> void Server::SendTo </td>
2418           <td class="md" valign="top">(&nbsp;</td>
2419           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2420           <td class="mdname" nowrap> <em>Source</em>, </td>
2421         </tr>
2422         <tr>
2423           <td></td>
2424           <td></td>
2425           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2426           <td class="mdname" nowrap> <em>Dest</em>, </td>
2427         </tr>
2428         <tr>
2429           <td></td>
2430           <td></td>
2431           <td class="md" nowrap>std::string&nbsp;</td>
2432           <td class="mdname" nowrap> <em>s</em></td>
2433         </tr>
2434         <tr>
2435           <td></td>
2436           <td class="md">)&nbsp;</td>
2437           <td class="md" colspan="2"><code> [virtual]</code></td>
2438         </tr>
2439
2440       </table>
2441     </td>
2442   </tr>
2443 </table>
2444 <table cellspacing=5 cellpadding=0 border=0>
2445   <tr>
2446     <td>
2447       &nbsp;
2448     </td>
2449     <td>
2450
2451 <p>
2452 Sends text from a user to another user. 
2453 <p>
2454 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>
2455 :user!ident TEXT<p>
2456 The format will become:<p>
2457 :localserver TEXT<p>
2458 Which is useful for numerics and server notices to single users, etc.
2459 <p>
2460 Definition at line <a class="el" href="modules_8cpp-source.html#l00445">445</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2461 <p>
2462 References <a class="el" href="connection_8h-source.html#l00178">connection::fd</a>.
2463 <p>
2464 <div class="fragment"><pre>00446 {
2465 00447         <span class="keywordflow">if</span> (!Source)
2466 00448         {
2467 00449                 <span class="comment">// if source is NULL, then the message originates from the local server</span>
2468 00450                 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());
2469 00451         }
2470 00452         <span class="keywordflow">else</span>
2471 00453         {
2472 00454                 <span class="comment">// otherwise it comes from the user specified</span>
2473 00455                 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
2474 00456         }
2475 00457 }
2476 </pre></div>    </td>
2477   </tr>
2478 </table>
2479 <a name="a25" doxytag="Server::SendToModeMask"></a><p>
2480 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2481   <tr>
2482     <td class="mdRow">
2483       <table cellpadding="0" cellspacing="0" border="0">
2484         <tr>
2485           <td class="md" nowrap valign="top"> void Server::SendToModeMask </td>
2486           <td class="md" valign="top">(&nbsp;</td>
2487           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2488           <td class="mdname" nowrap> <em>modes</em>, </td>
2489         </tr>
2490         <tr>
2491           <td></td>
2492           <td></td>
2493           <td class="md" nowrap>int&nbsp;</td>
2494           <td class="mdname" nowrap> <em>flags</em>, </td>
2495         </tr>
2496         <tr>
2497           <td></td>
2498           <td></td>
2499           <td class="md" nowrap>std::string&nbsp;</td>
2500           <td class="mdname" nowrap> <em>text</em></td>
2501         </tr>
2502         <tr>
2503           <td></td>
2504           <td class="md">)&nbsp;</td>
2505           <td class="md" colspan="2"><code> [virtual]</code></td>
2506         </tr>
2507
2508       </table>
2509     </td>
2510   </tr>
2511 </table>
2512 <table cellspacing=5 cellpadding=0 border=0>
2513   <tr>
2514     <td>
2515       &nbsp;
2516     </td>
2517     <td>
2518
2519 <p>
2520 Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter. 
2521 <p>
2522 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>
2523 Serv-&gt;SendToModeMask("xi", WM_OR, "m00");<p>
2524 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.
2525 <p>
2526 Definition at line <a class="el" href="modules_8cpp-source.html#l00360">360</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2527 <p>
2528 <div class="fragment"><pre>00361 {
2529 00362         WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
2530 00363 }
2531 </pre></div>    </td>
2532   </tr>
2533 </table>
2534 <a name="a11" doxytag="Server::SendWallops"></a><p>
2535 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2536   <tr>
2537     <td class="mdRow">
2538       <table cellpadding="0" cellspacing="0" border="0">
2539         <tr>
2540           <td class="md" nowrap valign="top"> void Server::SendWallops </td>
2541           <td class="md" valign="top">(&nbsp;</td>
2542           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2543           <td class="mdname" nowrap> <em>User</em>, </td>
2544         </tr>
2545         <tr>
2546           <td></td>
2547           <td></td>
2548           <td class="md" nowrap>std::string&nbsp;</td>
2549           <td class="mdname" nowrap> <em>text</em></td>
2550         </tr>
2551         <tr>
2552           <td></td>
2553           <td class="md">)&nbsp;</td>
2554           <td class="md" colspan="2"><code> [virtual]</code></td>
2555         </tr>
2556
2557       </table>
2558     </td>
2559   </tr>
2560 </table>
2561 <table cellspacing=5 cellpadding=0 border=0>
2562   <tr>
2563     <td>
2564       &nbsp;
2565     </td>
2566     <td>
2567
2568 <p>
2569 Sends a WALLOPS message. 
2570 <p>
2571 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
2572 <p>
2573 Definition at line <a class="el" href="modules_8cpp-source.html#l00488">488</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2574 <p>
2575 <div class="fragment"><pre>00489 {
2576 00490         WriteWallOps(User,<span class="keyword">false</span>,<span class="stringliteral">"%s"</span>,text.c_str());
2577 00491 }
2578 </pre></div>    </td>
2579   </tr>
2580 </table>
2581 <a name="a36" doxytag="Server::UserToPseudo"></a><p>
2582 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2583   <tr>
2584     <td class="mdRow">
2585       <table cellpadding="0" cellspacing="0" border="0">
2586         <tr>
2587           <td class="md" nowrap valign="top"> bool Server::UserToPseudo </td>
2588           <td class="md" valign="top">(&nbsp;</td>
2589           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2590           <td class="mdname" nowrap> <em>user</em>, </td>
2591         </tr>
2592         <tr>
2593           <td></td>
2594           <td></td>
2595           <td class="md" nowrap>std::string&nbsp;</td>
2596           <td class="mdname" nowrap> <em>message</em></td>
2597         </tr>
2598         <tr>
2599           <td></td>
2600           <td class="md">)&nbsp;</td>
2601           <td class="md" colspan="2"><code> [virtual]</code></td>
2602         </tr>
2603
2604       </table>
2605     </td>
2606   </tr>
2607 </table>
2608 <table cellspacing=5 cellpadding=0 border=0>
2609   <tr>
2610     <td>
2611       &nbsp;
2612     </td>
2613     <td>
2614
2615 <p>
2616 Remove a user's connection to the irc server, but leave their client in existence in the user hash. 
2617 <p>
2618 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.
2619 <p>
2620 Definition at line <a class="el" href="modules_8cpp-source.html#l00579">579</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2621 <p>
2622 References <a class="el" href="connection_8h-source.html#l00178">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00099">FD_MAGIC_NUMBER</a>, <a class="el" href="connection_8h-source.html#l00182">connection::host</a>, and <a class="el" href="users_8h-source.html#l00110">userrec::ident</a>.
2623 <p>
2624 <div class="fragment"><pre>00580 {
2625 00581         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> old_fd = user-&gt;<a class="code" href="classconnection.html#o0">fd</a>;
2626 00582         user-&gt;<a class="code" href="classconnection.html#o0">fd</a> = <a class="code" href="modules_8h.html#a26">FD_MAGIC_NUMBER</a>;
2627 00583         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());
2628 00584         close(old_fd);
2629 00585         shutdown (old_fd,2);
2630 00586 }
2631 </pre></div>    </td>
2632   </tr>
2633 </table>
2634 <hr>The documentation for this class was generated from the following files:<ul>
2635 <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>
2636 <hr size="1"><address style="align: right;"><small>Generated on Wed Apr 13 12:32:29 2005 for InspIRCd by
2637 <a href="http://www.doxygen.org/index.html">
2638 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
2639 </a>1.3.3 </small></address>
2640 </body>
2641 </html>