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

	<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-01-30T20:02:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2021-01-30T20:02:42-04:00</updated>

		<published>2021-01-30T20:02:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109371#p109371</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109371#p109371"/>
		<title type="html"><![CDATA[Karma.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109371#p109371"><![CDATA[
Basically if -0. it will show -1 and not just keep 0 as the lowest number, so if - rhat will fall into the hated category and if above -0 it will be on the love side  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><br><br>All new nicks will start off with 0 neither + or -<br><br>Example<div class="codebox"><p>Code: </p><pre><code>!love nick will make it +1!hate nick will make it -1</code></pre></div>hope that makes sense <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>I am.not sure if incr will make a number below 0 a - ? i never tried that heh,  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Sat Jan 30, 2021 8:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-11-21T13:49:14-04:00</updated>

		<published>2020-11-21T13:49:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109202#p109202</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109202#p109202"/>
		<title type="html"><![CDATA[Karma.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109202#p109202"><![CDATA[
I don't understand your trouble:<div class="codebox"><p>Code: </p><pre><code>if {[$act eq "++"]} {   incr blah($var0)} elseif {[$act eq "--"] &amp;&amp; blah($var0)&gt;0} {   incr blah($var0) -1}putserv "PRIVMSG $chan :$var0 now has Reputation blah($var0)"</code></pre></div>do you want to display "-0" if someone try to decrease karma when it's already equal to 0?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat Nov 21, 2020 1:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-11-21T10:01:36-04:00</updated>

		<published>2020-11-21T10:01:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109201#p109201</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109201#p109201"/>
		<title type="html"><![CDATA[Karma.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109201#p109201"><![CDATA[
And actually seems i made a typo last night (tired last night)<br><br>The way it should work is<br><br>original start of per nick is 0, neither + or -<br><br>so<br><br>!nick++ <div class="codebox"><p>Code: </p><pre><code>Putserv "PRIVMSG $chan :$var0 now has Reputation +1"</code></pre></div>!nick--<div class="codebox"><p>Code: </p><pre><code>Putserv "PRIVMSG $chan :$var0 now has Reputation 0"</code></pre></div>!nick--<div class="codebox"><p>Code: </p><pre><code>Putserv "PRIVMSG $chan :$var0 now has Reputation -0"</code></pre></div>hope this clears it a bit <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Sat Nov 21, 2020 10:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-11-21T09:54:29-04:00</updated>

		<published>2020-11-21T09:54:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109200#p109200</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109200#p109200"/>
		<title type="html"><![CDATA[Karma.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109200#p109200"><![CDATA[
I made tests.<br><br>The <strong class="text-strong">bind pubm - "#% !%++"</strong> works well, but if you want to allow extra characters you need to add * at the end:<div class="codebox"><p>Code: </p><pre><code>.tcl proc karma {nick uhost handle chan text} { putlog "binded with $text"}.tcl bind pubm - "#% !%++" karma&lt;me&gt; !rasp++[14:49] triggering bind karma[14:49] binded with !rasp++&lt;me&gt; !rasp++ test(nothing)[14:49] triggering bind karma.tcl bind pubm - "#% !%++*" karma&lt;me&gt; !rasp++ test[14:53] triggering bind karma[14:53] binded with !rasp++ test</code></pre></div>Your proc must get the first item of $text and cut it:<br>1st char is the command symbol (!)<br>Last 2 chars are the modifier (++ or --)<br>Everyting else is the nick:<div class="codebox"><p>Code: </p><pre><code>set text [lindex $text 0]set cmd [string index $text 0]set mod [string range $text end-1 end]set unick [string range $text 1 end-2]</code></pre></div><div class="codebox"><p>Code: </p><pre><code>.tcl set text !rasp++[14:58] tcl: builtin dcc call: *dcc:tcl CrazyCat 12 set text !rasp++[14:58] tcl: evaluate (.tcl): set text !rasp++Tcl: !rasp++.tcl set cmd [string index $text 0][14:58] tcl: builtin dcc call: *dcc:tcl CrazyCat 12 set cmd [string index $text 0][14:58] tcl: evaluate (.tcl): set cmd [string index $text 0]Tcl: !.tcl set mod [string range $text end-1 end][14:58] tcl: builtin dcc call: *dcc:tcl CrazyCat 12 set mod [string range $text end-1 end][14:58] tcl: evaluate (.tcl): set mod [string range $text end-1 end]Tcl: ++.tcl set unick [string range $text 1 end-2][14:59] tcl: builtin dcc call: *dcc:tcl CrazyCat 12 set unick [string range $text 1 end-2][14:59] tcl: evaluate (.tcl): set unick [string range $text 1 end-2]Tcl: rasp</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat Nov 21, 2020 9:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-11-21T09:55:31-04:00</updated>

		<published>2020-11-21T09:45:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109199#p109199</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109199#p109199"/>
		<title type="html"><![CDATA[Karma.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109199#p109199"><![CDATA[
Ah hehe, i'll stick to "!nick++" and "!nick--"<br><br>And how would i check if  !nick++ or !nick-- was used?<br><br>Like to use "if" command to find which one was used?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"><br><br>Thanks in advanced  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br><br>EDIT,  another thing,  how can i check if blah($var0) is -1  or +1,  so if rhe current amount is +1   it will show on the putserv "output" either + or - with the value, Make sense?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Sat Nov 21, 2020 9:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-11-21T06:21:08-04:00</updated>

		<published>2020-11-21T06:21:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109198#p109198</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109198#p109198"/>
		<title type="html"><![CDATA[Karma.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109198#p109198"><![CDATA[
You'll have to bind pubm and not pub if you want to get the command.<br>With pub, the text contains everything following the command.<br><br>Try something like:<div class="codebox"><p>Code: </p><pre><code>bind pubm - "#% ${actcmd}%++" do:act:hehebind pubm - "#% ${actcmd}%--" do:act:hehe</code></pre></div>(not tested, I don't remember if - and + are in the % wildcard)<br><br>Nota: in your code, you say "!++nick" and "!--nick" and in your post you say "!nick++" and "!nick--"... Chose <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> — Sat Nov 21, 2020 6:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-11-21T01:48:53-04:00</updated>

		<published>2020-11-21T01:48:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109197#p109197</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109197#p109197"/>
		<title type="html"><![CDATA[Karma.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109197#p109197"><![CDATA[
So, "Trying" to get this script to work, would appreciate if someone can guide me the right direction<br><div class="codebox"><p>Code: </p><pre><code>####################################Karma 1.0 ComputerTech####################################Usage####################################!++nick 1   &lt;&lt; Increases nicks reputation to +1array set act {   ++   --}set actcmd "!"bind pub - "${actcmd}$act*" do:act:heheproc do:act:hehe {nick host hand chan text} {set var0 "[lindex [split $text] 0 ]"set blah($var0) 0 if {[$act eq "++"]} { ;incr blah($var0) +1 } else {incr blah($var0) -1putserv "PRIVMSG $chan :$var0 now has Reputation blah($var0)" }}</code></pre></div>it's meant to be a !karma script<br>like one from bitbot, so you do !nick++ to increase their reputation, and !nick-- to decrease their reputation, thanks in advanced  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Sat Nov 21, 2020 1:48 am</p><hr />
]]></content>
	</entry>
	</feed>
