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

	<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-08-21T06:38:54-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2024-08-21T06:38:54-04:00</updated>

		<published>2024-08-21T06:38:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112994#p112994</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112994#p112994"/>
		<title type="html"><![CDATA[Re: Automatic statistics]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112994#p112994"><![CDATA[
We're speaking about eggdrops, not about external python scripts.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Aug 21, 2024 6:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Urores]]></name></author>
		<updated>2024-08-21T06:06:52-04:00</updated>

		<published>2024-08-21T06:06:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112990#p112990</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112990#p112990"/>
		<title type="html"><![CDATA[Re: Automatic statistics]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112990#p112990"><![CDATA[
If you’re using something like Python, you could set up a cron job or use a task scheduler to run the script every X hours. The script would gather the stats from the channel and log them accordingly.<br>Here’s a rough outline in Python:<br>import time<br>import your_channel_api  # Replace with actual API library<br><br>def fetch_stats():<br>    stats = your_channel_api.get_channel_stats('#Channel')<br>    with open('stats_log.txt', 'a') as f:<br>        f.write(f"Stats #Channel: Join(s): {stats['joins']} | Part(s): {stats['parts']} | Quit(s): {stats['quits']} | Kick(s): {stats['kicks']} | Ban(s): {stats['bans']} | Peak: {stats['peak']}\n")<br>        f.write(f"Stats #Channel: ~ Total: {stats['total']['~']} | &amp; Total: {stats['total']['&amp;']} | @ Total: {stats['total']['@']} | % Total: {stats['total']['%']} | + Total: {stats['total']['+']} | Total Users: {stats['total']['users']}\n")<br><br>while True:<br>    fetch_stats()<br>    time.sleep(7200)  # Sleep for 2 hours<br><br>You’ll need to adapt it based on your API and specific needs.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13502">Urores</a> — Wed Aug 21, 2024 6:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2024-08-14T16:57:19-04:00</updated>

		<published>2024-08-14T16:57:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112984#p112984</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112984#p112984"/>
		<title type="html"><![CDATA[Re: Automatic statistics]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112984#p112984"><![CDATA[
Nice <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>Keep in mind that these stats are volatile: they'll be reseted if you rehash/restart the eggdrop<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Aug 14, 2024 4:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ORATEGOD]]></name></author>
		<updated>2024-08-14T14:09:07-04:00</updated>

		<published>2024-08-14T14:09:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112983#p112983</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112983#p112983"/>
		<title type="html"><![CDATA[Re: Automatic statistics]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112983#p112983"><![CDATA[
<blockquote class="uncited"><div>You can try <a href="https://gitlab.com/tcl-scripts/irc-statistics/-/blob/main/cstats.tcl" class="postlink">https://gitlab.com/tcl-scripts/irc-stat ... cstats.tcl</a><br><br>I didn't added admins and owner in live stats because I can't test it, and the "total" users is the number of normal users.<br>This script is just a POC to help you, probably some bugs exist in it, but none appears in my small tests <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote><strong class="text-strong"><span style="font-size:120%;line-height:116%">Thanks a lot <span style="color:#FF0000">CrazyCat</span>, this script works very well.</span></strong><br><br><a href="https://postimages.org/" class="postlink"><img src="https://i.postimg.cc/qRBRgmhD/StatsIRC.png" class="postimage" alt="Image"></a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12869">ORATEGOD</a> — Wed Aug 14, 2024 2:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2024-08-13T05:13:34-04:00</updated>

		<published>2024-08-13T05:13:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112980#p112980</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112980#p112980"/>
		<title type="html"><![CDATA[Re: Automatic statistics]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112980#p112980"><![CDATA[
You can try <a href="https://gitlab.com/tcl-scripts/irc-statistics/-/blob/main/cstats.tcl" class="postlink">https://gitlab.com/tcl-scripts/irc-stat ... cstats.tcl</a><br><br>I didn't added admins and owner in live stats because I can't test it, and the "total" users is the number of normal users.<br>This script is just a POC to help you, probably some bugs exist in it, but none appears in my small tests <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Aug 13, 2024 5:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2024-08-13T05:55:25-04:00</updated>

		<published>2024-08-13T03:32:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112979#p112979</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112979#p112979"/>
		<title type="html"><![CDATA[Re: Automatic statistics]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112979#p112979"><![CDATA[
you could try this for the  live stats, you would need to find a way to store the stats for kicks bans and such.<br><br>also make sure you load thommey's ArbitraryChanmodes tcl to detect owners ~ and admins &amp;  <br> <div class="codebox"><p>Code: </p><pre><code># to enable: .chanset #channel +CheckChanStats bind cron - {0 */2 * * *} ChanStats:Check:cronsetudef flag CheckChanStats proc ChanStats:Check:cron {min hour day month weekday} { foreach [string tolower channel] [channels] {  if {![channel get $channel CheckChanStats]} continue                  set chan [string tolower $channel]  set owners 0set admins 0set ops 0set hops 0set voices 0set regs 0set users [chanlist $chan]for { set total 0 } { $total &lt; [llength $users] } { incr total } {if {[isowner [lindex $users $total] $chan]} { incr owners } elseif  {[isadmin [lindex $users $total] $chan]} { incr admins } elseif {[isop [lindex $users $total] $chan]} { incr ops } elseif {[ishalfop [lindex $users $total] $chan]} { incr hops } elseif {[isvoice [lindex $users $total] $chan]} { incr voices }     if {![isowner [lindex $users $total] $chan] &amp;&amp; ![isadmin [lindex $users $total] $chan] &amp;&amp; ![isop [lindex $users $total] $chan] &amp;&amp; ![ishalfop [lindex $users $total] $chan] &amp;&amp;  ![isvoice [lindex $users $total] $chan]} { incr regs }}    puthelp "privmsg $chan :ChanStats for $chan is: ~ Total: $owners | &amp; Total: $admins | @ Total: $ops |  % Total: $hops | + Total: $voices |  regular Total: $regs  | Total Users: $total"      return 0}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Aug 13, 2024 3:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ORATEGOD]]></name></author>
		<updated>2024-08-12T20:58:16-04:00</updated>

		<published>2024-08-12T20:58:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112977#p112977</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112977#p112977"/>
		<title type="html"><![CDATA[Re: Automatic statistics]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112977#p112977"><![CDATA[
<blockquote class="uncited"><div>Not sure it exists, but quite easy to do.<br>I'm not sure to understand if the second line is live or statistical</div></blockquote>Hi <strong class="text-strong">CrazyCat</strong> .. thanks for replying =)<br><br>The first line... is <strong class="text-strong">statistics</strong>.<br>The second line... is <strong class="text-strong">live</strong>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12869">ORATEGOD</a> — Mon Aug 12, 2024 8:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2024-08-12T18:18:34-04:00</updated>

		<published>2024-08-12T18:18:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112976#p112976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112976#p112976"/>
		<title type="html"><![CDATA[Re: Automatic statistics]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112976#p112976"><![CDATA[
Not sure it exists, but quite easy to do.<br>I'm not sure to understand if the second line is live or statistical<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Aug 12, 2024 6:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ORATEGOD]]></name></author>
		<updated>2024-08-12T16:16:17-04:00</updated>

		<published>2024-08-12T16:16:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112975#p112975</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112975#p112975"/>
		<title type="html"><![CDATA[Automatic statistics]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112975#p112975"><![CDATA[
Hello friends!!<br><br>Is there any code that gives this type of statistics for a channel every X hours (example: every 2 hours)<br><br>Example:<br><div class="codebox"><p>Code: </p><pre><code>Stats #Channel: Join(s): 1234 | Part(s): 240 | Quit(s): 624 | Kick(s): 74 | Ban(s): 32 | Peak: 1589Stats #Channel: ~ Total: 2 | &amp; Total: 5 | @ Total: 3 | % Total: 2 | + Total: 45 | Total Users: 412</code></pre></div>I appreciate your great help in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12869">ORATEGOD</a> — Mon Aug 12, 2024 4:16 pm</p><hr />
]]></content>
	</entry>
	</feed>
