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

	<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-03-02T18:55:30-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-03-02T18:55:30-04:00</updated>

		<published>2003-03-02T18:55:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17320#p17320</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17320#p17320"/>
		<title type="html"><![CDATA[however...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17320#p17320"><![CDATA[
a script like this exists. i dunno where i have it from, but here it is: <div class="codebox"><p>Code: </p><pre><code>############################################################################ WordKick v1.50 by ccr/TNSP &lt;ccr@tnsp.org&gt;# Based on original wordkick.tcl by Goblet &lt;goblet@goblet.net&gt;############################################################################ Configure these as you like## Kickword mask/message file# (FORMAT: See the example file!)set wc_badword_file "data.wordkick"## "Random happy-joy-joy-messages file"# (FORMAT: One message per line)set wc_happy_msg_file "data.happymsg"## Gentle mode:# 0 = Kick with kickmessage, say happymsg just before kicking# 1 = Don't kick, just say happymsg.set wc_gentlemode 0## Irritation treshold mode:# 0 = Normal, immendiate kick on detected kickword.# 1 = Irritation tresholded kick. See README.set wc_irritationmode 0# Treshold of irritation. If this many kickwords are said# fast enough, bot starts kicking.set wc_irritationtreshold 1# Preferred message type ("PRIVMSG" and "NOTICE")set wc_preferredmsg "NOTICE"########################################################################### No need to look below this line##########################################################################set wc_message "WordKick v1.50 by ccr/TNSP &amp; Goblet"set wc_name "WKick"###### Read the bad-word file###catch {unset wc_bad_mask_list}catch {unset wc_kick_msg_list}set wc_badword_max 0set fd [open $wc_badword_file r]   while {![eof $fd]} {          gets $fd foo          if {[string first # $foo] &amp;&amp; ([lindex $foo 0] != "")} {              set foo [split $foo "$"]              lappend wc_bad_mask_list [lindex $foo 0]              lappend wc_kick_msg_list [lrange $foo 1 end]              incr wc_badword_max              }         }close $fd###### Read the happy-message file###set wc_happy_msg_max 0catch {unset wc_happy_msg_list}set fd [open $wc_happy_msg_file r]   while {![eof $fd]} {          gets $fd foo              lappend wc_happy_msg_list $foo      incr wc_happy_msg_max         }close $fd###### Initialize the script###bind time - "* % % % %" wc_timerbind pubm - %* wc_checkbind ctcp - ACTION wc_checkputlog "$wc_message"putlog "(maskfile: $wc_badword_file, $wc_badword_max // happymsg: $wc_happy_msg_file, $wc_happy_msg_max)"if {$wc_irritationmode} {putlog "(irritation mode, treshold: $wc_irritationtreshold)" } else {putlog "(normal wordkick mode)"}catch {unset wc_irritation}set wc_irritation 0###### Change the irritation###proc wc_timer {umin uhour uday umonth uyear} {global wc_irritationif {$wc_irritation &gt; 0} {set wc_irritation [expr $wc_irritation - 1]}}###### Match the messages with bad-word list###proc wc_check {nick uhost hand chan args} { global wc_bad_mask_list wc_kick_msg_list botnick wc_preferredmsg global wc_happy_msg_list wc_happy_msg_max wc_name wc_gentlemode global wc_irritation wc_irritationmode wc_irritationtreshold# Convert to lower case set args [string tolower $args]# Go through the sentence set kickit 0 set x 0 foreach foo $wc_bad_mask_list {set foo2 [split $foo "|"]foreach i $foo2 {if {[string match $i $args]} {putlog "$wc_name: $nick@$chan said a bad thing: $i"if {[matchattr $hand "f" $chan]} { return 0 }# Say happymsg#if {[rand 100] &gt; 40} {putserv "$wc_preferredmsg $chan :$nick, [lindex $wc_happy_msg_list [rand $wc_happy_msg_max]]"#}# Check for gentle-modeif {$wc_gentlemode || [matchattr $hand j]} { return 0 }# Check for irritation modeif {$wc_irritationmode} {if {$wc_irritation &gt; $wc_irritationtreshold} {set kickit 1} else {incr wc_irritation}} else {set kickit 1}# Kick the lamerif {$kickit} {putkick $chan $nick Badword Autokick ([lindex $wc_kick_msg_list $x]), Warnung -$x-return 0}}} incr x }}</code></pre></div>example for the 2 data. files: <div class="codebox"><p>Code: </p><pre><code>hentai nur jugendfreie Inhaltefick schlecher Umgang[censored] schlecher Umgangnigger schlecher Umgangporn nur jugendfreie Inhaltep0rn nur jugendfreie Inhaltepr0n nur jugendfreie Inhaltewarez keine illegale Softwarecrack keine illegale Softwarearschloch schlecher Umgangasshole schlecher Umgangwixer schlecher Umganghure schlecher Umgangnutte schlecher Umgangbitch schlecher UmgangTechno.gegen.Hiphop Execess Advertising</code></pre></div><div class="codebox"><p>Code: </p><pre><code>lalalalala, ich liebe solche Worte.Du hast einen Umgangston hier, tztztz.man oh man, das war Dumm...Hau... ruck! Und noch einer weniger.PAAAARTYYYYY!!! und du fliegst...</code></pre></div>this script worked, but seems it has problems with the kick reason, i didn't investigate it so long.<br>but perhaps the problem was only, the user alway singoff after spamming...<br><br>PS: the 4 stars are of course not in my files, it is called f-u-c-k <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> — Sun Mar 02, 2003 6:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Yourname]]></name></author>
		<updated>2003-03-02T04:12:16-04:00</updated>

		<published>2003-03-02T04:12:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17277#p17277</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17277#p17277"/>
		<title type="html"><![CDATA[Looking for a special word ban/kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17277#p17277"><![CDATA[
If only everyone was a programmer with a programming mind *sigh* <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>I get so many brainy ideas, only I can't code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13">Yourname</a> — Sun Mar 02, 2003 4:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-03-01T15:02:55-04:00</updated>

		<published>2003-03-01T15:02:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17262#p17262</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17262#p17262"/>
		<title type="html"><![CDATA[Looking for a special word ban/kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17262#p17262"><![CDATA[
Heh, at least try a bit and use the instructions you've recived and you'll get more. <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 Mar 01, 2003 3:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TRaSH]]></name></author>
		<updated>2003-03-01T14:55:39-04:00</updated>

		<published>2003-03-01T14:55:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17261#p17261</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17261#p17261"/>
		<title type="html"><![CDATA[Looking for a special word ban/kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17261#p17261"><![CDATA[
If i could i would  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2769">TRaSH</a> — Sat Mar 01, 2003 2:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[serra]]></name></author>
		<updated>2003-02-28T22:14:24-04:00</updated>

		<published>2003-02-28T22:14:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17227#p17227</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17227#p17227"/>
		<title type="html"><![CDATA[Looking for a special word ban/kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17227#p17227"><![CDATA[
hi,<br><br>so.. why don't you try coding it yourself? <br>there's a lot of ways to do that i woud suggest two:<br><br>One is using files or some sql db to store the words and the message for each word.<br>Then, add a bind pubm - * in your tcl and wile reading "word" from the file, check if the argument matches that word (ex: if [string match $word $arg]). if this returns 1, then send the message to the user.<br><br>if using files the data could be stored like this:<br>word1;message for word 1<br>word2;message for word 2<br>etc<br><br>to avoid beeing constantly opening reading and closing the file, you can read the file once and keep all in memory, in a list for example. Or directely set the list of words and messages:<br><br>set bla {<br>  {<br>    "word1"<br>    "message for word 1"<br>   }<br>   {<br>     "word2"<br>     "message for word 2"<br>   }<br>}<br><br>than you can access each element of this "list of lists":<br>[lindex [lindex $bla 0] 0] == word1<br>[lindex [lindex $bla 0] 1] == message for word 1<br>[lindex [lindex $bla 1] 0] == word2<br>[lindex [lindex $bla 1] 1] == message for word 2<br><br>that's it<br>pedro<br><br>PS: this might have errors, actuay i'm not very used to work in TCL, in C this was much more simple :p<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2745">serra</a> — Fri Feb 28, 2003 10:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TRaSH]]></name></author>
		<updated>2003-02-28T16:24:50-04:00</updated>

		<published>2003-02-28T16:24:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17216#p17216</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17216#p17216"/>
		<title type="html"><![CDATA[Looking for a special word ban/kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17216#p17216"><![CDATA[
I'm looking for a word ban/kick script that has the option to use different reasons for typing or showing certain words,<br>but it has to be configurable by me.<br>so if you type a certain word you get a special reason why<br>and for another word you see another reasons why.<br>Hope you understand what i mean.<br>i already checked the archive but i didn't really find a script that had this option<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2769">TRaSH</a> — Fri Feb 28, 2003 4:24 pm</p><hr />
]]></content>
	</entry>
	</feed>
