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

	<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-05T02:42:53-04:00</updated>

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

		<entry>
		<author><name><![CDATA[bryanwny]]></name></author>
		<updated>2013-01-05T02:42:53-04:00</updated>

		<published>2013-01-05T02:42:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100547#p100547</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100547#p100547"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100547#p100547"><![CDATA[
Haven't really had an issue with people leaving +M or +R on lately, so I kind of forgot about this, but I still haven't really been able to find (or modify) a script to do just what I'm looking for.<br><br>I run AllProtection which sets modes to stop floods for a minute, but if people keep rejoining and flooding numerous times, the ops set either +M or +R.  The problem is (especially with +R) that it gets left on accidentally for hours at a time and the channel dwindles down to half the normal size.<br><br>This is what I'm looking for, and hopefully someone can help me out if they're feeling generous and/or bored.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>1)  Trigger the timer to start only when +M and/or +R were set.  Not a timer that just runs every 30 minutes, because if +M/+R were set at the 25th minute, it's going to unlock the channel in 5 mins and not the 30 I was hoping for.<br><br>2)  Make the bot check to see if someone else removed the +M/+R before that 30 minutes, so that it doesn't set -M/-R when it wasn't even set anymore.<br><br>After thinking about it, I guess I don't really care about it being dynamic since I would probably never change it anyways after it's initially set.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12079">bryanwny</a> — Sat Jan 05, 2013 2:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bryanwny]]></name></author>
		<updated>2012-10-08T18:52:43-04:00</updated>

		<published>2012-10-08T18:52:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100109#p100109</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100109#p100109"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100109#p100109"><![CDATA[
I tried out metroids version of this script, because I liked the fact of being able to turn it on/off and changing the modes easily from DCC chat if needed.<br><br>Is there any way to make the bot actually check after the timer if the mode is still actually on, before removing it?  Sometimes another OP will remove the +i, and the bot still sets -i later when it isn't necessary.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12079">bryanwny</a> — Mon Oct 08, 2012 6:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ThE-UnNaMeD]]></name></author>
		<updated>2008-02-18T09:28:09-04:00</updated>

		<published>2008-02-18T09:28:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80940#p80940</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80940#p80940"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80940#p80940"><![CDATA[
<blockquote class="uncited"><div>code</div></blockquote>Tnx!! <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=9494">ThE-UnNaMeD</a> — Mon Feb 18, 2008 9:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-02-17T15:11:50-04:00</updated>

		<published>2008-02-17T15:11:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80925#p80925</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80925#p80925"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80925#p80925"><![CDATA[
Another advice, since reapply:mode only calls pushmode, with the exact same number of arguments, in the same order - why not simply call pusmode in the first place?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Feb 17, 2008 3:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2008-02-17T14:21:12-04:00</updated>

		<published>2008-02-17T14:21:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80921#p80921</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80921#p80921"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80921#p80921"><![CDATA[
You still haven't corrected the main mistake:<div class="codebox"><p>Code: </p><pre><code>if {[string match $remmodes *$mode*]} {</code></pre></div>As I already said before that wildcards are used on the 1st operand of [string match] and not on the 2nd. So what you meant here is<div class="codebox"><p>Code: </p><pre><code>if {[string match *$mode* $remmodes]} {</code></pre></div>Then it would make some sense, however this does not care about whether the modes where set at the same time or separately.<br><br>I didn't say that your code is completely wrong metroid, learn to accept critic.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Feb 17, 2008 2:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2008-02-17T12:17:48-04:00</updated>

		<published>2008-02-17T12:17:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80914#p80914</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80914#p80914"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80914#p80914"><![CDATA[
Forgot about the + in $mode. So that's fixed.<br>And I'm fully aware that MODE only sends 1 mode through which is why I used pushmode.<br><blockquote class="uncited"><div>  pushmode &lt;channel&gt; &lt;mode&gt; [arg]<br>    Description: sends out a channel mode change (ex: pushmode #lame +o<br>      goober) through the bot's queuing system. All the mode changes will<br>      be sent out at once (combined into one line as much as possible) after<br>      the script finishes, or when 'flushmode' is called.<br>    Returns: nothing<br>    Module: irc</div></blockquote>And in this case, it will wait long enough to set the other modes too.<br><br>Don't be too quick to say that my code is completely wrong when there was only a small mistake there.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sun Feb 17, 2008 12:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2008-02-17T10:24:10-04:00</updated>

		<published>2008-02-17T10:24:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80912#p80912</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80912#p80912"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80912#p80912"><![CDATA[
Tcl-commands.doc:<blockquote class="uncited"><div>MODE (stackable)<br>bind mode &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>proc-name &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;channel&gt; &lt;mode-change&gt; &lt;target&gt;<br><br>Description: mode changes are broken down into their component<br>parts before being sent here, so the &lt;mode-change&gt; will <strong class="text-strong">always<br>be a <span style="text-decoration:underline">single</span> mode</strong>, such as "+m" or "-o". target will show the<br>argument of the mode change (for o/v/b/e/I) or "" if the set<br>mode does not take an argument. The bot's automatic response<br>to a mode change will happen AFTER all matching Tcl procs are<br>called. The mask will be matched against '#channel +/-modes'<br>and can contain wildcards.</div></blockquote>So, in your case metroid, $mode will never contain more than one mode. Also, the wildcards in [string match] can only be applied on the first operand and not the 2nd. Another problem with your code is that it's reapplying the mode which is not what's requested, and of course setting +$mode is not valid since mode already contains the '+' char.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Feb 17, 2008 10:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2008-02-17T19:43:45-04:00</updated>

		<published>2008-02-17T10:15:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80910#p80910</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80910#p80910"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80910#p80910"><![CDATA[
A simple and dynamic form of this script would be:<br><br>Use ".chanset #channel remove-modes mir" to make the bot remove +mir after &lt;so many&gt; seconds.<br><div class="codebox"><p>Code: </p><pre><code>setudef str remove-modesbind MODE -|- "% +*" check:modeproc check:mode {nickname hostname handle channel mode target} {    if {[set remmodes [channel get $channel "remove-modes"]] == ""} {        return 0    }    set mode [string trimleft $mode "+"]    if {[string match *$mode* $remmodes]} {        utimer 60 [list pushmode $channel -$mode]    }}</code></pre></div>edit: whatever.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sun Feb 17, 2008 10:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2008-02-16T14:00:51-04:00</updated>

		<published>2008-02-16T14:00:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80899#p80899</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80899#p80899"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80899#p80899"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind mode - {% +m} rem:mibind mode - {% +i} rem:mibind mode - {% +r} rem:miproc rem:mi {nick uhost hand chan mc targ} { global remmi set remmi($mc:$chan) 1 if {![info exists remmi(+m:$chan)] || ![info exists remmi(+r:$chan)] || ![info exists remmi(+i:$chan)]} {  return 0 } if {$remmi(+m:$chan) &amp;&amp; $remmi(+i:$chan) &amp;&amp; $remmi(+r:$chan)} {  utimer 30 [list rem:modes $chan] }}proc rem:modes chan { global remmi pushmode $chan -m pushmode $chan -i pushmode $chan -r set remmi(+m:$chan) [set remmi(+i:$chan) [set remmi(+r:$chan) 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 Feb 16, 2008 2:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[noobman]]></name></author>
		<updated>2008-02-16T09:01:09-04:00</updated>

		<published>2008-02-16T09:01:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80897#p80897</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80897#p80897"/>
		<title type="html"><![CDATA[problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80897#p80897"><![CDATA[
ok i tried to test it and add for +r mode too.<br><div class="codebox"><p>Code: </p><pre><code>bind mode - {% +m} rem:mi bind mode - {% +i} rem:mi bind mode - {% +r} rem:miproc rem:mi {nick uhost hand chan mc targ} {  global remmi  set remmi($mc:$chan) 1  if {![info exists remmi(+m:$chan)] || ![info exists remmi(+r:$chan)] || ![info exists remmi(+i:$chan)]} {   return 0  }  if {$remmi(+m:$chan) &amp;&amp; {$remmi(+i:$chan) &amp;&amp; $remmi(+r:$chan)} {   utimer 30 [list rem:modes $chan]  } } proc rem:modes chan {  global remmi  pushmode $chan -m  pushmode $chan -i pushmode $chan -r  set remmi(+m:$chan) [set remmi(+i:$chan) [set remmi(+r:$chan) 0]</code></pre></div> and i get the following error :<br><strong class="text-strong"> missing close-brace<br>    while executing<br>"proc rem:mi {nick uhost hand chan mc targ} {<br> global remmi<br> set remmi($mc:$chan) 1<br> if {![info exists remmi(+m:$chan)] || ![info exists remmi(+r:$c..."<br>    (file "scripts/quitamodos.tcl" line 5)<br>    invoked from within<br></strong><br><br>Please what must i do to solve it ? Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9488">noobman</a> — Sat Feb 16, 2008 9:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2008-02-16T08:04:48-04:00</updated>

		<published>2008-02-16T08:04:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80895#p80895</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80895#p80895"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80895#p80895"><![CDATA[
Yes, that's correct.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Feb 16, 2008 8:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[noobman]]></name></author>
		<updated>2008-02-16T07:38:43-04:00</updated>

		<published>2008-02-16T07:38:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80894#p80894</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80894#p80894"/>
		<title type="html"><![CDATA[and to set it in 30 seconds ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80894#p80894"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>timer 2 [list rem:modes $chan]</code></pre></div>it means after 2 min, remove +mi , and to can change it to 30 seconds ?<br><br>is it <div class="codebox"><p>Code: </p><pre><code>utimer 30 [list rem:modes $chan]</code></pre></div> ??<br><br>thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9488">noobman</a> — Sat Feb 16, 2008 7:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2008-02-16T06:51:29-04:00</updated>

		<published>2008-02-16T06:51:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80891#p80891</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80891#p80891"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80891#p80891"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind mode - {% +m} rem:mibind mode - {% +i} rem:miproc rem:mi {nick uhost hand chan mc targ} { global remmi set remmi($mc:$chan) 1 if {![info exists remmi(+m:$chan)] || ![info exists remmi(+i:$chan)]} {  return 0 } if {$remmi(+m:$chan) &amp;&amp; $remmi(+i:$chan)} {  timer 2 [list rem:modes $chan] }}proc rem:modes chan { global remmi pushmode $chan -m pushmode $chan -i set remmi(+m:$chan) [set remmi(+i:$chan) 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 Feb 16, 2008 6:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ThE-UnNaMeD]]></name></author>
		<updated>2008-02-16T05:00:34-04:00</updated>

		<published>2008-02-16T05:00:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80889#p80889</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80889#p80889"/>
		<title type="html"><![CDATA[Auto -mi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80889#p80889"><![CDATA[
If someone sets +mi automatically does -mi after 2min.<br>i think it's easy, but i don't know how to make it.. <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=9494">ThE-UnNaMeD</a> — Sat Feb 16, 2008 5:00 am</p><hr />
]]></content>
	</entry>
	</feed>
