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