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

	<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-11-14T12:48:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-11-14T12:48:18-04:00</updated>

		<published>2009-11-14T12:48:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90908#p90908</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90908#p90908"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90908#p90908"><![CDATA[
This fixes a slight problem the automated away had detecting nicknames placed up against punctuation.<br><br>&lt;nick&gt; hey guy are you there?<br>if the nickname "guy" was in the channel, and set to away, the script works.<br><br>&lt;nick&gt; hey guy, are you there?<br>The script would fail, it will look for "guy,". The new version will not, it has a list of punctuation you can alter and these will be stripped before comparing to nicknames. New version will look for "guy" correctly in these instances.<br><br>Enjoy and have a fun. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><div class="codebox"><p>Code: </p><pre><code># Fully Automated Away Detection by speechles# Egghelp version v1.4 - tested and working.. yay!!# Donate to slennox @ egghelp.org if you like this script!# Fully automatic, you configure nothing.# The script will decide based upon the length of the nicklist# or the length of user input on which to scan with, it will# use whichever is shorter which makes it faster, enjoy.# MAKE SURE TO .chanset #yourchan +checkaway# afterwards the script will function in #yourchan# revision history# v1.4 - added a single config option to enter characters#        that need to be stripped from text that are#        placed up against nicknames.# v1.3 - added idle time duration to the away message reply# v1.2 - now wont react if that nickname is away and#        mentions their own nickname in channel. This prevents#        public away messages, etc from making this script#        spam channels.# v1.1 - now fully automated, no more checklist# v1.0 - scripted using checklist user sets in config.# set the characters you wish to strip when prefixed or# appended to nicknames# ----variable auto_strip ":;,.?"# SCRIPT begins: there is no config this is 100% automatic.# -------------# initialize the global variablesvariable checknick ""variable checkchan ""# flag to control behavior per channelsetudef flag checkaway# bind to raw reply concerning away status of whoisbind RAW  -|-  301 checkaway# bind to everything said in channelbind pubm -|- * checkcriteria# check which token to whois phrased from user input.# if we have a match, discern which token to evaluate as nick# and if they are indeed on the channel issue a whois requestproc checkcriteria {nick uhost hand chan text} {   if {[lsearch -exact [channel info $chan] +checkaway] == -1} { return }   set ::checkchan $chan   set ::checknick ""   if {[llength [chanlist $chan]] &lt; [llength [split $text]]} {      foreach n [chanlist $chan] {         if {[lsearch [split [string tolower $text]] "*[string tolower $n]*"] != -1} {            if {[string equal [string length $n] [string length [string trim [lindex [split $text] [lsearch [split [string tolower $text]] [string tolower $n]]] $::auto_strip]]]} {               set ::checknick $n               break            }         }      }   } else {      foreach n [split $text] {         if {[lsearch [split [string tolower [join [chanlist $chan]]]] [string trim [string tolower $n] $::auto_strip]] != -1} {            set ::checknick [string trim $n $::auto_strip]            break         }      }   }   if {[string length $::checknick] &amp;&amp; ![string equal -nocase $n $nick] &amp;&amp; [onchan $::checknick $chan]} {      putserv "WHOIS $::checknick"   }}# interpret the whois request and make sure the nick requested matches# the whois reply we are searching for. If the person is not away, a 301# will not be sent, and the whois will be ignored as per requested.proc checkaway {from key text} {   if {![string match -nocase [lindex [split $text] 1] $::checknick]} { return }   putserv "privmsg $::checkchan :[lindex [split $text] 1] is away: [string range [join [lrange [split $text] 2 end]] 1 end] (idle: [duration [expr {[getchanidle $::checknick $::checkchan] * 60}]])"   set ::checknick ""}putlog "Automated away detection v1.4 has been loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Nov 14, 2009 12:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[c0re]]></name></author>
		<updated>2009-03-27T14:10:53-04:00</updated>

		<published>2009-03-27T14:10:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88141#p88141</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88141#p88141"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88141#p88141"><![CDATA[
omg the bot keep whoising people <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>isnt there any other way?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10429">c0re</a> — Fri Mar 27, 2009 2:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[lenooxx]]></name></author>
		<updated>2009-03-26T15:42:30-04:00</updated>

		<published>2009-03-26T15:42:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88128#p88128</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88128#p88128"/>
		<title type="html"><![CDATA[hi]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88128#p88128"><![CDATA[
i got same problem  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> <br>Error trying to set +checknames for #***, invalid mode.<br><br>what happend? :S<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10564">lenooxx</a> — Thu Mar 26, 2009 3:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[deadweasel]]></name></author>
		<updated>2009-01-01T20:29:42-04:00</updated>

		<published>2009-01-01T20:29:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86657#p86657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86657#p86657"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86657#p86657"><![CDATA[
I'm currently trying to get this little bad boy running with my own bot, but I can't set the channel mode specified.<br><br>Neither of these work:<br><br>.chanset #channame +checkaway<br>.chanset #channame +checknames<br><br>Both return "invalid mode".  Of course, the bot is unresponsive when I am set to away. <br><br>What am I missing here?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10405">deadweasel</a> — Thu Jan 01, 2009 8:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-11-08T14:45:26-04:00</updated>

		<published>2008-11-08T14:45:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85746#p85746</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85746#p85746"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85746#p85746"><![CDATA[
my bad.. lmao..<div class="codebox"><p>Code: </p><pre><code>if {[string length $::checknick] &amp;&amp; ![string equal $n $nick] &amp;&amp; [onchan $::checknick $chan]} { </code></pre></div>Change that to look like below and solved, I forgot the -nocase..  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <div class="codebox"><p>Code: </p><pre><code>if {[string length $::checknick] &amp;&amp; ![string equal -nocase $n $nick] &amp;&amp; [onchan $::checknick $chan]} { </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Nov 08, 2008 2:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[holycrap]]></name></author>
		<updated>2008-11-08T14:17:44-04:00</updated>

		<published>2008-11-08T14:17:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85745#p85745</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85745#p85745"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85745#p85745"><![CDATA[
<blockquote class="uncited"><div>If the person away mentions their own nickname, say a public away message, the script before would've spammed they were away which is redundant.</div></blockquote>This version of the script is nick case sensitive. If your nick is "Java" and you type "java" it will still read the away message.<br><br><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=9651">holycrap</a> — Sat Nov 08, 2008 2:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-11-08T14:46:44-04:00</updated>

		<published>2008-11-07T22:36:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85744#p85744</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85744#p85744"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85744#p85744"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Fully Automated Away Detection by speechles# Egghelp version v1.3 - tested and working.. yay!!# Donate to slennox @ egghelp.org if you like this script!# Fully automatic, you configure nothing.# The script will decide based upon the length of the nicklist# or the length of user input on which to scan with, it will# use whichever is shorter which makes it faster, enjoy.# MAKE SURE TO .chanset #yourchan +checkaway# afterwards the script will function in #yourchan# revision history# v1.3 - added idle time duration to the away message reply# v1.2 - now wont react if that nickname is away and#        mentions their own nickname in channel. This prevents#        public away messages, etc from making this script#        spam channels.# v1.1 - now fully automated, no more checklist# v1.0 - scripted using checklist user sets in config.# SCRIPT begins: there is no config this is 100% automatic.# -------------# initialize the global variablesvariable checknick ""variable checkchan ""# flag to control behavior per channelsetudef flag checkaway# bind to raw reply concerning away status of whoisbind RAW  -|-  301 checkaway# bind to everything said in channelbind pubm -|- * checkcriteria# check which token to whois phrased from user input.# if we have a match, discern which token to evaluate as nick# and if they are indeed on the channel issue a whois requestproc checkcriteria {nick uhost hand chan text} {   if {[lsearch -exact [channel info $chan] +checkaway] == -1} { return }   set ::checkchan $chan   set ::checknick ""   if {[llength [chanlist $chan]] &lt; [llength [split $text]]} {      foreach n [chanlist $chan] {         if {[lsearch [split [string tolower $text]] [string tolower $n]] != -1} {            if {[string equal [string length $n] [string length [lindex [split $text] [lsearch [split [string tolower $text]] [string tolower $n]]]]]} {               set ::checknick $n               break            }         }      }   } else {      foreach n [split $text] {         if {[lsearch [split [string tolower [join [chanlist $chan]]]] [string tolower $n]] != -1} {            set ::checknick $n             break         }      }   }   if {[string length $::checknick] &amp;&amp; ![string equal -nocase $n $nick] &amp;&amp; [onchan $::checknick $chan]} {      putserv "WHOIS $::checknick"   }}# interpret the whois request and make sure the nick requested matches# the whois reply we are searching for. If the person is not away, a 301# will not be sent, and the whois will be ignored as per requested.proc checkaway {from key text} {   if {![string match -nocase [lindex [split $text] 1] $::checknick]} { return }   putserv "privmsg $::checkchan :[lindex [split $text] 1] is away: [string range [join [lrange [split $text] 2 end]] 1 end] (idle: [duration [expr {[getchanidle $::checknick $::checkchan] * 60}]])"   set ::checknick ""}putlog "Automated away detection has been loaded."</code></pre></div><blockquote class="uncited"><div>&lt;speechles&gt; where you at tweek?<br>&lt;sp33chy&gt; tweek is away: is away: (Auto-Away after 10 mins) [BX-MsgLog Off] (idle: 31 minutes)<br>&lt;speechles&gt; how about you norman, you around?<br>&lt;sp33chy&gt; norman is away: offline, leave a msg!!! (idle: 6 days 11 hours 50 minutes)</div></blockquote>Updated the script a bit to help eliminate some problems and added in a new feature. If the person away mentions their own nickname, say a public away message, the script before would've spammed they were away which is redundant. This won't happen now, the person who is away can no longer type their own nick and watch the bot reply their status. Also added idle time duration to show up along with the away message. This helps determine how long the person might have been away.. For those using this script, it has also been uploaded to the archive. Enjoy and have a fun <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: corrected script above for problem mentioned below  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Nov 07, 2008 10:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[holycrap]]></name></author>
		<updated>2008-10-20T23:36:21-04:00</updated>

		<published>2008-10-20T23:36:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85580#p85580</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85580#p85580"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85580#p85580"><![CDATA[
Cool, it works now. I was using v1.1 in the archive. The code is a bit different from the one above. I'm using the one below. I hope it works the same(efficiency of the script).<br><br>Thank you once again! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><div class="codebox"><p>Code: </p><pre><code># Fully Automated Away Detection by speechles# Egghelp version v1.1 - tested and working.. yay!!# Donate to slennox @ egghelp.org if you like this script!# Fully automatic, you configure nothing.# The script will decide based upon the length of the nicklist# or the length of user input on which to scan with, it will# use whichever is shorter which makes it faster, enjoy.# MAKE SURE TO .chanset #yourchan +checkaway# afterwards the script will function in #yourchan# revision history# v1.1 - now fully automated, no more checklist# v1.0 - scripted using checklist user sets in config.# SCRIPT begins# initialize the global variablesvariable checknick ""variable checkchan ""# flag to control behavior per channelsetudef flag checkaway# bind to raw reply concerning away status of whoisbind RAW  -|-  301 checkaway# bind to everything said in channelbind pubm -|- * checkcriteria# check checklist against user input# if we have a match, discern which token to evaluate as nick# and if they are indeed on the channel issue a whois requestproc checkcriteria {nick uhost hand chan text} {   if {[lsearch -exact [channel info $chan] +checkaway] == -1} { return }   set ::checkchan $chan   set ::checknick ""   if {[llength [chanlist $chan]] &lt; [llength [split $text]]} {      foreach n [chanlist $chan] {         if {[lsearch [split [string tolower $text]] [string tolower $n]] != -1} {            if {[string equal [string length $n] [string length [lindex [split $text] [lsearch [split [string tolower $text]] [string tolower $n]]]]]} {               set ::checknick $n               break            }         }      }   } else {      foreach n [split $text] {         if {[lsearch [split [string tolower [join [chanlist $chan]]]] [string tolower $n]] != -1} {            set ::checknick $n            break         }      }   }   if {[string length $::checknick] &gt; 0 &amp;&amp; [onchan $::checknick $chan]} {      putserv "WHOIS $::checknick"   } }# interpret the whois request and make sure the nick requested matches# the whois reply we are searching for. If the person is not away, a 301# will not be sent, and the whois will be ignored as per requested.proc checkaway {from key text} {   if {![string match -nocase [lindex [split $text] 1] $::checknick]} { return }   putserv "privmsg $::checkchan :[lindex [split $text] 1] is away: [string range [join [lrange [split $text] 2 end]] 1 end]"   set ::checknick ""}putlog "*.Automated Away Detection v1.1* Loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9651">holycrap</a> — Mon Oct 20, 2008 11:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-10-20T22:33:32-04:00</updated>

		<published>2008-10-20T22:33:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85579#p85579</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85579#p85579"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85579#p85579"><![CDATA[
<blockquote class="uncited"><div>Hmm... It didn't really fixed it.<br><br>User: /away <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Will show.   User is away: <span style="color:red">)</span><br><br>It's still missing a colon in front. Shouldn't it be: User is away: <span style="color:red"><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></span><br><br>I guess what I'm asking is... I'm trying to get the colon to appear in front of the away message if I type /away <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">  as of now it will only show  )  missing the the : <br><br>Thanks</div></blockquote>The way it works on irc, is that : delineates your message in the raw read reply the bot receives { nick:away message here }. It doesn't see :<strong class="text-strong"></strong>) as happy face (depends entirely on your irc client), the bot then sees this as an away message of ")" { nick:) } quite frankly, since all away messages have colons preceeding. But if you want this displayed change to:<div class="codebox"><p>Code: </p><pre><code>putserv "privmsg $::checkchan :[lindex [split $text] 1] is away [join [lrange [split $text] 2 end]]" </code></pre></div>Conversely, you don't have to change a thing, and just set yourself /away ::<strong class="text-strong"></strong>) and that would also work (depends once again, on the irc client used to set the away message).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Oct 20, 2008 10:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[holycrap]]></name></author>
		<updated>2008-10-20T21:50:59-04:00</updated>

		<published>2008-10-20T21:50:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85578#p85578</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85578#p85578"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85578#p85578"><![CDATA[
Hmm... It didn't really fixed it.<br><br>User: /away :)<br><br>Will show.   User is away: <span style="color:red">)</span><br><br>It's still missing a colon in front. Shouldn't it be: User is away: <span style="color:red">:)</span><br><br>I guess what I'm asking is... I'm trying to get the colon to appear in front of the away message if I type /away :)  as of now it will only show  )  missing the the : <br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9651">holycrap</a> — Mon Oct 20, 2008 9:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-10-20T20:52:50-04:00</updated>

		<published>2008-10-20T20:52:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85577#p85577</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85577#p85577"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85577#p85577"><![CDATA[
<blockquote class="uncited"><div>Hi,<br><br>It's not a major issue but I noticed this if you set:<br><br>/away <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>The colon does not show if it's at the "beginning" or the "end" of the away message. It does show in between though.<br><br>Anyway to fix this?<br><br>I've tried removing<div class="codebox"><p>Code: </p><pre><code>":"</code></pre></div>from the line below, but it didn't fix it. It made it worst and show : every time.<div class="codebox"><p>Code: </p><pre><code>[join [lrange [split $text] 2 end]] ":"]"</code></pre></div>Thank You!</div></blockquote>That actually was corrected awhile ago in the above code.. but here is the single line to change<div class="codebox"><p>Code: </p><pre><code>putserv "privmsg $::checkchan :[lindex [split $text] 1] is away: [string range [join [lrange [split $text] 2 end]] 1 end]" </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Oct 20, 2008 8:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[holycrap]]></name></author>
		<updated>2008-10-20T19:10:08-04:00</updated>

		<published>2008-10-20T19:10:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85576#p85576</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85576#p85576"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85576#p85576"><![CDATA[
Hi,<br><br>It's not a major issue but I noticed this if you set:<br><br>/away :)<br><br>The colon does not show if it's at the "beginning" or the "end" of the away message. It does show in between though.<br><br>Anyway to fix this?<br><br>I've tried removing<div class="codebox"><p>Code: </p><pre><code>":"</code></pre></div>from the line below, but it didn't fix it. It made it worst and show : every time.<div class="codebox"><p>Code: </p><pre><code>[join [lrange [split $text] 2 end]] ":"]"</code></pre></div>Thank You!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9651">holycrap</a> — Mon Oct 20, 2008 7:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-09-01T00:44:32-04:00</updated>

		<published>2008-08-21T00:00:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84725#p84725</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84725#p84725"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84725#p84725"><![CDATA[
<blockquote class="uncited"><div>Cool, can't thank you enough!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>Anything that will make it works better are welcome.<br><br>I don't have that many nick in my channel, don't know if checking every word will slow the bot down or not.<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote><blockquote class="uncited"><div>&lt;speechles&gt; i wonder if test123 is here or there or anywhere<br>&lt;sp33chy&gt; TEST123 is away: this is an away test for egghelp<br>&lt;speechles&gt; do any of you guys know if that test123 guy is away or anything?<br>&lt;sp33chy&gt; TEST123 is away: this is an away test for egghelp<br>&lt;speechles&gt; hey atest123<br>&lt;speechles&gt; is there anybody heretest123 that can answer a question?<br>&lt;speechles&gt; test123<br>&lt;sp33chy&gt; TEST123 is away: this is an away test for egghelp</div></blockquote><div class="codebox"><p>Code: </p><pre><code># Fully Automated Away Detection by speechles# Egghelp version v1.0 - tested and working.. yay!!# Donate to slennox @ egghelp.org if you like this script!# Fully automatic, you configure nothing.# The script will decide based upon the length of the nicklist# or the length of user input on which to scan with, it will# use whichever is shorter which makes it faster, enjoy.# SCRIPT begins# initialize the global variablesvariable checknick ""variable checkchan ""# flag to control behavior per channelsetudef flag checknames# bind to raw reply concerning away status of whoisbind RAW  -|-  301 checkaway# bind to everything said in channelbind pubm -|- * checkcriteria# check which list is shorter, nicklist or text length# and use that to scan for similarity and issue the whoisproc checkcriteria {nick uhost hand chan text} {   if {![channel get $chan checknames]} { return }   set ::checkchan $chan   set ::checknick ""   if {[llength [chanlist $chan]] &lt; [llength [split $text]]} {      foreach n [chanlist $chan] {         if {[lsearch [split [string tolower $text]] [string tolower $n]] != -1} {            if {[string equal [string length $n] [string length [lindex [split $text] [lsearch [split [string tolower $text]] [string tolower $n]]]]]} {               set ::checknick $n               break            }         }      }   } else {      foreach n [split $text] {         # the join and split are used to emulate the behavior         # of the -nocase switch which isn't allowed during lsearch         # you can't string tolower a list, hence the join and split ;)         if {[lsearch [split [string tolower [join [chanlist $chan]]]] [string tolower $n]] != -1} {            set ::checknick $n            break         }      }   }   if {[string length $::checknick] &gt; 0 &amp;&amp; [onchan $::checknick $chan]} {      putserv "WHOIS $::checknick"   } }# interpret the whois request and make sure the nick requested matches# the whois reply we are searching for. If the person is not away, a 301# will not be sent, and the whois will be ignored as per requested.proc checkaway {from key text} {   if {![string match -nocase [lindex [split $text] 1] $::checknick]} { return }   putserv "privmsg $::checkchan :[lindex [split $text] 1] is away: [string range [join [lrange [split $text] 2 end]] 1 end]"   set ::checknick ""}putlog "Fully Automated Away Detection loaded."</code></pre></div>Here it is how you envisioned it. You configure nothing. The script will decide based on the length of the nicklist or length of text entered which to scan with. This will make it faster. It also is case insensitive as you can see in the example above. It also is smart enough not to react when the nickname is embedded as part of another word as shown in the examples above. This script should be more to your liking. Hope it doesn't lag your bot too badly <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>Remember, to enable it, get on your bots partyline and .chanset #yourchan +checknames<br><br>Note: On actually using the script often, I've found it doesn't really lag the bot one bit even running in channels containing thousands of nicknames. It's instantaneous response and even faster than the other code I posted.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Aug 21, 2008 12:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[holycrap]]></name></author>
		<updated>2008-08-17T19:13:47-04:00</updated>

		<published>2008-08-17T19:13:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84652#p84652</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84652#p84652"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84652#p84652"><![CDATA[
Cool, can't thank you enough!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>Anything that will make it works better are welcome.<br><br>I don't have that many nick in my channel, don't know if checking every word will slow the bot down or not.<br><br> <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=9651">holycrap</a> — Sun Aug 17, 2008 7:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-08-17T19:07:51-04:00</updated>

		<published>2008-08-17T19:07:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84651#p84651</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84651#p84651"/>
		<title type="html"><![CDATA[Fully Automated Away Detection [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84651#p84651"><![CDATA[
<blockquote class="uncited"><div>Cool, it works now! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> Didn't have .chanset #yourchan +checknames, that's why it didn't work.<br><br><span style="color:red">So, it's not possible to make the bot distinguish within the context of a sentence which is a nick?</span> It would be very cool if you can get this to work! Please?   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>This seems very limited... that the bot only reply on those triggers.<br><br>Ok.. gonna go to donate now.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote>It is limited, because having the bot check every single word within every single line said against the nick list would seriously drain the resources of your bot and slow it down to a crawl. You can add as many triggers as you want with as many different phrases as you need to compensate. This is exactly how the ai-seen within the gseen module works.<br><br>If you want, I can add the ability for it to use wildcarding more effectively.<br>"%nick are you there" - for this %nick will become a *, meaning anything before it will be interpreted, this may not be what you want entirely. I can make it so that this will be interpreted as a 4 word sentence. Replacing %nick with * and checking the sentence is 4 words. If you start or begin the entry with a * it would mean the length check isn't needed and would match an occurrence anywhere in the sentence.<br><br>I'll whip up an example of what I mean later to show you <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Aug 17, 2008 7:07 pm</p><hr />
]]></content>
	</entry>
	</feed>
