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

	<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>2018-02-12T01:16:56-04:00</updated>

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

		<entry>
		<author><name><![CDATA[kamila]]></name></author>
		<updated>2018-02-12T01:16:56-04:00</updated>

		<published>2018-02-12T01:16:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106679#p106679</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106679#p106679"/>
		<title type="html"><![CDATA[voice and devoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106679#p106679"><![CDATA[
is there a way when once voice in the room they can type !serving and it de voice them and then they type !afk and it de voice them then they type !return and it voice them for the !afk only and for the !serving when they want to re voice them self they type !available and for each of them i can put a saying like for !serving then the bot says in the room this person is in use  or something ? .. hope this makes since<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12734">kamila</a> — Mon Feb 12, 2018 1:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-02-01T11:52:56-04:00</updated>

		<published>2018-02-01T11:52:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106652#p106652</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106652#p106652"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106652#p106652"><![CDATA[
Thank you to everyone!<br><br>Final script is:<br><br><a href="https://pastebin.com/f13T4YMb" class="postlink">https://pastebin.com/f13T4YMb</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Thu Feb 01, 2018 11:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2018-01-29T09:39:13-04:00</updated>

		<published>2018-01-29T09:39:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106628#p106628</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106628#p106628"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106628#p106628"><![CDATA[
<blockquote class="uncited"><div>I did some testing and with <em class="text-italics">pushmode</em> I got some weird results ...</div></blockquote>Isn't pushmode affected by <br>set net-type<br>in eggdrop.conf  ?<br><br>Different networks have different limit on the number of mode changes that can be sent at once?    ... something like that....   sorry, I'm fuzzy on it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Mon Jan 29, 2018 9:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-01-29T04:46:35-04:00</updated>

		<published>2018-01-29T04:46:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106623#p106623</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106623#p106623"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106623#p106623"><![CDATA[
I did some testing and with <em class="text-italics">pushmode</em> I got some weird results and it's better if we use <em class="text-italics">puthelp</em> instead:<div class="codebox"><p>Code: </p><pre><code>puthelp "MODE $chan $mc$mode $users"</code></pre></div>This also uses a slow queue and chances are Nick and Nick2 to be voiced at the same time.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jan 29, 2018 4:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-01-26T15:02:32-04:00</updated>

		<published>2018-01-26T15:02:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106615#p106615</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106615#p106615"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106615#p106615"><![CDATA[
Sorry for the delay, lately I've been very busy with work and didn't get to do some proper testing.<br><br>Will see tomorrow if will have some to test a few things and see from and under what circumstances you get that error and reply back.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jan 26, 2018 3:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-01-26T12:46:43-04:00</updated>

		<published>2018-01-26T12:46:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106614#p106614</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106614#p106614"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106614#p106614"><![CDATA[
Hi,<br><br>The script works fine for some days,<br>I want to close this topic but before I do I have two questions. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>My channel is not too big so I could not test it.<br>1. If more then one user joins the channel at the same time will this script give the +v in one line?<br>I mean:<br>[19:10] Nick joined the channel<br>[19:10] Nick2 joined the channel<br>I want: bot sets mode +vv nick1 nick2<br><br>Shall I change this line:<blockquote class="uncited"><div>pushmode $chan +v $nick</div></blockquote>to:<blockquote class="uncited"><div>putquick "MODE $chan +v $nick"</div></blockquote>2. The error message I shared with you in my previous post means nothing?<br>I haven't met with it since then...<br><br>Thank you for the replies!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Fri Jan 26, 2018 12:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-01-21T12:44:47-04:00</updated>

		<published>2018-01-21T12:44:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106603#p106603</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106603#p106603"/>
		<title type="html"><![CDATA[1st error message]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106603#p106603"><![CDATA[
But on my testbot I got this error message:<br><br>Tcl error [::av::reset]: list doesn't contain element 1<br><br>I just used !voice nick1 nick2 and !devoice nick1 nick2....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Sun Jan 21, 2018 12:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-01-21T12:36:59-04:00</updated>

		<published>2018-01-21T12:36:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106602#p106602</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106602#p106602"/>
		<title type="html"><![CDATA[Re: Don't use pushmode here!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106602#p106602"><![CDATA[
Thank You SpiKe^^!<br>That was the problem. Now it works!! <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=12672">m4s</a> — Sun Jan 21, 2018 12:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2018-01-21T12:11:59-04:00</updated>

		<published>2018-01-21T12:11:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106601#p106601</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106601#p106601"/>
		<title type="html"><![CDATA[Don't use pushmode here!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106601#p106601"><![CDATA[
Is my opinion that [pushmode] only works with simple 1 item mode change, and not a combined mode change like this script is feeding it.<br><br>As a test, search out this line in the script...<div class="codebox"><p>Code: </p><pre><code>pushmode $chan $mc$mode $users</code></pre></div>and change it to more like this...<div class="codebox"><p>Code: </p><pre><code>putquick "MODE $chan $mc$mode $users"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Jan 21, 2018 12:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-01-21T11:03:05-04:00</updated>

		<published>2018-01-21T11:03:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106600#p106600</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106600#p106600"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106600#p106600"><![CDATA[
Hi Caesar,<br><br>A tested a bit. The only thing which is not working is the "!voice nick1 nick2" and <br>"!devoice nick1 nick2".<br><br>Test1:<br>!voice nick1 nick2 -&gt; nothing happens -&gt; no error msg<br>!voice nick1<strong class="text-strong">,</strong> nick2 -&gt; voice is only given to nick2 -&gt; no error msg<br><br>I gave voice to nick1 and nick2 to run test2.<br><br>Test2:<br>!devoice nick1 nick2- &gt; nothing happens -&gt; no error msg<br>!devoice nick1<strong class="text-strong">,</strong> nick2 -&gt; bot took v from only nick2 -&gt; no error msg<br><br><br>Is it possibly to use the !voice, !devoice commands via the bot? I mean in private commands.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Sun Jan 21, 2018 11:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-01-17T11:44:40-04:00</updated>

		<published>2018-01-17T11:44:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106593#p106593</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106593#p106593"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106593#p106593"><![CDATA[
Thanks Caesar I see!<br><br>I started to use your script. I want to wait a bit to see it is working well -i am sure it will!<br>If I find something I will post it here but I think this topic will be closed soon! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Wed Jan 17, 2018 11:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-01-16T15:36:53-04:00</updated>

		<published>2018-01-16T15:36:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106589#p106589</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106589#p106589"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106589#p106589"><![CDATA[
I did some limited testing on voicing/devoicing multiple nicks and worked. Will try to do a live test cos can't see right now what's not working properly.<br><br>12 hours in seconds means 12 x 60 x 60 and is equal with 43200, so if you change the <em class="text-italics">set duration 60 </em> in <em class="text-italics">set duration 43200</em> then rehash the bot to "notice" the change. I left it to 60 seconds for my testing.<br><br>The "cleanup" is done automatically by the "reset" function that is executed once every 1 minute (this <em class="text-italics">{*/1 * * * *}</em> actually). If you want to do a cleanup let's say every 10 minutes then that becomes <em class="text-italics">{*/10 * * * *}</em> for example. If you google crontab will find plenty of examples how to set a different moment to execute that function.<br><br>Keep in mind that if for instance you muted someone at let's say 10:00:01 for let's say 1 hour then the bot will not lift the mute at 11:00:01 but at 11:01:00 when the cleanup function is executed again, so the user will actually be muted for 1 hour and 59 seconds. I didn't opt for another method to run the cleanup every second because you said hours in first post so 1 minute give or take is not really that much. <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> — Tue Jan 16, 2018 3:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-01-16T14:02:17-04:00</updated>

		<published>2018-01-16T14:02:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106587#p106587</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106587#p106587"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106587#p106587"><![CDATA[
Caesar!<br><br>It's a great job from you! Thank You!<br>The main features work I got no error messages! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>The only thing (but this was not my request) is the "!voice nick1 nick2" and the "!devoice nick1 nick2" don't work. But it is not important for me.<br><br>I have questions. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>What time is the "set durations"?<br>How do you mean "cleanup is done automatically every minute (can be changed later on cos is a cron job)."<br><br>An example: I devoiced nick1, and I don't want to give the +v only after 12 hours.<br>How can I set this?<br><br>Thanks!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Tue Jan 16, 2018 2:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-01-16T01:56:35-04:00</updated>

		<published>2018-01-16T01:56:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106583#p106583</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106583#p106583"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106583#p106583"><![CDATA[
A quick fix of some of the bugs: replace global with variable, replace $ignoreList(a) with $ignoreList($chan)<br><br>Will have to do some testing of my own cos I'm making a fool of myself with posting untested stuff. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br>Edit: From the limited testing I've done the mass voice/devoice should work. Not sure how mode change works, I mean if it's triggered for each mode change or just once for all modes if are in a single line.<br><br>The script you mentioned is the same mute.tcl that at first glance doesn't know how to mute more than one member. Anyway, will get back to this as soon as I done some proper testing.<br><br>Second edit: Here's an updated and slightly tested code. Ignore the above.<div class="codebox"><p>Code: </p><pre><code>namespace eval av {        set duration 60        setudef flag av        array set ignoreList {}        bind join * * [namespace current]::joining        bind pub o !voice [namespace current]::voice        bind pub o !devoice [namespace current]::devoice        bind mode - "% +v" [namespace current]::mcVoice        bind mode - "% -v" [namespace current]::mcDevoice        bind cron - {*/1 * * * *} [namespace current]::reset        proc joining {nick uhost hand chan} {                variable ignoreList                if {![channel get $chan av] || [isbotnick $nick] || ![botisop $chan]} return                if {[array get ignoreList $chan] != {}} {                        if {[lsearch -nocase [dict keys [join $ignoreList($chan)]] $uhost] != -1} return                }                pushmode $chan +v $nick        }        proc voice {nick uhost hand chan text} {                variable ignoreList                if {![channel get $chan av] || ![botisop $chan] || ![llength $text]} return                foreach user [split $text] {                        if {[isbotnick $user] || ![onchan $user $chan] || [isvoice $user $chan]} continue                        lappend voiceList $user                }                if {[info exists voiceList]} {                        push $chan "+" $voiceList                }        }        proc devoice {nick uhost hand chan text} {                if {![channel get $chan av] || ![botisop $chan] || ![llength $text]} return                foreach user [split $text] {                        if {[isbotnick $user] || ![onchan $user $chan] || ![isvoice $user $chan]} continue                        lappend voiceList $user                }                if {[info exists voiceList]} {                        push $chan "-" $voiceList                }        }        proc push {chan mc userList} {                set max 6                set len [llength $userList]                while {$len &gt; 0} {                        if {$len &gt; $max} {                                set mode [string repeat "v" $max]                                set users [join [lrange $userList 0 [expr {$max - 1}]]]                                set userList [lrange $userList $max end]                                incr len -$max                        } else {                                set mode [string repeat "v" $len]                                set users [join $userList]                                set len 0                        }                        pushmode $chan $mc$mode $users                }        }        proc mcVoice {nick uhost hand chan mc target} {                variable ignoreList                if {![channel get $chan av] || ![botisop $chan]} return                if {[array get ignoreList $chan] != {}} {                        set pos [lsearch -nocase [dict keys [join $ignoreList($chan)]] [getchanhost $target $chan]]                        if {$pos &gt;= 0} {                                set ignoreList($chan) [lreplace $ignoreList($chan) $pos $pos]                        }                }        }        proc mcDevoice {nick uhost hand chan mc target} {                variable ignoreList                if {![channel get $chan av] || ![botisop $chan]} return                set now [clock seconds]set uhost [getchanhost $target $chan]                if {[array get ignoreList $chan] != {}} {                        set pos [lsearch -nocase [dict keys [join $ignoreList($chan)]] $uhost]                        if {$pos &gt;=0 } {                                set ignoreList($chan) [lreplace $ignoreList($chan) $pos $pos [list $uhost $now]]                                return                        }                }                lappend ignoreList($chan) [list $uhost $now]        }        proc reset {min hour day month weekday} {                variable ignoreList                variable duration                set now [clock seconds]                foreach chan [channels] {                        if {![channel get $chan av]} {                                if {[array get ignoreList $chan] != {}} {                                        array unset ignoreList $chan                                }                                continue                        }                        if {[array get ignoreList $chan] != {}} {                                set x 0                                foreach time [dict values [join $ignoreList($chan)]] {                                        if {($now - $time) &gt;=  $duration} {                                                set ignoreList($chan) [lreplace $ignoreList($chan) $x $x]                                                incr x                                        }                                }                        }                }        }}</code></pre></div>I can't test if it works with multiple voiced/devoiced members at the same time so need you test this for me and reply with the result.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jan 16, 2018 1:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[m4s]]></name></author>
		<updated>2018-01-15T16:42:44-04:00</updated>

		<published>2018-01-15T16:42:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106578#p106578</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106578#p106578"/>
		<title type="html"><![CDATA[[Solved]Voice/devoice script with extra features]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106578#p106578"><![CDATA[
Everyone makes mistakes...that is normal. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I made the changes.<br>I got this error after joining:<br>Tcl error [::av::joining]: can't read "ignoreList(#mychannel)": no such variable<br><br>!voice nick and !devoice nick work, but !voice nick1 nick2 don't.<br>I got this continously:<br>Tcl error [::av::reset]: can't read "ignoreList(a)": no such element in array <br><br>If I use /mode #channel +v nick to give +v I got this:<br>Tcl error [::av::mcVoice]: unbalanced open paren<br>in expression "(-1"<br><br>But I guess my explanation was not good sorry about it. I try to explain my request again.<br>The bot should give +v to everyone who joins to my channel. That is the default.<br>Nick1 joins bot sets mode +v.<br>- If an op devoices nick1, and nick1 parts and joins again bot must not give the +v.<br>Here I thought to set a timer. Bot should wait for example six hours. If nick1 leaves and joins after six hours bot can give the +v.<br>- If an op devoices nick1 and nick1 changes his nick to nick2 bot must not give the +v to nick2.<br>-Public commands !voice, !devoice for +o flag users.<br><br>I found a very similar script but it is not working for me and perhaps helps something.<br>(<a href="https://gist.github.com/anonymous/2a5d393e6fd49680dee05c0f41835e59" class="postlink">https://gist.github.com/anonymous/2a5d3 ... 0f41835e59</a>).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12672">m4s</a> — Mon Jan 15, 2018 4:42 pm</p><hr />
]]></content>
	</entry>
	</feed>
