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

	<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-02T13:27:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-01-02T13:27:07-04:00</updated>

		<published>2006-01-02T13:27:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58959#p58959</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58959#p58959"/>
		<title type="html"><![CDATA[User Interaction example]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58959#p58959"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set idx [hand2idx goober]putdcc $idx "Username:"control $idx fooproc foo {idx text} {   if ![info exists ::response(username)] {      set ::response(username) $text      putdcc $idx "Authorization code:"   } {      set ::response(authcode) $text      return 1 ;# yield control to eggdrop   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Jan 02, 2006 1:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KrzychuG]]></name></author>
		<updated>2006-01-02T13:01:49-04:00</updated>

		<published>2006-01-02T13:01:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58958#p58958</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58958#p58958"/>
		<title type="html"><![CDATA[User Interaction example]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58958#p58958"><![CDATA[
Could you post some example?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3672">KrzychuG</a> — Mon Jan 02, 2006 1:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-01-02T12:54:49-04:00</updated>

		<published>2006-01-02T12:54:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58957#p58957</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58957#p58957"/>
		<title type="html"><![CDATA[User Interaction example]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58957#p58957"><![CDATA[
well, on the party line it's even easier since you have dedicated communication channel with that user which you access by its DCC sock index<br><br>of course, before proceeding with any interactive action, you need to seize control of that index by using [control], in order to be able to capture user's input<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Jan 02, 2006 12:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KrzychuG]]></name></author>
		<updated>2006-01-02T07:57:16-04:00</updated>

		<published>2006-01-02T07:57:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58950#p58950</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58950#p58950"/>
		<title type="html"><![CDATA[User Interaction example]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58950#p58950"><![CDATA[
I also have a question about some interaction with user but on party-line. How to force bot o leave party-line for some time and create a diffrent "channel" only with that one user.<br><br>For example:<br>user type a command, let it be ".register". Bot ask him directly "your username". User type what he want. Then bot ask him for "serial number", and again user type something. Then bot check if everything is OK, send proper reply and finish whole procedure.<br><br>I know that i can do it like this: ".register username serial" but i want some interaction ;)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3672">KrzychuG</a> — Mon Jan 02, 2006 7:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-01-01T22:57:03-04:00</updated>

		<published>2006-01-01T22:57:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58949#p58949</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58949#p58949"/>
		<title type="html"><![CDATA[User Interaction example]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58949#p58949"><![CDATA[
generally, you catch user's output via [bind pubm] on channel or [bind msgm] on private<br><br>if you need to track the response of a particular user on a particular question, you need to implement a mechanism for associating user's nick with his/her response; the obvious and natural way of doing that is using Tcl associative array:<br><div class="codebox"><p>Code: </p><pre><code>bind pubm - * getnamebind pub - !ask asknameproc askname {n u h c t} {   putserv "privmsg $c :$t, what's your name?"   set n [string tolower $t]   set ::name($n) asked}proc getname {n u h c t} {   set n [string tolower $n]   if [info exists ::name($n)] {      puthelp "privmsg $c :$n's name is $t"      unset ::name($n)   }}</code></pre></div>so, when you type <em class="text-italics">!ask goober</em>, the bot will output "goober, what's your name?", then upon first response from goober the bot will react with "goober's name is &lt;response&gt;"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun Jan 01, 2006 10:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[terryd]]></name></author>
		<updated>2006-01-01T13:11:30-04:00</updated>

		<published>2006-01-01T13:11:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58927#p58927</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58927#p58927"/>
		<title type="html"><![CDATA[User Interaction example]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58927#p58927"><![CDATA[
I have been looking for an example of catching user input.<br>For example it !test <br>what is your name<br>The user replies joe<br>How to catch that reply which i could then write to a file or what ever.<br>Just and example or a pointer would be most helpfull<br><br>Cheers Terry.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7157">terryd</a> — Sun Jan 01, 2006 1:11 pm</p><hr />
]]></content>
	</entry>
	</feed>
