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

	<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-12-30T15:34:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[heman]]></name></author>
		<updated>2006-12-30T15:34:18-04:00</updated>

		<published>2006-12-30T15:34:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69366#p69366</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69366#p69366"/>
		<title type="html"><![CDATA[delete info from db and skip on dupe]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69366#p69366"><![CDATA[
Hi,<br><br>I have two questions, I hope someone can help me with it  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>Me and my friends have a little channel, where we have a bot with a script that stores info of size and files of a release. <br>The script works, but the problem is if someone adds info of a release and few hours later, someone else adds the same info, it will be stored twice. <br><br>So im looking for a way, that when info is already stored of the release in the db, and someone whant to add it again, it will give someting like a announce as: Release info already stored, not adding this info. <br><br><br>Then my second question is I want to add a command that @ in the channel can do to delete the info in the db. Someting like !delete releasename and the whole line with that info will be deleted from the db.<br><br>Hope everyting is clear.<br><br>Here is the script i use:<br><div class="codebox"><p>Code: </p><pre><code>### configset infodb  "./infodb.txt"set chan_(info) "#channel"bind pub - !info echo:info### announce styleset announce_(info)    {[ INFO ] -&gt; #releasename# -::- #section# #file#}### addinfoproc echo:info { nick uhost handle chan arg } { global infodb chan_  set rl [lindex $arg 0]  if { $rl == "" } {      putserv "privmsg $chan : Usage  :!info RELEASE SIZE FILE"; return 0 }    set sz [lindex $arg 1]    set fl [lindex $arg 2] echo:infoadd INFO $fl $sz $rl INFO $chan_(info) 1}### announceproc echo:infoadd { stat fl sz rl stat chan_info save } { global infodb announce_ if { $save == "1" } {  set data [open $infodb a]  puts $data "$stat $fl $sz $rl"  close $data  putlog "$stat $fl $sz $rl added" } if { $stat == "INFO" } { set announce $announce_(info) } regsub -- {#file#} $announce $fl announce regsub -- {#section#} $announce $sz announce regsub -- {#releasename#} $announce $rl announce  putserv "PRIVMSG $chan_info :$announce"}</code></pre></div>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8556">heman</a> — Sat Dec 30, 2006 3:34 pm</p><hr />
]]></content>
	</entry>
	</feed>
