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

	<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-10-18T19:09:21-04:00</updated>

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

		<entry>
		<author><name><![CDATA[tueb]]></name></author>
		<updated>2009-10-18T19:09:06-04:00</updated>

		<published>2009-10-18T19:09:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90554#p90554</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90554#p90554"/>
		<title type="html"><![CDATA[[SOLVED]check if some mentioned by an user is in the channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90554#p90554"><![CDATA[
great, thx!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9349">tueb</a> — Sun Oct 18, 2009 7:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-10-18T18:46:08-04:00</updated>

		<published>2009-10-18T18:46:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90551#p90551</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90551#p90551"/>
		<title type="html"><![CDATA[[SOLVED]check if some mentioned by an user is in the channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90551#p90551"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc check_nick {nick uhost hand chan text} {   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]} {      # checknick is in the channel      # do stuff with $::checknick inside this proc or invoke      # another procedure, keep in mind:      # $::checknick will be the nickname found      # $::checkchan will be the channel this was issued in   }}</code></pre></div>This is taken from the <a href="http://forum.egghelp.org/viewtopic.php?t=16022" class="postlink">fully automated away detection</a> script I wrote awhile back. This should work for 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 Oct 18, 2009 6:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tueb]]></name></author>
		<updated>2009-10-18T19:09:21-04:00</updated>

		<published>2009-10-18T17:43:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90550#p90550</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90550#p90550"/>
		<title type="html"><![CDATA[[SOLVED]check if some mentioned by an user is in the channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90550#p90550"><![CDATA[
Hi,<br><br>I need to check a string (with more than one word in it) if it contains a nick of someone in the channel.<br><br>for example: $string could be "tueb: are you there?"<br><br>and i want to know if someone with the nick "tueb", "are", "you" or "there" is in the chan.<br><br>thanks,<br><br>tueb<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9349">tueb</a> — Sun Oct 18, 2009 5:43 pm</p><hr />
]]></content>
	</entry>
	</feed>
