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

	<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>2020-08-30T11:22:22-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-30T11:22:22-04:00</updated>

		<published>2020-08-30T11:22:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108941#p108941</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108941#p108941"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108941#p108941"><![CDATA[
tried your last post CrazyCat and it seems to work fine tnx alot<br>i like to thank Caesar too<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Aug 30, 2020 11:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-08-30T10:03:34-04:00</updated>

		<published>2020-08-30T10:03:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108940#p108940</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108940#p108940"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108940#p108940"><![CDATA[
Ok, I think I understand the errors I made...<br><br>Try this:<div class="codebox"><p>Code: </p><pre><code>bind mode - "#% +b" runbanbind mode - "#% -b" stopbanproc runban {nick uhost handle chan mode target} {if {[string match -nocase m:*!*@* $target]} {set ::btimer($chan) [list [timer 20 [list rmban $chan]]]}}proc stopban {nick uhost handle chan mode target} {if {[string match -nocase m:*!*@* $target]} {rmban $chan}}proc rmban {chan} {if { [array exists ::btimer] &amp;&amp; [info exists ::btimer($chan)] } {if { [lsearch -index 2 [timers] $::btimer($chan)] != -1} {killtimer $::btimer($chan)}unset ::btimer($chan)}if { [ischanban m:*!*@* $chan] } {pushmode $chan -b m:*!*@*}}</code></pre></div>Errors occured because when timer is ended, it's automaticaly unsetted, so we don't have to manualy kill it.<br><br>The 2 difficulties in the script:<br>- how to well launch the timer and keep its ID. list is the solution <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>- how to find if the timer exists using its ID. lsearch is the solution <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=691">CrazyCat</a> — Sun Aug 30, 2020 10:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-29T17:03:40-04:00</updated>

		<published>2020-08-29T17:03:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108939#p108939</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108939#p108939"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108939#p108939"><![CDATA[
tried that and got the same error caesar:<br><br>Tcl error in script for 'timer33938':<br>invalid timerID<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sat Aug 29, 2020 5:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-08-29T13:44:56-04:00</updated>

		<published>2020-08-29T13:44:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108938#p108938</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108938#p108938"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108938#p108938"><![CDATA[
Shouldn't it be:<div class="codebox"><p>Code: </p><pre><code>timer sec [list proc $arg1 $arg2 ...]</code></pre></div>I mean shouldn't:<div class="codebox"><p>Code: </p><pre><code>set ::btimer($chan) [list [timer 20 [rmban $chan]]] </code></pre></div>be:<div class="codebox"><p>Code: </p><pre><code>set ::btimer($chan) [timer 20 [list rmban $chan]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Aug 29, 2020 1:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-28T13:46:01-04:00</updated>

		<published>2020-08-28T13:46:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108937#p108937</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108937#p108937"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108937#p108937"><![CDATA[
i tried your latest post and the moment i the ban i get<br><br>Tcl error [stopban]: invalid timerID<br><br>and it unbans instantly<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Fri Aug 28, 2020 1:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-08-28T05:17:35-04:00</updated>

		<published>2020-08-28T05:17:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108936#p108936</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108936#p108936"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108936#p108936"><![CDATA[
I made tests and corrected the script, this one may work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><div class="codebox"><p>Code: </p><pre><code>bind mode - "#% +b" runbanbind mode - "#% -b" stopbanproc runban {nick uhost handle chan mode target} {   if {[string match -nocase m:*!*@* $target]} {      set ::btimer($chan) [list [timer 20 [rmban $chan]]]   }}proc stopban {nick uhost handle chan mode target} {   if {[string match -nocase m:*!*@* $target]} {      rmban $chan   }}proc rmban {chan} {   if { [info exists ::btimer($chan)] } {      killtimer $::btimer($chan)      unset ::btimer($chan)   }   if { [ischanban m:*!*@* $chan] } {      pushmode $chan -b m:*!*@*   }}</code></pre></div>I've changed the timer creation (timer is now set in an array) and the call of rmban<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Fri Aug 28, 2020 5:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-08-27T18:26:02-04:00</updated>

		<published>2020-08-27T18:26:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108935#p108935</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108935#p108935"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108935#p108935"><![CDATA[
When did you got the first error ?<br>Can you do <strong class="text-strong">.set errorInfo</strong> when it happens and paste here the result please ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Aug 27, 2020 6:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-27T15:32:37-04:00</updated>

		<published>2020-08-27T15:32:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108934#p108934</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108934#p108934"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108934#p108934"><![CDATA[
getting these errors:<br><br>Tcl error in script for 'timer16203':<br>wrong # args: should be "rmban chan"<br><br><br>Tcl error in script for 'timer16220':<br>invalid timerID<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Aug 27, 2020 3:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-08-27T14:18:32-04:00</updated>

		<published>2020-08-27T14:18:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108933#p108933</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108933#p108933"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108933#p108933"><![CDATA[
True, I focused on your trouble and forget to remove the ban <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><br>You can try the following code, but I've a small doubt about the <em class="text-italics">ischanban</em> usage and I can't test it right now. Tell me if it doesn't work, I'll look deeper.<br><div class="codebox"><p>Code: </p><pre><code>bind mode - "#% +b" runbanbind mode - "#% -b" stopbanproc runban {nick uhost handle chan mode target} {   if {[string match -nocase m:*!*@* $target]} {      set ::btimer [list [timer 20 rmban $chan]]   }}proc stopban {nick uhost handle chan mode target} {   if {[string match -nocase m:*!*@* $target]} {      rmban $chan   }}proc rmban {chan} {   if { [info exists ::btimer] } {      killtimer $::btimer      unset ::btimer   }   if { [ischanban m:*!*@* $chan] } {      pushmode $chan -b m:*!*@*   }}</code></pre></div>Another way is to have a variable to know if the ban is set or not, but it's the ugly way imho <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=691">CrazyCat</a> — Thu Aug 27, 2020 2:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-27T12:53:51-04:00</updated>

		<published>2020-08-27T12:53:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108932#p108932</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108932#p108932"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108932#p108932"><![CDATA[
tnx for your reply CrazyCat ive tested it but it doesnt seem to remove the banmask after 20 min if nobody has removed it with -b m:*!*!@<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Aug 27, 2020 12:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-08-27T02:51:36-04:00</updated>

		<published>2020-08-27T02:51:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108931#p108931</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108931#p108931"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108931#p108931"><![CDATA[
I'm trying to understand your problem...<br><br>An op can add a <strong class="text-strong">+b m:*!*@*</strong> to mute anyone on the channel, and you want the eggdrop to automaticaly remove it after 20 minutes.<br>BUT if someone removes the ban, you want to kill the timer.<br><div class="codebox"><p>Code: </p><pre><code>bind mode - "#% +b" runbanbind mode - "#% -b" stopbanproc runban {nick uhost handle chan mode target} {   if {[string match -nocase m:*!*@* $target]} {      set ::btimer [list [timer 20 rmban]]   }}proc stopban {nick uhost handle chan mode target} {   if {[string match -nocase m:*!*@* $target]} {      rmban   }}proc rmban {} {   if { [info exists ::btimer] } {      killtimer $::btimer      unset ::btimer   }}</code></pre></div><strong class="text-strong">Explanations</strong><br>The runban proc create the timer, and will run "rmban" at the end of the timer.<br>The stopban proc directly call the rmban proc<br>The rmban proc checks if the timer exists, and if it exists, it kills the timer and unset its id.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Aug 27, 2020 2:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-26T11:46:58-04:00</updated>

		<published>2020-08-26T11:46:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108928#p108928</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108928#p108928"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108928#p108928"><![CDATA[
i tried various examples i got here: <a href="http://forum.egghelp.org/viewtopic.php?t=9941" class="postlink">http://forum.egghelp.org/viewtopic.php?t=9941</a><br><br>but none seems to work for me im not sure if that should work for the kkind of timer i  use here the: after<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Aug 26, 2020 11:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-26T10:35:27-04:00</updated>

		<published>2020-08-26T10:35:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108927#p108927</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108927#p108927"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108927#p108927"><![CDATA[
i tried using this but it didnt seem to work to stop  the timer<br><div class="codebox"><p>Code: </p><pre><code>bind mode - "#% -b" timedmutecheckerX2 proc timedmutecheckerX2 {nick uhost hand chan mc ban} {    if {[string match -nocase m:*!*@* $ban]} {   foreach thetimer [timers] {    if {[string equal -nocase timedmutechecker [lindex $thetimer 1]]} {        killtimer [lindex $thetimer 2]         break       }      }    }} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Aug 26, 2020 10:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-26T01:24:33-04:00</updated>

		<published>2020-08-26T01:24:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108924#p108924</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108924#p108924"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108924#p108924"><![CDATA[
The idea is if anyone sets this ban:<br><br> +b m:*!*@*<br><br>to have a timer remove it but if some chan op manually removed it with -b m:*!*@* to stop the previous set timer as the ban mask is no longer there to be removed<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Aug 26, 2020 1:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-08-26T10:36:31-04:00</updated>

		<published>2020-08-25T18:51:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108923#p108923</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108923#p108923"/>
		<title type="html"><![CDATA[check banlist for certain banmasks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108923#p108923"><![CDATA[
i was wondering how this could  be used to check if banmask m:*!*@* is still in the banlist of channel when the timer expires and triggers  the check<br><br>because we dont want it to remove something wich is no longer there<br><div class="codebox"><p>Code: </p><pre><code>bind mode - "#% +b" timedmutechecker proc timedmutechecker {nick uhost hand chan mc ban} {    if {[string match -nocase m:*!*@* $ban]} {  after [expr {20*1000*60}] [list pushmode $chan -b m:*!*@*] }} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Aug 25, 2020 6:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
