<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/17111" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2014-06-19T13:04:48-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/17111</id>

		<entry>
		<author><name><![CDATA[while]]></name></author>
		<updated>2014-06-19T13:04:48-04:00</updated>

		<published>2014-06-19T13:04:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102911#p102911</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102911#p102911"/>
		<title type="html"><![CDATA[statsmod host issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102911#p102911"><![CDATA[
after much trial and error i found that the file which to modify is misc.c(maybe not the only one)<br>so if you have any idea what to do here to take the host of an user logged in or not like the eggdrop does, you're more then welcome to give a hint.<br>version v1.3.3.dev1<br>part to be modified:<br> <div class="codebox"><p>Code: </p><pre><code>/* maskstricthost(): * basically the same as maskhost() from src/misc.c, but _never_ stripts * "~+-^=" off the host * maskhost() version: * $Id: misc.c,v 1.30 2000/10/27 19:27:32 fabian Exp $ */static void maskstricthost(const char *s, char *nw){  register const char *p, *q, *e, *f;  int i;  *nw++ = '*';  *nw++ = '!';  p = (q = strchr(s, '!')) ? q + 1 : s;  /* Strip of any nick, if a username is found, use last 8 chars */  if ((q = strchr(p, '@'))) {    int fl = 0;    if ((q - p) &gt; 9) {      nw[0] = '*';      p = q - 7;      i = 1;    } else      i = 0;    while (*p != '@') {      if (!fl &amp;&amp; strchr("~+-^=", *p)) {//        if (strict_host)      nw[i] = '?';//    else//      i--;      } else    nw[i] = *p;      fl++;      p++;      i++;    }    nw[i++] = '@';    q++;  } else {    nw[0] = '*';    nw[1] = '@';    i = 2;    q = s;  }  nw += i;  e = NULL;  /* Now q points to the hostname, i point to where to put the mask */  if ((!(p = strchr(q, '.')) || !(e = strchr(p + 1, '.'))) &amp;&amp; !strchr(q, ':'))    /* TLD or 2 part host */    strcpy(nw, q);  else {    if (e == NULL) {        /* IPv6 address?        */      const char *mask_str;      f = strrchr(q, ':');      if (strchr(f, '.')) { /* IPv4 wrapped in an IPv6? */    f = strrchr(f, '.');    mask_str = ".*";      } else            /* ... no, true IPv6.       */    mask_str = ":*";      strncpy(nw, q, f - q);      /* No need to nw[f-q] = 0 here, as the strcpy below will       * terminate the string for us.       */      nw += (f - q);      strcpy(nw, mask_str);    } else {      for (f = e; *f; f++);      f--;      if (*f &gt;= '0' &amp;&amp; *f &lt;= '9') { /* Numeric IP address */    while (*f != '.')      f--;    strncpy(nw, q, f - q);    /* No need to nw[f-q] = 0 here, as the strcpy below will     * terminate the string for us.     */    nw += (f - q);    strcpy(nw, ".*");      } else {              /* Normal host &gt;= 3 parts */    /*    a.b.c  -&gt; *.b.c     *    a.b.c.d -&gt;  *.b.c.d if tld is a country (2 chars)     *             OR   *.c.d if tld is com/edu/etc (3 chars)     *    a.b.c.d.e -&gt; *.c.d.e   etc     */    const char *x = strchr(e + 1, '.');    if (!x)      x = p;    else if (strchr(x + 1, '.'))      x = e;    else if (strlen(x) == 3)      x = p;    else      x = e;    sprintf(nw, "*%s", x);      }    }  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10748">while</a> — Thu Jun 19, 2014 1:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[while]]></name></author>
		<updated>2014-06-16T05:51:28-04:00</updated>

		<published>2014-06-16T05:51:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102906#p102906</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102906#p102906"/>
		<title type="html"><![CDATA[statsmod host issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102906#p102906"><![CDATA[
hello. i know it's an old topic but i'm interested in this to, tried to look where the bot adds the hostmask but ... if the user is logged to add it's host (*!*@user.undernet.org) if not to add the host as it is *!*@host, not wildcards.<br>i managed to do this with perplexa's stats tcl but can't seem to find where is this mod.<br>thanks.<br><br>edit: <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral"> no luck so far<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10748">while</a> — Mon Jun 16, 2014 5:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[honeybee]]></name></author>
		<updated>2009-08-19T10:31:29-04:00</updated>

		<published>2009-08-19T10:31:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89970#p89970</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89970#p89970"/>
		<title type="html"><![CDATA[statsmod host issue]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89970#p89970"><![CDATA[
Stats.mod works fine but when it comes to hidden quakenet host it adds hosts with wildcard and sometimes it matches with different user's host here is an example.<div class="codebox"><p>Code: </p><pre><code>*!?user@*.Quakenet.org</code></pre></div>I want to change it to *!*@user.Quakenet instead of *!?ident@QUake but same pattern (*!?ident@host) if user is not logged in.<br>All help appreciated.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7174">honeybee</a> — Wed Aug 19, 2009 10:31 am</p><hr />
]]></content>
	</entry>
	</feed>
