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