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

	<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>2003-05-27T08:12:02-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-05-27T08:12:02-04:00</updated>

		<published>2003-05-27T08:12:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20767#p20767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20767#p20767"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20767#p20767"><![CDATA[
OOPS - yup.<br><br>It isn't the buffer that needs emptying.<br><br>IRC works on a command termination using a newline. As such, \n needs to be sent<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue May 27, 2003 8:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-05-27T08:09:00-04:00</updated>

		<published>2003-05-27T08:09:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20766#p20766</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20766#p20766"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20766#p20766"><![CDATA[
Thanks, it took a while before I understood I needed a \015 at the end to empty the buffer, but now it works great. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Tue May 27, 2003 8:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-05-27T05:45:21-04:00</updated>

		<published>2003-05-27T05:45:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20763#p20763</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20763#p20763"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20763#p20763"><![CDATA[
For scripts, use the undocumented pudccraw command.<br><br>This uses the format<blockquote class="uncited"><div>putdccraw &lt;idx&gt; &lt;length&gt; &lt;data&gt;</div></blockquote>To send to the IRC server, sue a IDX of 0.<br><br>This command allows for embeded NULLs, so a length is required.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue May 27, 2003 5:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-05-26T18:41:54-04:00</updated>

		<published>2003-05-26T18:41:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20734#p20734</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20734#p20734"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20734#p20734"><![CDATA[
<blockquote class="uncited"><div>You could directly print out to the server, totaly bypassing the queues alltogether, but flooding the bot off.</div></blockquote>How? mine wont flood off because it's opered.<p>Statistics: Posted by Guest — Mon May 26, 2003 6:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Squirre1]]></name></author>
		<updated>2003-05-23T16:11:57-04:00</updated>

		<published>2003-05-23T16:11:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20578#p20578</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20578#p20578"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20578#p20578"><![CDATA[
This was the miracle line....<br><br>set args [lrange $choice 1 end] ; set choice [lindex $choice 0]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1603">Squirre1</a> — Fri May 23, 2003 4:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-05-23T14:56:57-04:00</updated>

		<published>2003-05-23T14:56:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20570#p20570</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20570#p20570"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20570#p20570"><![CDATA[
Here: proc waitchoice { idx choice args} {<br><br>The 'args' argument serves no purpose. Everything you type is passed as a single string and end up in 'choice', so in order to make this work the way you want to you better 'split' the string and use lindex to access the words or what ever suits you best.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri May 23, 2003 2:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Squirre1]]></name></author>
		<updated>2003-05-23T12:53:23-04:00</updated>

		<published>2003-05-23T12:53:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20567#p20567</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20567#p20567"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20567#p20567"><![CDATA[
well the ident-timeout is set to 2, but it is in relation with this script and this script was associated with this thread by a previous post.. This is jsut an expansion of that script...<br><blockquote class="uncited"><div>Procs triggered by a connection put under 'control' are called with two arguments, the first is the idx of the connection, the second is the entire line of user input, OR "" if the user disconnected.</div></blockquote>Ok then where is the script not working aka "me jacking it up" because if I put in "2 Username" and hit enter.. I get back "2 Username is not possible, try again"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1603">Squirre1</a> — Fri May 23, 2003 12:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-05-23T12:43:24-04:00</updated>

		<published>2003-05-23T12:43:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20565#p20565</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20565#p20565"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20565#p20565"><![CDATA[
<blockquote class="uncited"><div>Is there any way to speed up the above because that is like a 10-20 second pause and I would like the users to get the menu instantly after the dcc session is made..</div></blockquote>What's your current ident-timeout?<br><br>...posting in the wrong forum again, are we?<br>Procs triggered by a connection put under 'control' are called with two arguments, the first is the idx of the connection, the second is the entire line of user input, OR "" if the user disconnected.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri May 23, 2003 12:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Squirre1]]></name></author>
		<updated>2003-05-23T12:27:35-04:00</updated>

		<published>2003-05-23T12:27:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20564#p20564</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20564#p20564"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20564#p20564"><![CDATA[
How can this code be modified to accept a variable after the menu selection? Specifically number 2.. I want a user to be able to type in a variable after there selection so we can use that to query the database...<br><br>Currently when ever I try I get:<br>2 Squirre1 is not possible, try again<br><br>Also, I get this in my log:<br>[11:16] &lt;BotName&gt; [11:18] Telnet connection: connection.from.user.net/2032<br>[11:16] &lt;BotName&gt; [11:19] Timeout/EOF ident connection<br><br>Is there any way to speed up the above because that is like a 10-20 second pause and I would like the users to get the menu instantly after the dcc session is made..<br><br>TIA<br><div class="codebox"><p>Code: </p><pre><code>load d:/pathto/fbsql.dllset menuport 47000#---------------------------------------------------------------------# handle public !menu request: initialize DCC CHAT...#---------------------------------------------------------------------bind msg -|- !regmenu pubmenuproc pubmenu {nick uhost hand chan} {  global menuport  putlog "Request for menu by $nick (aka $hand)"  putserv "PRIVMSG $nick :\001DCC CHAT chat 11111111111 $menuport\001"  }listen $menuport script presentmenuproc presentmenu { idx } {   # upon a successfull connection:   # present the menu...   menuchoice $idx   # ... and control to waitchoice   control $idx waitchoice}proc menuchoice { idx } {   putdcc $idx ""   putdcc $idx "Type the option number you wish to select and hit ENTER:"   putdcc $idx "1. List Current Registrants"   putdcc $idx "2. List a Individual Status (Type "2 &lt;username&gt;")}#---------------------------------------------------------------------# proc waitchoice is triggered if the user types something...# the proc returns either 0 or 1# return 0: user input is sent to the procedure again# return 1: control is returned to the bot (will close connection)#---------------------------------------------------------------------proc waitchoice { idx choice args} {   global botnick server   switch -- $choice {      1 { reglist $idx }      2 { regstat $idx $args }      EXIT { return 1 }      exit { return 1 }      "" { return 1 ; # connection terminated by client }      default { putidx $idx "$choice is not possible, try again" }   }   # present the menu again...   menuchoice $idx   # ... and leave control here   return 0}proc reglist { idx } {  set text ""  set regcount 0  sql1 connect 192.168.1.1 username password  sql1 selectdb vbulletin  sql2 connect 192.168.1.1 username password  sql2 selectdb vbulletin  sql1 startquery "SELECT userid,field6,field7,field15,field21,field28 from userfield where field10='Registered' ORDER BY field15 DESC, field23 ASC" -array registrant  while {[sql1 fetchrow] != ""} {    sql2 startquery "SELECT username from user where userid='$registrant(userid)'" -array userinfo    sql2 fetchrow    if { $registrant(field15) == "3PAID"} {set paystat "3,0PAID"}    if { $registrant(field15) == "2PENDING"} {set paystat "8,0PENDING"}    if { $registrant(field15) == "1REJECT"} {set paystat "4,0Contact test@test.org"}    if { $registrant(field15) == ""} {set paystat "4,0Not Pre-Paid"}    incr regcount    putdcc $idx "$regcount. 1,0$registrant(field6) $registrant(field7) - Nick: 12,0$userinfo(username) 1,0- PayStatus: $paystat\r\n"    sql2 endquery  }  sql2 disconnect  sql1 endquery  sql1 disconnect}proc regstat { idx args } {  set text ""  set attendee [lindex $args 0]  sql1 connect 192.168.1.1 username password  sql1 selectdb vbulletin  sql2 connect 192.168.1.1 username password  sql2 selectdb vbulletin  sql1 startquery "SELECT userid from user where username='$attendee'" -array registrant  while {[sql1 fetchrow] != ""} {    sql2 startquery "SELECT field6,field7,field15,field21,field28 from user where userid='$registrant(userid)'" -array userinfo    sql2 fetchrow    if { $userinfo(field15) == "3PAID"} {set paystat "3,0PAID"}    if { $userinfo(field15) == "2PENDING"} {set paystat "8,0PENDING"}    if { $userinfo(field15) == "1REJECT"} {set paystat "4,0Contact test@test.org"}    if { $userinfo(field15) == ""} {set paystat "4,0Not Pre-Paid"}    putdcc $idx "1,0$userinfo(field6) $userinfo(field7) - Nick: 12,0$attendee 1,0- PayStatus: $paystat\r\n"    sql2 endquery  }  sql2 disconnect  sql1 endquery  sql1 disconnect}putlog "Menu version 0 loaded: DCC connections on port $menuport."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1603">Squirre1</a> — Fri May 23, 2003 12:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2002-09-20T13:00:13-04:00</updated>

		<published>2002-09-20T13:00:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11189#p11189</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11189#p11189"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11189#p11189"><![CDATA[
<blockquote class="uncited"><div>This proposal of opening a dcc connection sounds interresting. <br><br>stdragon: You can find an example of the data in my module in the thread "Speedup of printout". <br><br>stdragon, egghead: I would be very greatfull if it would be possible for You to help me with just and example of how to establish a dcc connection with the client. Please post it in the thread "Speedup of printout", since thats the most appropriate one for this matter. <br><br>// M0dj0<br></div></blockquote>An example TCL script can be found at <a href="http://members.fortunecity.com/eggheadtcl/menu.tcl.txt" class="postlink">http://members.fortunecity.com/eggheadtcl/menu.tcl.txt</a><br><br>The important part send by the bot to the client is:<br><div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $nick :\001DCC CHAT chat [myip] $menuport\001" </code></pre></div>That statement contains the IP in long number format and the port the client should connect to. The client then may connect to the specified port on the specified ip.<br>As soon as that connection is established, you then can dump out the information and immediately close the connection.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Fri Sep 20, 2002 1:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-18T05:16:29-04:00</updated>

		<published>2002-09-18T05:16:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11054#p11054</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11054#p11054"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11054#p11054"><![CDATA[
It's not the IRC servers doing this, it is eggdrop.<br><br>However, it is doing it to prvent the IRC server killing it's connection for flooding.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Sep 18, 2002 5:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-18T05:05:22-04:00</updated>

		<published>2002-09-18T05:05:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11049#p11049</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11049#p11049"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11049#p11049"><![CDATA[
Ok, I guessed it might have something todo with the IRC servers ... thanx for the information.<br><br>I think I'll stick to the "nice" method for now, it is slow but if there is a nice soloution of the other problem I described in the thread about "parallellism" it should work and the risk of flooding off the bot is kept low.<br><br>// M0dj0<p>Statistics: Posted by Guest — Wed Sep 18, 2002 5:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-18T04:54:09-04:00</updated>

		<published>2002-09-18T04:54:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11047#p11047</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11047#p11047"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11047#p11047"><![CDATA[
Yes and no.<br><br>You could directly print out to the server, totaly bypassing the queues alltogether, but flooding the bot off.<br><br>The reason for the change in soeed of messages, is due to penalty calculation.<br><br>Some IRC servers use this, to detect the differance between a flood and a lot of text.<br><br>In eggdrop, it makes sure that the server knows the differance, by using slow output. At the same time, it presents a nice feature, where other servers flood protection, is usualy prevented from triggering.<br><br>Each message sent to the server, has a penalty value.<br><br>When the server queues start sending messages, they increase the panalty value, by the amount that command would present. Once a second, the value is decreased by 1.<br><br>Thus, when eggdrop reaches a certain penalty limit, it will slow down it's output. Once the secondly deduction reaches a lower value, it will start sending faster again.<br><br>These limits are there to protect you.<br><br>As noted above, you can bypass the server queues and go directly to the server. Using a secondly timer, and your own small queue system, you can use this method to output a message every second.<br><br>This is highly prone to flooding.<br><br>To see the method used to print directly tot he server, see the function, dedicated to the putdccraw command (I think thats the name).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Sep 18, 2002 4:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-18T04:02:20-04:00</updated>

		<published>2002-09-18T04:02:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11045#p11045</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11045#p11045"/>
		<title type="html"><![CDATA[Speedup of printout]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11045#p11045"><![CDATA[
I have done a C module that gathers and holds information about the top 10 clans of a ranking ladder at <a href="http://www.clanbase.com" class="postlink">www.clanbase.com</a>.<br><br>When a user types a trigger, e.g. !cbtop10, in the bot channel the user gets a print out that looks like this. Through PRIVMSG ...<br><br>[09:52:44] &lt;SFL|Intel&gt; Here are the top10 ranked clans in ladder CounterStrike 5vs5 [SWE] @ <a href="http://www.clanbase.com" class="postlink">www.clanbase.com</a> .<br>[09:52:45] &lt;SFL|Intel&gt; [ Rank ][ Rating ][               Name               ][ Win ][ Loss ][ Draw ][        Comments         ]<br>[09:52:46] &lt;SFL|Intel&gt; [   1  ][  1907  ][           Clan matrix            ][  45 ][    3 ][    0 ][                         ]<br>[09:52:48] &lt;SFL|Intel&gt; [   2  ][  1674  ][          Gamepoint.swe           ][  35 ][    5 ][    2 ][                         ]<br>[09:52:50] &lt;SFL|Intel&gt; [   3  ][  1666  ][             A-Laget              ][  70 ][   19 ][    3 ][                         ]<br>[09:52:52] &lt;SFL|Intel&gt; [   4  ][  1658  ][           clan [znitz]           ][  43 ][   11 ][    0 ][                         ]<br>[09:52:54] &lt;SFL|Intel&gt; [   5  ][  1591  ][            CosaNostra            ][  30 ][    8 ][    0 ][                         ]<br>[09:52:56] &lt;SFL|Intel&gt; [   6  ][  1530  ][              Pallar              ][  50 ][   30 ][    4 ][                         ]<br>[09:52:58] &lt;SFL|Intel&gt; [   7  ][  1508  ][          Feared Gamers           ][  26 ][   12 ][    2 ][                         ]<br>[09:53:00] &lt;SFL|Intel&gt; [   8  ][  1493  ][             HiGhland             ][  28 ][    8 ][    1 ][                         ]<br>[09:53:02] &lt;SFL|Intel&gt; [   9  ][  1485  ][            de saliga             ][  19 ][    0 ][    0 ][                         ]<br>[09:53:04] &lt;SFL|Intel&gt; [  10  ][  1482  ][               SUMO               ][  12 ][    5 ][    1 ][                         ]<br>[09:53:06] &lt;SFL|Intel&gt; For the complete ladder goto : <a href="http://www.clanbase.com/rating.php?lid=220" class="postlink">http://www.clanbase.com/rating.php?lid=220</a> .<br><br>In the example the swedish Counter-Strike ladder 5vs5 is used.<br><br>In the code I send the PRIVMSG's to DP_SERVER at the moment, and as you can se from the example the print out is fairly fast in the beginning, but decreasing to one message every two seconds. If I instead send the PRIVMSG's to DP_HELP as described in the MODULES doc, the time between two PRIVMSG's is 2 seconds. <br><br>Now, is there any way to speed up the print out ?<br><br>// M0dj0<p>Statistics: Posted by Guest — Wed Sep 18, 2002 4:02 am</p><hr />
]]></content>
	</entry>
	</feed>
