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

	<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>2003-03-19T14:09:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Gothic-Angel]]></name></author>
		<updated>2003-03-19T14:09:35-04:00</updated>

		<published>2003-03-19T14:09:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18014#p18014</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18014#p18014"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18014#p18014"><![CDATA[
I basically want the majority of the procs to be activated only if the channel is set to +services in the chanset. A few procs will stay out and be activated at any time.<br>So how could I go about making the procs only work on a channel if it's set to +services?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1949">Gothic-Angel</a> — Wed Mar 19, 2003 2:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-03-19T05:52:09-04:00</updated>

		<published>2003-03-19T05:52:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17995#p17995</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17995#p17995"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17995#p17995"><![CDATA[
See tcl-commands.doc<br><br>pub:ident looks like it is intended to allow request to identify via a channel command.<br><br>However, the proc definition is well out of whack.<br><div class="codebox"><p>Code: </p><pre><code>proc pub:ident {channel type args} {</code></pre></div>tcl-commands.doc will tell you what arguments are sent in what order.<br><br>Tcl does not guess what information you want placing where. It will do things, and set things in the order they are sent.<br><br>EG<br><div class="codebox"><p>Code: </p><pre><code>proc testing {this that} {puts stdout "THIS: $this"puts stdout "THAT: $that"}set this "Hello"set that "all"testing $this $thattesting $that $this</code></pre></div>Will print<blockquote class="uncited"><div>THIS: Hello<br>THAT: all<br>THIS: all<br>THAT: Hello</div></blockquote>Just because that name of the variable matches, it doesn't mean the contents will. The same applies in your script, even though you have a variable called channel, it doesn't mean it will contain a channel name. It will simply hold the contents of the information destined for that argument position.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Mar 19, 2003 5:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Gothic-Angel]]></name></author>
		<updated>2003-03-18T21:19:37-04:00</updated>

		<published>2003-03-18T21:19:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17984#p17984</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17984#p17984"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17984#p17984"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set channame "#blah"set nickserv "nickserv@services.dal.net"set chanserv "chanserv@services.dal.net"set memoserv "memoserv@services.dal.net"set blah "."set pass "pass.txt"set nicknametxt "nick.txt"set fs [open $nicknametxt r]set nickname [read $fs 32]bind notc - "*This nick is owned by someone else*" services_identbind notc - "*Password accepted*" services_checkbind notc - "*You do not have access to op people*" services_identbind time - "5 * *" services_checkbind time - "10 * *" services_checkbind time - "15 * *" services_checkbind time - "20 * *" services_checkbind time - "25 * *" services_checkbind time - "30 * *" services_checkbind time - "35 * *" services_checkbind time - "40 * *" services_checkbind time - "45 * *" services_checkbind time - "50 * *" services_checkbind time - "55 * *" services_checkbind time - "00 * *" services_checkbind pub n|n ${blah}identify pub:identbind pub n|n ${blah}op pub:opbind pub n|n ${blah}test services_checkbind ctcr - PING services_opbind mode - "* -o" services_autoreopbind dcc - mem services_memobind dcc - down services_shielddownbind dcc - up services_shieldupbind dcc - pass services_passbind dcc - nickname services_nickbind pub n|n ${blah}down shield_downpubbind pub n|n ${blah}up shield_uppubbind need - * cs:needproc services_ident {nick channel type} {global nickname nickserv if {[lsearch -exact [channel info $channel] -csneed] != -1} { return 0 }  switch -- $typeset fs [open $pass r]set pass [read $fs 32]close $fsputserv "NickServ :identify $nickname $pass"}proc services_ping {nick uhost hand args} {putlog "PING: Trying to ping chanserv"putserv "PRIVMSG $chanserv :\001PING"}proc services_op {nick uhost hand args} {global botnick chanserv channameputserv "PRIVMSG $chanserv :OP $channame $botnick"}proc services_check {nick uhost hand chan arg} {global botnick channame chanservif {![botisop $channame] &amp;&amp; [botonchan $channame] } {putserv "PRIVMSG $chanserv :\001PING $chanserv" }}proc pub:ident {channel type args} {global nickname nickserv file passif {[lsearch -exact [channel info $channel] -csneed] != -1} { return 0 } switch -- $typeset fs [open $pass r]set info [read $fs 32]putserv "NickServ :identify $info"close $fs}proc pub:op {nick host hand chan text} {global botnick chanserv channameputserv "PRIVMSG $chanserv :OP $chan $botnick"}proc services_autoreop {nick uhost hand chan deop deopd} {global botnick channameif {[matchattr $hand n|m]} { return }if {([string match -nocase $deopd $botnick]) } {putserv "ChanServ op $channame $botnick" }}proc services_autounban {chan unban} {global channame botnickputserv "ChanServ unban $channame"}proc services_memo {hand idx text} {global memoservputserv "PRIVMSG $memoserv $text"}proc services_shielddown {hand idx arg} {global botnickputserv "MODE $botnick -R"}proc services_shieldup {hand idx arg} {global botnickputserv "MODE $botnick +R"}proc shield_downpub {nick host hand chan text} {global botnickputserv "MODE $botnick -R"}proc shield_uppub {nick host hand chan text} {global botnickputserv "MODE $botnick +R"}setudef flag csneedbind need - * cs:need proc cs:need {channel type} {   global botnick   if {[lsearch -exact [channel info $channel] -csneed] != -1} { return 0 }   switch -- $type {    "unban" {      putserv "chanserv :unban $channel $botnick"    return 1 }    "invite" {      putserv "chanserv :invite $channel $botnick"    return 1 }    "limit" {      putserv "chanserv :invite $channel $botnick"    return 1 }  }}proc services_pass {hand idx text} {global passif {![matchattr $hand n]} { return }set fs [open $pass w]puts $fs "$text"putlog "Services: Nickpass has been set to ****"close $fs}proc services_nick {hand idx text} {global nicknametxtif {![matchattr $hand n]} { return }set fs [open $nicknametxt w]puts $fs "$text"close $fsputlog "Services: Nickname has been set to $text"}</code></pre></div>Ok, So far this is where I'm at however with the proc pub_ident I get this error [20:16] Tcl error [pub:ident]: no such channel record. I can't figure out why or how to fix it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1949">Gothic-Angel</a> — Tue Mar 18, 2003 9:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Gothic-Angel]]></name></author>
		<updated>2003-03-10T22:38:39-04:00</updated>

		<published>2003-03-10T22:38:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17689#p17689</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17689#p17689"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17689#p17689"><![CDATA[
I see, thanks for all the help everyone. Ill fully test it out when I have time.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1949">Gothic-Angel</a> — Mon Mar 10, 2003 10:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-03-10T15:26:21-04:00</updated>

		<published>2003-03-10T15:26:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17671#p17671</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17671#p17671"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17671#p17671"><![CDATA[
You don't need that code in your script.<br><br>It was an example of the code that can be used to do it.<br><br>The rest is what you need.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Mar 10, 2003 3:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Gothic-Angel]]></name></author>
		<updated>2003-03-10T13:48:59-04:00</updated>

		<published>2003-03-10T13:48:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17665#p17665</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17665#p17665"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17665#p17665"><![CDATA[
I should have been more specific I got that part down, I just didnt have the <div class="codebox"><p>Code: </p><pre><code>setudef flag something ... foreach $ch [chanlist] { if {[lsearch -exact [channel info $chan] -something] != -1} { continue } rest of the code.. } </code></pre></div>part down I got an error at the $ch part,<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1949">Gothic-Angel</a> — Mon Mar 10, 2003 1:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-03-10T12:45:05-04:00</updated>

		<published>2003-03-10T12:45:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17662#p17662</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17662#p17662"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17662#p17662"><![CDATA[
The majoc line in thsi script is "setudef flag csneed".<br><br>"setudef" the command, which tells the bot to create new channel based setting.<br><br>"flag" is the type, which can be flag (+ or - type setting like +bitch), int (which can hold a number, eg "20"), or str/string (can't remember which, new for 1.6.14 when it comes out. can hold text).<br><br>"csneed" is the name fo the setting.<br><br>In this case, a flag called csneed.<br><br>This can be changed using<br><br>.chanset #channel +csneed<br><br>The next line of code, that is is needed, is<div class="codebox"><p>Code: </p><pre><code>if {[lsearch -exact [channel info $channel] -csneed] != -1} { return 0 }</code></pre></div>This should be added in the positions mentioned.<br><br>You can now change the channel + or -csneed now.<br><br>You may wish to change the csneed, to somthing you like. However, once you have chosen the name, stick to it, else you have to change the channel settings again.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Mar 10, 2003 12:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Gothic-Angel]]></name></author>
		<updated>2003-03-10T12:33:25-04:00</updated>

		<published>2003-03-10T12:33:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17661#p17661</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17661#p17661"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17661#p17661"><![CDATA[
Im still lost on how to implement the code, im rather new and just trying to figure things out.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1949">Gothic-Angel</a> — Mon Mar 10, 2003 12:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-03-10T11:54:08-04:00</updated>

		<published>2003-03-10T11:54:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17656#p17656</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17656#p17656"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17656#p17656"><![CDATA[
Exactly. ;]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Mar 10, 2003 11:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Gothic-Angel]]></name></author>
		<updated>2003-03-10T11:27:53-04:00</updated>

		<published>2003-03-10T11:27:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17652#p17652</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17652#p17652"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17652#p17652"><![CDATA[
so to use this in my script I would have to add a special flag for a channel? like .chanset #blah +service ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1949">Gothic-Angel</a> — Mon Mar 10, 2003 11:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-03-02T16:45:06-04:00</updated>

		<published>2003-03-02T16:45:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17310#p17310</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17310#p17310"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17310#p17310"><![CDATA[
Hi, for multiple channels support add something like:<div class="codebox"><p>Code: </p><pre><code>setudef flag something...foreach $ch [chanlist] {if {[lsearch -exact [channel info $chan] -something] != -1} { continue }rest of the code..}</code></pre></div>And change from 'something' flag to whatever suits you better. For it's *need's* use something like this:<div class="codebox"><p>Code: </p><pre><code>setudef flag csneedbind need - * cs:needproc cs:need {channel type} {   global botnick  if {[lsearch -exact [channel info $channel] -csneed] != -1} { return 0 }  switch -- $type {    "op" {      putserv "PRIVMSG Chanserv :op $channel $botnick"    return 1 }    "unban" {      putserv "PRIVMSG Chanserv :unban $channel $botnick"    return 1 }    "invite" {      putserv "PRIVMSG Chanserv :invite $channel $botnick"    return 1 }    "limit" {      putserv "PRIVMSG Chanserv :invite $channel $botnick"    return 1 }  }}</code></pre></div>Also, for it's *unban* thing:<div class="codebox"><p>Code: </p><pre><code>bind mode - "* +b" my:chbanproc cs:chban {nick uhost hand chan mc ban} {  global botname  set bmask "*!*@[lindex [split $uhost @] 1]"   if {[string match "$ban" "$botname"] &amp;&amp; [botisop $chan]} {    if {[string match "$bmask" "$botname"]} { set bmask [maskhost *!*[string trimleft $uhost ~]]}      if {$nick == "X" } {      putserv "PRIVMSG Chanserv :unban $chan $bmask"      return } else {      putquick "MODE $chan -bo+b $ban $nick $bmask"    putquick "KICK $chan $nick :\002\00312Don't ban me you twit!" }    return  }}</code></pre></div>Replace the user defined channel flags to what you want. Hope I've helped you or something.. <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=187">caesar</a> — Sun Mar 02, 2003 4:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Gothic-Angel]]></name></author>
		<updated>2003-03-02T15:28:50-04:00</updated>

		<published>2003-03-02T15:28:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17309#p17309</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17309#p17309"/>
		<title type="html"><![CDATA[Need help with my tcl.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17309#p17309"><![CDATA[
<a href="http://www.justintime.darktech.org/DALnetServices.tcl" class="postlink">www.justintime.darktech.org/DALnetServices.tcl</a><br><br><br>I want to have it support multiple channels, and send the op request to only the channel that he is needed to op in.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1949">Gothic-Angel</a> — Sun Mar 02, 2003 3:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
