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

	<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>2013-01-26T18:11:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-01-26T18:11:59-04:00</updated>

		<published>2013-01-26T18:11:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100780#p100780</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100780#p100780"/>
		<title type="html"><![CDATA[Keyword trigger script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100780#p100780"><![CDATA[
I wrote my version of trigger script hope you like it.<br>Just tell me if it works for you.<br><div class="codebox"><p>Code: </p><pre><code>#### ++++ Author: MadaliN &lt;madalinmen28@yahoo.com&gt;### ++++ TCL Name: Trigger## ++++# Commands:#!trigger activate (local or global owner)#!triger deactivate (local or global owner)#!trigger url www.chanrank.com (any user)#!triger -list (local or global owner)#!triger -del url (local or global owner)###### +++ This script can have the same commands saved on two different channels with different information (this means every channel has its own database)##### +++ Created: 1/26/2013####bind PUBM - * trigger:mainsetudef flag triggerproc trigger:main {nick uhost hand chan arg} {global triggerif {[string index $arg 0] in {! . `}} {### +++ Checking for triggersforeach c [channels] {if {[channel get $chan trigger]} {foreach n [array names trigger $c,*] {if {[string range $arg 1 end] == [lindex [split $n ","] 1]} {putserv "PRIVMSG $chan :$trigger($n)"}}}}set temp(cmd) [string range $arg 1 end]set temp(cmd) [lindex [split $temp(cmd)] 0]set arg [join [lrange [split $arg] 1 end]]} elseif {[isbotnick [lindex [split $arg] 0]]} {set temp(cmd) [lindex [split $arg] 1]set arg [join [lrange [split $arg] 2 end]]} else { return 0 }if {[info commands command:$temp(cmd)] != ""} { command:$temp(cmd) $nick $uhost $hand $chan $arg }}proc command:trigger {nick uhost hand chan arg} {global triggerswitch -exact -- [lindex [split $arg] 0] {activate {if {[matchattr $hand n] || [matchattr $hand |N $chan]} {channel set $chan +triggerputserv "PRIVMSG $chan :\002$nick\002 - TRIGGER script \00312activated\003 succesfully"}}deactivate {if {[matchattr $hand n] || [matchattr $hand |N $chan]} {channel set $chan -triggerputserv "PRIVMSG $chan :\002$nick\002 - TRIGGER script \00312deactivated\003 succesfully"}}list --list {if {[matchattr $hand n] || [matchattr $hand |N $chan]} {set l ""foreach a [array names trigger $chan,*] {lappend l "\00303[lindex [split $a ","] 1]\003"}if {$l == ""} {putserv "PRIVMSG $chan :\002$nick\002 - There are no trigger commands for this channel"return} else {putserv "PRIVMSG $chan :\002$nick\002 - Trigger command list: [join $l "\002,\002 "]"}}}del --del {if {[matchattr $hand n] || [matchattr $hand |N $chan]} {if {![info exists trigger($chan,[lindex [split $arg] 1])]} {putserv "PRIVMSG $chan :\002$nick\002 - There is no command \00312[lindex [split $arg] 1]\003 in my database"} else {unset -nocomplain trigger($chan,[lindex [split $arg] 1])trigger:saveputserv "PRIVMSG $chan :\002$nick\002 - Command \00312[lindex [split $arg] 1]\003 erased succesfully"}}}default {if {[matchattr $hand n] || [matchattr $hand |N $chan]} {if {![info exists trigger($chan,[lindex [split $arg] 0])]} {set trigger($chan,[lindex [split $arg] 0]) "[join [lrange $arg 1 end]]"trigger:saveputserv "PRIVMSG $chan :\002$nick\002 - You succesfully added trigger \00312[lindex [split $arg] 0]"} else {putserv "PRIVMSG $chan :\002$nick\002 - Command \00312[lindex [split $arg] 0]\003 already exists"}}}}}proc trigger:save {} {global triggerset ofile [open trigger w]puts $ofile "array set trigger [list [array get trigger]]"close $ofile}putlog "+++ Succesfully loaded: \00312Trigger TCL Script"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Sat Jan 26, 2013 6:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[clear]]></name></author>
		<updated>2012-05-07T01:54:17-04:00</updated>

		<published>2012-05-07T01:54:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99356#p99356</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99356#p99356"/>
		<title type="html"><![CDATA[Keyword trigger script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99356#p99356"><![CDATA[
I am looking for a script that I can add keyword triggers to and when a user says one of the trigger words it will send a message to another channel the notes that I have added for said trigger word.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11986">clear</a> — Mon May 07, 2012 1:54 am</p><hr />
]]></content>
	</entry>
	</feed>
