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

	<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>2015-10-05T10:40:08-04:00</updated>

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

		<entry>
		<author><name><![CDATA[garlic641]]></name></author>
		<updated>2015-10-05T10:40:08-04:00</updated>

		<published>2015-10-05T10:40:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104502#p104502</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104502#p104502"/>
		<title type="html"><![CDATA[BogusTrivia - only ops start/stop trivia]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104502#p104502"><![CDATA[
All answers were very helpful, thanks.<br><br>Also: thanks SpiKe^^ for the time and dedication you've put into BogusTrivia.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12573">garlic641</a> — Mon Oct 05, 2015 10:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2015-10-04T20:33:21-04:00</updated>

		<published>2015-10-04T20:33:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104499#p104499</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104499#p104499"/>
		<title type="html"><![CDATA[BogusTrivia - only ops start/stop trivia]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104499#p104499"><![CDATA[
For the commands to add your ops to the eggdrop internal user list, follow the links provided by willyw above.<br>That would make the script work as it is intended, starting/stopping for any user with an o flag in the user file.<br><br><br>If you would like to make the on/off commands available to only those that are currently opped (have +o) in the channel, that requires a little script editing...<br><br><strong class="text-strong">1)</strong>  In the t2-settings.tcl file, you would have to make the on/off commands trigger for everyone...<div class="codebox"><p>Code: </p><pre><code>set t2(oflag) ""   ;# flags to turn the game on ("" = everyone) #set t2(sflag) ""   ;# flags to turn game off    ("" = same as on flags) #</code></pre></div><strong class="text-strong">2)</strong>  Then you would have to make the script check if the user triggering the on/off command is opped in the channel or not.<br><br>In the t-2.tcl file, search for this string...<div class="codebox"><p>Code: </p><pre><code>proc TOnOff</code></pre></div>On or about line 1854 you should find these 2 lines...<div class="codebox"><p>Code: </p><pre><code>proc TOnOff {nk uh hn ch tx {from 0} } {  global t2 tclr botnick nick if {![file exists $t2(sfpath)t2.settings]} {  set temp [TSetup $nk $uh $hn 1 1]</code></pre></div>You will need to add a line between those 2 lines that will check if the user is opped in the channel, and not reply if they aren't.<br>Make the script read more like this...<div class="codebox"><p>Code: </p><pre><code>proc TOnOff {nk uh hn ch tx {from 0} } {  global t2 tclr botnick nick if {$from=="0" &amp;&amp; ![isop $nk $ch]} {  return 0  } if {![file exists $t2(sfpath)t2.settings]} {  set temp [TSetup $nk $uh $hn 1 1]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Oct 04, 2015 8:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-10-04T15:17:10-04:00</updated>

		<published>2015-10-04T15:17:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104497#p104497</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104497#p104497"/>
		<title type="html"><![CDATA[BogusTrivia - only ops start/stop trivia]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104497#p104497"><![CDATA[
<blockquote class="uncited"><div>Thanks for your reply.<br><br>Right now, I can stop/start the trivia script even without being opped; but that's probably because the Eggdrop bot already recognizes me as the owner of the bot, right?</div></blockquote>Being owner of the bot includes many flags.  One of them matches that which you have configured for the start/stop flags in the script.<br>Most likely, you have the o flag.<br><blockquote class="uncited"><div>If so, how can I add friends to the 'op user list' of Eggdrop so they can also start/stop the trivia bot? Is it with the .adduser command? If so, that's probably too much control for just starting/stopping a trivia script.</div></blockquote>.adduser is one way, yes.   .<br>+user is the other, but then you must add the user's hostmask yourself. <br> .adduser will add it automatically (but you should still inspect it, to be sure it is not too broad.)<br><br>As for the side effect of adding too much other control:<br>You can make up your own flags, if you like.  Just use UPPER case.<br>If you wish, you could then have a flag that does nothing else, other than what you configure for it, in BogusTrivia.  <br><br>See:<br><a href="http://www.egghelp.org/commands/index.htm" class="postlink">http://www.egghelp.org/commands/index.htm</a><br><br>Some specific commands to see there:<br><a href="http://www.egghelp.org/commands/core.htm#whois" class="postlink">http://www.egghelp.org/commands/core.htm#whois</a><br>Use this command to view your own account in bot, and see your current flags.  Also, you can get a list of all the pre-configured user attribute flags in Eggdrop.<br><br><a href="http://www.egghelp.org/commands/irc.htm#adduser" class="postlink">http://www.egghelp.org/commands/irc.htm#adduser</a><br><a href="http://www.egghelp.org/commands/core.htm#chattr" class="postlink">http://www.egghelp.org/commands/core.htm#chattr</a><br><a href="http://www.egghelp.org/commands/core.htm#+user" class="postlink">http://www.egghelp.org/commands/core.htm#+user</a><br><a href="http://www.egghelp.org/commands/core.htm#+host" class="postlink">http://www.egghelp.org/commands/core.htm#+host</a><br><br><a href="http://www.egghelp.org/commands/core.htm#help" class="postlink">http://www.egghelp.org/commands/core.htm#help</a><br>This one is VERY useful.   You would do yourself a favor, to get the hang of using it.   I use it all the time.   <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=10420">willyw</a> — Sun Oct 04, 2015 3:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[garlic641]]></name></author>
		<updated>2015-10-04T14:26:40-04:00</updated>

		<published>2015-10-04T14:26:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104496#p104496</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104496#p104496"/>
		<title type="html"><![CDATA[BogusTrivia - only ops start/stop trivia]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104496#p104496"><![CDATA[
Thanks for your reply.<br><br>Right now, I can stop/start the trivia script even without being opped; but that's probably because the Eggdrop bot already recognizes me as the owner of the bot, right?<br><br>If so, how can I add friends to the 'op user list' of Eggdrop so they can also start/stop the trivia bot? Is it with the .adduser command? If so, that's probably too much control for just starting/stopping a trivia script.<br><br><br><blockquote class="uncited"><div>That is the correct flags settings to allow only channel and global ops to use the on/off commands.<br><br>BogusTrivia is an eggdrop script, and the script/bot expects you to add your ops to the internal eggdrop user list.<br><br>The script does not look at the channel to see if anyone has +o in the channel.<br><br>With a few simple script hacks, Bogus could be made to look at the channel status of a user that is trying to turn the script on/off.<br>If you think you can safely modify the script code, I will work up a hack to check for +o in the channel. Let me know if you're interested.</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12573">garlic641</a> — Sun Oct 04, 2015 2:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2015-10-04T12:11:38-04:00</updated>

		<published>2015-10-04T12:11:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104495#p104495</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104495#p104495"/>
		<title type="html"><![CDATA[BogusTrivia - only ops start/stop trivia]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104495#p104495"><![CDATA[
That is the correct flags settings to allow only channel and global ops to use the on/off commands.<br><br>BogusTrivia is an eggdrop script, and the script/bot expects you to add your ops to the internal eggdrop user list.<br><br>The script does not look at the channel to see if anyone has +o in the channel.<br><br>With a few simple script hacks, Bogus could be made to look at the channel status of a user that is trying to turn the script on/off.<br>If you think you can safely modify the script code, I will work up a hack to check for +o in the channel. Let me know if you're interested.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Oct 04, 2015 12:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[garlic641]]></name></author>
		<updated>2015-10-04T11:33:48-04:00</updated>

		<published>2015-10-04T11:33:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104494#p104494</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104494#p104494"/>
		<title type="html"><![CDATA[BogusTrivia - only ops start/stop trivia]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104494#p104494"><![CDATA[
Hi,<br>I'm using BogusTrivia for my channel.<br>I want to set it so only channel operators can stop/start a game.<br><br>In t2-settings.tcl  , so far I have:<br><div class="codebox"><p>Code: </p><pre><code>set t2(oflag) "o|o"   ;# flags to turn the game on ("" = everyone) #set t2(sflag) ""      ;# flags to turn game off    ("" = same as on flags) #</code></pre></div>What flag(s) do I need to set for the desired result?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12573">garlic641</a> — Sun Oct 04, 2015 11:33 am</p><hr />
]]></content>
	</entry>
	</feed>
