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

	<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-11-07T01:03:02-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-11-07T01:03:02-04:00</updated>

		<published>2015-11-07T01:03:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104541#p104541</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104541#p104541"/>
		<title type="html"><![CDATA[write a message, depending on the number of lines written]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104541#p104541"><![CDATA[
Thank SpiKe^^  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat Nov 07, 2015 1:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2015-11-05T20:51:29-04:00</updated>

		<published>2015-11-05T20:51:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104537#p104537</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104537#p104537"/>
		<title type="html"><![CDATA[write a message, depending on the number of lines written]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104537#p104537"><![CDATA[
<blockquote class="uncited"><div>1) May I add bots that are not of my property in my bot and give them b flag...</div></blockquote>Yes, I don't think that really makes any difference.<br>In your case though, I think I would maybe use a custom exempt flag, that can be any upper case letter.<br>Example: set wasidle(exempt) "E|E"<br>In dcc chat with your bot, do:<br>.help adduser<br>.help chattr<br><blockquote class="uncited"><div>...bearing in mind they are not going to identify with my bot ?</div></blockquote>The bot doesn't require any sort of "identify" in order for it to know a properly added user/bot in its userfile.<br>Users/bots are recognized any time they match one of the host masks added for that user/bot.<br>If the user/bot has a change of username or host, you may need to add a new host mask so the bot knows who they are.<br>In dcc chat with your bot, do:<br>.help +host<br><blockquote class="uncited"><div>2) Could you tell me the command to give them the b flag ?</div></blockquote>You really need to learn some about how to properly operate eggdrop bots.<br>In dcc chat with your bot, do:<br> .help +bot<br>Doing: .+bot botnick :will add a bot to the userfile, with the b flag and a host mask if the new bot is on a channel with your bot.<br><blockquote class="uncited"><div>3) How can I set multiples channels?</div></blockquote>The script as wrote above, is a single channel script.<br>Do you really have more than one channel that you need to pause ads when they go idle?<br>Let me know if you do, and maybe I can make it more multichannel capable.<br>Multichannel will make the edits in the pausing script(s) much harder for you to figure out:)<br>It may be best for you to post the script you are currently wanting to work with.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Thu Nov 05, 2015 8:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-11-03T06:54:10-04:00</updated>

		<published>2015-11-03T06:54:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104536#p104536</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104536#p104536"/>
		<title type="html"><![CDATA[write a message, depending on the number of lines written]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104536#p104536"><![CDATA[
A couple of questions, my friend...<br><br>1) May I add bots that are not of my property in my bot and give them b flag bearing in mind they are not going to identify with my bot ?<br>My bot is in many channels where you can find other bots that are not mine.<br><br>2) Could you tell me the command to give them the b flag ?<br><br>3) How can I set multiples channels?<br><br>Thank you for your attention my friend  <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=12499">juanamores</a> — Tue Nov 03, 2015 6:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2015-11-05T18:54:57-04:00</updated>

		<published>2015-11-02T23:17:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104533#p104533</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104533#p104533"/>
		<title type="html"><![CDATA[write a message, depending on the number of lines written]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104533#p104533"><![CDATA[
Maybe this is closer to what you were looking for.<br>You will need to make sure the other bots are added to this bot and have the b flag.<div class="codebox"><p>Code: </p><pre><code># Set the channel to monitor #set wasidle(chan) "#sumchan"# Set the time (in minutes) for the channel to be considered idle #set wasidle(time) "15"# Set userfile flags to be exempt from idle monitoring ## note: set this empty to not exempt anyone #set wasidle(exempt) "b|b"#### END OF SETTINGS ####bind pubm - "$wasidle(chan) *" was:idle# force this eggdrop conf setting to be disabled #set exclusive-binds 0# convert minutes to seconds, and save result #set wasidle(time) [expr {$wasidle(time) * 60}]if {![info exists wasidle(lastut)]} { set wasidle(lastut) [unixtime] }proc was:idle {nk uh hn ch tx} {  global wasidle  if {$wasidle(exempt) eq "" || ![matchattr $hn $wasidle(exempt) $ch]} {    set wasidle(lastut) [unixtime]  }  return 0}</code></pre></div>Note: edited the above bind pubm line to now be correct.<br><br>You will still need to modify the existing script(s) as above.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Mon Nov 02, 2015 11:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-11-02T21:39:18-04:00</updated>

		<published>2015-11-02T21:39:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104532#p104532</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104532#p104532"/>
		<title type="html"><![CDATA[write a message, depending on the number of lines written]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104532#p104532"><![CDATA[
SpiKe^^ It's an intelligent way to solve the problem but... is there any way to consider idle when other bots writes ?<br>The idea lies in to except nicks from those bots because what I want the bot to publish advertisments if nobody user (human) is writting.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Mon Nov 02, 2015 9:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2015-10-31T17:16:59-04:00</updated>

		<published>2015-10-31T17:16:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104530#p104530</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104530#p104530"/>
		<title type="html"><![CDATA[write a message, depending on the number of lines written]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104530#p104530"><![CDATA[
I might go about this somewhat differently.<br><br>Make a small script that will keep track of the idleness of the channel.<br>I would do this by simply storing the timestamp of the last post to the channel, in a global variable...<div class="codebox"><p>Code: </p><pre><code># Set the channel to monitor #set wasidle(chan) "#sumchan"# Set the time (in minutes) for the channel to be considered idle #set wasidle(time) "15"#### END OF SETTINGS ####bind pubm - "* $wasidle(chan)" was:idle# force this eggdrop conf setting to be disabled #set exclusive-binds 0# convert minutes to seconds, and save result #set wasidle(time) [expr {$wasidle(time) * 60}]if {![info exists wasidle(lastut)]} { set wasidle(lastut) [unixtime] }proc was:idle {nk uh hn ch tx} {  global wasidle  set wasidle(lastut) [unixtime]  return 0}</code></pre></div>Then, at the top of the process that does not want to continue if the channel is idle, I might add something like this...<div class="codebox"><p>Code: </p><pre><code>  global wasidle  if {[info exists wasidle(lastut)]} {    if {([unixtime]-$wasidle(lastut)) &gt; $wasidle(time)} { return 0 }  }</code></pre></div>NOTE: the exact code to add to the process, and where to add it, may differ depending on the fine points of the existing code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Oct 31, 2015 5:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-10-31T12:12:38-04:00</updated>

		<published>2015-10-31T12:12:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104529#p104529</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104529#p104529"/>
		<title type="html"><![CDATA[Re: write a message, depending on the number of lines writte]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104529#p104529"><![CDATA[
Ah. Ok.<br>That's different from what I originally thought you wanted.<br><br>Using the tcl command getchanidle  and a foreach loop iterating through a list of nicks currently in the channel, it shouldn't be too difficult to write a tcl script that can determine if no user has spoken in the channel for more than x minutes.   I suppose you would want to do this check often, and that could be controlled by a cron bind.<br><br>As to how you would integrate this determination with your current script that is doing the announcements now - we'd have to examine that script and perhaps you would have to modify it too.<br><br>If you know some TCL,  have a look here:<br><a href="http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html" class="postlink">http://www.eggheads.org/support/egghtml ... mands.html</a><br>and text search it for<br>getchanidle<br><br>Perhaps someone else will come along with another idea for you too.<br>What I have mentioned above is just the first thing that came to my mind.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sat Oct 31, 2015 12:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-10-31T10:43:25-04:00</updated>

		<published>2015-10-31T10:43:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104528#p104528</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104528#p104528"/>
		<title type="html"><![CDATA[Re: write a message, depending on the number of lines writte]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104528#p104528"><![CDATA[
Is There some more specific snippet?<br>I need my bot radio advertising write songs that are broadcast on channel activity.<br>There is a time of night that the channels are not active and what I want is that if no one writes, the bot  no more type advertising on that channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat Oct 31, 2015 10:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-10-28T07:58:17-04:00</updated>

		<published>2015-10-28T07:58:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104525#p104525</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104525#p104525"/>
		<title type="html"><![CDATA[Re: write a message, depending on the number of lines writte]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104525#p104525"><![CDATA[
<blockquote class="uncited"><div>I want the bot to write a message, depending on the number of lines written in the channel.<br>You can individually configure the channels for this action?</div></blockquote>How about a protection script?  One that watches for 'flooding' by number of lines posted?<br><br>For example, AllProtection can be configured to just warn.<br>Edit that warning, and wouldn't that do what you want?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Oct 28, 2015 7:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-10-27T22:47:57-04:00</updated>

		<published>2015-10-27T22:47:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104524#p104524</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104524#p104524"/>
		<title type="html"><![CDATA[write a message, depending on the number of lines written]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104524#p104524"><![CDATA[
I want the bot to write a message, depending on the number of lines written in the channel.<br>You can individually configure the channels for this action?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Tue Oct 27, 2015 10:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
