<?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/13056" />

	<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>2007-02-05T13:07:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[exezic]]></name></author>
		<updated>2007-02-05T13:07:50-04:00</updated>

		<published>2007-02-05T13:07:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70217#p70217</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70217#p70217"/>
		<title type="html"><![CDATA[Detecting dynamic bans expiry [not yet solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70217#p70217"><![CDATA[
I cant seem to figure out what to bind to, I tried using:<br><div class="codebox"><p>Code: </p><pre><code>BOTbind bot &lt;flags&gt; &lt;command&gt; &lt;proc&gt;proc-name &lt;from-bot&gt; &lt;command&gt; &lt;text&gt;Description: triggered by a message coming from another bot in the botnet. The first word is the command and the rest becomes the text argument; flags are ignored.Module: core</code></pre></div>But the bot didnt return anything with this code:<br><div class="codebox"><p>Code: </p><pre><code>bind bot - * randomprocnameproc randomprocname { from cmd text } {  putlog "FROM: $from CMD: $cmd TEXT: $text"}</code></pre></div><div class="codebox"><p>Code: </p><pre><code>[17:14] BotA: cancel ban *!*@exezic.users.quakenet.org on #dota.no</code></pre></div>which I received on another bot in the botnet (BotB), which was running the script...<br><br>Any ideas?<br><br>Maybe it's something about the bind I'm missing, considering it's not stackable... Maybe it should be bound to something. But I'm not sure what the &lt;command&gt; is...<br><br><br><br>On a sidenote; I have access to compiling the bot myself. So if you could point out what I would need to do to make the bot detect whenever a ban expire, that would do aswell <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><br>Ok, so I figured out it wasn't actually in src/mod/irc.mod/irc.c function. It was actually in src/mod/channels.mod/userchan.c<br><br>I also found my way to the code:<br><div class="codebox"><p>Code: </p><pre><code>/* Check for expired timed-bans. */static void check_expired_bans(void){  maskrec *u, *u2;  struct chanset_t *chan;  masklist *b;  for (u = global_bans; u; u = u2) {    u2 = u-&gt;next;    if (!(u-&gt;flags &amp; MASKREC_PERM) &amp;&amp; (now &gt;= u-&gt;expire)) {      putlog(LOG_MISC, "*", "%s %s (%s)", BANS_NOLONGER, u-&gt;mask, MISC_EXPIRED);      for (chan = chanset; chan; chan = chan-&gt;next)        for (b = chan-&gt;channel.ban; b-&gt;mask[0]; b = b-&gt;next)          if (!rfc_casecmp(b-&gt;mask, u-&gt;mask) &amp;&amp;              expired_mask(chan, b-&gt;who) &amp;&amp; b-&gt;timer != now) {            add_mode(chan, '-', 'b', u-&gt;mask);            b-&gt;timer = now;          }      u_delban(NULL, u-&gt;mask, 1);    }  }  /* Check for specific channel-domain bans expiring */  for (chan = chanset; chan; chan = chan-&gt;next) {    for (u = chan-&gt;bans; u; u = u2) {      u2 = u-&gt;next;      if (!(u-&gt;flags &amp; MASKREC_PERM) &amp;&amp; (now &gt;= u-&gt;expire)) {        putlog(LOG_MISC, "*", "%s %s %s %s (%s)", BANS_NOLONGER,               u-&gt;mask, MISC_ONLOCALE, chan-&gt;dname, MISC_EXPIRED);        for (b = chan-&gt;channel.ban; b-&gt;mask[0]; b = b-&gt;next)          if (!rfc_casecmp(b-&gt;mask, u-&gt;mask) &amp;&amp;              expired_mask(chan, b-&gt;who) &amp;&amp; b-&gt;timer != now) {            add_mode(chan, '-', 'b', u-&gt;mask);            b-&gt;timer = now;          }        u_delban(chan, u-&gt;mask, 1);      }    }  }}</code></pre></div>I hope someone here can speak in c <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Basically, I think I need some sort of bind which will react whenever a function is run. For instance, if I had put a function named event_expireban underneath<br><div class="codebox"><p>Code: </p><pre><code>       putlog(LOG_MISC, "*", "%s %s %s %s (%s)", BANS_NOLONGER,               u-&gt;mask, MISC_ONLOCALE, chan-&gt;dname, MISC_EXPIRED);</code></pre></div>like so:<br><div class="codebox"><p>Code: </p><pre><code>  /* Check for specific channel-domain bans expiring */  for (chan = chanset; chan; chan = chan-&gt;next) {    for (u = chan-&gt;bans; u; u = u2) {      u2 = u-&gt;next;      if (!(u-&gt;flags &amp; MASKREC_PERM) &amp;&amp; (now &gt;= u-&gt;expire)) {        putlog(LOG_MISC, "*", "%s %s %s %s (%s)", BANS_NOLONGER,               u-&gt;mask, MISC_ONLOCALE, chan-&gt;dname, MISC_EXPIRED);        --&gt;event_expireban();&lt;--        for (b = chan-&gt;channel.ban; b-&gt;mask[0]; b = b-&gt;next)          if (!rfc_casecmp(b-&gt;mask, u-&gt;mask) &amp;&amp;              expired_mask(chan, b-&gt;who) &amp;&amp; b-&gt;timer != now) {            add_mode(chan, '-', 'b', u-&gt;mask);            b-&gt;timer = now;          }        u_delban(chan, u-&gt;mask, 1);      }    }</code></pre></div><br>and if the event_expireban() function would somehow be detected by<br><div class="codebox"><p>Code: </p><pre><code>bind evnt - expireban procedurename</code></pre></div>in the same way rehash is detected by<br><div class="codebox"><p>Code: </p><pre><code>bind evnt - rehash procedurename</code></pre></div>Then that would solve my problem, only problem is... I don't know how to do this :\<br><br>Any help will be greatly appreciated!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8667">exezic</a> — Mon Feb 05, 2007 1:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[exezic]]></name></author>
		<updated>2007-02-02T09:46:00-04:00</updated>

		<published>2007-02-02T09:46:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70155#p70155</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70155#p70155"/>
		<title type="html"><![CDATA[Detecting dynamic bans expiry [not yet solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70155#p70155"><![CDATA[
Ok, thanks, I might try your advice De Kus.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8667">exezic</a> — Fri Feb 02, 2007 9:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2007-01-31T18:09:38-04:00</updated>

		<published>2007-01-31T18:09:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70130#p70130</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70130#p70130"/>
		<title type="html"><![CDATA[Detecting dynamic bans expiry [not yet solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70130#p70130"><![CDATA[
If you have a botnet, you can bind to the botnet message.<br><br>Oh, and if you can compile your bot yourself, you can also consider to call something in src/mod/irc.mod/irc.c function check_expired_chanstuff() which seems to handle ban expires.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Jan 31, 2007 6:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2007-01-31T17:32:08-04:00</updated>

		<published>2007-01-31T17:32:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70126#p70126</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70126#p70126"/>
		<title type="html"><![CDATA[Re: Detecting dynamic bans expiry [not yet solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70126#p70126"><![CDATA[
<blockquote class="uncited"><div>Is there any way to detect when this happens?</div></blockquote>No. (you'd have to keep a copy of the list and compare it to the internal one to do that...but then you might as well create the html all over again)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Jan 31, 2007 5:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[exezic]]></name></author>
		<updated>2007-01-31T08:17:14-04:00</updated>

		<published>2007-01-31T08:17:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70103#p70103</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70103#p70103"/>
		<title type="html"><![CDATA[Detecting dynamic bans expiry [not yet solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70103#p70103"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>[13:06] No longer banning *!*@exezic.users.quakenet.org on #dota.no (expired)</code></pre></div>Is there any way to detect when this happens?<br><br>My intension is to make a web-based banlist, and I therefore need it to be updated whenever a dynamic ban expires.<br><br>I am aware of the  possibility of using a timer to check a list up against the current banlist. But I would prefer to just update the list whenever it is changed, instead of having a timer running in the background all the time.<br><br>I appreciate all and any responses.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8667">exezic</a> — Wed Jan 31, 2007 8:17 am</p><hr />
]]></content>
	</entry>
	</feed>
