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

	<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>2016-09-24T19:15:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-24T19:15:12-04:00</updated>

		<published>2016-09-24T19:15:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105463#p105463</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105463#p105463"/>
		<title type="html"><![CDATA[OP Event doubt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105463#p105463"><![CDATA[
Ok, I'll try, but it works perfect.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat Sep 24, 2016 7:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-09-24T02:15:02-04:00</updated>

		<published>2016-09-24T02:15:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105461#p105461</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105461#p105461"/>
		<title type="html"><![CDATA[OP Event doubt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105461#p105461"><![CDATA[
My guess it has to do with having just a single mode change if it applies to multiple victims. To test this out from your irc client do:<div class="codebox"><p>Code: </p><pre><code>/mode #channel +v member_1 member_2 member_3 member_4 member_5 member_6</code></pre></div>and if you voice all 6 members in one line then replace your putserv lines with:<div class="codebox"><p>Code: </p><pre><code>pushmode $chan -o $userspushmode $chan +v $users</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Sep 24, 2016 2:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-23T15:14:35-04:00</updated>

		<published>2016-09-23T15:14:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105460#p105460</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105460#p105460"/>
		<title type="html"><![CDATA[OP Event doubt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105460#p105460"><![CDATA[
Now, work perfectly. Thank you caesar. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>I had to change this:<div class="codebox"><p>Code: </p><pre><code>pushmode $chan -$m1 $userspushmode $chan +$m2 $users </code></pre></div>for this:<div class="codebox"><p>Code: </p><pre><code>putserv "mode $canal_radio +v $users"putserv "mode $canal_radio -o $users"</code></pre></div>This may be because the commands are different in my Network.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Fri Sep 23, 2016 3:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-09-23T07:31:56-04:00</updated>

		<published>2016-09-23T07:31:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105459#p105459</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105459#p105459"/>
		<title type="html"><![CDATA[OP Event doubt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105459#p105459"><![CDATA[
Ah i noticed a typo. Replace:<div class="codebox"><p>Code: </p><pre><code>lappend uList $nick </code></pre></div>with<div class="codebox"><p>Code: </p><pre><code>lappend uList $user</code></pre></div>I'll test right now to see what else isn't working.<br><br>Edit: I did some limited testing in tclsh and seems to be working as intended. Make the change and let me know if still doesn't and will test on a bot.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Sep 23, 2016 7:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-23T05:21:16-04:00</updated>

		<published>2016-09-23T05:21:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105458#p105458</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105458#p105458"/>
		<title type="html"><![CDATA[OP Event doubt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105458#p105458"><![CDATA[
It does not work<br><br>If I try to give me @ through boT CHaN (Official Network Bot, i.e ChanServ)<div class="codebox"><p>Code: </p><pre><code>/msg CHaN OP #mychannel juanam</code></pre></div><blockquote class="uncited"><div>10:47 ?                         =&gt; ¦ CHaN puts mode [+o juanam ]<br>10:47                @My-BoT ¦ CHaN CHaN CHaN CHaN to be @ with you must be emitting.</div></blockquote>My BoT mentions <span style="text-decoration:underline">4 times</span>  Bot CHaN, when he should do it once to my nick, and then NOT remove @, but anyway it should NOT be because I have all the flags.<br><br>If I give @ Maria (NOT the current DJ)<div class="codebox"><p>Code: </p><pre><code>/mode #mychannel +o Maria</code></pre></div><blockquote class="uncited"><div>10:47 ?                         =&gt; ¦ juanam puts mode [+o Maria ]<br>10:47                @My-BoT ¦ juanam juanam juanam juanam juanam to be @ with you must be emitting.</div></blockquote>My BoT mentions <span style="text-decoration:underline">5 times</span> my nick instead of Maria and then NOT remove @.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Fri Sep 23, 2016 5:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-09-23T09:56:30-04:00</updated>

		<published>2016-09-23T03:24:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105457#p105457</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105457#p105457"/>
		<title type="html"><![CDATA[OP Event doubt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105457#p105457"><![CDATA[
Give this a try:<div class="codebox"><p>Code: </p><pre><code>bind mode - "% +o" dj:check:opproc dj:check:op {nick host hand chan mode vict} {global canal_radioif {![string match -nocase $chan $canal_radio]} returnif {![botisop $chan]} returnif {[file exist "dj"]} {set fo [open "dj" r]set data [read -nonewline $fo]set dj [lindex $data 0]close $fo}if {[info exists dj]} {foreach user [chanlist $chan] {if {[isbotnick $nick]} continueif {![isop $user $chan]} continueif {[string equal -nocase $user $dj]} continueset hand [nick2hand $user $chan]if {[dj:check:flags $chan $hand]} continuelappend uList $user}if {[info exists uList]} {set max 6set len [llength $uList]while {$len &gt; 0} {if {$len &gt; $max} {set m1 [string repeat "o" $max]set m2 [string repeat "v" $max]set users [join [lrange $uList 0 [expr {$max - 1}]]]set uList [lrange $uList $max end]incr len -$max} else {set m1 [string repeat "o" $len]set m2 [string repeat "v" $len]set users [join $uList]set len 0}pushmode $chan -$m1 $userspushmode $chan +$m2 $usersputhelp "PRIVMSG $chan :$users to be @ with you must be emitting."}}}}proc dj:check:flags {chan hand {flags "oatn"}} {set match 0if {[validuser $hand]} {foreach flag [split $flags] {if {[matchattr $hand $flag $chan]} {set match 1break}}}return "$match"}</code></pre></div>When there's a +o the bot will check the entire list of @ members to see if a member has one of the flags or is DJ, if not will remove @ and give voice (+) instead. Haven't tested this so load it on a test bot. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Edit: Fixed typo.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Sep 23, 2016 3:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-23T03:10:14-04:00</updated>

		<published>2016-09-23T03:10:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105456#p105456</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105456#p105456"/>
		<title type="html"><![CDATA[OP Event doubt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105456#p105456"><![CDATA[
<blockquote class="uncited"><div>You lost me at second line. If the DJ gives @ to someone then the bot shouldn't remove the @ from them?</div></blockquote>Yes, the bot only gives @ (OP) to the DJ that is going to broadcast (current DJ).<br>When the DJ completes its broadcast, the robot removes the @ (DEOP).<br>If somebody gives @ to one DJ who is not brodcasting, then I want the bot removes this @ inmediately.<br><blockquote class="uncited"><div>Or the bot shouldn't remove the @ if the person who just got it or already had the @ is either the current DJ or has one of the flags you mentioned?</div></blockquote>If the person who gets the @ is the current DJ or has one of the flags mentioned above, then the bot does NOT has to take it off.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Fri Sep 23, 2016 3:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-09-23T02:42:00-04:00</updated>

		<published>2016-09-23T02:42:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105455#p105455</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105455#p105455"/>
		<title type="html"><![CDATA[OP Event doubt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105455#p105455"><![CDATA[
You lost me at second line. If the DJ gives @ to someone then the bot shouldn't remove the @ from them?<br><br>Or the bot shouldn't remove the @ if the person who just got it or already had the @ is either the current DJ or has one of the flags you mentioned?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Sep 23, 2016 2:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-22T16:40:26-04:00</updated>

		<published>2016-09-22T16:40:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105454#p105454</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105454#p105454"/>
		<title type="html"><![CDATA[OP Event doubt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105454#p105454"><![CDATA[
I want to control the OP events, when someone comes up with @ to a my channel ($canal_radio).<br><br>If the nick you get @ it is the DJ ($dj) that emits or has flags are +o +a +t or +n  not do anything.<br><br>If the nick you get @ it is NOT the DJ ($dj) that emits or flags are NOT +o +a +t or +n the bot must remove the @ (DEOP or -o).<br><br>To be honest I do not know the <strong class="text-strong">on OP event</strong>.<br><br>I tried this but it did not work :<br><div class="codebox"><p>Code: </p><pre><code>bind mode - "% +o" check:op proc check:op {nick host hand chan mode target} { global canal_radio if {[file exist dj]} {set temp [open "dj" r]    set dj1 [gets $temp]set dj [lindex $dj1 0]    close $temp   }    if {([info exist dj]) &amp;&amp; ([matchattr $nick -o]) &amp;&amp; ([matchattr $nick -a]) &amp;&amp; ([matchattr $nick -n]) &amp;&amp; ([matchattr $nick -t]) &amp;&amp; ($nick != $::botnick)} {foreach users [chanlist $canal_radio] {if {[isop $users $canal_radio]} {if {($users eq $::botnick) || ($users eq $dj) || ([matchattr $users o]) || ([matchattr $users a]) || ([matchattr $users n]) || ([matchattr $users t]) } {continue}if {$users != $dj} { putserv "mode $canal_radio +v $dj"putserv "mode $canal_radio -o $dj"putserv "PRIVMSG chan :DEOP $canal_radio $dj" putquick "PRIVMSG $canal_radio :\002$dj\002 to be @ with you must be emitting." }} }} else { return }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Thu Sep 22, 2016 4:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
