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

	<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-07-04T04:45:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Minus]]></name></author>
		<updated>2006-07-04T04:45:59-04:00</updated>

		<published>2006-07-04T04:45:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64486#p64486</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64486#p64486"/>
		<title type="html"><![CDATA[!info Simple TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64486#p64486"><![CDATA[
This is a modified command script see if you like it.<br><br>cmds are !info add,del,help<br><div class="codebox"><p>Code: </p><pre><code>#### commands.tcl v1.2 - by strikelight ([sL] @ EFNet) (09/21/03)## For eggdrop1.1.5-eggdrop1.6.x## Contact:# - E-Mail: strikelight@tclscript.com# - WWW   : http://www.TCLScript.com# - IRC   : #Scripting @ EFNet##### Description:## This script will allow channel administrators to maintain a list of# available triggers for the channel, and allow users to view the list# of available triggers.##### History:## (09/21/03)/v1.2 - Cosmetic fixes## (10/20/02)/v1.1 - Fixed bug with error on startup: #                   "can't read 'eggversion': no such variable"#                   (Why didn't anyone else report this a long time ago?)#                 - Added option to change the trigger command## (5/27/02)/v1.0  - Initial Release##### Usage:## Edit the configuration below, and# type "!commands help" in a channel## (Modify '!commands help' with the trigger you choose below in the config)##### CONFIGURATION ### Trigger to use?set commands_trigger "!info"# Flag required to add/remove triggersset commands_adminflag "m"## END OF CONFIG ##set commands_version "1.2"set eggversion [string trimleft [lindex $version 1] 0]bind pub - $commands_trigger commands:pubproc handisop {hand chan} {  return [expr {[validchan $chan] &amp;&amp; [isop [hand2nick $hand $chan] $chan]}]}if {($eggversion &gt;= 1030000)} {  proc matchchanattr {handle flags channel} { return [matchattr $handle |$flags $channel] }}proc isoporvoice {nick chan} {  return [expr {[validchan $chan] &amp;&amp; ([isop $nick $chan] || [isvoice $nick $chan])}]}proc handisoporvoice {hand chan} {  return [expr {[validchan $chan] &amp;&amp; [isoporvoice [hand2nick $hand $chan] $chan]}]}proc mymatchattr {hand flags {chan ""}} {  if {[regsub -all {[^&amp;|().a-zA-Z0-9@+#-]} $flags {} f]} {    putloglev o * "error: (matchattr): illegal character in flags: $flags"    return 0  }  regsub -all -- {[|&amp;]} $f {&amp;&amp;} f  regsub -all -- {#-} $f {-#} f  regsub -all -- {-} $f {!} f  regsub -all -- {#?[a-zA-Z0-9]} $f {(&amp;)} f  regsub -all -- {\(#([a-zA-Z0-9])\)} $f {[matchchanattr $hand \1 $chan]} f  regsub -all -- {\(([a-zA-Z0-9])\)} $f {[matchattr $hand \1]} f  regsub -all -- {\.} $f {1} f  regsub -all -- {@} $f {[handisop $hand $chan]} f  regsub -all -- {\+} $f {[handisoporvoice $hand $chan]} f  return [expr $f]}proc commands:load {} {  global commands  catch {unset commands}  if {![file exists "commands.dat"]} {    set outfile [open "commands.dat" w]    close $outfile  }  set infile [open "commands.dat" r]  set buffer [read $infile]  close $infile  set buffer [split $buffer "\n"]  foreach line $buffer {    if {$line != ""} {      set dline [split $line "|"]      set dchan [string tolower [lindex $dline 0]]      set dcmd [lindex $dline 1]      set ddesc [lindex $dline 2]      set commands($dchan,$dcmd) $ddesc    }  }  return 1}proc commands:save {} {  global commands  set outfile [open "commands.dat" w]  foreach item [array names commands *,*] {    set dchan [lindex [split $item ","] 0]    set dcmd [lindex [split $item ","] 1]    set ddesc $commands($item)    if {($dchan != "") &amp;&amp; ($dcmd != "") &amp;&amp; ($ddesc != "")} {      puts $outfile "$dchan|$dcmd|$ddesc"    }  }  close $outfile  return 1}proc commands:longestcmd {chan} {  global commands  set i 0  foreach item [array names commands [string tolower $chan],*] {    set ditem [join [lindex [split $item ","] 1]]    if {[string length $ditem] &gt; $i} { set i [string length $ditem] }  }  return $i}proc commands:iscommand {command chan} {  global commands  return [info exists commands([string tolower $chan],$command)]}proc commands:add {command desc chan} {  global commands  if {[commands:iscommand $command $chan]} { return 0 }  set commands([string tolower $chan],$command) "$desc"  return 1}proc commands:del {command chan} {  global commands  if {![commands:iscommand $command $chan]} { return 0 }  catch {unset commands([string tolower $chan],$command)}  return 1}proc commands:pub {nick uhost hand chan rest} {  global commands commands_adminflag commands_trigger  set cmd [string tolower [lindex [split $rest] 0]]  set chan [string tolower $chan]  switch $cmd {    help {      set tt $commands_adminflag      puthelp "NOTICE $nick :+- \002info.tcl\002 help"      puthelp "NOTICE $nick :: [format %-39s "$commands_trigger"] - list of commands available in channel"      if {[mymatchattr $hand $tt|#$tt $chan]} {        puthelp "NOTICE $nick :: [format %-39s "$commands_trigger add {&lt;info&gt;} &lt;tekst&gt;"] - add a command to channel"        puthelp "NOTICE $nick :: [format %-39s "$commands_trigger del {&lt;info&gt;}"] - remove a command for channel"      }      puthelp "NOTICE $nick :+- end of help."      return    }    add {      set tt $commands_adminflag      if {![mymatchattr $hand $tt|#$tt $chan]} { return }      set command [lindex $rest 1]      set desc [join [lrange $rest 2 end]]      if {($command == "") || ($desc == "")} {        puthelp "NOTICE $nick :Usage: $commands_trigger add {&lt;info&gt;} &lt;tekst&gt;"        puthelp "NOTICE $nick :Eg.  : $commands_trigger add {/ctcp lamer test} does something"        return      }      set res [commands:add $command "$desc" $chan]      if {!$res} {        puthelp "NOTICE $nick :\002$command\002 is already marked as a info for $chan."        return      } else {        puthelp "NOTICE $nick :Added \002$command\002 as a info for $chan."        commands:save        return      }    }    del {      set tt $commands_adminflag      if {![mymatchattr $hand $tt|#$tt $chan]} { return }      set command [lindex $rest 1]      if {$command == ""} {        puthelp "NOTICE $nick :Usage: $commands_trigger del &lt;command&gt;"        return      }      set res [commands:del $command $chan]      if {!$res} {        puthelp "NOTICE $nick :\002$command\002 is not a command for $chan."        return      } else {        puthelp "NOTICE $nick :Deleted \002$command\002 as a info for $chan."        commands:save        return      }    }    default {      set lngth [commands:longestcmd $chan]      if {!$lngth} { return }      if {$lngth &lt; 8} { set lngth 8 }      puthelp "NOTICE $nick :+- information for \002$chan\002:"      puthelp "NOTICE $nick :: \037[format %-${lngth}s "info\037"]  - \037tekst\037"      foreach item [lsort [array names commands $chan,*]] {        puthelp "NOTICE $nick :: \002[format %-${lngth}s "[lindex [split $item ","] 1]"]\002 - $commands($item)"      }      puthelp "NOTICE $nick :+- end of info."      return    }  }}commands:loadputlog "info.tcl v$commands_version by strikelight now loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7926">Minus</a> — Tue Jul 04, 2006 4:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-06-16T09:05:01-04:00</updated>

		<published>2006-06-16T09:05:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64094#p64094</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64094#p64094"/>
		<title type="html"><![CDATA[!info Simple TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64094#p64094"><![CDATA[
there are a lot of "trigger scripts" around here, either reading from a file or using integrated strings. In case the desired script uses PRIVMSG instead of NOTICE... I suggest to simply replace PRIVMSG with NOTICE, the syntax of these IRC commands is the same 'COMMAND TARGET[,MORETAGETS,..] :TEXT' <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Fri Jun 16, 2006 9:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Access]]></name></author>
		<updated>2006-06-16T08:03:52-04:00</updated>

		<published>2006-06-16T08:03:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64091#p64091</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64091#p64091"/>
		<title type="html"><![CDATA[!info Simple TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64091#p64091"><![CDATA[
which kind of information about the channel?!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7832">Access</a> — Fri Jun 16, 2006 8:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aditya]]></name></author>
		<updated>2006-06-16T06:42:49-04:00</updated>

		<published>2006-06-16T06:42:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64089#p64089</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64089#p64089"/>
		<title type="html"><![CDATA[!info Simple TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64089#p64089"><![CDATA[
Hi People!<br><br>I would like to know if there is a script which has the below feature existing .. if not, can anyone make it up please <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>1) On !info in a channel the bot should respond to the performed chatter with a list of information about the channel<br><br>2) The information should be listed as 1) .. 2).. and 3)....<br><br>3) The Information should be ONLY through /notice and not /privmsg..<br><br><br>Thanks / Rgds<br><br>Aditya @ DALnet<br>#TownHall, #HomeTown<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7738">Aditya</a> — Fri Jun 16, 2006 6:42 am</p><hr />
]]></content>
	</entry>
	</feed>
