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

	<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>2005-12-29T11:40:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[brood]]></name></author>
		<updated>2005-12-29T11:40:25-04:00</updated>

		<published>2005-12-29T11:40:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58778#p58778</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58778#p58778"/>
		<title type="html"><![CDATA[add command to dreamer invite script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58778#p58778"><![CDATA[
<blockquote class="uncited"><div>Sir_Fz wrote: <br>"Doesn't work" doesn't help you, you probably got an error and didn't bother to post it here. <br>Code: <br>proc del_1 [nick uhost hand args } { <br><br>should be <br>Code: <br>proc del_1 {nick uhost hand args } { <br><br>for starters. </div></blockquote>I notice that type error when I tried it.<br><br>the error i get is:<br><blockquote class="uncited"><div>Tcl error [del-1] : cant read "db": no such variable</div></blockquote>I found the mistake:<br><div class="codebox"><p>Code: </p><pre><code>   global chan_1db </code></pre></div>should be<div class="codebox"><p>Code: </p><pre><code>   global chan_1 db</code></pre></div>Now it response to: /msg &lt;botnick&gt; @del &lt;nick&gt; &lt;pass&gt;<br><br>But if try a nick and pass thats in the db it will only say:<br> <blockquote class="uncited"><div>*botnick* The username was not found in the Database</div></blockquote>So it is not finding the nicks that are in the db.<br><br>I checked the db and the nicks are still there.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6675">brood</a> — Thu Dec 29, 2005 11:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-12-28T23:17:22-04:00</updated>

		<published>2005-12-28T23:17:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58766#p58766</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58766#p58766"/>
		<title type="html"><![CDATA[add command to dreamer invite script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58766#p58766"><![CDATA[
You can read the file into a list, delete the line from the list and write the new list to the file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Dec 28, 2005 11:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IRCNick]]></name></author>
		<updated>2005-12-28T19:28:36-04:00</updated>

		<published>2005-12-28T19:28:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58763#p58763</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58763#p58763"/>
		<title type="html"><![CDATA[add command to dreamer invite script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58763#p58763"><![CDATA[
<blockquote class="uncited"><div>"Doesn't work" doesn't help you, you probably got an error and didn't bother to post it here.<div class="codebox"><p>Code: </p><pre><code>proc del_1 [nick uhost hand args } {</code></pre></div>should be<div class="codebox"><p>Code: </p><pre><code>proc del_1 {nick uhost hand args } {</code></pre></div>for starters.</div></blockquote>Thank you, this was actually a type error... <br>But I think this isn't the problem. I wasn't very sure, what I have to do if I want to erase a line in some text file. I tried to search tcl.tk but I found nothing and I just writed:<div class="codebox"><p>Code: </p><pre><code>delete $deluser</code></pre></div>but I think, that this insn't the right syntax,  it could be better if I add just <strong class="text-strong">-</strong>. instead of erasing the whole line. Hmm how I said I'm not very sure for the syntax.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6849">IRCNick</a> — Wed Dec 28, 2005 7:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-12-28T19:01:51-04:00</updated>

		<published>2005-12-28T19:01:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58761#p58761</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58761#p58761"/>
		<title type="html"><![CDATA[add command to dreamer invite script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58761#p58761"><![CDATA[
<blockquote class="uncited"><div>sorry, it doesnt seem to work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>but thanks for the response[/code]</div></blockquote><div class="codebox"><p>Code: </p><pre><code>.set errorInfo</code></pre></div>... then paste result into your post. <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=3646">Alchera</a> — Wed Dec 28, 2005 7:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-12-28T18:59:01-04:00</updated>

		<published>2005-12-28T18:59:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58760#p58760</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58760#p58760"/>
		<title type="html"><![CDATA[add command to dreamer invite script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58760#p58760"><![CDATA[
"Doesn't work" doesn't help you, you probably got an error and didn't bother to post it here.<div class="codebox"><p>Code: </p><pre><code>proc del_1 [nick uhost hand args } {</code></pre></div>should be<div class="codebox"><p>Code: </p><pre><code>proc del_1 {nick uhost hand args } {</code></pre></div>for starters.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Dec 28, 2005 6:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[brood]]></name></author>
		<updated>2005-12-28T17:58:57-04:00</updated>

		<published>2005-12-28T17:58:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58759#p58759</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58759#p58759"/>
		<title type="html"><![CDATA[add command to dreamer invite script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58759#p58759"><![CDATA[
sorry, it doesnt seem to work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>but thanks for the response[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6675">brood</a> — Wed Dec 28, 2005 5:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IRCNick]]></name></author>
		<updated>2005-12-28T08:08:11-04:00</updated>

		<published>2005-12-28T08:08:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58745#p58745</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58745#p58745"/>
		<title type="html"><![CDATA[add command to dreamer invite script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58745#p58745"><![CDATA[
I'm newbie in tcl but I want to learn, thats why I'm trying. This code is untested and could be wrong (I'm fast sure that it is wrong), use it on your own risk !<br><br>Ok add after<div class="codebox"><p>Code: </p><pre><code>bind msg n add add_1</code></pre></div>this line<div class="codebox"><p>Code: </p><pre><code>bind msg n del del_1</code></pre></div>and add this proc after the first proc<div class="codebox"><p>Code: </p><pre><code>proc del_1 [nick uhost hand args } {   global chan_1db   set args [split $args " "]   set user [lindex $args 0]   set user [string range $user 1 end]   set pass [lindex $args 1]   set pass [string range $pass 0 end-1]   set deluser $user|$pass   set found 0   set wfile [open $db a+]   while {![eof $wfile]} {   gets $wfile line   if {$line == $deluser} {     delete $deluserset found 1    }   }   close $wfile   if {$found} {   puthelp "NOTICE $nick : \002\[\0039DB-UPDATE\003\]\002 + \002$user\002 is deleted successful from INVITE-Database"   } else {   puthelp "NOTICE $nick :The username was not found in the Database"   }}</code></pre></div>And the command to delete nicks should be:<div class="codebox"><p>Code: </p><pre><code>/msg &lt;botnick&gt; @del &lt;nick&gt; &lt;pass&gt;</code></pre></div>Good luck<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6849">IRCNick</a> — Wed Dec 28, 2005 8:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[brood]]></name></author>
		<updated>2005-12-28T07:13:04-04:00</updated>

		<published>2005-12-28T07:13:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58744#p58744</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58744#p58744"/>
		<title type="html"><![CDATA[add command to dreamer invite script?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58744#p58744"><![CDATA[
Hi, im using invite script by dreamer<br><div class="codebox"><p>Code: </p><pre><code>############################################# Channel invite 0.1 BETA# Scripted by Dreamer# ############################################# Type /msg &lt;botnick&gt; @add &lt;nick&gt; &lt;pass&gt; # to add someone to the database# Type /msg &lt;botnick&gt; @invite &lt;nick&gt; &lt;pass&gt;# to get invited in to channel## History:# 0.1: First version############################################# EDIT FROM HERE# Channel where the bot wil inviteset chan_1 "#TCG"# Name of the databaseset db scripts/chan.invite# STOP EDITING FROM HEREset ver "0.1"bind msg n add add_1bind msg - invite inv_1putlog "Channel invite $ver by Dreamer loaded"# Script starts nowproc add_1 { nick uhost hand args } {global chan_1 dbset args [split $args " "]set user [lindex $args 0]set user [string range $user 1 end]set pass [lindex $args 1]set pass [string range $pass 0 end-1]if { $user == "" || $pass == "" } { putserv "PRIVMSG $nick :Please instert a Nickname and a password" return 0}set up $user|$passset wfile [open $db a+]puts $wfile $upclose $wfileputserv "PRIVMSG $chan_1 :\002\[\0039DB-UPDATE\003\]\002 + \002$user\002 is added to INVITE-Database by \002$nick\002"}proc inv_1 { nick uhost hand arg } {global chan_1 dbset found 0set arg [split $arg " "]set user1 [lindex $arg 0]set user1 [string range $user1 0 end]set pass1 [lindex $arg 1]set pass1 [string range $pass1 0 end]set up1 $user1|$pass1set found 0 set fs [open $db r] while {![eof $fs]} { gets $fs line if {$line == $up1} { set found 1 } } close $fs if {$found} { putserv "PRIVMSG $chan_1 :\002\[\0039INVITE\003\]\002 - \002$user1\002 invited himself as \002$nick\002" putserv "invite $nick $chan_1"} else {putserv "PRIVMSG $nick :Wrong pass or username !!!!"putserv "PRIVMSG $chan_1 : \002\[\0034INTRUDER\003\]\002 - $nick tried to get in the channel with wrongpass or username"} }</code></pre></div>Can a command be added to delete nicks I dont want to be in the invite-db annymore? Something like:<br><br>/msg &lt;botnick&gt; @del &lt;nick&gt;<br><br>thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6675">brood</a> — Wed Dec 28, 2005 7:13 am</p><hr />
]]></content>
	</entry>
	</feed>
