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

	<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-08-17T15:16:32-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-17T15:16:32-04:00</updated>

		<published>2003-08-17T15:16:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25173#p25173</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25173#p25173"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25173#p25173"><![CDATA[
thanx alot <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=3085">Sir_Fz</a> — Sun Aug 17, 2003 3:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-17T15:10:02-04:00</updated>

		<published>2003-08-17T15:10:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25172#p25172</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25172#p25172"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25172#p25172"><![CDATA[
<blockquote class="uncited"><div>worked prefectly <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> thanx alot.<br><br>may I ask why do u do a <strong class="text-strong">[string tolower $chan</strong>\<strong class="text-strong">$nick]</strong> ? (like what does string tolower do ?)<br><br>and also what does <strong class="text-strong">lappend</strong> do ? (gathers variables or what ?)</div></blockquote>'string tolower' converts a string all to lowercase<br>'lappend' is a list operator that appends elements on to a list variable.<br><br>For a listing of commands, and their descriptions, I suggest taking a look at the TCL manpages:<br><a href="http://www.tcl.tk/man/tcl8.4/TclCmd/contents.htm" class="postlink">http://www.tcl.tk/man/tcl8.4/TclCmd/contents.htm</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Aug 17, 2003 3:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-17T15:00:22-04:00</updated>

		<published>2003-08-17T15:00:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25171#p25171</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25171#p25171"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25171#p25171"><![CDATA[
worked prefectly <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> thanx alot.<br><br>may I ask why do u do a <strong class="text-strong">[string tolower $chan</strong>\<strong class="text-strong">$nick]</strong> ? (like what does string tolower do ?)<br><br>and also what does <strong class="text-strong">lappend</strong> do ? (gathers variables or what ?)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Aug 17, 2003 3:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-17T13:12:20-04:00</updated>

		<published>2003-08-17T13:12:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25164#p25164</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25164#p25164"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25164#p25164"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind kick - * channel:kick   proc channel:kick {nick uhost hand chan targ rsn} {   if {![string match -nocase "$targ" $::botnick]} { return }  global revengebans  set chan [string tolower $chan]  putquick "PRIVMSG chanserv@services.dal.net :deop $chan $nick" -next   putquick "PRIVMSG chanserv@services.dal.net :unban $chan"  if {![info exists revengebans($chan)]} { set revengebans($chan) {} }  lappend revengebans($chan) [list $nick *!*@[lindex [split $uhost @] 1]]}  bind mode - "* +o" lamer:remove proc lamer:remove {nick uhost hand chan mc vict} {   global revengebans   if {[string tolower $vict] != [string tolower $::botnick]} { return }  set chan [string tolower $chan]  if {![info exists revengebans($chan)]} { return }  foreach element $revengebans($chan) {    set revenge_nick [lindex $element 0]    set revenge_banmask [lindex $element 1]    if {[onchan $revenge_nick $chan]} {       putserv "mode $chan +b $revenge_banmask"        putkick $chan $revenge_nick "Lamer Removed."     }   }  unset revengebans($chan)  }</code></pre></div>Try that..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Aug 17, 2003 1:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-17T04:26:43-04:00</updated>

		<published>2003-08-17T04:26:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25143#p25143</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25143#p25143"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25143#p25143"><![CDATA[
ok, how can I make these list... or arrays, I don't have any experiance in them. It would realy be good if I learn them <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Aug 17, 2003 4:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-08-17T03:46:33-04:00</updated>

		<published>2003-08-17T03:46:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25139#p25139</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25139#p25139"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25139#p25139"><![CDATA[
Touche! <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 Aug 17, 2003 3:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-17T02:19:29-04:00</updated>

		<published>2003-08-17T02:19:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25138#p25138</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25138#p25138"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25138#p25138"><![CDATA[
<blockquote class="uncited"><div>Actualy no, you've said:<blockquote class="uncited"><div>you need to globalize some variables in the channel:kick procedure. <br>Also, the problem with this approach is if your bot is kicked successivley before applying the initial revenge reaction... You will need a list of some type, or as you suggested, creating a user record, and giving them a script defined flag.</div></blockquote>so I don't see the word <em class="text-italics">array</em> mentioned there <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> .. kidding <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote>From a prior reply:<blockquote class="uncited"><div>Then I'd recommend: <br>1) adding the host/chan to a global variable (preferably a listed <strong class="text-strong">array</strong>, <br>ie. lamerstoban(#chan) {host1 host2}) <br>2) using a mode bind to check for the bot getting opped, and then <br>applying the bans in the listed <strong class="text-strong">array</strong>. <br>3) unsetting the global listed <strong class="text-strong">array</strong> variable </div></blockquote>So, the word <strong class="text-strong">array</strong> has been mentioned  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> <br><br>Also, I said that arrays in TCL are implemented as lists..Which isn't totally accurate..I'll expand:<br>TCL Arrays are implemented as hashtables, which in turn, are essentially indexed <strong class="text-strong">lists</strong>.<br><br>We'll get you taught yet, caesar  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Aug 17, 2003 2:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-08-17T02:06:51-04:00</updated>

		<published>2003-08-17T02:06:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25137#p25137</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25137#p25137"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25137#p25137"><![CDATA[
Actualy no, you've said:<blockquote class="uncited"><div>you need to globalize some variables in the channel:kick procedure. <br>Also, the problem with this approach is if your bot is kicked successivley before applying the initial revenge reaction... You will need a list of some type, or as you suggested, creating a user record, and giving them a script defined flag.</div></blockquote>so I don't see the word <em class="text-italics">array</em> mentioned there <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> .. kidding <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 Aug 17, 2003 2:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-17T02:04:07-04:00</updated>

		<published>2003-08-17T02:04:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25136#p25136</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25136#p25136"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25136#p25136"><![CDATA[
<blockquote class="uncited"><div>The <em class="text-italics">-next</em> added at the end of a putserv, putquick, or puthelp will push the message to the front of the queue.<br><br>Or making an array like #channel(user) or something..</div></blockquote>Arrays in TCL are implemented as lists.. thus, what I already suggested  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Aug 17, 2003 2:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-08-17T01:56:55-04:00</updated>

		<published>2003-08-17T01:56:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25135#p25135</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25135#p25135"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25135#p25135"><![CDATA[
The <em class="text-italics">-next</em> added at the end of a putserv, putquick, or puthelp will push the message to the front of the queue.<br><br>Or making an array like #channel(user) or something..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Aug 17, 2003 1:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-08-16T23:24:23-04:00</updated>

		<published>2003-08-16T23:24:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25130#p25130</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25130#p25130"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25130#p25130"><![CDATA[
<blockquote class="uncited"><div>used this :<div class="codebox"><p>Code: </p><pre><code>set revenge "0"set revenge_nick ""set revenge_banmask ""bind kick - * channel:kick   proc channel:kick {nick uhost hand chan targ rsn} {  if {[string match -nocase "$targ" $::botnick]} {  putquick "PRIVMSG chanserv@services.dal.net :deop $chan $nick" -next  putquick "PRIVMSG chanserv@services.dal.net :unban $chan"  set revenge "1"  set revenge_nick "$nick"  set revenge_banmask "*!*@[lindex [split $uhost @] 1]" }}   bind mode - "* +o" lamer:removeproc lamer:remove {nick uhost hand chan mc vict} {global revenge revenge_nick revenge_banmask if {$vict == $::botnick} {  if {$revenge == "1"} {      if {[onchan $revenge_nick $chan]} {        putserv "mode $chan +b $revenge_banmask"          putkick $chan $revenge_nick "Lamer Removed."        unset revenge_nick        unset revenge_banmask        set revenge "0"           }     }  }}</code></pre></div>didn't give any errors, but it didn't work... anyone can detect the problem ?</div></blockquote>you need to globalize some variables in the channel:kick procedure.<br>Also, the problem with this approach is if your bot is kicked successivley before applying the initial revenge reaction... You will need a list of some type, or as you suggested, creating a user record, and giving them a script defined flag.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat Aug 16, 2003 11:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-08-16T20:28:16-04:00</updated>

		<published>2003-08-16T20:28:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25118#p25118</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25118#p25118"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25118#p25118"><![CDATA[
what is "-next " for?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Sat Aug 16, 2003 8:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-16T20:10:24-04:00</updated>

		<published>2003-08-16T20:10:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25116#p25116</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25116#p25116"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25116#p25116"><![CDATA[
used this :<div class="codebox"><p>Code: </p><pre><code>set revenge "0"set revenge_nick ""set revenge_banmask ""bind kick - * channel:kick   proc channel:kick {nick uhost hand chan targ rsn} {  if {[string match -nocase "$targ" $::botnick]} {  putquick "PRIVMSG chanserv@services.dal.net :deop $chan $nick" -next  putquick "PRIVMSG chanserv@services.dal.net :unban $chan"  set revenge "1"  set revenge_nick "$nick"  set revenge_banmask "*!*@[lindex [split $uhost @] 1]" }}   bind mode - "* +o" lamer:removeproc lamer:remove {nick uhost hand chan mc vict} {global revenge revenge_nick revenge_banmask if {$vict == $::botnick} {  if {$revenge == "1"} {      if {[onchan $revenge_nick $chan]} {        putserv "mode $chan +b $revenge_banmask"          putkick $chan $revenge_nick "Lamer Removed."        unset revenge_nick        unset revenge_banmask        set revenge "0"           }     }  }}</code></pre></div>didn't give any errors, but it didn't work... anyone can detect the problem ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Aug 16, 2003 8:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-08-16T19:50:56-04:00</updated>

		<published>2003-08-16T19:50:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25115#p25115</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25115#p25115"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25115#p25115"><![CDATA[
excellent dedan <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 think this should do it:<div class="codebox"><p>Code: </p><pre><code>set revenge "0" set revenge_nick "" set revenge_banmask "" bind kick - * revenge:bot bind mode "* +o" bot:revengeproc revenge:bot {nick uhost hand chan targ rsn} {  global revenge revenge_nick revenge_ban_mask  if {[string match -nocase $targ $::botnick]} {   putquick "PRIVMSG chanserv@services.dal.net :deop $chan $nick" -next   putquick "PRIVMSG chanserv@services.dal.net :unban $chan"       set revenge "1"     set revenge_nick $nick     set revenge_banmask "*!*@[lindex [split $uhost @] 1]"   }} proc bot:revenge {nick uhost hand chan mc vict} {global revenge revenge_nick revenge_banmask   if {$vict == $botnick} {    if {$revenge == "1"} {       if {[isonchan $revenge_nick $chan]} {         putserv "mode +b $revenge_ban_mask $chan"         putkick $chan $revenge_nick "Lamer Removed."        unset revenge_nick        unset revenge_banmask         set revenge "0"         }     } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Aug 16, 2003 7:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-08-16T23:19:20-04:00</updated>

		<published>2003-08-16T19:30:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25111#p25111</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25111#p25111"/>
		<title type="html"><![CDATA[Help with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25111#p25111"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set revenge "0"set revenge_nick "none"set revenge_ban_mask "none"bind kick -|- revenge:botproc revenge:bot  global revenge revenge_nick revenge_ban_mask  if nick is botnick    set revenge "1"    set revenge_nick $nick    set revenge_ban_mask $uhost    return 0}bind mode +o bot:revengeproc bot:revenge  global revenge revenge_nick revenge_ban_mask  if $botnick == oped nick    if $revenge == 1      if {[ison $revenge_nick $chan]}        putserv mode +b $revenge_ban_mask $chan        putkick $revenge_nick         set all the revenge vars to ""        set revenge "0"         return 0   }  }}</code></pre></div>ofcourse this is just a rough draft, but<br>maybe this is something you can use<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Sat Aug 16, 2003 7:30 pm</p><hr />
]]></content>
	</entry>
	</feed>
