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

	<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>2011-02-27T14:50:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-27T14:50:25-04:00</updated>

		<published>2011-02-27T14:50:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96238#p96238</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96238#p96238"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96238#p96238"><![CDATA[
You will have to use two functions for this: one that dose the flag matching (matchattr) and the second that grabs the handle of the user based on the nickname he has (nick2hand). Replace:<div class="codebox"><p>Code: </p><pre><code>if {[isbotnick $user]} continue </code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>if {[isbotnick $user] || [matchattr [nick2hand $user $chan] b|b $chan]} continue</code></pre></div>Now your bots should have +b on the channel, or if they are known globally then remove the last '$chan' from the above code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Feb 27, 2011 2:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[.pt]]></name></author>
		<updated>2011-02-27T14:39:47-04:00</updated>

		<published>2011-02-27T14:39:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96237#p96237</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96237#p96237"/>
		<title type="html"><![CDATA[new feature]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96237#p96237"><![CDATA[
could u pls make it so it ignores other bots while checking the users?<br><br>ty in advance<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6989">.pt</a> — Sun Feb 27, 2011 2:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-21T17:12:10-04:00</updated>

		<published>2011-02-21T17:12:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96171#p96171</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96171#p96171"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96171#p96171"><![CDATA[
Just I thought, the mask should do the trick. If you plan on on using this only on one channel and can't be bothered with changing channel modes (the '+voiceop' flag) nor having it displayed for other channels too, use this code instead:<div class="codebox"><p>Code: </p><pre><code>bind mode * "#channel +v" chanserv:voiceproc chanserv:voice {nick uhost hand chan mode target} {  if {$nick != "ChanServ"} return  set count 0  set users [chanlist $chan]  foreach user $users {    if {[isbotnick $user]} continue    if {[isop $user $chan]} {      incr count      break    }  }  if {!$count} {    pushmode $chan +o $target  }}</code></pre></div>Anyway, your welcome. This time I did my own tests and work flawlessly. <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> — Mon Feb 21, 2011 5:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[.pt]]></name></author>
		<updated>2011-02-21T16:52:33-04:00</updated>

		<published>2011-02-21T16:52:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96170#p96170</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96170#p96170"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96170#p96170"><![CDATA[
perfect ty u so much for the patient <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=6989">.pt</a> — Mon Feb 21, 2011 4:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-21T19:13:50-04:00</updated>

		<published>2011-02-21T16:40:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96169#p96169</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96169#p96169"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96169#p96169"><![CDATA[
I gave you a friendly tip and you jumped on with blazing guns. Should I laugh at that, considering it some sarcastic joke, or consider your remark as an insult? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br><br>Anyway, I admit at first was sloppy and took like forever to learn stuff, guess cos I was stubborn and didn't listened the people that helped me back then. Nobody is perfect. To be honest I'm not ashamed of my past, cos if I was, then rest assure that I would have removed all the stuff that made me ashamed of myself a long time ago.<br><br>I'm not here to race against you nor anybody else, I'm here for the pure pleasure of helping out the community, like IT once did with me. I wouldn't be here if guys like user and ppslim for instance (no offense for anyone not mentioned, I could fill a paper with names <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">) patiently explained me stuff over and over again.<br><br>I haven't touched any TCL code for years up until recently, so my sloppiness shouldn't be a big surprise. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Sure, I had my share of mistakes, but I did had my share of glory too. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> Stupid, genius, dumbass... that's me. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>Edit: Damn flue.. I've been so sloppy recently...<br><br>@.pt : Replace:<div class="codebox"><p>Code: </p><pre><code>if {[channel get $chan voiceop]} return</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>if {![channel get $chan voiceop]} return</code></pre></div>and should work. I edited my previous post and fixed it there too.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Feb 21, 2011 4:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[.pt]]></name></author>
		<updated>2011-02-21T16:31:10-04:00</updated>

		<published>2011-02-21T16:31:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96168#p96168</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96168#p96168"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96168#p96168"><![CDATA[
yeah i rehashed and setted +voiceop before testing it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6989">.pt</a> — Mon Feb 21, 2011 4:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2011-02-21T16:36:00-04:00</updated>

		<published>2011-02-21T16:26:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96167#p96167</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96167#p96167"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96167#p96167"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>setudef flag voiceopset chanserv_host "services.somenetwork.net"bind mode * "% +v" chanserv:voiceproc chanserv:voice {nick uhost hand chan mode target} {   if {[channel get $chan voiceop] &amp;&amp; [string equal -nocase "ChanServ" $nick] &amp;&amp; ![isop $target $chan] &amp;&amp; [botisop $chan] &amp;&amp; [string equal -nocase $::chanserv_host [lindex [split $uhost @] 1]]} {      foreach n [chanlist $chan] {         if {![isbotnick $n] &amp;&amp; ![string equal -nocase "ChanServ" $n] &amp;&amp; [isop $n $chan]} { break } { continue }         pushmode $chan +o $target      }   }}</code></pre></div>ChanServ is there because possibly one day, ChanServ might be in the channel. The script will only OP those ChanServ has voiced.. IF... only the bot or ChanServ are the only things opped.<br><br>Final Edit: I may have went over-board on security checks, but that's a good thing.. Isn't it?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Feb 21, 2011 4:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-21T16:26:30-04:00</updated>

		<published>2011-02-21T16:26:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96166#p96166</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96166#p96166"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96166#p96166"><![CDATA[
If you copied my last code you should '.chanset #channel +voiceop' to activate it. I'm getting a bot to play with the bind mode as I'm not 100% sure about the mask, I think I can drop the need of this with something simple as:<div class="codebox"><p>Code: </p><pre><code>bind mode * "#channel +v" chanserv:voice</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Feb 21, 2011 4:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[.pt]]></name></author>
		<updated>2011-02-21T16:22:54-04:00</updated>

		<published>2011-02-21T16:22:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96165#p96165</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96165#p96165"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96165#p96165"><![CDATA[
im sry again, its not oping the user, doesnt give any errors<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6989">.pt</a> — Mon Feb 21, 2011 4:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-21T16:14:09-04:00</updated>

		<published>2011-02-21T16:14:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96164#p96164</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96164#p96164"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96164#p96164"><![CDATA[
Aww.. i forgot to increment the number of channel operators that have been found (the $count variable). Now it should work properly.<br><br>My apologies for the sloppy coding. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><br><br>Edit: @speechles: There's no need for:<div class="codebox"><p>Code: </p><pre><code>         if {(![isbotnick $n] || ![string equal -nocase "ChanServ" $n]) &amp;&amp; [isop $n $chan]} {            break         } elseif {[isbotnick $n] || [string equal -nocase "ChanServ" $n]} { </code></pre></div>cos ChanServ isn't sitting on his channel, also, why don't you use just one 'if' statement to exclude the bot and another to check for channel op's?<br><br>If you read again what he asked for in the first place you would notice that he wanted the bot to op the user ONLY if the bot is the only channel operator. <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> — Mon Feb 21, 2011 4:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[.pt]]></name></author>
		<updated>2011-02-21T16:07:27-04:00</updated>

		<published>2011-02-21T16:07:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96163#p96163</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96163#p96163"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96163#p96163"><![CDATA[
didnt op the user that one<br><br>PS: btw could it be to just one #chan instead of all pls ty<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6989">.pt</a> — Mon Feb 21, 2011 4:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2011-02-21T16:25:44-04:00</updated>

		<published>2011-02-21T16:04:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96162#p96162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96162#p96162"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96162#p96162"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>setudef flag voiceopset chanserv_host "services.somenetwork.net"bind mode * "% +v" chanserv:voiceproc chanserv:voice {nick uhost hand chan mode target} {if {[channel get $chan voiceop] &amp;&amp; [string equal -nocase "ChanServ" $nick] &amp;&amp; ![isop $target $chan] &amp;&amp; [botisop $chan] &amp;&amp; [string equal -nocase $::chanserv_host [lindex [split $uhost @] 1]]} {foreach n [chanlist $chan] {if {![isbotnick $n] &amp;&amp; ![string equal -nocase "ChanServ" $n] &amp;&amp; [isop $n $chan]} { break } { continue }pushmode $chan +o $target}}}</code></pre></div>This should work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>Edit: Forgot to add the exception that bot only OP the user if it is the only one opped in the channel. Also added chanset setting.. to enable.. on partyline: .chanset #yourchan +voiceop<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Feb 21, 2011 4:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[.pt]]></name></author>
		<updated>2011-02-21T16:02:24-04:00</updated>

		<published>2011-02-21T16:02:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96161#p96161</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96161#p96161"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96161#p96161"><![CDATA[
hehe yeah, its working now with the except that always ops the user even if there more ops besides the bot<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6989">.pt</a> — Mon Feb 21, 2011 4:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-21T16:42:41-04:00</updated>

		<published>2011-02-21T15:55:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96160#p96160</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96160#p96160"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96160#p96160"><![CDATA[
There's no else statement, so what the %#&amp;$?!? Guess I'm having another bad day..<br><br>Looks like TCL is a bit anal about "if {statement} do 1 command" thing. Anyway, here's a version that should comply with it's *rules*:<div class="codebox"><p>Code: </p><pre><code>setudef flag voiceopbind mode * "% +v" chanserv:voiceproc chanserv:voice {nick uhost hand chan mode target} {  if {$nick != "ChanServ"} return  if {![channel get $chan voiceop]} return  set count 0  set users [chanlist $chan]  foreach user $users {    if {[isbotnick $user]} {      continue    }    if {[isop $user $chan]} {      incr count      break    }  }  if {!$count} {    pushmode $chan +o $target  }}</code></pre></div>I should get an eggdrop to test stuff from now on. <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: Added 'voiceop' flag too. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Feb 21, 2011 3:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[.pt]]></name></author>
		<updated>2011-02-21T15:38:05-04:00</updated>

		<published>2011-02-21T15:38:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96159#p96159</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96159#p96159"/>
		<title type="html"><![CDATA[autop after voice by chanserv]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96159#p96159"><![CDATA[
its not sitting in channel, i get this now<br><br> Tcl error [chanserv:voice]: wrong # args: extra words after "else" clause in "if" command<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6989">.pt</a> — Mon Feb 21, 2011 3:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
