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

	<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-08-30T14:46:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[e-force]]></name></author>
		<updated>2006-08-30T14:46:44-04:00</updated>

		<published>2006-08-30T14:46:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65998#p65998</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65998#p65998"/>
		<title type="html"><![CDATA[badnick with database problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65998#p65998"><![CDATA[
ok, tnx.I will search for HOWTOs in this forum, if you want, can post for me here the links.If not..i will continue with my search.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5860">e-force</a> — Wed Aug 30, 2006 2:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-08-29T23:58:24-04:00</updated>

		<published>2006-08-29T23:58:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65979#p65979</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65979#p65979"/>
		<title type="html"><![CDATA[badnick with database problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65979#p65979"><![CDATA[
you haven't tried hard enough (looking up the forum for solution); if you had, you'd find my countless HOWTOs on the subject, which essentially say that you need to: (1) open the file on loading the script, (2) read the entire contents into memory (list) and then close the file, (3) manipulate that list only, not the file itself and (4) periodically save the list into file<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 29, 2006 11:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[e-force]]></name></author>
		<updated>2006-08-29T10:28:34-04:00</updated>

		<published>2006-08-29T10:28:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65949#p65949</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65949#p65949"/>
		<title type="html"><![CDATA[badnick with database problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65949#p65949"><![CDATA[
Hello there, i`ve search most of the topics here but i didn`t find any desicion on my problem. There it is:<br>I want to make my egg tcl which kickban user on join in channel with a list of badnicks,which will be add from some operators. The problem is in the joining procedure, can i set the "black list" from file somwhere in eggdrop memory? Here is the code i`ve writen<div class="codebox"><p>Code: </p><pre><code>set ul(dbfile) "scripts/badnick-list.db"set bchan ""bind join - * join:badnickbind pub l .addbnick save:nickbind pub l .badnickload load:resultsproc save:nick { nick uhost hand chan txt } { global botnick ul set msg [lrange $txt 0 end]        if { $txt == "" } {         putserv "PRIVMSG $chan :$nick, Please define bad nickname!"         return 0        } else {        putserv "PRIVMSG $chan :$msg Shte vi shiba za zakuska!!"         set file [open $ul(dbfile) "a"]          puts $file "$msg"          close $file          return 0          }}proc load:results { nick uhost hand chan txt } { global botnick prefix ul        if {![file exist $ul(dbfile)]} {         putserv "PRIVMSG $chan :I have NO results for this request."         return 0        }           set file [open $ul(dbfile) r]            while {![eof $file]} {             set line [gets $file]              if {([string match "*" $line])} {               set bnick "[string range $line 0 end]"                putserv "PRIVMSG $chan :$bnick"              }            }        close $file}proc join:badnick {nick uhost hand chan} {global bnick bchan kickreason tempif {(([lsearch -exact [string tolower $bchan] [string tolower $chan]] != -1)  || ($bchan == ""))} {  set temp 0        foreach i [string tolower $bnick] {        if {[string match *$i* [string tolower $nick]]} {        set temp 1        }        }}        if {!$temp} { return } {putquick "MODE $chan +b $nick"putquick "KICK $chan $nick :$kickreason" }}</code></pre></div>I`m afraid that if bot read the database.db file everytime when someone joining the channel it will load a bit. That`s why i`m searching for other way to slove the problem. Tnx in advice!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5860">e-force</a> — Tue Aug 29, 2006 10:28 am</p><hr />
]]></content>
	</entry>
	</feed>
