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

	<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>2002-10-03T22:40:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[spyda]]></name></author>
		<updated>2002-10-03T22:40:39-04:00</updated>

		<published>2002-10-03T22:40:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11694#p11694</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11694#p11694"/>
		<title type="html"><![CDATA[Thanx guys!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11694#p11694"><![CDATA[
Worked with idx2hand and hand2idx for a while and worked out a nice little tcl. Still a little confused about strings and lists, but i think i will get there soon!<br><br>I have come to another problem with using files. I know how to read a file and write to a file. But i am not sure on how to make my script right to a file in a certen line.<br><br>eg (a info file on a $nick)<ul><li>ThePope <br>Adam<br><a href="mailto:asustek@optusnet.com.au">asustek@optusnet.com.au</a><br>Australia ,Melbourne<br>etc etc</li></ul>Now i have worked out how to right that to a file and how to read the lines. What i am after doing is making a tcl in dcc CHAT to pull a single line and check it, if changed then change it in the file in the same place.<br><br>Just say i wanted to change  Australia, Melbourne to USA, New York. This is the coding that i have so far.. but from there i have NO IDEA.. i have tested some ways.. but got no where.<br><div class="codebox"><p>Code: </p><pre><code>proc asus_menu_catch {idx asus_dcc} { global asus botnick  if {[string tolower [lindex $asus_dcc 0]] == $asus(dcctrig)help} {  putdcc $idx "$asus(logo) Asustek Services v$asus(version) $asus(logo)"  putdcc $idx "-------------------------------------"  putdcc $idx "\002 Help Main \002"  putdcc $idx "$asus(non)"  putdcc $idx " All help files are listed in directors below"  putdcc $idx " Format: \002.help &lt;topic&gt;\002"  } if {[string tolower [lindex $asus_dcc 0]] == $asus(dcctrig)set} {  if {[string tolower [lindex $asus_dcc 1]] == "info"} {   set asus_info_who [string tolower [lindex asus_dcc 3]]   if {$asus_info_who == ""} {    putdcc $idx "$asus(logo) Syntax: No nick entered for infomation.    }    set asus_file_info [open $asus(setupfile)/$asus_info_who.db r]    gets $asus_file_info asus_ircnick    gets $asus_file_info asus_name    close $asus_file_info      if {[string tolower [lindex $asus_dcc 2]] == "name"} {</code></pre></div>I can do it with alot of coding for the first 3 lines, but after that what if the file has 100 info lines. <br><br>Thanx in Advance<br>------------<br>ThePope<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1731">spyda</a> — Thu Oct 03, 2002 10:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-03T15:58:46-04:00</updated>

		<published>2002-10-03T15:58:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11677#p11677</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11677#p11677"/>
		<title type="html"><![CDATA[DCC chat window]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11677#p11677"><![CDATA[
Strings are simple to understand.<br><br>They are any line of text, numbers or code. Even lists are strings (though strings are not lists).<br><br>It's lists that confuse people.<br><br>They are, in a way, a array of strings.<br><br>They can be converted to and from each other, using lindex (on lists), split (on strings) and join (on lists). There is lrange as well, but this does different things (on lists) depending on the arguments.<br><br>Eggdrop uses strings, on items where only one thing is returned every time.<br><br>IE, in binds, the arguments are passed as strings.<br><br>For items that return multiple items, lists are used.<br><br>IE [channels] returns a list of the channels eggdrop is on<br>[chanlist] returns each nickname in a certain channel, in a list.<br><br>If there is any specific area of lists, that you don't understand, ask about it. Mosts tutorials on the internet are static, and use a language, that is broad, that tries to convey itself to all audiences. Whereas we, can give the personal touch, and give proper examples (to proper questions).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Oct 03, 2002 3:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darko``]]></name></author>
		<updated>2002-10-03T14:54:47-04:00</updated>

		<published>2002-10-03T14:54:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11669#p11669</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11669#p11669"/>
		<title type="html"><![CDATA[DCC chat window]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11669#p11669"><![CDATA[
Sure! But... What would you like to know about strings?<br>Also, check doc/tcl-commands.doc for 2 commands: hand2idx and idx2hand. You might find them usefull.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1881">darko``</a> — Thu Oct 03, 2002 2:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spyda]]></name></author>
		<updated>2002-10-02T07:04:58-04:00</updated>

		<published>2002-10-02T07:04:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11608#p11608</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11608#p11608"/>
		<title type="html"><![CDATA[:(]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11608#p11608"><![CDATA[
And that was the reason the script was not working. BUT it took me about 2 hours to find and then about 1 min after that I cheaked the forum. <br>Now that will teach me!<br><br>Still got bugs with script but I have worked it out. but working with strings I am still now getting! and I have read all the help files I can get my hands on. If anyone can help me out with anymore infomation for working with strings, it will be good.....  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>Thanx all<br>------------<br>ThePope<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1731">spyda</a> — Wed Oct 02, 2002 7:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-10-02T05:34:34-04:00</updated>

		<published>2002-10-02T05:34:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11604#p11604</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11604#p11604"/>
		<title type="html"><![CDATA[DCC chat window]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11604#p11604"><![CDATA[
That's a good start ThePope, just a few tcl errors in what you have. Check the syntax for "else". You probalby need "global" for asus_open.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Oct 02, 2002 5:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spyda]]></name></author>
		<updated>2002-10-02T04:04:38-04:00</updated>

		<published>2002-10-02T04:04:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11601#p11601</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11601#p11601"/>
		<title type="html"><![CDATA[Idea!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11601#p11601"><![CDATA[
Ok.. Just been thinking about what you guys have said about the dcc window. Now I have looked over the TCL files I have and come down to working like this.<br><br>So this the proc that takes care of it!<br><div class="codebox"><p>Code: </p><pre><code>proc asus_window {who what} { if {$asus_open} {  putlog "$what"  putdcc $who "$what"  } else {!$asus_open} {  putlog "$what" }}</code></pre></div>Now for the window opening I have the coding!<br><div class="codebox"><p>Code: </p><pre><code>bind MSG - $asus(cmd) asus_pub_menuproc asus_pub_menu {nick uhost hand vasus} { global asus set asus_pass [lindex $vasus 0] set asus_noth [string tolower [split lrange $vasus] 1 end]  if {![passwdok $nick $asus_pass]} {  return 0  } if {![file exists $asus(setupfile)/setup.db]} {  set asus_file [open $asus(setupfile)/setup.db w]  puts $asus_file "0"  close $asus_file } set asus_open 1 putserv "PRIVMSG $nick :\001DCC CHAT chat [myip] $asus(port)\001"  }</code></pre></div>So when the code sets asus_open 1 then the other proc will pick up the window is open.. Now all I have to do is change all my putlog commands to asus_window $idx ""<br><br>Now will that work and will it work safely so no one can see it is there!!<br><br>Thanx in Advance<br>------------<br>ThePope<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1731">spyda</a> — Wed Oct 02, 2002 4:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-01T05:15:50-04:00</updated>

		<published>2002-10-01T05:15:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11561#p11561</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11561#p11561"/>
		<title type="html"><![CDATA[DCC chat window]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11561#p11561"><![CDATA[
The bot doesn't know who it is talking too.<br><br>If you are using your own style DCC interface, then you are the one doing the authentication.<br><br>Too eggdrop, the incoming connection is a host and port, nothing more. It doesn't get information like irc nicknames because it feels like.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Oct 01, 2002 5:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-10-01T05:10:43-04:00</updated>

		<published>2002-10-01T05:10:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11560#p11560</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11560#p11560"/>
		<title type="html"><![CDATA[DCC chat window]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11560#p11560"><![CDATA[
1. To change putlog to do other stuff, look up the 'rename' command. You can rename the current putlog as old_putlog, then write your own putlog command to do other stuff, and then call old_putlog to do the old stuff.<br><br>2. The bot does not know WHO it is talking to. You said you created the chat with your own script (I think). Therefore it is up to your script to keep track of who it is talking to.<br><br>3. To make a relay go to that window, use putdcc 12 "blah blah blah"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Oct 01, 2002 5:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spyda]]></name></author>
		<updated>2002-10-01T05:00:07-04:00</updated>

		<published>2002-10-01T05:00:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11557#p11557</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11557#p11557"/>
		<title type="html"><![CDATA[Sorry]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11557#p11557"><![CDATA[
Didn't think I explaned it right..<br><br>Ok what I am trying to do is relay putlog commands or make up a tcl that will change putlog to do other stuff or make a tcl for a whole new command (that looks the best).<br><br>To make the eggdrop msg DCC partyroom and a DCC chat window. but my problem is how does the bot know what the window is. I put <strong class="text-strong">putlog "/(idx/) $idx"</strong> in the script and it said this:<br><blockquote class="uncited"><div>(6:57pm) &lt;Asustek&gt; (idx) 12<br>(6:57pm) &lt;Asustek&gt; Dcc chat connection to 12 was completed</div></blockquote>So how does the bot know WHO it is talking to if it is a number and how can I use that in a script to make a relay goto that window.<br><br>Sorry about the misslead in my infomation, Hope that helps you with my problem!<br><br>------------<br>ThePope<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1731">spyda</a> — Tue Oct 01, 2002 5:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-10-01T04:41:57-04:00</updated>

		<published>2002-10-01T04:41:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11556#p11556</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11556#p11556"/>
		<title type="html"><![CDATA[DCC chat window]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11556#p11556"><![CDATA[
Erm, I didn't totally understand what you meant, but...<br><br>if {$window_is_open} {<br>  putdcc $window_idx blah<br>} else {<br>  putlog blah<br>}<br><br>All you have to do is keep track of when the window is open.<br><br>Lol ok, I looked at what you said again and I just have no idea what you mean. What is "relay" and what "chan" are you talking about and what does putlog have to do with it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Oct 01, 2002 4:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spyda]]></name></author>
		<updated>2002-10-01T03:10:31-04:00</updated>

		<published>2002-10-01T03:10:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11554#p11554</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11554#p11554"/>
		<title type="html"><![CDATA[DCC chat window]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11554#p11554"><![CDATA[
Hey peoples...<br><br>I am writing a command window.. Little like /dcc chat $botnick. But this goes to port that I have set and a TCL runs in the dcc chat.. (bit like a fserver) <br><br>Now what I was wanting to know if there is a possable way to make relay goto the chan.. like pulog, but I am wanting them to goto that window when it is open and to normal putlog when the window is not open. If not just to the window!<br><br>Hope someone can help me with this, if anymore info is needed to help plz ask!<br><br>Thanx in Advance<br>------------<br>ThePope<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1731">spyda</a> — Tue Oct 01, 2002 3:10 am</p><hr />
]]></content>
	</entry>
	</feed>
