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

	<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-01-22T06:54:05-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-01-22T06:54:05-04:00</updated>

		<published>2005-01-22T06:54:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45697#p45697</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45697#p45697"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45697#p45697"><![CDATA[
ic .. sorry then..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sat Jan 22, 2005 6:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2005-01-21T10:45:15-04:00</updated>

		<published>2005-01-21T10:45:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45668#p45668</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45668#p45668"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45668#p45668"><![CDATA[
<blockquote class="uncited"><div>why <br><div class="codebox"><p>Code: </p><pre><code>foreach [uplevel 1 {set args}] [uplevel 1 {set code}] break</code></pre></div>and not just use $args &amp;nd $code .. why use set ..?</div></blockquote>How would you do what I did using $?<br><br>(hint: "$args" == "[set args]" != "set args")<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Jan 21, 2005 10:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-01-21T10:30:01-04:00</updated>

		<published>2005-01-21T10:30:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45666#p45666</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45666#p45666"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45666#p45666"><![CDATA[
hmm i was reading the code a bit seems nice but just out of curiousity.. why <br><div class="codebox"><p>Code: </p><pre><code>foreach [uplevel 1 {set args}] [uplevel 1 {set code}] break</code></pre></div>and not just use $args &amp;nd $code .. why use set ..?<br><br><br>ps nice code you seem to have everything coverd..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Fri Jan 21, 2005 10:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KevKev]]></name></author>
		<updated>2005-01-20T07:05:57-04:00</updated>

		<published>2005-01-20T07:05:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45596#p45596</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45596#p45596"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45596#p45596"><![CDATA[
Holy jeebus User <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked">  awesome stuff <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks a ton.  I'll have to run through all of it till I understand how it works.  The usage side looks simple enough (for such a complex task at least <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> )<br><br>If any of the eggheads are peering in.  this sort of thing would be awesome for 1.9.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3940">KevKev</a> — Thu Jan 20, 2005 7:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2005-01-20T07:17:57-04:00</updated>

		<published>2005-01-19T19:46:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45566#p45566</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45566#p45566"/>
		<title type="html"><![CDATA[i was bored...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45566#p45566"><![CDATA[
Here's a custom bind command for you. I didn't test it much, but it seems to get the job done and it's fairly flexible and fast. The createType proc looks a bit ugly, but most of that ugly code is to speed up the invoking of your binds, so I guess it's a good thing <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><div class="codebox"><p>Code: </p><pre><code>namespace eval ::cbind {variable cfgvariable binds# create a new custom bind typeproc createType {type args mstr mtype stack hand chan} {variable cfgset all [lrange [info level 0] 2 end]# replace an existing type?if {[info exists cfg($type)]} {if {$cfg($type)==$all} {return 2} {variable bindsarray unset binds $type,*}}# generate code to produce the string that is matched against your# masks (command substitution is performed when the bind is invoked)set j [llength $args]set code {}for {set i 0} {$i&lt;$j} {incr i} {lappend code "\[lindex \$args $i\]"}if {[catch {set cfg($type,mstr) [peval {foreach [uplevel 1 {set args}] [uplevel 1 {set code}] breaksubst -noc [string map {\\ \\\\ [ \\\\[ ] \\\\]} [uplevel 1 {set mstr}]]}]} err]} {error "invalid mstr: $err"}# generate code for matching and flag checking based on your settingsset code {}if {$hand&gt;-1} {if {$chan&gt;-1} {lappend code {($flags!="-"&amp;&amp;![matchattr $hand $flags $chan])}} {lappend code {($flags!="-"&amp;&amp;![matchattr $hand $flags])}}}switch -- $mtype {"-nocase"     {lappend code {![string eq -noc $mask $mstr]}}"-glob"       {lappend code {![string match $mask $mstr]}}"-globnocase" {lappend code {![string match -noc $mask $mstr]}}default       {lappend code {![string eq $mask $mstr]}}}if {[llength $code]} {set cfg($type,code) "if \{[join $code "||"]\} continue"} else {set cfg($type,code) ""}# store the rest of the settingsset cfg($type) $allset cfg($type,args) $argsset cfg($type,argn) $jset cfg($type,stack) $stackset cfg($type,hand) $handset cfg($type,chan) $chanset all}# guessproc bind {type flags mask command} {variable cfgvariable bindsif {![info exists cfg($type)]} {error "invalid type"}if {![string match {*[a-zA-Z0-9]*} $flags]} {set flags -}set name $type,$maskset bind [list $type $flags $mask $command]if {[info exists binds($name)]&amp;&amp;$cfg($type,stack)} {if {[lsearch -exact $binds($name) $bind]==-1} {lappend binds($name) $bind}} else {set binds($name) [list $bind]}set command}# guessproc unbind {type flags mask command} {variable bindsif {![string match {*[a-zA-Z0-9]*} $flags]} {set flags -}set name $type,$maskset bind [list $type $flags $mask $command]if {[info exists binds($name)]} {if {[set i [lsearch -exact $binds($name) $bind]]&gt;-1} {if {[llength $binds($name)]&gt;1} {set binds($name) [lreplace $binds($name) $i $i]} {unset binds($name)}return $command}}error "no such bind"}# make stuff happenproc invoke {type args} {variable cfgvariable bindsif {![info exists cfg($type)]} {error "invalid type \"$type\""}if {[llength $args]!=$cfg($type,argn)} {error "wrong # args for \"$type\" i want: $cfg($type,args)"}if {$cfg($type,hand)&gt;-1} {set hand [lindex $args $cfg($type,hand)]set chan [lindex $args $cfg($type,chan)]}set mstr [subst $cfg($type,mstr)]set code $cfg($type,code)foreach name [array names binds $type,*] {foreach bind $binds($name) {foreach {. flags mask cmd} $bind breakeval $codeuplevel #0 [concat $cmd $args]}}}# a clean, temporary scope (used to generate the mstr code)proc peval code {eval [set code] [unset code]}}</code></pre></div><div class="codebox"><p>Code: </p><pre><code>"Manual" (i used the code tag to preserve formatting):::cbind::createType &lt;type&gt; &lt;args&gt; &lt;mstr&gt; &lt;mtype&gt; &lt;stack&gt; &lt;hand&gt; &lt;chan&gt;creates a new bind type based on your settingsarguments:type: the "name" of your new bindargs: the list of arguments required when invoking the bindmstr: a piece of "code" used to generate the string that your      bind masks are matched againstmtype: match type (-exact, -nocase, -glob or -globnocase)stack: stackable or not? (1/0)hand: if you want flag matching, give the position of the      handle in your argument list (index), or -1chan: if you want channel flag matching (like the above, but      to indicate the position of the channel name)::cbind::bind &lt;type&gt; &lt;flags&gt; &lt;mask&gt; &lt;command&gt;create a bind(you created the type, so you should know how it works :P)::cbind::unbind &lt;type&gt; &lt;flags&gt; &lt;mask&gt; &lt;command&gt;remove a bind::cbind::invoke &lt;type&gt; [arg1, arg2...argN]make stuff happen :)arguments:type: must be a valid typeargs: the remaining arguments must match the number of      arguments in the type's argument list      the values are used in different ways depending      on the settings you used when creating the type.</code></pre></div>Example emulating the built in "join" bind:<br>- require the arguments nick, uhost, hand and chan (when invoking it)<br>- match against "#chan nick!user@host"<br>- use glob and nocase matching (note: this is not the same as eggdrop's matching. 'string match -nocase' is used. If you don't know the difference, you've got some tcl-commands.doc/manual reading to do <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>- stackable<br>- handle is the 3rd argument (so flag checking is done)<br>- channel is the 4th arg (so the channel name is used when matching flags)<div class="codebox"><p>Code: </p><pre><code># create the new type:cbind::createType join {nick uhost hand chan} {$chan $nick!$uhost} -globnocase 1 2 3# a test bind + proccbind::bind join - * testproc test {n u h c} {putlog "$n!$u joined $c as $h"}# invoke the type and see what happenscbind::invoke join It seems@to.work * #chan</code></pre></div>EDIT: added code for rewriting flags with no alphanumeric chars to "-" in bind/unbind<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Jan 19, 2005 7:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KevKev]]></name></author>
		<updated>2005-01-19T02:33:12-04:00</updated>

		<published>2005-01-19T02:33:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45528#p45528</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45528#p45528"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45528#p45528"><![CDATA[
Thanks too you both!<br><br>Hook sounds good to me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>Looks very spiffy i'll have to see about incorporating an adaptation of one of thses as a hook proc <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I might even write it as a full standalone toolscript for others to use <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=3940">KevKev</a> — Wed Jan 19, 2005 2:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-01-18T19:04:14-04:00</updated>

		<published>2005-01-18T19:04:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45525#p45525</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45525#p45525"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45525#p45525"><![CDATA[
if you are willing to use alternate names for the word bind then check this script, its a bind i wrote bit messy maybe but it works.. <br><br><a href="http://cvs.ofloo.net/q-srv/bin/q-srv.tcl?rev=1.3.1.2&amp;content-type=text/vnd.viewcvs-markup" class="postlink">http://cvs.ofloo.net/q-srv/bin/q-srv.tc ... cvs-markup</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Jan 18, 2005 7:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2005-01-18T15:08:51-04:00</updated>

		<published>2005-01-18T15:08:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45514#p45514</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45514#p45514"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45514#p45514"><![CDATA[
How about something like this? It's sort of like a stacking "bind" with nothing more than a keyword to match against (no flags or other fancy stuff)<div class="codebox"><p>Code: </p><pre><code># use this to create "binds"proc bind2 {name cmd} {global bind2if {![info exists bind2($name)]||[lsearch -exact $bind($name) $cmd]==-1} {lappend bind2($name) $cmd}}# use this to invoke your "binds"proc bind2invoke {mask args} {global bind2foreach name [array names bind2 $mask] {foreach cmd $bind2($name) {uplevel #0 [concat $cmd $args]}}}# example:proc fakeJOINtest {nick uhost hand chan} {putlog "$nick!$uhost fakeJOINed $chan as $hand?"}bind2 fakeJOIN fakeJOINtestbind2invoke fake* TheNick who@? TheHandle #chan</code></pre></div>It should at least give you an idea or two <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=2878">user</a> — Tue Jan 18, 2005 3:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KevKev]]></name></author>
		<updated>2005-01-18T06:59:06-04:00</updated>

		<published>2005-01-18T06:59:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45505#p45505</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45505#p45505"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45505#p45505"><![CDATA[
Update:<br><br>Unfortunately the event type in the bind will not take wildcards.  This would have been a perfect solution but alas i'm back to searching for a good way to handle this.<br><br>Any suggestions?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3940">KevKev</a> — Tue Jan 18, 2005 6:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KevKev]]></name></author>
		<updated>2005-01-17T11:15:19-04:00</updated>

		<published>2005-01-17T11:15:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45484#p45484</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45484#p45484"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45484#p45484"><![CDATA[
Try it out <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code>.tcl bind evnt - foo {putlog "foo event happened"}</code></pre></div>then <div class="codebox"><p>Code: </p><pre><code>.tcl callevent foo</code></pre></div>It takes a nice little text string which can be anything you want it to.<br><br>Yes it's simplistic and such and i'm assuming it'll take a mask on the bind  as in i could do bin evnt - foo* and then use the rest of the string to pass arguments to it.  It's simplistic and crude but it's better than adding the trigger to every single script.<br><br>I haven't fully tested everything and i'm just now including it into my script.<br><br>In my case I hope to use it to replace putting calls to about 5 or 6 different "modules" for my suite of scripts in this proc.  If i have to put them all in here i can never remove the modules and nobody could add custom modules that need to do things on join without editing this proc or re-implementing it in their module.  The point of modular programming is to do things once and use them a lot.<div class="codebox"><p>Code: </p><pre><code># Raw Bindsbind raw - JOIN eqim_join_rawproc eqim_join_raw {src key chan} {global loglevset autoadd 0set module eqim_join_rawif {[do_debug $module]} {putloglev $loglev(debug) $chan "#$module# found src: $src key: $key chan: $chan"}set nick [lindex [split $src "!"] 0]if {[string match ":*" $chan]} {set chan [string range $chan 1 end]}if {[checkbans $src $chan]} {return 0}eqim-int_send_news $nick $chan $nick 2set hand [finduser $src]if {$hand == "*"} {if {$autoadd} {eqim-add_flagged_user $nick $chan noneset hand $nick} else {return 0}} if {![haschanrec $hand $chan]} {addchanrec $hand $chan}eqim_update_host $handsetuser $hand LASTON [clock seconds] $chanif {[channel get $chan greet]} {if {[do_debug $module]} {putloglev $loglev(debug) $chan "#$module# greeting $nick in $chan"}eqim-greet $nick $hand $chan}eqim-checkflags $nick $hand $chanreturn 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3940">KevKev</a> — Mon Jan 17, 2005 11:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-01-17T01:13:12-04:00</updated>

		<published>2005-01-17T01:13:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45475#p45475</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45475#p45475"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45475#p45475"><![CDATA[
i always thought callevent was to trigger stuff like simulate a rehash and so on.. so you could see what happens.. not to actual make your own..<br><br>=&gt; altho if you where to bind an event to test for example then call upon event test well that would trigger a bind so .. in a way yes .. you could make your own event binds but its not realy your own bind<br><br>for example <br><br>bind evnt - blah some_command<br><br>then something happens on the eggdrop or in your script where you put the command callevent blah that would call the event yes .. but thats not realy new right ?? its been on there for a while .. or isn't this possible ?<br><br>for example bind evnt - names names_event<br><br>proc names_event ...<br><br>bind on raw for names then you got a names event put in that raw bind callevent names and that should work..<br><br>but you might as well bind to the raw ... if you know what i mean ???<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Mon Jan 17, 2005 1:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-01-16T20:46:52-04:00</updated>

		<published>2005-01-16T20:46:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45462#p45462</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45462#p45462"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45462#p45462"><![CDATA[
Bind evnt has a few newber of types of parameters that can be used. Some as we know are listed in tcl-commands.doc.<br><div class="codebox"><p>Code: </p><pre><code>bind evnt &lt;flags&gt; &lt;type&gt; &lt;proc&gt;proc-name &lt;type&gt;Description: Description: triggered whenever one of these events happen; flags are ignored; valid events are:    sighup    called on a kill -HUP &lt;pid&gt;    sigterm    called on a kill -TERM &lt;pid&gt;    sigill    called on a kill -ILL &lt;pid&gt;    sigquit    called on a kill -QUIT &lt;pid&gt;    save    called when the userfile is saved    rehash    called just after a rehash    prerehash    called just before a rehash    prerestart    called just before a restart    logfile     called when the logs are switched daily    loaded    called when the bot is done loading    userfile-loaded    called after userfile has been loaded    connect-server    called just before we connect to an IRC server    init-server    called when we actually get on our IRC server    disconnect-server    called when we disconnect from our IRC serverModule: core</code></pre></div>Well lets see could you paste a the script here, so we know exactly what you are talking about, the binding types. And also this script has a join detection, so what actually does it do?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun Jan 16, 2005 8:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KevKev]]></name></author>
		<updated>2005-01-16T16:40:19-04:00</updated>

		<published>2005-01-16T16:40:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45449#p45449</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45449#p45449"/>
		<title type="html"><![CDATA[Custom Binds - Neat trick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45449#p45449"><![CDATA[
I just figured out a neat little trick.  The hidden ability to create, call and bind to your own custom binds.<br><br>ever put together a bunch of scripts for various things and wanted to be able to add/remove parts without manual editing even when pieces are dependant on eachother and such?  I came across this with one of my projects (<a href="http://sf.net/projects/eqegg/" class="postlink">EQEgg</a>).  Basicly the type of IRC server that i was connecting a bot to doesn't respond to joins and such the way that Eggdrop expects.  So i wrote my own Join/Part detection in my script.  Then i had to manually hack it into various other pieces of my script to either detect it on it's own or to be called from the original detection routine inlieu of a join binding.<br><br>I have since found that bind evnt &lt;type&gt; takes any random string you want to throw at it and the associated callevent(&lt;type&gt;) will as well.  <br><br>By putting a callevent("eqegg_join") line in my custom join detection script and bind all on join events to the evnt bind with a type of eqegg_join i can now worry less about glueing the scripts together and tying them too tightly together so that i can't even remove modules. and it'll be even easier to add new modules that need to respond to events detected in the core of my script.<br><br>Anyway, just figured i'd pass my realization on as i've been looking for ways of creating and using my own bindings for quite some time.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3940">KevKev</a> — Sun Jan 16, 2005 4:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
