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

	<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>2006-01-14T03:56:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[username]]></name></author>
		<updated>2006-01-14T03:56:47-04:00</updated>

		<published>2006-01-14T03:56:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59389#p59389</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59389#p59389"/>
		<title type="html"><![CDATA[RandomKick help.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59389#p59389"><![CDATA[
Thank you for your advice.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6813">username</a> — Sat Jan 14, 2006 3:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ehlanna]]></name></author>
		<updated>2006-01-13T20:20:22-04:00</updated>

		<published>2006-01-13T20:20:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59385#p59385</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59385#p59385"/>
		<title type="html"><![CDATA[RandomKick help.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59385#p59385"><![CDATA[
I am not even going to ask why you want to do this, but ... just some comments:<br><br>I would assign the chanlist nlist to a variable as it is possible (I am assuming) that as it has to be evaulated twice you could get a mismatch between the random number and the list of nicks.  You do not seem to be avoiding kicking the nick of the bot itself.<br><br>Depending on what you wish to have more of - memory or I/O overhead - either load up the test file of reasons just once and access it as a global or  (do as you are doing) read it each time.<br><br>Please bear in mind that tcl is not my long suit! - others may have better ideas to improve.<br><br>Oh, before I forget - do not forget to check the file exists (and is readable by the bot)!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6506">Ehlanna</a> — Fri Jan 13, 2006 8:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[username]]></name></author>
		<updated>2006-01-13T16:05:42-04:00</updated>

		<published>2006-01-13T16:05:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59383#p59383</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59383#p59383"/>
		<title type="html"><![CDATA[RandomKick help.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59383#p59383"><![CDATA[
Hi I need some modification help with my script. I want it to count kicks and remember last kicked person and put it to kick reason near phrase that it tooks from file. This is what I do myself:  <div class="codebox"><p>Code: </p><pre><code>set authors "username"set ver "1.0"set reasonfolder "scripts"bind pub - !рк pub:rkbind pub - !rk pub:rkproc pub:rk { nick uhost hand chan text } {global reasonfolderset victimuser [lindex [chanlist $chan] [rand [llength [chanlist $chan]]]]set random_reason [rk:load $reasonfolder/kickreason.txt]putkick $chan $victimuser [lindex $random_reason [rand [llength $random_reason]]]}putlog "$nick randomly kicked"putlog "RandomKick ver$ver by $authors loaded"proc rk:load {file} {set fd [open $file r]while {![eof $fd]} { gets $fd dline lappend var $dline }close $fdreturn $var}</code></pre></div>Thank you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6813">username</a> — Fri Jan 13, 2006 4:05 pm</p><hr />
]]></content>
	</entry>
	</feed>
