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

	<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-08-17T14:03:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[WisH-GR]]></name></author>
		<updated>2009-08-17T14:03:03-04:00</updated>

		<published>2009-08-17T14:03:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89935#p89935</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89935#p89935"/>
		<title type="html"><![CDATA[url kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89935#p89935"><![CDATA[
thx i will try it and tell u<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10817">WisH-GR</a> — Mon Aug 17, 2009 2:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-08-17T12:36:53-04:00</updated>

		<published>2009-08-17T12:36:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89933#p89933</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89933#p89933"/>
		<title type="html"><![CDATA[url kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89933#p89933"><![CDATA[
I've done a limited amount of testing on the following script and it seems OK. Make sure you use .chanset #channelname +spam in the partyline for each bot channel you want it activated in.<br><div class="codebox"><p>Code: </p><pre><code># spam.tcl# kicks or kickbans users for spam words/phrases# functions for channel text, channel actions, channel notices and channel onotices### --------------------------------------------------------------------------------- ###### ---------- installation --------------------------------------------------------- #### install and source the tcl as normal# to function in #channelname requires in the partyline .chanset #channelname +spam### --------------------------------------------------------------------------------- ###### ---------- configuration -------------------------------------------------------- #### set here the list of words/phrases that a user may be punished for# upper/lower case or mixed doesn't matterset vSpamPunish {    "http://"    "www."}# set here the list of words/phrases that a user will not be punished for# upper/lower case or mixed doesn't matterset vSpamExempt {    "youtube"    "google"    "myspace"    "twitter"}# set here the punishment mode# 1 == always kick only# 2 == kick first time, kickban second# 3 == always kickbanset vSpamPunishMode 2# if punishment mode 2 above, set here the time (minutes) to cancel first offenceset vSpamSinTime 2# set here who on the channel is protected# 1 == channel ops and voices not protected# 2 == protect channel ops but not channel voices# 3 == protect channel ops and voicesset vSpamProtectMode 2# set here the ban time in minutes# a setting of 0 means permanentset vSpamBanTime 2### --------------------------------------------------------------------------------- ###### ---------- code ----------------------------------------------------------------- ###setudef flag spambind CTCP - ACTION pSpamCtcpbind NOTC - * pSpamNotcbind PUBM - * pSpamPubmproc pSpamBan {nick chan phrase} {    global vSpamBanTime    if {[onchan $nick $chan]} {        if {[string is integer -strict $vSpamBanTime]} {            set host [maskhost [getchanhost $nick $chan]]            pushmode $chan +b $host            flushmode $chan            utimer 3 [list pSpamKick $nick $chan $phrase]            if {$vSpamBanTime &gt; 0} {                timer $vSpamBanTime [list pSpamUnban $chan $host]            }        }    }    return 0}proc pSpamCheck {nick chan text} {    global vSpamExempt vSpamProtectMode vSpamPunish    switch -- $vSpamProtectMode {        1 {}        2 {if {[isop $nick $chan]} {return 0}}        3 {if {([isop $nick $chan]) || ([isvoice $nick $chan])} {return 0}}        default {return 0}    }    set punish 0    if {[llength $vSpamPunish] != 0} {        foreach bad $vSpamPunish {            if {[string match -nocase *${bad}* $text]} {                set punish 1                set phrase $bad                break            }        }        if {[llength $vSpamExempt] != 0} {            foreach good $vSpamExempt {                if {[string match -nocase *${good}* $text]} {                    set punish 0                    break                }            }        }    }    if {$punish} {pSpamPunish $nick $chan $phrase}    return 0}proc pSpamCtcp {nick uhost hand dest keyword text} {    if {[channel get $dest spam]} {        if {![isbotnick $nick]} {            if {[botisop $dest]} {                pSpamCheck $nick $dest $text            }        }    }    return 0}proc pSpamKick {nick chan phrase {warning ""}} {    if {[onchan $nick $chan]} {        switch -- [string length $warning] {            0 {putkick $chan $nick "spam detected *${phrase}*"}            default {putkick $chan $nick "spam detected *${phrase}* $warning"}        }    }    return 0}proc pSpamNotc {nick uhost hand text dest} {    set chan [string trimleft $dest @]    if {[regexp -- {^#} $chan]} {        if {[channel get $chan spam]} {            if {![isbotnick $nick]} {                if {[botisop $chan]} {                    pSpamCheck $nick $chan $text                }            }        }    }    return 0}proc pSpamPubm {nick uhost hand chan text} {    if {[channel get $chan spam]} {        if {![isbotnick $nick]} {            if {[botisop $chan]} {                pSpamCheck $nick $chan $text            }        }    }    return 0}proc pSpamPunish {nick chan phrase} {    global vSpamPunishMode vSpamSinBin vSpamSinTime    switch -- $vSpamPunishMode {        1 {pSpamKick $nick $chan $phrase}        2 {            switch -- [info exists vSpamSinBin($nick,$chan)] {                0 {                    pSpamKick $nick $chan $phrase "first warning"                    set vSpamSinBin($nick,$chan) 1                    timer $vSpamSinTime [list pSpamUnsetSin $nick $chan]                }                1 {                    pSpamBan $nick $chan $phrase                    pSpamUnsetSin $nick $chan                }                default {}            }        }        3 {pSpamBan $nick $chan $phrase}        default {return 0}    }    return 0}proc pSpamUnban {chan host} {    pushmode $chan -b $host    flushmode $chan    return 0}proc pSpamUnsetSin {nick chan} {    global vSpamSinBin    if {[info exists vSpamSinBin($nick,$chan)]} {unset vSpamSinBin($nick,$chan)}    return 0}# eof</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Mon Aug 17, 2009 12:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[WisH-GR]]></name></author>
		<updated>2009-08-17T04:48:19-04:00</updated>

		<published>2009-08-17T04:48:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89924#p89924</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89924#p89924"/>
		<title type="html"><![CDATA[url kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89924#p89924"><![CDATA[
hello i need help creating a rather simple(i think) tcl<br>i want it to detect url spams and (give me the option to choose) warn kick or kickban the user.but please i want it to ignore any youtube links.<br>can someone help?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10817">WisH-GR</a> — Mon Aug 17, 2009 4:48 am</p><hr />
]]></content>
	</entry>
	</feed>
