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

	<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>2004-12-06T07:00:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Shoshana]]></name></author>
		<updated>2004-12-06T07:00:28-04:00</updated>

		<published>2004-12-06T07:00:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43561#p43561</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43561#p43561"/>
		<title type="html"><![CDATA[Less stuck....]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43561#p43561"><![CDATA[
Again, thanks to all three of you!!!!!!<br><br>It still gets hung up for me on my bot. At least no bot crashes and it sends the idx message. But it keeps doing that for whatever I enter. I know I set it exactly as you coded it.<br><br>But MOST IMPORTANT.... I learned a lot from you guys and actually applied some to another tcl and that one WERKS! So, from here on, I need to play with this and add the missing (maybe bot version specific, maybe something else) ingredient that will get me past that stuck place. And, I will.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> I'll keep you posted in a few days.<br><br>Thank you for your precious skill and mostly, your patience with me. And thanks for taking the time to code it and even test it. You guys are totally, the nicest I've found on many forums.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5737">Shoshana</a> — Mon Dec 06, 2004 7:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Shoshana]]></name></author>
		<updated>2004-12-06T06:58:59-04:00</updated>

		<published>2004-12-06T06:58:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43560#p43560</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43560#p43560"/>
		<title type="html"><![CDATA[Less stuck....]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43560#p43560"><![CDATA[
Again, thanks to all three of you!!!!!!<br><br>It still gets hung up for me on my bot. At least no bot crashes and it sends the idx message. But it keeps doing that for whatever I enter. I know I set it exactly as you coded it.<br><br>But MOST IMPORTANT.... I learned a lot from you guys and actually applied some to another tcl and that one WERKS! So, from here on, I need to play with this and add the missing (maybe bot version specific, maybe something else) ingredient that will get me past that stuck place. And, I will.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> I'll keep you posted in a few days.<br><br>Thank you for your precious skill and mostly, your patience with me.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5737">Shoshana</a> — Mon Dec 06, 2004 6:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-06T02:56:01-04:00</updated>

		<published>2004-12-06T02:56:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43554#p43554</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43554#p43554"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43554#p43554"><![CDATA[
<blockquote class="uncited"><div>Again, thank you demond. After reading a few times, almost 75% makes sense to me now and that is a big help no matter what. I did try it and it doesn't get past <strong class="text-strong">usage:  &lt;nick|hostmask&gt; &lt;reason&gt;</strong>.<br><br>No matter what I enter after the command, I get the idx message. It gets stuck there.</div></blockquote>it works on my bot as intended<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Dec 06, 2004 2:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2004-12-06T02:39:28-04:00</updated>

		<published>2004-12-06T02:39:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43552#p43552</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43552#p43552"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43552#p43552"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind dcc o|o tempban temp_ban proc temp_ban {hand idx text} {   set chan [lindex [split $text] 0]   set victim [lindex [split $text] 1]   set reason [join [lrange [split $text] 2 end]]   if {$victim == "" || $reason == ""} {     putdcc $idx "usage: .$::lastbind &lt;nick|hostmask&gt; &lt;reason&gt;"     return   }   if {![botonchan $chan] || ![botisop $chan]} return   if ![matchattr $hand o|o $chan] return  ;#not +o for that channel   if ![string match *!*@* $victim] {         ;# nick specified     if ![onchan $victim $chan] return        ;# not on channel, nothing to do     append victim ![getchanhost $victim]  ;# construct the hostmask   }   if ![matchattr [finduser $victim] of|of $chan] {  ;# victim not +o or +f     newchanban $chan [maskhost $victim] script $reason     foreach nick [chanlist $chan -of&amp;-of] {       if [string match $victim $nick![getchanhost $nick]] {         append kicklist $nick ,       }     }     if [info exists kicklist] {       putkick $chan $kicklist $reason     }     return 1   } } </code></pre></div>I just edited the variable but it should work like<br><br>.tempban &lt;channel&gt; &lt;nick|host&gt; &lt;reason&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Mon Dec 06, 2004 2:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Shoshana]]></name></author>
		<updated>2004-12-06T00:22:16-04:00</updated>

		<published>2004-12-06T00:22:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43542#p43542</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43542#p43542"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43542#p43542"><![CDATA[
Again, thank you demond. After reading a few times, almost 75% makes sense to me now and that is a big help no matter what. I did try it and it doesn't get past <strong class="text-strong">usage:  &lt;nick|hostmask&gt; &lt;reason&gt;</strong>.<br><br>No matter what I enter after the command, I get the idx message. It gets stuck there.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5737">Shoshana</a> — Mon Dec 06, 2004 12:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-05T22:32:52-04:00</updated>

		<published>2004-12-05T22:32:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43539#p43539</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43539#p43539"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43539#p43539"><![CDATA[
well, here you go:<div class="codebox"><p>Code: </p><pre><code>bind dcc o|o tempban temp_banproc temp_ban {hand idx text} {  set chan [lindex [console $idx] 0]  set victim [lindex [split $text] 0]   set reason [join [lrange [split $text] 1 end]]   if {$victim == "" || $reason == ""} {    putdcc $idx "usage: .$::lastbind &lt;nick|hostmask&gt; &lt;reason&gt;"    return  }  if {![botonchan $chan] || ![botisop $chan]} return  if ![matchattr $hand o|o $chan] return  ;#not +o for that channel  if ![string match *!*@* $victim] {         ;# nick specified    if ![onchan $victim $chan] return        ;# not on channel, nothing to do     append victim ![getchanhost $victim]  ;# construct the hostmask  }   if ![matchattr [finduser $victim] of|of $chan] {  ;# victim not +o or +f    newchanban $chan [maskhost $victim] script $reason    foreach nick [chanlist $chan -of&amp;-of] {      if [string match $victim $nick![getchanhost $nick]] {        append kicklist $nick ,      }     }    if [info exists kicklist] {      putkick $chan $kicklist $reason    }    return 1  } } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun Dec 05, 2004 10:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Shoshana]]></name></author>
		<updated>2004-12-05T21:56:50-04:00</updated>

		<published>2004-12-05T21:56:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43537#p43537</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43537#p43537"/>
		<title type="html"><![CDATA[its starting to make sense]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43537#p43537"><![CDATA[
What you showed is starting to make sense to me but after<br><blockquote class="uncited"><div> if ![matchattr [finduser $victim] of|of] }</div></blockquote>whatever I put after to make the ban, <br><br>  if ![matchattr [finduser $victim] of|of] } {<br>  newban $victim $hand "Banned: $reason" $tempbantime<br>  return 1<br>   }<br>}<br><br>I get "Tcl error [temp_ban]: invalid command name "temp_ban"" now. So, I am still not understanding or doing it right, am I? <br><br>Also, do I need to set the mask to be banned? I really appreciate this help, sincerely. I think if I see the whole thing, I will understand the parts as a whole better.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5737">Shoshana</a> — Sun Dec 05, 2004 9:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-05T19:55:25-04:00</updated>

		<published>2004-12-05T19:55:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43529#p43529</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43529#p43529"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43529#p43529"><![CDATA[
in my example, $user is the IRC username<br><br>in your case, you need to check whether the argument supplied is nick or hostmask and if it's a nick, to append its corresponding channel user@host, using [getchanhost]:<div class="codebox"><p>Code: </p><pre><code>proc tempban {hand idx text} {   set victim [lindex [split $text] 0]   set reason [join [lrange [split $text] 1 end]]   if ![string match *!*@* $victim] {    if ![onchan $victim] return ;# not on channel, nothing to do    append victim ![getchanhost $victim]  }  if ![matchattr [finduser $victim] of|of] {  # not an op or friend, proceed with ban...  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun Dec 05, 2004 7:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Shoshana]]></name></author>
		<updated>2004-12-05T18:54:35-04:00</updated>

		<published>2004-12-05T18:54:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43526#p43526</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43526#p43526"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43526#p43526"><![CDATA[
Ok, right.<br><br>Now, when I added the variable 'user' <br><blockquote class="uncited"><div>if [matchattr [finduser $nick!$user@$host] of|of $chan] {</div></blockquote> <br><br>to my proc, I got  "<strong class="text-strong">can't read "user": no such variable</strong>".<br><br>How do I add the $user variable and define its value in my proc?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5737">Shoshana</a> — Sun Dec 05, 2004 6:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2004-12-05T18:42:14-04:00</updated>

		<published>2004-12-05T18:42:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43522#p43522</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43522#p43522"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43522#p43522"><![CDATA[
<blockquote class="uncited"><div>How would this check the victim's mask for Op flags?</div></blockquote>In the Command Console type ".help whois" and you'll get a full list of all flags used by the bot and also see that <strong class="text-strong">o</strong> is the Op flag.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sun Dec 05, 2004 6:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Shoshana]]></name></author>
		<updated>2004-12-05T17:07:50-04:00</updated>

		<published>2004-12-05T17:07:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43515#p43515</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43515#p43515"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43515#p43515"><![CDATA[
Thank you for answering. Maybe there is a basic something I don't understand about all of this.<br><blockquote class="uncited"><div>if [matchattr [finduser $nick!$user@$host] of|of $chan] { </div></blockquote>How would this check the victim's mask for Op flags?<br><br>Something else I need to learn. Whenever I use any other variable than what I originally posted, I get "no value given for parameter". I put the variable, lets say, 'user' with the other variables,  { handle idx victim user } and I thought that <strong class="text-strong">$</strong>user is the value. I guess not? So, how do I add variables and 'define' their value. This seems to be different with DCC procs.<br><br>I have read so many docs and sites and nothing helps me understand this.<br>Thanks again.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5737">Shoshana</a> — Sun Dec 05, 2004 5:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-05T09:44:22-04:00</updated>

		<published>2004-12-05T09:44:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43483#p43483</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43483#p43483"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43483#p43483"><![CDATA[
also, use this to split nick|mask from the reason:<div class="codebox"><p>Code: </p><pre><code>proc tempban {hand idx text} {  set victim [lindex [split $text] 0]  set reason [join [lrange [split $text] 1 end]]  ...</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun Dec 05, 2004 9:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-05T09:34:55-04:00</updated>

		<published>2004-12-05T09:34:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43482#p43482</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43482#p43482"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43482#p43482"><![CDATA[
you check given hostmask against the userlist using [finduser], for example:<div class="codebox"><p>Code: </p><pre><code>if [matchattr [finduser $nick!$user@$host] of|of $chan] {# there is a user with that hostmask who is global/channel op or friend} else {# no match}</code></pre></div>use [maskhost] to get the ban in the form you want:<div class="codebox"><p>Code: </p><pre><code>newchanban $chan [maskhost $nick!$user@$host] $creator $reason</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun Dec 05, 2004 9:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Shoshana]]></name></author>
		<updated>2004-12-05T06:21:09-04:00</updated>

		<published>2004-12-05T06:21:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43475#p43475</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43475#p43475"/>
		<title type="html"><![CDATA[DCC ban proc need help...desperate newbie]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43475#p43475"><![CDATA[
Why do all newbies say this, "I am a newbie"? Well, I am. I have the following proc. <br><br>When I do .tempban &lt;nick&gt; it works and will not ban ops/op'd bots.<br>When I do .tempban &lt;ident@host&gt; or any part, it bans Ops which I don't want it to do. <br>I can see it needs to check the victim mask against flags but I don't know how to do it. <br>I have read almost  every related post on this site. I've also looked at some 10-20 other scripts for clues, tried this and that and every time I change something, I get that there is no value for a variable, or no variable, no command or whatever. Seached most if not all of the other eggdrop/tcl sites and I am just plain stuck. I don't know enough.<br><br>The other thing is that I would prefer it bans *!*ident@*.host something like that.<br><blockquote class="uncited"><div>set tempbantime 10<br>bind dcc V|V tempban temp_ban<br><br>### .TEMPBAN &lt;nick|mask&gt; [reason]<br><br>proc temp_ban { handle idx victim } {<br>   global tempbantime<br>   set channel [lindex [console $idx] 0]<br>   set victim "$victim "<br>   if {[matchattr [strlwr $victim] o|o $channel]} {<br>putdcc $idx "\002You cannot ban Ops or Bots!\002"<br>return 0<br>}<br>   set mask "[string range $victim 0 [expr [string first " " $victim] -1]]"<br>   set reason "[string trimleft $victim $mask]"<br>   if { $mask == "" } {<br>    putdcc $idx ".tempban - bans a users &lt;nick|mask&gt; for $tempbantime                                      minutes"<br>    putdcc $idx "How to use it: .tempban &lt;nick|mask&gt; &lt;reason&gt; &lt;time&gt;"<br>    return 0<br>    } <br>   newban $mask "$reason" $tempbantime<br>  }</div></blockquote>The bot is 1.6.4 on Dalnet. Any and all help would be appreciated so much, I couldn' tell you in words. I am exhausted after 4 days of trying to make this work.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5737">Shoshana</a> — Sun Dec 05, 2004 6:21 am</p><hr />
]]></content>
	</entry>
	</feed>
