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

	<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-08-14T00:23:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[draftmann]]></name></author>
		<updated>2005-08-14T00:23:44-04:00</updated>

		<published>2005-08-14T00:23:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54225#p54225</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54225#p54225"/>
		<title type="html"><![CDATA[help on faq.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54225#p54225"><![CDATA[
<strong class="text-strong">Sir_Fz:</strong> i have no idea about scripting so can u please help me out.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6589">draftmann</a> — Sun Aug 14, 2005 12:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-08-13T06:29:44-04:00</updated>

		<published>2005-08-13T06:29:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54183#p54183</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54183#p54183"/>
		<title type="html"><![CDATA[help on faq.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54183#p54183"><![CDATA[
I'm not so interrested in fixing all that but if you help yourself then we'll defenitely help you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Aug 13, 2005 6:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[draftmann]]></name></author>
		<updated>2005-08-13T04:17:46-04:00</updated>

		<published>2005-08-13T04:17:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54169#p54169</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54169#p54169"/>
		<title type="html"><![CDATA[help on faq.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54169#p54169"><![CDATA[
thanks for ur reply Sir_Fz, can u please fixed this for me coz i dont know much about tcl and its command  <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=6589">draftmann</a> — Sat Aug 13, 2005 4:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-08-12T18:49:54-04:00</updated>

		<published>2005-08-12T18:49:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54140#p54140</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54140#p54140"/>
		<title type="html"><![CDATA[help on faq.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54140#p54140"><![CDATA[
Use the [isop], [ishalfop] and [isvoice] commands to check if the user has +o, +h or +v. Read tcl-commands.doc about these three commands.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Aug 12, 2005 6:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[draftmann]]></name></author>
		<updated>2005-08-12T17:42:49-04:00</updated>

		<published>2005-08-12T17:42:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54135#p54135</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54135#p54135"/>
		<title type="html"><![CDATA[help on faq.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54135#p54135"><![CDATA[
please help me with this tcl, i want this code <strong class="text-strong">bind pub - "[string trim $faq(cmdchar)]faq" faq:tell_fact</strong> only for user's with cmode(+o, +h and +v). if user without cmode(+o, +h and +v) use this command<strong class="text-strong">(??faq nick keyword)</strong> to notice himself/herself if he use <strong class="text-strong">bind pub - "[string trim $faq(cmdchar)]faq" faq:tell_fact</strong> command. Sorry for my bad english <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><blockquote class="uncited"><div>Here's an Example how the bot show and how i want the bot to show.<br>&lt;@nick1&gt; ??faq Guest url<br>&lt;@bot&gt; <strong class="text-strong">Guest:</strong> (url) <a href="http://www.somesite.com" class="postlink">www.somesite.com</a><br>&lt;@nick1&gt; ?? url<br>&lt;@bot&gt; <strong class="text-strong">(url)</strong> <a href="http://www.somesite.com" class="postlink">www.somesite.com</a><br>&lt;Guest&gt; ?? nick1 url<br>&lt;@bot&gt; <strong class="text-strong">Guest3:</strong> (url) <a href="http://www.somesite.com" class="postlink">www.somesite.com</a><br>&lt;Guest&gt; ??faq nick1 url<br>&lt;@bot&gt; <strong class="text-strong">Guest5:</strong> (url) <a href="http://www.somesite.com" class="postlink">www.somesite.com</a><br>this it how the script works, it also shows when normal users(not op, halfop or voice) use the public command. I want to for use by op halfop and voice only. Means this command is for any user, but i want it for op/halfop/voice only.<br><br>And this is how i want the bot to show(some code needed to change for this) when cmode without(+o,+h and +v) uses this command<br>&lt;Guest&gt; ??faq nick1 url<br>-Notice(bot)- u dont have permission for this command.(something like that!)<br>&lt;Guest&gt; ?? url<br>-Notice(bot)- <a href="http://www.somesite.com" class="postlink">www.somesite.com</a><br>to notice nick2 non (op, halfop or voice).</div></blockquote>i tried my best to explain it how i want the script/tcl to be, may be u can get me. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><strong class="text-strong">Here is the script.</strong><br><div class="codebox"><p>Code: </p><pre><code>bind pub - "[string trim $faq(cmdchar)]" faq:explain_factbind pub - "[string trim $faq(cmdchar)]faq" faq:tell_factbind pub - "[string trim $faq(cmdchar)]addword" faq:add_factbind pub - "[string trim $faq(cmdchar)]delword" faq:delete_factbind pub - "[string trim $faq(cmdchar)]modify" faq:modify_factbind pub - "[string trim $faq(cmdchar)]close-faq" faq:close-faqdbbind pub - "[string trim $faq(cmdchar)]open-faq" faq:open-faqdbbind pub - "[string trim $faq(cmdchar)]faq-help" faq:faq_howtoproc faq:close-faqdb {nick idx handle channel args} { global faq if { [lsearch -exact [split [string tolower $faq(channels)]] [string tolower $channel]] &lt; 0 } {   return 0 } if {![matchattr $handle [string trim $faq(glob_flag)]|[string trim $faq(chan_flag)] $channel]} {  putnotc $nick "You can't change the faq-database status."  return 0 } if {$faq(status)==0} {  set faq(status) 1  putnotc $nick "The faq-database was \002closed correctly\002."  putnotc $nick "Now anybody cant use the command '[string trim $faq(cmdchar)] keyword'."  putnotc $nick "To open the faq-database again use the command '[string trim $faq(cmdchar)]open-faq'."  return 0 } if {$faq(status)==1} {  putnotc $nick "The faq-database is \002already closed\002."  return 0 }}proc faq:open-faqdb {nick idx handle channel args} { global faq if { [lsearch -exact [split [string tolower $faq(channels)]] [string tolower $channel]] &lt; 0 } {  return 0 } if {![matchattr $handle [string trim $faq(glob_flag)]|[string trim $faq(chan_flag)] $channel]} {  putnotc $nick "You can't change the faq-database status."  return 0 } if {$faq(status)==1} {  set faq(status) 0  putnotc $nick "The faq-database was \002opened correctly\002."  putnotc $nick "Now anybody can use the command '[string trim $faq(cmdchar)] \002keyword\002'."  putnotc $nick "To close the faq-database again just use the command '[string trim $faq(cmdchar)]close-faq'."  return 0 } if {$faq(status)==0} {  putnotc $nick "The faq-database is \002already open\002."  return 0 }}proc faq:explain_fact {nick idx handle channel args} { global faq if { [lsearch -exact [split [string tolower $faq(channels)]] [string tolower $channel]] &lt; 0 } {  return 0 } if {$faq(status) == 1} {   putnotc $nick "The faq-database is \002closed\002."  return 0  } if {![file exist $faq(database)]} {   set database [open $faq(database) w]  puts -nonewline $database ""  close $database } set fact [ string trim [ string tolower [ join $args ] ] ] if {$fact == ""} {#  putmsg $nick "Syntax: [string trim $faq(cmdchar)] \002keyword\002"  return 0 } set database [open $faq(database) r] set dbline "" while {![eof $database]} {  gets $database dbline  set dbfact [ string tolower [ lindex [split $dbline [string trim $faq(splitchar)]] 0 ]]   set dbdefinition [string range $dbline [expr [string length $fact]+1] end]  if {$dbfact==$fact} {    if {[string match -nocase "*$faq(newline)*" $dbdefinition]} {      set out1 [lindex [split $dbdefinition $faq(newline)] 0]      set out2 [string range $dbdefinition [expr [string length $out1]+2] end]      putmsg $channel "\002$fact\002: $out1"      putmsg $channel "\002$fact\002: $out2"   } else {      putmsg $channel "\002$fact\002: $dbdefinition"   }   close $database   return 0  } } close $database putnotc $nick "I don't know about \002$fact\002." if {[matchattr $handle [string trim $faq(glob_flag)]|[string trim $faq(chan_flag)] $channel]} {  putnotc $nick "You could add \002$fact\002 by using [string trim $faq(cmdchar)]addword \002$fact\002[string trim $faq(splitchar)]Definition goes here." } else {#  putnotc $nick "If you're looking for a TCL-Script try http://www.egghelp.org/cgi-bin/tcl_archive.tcl?strings=$fact" } return 0}proc faq:tell_fact {nick idx handle channel args} { global faq if { [lsearch -exact [split [string tolower $faq(channels)]] [string tolower $channel]] &lt; 0 } {  return 0 } if {$faq(status)==1} {   putnotc $nick "The faq-database is \002closed\002."  return 0  } if {![file exist $faq(database)]} {   set database [open $faq(database) w]  puts -nonewline $database ""  close $database } set tellnick [ lindex [split [join $args]] 0 ]  set fact [ string trim [ string tolower [ join [ lrange [split [join $args]] 1 end ] ] ] ] if {$tellnick == ""} {   putnotc $nick "Syntax: [string trim $faq(cmdchar)]faq \002nick\002 keyword"  return 0  } if {$fact == ""} {   putnotc $nick "Syntax: [string trim $faq(cmdchar)]faq nick \002keyword\002"  return 0 } set database [open $faq(database) r] set dbline "" while {![eof $database]} {  gets $database dbline  set dbfact [ string tolower [ lindex [split $dbline [string trim $faq(splitchar)]] 0 ] ]  set dbdefinition [string range $dbline [expr [string length $fact]+1] end]  if {$dbfact==$fact} {    if {[string match -nocase "*$faq(newline)*" $dbdefinition]} {      set out1 [lindex [split $dbdefinition "$faq(newline)"] 0]      set out2 [string range $dbdefinition [expr [string length $out1]+2] end]      putmsg $channel "\002$tellnick\002: ($dbfact) $out1"      putmsg $channel "\002$tellnick\002: ($dbfact) $out2"    } else {      putmsg $channel "\002$tellnick\002: ($dbfact) $dbdefinition"    }    putlog "FAQ: Send keyword \"\002$fact\002\" to $tellnick by $nick ($idx)"    close $database    return 0  } } close $database putnotc $nick "I don't have the keyword \002$fact\002 in my database." if {[matchattr $handle [string trim $faq(glob_flag)]|[string trim $faq(chan_flag)] $channel]} {  putnotc $nick "You could add \002$fact\002 by using [string trim $faq(cmdchar)]addword \002$fact\002[string trim $faq(splitchar)]Definition goes here." } else {#  putnotc $nick "If you're looking for a TCL-Script try http://www.egghelp.org/cgi-bin/tcl_archive.tcl?strings=$fact" } return 0}proc faq:add_fact {nick idx handle channel args} { global faq if { [lsearch -exact [split [string tolower $faq(channels)]] [string tolower $channel]] &lt; 0 } {  return 0 } if {$faq(status)==1} {  putnotc $nick "The faq-database is \002closed\002."  return 0 } if {![matchattr $handle [string trim $faq(glob_flag)]|[string trim $faq(chan_flag)] $channel]} {putnotc $nick "You can't add keywords into my dababase."  return 0 } if {![file exist $faq(database)]} {  set database [open $faq(database) w]  puts -nonewline $database ""  close $database } set fact [ string tolower [ lindex [split [join $args] [string trim $faq(splitchar)]] 0 ] ] set definition [string range [join $args] [expr [string length $fact]+1] end]   set database [open $faq(database) r] if {($fact=="")} {  putnotc $nick "Left parameters."  putnotc $nick "use: [string trim $faq(cmdchar)]addword \002keyword\002[string trim $faq(splitchar)]definition"  return 0 } elseif {($definition=="")} {  putnotc $nick "Left parameters."  putnotc $nick "use: [string trim $faq(cmdchar)]addword keyword[string trim $faq(splitchar)]\002definition\002"  return 0 } while {![eof $database]} {  gets $database dbline  set add_fact [ string tolower [ lindex [split $dbline [string trim $faq(splitchar)]] 0 ] ]  if {$add_fact==$fact} {   putnotc $nick "This keyword is already in my database:"   putnotc $nick "Is: \002$fact\002 - $definition"   putnotc $nick "If you want to modify it just use '[string trim $faq(cmdchar)]modify $fact[string trim $faq(splitchar)]\002definition\002'"   close $database   return 0  } } close $database set database [open $faq(database) a] puts $database "$fact[string trim $faq(splitchar)]$definition" close $database putnotc $nick "The keyword \002$fact\002 was added correctly to my database." putnotc $nick "Now: \002$fact\002 - $definition"}proc faq:delete_fact {nick idx handle channel args} { global faq if { [lsearch -exact [split [string tolower $faq(channels)]] [string tolower $channel]] &lt; 0 } {  return 0 } if {$faq(status)==1} {  putnotc $nick "The faq-database is \002closed\002."  return 0 } if {![matchattr $handle [string trim $faq(glob_flag)]|[string trim $faq(chan_flag)] $channel]} {  putnotc $nick "You can't delete keywords from my database."  return 0 } if {![file exist $faq(database)]} {   set database [open $faq(database) w]  puts -nonewline $database ""  close $database } set fact [string tolower [join $args]] if {($fact=="")} {  putnotc $nick "Left parameters."  putnotc $nick "use: [string trim $faq(cmdchar)]delword \002keyword\002"  return 0 } set database [open $faq(database) r] set dbline "" set found 0 while {![eof $database]} {  gets $database dbline  set dbfact [ string tolower [ lindex [split $dbline [string trim $faq(splitchar)]] 0 ] ]  set dbdefinition [string range $dbline [expr [string length $fact]+1] end]  if {$dbfact!=$fact} {   lappend datalist $dbline  } else {   putnotc $nick "The keyword \002$fact\002 was deleted correctly from my database."   putnotc $nick "Was: \002$dbfact\002 - $dbdefinition"   set found 1  } } close $database set databaseout [open $faq(database) w] foreach line $datalist {  if {$line!=""} {puts $databaseout $line} } close $databaseout if {$found != 1} {putnotc $nick "\002$fact\002 not found in my database."}}proc faq:modify_fact {nick idx handle channel args} { global faq if { [lsearch -exact [split [string tolower $faq(channels)]] [string tolower $channel]] &lt; 0 } {  return 0 } if {$faq(status)==1} {  putnotc $nick "The faq-database is \002closed\002."  return 0 } if {![matchattr $handle [string trim $faq(glob_flag)]|[string trim $faq(chan_flag)] $channel]} {  putnotc $nick "You can't modify keywords in my database."  return 0 } if {![file exist $faq(database)]} {   set database [open $faq(database) w]  puts -nonewline $database ""  close $database } set fact [ string tolower [ lindex [split [join $args] [string trim $faq(splitchar)]] 0 ] ] set definition [string range [join $args] [expr [string length $fact]+1] end] set database [open $faq(database) r] if {($fact=="")} {  putnotc $nick "Left parameters."  putnotc $nick "use: [string trim $faq(cmdchar)]modify \002keyword\002[string trim $faq(splitchar)]definition"  return 0 } if {($definition=="")} {  putnotc $nick "Left parameters."  putnotc $nick "use: [string trim $faq(cmdchar)]modify keyword[string trim $faq(splitchar)]\002definition\002"  return 0 } set database [open $faq(database) r] set dbline "" set found 0 while {![eof $database]} {  gets $database dbline  set dbfact [ string tolower [ lindex [split $dbline [string trim $faq(splitchar)]] 0 ] ]  set dbdefinition [string range $dbline [expr [string length $fact]+1] end]  if {$dbfact!=$fact} {   lappend datalist $dbline  } else {   if {$dbdefinition!=$definition} {    lappend datalist "$fact[string trim $faq(splitchar)]$definition"    putnotc $nick "The keyword \002$fact\002 was modified correctly in my database."    putnotc $nick "Is now: \002$fact\002 - $definition"    putnotc $nick "Was: $dbfact - $dbdefinition"    set found 1   } else {    lappend datalist $dbline    putnotc $nick "I already had it that way. \002$fact\002 was not modified."    putnotc $nick "Is: \002$fact\002 - $definition"    set found 1   }  } } close $database set databaseout [open $faq(database) w] foreach line $datalist {  if {$line!=""} {puts $databaseout $line} } close $databaseout if {$found != 1} {  putnotc $nick "\002$fact\002 not found in my database"  putnotc $nick "If you want to add the fact to the database use: [string trim $faq(cmdchar)]addword $fact[string trim $faq(splitchar)]\002description\002" }}proc faq:faq_howto {nick idx handle channel args} { global faq if { [lsearch -exact [split [string tolower $faq(channels)]] [string tolower $channel]] &lt; 0 } {  return 0 } putnotc $nick "Help commands for FAQ Database $faq(version)" if {[matchattr $handle [string trim $faq(glob_flag)]|[string trim $faq(chan_flag)] $channel]} {  if {$faq(status)==0} {   putnotc $nick " - [string trim $faq(cmdchar)]close-faq"   putnotc $nick " - [string trim $faq(cmdchar)]addword : [string trim $faq(cmdchar)]addword \002keyword\002[string trim $faq(splitchar)]your description goes here..."   putnotc $nick " - [string trim $faq(cmdchar)]delword : [string trim $faq(cmdchar)]delword \002keyword\002"   putnotc $nick " - [string trim $faq(cmdchar)]modify : [string trim $faq(cmdchar)]modify \002keyword\002[string trim $faq(splitchar)]your new description goes here..."  }  if {$faq(status)==1} {   putnotc $nick " - [string trim $faq(cmdchar)]open-faq"  } } if {$faq(status)==0} {  putnotc $nick " - [string trim $faq(cmdchar)] \002keyword\002 : looks up keyword in the database"  putnotc $nick " - To let the bot tell someone about something use [string trim $faq(cmdchar)]faq nick \002keyword\002" } if {$faq(status)==1} {  putnotc $nick "The faq-database is \002closed\002." }}</code></pre></div><strong class="text-strong"></strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6589">draftmann</a> — Fri Aug 12, 2005 5:42 pm</p><hr />
]]></content>
	</entry>
	</feed>
