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

	<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>2012-03-06T23:20:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Barkeep]]></name></author>
		<updated>2012-03-06T23:19:18-04:00</updated>

		<published>2012-03-06T23:19:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98964#p98964</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98964#p98964"/>
		<title type="html"><![CDATA[Problem solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98964#p98964"><![CDATA[
Thanks for the quick reply Speechles.  We are having some other troubles with the bot but once it gets stable again I will implement this change.  I'm sure it will fix the issue so I will make this Solved.<br><br>Thanks again.<br><br>Barkeep<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11931">Barkeep</a> — Tue Mar 06, 2012 11:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2012-03-04T22:37:20-04:00</updated>

		<published>2012-03-04T22:37:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98940#p98940</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98940#p98940"/>
		<title type="html"><![CDATA[[SOLVED] Anti Abuse Script case sensative comparision]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98940#p98940"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc filter_bad_words {nick uhost handle channel arg} { ... set args [ccodes:filter $arg] ...   foreach badword $badwords {        if {[string match *$badword* $arg]}  {</code></pre></div>You are correct about the last 2 lines needing that [string tolower] wrapped around them removed. The issue is the script is "incorrectly" using the special reserved word "args" within it's procedure header. This causes your issue. Using "args" within the script is fine. But when using it to pass parameters as part of the procedure header without knowing what it does causes that issue. Change the lines above to look like they are and you should have no issues.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Mar 04, 2012 10:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Barkeep]]></name></author>
		<updated>2012-03-06T23:20:00-04:00</updated>

		<published>2012-03-04T13:30:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98936#p98936</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98936#p98936"/>
		<title type="html"><![CDATA[[SOLVED] Anti Abuse Script case sensative comparision]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98936#p98936"><![CDATA[
I am new to Eggdrops and TCL scripting.  I don't know much at all really.<br><br>On our bot we are using the Anti Abuse script from then archive and it works but we would like to make it so that is case sensitive for the comparisons. I have tried to contact the author but the e-mail address is no good any more.<br><br>I believe the problem is here:<div class="codebox"><p>Code: </p><pre><code>   foreach badword [string tolower $badwords] {     if {[string match *$badword* [string tolower $args]]}  {</code></pre></div>Where string tolower takes all the capitals out of both the badword file and the typed text.  I have tried to remove the string tolower but that just breaks the script. <br><br>So the question is what can I do to fix the script so that the comparisons are done in a case sensitive manner?<br><br>Here is the whole script:<br><div class="codebox"><p>Code: </p><pre><code>### Introduction# Anti Abuse Script# SadSalman &lt;-&gt; salman.mehmood@gmail.com# Version No: 0.2### Features:# * Sets a 2 Minute Channel ban on user who writes any of the#   defined bad words# * Doesn't ban users with +o OR +f flags# * Logs ALL user/op messages containing the defined words# * Strips Character Codes from Messages### Set Bad Words that you want the Bot to Kick onset badwords { "PERV""[censored]""nigger""nigga"}### Set Your Ban Reasonset badreason "You used word unacceptable in this channel"### Set Ban Timeset bwduration 120### Begin Script:## (Don't change anything below here... Unless you know tcl)## Binding all Public Messages to our Processbind pubm - * filter_bad_words### Borrowed from awyeahs tcl scripts (www.awyeah.org) ##### awyeah said: Thanks to user and ppslim for this control code removing filterproc ccodes:filter {str} {  regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\037|\002|\026|\006|\007} $str "" str  return $str}## Starting Processproc filter_bad_words {nick uhost handle channel args} { global badwords badreason banmask botnick bwduration set args [ccodes:filter $args]   set handle [nick2hand $nick]   set banmask "*![lindex [split $uhost @] 0]@[lindex [split $uhost @] 1]" foreach badword [string tolower $badwords] {     if {[string match *$badword* [string tolower $args]]}  {       if {[matchattr $handle +f]} {           putlog "-Anti Abuse Script- $nick ($handle) with +f flags said $args on $channel"       } elseif {[matchattr $handle +o]} {           putlog "-Anti Abuse Script- $nick ($handle) with +o flags said $args on $channel"       } else {           putlog "-Anti Abuse Script- KICKED $nick on $channel matched by $args"           putquick "KICK $channel $nick :$badreason"           newchanban $channel $banmask $botnick $badreason $bwduration       }    }  }}bind pubm - * filter_bad_wordsputlog "SadSalman's Anti Abuse Script Loaded"</code></pre></div>Thanks for the help,<br><br>Barkeep<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11931">Barkeep</a> — Sun Mar 04, 2012 1:30 pm</p><hr />
]]></content>
	</entry>
	</feed>
