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

	<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>2024-07-11T15:38:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2024-07-11T15:38:03-04:00</updated>

		<published>2024-07-11T15:38:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112909#p112909</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112909#p112909"/>
		<title type="html"><![CDATA[Re: add banlist counter]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112909#p112909"><![CDATA[
thanks MMX that seems to work well.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Jul 11, 2024 3:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MMX]]></name></author>
		<updated>2024-07-11T14:50:28-04:00</updated>

		<published>2024-07-11T14:50:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112908#p112908</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112908#p112908"/>
		<title type="html"><![CDATA[Re: add banlist counter]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112908#p112908"><![CDATA[
You receive the ban list from the server line by line and these binds trigger for each line/ban. Your counter variable is local, so you create/increase it from 0 to 1 for each ban line and that's why it does not go higher than 1. Maybe you should try to make your counter variable global.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12967">MMX</a> — Thu Jul 11, 2024 2:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2024-07-11T12:45:25-04:00</updated>

		<published>2024-07-11T12:45:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112906#p112906</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112906#p112906"/>
		<title type="html"><![CDATA[add banlist counter]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112906#p112906"><![CDATA[
greetings i tried to add a counter of the amount of line in this banlist tcl but it doesnt seem to count but instead it uses number 1 only im not that familiar with incr so i thought id ask here.<br><div class="codebox"><p>Code: </p><pre><code>bind dcc n banx dcc_ban_durationproc dcc_ban_duration {hand idx channel} {set chan [lindex $channel 0]if {![validchan $chan]} {putidx $idx "um... I'm not in $chan... what are u thinking?"} else {bind raw - 367 Bans:Duration:OUtputbind raw - 368 Bans:Duration:OUtputputserv "mode $chan +b"}}proc Bans:Duration:OUtput {from key text} {switch -- $key {367 {lassign [split $text] bot chan maskif {[lsearch $chan $mask] &gt; -1} returnset banner2 "[lindex [split $text] 3]"set banner  "[lindex [split $banner2 "!"] 0]"set banmask "[lindex [split $text] 2]"set banduration2 "[lindex [split $text] 4]"set banduration "[expr [clock seconds] - $banduration2]"set currentTime "[clock seconds]"set Ago [expr $currentTime - $banduration2]incr BanListCounter 1putlog "\00314,01 \[$BanListCounter\] - $banner - $chan - \00311 $mask - \00308 [duration $Ago] \017"}368 {unset -nocomplain BanListCounterunbind raw - 367 Bans:Duration:OUtputunbind raw - 368 Bans:Duration:OUtput}}}</code></pre></div><br>here's an example of a test:<br><blockquote class="uncited"><div><br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@77gd-9a2f-60ob-qqc-7s90.486.5739.IP - 19 minutes 34 seconds<br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@7ecg-tm1o-148-j0h-vt1.3634.774.IP - 19 minutes 34 seconds<br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@55z-9j7-l01w-819-5hzp.9315.873.IP - 19 minutes 34 seconds<br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@puy-9669-74m7-t2t-vt3.085.563.IP - 19 minutes 34 seconds<br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@i4mc-ao2c-m3t-zwa-g7o5.545.8772.IP - 19 minutes 34 seconds<br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@83p9-y8l-v018-7l7-8z5.869.849.IP - 19 minutes 34 seconds<br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@77c-nfc5-dlt-2m96-s56v.7116.3083.IP - 19 minutes 34 seconds<br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@768-829a-726-1arl-l0x.218.8911.IP - 19 minutes 34 seconds<br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@t6i-112-2gf-nvtp-3dxr.367.3724.IP - 19 minutes 34 seconds<br>18:46:52 &lt;EggBot&gt; [18:46:54] [1] - Simo - *!*@ldh3-owg6-1721-1q06-l05.903.267.IP - 19 minutes 34 seconds<br></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Jul 11, 2024 12:45 pm</p><hr />
]]></content>
	</entry>
	</feed>
