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

	<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>2003-02-22T23:46:23-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-02-22T23:46:23-04:00</updated>

		<published>2003-02-22T23:46:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16961#p16961</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16961#p16961"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16961#p16961"><![CDATA[
Not to nitpick but using == still makes it case sensitive.<br><br>% expr {"asdf" == "asdf"}<br>1<br>% expr {"asdf" == "ASDF"}<br>0<br><br>The best way to check that is as ppslim said,<br>if {[string equal -nocase $string1 $string2]} {<br>  blah<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sat Feb 22, 2003 11:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-22T19:20:55-04:00</updated>

		<published>2003-02-22T19:20:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16956#p16956</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16956#p16956"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16956#p16956"><![CDATA[
<blockquote class="uncited"><div>Why use a matching function, when theres no wildcards. "string equal" is more suited gfor this.</div></blockquote>if i want to make a equal check i would simply use $who == "$botnick![getchanhost $botnick]" <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<br><br>but thx stdragon for correcting the expression for string match, i knew only seen it somewhere like this ^.^.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Feb 22, 2003 7:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-02-22T17:50:59-04:00</updated>

		<published>2003-02-22T17:50:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16954#p16954</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16954#p16954"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16954#p16954"><![CDATA[
Actually since this is from a +b, $who may have wildcards.<br><br>But I should have read more carefully instead of copy and pasting, because the arguments are in the wrong order.<br><br>string match -nocase $who "$botnick![getchanhost $botnick]"<br><br>(the pattern comes before the string to match against)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sat Feb 22, 2003 5:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-02-22T17:21:57-04:00</updated>

		<published>2003-02-22T17:21:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16953#p16953</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16953#p16953"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16953#p16953"><![CDATA[
<blockquote class="uncited"><div>It might be easier to say<br><br>string match -nocase "$botnick![getchanhost $botnick]" $who</div></blockquote>And I thought better of you <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Why use a matching function, when theres no wildcards. "string equal" is more suited gfor this.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sat Feb 22, 2003 5:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-02-22T16:50:23-04:00</updated>

		<published>2003-02-22T16:50:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16952#p16952</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16952#p16952"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16952#p16952"><![CDATA[
Humm.. yes, that will be usefull only for the +b bind.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Feb 22, 2003 4:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-02-22T16:38:45-04:00</updated>

		<published>2003-02-22T16:38:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16951#p16951</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16951#p16951"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16951#p16951"><![CDATA[
It might be easier to say<br><br>string match -nocase "$botnick![getchanhost $botnick]" $who<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sat Feb 22, 2003 4:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-22T15:32:32-04:00</updated>

		<published>2003-02-22T15:32:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16944#p16944</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16944#p16944"/>
		<title type="html"><![CDATA[hmmm]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16944#p16944"><![CDATA[
means the [string match m*h muh] expression works? great, ill remember that <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=2382">De Kus</a> — Sat Feb 22, 2003 3:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pitchat]]></name></author>
		<updated>2003-02-22T15:11:17-04:00</updated>

		<published>2003-02-22T15:11:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16938#p16938</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16938#p16938"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16938#p16938"><![CDATA[
thanks alll it works fine  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2723">Pitchat</a> — Sat Feb 22, 2003 3:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-22T15:07:22-04:00</updated>

		<published>2003-02-22T15:07:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16937#p16937</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16937#p16937"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16937#p16937"><![CDATA[
bad suggestion, i think. because $who will not be a nick, but a hostmark in case of a +b chanmode <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<br>but you are right, i should tolower the string! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>lets show it in an example. lets say we are on an irc server having a bot called "StarZ|Clan" on hostmark "<a href="mailto:ben1@server4.phoenix-shells.de">ben1@server4.phoenix-shells.de</a>". someone sets the ban "*!*@server4.phoenix-shells.de". i am sure "*!*@server4.phoenix-shells.de" != "StarZ|Clan". but a ban "s*|clan!*@*.*" woudnt match "StarZ|Clan!<a href="mailto:ben1@server4.phoenix-shells.de">ben1@server4.phoenix-shells.de</a>", either, but would be a legal ban against the bot. its time we really need tolower again <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">.<br>so [string match "$botnick![getchanhost $botnick]" $who] must be replaced with<div class="codebox"><p>Code: </p><pre><code>[string match [string tolower "$botnick![getchanhost $botnick]"] [string tolower $who]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Feb 22, 2003 3:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-02-22T02:37:38-04:00</updated>

		<published>2003-02-22T02:37:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16904#p16904</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16904#p16904"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16904#p16904"><![CDATA[
And a simple sugestion, replace:<div class="codebox"><p>Code: </p><pre><code>  } elseif { $mode == "+b" &amp;&amp; [string match "$botnick![getchanhost $botnick]" $who] } {</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>  } elseif { $mode == "+b" &amp;&amp; [string match "$who" "$botname"]} { </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Feb 22, 2003 2:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-02-22T02:26:55-04:00</updated>

		<published>2003-02-22T02:26:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16902#p16902</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16902#p16902"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16902#p16902"><![CDATA[
'strlwr' is a proc from alltools.tcl and stands for 'string tolower', so it's correct <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=187">caesar</a> — Sat Feb 22, 2003 2:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-22T15:09:07-04:00</updated>

		<published>2003-02-22T00:55:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16900#p16900</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16900#p16900"/>
		<title type="html"><![CDATA[well, well]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16900#p16900"><![CDATA[
there are really a few misstakes.<br>fot comparing the banhostmark i would try using string match comparing "$botnick![getchanhost $botnick]" with "$who". i hope string match can compare with wildcards, i think it can, but im not sure. but i am sure there is a way to do that.<br>then i dunno if you can use ; to end command lines, ussually you start a new line <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">. but if you use elseif instead of if in the second time, you dont need the first return 0 at all.<br>if you pray, perhaps it works: <div class="codebox"><p>Code: </p><pre><code>bind mode - * modedeopproc modedeop {nick host hand chan mode who} {  global botnick botname  if { $mode == "-o" &amp;&amp; $who == $botnick &amp;&amp; [strlwr $botnick] != [strlwr $nick] } {    putbot "Precieuse" "msgbot $nick ($host) m'a déopé sur $chan"   } elseif { $mode == "+b" &amp;&amp; [string match [string tolower "$botnick![getchanhost $botnick]"] [string tolower $who]] } {    putbot "Precieuse" "msgbot $nick ($host) m'a banni sur $chan"  }}bind kick - "* $botnick" kickmsgproc kickmsg {nick host hand chan knick reason } {  putbot "Precieuse" "msgbot $nick ($host) m'a kické sur $chan (raison invoquée : $reason)"}</code></pre></div>eh btw, does strlwr the same the string tolower?! if not and strlwr is called a not availbe function, replace it <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=2382">De Kus</a> — Sat Feb 22, 2003 12:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pitchat]]></name></author>
		<updated>2003-02-21T16:30:10-04:00</updated>

		<published>2003-02-21T16:30:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16891#p16891</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16891#p16891"/>
		<title type="html"><![CDATA[what`s wrong in this script ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16891#p16891"><![CDATA[
hi <br>this is suppose to be a script that warn  if the bot is been deop by  somebody but it doesnt work at all<br><br>bind mode - * modedeop<br><br>proc modedeop {nick host hand chan mode who} {<br>global botnick botname<br><br>if { $mode == "-o" &amp;&amp; $who == $botnick &amp;&amp; [strlwr $botnick] != [strlwr $nick] } { putbot "Precieuse" "msgbot $nick ($host) m'a déopé sur $chan" ; return 0 }<br><br>set banhost "*!*[string range $who [string first @ $who] e]"<br>set bothost "*!*[string range $botname [string first @ $botname] e]"<br><br>if { $mode == "+b" &amp;&amp; $banhost == $bothost} { putbot "Precieuse" "msgbot $nick ($host) m'a banni sur $chan" }<br>return 0 ;<br>}<br><br>bind kick - * kickmsg<br>proc kickmsg {nick host hand chan knick reason } {<br>global botnick<br>if {[strlwr $knick] == [strlwr $botnick] } { putbot "Precieuse" "msgbot $nick ($host) m'a kické sur $chan (raison invoquée : $reason)"}<br>}<br><br>putlog "deop check script lancé - Date: 4-02-01"<br><br><br>thanks<br>Pitchat[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2723">Pitchat</a> — Fri Feb 21, 2003 4:30 pm</p><hr />
]]></content>
	</entry>
	</feed>
