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

	<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>2002-10-29T18:30:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ian-Highlander]]></name></author>
		<updated>2002-10-29T18:30:19-04:00</updated>

		<published>2002-10-29T18:30:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12572#p12572</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12572#p12572"/>
		<title type="html"><![CDATA[!commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12572#p12572"><![CDATA[
Your public command binds are set up for either global or channel masters (m|m) do your other users have these flags?<br><br>You should use o|o for ops or -|- for no flags needed or a combination depending on what you actually want to achieve.<br><br>HTH<br><br>Regards<br><br>Ian-Highlander<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=17">Ian-Highlander</a> — Tue Oct 29, 2002 6:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-29T16:05:45-04:00</updated>

		<published>2002-10-29T16:05:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12569#p12569</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12569#p12569"/>
		<title type="html"><![CDATA[!commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12569#p12569"><![CDATA[
Hi, I am trying to set up a series of actions using !commands<br><br>Atm, I have it set up so I can do all the !commands, but, I cannot get it to work for others.... I would like help in setting this up for others to also use this...<br><br>Here is the TCL file stuff I have atm.... it's one of the scripts available from eggdrop.org :)<br><br>atm, I have only to wish the ability for others (ops) to type !add {name} {Text goes here} type situations....<br><br>In this way, a person can type:<br><br>!add Help Help is designed to walk you through the text system. ?? Help is how you access it. It is CASE/case Sensitive, and requires ops to input data. !add is the command to add new info.<br><br>and get:<br>(via /notice from the bot) Help Help is designed to walk you through the text system. ?? Help is how you access it. It is CASE/case Sensitive, and requires ops to input data. !add is the command to add new info.<br><br><br><br><br>Below is the actual code. All assistance is appreciated :)<br><br><br><br><br><br><br>##############################################################################################<br>## DictionarySystem v1.03  || Created by: dbz-gt  || Editors: N/A  || Made on 14-08-2002     #<br>##############################################################################################<br>## Edited on 25-08-2002 ||<br>#######################################################################################<br>## AGAIN A SCRIPT OF DBZ-GT :D //\\ Do you need more, come on irc.Quakenet.org       ##<br>## and join #dbz-gt and ask me (dbz-gt, duh) for the other scripts that I have made. ##<br>#######################################################################################<br>##<br>## Copyright stuff:<br>## -----------------<br>## You may change the script like you want it, but please don't delete the copyright.<br>## I want to become 'important' ;). Anyway, you may edit the script like you wish and<br>## if you have some cool tips or stuff edit, you can always message me about them.<br>## E-mail: <a href="mailto:dbz_gt01@hotmail.com">dbz_gt01@hotmail.com</a><br>## IRC: irc.Quakenet.org  // Channel: #dbz-gt // Nick: dbz-gt<br>##<br>##<br>## !That's all!<br>#######################################################################################<br><br><br>##########<br>### BEGIN CONFIG<br>### EDIT THE NEXT LINES<br>### IF YOU DON'T EDIT THEM, MAYBE THE SCRIPT WILL NOT WORK<br>##########<br><br>### The file name where all the words of the dictionary<br>### system will be saved so they don't lost when the bot<br>### goes offline<br>set file "words.db"<br><br>### This function is new, added in version 1.03<br>### If you want to disable this script in some channels<br>### You have to put them in this variable and they<br>### can't use this script anymore<br>set chan_ign "#test.channel"<br><br>##########<br>### END CONFIG<br>### DON'T EDIT THE LINES HERE BELOW, IF YOU DON'T KNOW WHAT<br>### YOU ARE DOING!<br>##########<br><br>### Binds<br>bind pub m|m !add pub:add<br>bind pub m|m !del pub:del<br>bind pub - ?? pub:check<br>bind pub m|m !list pub:list<br>bind pub m|- .globadd pub:globaladd<br>bind pub m|- .globdel pub:globaldel<br>bind time - "* * * * *" start:save<br><br>### On starting the bot the file with the name $file will be readed<br>### so the words will be saved into the arrays<br>proc start:read {} {<br>global cwd file<br>  if {[file exist $file]} {<br>    set fs [open $file r] <br>    while {![eof $fs]} { <br>       gets $fs line; set $line [join $line]<br>         if {[llength $line] &gt;= 2 } {<br>            set wchan [lrange $line 0 0]<br>            if {![info exist cwd($wchan)]} { set disc [lrange $line 1 end]; set cwd($wchan) "$disc" }<br>         }<br>    }  <br>    close $fs <br>  }<br>}<br><br>### Every minute the arrays will be saved into the file with the name $file<br>proc start:save {mi ho da mo ye} {<br>global cwd file<br>set fs [open $file w+]<br>set total "[llength [array names cwd]]"<br>    foreach array_id [array names cwd] {<br>       if {$cwd($array_id) != ""} {<br>          set disc "$cwd($array_id)";<br>          puts $fs "$array_id $disc"<br>       }<br>    }<br>close $fs<br>putcmdlog "UPDATE: \002$total\002 words saved in the file \002$file\002."<br>}<br><br>### The add function here below will add the word and discription in the array<br>proc pub:add { nick username handle channel args } {<br>global chan_ign<br>set args [join $args]<br>set word [lrange $args 0 0]<br>set disc [join [lrange $args 1 end]]<br>set channel [string tolower $channel]; set chan_ign [string tolower $chan_ign]<br> if {[lsearch $chan_ign $channel] &lt; "0" } {<br>  if {$word == ""} {<br>     putserv "NOTICE $nick :You forgot the word! \037Syntax: \002!add &lt;word&gt; &lt;discription&gt;\002\037"<br>  } elseif {$disc == ""} {<br>     putserv "NOTICE $nick :You forgot the discription! \037Syntax: \002!add &lt;word&gt; &lt;discription&gt;\002\037"<br>  } else {<br>     global cwd<br>     set cwd($word$channel) "$disc"<br>     putserv "NOTICE $nick :Added succesfully the word \002$word\002 in the channel \002$channel\002 with the discription: \002$disc\002"<br>  }<br> } else { putserv "NOTICE $nick :This channel is ignored for using the DictionarySystem. Please take contact with the owner of this bot." }<br>}<br><br>### This is a new proc as well, it is added in version 1.03<br>### It add the word GLOBAL so all the channels read it<br>proc pub:globaladd { nick username handle channel args } {<br>global chan_ign<br>set args [join $args]<br>set word [lrange $args 0 0]<br>set disc [join [lrange $args 1 end]]<br>set channel [string tolower $channel]; set chan_ign [string tolower $chan_ign]<br> if {[lsearch $chan_ign $channel] &lt; "0" } {<br>  if {$word == ""} {<br>     putserv "NOTICE $nick :You forgot the word! \037Syntax: \002.globadd &lt;word&gt; &lt;discription&gt;\002\037"<br>  } elseif {$disc == ""} {<br>     putserv "NOTICE $nick :You forgot the discription! \037Syntax: \002.globadd &lt;word&gt; &lt;discription&gt;\002\037"<br>  } else {<br>     global cwd<br>     set cwd(global-$word) "$disc"<br>     putserv "NOTICE $nick :Added succesfully the word \002$word\002 in the \002GLOBAL LIST\002 with the discription: \002$disc\002"<br>  }<br> } else { putserv "NOTICE $nick :This channel is ignored for using the DictionarySystem. Please take contact with the owner of this bot." }<br>}<br><br>### Here you will get a discription about the word you want, IF it exists.<br>proc pub:check { nick username handle channel args } {<br>global cwd chan_ign<br>set args [join $args]<br>set word [lindex $args 0]<br>set channel [string tolower $channel]; set chan_ign [string tolower $chan_ign]<br> if {[lsearch $chan_ign $channel] &lt; "0" } {<br>  if {$word == ""} {<br>     putserv "NOTICE $nick :You forgot the word! \037Syntax: \002?? &lt;word&gt;\002\037"<br>  } else {<br>     if {[info exist cwd(global-$word)]} {<br>        putserv "NOTICE $nick :\037\[GLOBAL\] $word\037: [join $cwd(global-$word)]"<br>     } elseif {[info exist cwd($word$channel)]} {<br>        putserv "NOTICE $nick :\037$word\037: [join $cwd($word$channel)]"<br>     } else {<br>        putserv "NOTICE $nick :Couldn't find the word \002$word\002 (even not in the GLOBAL list)"<br>     }<br>  }<br> }<br>}<br><br>### With a while you will get the holl list of words<br>proc pub:list { nick username handle channel args } {<br>global cwd chan_ign<br>set channel [string tolower $channel]; set chan_ign [string tolower $chan_ign]<br> if {[lsearch $chan_ign $channel] &lt; "0" } {<br>   if {![info exist cwd]} {<br>      putserv "NOTICE $nick :No words in database found."<br>   } else {<br>      foreach array_id [array names cwd] {<br>         if {$cwd($array_id) != ""} {<br>             set disc "$cwd($array_id)"; set parts [split $array_id #]; set word [lrange $parts 0 0]; set chan [lrange $parts 1 1]<br>             if {$channel == "#$chan"} { putserv "NOTICE $nick :\[\037$word\037\]: $disc" }<br>         }<br>      }<br>   }<br> } else { putserv "NOTICE $nick :This channel is ignored for using the DictionarySystem. Please take contact with the owner of this bot." }<br>}<br><br>### You can delete the words you want.<br>proc pub:del { nick username handle channel args } {<br>global cwd chan_ign<br>set args [join $args]<br>set word [lrange $args 0 0]<br>set channel [string tolower $channel]; set chan_ign [string tolower $chan_ign]<br> if {[lsearch $chan_ign $channel] &lt; "0" } {<br>  if {$word != ""} {<br>   array unset cwd "$word$channel"  <br>   putserv "NOTICE $nick :Removed the word \002$word\002 of the channel \002$channel\002"<br>  } else {<br>   putserv "NOTICE $nick :You forgot the word! \037Syntax: \002!del &lt;word&gt;\002\037"<br>  }<br> } else { putserv "NOTICE $nick :This channel is ignored for using the DictionarySystem. Please take contact with the owner of this bot." }<br>}<br><br>### This is a new proc as well, it is added in version 1.03<br>### It removes GLOBAL words<br>proc pub:globaldel { nick username handle channel args } {<br>global cwd chan_ign<br>set args [join $args]<br>set word [lrange $args 0 0]<br>set channel [string tolower $channel]; set chan_ign [string tolower $chan_ign]<br> if {[lsearch $chan_ign $channel] &lt; "0" } {<br>  if {$word != ""} {<br>   array unset cwd "global-$word"  <br>   putserv "NOTICE $nick :Removed the word \002$word\002 from the \002GLOBAL\002 list"<br>  } else {<br>   putserv "NOTICE $nick :You forgot the word! \037Syntax: \002.globdel &lt;word&gt;\002\037"<br>  }<br> } else { putserv "NOTICE $nick :This channel is ignored for using the DictionarySystem. Please take contact with the owner of this bot." }<br>}<br><br>start:read<br>putlog "DictionarySystem is succesfully \002LOADED\002. Version 1.03 created by \037dbz-gt\037 (c) 2002"<p>Statistics: Posted by Guest — Tue Oct 29, 2002 4:05 pm</p><hr />
]]></content>
	</entry>
	</feed>
