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

	<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>2013-01-12T07:33:55-04:00</updated>

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

		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2013-01-12T07:33:55-04:00</updated>

		<published>2013-01-12T07:33:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100576#p100576</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100576#p100576"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100576#p100576"><![CDATA[
After much help from the guys in this thread here is the final draught<br><div class="codebox"><p>Code: </p><pre><code># set the location of the banned.txt fileset banned_(txt) "**************"#set the sitenameset site_(name) "*******"#set the triggerbind pub - !banned get:bannedbind pub - !addban get:addbanbind pub - !delban get:delbanproc get:banned {nick uhost handle chan arg} {  global banned_ site_   set fp [open $banned_(txt) "r"]   set data [read -nonewline $fp]   close $fp   set lines [split $data "\n"]       putserv "privmsg $chan :\00314$site_(name)\003 - \0034(AFFiLs BaNNeD LiST)\003 - $lines"}proc get:addban {nick uhost handle chan text} {  global banned_   if {$text == ""} {   putserv "PRIVMSG $chan :Usage: !addban &lt;grpname&gt;"    return 0   }   set line_to_add $text   set fname $banned_(txt)   set fp [open $fname "a"]   puts $fp $line_to_add   close $fp         putquick "PRIVMSG $chan : \0034Ban Added Sucessfully\003"}proc get:delban {nick uhost handle chan text} {global banned_##putserv "privmsg $chan :text is: $text"set fp [open $banned_(txt) "r"]set data [read -nonewline $fp]close $fpset lines [split $data "\n"]##putserv "privmsg $chan :lines is: $lines"set el_num [lsearch -nocase $lines $text]##putserv "privmsg $chan :el_num is: $el_num"if {$el_num != -1} {set lines [lreplace $lines $el_num $el_num]}##putserv "privmsg $chan :lines is now: $lines"    putquick "PRIVMSG $chan : \0034Ban Removed Sucessfully\003"set fp [open $banned_(txt) "w"]foreach element $lines {puts $fp $element}close $fp} putlog "COBRa Banned Script V1.2 Sucsesfully loaded" </code></pre></div>works for me once big thx to SpiKe^^/willyw for their help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Sat Jan 12, 2013 7:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2013-01-04T17:41:19-04:00</updated>

		<published>2013-01-04T17:41:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100545#p100545</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100545#p100545"/>
		<title type="html"><![CDATA[EditTextFile+TimedReadLine Version 1.0]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100545#p100545"><![CDATA[
I would, but I just wrote the same thing a few weeks ago...  please just use the last script in this string -&gt; <a href="http://forum.egghelp.org/viewtopic.php?t=19179" class="postlink">http://forum.egghelp.org/viewtopic.php?t=19179</a><br><br>Disable the timed part -&gt; set eTxFile(timed) "0"<br><br>All the included commands will come in handy when working with the information in your text file, you can change the triggers to suit your needs, and disable the commands you wont use...<br><br>Has help in the script file for all the included commands, and help available by public trigger for every command... you can read the whole file or any line in the file, edit any line in the file, delete any line in the file, even add a line to the beginning of the file or the end of the file or anywhere in between:)<br><br>Script even checks for if the file exists, and will make it when needed, if it does not exist.<br><br>If I thought this script wasn't what you needed, I would write another, but it is what you are needing, so I won't be rewriting it again any time soon:)<br>You can run this script, and yours too.  Yours to do the things you have so far, and mine to do the other file work.<br><br>Please just try the script as it is now, I'm sure you will come to like it.<br>If after you have run it, there are things you would like it to do differently, we may be able to address those issues.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Fri Jan 04, 2013 5:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2013-01-04T16:10:24-04:00</updated>

		<published>2013-01-04T16:10:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100544#p100544</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100544#p100544"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100544#p100544"><![CDATA[
tbh i think im gonna need someone to write the code in its entirity it seems very involved can u help plz ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Fri Jan 04, 2013 4:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2013-01-05T02:22:05-04:00</updated>

		<published>2013-01-04T15:31:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100543#p100543</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100543#p100543"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100543#p100543"><![CDATA[
In that process, you are overwriting the entire file,  with the line you wish to delete.<br><br>Basicly, you have to open a new file, and write all the lines EXCEPT the line you wish to delete, to the new file. <br>then delete the original file, and rename the new file.<br><a href="http://forum.egghelp.org/viewtopic.php?t=6885" class="postlink">http://forum.egghelp.org/viewtopic.php?t=6885</a> <br>This help string has all the file functions layed out in their simplest forms, if you want to try writing this yourself.<br><br>Do you really want help, or do you want someone to write you a process? If you just want someone to write you a process,  <br>this forum post string <a href="http://forum.egghelp.org/viewtopic.php?t=19179" class="postlink">http://forum.egghelp.org/viewtopic.php?t=19179</a> has the delete/edit/add functions included. <br>Simply rem out the binds you don't wish to use.  Or just cut out the parts you need... but that route seems a waste though,  <br>because it also includes all the other file functions you will want next:)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Fri Jan 04, 2013 3:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2013-01-04T14:26:07-04:00</updated>

		<published>2013-01-04T14:26:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100542#p100542</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100542#p100542"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100542#p100542"><![CDATA[
ive come up with this but it seems to del everything where am i going wrong plz<br><div class="codebox"><p>Code: </p><pre><code>proc get:delban {nick uhost handle chan text} {  global banned_    if {$text == ""} {    return 0    }    set line_to_delete $text    set fname $banned_(txt)    set fp [open $fname "w"]    puts $fp $line_to_delete    close $fp    putquick "PRIVMSG $chan : \0034Ban Removed Sucessfully\003"  }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Fri Jan 04, 2013 2:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2013-01-05T02:17:11-04:00</updated>

		<published>2013-01-04T13:56:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100541#p100541</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100541#p100541"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100541#p100541"><![CDATA[
Sorry, that actually wasn't the right string, doesn't even include the delete line function:)  This string does...<br><br><a href="http://forum.egghelp.org/viewtopic.php?t=19179" class="postlink">http://forum.egghelp.org/viewtopic.php?t=19179</a><br><br>Basicly, you have to open a new file, and write all the lines except the line you wish to delete, to the new file.<br>then delete the original file, and rename the new file:)<br><br>See this help string for how to code this yourself...  <a href="http://forum.egghelp.org/viewtopic.php?t=6885" class="postlink">http://forum.egghelp.org/viewtopic.php?t=6885</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Fri Jan 04, 2013 1:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2013-01-04T13:42:34-04:00</updated>

		<published>2013-01-04T13:42:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100540#p100540</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100540#p100540"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100540#p100540"><![CDATA[
<blockquote class="uncited"><div>Try all or part of this forum string...<br><br><a href="http://forum.egghelp.org/viewtopic.php?t=19168" class="postlink">http://forum.egghelp.org/viewtopic.php?t=19168</a></div></blockquote>Ty looked at tht earlier and couldnt understand the code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Fri Jan 04, 2013 1:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2013-01-04T13:37:26-04:00</updated>

		<published>2013-01-04T13:37:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100539#p100539</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100539#p100539"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100539#p100539"><![CDATA[
Try all or part of this forum string...<br><br><a href="http://forum.egghelp.org/viewtopic.php?t=19168" class="postlink">http://forum.egghelp.org/viewtopic.php?t=19168</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Fri Jan 04, 2013 1:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2013-01-04T13:06:03-04:00</updated>

		<published>2013-01-04T13:06:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100537#p100537</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100537#p100537"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100537#p100537"><![CDATA[
Works great ty very much<br><br>Just one more question if i wanted to del a single entry would tht be possible plz<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Fri Jan 04, 2013 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2013-01-04T10:38:18-04:00</updated>

		<published>2013-01-04T10:38:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100536#p100536</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100536#p100536"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100536#p100536"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>### reference:### http://forum.egghelp.org/viewtopic.php?t=6885proc get:banned {nick uhost handle chan arg} {  global banned_ site_   set fp [open $banned_(txt) "r"]   set data [read -nonewline $fp]   close $fp   set lines [split $data "\n"]    foreach ban $lines {     putserv "privmsg $chan :$ban" }} </code></pre></div><br>Substitute that and try it.<br><br><br>Else:<br><div class="codebox"><p>Code: </p><pre><code>### reference:### http://forum.egghelp.org/viewtopic.php?t=6885proc get:banned {nick uhost handle chan arg} {  global banned_ site_   set fp [open $banned_(txt) "r"]   set data [read -nonewline $fp]   close $fp   set lines [split $data "\n"]    putserv "privmsg $chan :$lines"} </code></pre></div><br>Try that.  <br>The second example may be what you are looking for.<br>(You'll have to edit in the other text and color codes that you desire later)<br><br><br>I have not tested the above, so I'm hoping for no typos.   <br><br>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Jan 04, 2013 10:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2013-01-04T08:32:35-04:00</updated>

		<published>2013-01-04T08:32:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100535#p100535</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100535#p100535"/>
		<title type="html"><![CDATA[Need some help plz]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100535#p100535"><![CDATA[
Im writing a script which adds bans to a text file tht part works fine its the output to channel i cant get right atm it outputs like this <br><br>CN - (BaNNeD LiST) - GROUP1GROUP2<br><br>but i'd like it to output like this<br><br>CN - (BaNNeD LiST) - GROUP1 GROUP2 (with the space in between)<br><br>here's what i have so far<br><div class="codebox"><p>Code: </p><pre><code># set the location of the banned.txt fileset banned_(txt) "/*****/*****/***/scripts/banned.txt"#set the sitenameset site_(name) "CN"#set the triggerbind pub - !banned get:bannedbind pub - !addban get:addban proc get:addban {nick uhost handle chan text} {  global banned_   if {$text == ""} {   return 0   }   set line_to_add $text   set fname $banned_(txt)   set fp [open $fname "a"]   puts $fp $line_to_add   close $fp   putquick "PRIVMSG $chan : \0034Ban Added Sucessfully\003"} proc get:banned {nick uhost handle chan arg} {  global banned_ site_      foreach line [split [exec cat $banned_(txt)] " "] {      putquick "PRIVMSG $chan :\00314$site_(name)\003 - \0034(BaNNeD LiST)\003 - $line"   }}putlog "COBRa Banned Script V1.0 Sucsesfully loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Fri Jan 04, 2013 8:32 am</p><hr />
]]></content>
	</entry>
	</feed>
