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

	<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-03-16T18:51:26-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2021-03-16T18:43:30-04:00</updated>

		<published>2021-03-16T18:43:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109565#p109565</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109565#p109565"/>
		<title type="html"><![CDATA[CT-VoteKick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109565#p109565"><![CDATA[
CrazyCat, thats how the VoteKick script works, only the first votant can choose the target, but i do see i need to add a way to restrict One vote per $host per Vote  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><br><br>Ok so i "think" the above code edit should work, will see in 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> — Tue Mar 16, 2021 6:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-03-16T18:39:34-04:00</updated>

		<published>2021-03-16T18:39:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109564#p109564</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109564#p109564"/>
		<title type="html"><![CDATA[CT-VoteKick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109564#p109564"><![CDATA[
Quickly read, it's late...<br><br>But you seems to always have your target trouble: the first votant choose a target, others must choose a target too but only the first target is the victim.<br><br>This is not a vote.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Mar 16, 2021 6:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2021-03-16T18:51:26-04:00</updated>

		<published>2021-03-16T14:12:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109560#p109560</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109560#p109560"/>
		<title type="html"><![CDATA[CT-VoteKick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109560#p109560"><![CDATA[
Still working, but i hope this is better   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> <div class="codebox"><p>Code: </p><pre><code>######################### CT-Votekick  0.2######################### ComputerTech# 16/03/21######################### Set flags of script usageset ctvk(flag) "ofmn"# Set triggerset ctvk(trig) "!votekick"# Set X time (in seconds) before Vote times outset ctvk(time) "180"# Set Votes needed to kick targetset ctvk(max) "3"# Set Kick reasonset ctvk(reason) "VoteKick!"########################bind pub $ctvk(flag) $ctvk(trig) main:procproc main:proc {nick host hand chan text} {global ctvkif {!$ctvk(on) } { if {[lindex [split $text] 0] == ""} {    puthelp "PRIVMSG $chan :\0034Error\003 Syntax: $ctvk(trig) nick"    return  }} if {![info exists ctvk(on)]} {set ctvk(on) "1"} elseif {![info exists ctvk(target)]} { set ctvk(target) [lindex [split $text] 0]} elseif {![info exists ctvk(left)]} {  set ctvk(left) $ctvk(max)} elseif {![onchan $ctvk(target) $chan]} {return} if {$ctvk(on)} {     puthelp "PRIVMSG $chan :\0034Error\003 A Vote is currently happening, please wait"      return }if {!$ctvk} { if {$ctvk(on) &gt; 1} {  incr ctvk(left) -1  if {$ctvk(on) == 1} {  puthelp "PRIVMSG $chan :\0039Vote Started\003 \007Target:\0032 $ctvk(target) \003 \0038$ctvk(left) Votes needed\003"set ctvk($host) 1 utimer $ctvk(time) [list reset:vote $chan $text]  set ctvk(on) 2 } else {  puthelp "PRIVMSG $chan :Another Vote to Kick $ctvk(target) / $ctvk(left) More Votes Needed!"set ctvk($host) 1  }}} else {putserv "PRIVMSG $chan :$nick has already voted"return} if {$ctvk(left) &lt; 1} {    putquick "KICK $chan $ctvk(target) :$ctvk(reason)"    unset ctvk(left)    unset ctvk(target)    unset ctvk(on)    unset ctvk($host)  }}proc reset:vote {host chan text} {unset ctvk(left)unset ctvk(target)unset ctvk(on)unset ctvk($host)puthelp "PRIVMSG $chan :Vote Timed Out"}</code></pre></div>Will test when i get home<br><br>EDIT <br><br>I "Think" this will restrict only one vote per user by $host   will need to test after dinner <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Tue Mar 16, 2021 2:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-03-16T10:10:15-04:00</updated>

		<published>2021-03-16T10:10:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109558#p109558</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109558#p109558"/>
		<title type="html"><![CDATA[Re: CT-VoteKick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109558#p109558"><![CDATA[
<blockquote class="uncited"><div>What is  $ctvk(on)   ?</div></blockquote>I missed this one <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 Mar 16, 2021 10:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2021-03-16T10:08:16-04:00</updated>

		<published>2021-03-16T10:08:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109557#p109557</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109557#p109557"/>
		<title type="html"><![CDATA[Re: CT-VoteKick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109557#p109557"><![CDATA[
What is  $ctvk(on)   ?<br><br>I have not tried to run this script.   But a text search of this page finds it only once.   So that means it is never set.   <br>Are you not getting an error in the partyline ?<br><br><br>Also (again, I haven't run it) , I curious about something.<br>Suppose enough votes come in quickly to kick a nick.<br>Then:<br>unset ctvk(left)<br>unset ctvk(target) <br><br>Now what happens when the utimer triggers?<br>The proc it calls also tries to unset (see the typo in that proc, already mentioned earlier by CrazyCat) those same variables.<br>Are you not getting errors in the partyline, because those variables no longer exist?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Mar 16, 2021 10:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-03-16T03:27:38-04:00</updated>

		<published>2021-03-16T03:27:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109553#p109553</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109553#p109553"/>
		<title type="html"><![CDATA[CT-VoteKick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109553#p109553"><![CDATA[
I see different small things...<br><br>- What is ctvk(more) ? You increment it, you display it, but it's never defined<br><br>- You never check if target is on the chan ?<br><br>- You use ctvk(left) but you initialize it after ?<br><br>- what happen if I do !votekick foo, !votekick foo, !votekick ComputerTech ? Three votes, but you are kicked, you don't distribute voices to the victim. The third vote is the only one which is important.<br><br>- Syntax error @ unset ctvk(ctvk(target) &lt;-- a closing parenthesis lacking or redundant ctvk(<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Mar 16, 2021 3:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2021-03-15T20:00:19-04:00</updated>

		<published>2021-03-15T20:00:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109550#p109550</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109550#p109550"/>
		<title type="html"><![CDATA[CT-VoteKick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109550#p109550"><![CDATA[
Just wanted to make a fun script, so i made a VoteKick script.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> <br><br>Still in Beta<div class="codebox"><p>Code: </p><pre><code>######################### CT-Votekick  0.1######################### ComputerTech# 16/03/21######################### Set flags of script usageset ctvk(flag) "ofmn"# Set trigger set ctvk(trig) "!votekick"# Set X time (in seconds) before Vote times outset ctvk(time) "180"# Set Votes needed to kick targetset ctvk(max) "3"# Set Kick reasonset ctvk(reason) "VoteKick!"bind pub $ctvk(flag) $ctvk(trig) main:procproc main:proc {nick host hand chan text} {global ctvk if {[lindex [split $text] 0] == ""} {    puthelp "PRIVMSG $chan :\0034Error\003 Syntax: $ctvk(trig) nick"    return} if {$ctvk(on)} {  puthelp "PRIVMSG $chan :\0034Error\003 A Vote is currently happening, please wait"   return } if {$ctvk(left) &lt; $ctvk(max)} {  incr ctvk(more) -1  incr ctvk(left) 1  puthelp "PRIVMSG $chan :Another Vote to Kick $ctvk(target) / $ctvk(more) More Votes Needed!" } else {  puthelp "PRIVMSG $chan :\0039Vote Started\003 \007Target:\0032 $ctvk(target) \003 \0038$ctvk(more) Votes needed\003" utimer $ctvk(time) [list reset:vote $text] if {![info exists ctvk(left)] &amp;&amp; [info exists ctvk(target)]} {  set ctvk(target) [lindex [split $text] 0]  set ctvk(left) $ctvk(max)    }  } if {$ctvk(left) &gt; $ctvk(max)} { putquick "KICK $chan $ctvk(target) :$ctvk(reason)" unset ctvk(left)  unset ctvk(target) }}proc reset:vote {text} {unset ctvk(left) unset ctvk(ctvk(target) puthelp "PRIVMSG $chan :Vote Timed Out"}</code></pre></div>Suggestions are welcome  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Mon Mar 15, 2021 8:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
