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

	<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>2014-07-31T21:24:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[sekai]]></name></author>
		<updated>2014-07-31T21:24:25-04:00</updated>

		<published>2014-07-31T21:24:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103110#p103110</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103110#p103110"/>
		<title type="html"><![CDATA[is ok now!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103110#p103110"><![CDATA[
Hi!<br><br>2 years ago i make this topic requesting help, today, i found the "error" in this tcl lol .<br><br>the error is in 5º line:<br><blockquote class="uncited"><div>bind pubm - "#sala $triggerchar<strong class="text-strong">*</strong>" triggers:pubm:trigger</div></blockquote>remove this <strong class="text-strong">*</strong> :<br><blockquote class="uncited"><div>bind pubm - "#sala $triggerchar" triggers:pubm:trigger</div></blockquote>save the tcl and rehash your bot.<br><br>Now, type:<br><br>!addtrigger command text here<br><br>and your bot will create and add the trigger "command" in "channel.txt" .<br><br>after type:<br><br>!comand<br><br>and your bot will send the text in your channel  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> .<br><br>I do not know who created this tcl, but thank you for sharing with us all.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11923">sekai</a> — Thu Jul 31, 2014 9:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sekai]]></name></author>
		<updated>2013-02-15T10:51:50-04:00</updated>

		<published>2013-02-15T10:51:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101004#p101004</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101004#p101004"/>
		<title type="html"><![CDATA[Help - tcl addtrigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101004#p101004"><![CDATA[
Thank you for reply, i will test now  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11923">sekai</a> — Fri Feb 15, 2013 10:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-02-02T07:01:12-04:00</updated>

		<published>2013-02-02T07:01:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100893#p100893</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100893#p100893"/>
		<title type="html"><![CDATA[Help - tcl addtrigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100893#p100893"><![CDATA[
You can try this script <a href="http://forum.egghelp.org/viewtopic.php?t=19313" class="postlink">http://forum.egghelp.org/viewtopic.php?t=19313</a><br>It does what you want and more<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Sat Feb 02, 2013 7:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sekai]]></name></author>
		<updated>2012-02-28T09:49:00-04:00</updated>

		<published>2012-02-28T09:49:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98896#p98896</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98896#p98896"/>
		<title type="html"><![CDATA[Help - tcl addtrigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98896#p98896"><![CDATA[
If not how to fix, would use another command that works like this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11923">sekai</a> — Tue Feb 28, 2012 9:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sekai]]></name></author>
		<updated>2012-02-25T11:09:32-04:00</updated>

		<published>2012-02-25T11:09:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98876#p98876</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98876#p98876"/>
		<title type="html"><![CDATA[Help - tcl addtrigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98876#p98876"><![CDATA[
<blockquote class="uncited"><div>Could you describe the issue or error you get? Or maybe what's not working at all or properly?</div></blockquote>Not work, i type "!addtrigger teste messenger" and.... nothing <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=11923">sekai</a> — Sat Feb 25, 2012 11:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-02-25T09:52:05-04:00</updated>

		<published>2012-02-25T09:52:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98872#p98872</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98872#p98872"/>
		<title type="html"><![CDATA[Help - tcl addtrigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98872#p98872"><![CDATA[
Could you describe the issue or error you get? Or maybe what's not working at all or properly?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Feb 25, 2012 9:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sekai]]></name></author>
		<updated>2012-02-25T06:21:06-04:00</updated>

		<published>2012-02-25T06:21:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98870#p98870</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98870#p98870"/>
		<title type="html"><![CDATA[Help - tcl addtrigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98870#p98870"><![CDATA[
Hi, i need help, this tcl don't works for me:<br><div class="codebox"><p>Code: </p><pre><code>#set here the character that should beggins every trigger:set triggerchar "!"#####channels where the triggers will be used:####bind pubm - "#sala $triggerchar*" triggers:pubm:trigger#####here starts the script##########Procedure that puts a new line in the file of triggers for the channel where the trigger was writtenproc triggers:add { nick chan arg } {   set triggerlog "triggerlog.txt"   set file "[string trimleft $chan #]triggers.txt"   set write [open $file a]   if { [string range $arg 0 [expr [string first " " $arg]-1]] == "" || [lrange $arg 1 end] == "" } {      close $write      return 0   }   puts $write "[string range $arg 0 [expr [string first " " $arg]-1]]#[lrange $arg 1 end]"   close $write   puthelp "NOTICE $nick : A trigger [lindex $arg 0] foi adicionada com sucesso a lista de trigger do $chan."   set tlog [open $triggerlog a]   puts $tlog "Logger:$nick adicionou uma trigger no $chan. ($arg)"   close $tlog   putlog "Logger:$nick adicionou uma trigger no $chan. ($arg)"}####This procedure will be in charge of removing triggers for the chan where the command was written.proc triggers:rem { nick chan trigger } {   set triggerlog "triggerlog.txt"   set file [string trimleft $chan #]triggers.txt   set tempfile [string trimleft $chan #]trigger.bak   set readfirst [open $file r]   set linenumb 0   set count 0   puthelp "NOTICE $nick :Iniciando: Removendo trigger."   while { ![eof $readfirst] } {      gets $readfirst line      set helpwanted [string range $line 0 [expr [string first # $line]-1]]      if { $trigger != $helpwanted } {         if { $linenumb==0 } {            set writetemp [open $tempfile w]            puts $writetemp $line            close $writetemp            incr linenumb         } else {             set writetemp [open $tempfile a]            puts $writetemp $line            close $writetemp            incr linenumb         }      } else {         incr count         set tlog [open $triggerlog a]         puts $tlog "Logger:$nick removeu uma trigger do $chan. ($helpwanted [string range $line [expr [string first # $line]+1] end])"         close $tlog         putlog "Logger:$nick removeu uma trigger do $chan. ($helpwanted [string range $line [expr [string first # $line]+1] end])"         puthelp "NOTICE $nick :($count):!addtrigger $helpwanted [string range $line [expr [string first # $line]+1] end]"      }   }   close $readfirst   set readfirst2 [open $tempfile r]   set linenumb2 0   while { ![eof $readfirst2] } {      gets $readfirst2 line      if { [string first # $line] != -1 } {         if { $linenumb2==0 } {            set writetemp [open $file w]            puts $writetemp $line            close $writetemp            incr linenumb2         } else {             set writetemp [open $file a]            puts $writetemp $line            close $writetemp         }      }   }   if { $linenumb2==0 } {      set writetemp [open $file w]      close $writetemp   }      close $readfirst2   puthelp "NOTICE $nick :Fim: Trigger removida."}####Procedure that will get all the triggers from the file and present them to the user who asked for the list of possible commands for the chan.proc triggers:list { nick chan } {   set read [open [string trimleft $chan #]triggers.txt r]   set text ""   while { ![eof $read] } {      gets $read line      set text "$text [lindex [split $line #] 0]"   }   close $read   set finish [string range $text 1 [expr [string length $text]-2]]   set long [split $finish]   if { [llength $long] &gt; 30 } {      for { set c 0} { $c&lt;[llength $long] } { incr c 30 } {         if { $c==0 } {            puthelp "NOTICE $nick : Triggers: 4[lrange $long $c [expr $c+29]]"         } else {            puthelp "NOTICE $nick : 4[lrange $long $c [expr $c+29]]"         }      }   } else {      puthelp "NOTICE $nick :Triggers: 4$finish"   }}####Procedure that shows in the chan the text or the action associated with the trigger written in the channelproc triggers:pubm:trigger { nick uhost handle chan arg } {   global globalProtect nickProtect triggerchar    set way ""   set notice 0   set ok 0   set trigger "[string tolower [string range [lindex $arg 0] 1 end]]"   if { [isop $nick $chan] || [ishalfop $nick $chan] } {      if { $trigger=="listtrigger" } {         [triggers:list $nick $chan]         return 0      } elseif { $trigger=="addtrigger" } {         [triggers:add $nick $chan [join [lrange [split $arg] 1 end]]]         return 0      } elseif { $trigger=="remtrigger" } {         [triggers:rem $nick $chan [join [lrange [split $arg] 1 end]]]         return 0      }    } elseif { [isvoice $nick $chan] } {      #Voices avoid protection.   } else {      if { [info exists nickProtect($uhost)] == 1 } {         putlog "Nick Trigger flood($uhost,$nickProtect($uhost))"         if { $nickProtect($uhost) == 2 } {            return 0         }         incr nickProtect($uhost)      } else {         set nickProtect($uhost) 1         utimer 5 "unset nickProtect($uhost)"      }      if { [info exists globalProtect] == 1 } {         if { $globalProtect == 4 } {            putlog "Global Trigger flood($uhost,$globalProtect)"            return 0         }         incr globalProtect      } else {         set globalProtect 1         utimer 10 "unset globalProtect"      }   }   #ways the resulting help text should be sent   if { [llength $arg] &lt; 2 } {      if { [isop $nick $chan] || [ishalfop $nick $chan] ||[isvoice $nick $chan] } {         set way "PRIVMSG $chan :\001ACTION"         set notice 0      } else {         set way "NOTICE $nick :$nick:"         set notice 1      }   } else {      if { [onchan [lindex $arg 1] $chan] &amp;&amp; ( [isop $nick $chan] || [ishalfop $nick $chan] || [isvoice $nick $chan] ) } {         if { [lindex $arg 2]=="c" } {            set way "PRIVMSG $chan :\001ACTION [lindex $arg 1]"            set notice 3         } elseif { [lindex $arg 2]=="p" } {            set way "PRIVMSG [lindex $arg 1] :"            set notice 2         } else {            set way "NOTICE [lindex $arg 1] :$nick:"            set notice 1         }      } else {         return 0      }   }   #now it searches the txt file for the trigger  wrotten in the channel and if it finds something associated with that trigger,   #it sends it back to the server in the way it was define above.   if { $way!="" &amp;&amp; [file exists [string trimleft $chan #]triggers.txt] } {      set read [open [string trimleft $chan #]triggers.txt r]      while  { ![eof $read] } {         gets $read line         set helpwanted [string range $line 0 [expr [string first # $line]-1]]         if { [string tolower [lindex $helpwanted 0]]==[string tolower [string trimleft [lindex $arg 0] $triggerchar]] } {            set ok 1            puthelp "$way [string range $line [expr [string first # $line]+1] end]"         }      }      set final [not $notice $ok $nick $arg]      close $read   }}proc not { notice ok nick arg } {   if { $notice==1 &amp;&amp; $ok==1 } {      puthelp "NOTICE $nick : :) [lindex $arg 1]"   } elseif { $notice==2 &amp;&amp; $ok==1 } {      puthelp "NOTICE $nick : :) [lindex $arg 0] [lindex $arg 1]"   }}putlog "Triggers.tcl script loaded."</code></pre></div>I need that tcl in my help chan.<br><br>Thks for help!  :D<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11923">sekai</a> — Sat Feb 25, 2012 6:21 am</p><hr />
]]></content>
	</entry>
	</feed>
