[svn] Merge old trunk r2907,r2991:
Allow TESTLINE on channel names.
This commit is contained in:
parent
42bda3f3d2
commit
add9f99dfa
5 changed files with 43 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
jilles 2007/03/28 15:04:06 UTC (20070328-3301)
|
||||
Log:
|
||||
Merge old trunk r2835:
|
||||
resolver: if sendto(2) fails, try sending to the next nameserver
|
||||
|
||||
|
||||
Changes: Modified:
|
||||
+1 -1 trunk/src/res.c (File Modified)
|
||||
|
||||
|
||||
jilles 2007/03/28 14:54:10 UTC (20070328-3299)
|
||||
Log:
|
||||
Merge old trunk r2817:
|
||||
|
|
|
@ -532,6 +532,10 @@
|
|||
in use. As of charybdis 2.1.1, no_tilde and username truncation will
|
||||
be taken into account like in the normal client access check.
|
||||
</para>
|
||||
<para>
|
||||
As of charybdis 2.2.0, a channel name can be specified and the
|
||||
RESV will be returned, if there is one.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title>TESTMASK</title>
|
||||
|
|
|
@ -6,3 +6,7 @@ If nickname is specified it will also search for RESVs.
|
|||
|
||||
This command will not perform dns lookups on a host, for best
|
||||
results you must testline a host and its IP form.
|
||||
|
||||
TESTLINE <#channel>
|
||||
|
||||
Shows whether the channel is reserved or not.
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define SERNO "20070328-3299"
|
||||
#define SERNO "20070328-3301"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: m_testline.c 2757 2006-11-10 22:58:15Z jilles $
|
||||
* $Id: m_testline.c 3303 2007-03-28 15:22:49Z jilles $
|
||||
*/
|
||||
#include "stdinc.h"
|
||||
#include "tools.h"
|
||||
|
@ -35,6 +35,7 @@
|
|||
#include "client.h"
|
||||
#include "modules.h"
|
||||
#include "msg.h"
|
||||
#include "hash.h"
|
||||
#include "hostmask.h"
|
||||
#include "numeric.h"
|
||||
#include "s_conf.h"
|
||||
|
@ -54,7 +55,7 @@ struct Message testgecos_msgtab = {
|
|||
};
|
||||
|
||||
mapi_clist_av1 testline_clist[] = { &testline_msgtab, &testgecos_msgtab, NULL };
|
||||
DECLARE_MODULE_AV1(testline, NULL, NULL, testline_clist, NULL, NULL, "$Revision: 2757 $");
|
||||
DECLARE_MODULE_AV1(testline, NULL, NULL, testline_clist, NULL, NULL, "$Revision: 3303 $");
|
||||
|
||||
static int
|
||||
mo_testline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||
|
@ -73,6 +74,27 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch
|
|||
|
||||
mask = LOCAL_COPY(parv[1]);
|
||||
|
||||
if (IsChannelName(mask))
|
||||
{
|
||||
resv_p = hash_find_resv(mask);
|
||||
if (resv_p != NULL)
|
||||
{
|
||||
sendto_one(source_p, form_str(RPL_TESTLINE),
|
||||
me.name, source_p->name,
|
||||
resv_p->hold ? 'q' : 'Q',
|
||||
resv_p->hold ? (long) ((resv_p->hold - CurrentTime) / 60) : 0L,
|
||||
resv_p->name, resv_p->passwd);
|
||||
/* this is a false positive, so make sure it isn't counted in stats q
|
||||
* --nenolod
|
||||
*/
|
||||
resv_p->port--;
|
||||
}
|
||||
else
|
||||
sendto_one(source_p, form_str(RPL_NOTESTLINE),
|
||||
me.name, source_p->name, parv[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if((p = strchr(mask, '!')))
|
||||
{
|
||||
*p++ = '\0';
|
||||
|
|
Loading…
Reference in a new issue