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

	<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>2021-02-12T13:35:11-04:00</updated>

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

		<entry>
		<author><name><![CDATA[geek]]></name></author>
		<updated>2021-02-12T13:35:11-04:00</updated>

		<published>2021-02-12T13:35:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109410#p109410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109410#p109410"/>
		<title type="html"><![CDATA[how does this tcl work?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109410#p109410"><![CDATA[
<blockquote class="uncited"><div>The goal seems to be to make the karma going to 0 when it has not been modified for a time. Lesser (positive or negative) is your karma and slower it will decrease (tend to 0)</div></blockquote>now I understand<br><br>thanks man!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10286">geek</a> — Fri Feb 12, 2021 1:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-02-12T08:17:53-04:00</updated>

		<published>2021-02-12T08:17:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109409#p109409</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109409#p109409"/>
		<title type="html"><![CDATA[how does this tcl work?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109409#p109409"><![CDATA[
They are used to increase or decrease the karma based on the time it has been set.<br><br>Here is the code with my comments:<div class="codebox"><p>Code: </p><pre><code># $kutime is the actual timestamp# the modification time (modtime) will be set to $kutime when a record is updatedset kutime [clock seconds]# $xtime is 90 days beforeset xtime [expr $kutime - (90 * 86400)]# delete all karmas which are locked and with a small value (between -1 and 1) and older than 90 dayskdb eval {DELETE FROM lkarma WHERE modtime &lt; $xtime AND karma between -1 and 1 and locked='N'}# decrease the value of positives karma and increase the value of negative karma# if they are between 2 and 22 (positive or negative) and older than 90 dayskdb eval {UPDATE lkarma SET karma=karma-1, modtime=$kutime WHERE modtime &lt; $xtime AND karma between 2 and 22 AND locked='N'}kdb eval {UPDATE lkarma SET karma=karma+1, modtime=$kutime WHERE modtime &lt; $xtime AND karma between -22 and -2 AND locked='N'}# $ytime is 30 days beforeset ytime [expr $kutime - (30 * 86400)]# decrease the value of positives karma and increase the value of negative karma# if they are between 23 and 54 (positive or negative) and older than 30 dayskdb eval {UPDATE lkarma SET karma=karma-1, modtime=$kutime WHERE modtime &lt; $ytime AND karma between 23 and 54 AND locked='N'}kdb eval {UPDATE lkarma SET karma=karma+1, modtime=$kutime WHERE modtime &lt; $ytime AND karma between -54 and -23 AND locked='N'}#... and doing the same with diffrent delays and karma values## older than 7days and between 55 and 80## older than 2 days and between 81 and 120## older than 1 day and between 121 and 540## older than 8 hours (1 day / 3) and between 541 and 959## older than 4h48 (1 day / 5) and higher than 960</code></pre></div>The goal seems to be to make the karma going to 0 when it has not been modified for a time. Lesser (positive or negative) is your karma and slower it will decrease (tend to 0)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Fri Feb 12, 2021 8:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[geek]]></name></author>
		<updated>2021-02-11T04:48:00-04:00</updated>

		<published>2021-02-11T04:48:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109406#p109406</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109406#p109406"/>
		<title type="html"><![CDATA[how does this tcl work?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109406#p109406"><![CDATA[
I try this tcl:<br><a href="https://github.com/starlilyth/IRC-Eggdrop-TCL/blob/master/lilykarma4.4.tcl" class="postlink">https://github.com/starlilyth/IRC-Eggdr ... rma4.4.tcl</a><br><br>It works good<br><br>but I looking at the code and I don't understand what is the needed of modtime column in the db and the use of xtime, ytime, yytime, etc in proc karmaupdate<br><br><br>what are they for?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10286">geek</a> — Thu Feb 11, 2021 4:48 am</p><hr />
]]></content>
	</entry>
	</feed>
