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

	<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>2009-04-19T19:51:54-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Koach]]></name></author>
		<updated>2009-04-19T19:51:54-04:00</updated>

		<published>2009-04-19T19:51:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88514#p88514</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88514#p88514"/>
		<title type="html"><![CDATA[detect user flags]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88514#p88514"><![CDATA[
That's exactly what I was looking for <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10609">Koach</a> — Sun Apr 19, 2009 7:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-04-19T19:40:12-04:00</updated>

		<published>2009-04-19T19:40:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88513#p88513</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88513#p88513"/>
		<title type="html"><![CDATA[detect user flags]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88513#p88513"><![CDATA[
Actually, I think you're looking at the wrong kind of binding..<br>msg bindings are used for user-to-user messages, not user-to-channel messages. As such, there is no channel information related to the message. <br><br>Or were you thinking of forcing the user to supply the channel name in the message? If so, extract the channel from the message, and use the <strong class="text-strong">matchattr</strong> command to test the privileges.<br><br>As for the flags-mask, the syntax is "globalflags[(&amp;|)[channelflags[(&amp;|)botflags]]]", where &amp; specifies that all flags must match, and | any flag will be sufficient. For applications that does not provide a channelname, the channelflags part is tested against any/all channels.<br><br>A few examples of different "flag-masks". I've used bindings here, but they could easily be swapped for the matchattr command (msg binding would be equivalent of omitting the channel argument, pub would be including it).<div class="codebox"><p>Code: </p><pre><code>bind msg o msg:test#Triggers for any global op.bind msg o|o msg:test2#Triggers for any global op, and any local op in any channelbind pub o pub:test#Triggers for any global op.bind pub o|o pub:test2#Triggers for any global op, and any local op in the channel it's invoked within.bind pub o&amp;o pub:test3#Triggers for any user who is both a global op and a local op for the channel it's invoked within.bind pub fp| pub:test4#Triggers for any global friend or partyline access user.bind pub fp&amp; pub:test5#Triggers for any user with both global op and partyline access.</code></pre></div>Reading your post a second time, I believe this is what you are looking for:<div class="codebox"><p>Code: </p><pre><code>bind msg o|o qban msg:qbanproc msg:qban {nick host handle stuff} { ... extracting chan and storing it in $chan... if {![matchattr $handle "o&amp;o" $chan]} {  #User does not have permission for this command, abort  return 0 } ... Rest of code here...}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Apr 19, 2009 7:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Koach]]></name></author>
		<updated>2009-04-19T18:59:54-04:00</updated>

		<published>2009-04-19T18:59:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88512#p88512</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88512#p88512"/>
		<title type="html"><![CDATA[detect user flags]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88512#p88512"><![CDATA[
I have looked hard for the answer to this and can't find it. But, I am sure it's going to be a simple solution.<br> <br>I am trying to write a simple script that will only accept input from users that have channel flag +o.<br>The input must be sent via a PRIVMSG. The user might or might not be actually opped (channel mode +o) when they send the PRIVMSG, but they will be in the channel and IDENT'd to the bot.<br><br>I know I can do something like this:<br><br>bind msg o|o qban msg:qban<br><br>and then:<br><br>proc msg:qban {nick host handle stuff} {<br>code here<br>}<br><br>But, as I understand it, that won't really test the channel flag for the nick. <br><br>I can easily extract the channel name and user name from the string in "stuff" but, how can I test the users nick for channel flags?<br><br>Am I missing something obvious?<br><br>Thanks in advance.<br>Koach<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10609">Koach</a> — Sun Apr 19, 2009 6:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
