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

	<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>2021-04-26T14:28:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Gulio]]></name></author>
		<updated>2021-04-26T14:28:04-04:00</updated>

		<published>2021-04-26T14:28:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109798#p109798</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109798#p109798"/>
		<title type="html"><![CDATA[Hello]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109798#p109798"><![CDATA[
The script works great good<br><br>but is possible to change comand triger for add del and list show<br>to be and for kickban channel same for add del remove ban chan<br>for singel badnick and multinick to kiickban add<br>del<br><br>to be used and add badnick with wildcard on badnick mask<br><br>.kn virus*  and not to add twice after we add .kn virusssss cozz is cover from virus* in badnick.txt<br><br>and to match badwqord newnick change on channel <br><br>show list in query not channel notice to show list in OP query and to find word with comamnd .bnl badnick in list<br>!bnl<br>.bnl<br><br>to kickban singel badnick and multi badnicks on channel and to add same time in file badnick.txt<br><br><br>!kn badnick *badnick badnick*  *badnick*<br>.kn badnick *badnick badnick*  *badnick*<br><br>for remove from file badnick.txt and to unban in chan<br><br>!un badnick *badnick badnick*  *badnick*<br>.un badnick *badnick badnick*  *badnick*<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12887">Gulio</a> — Mon Apr 26, 2021 2:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2011-03-28T17:11:39-04:00</updated>

		<published>2011-03-28T17:11:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96564#p96564</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96564#p96564"/>
		<title type="html"><![CDATA[.bad add/del/list Tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96564#p96564"><![CDATA[
Give this script a try. I've done a limited amount of testing.<br><div class="codebox"><p>Code: </p><pre><code># badnick.tcl### ---------- operation ---------------------------------------------------------------------- #### creates and manages a list of banned nicks from badnick.txt in the bots root directory# nicks joining selected bot channels are checked against badnick.txt and kicked and/or banned if present# to function in #channelname requires in the partyline .chanset #channelname +badnick# this applies to both commands AND punishment if a nick is present in badnick.txt# syntax, assuming default trigger character .# .bad add &lt;nick&gt; ... adds nick to badnick.txt# .bad del &lt;nick&gt; ... deletes &lt;nick&gt; from badnick.txt# .bad show ... shows all nicks in badnick.txt# avoid endless loops by adding nicks that are protected by the bot### ---------- configuration ------------------------------------------------------------------ #### set here the single character command triggerset vBadnickTrigger .# set here the bot user flag(s) of people authorised to use the commandsset vBadnickFlag o# set here the ban time in minutes# a setting of 0 means that the ban will not be automatically removed by this scriptset vBadnickTime 5# set punishment mode here# mode 1 may be unwise since the user may rejoin, get kicked, rejoin, get kicked ... ad nauseum# 1 == kick only# 2 == ban only# 3 == ban then kickset vBadnickMode 3# set here the banmask type# this could be set such that evading badnick.txt by changing nick, will not evade a previously set ban#  1 == nick!*user@host#  2 == nick!*@host#  3 == *!*user@host#  4 == *!*@host#  5 == nick!*user@mask#  6 == nick!*@mask#  7 == *!*user@mask#  8 == *!*@mask#  9 == nick!*user@*# 10 == nick!*@*# 11 == *!*user@*set vBadnickType 7### ---------- code --------------------------------------------------------------------------- ###set vBadnickVersion 11.03.28.21.35setudef flag badnickproc pBadnickTrigger {} {    global vBadnickTrigger    return $vBadnickTrigger}bind PUB $vBadnickFlag [pBadnickTrigger]bad pBadnickPubbind JOIN - * pBadnickJoinproc pBadnickAdd {target chan} {    global vBadnickList    pBadnickRead    if {[info exists vBadnickList]} {        if {[lsearch -exact $vBadnickList [string tolower $target]] != -1} {            pBadnickError 06 0 $target $chan 0            return 0        }    }    lappend vBadnickList [string tolower $target]    pBadnickWrite    pBadnickDone 01 0 $target $chan 0    foreach channel [channels] {        if {[channel get $channel badnick]} {            if {([onchan $target $channel]) &amp;&amp; ([botisop $channel])} {                pBadnickPunish $target [getchanhost $target $channel] $channel            }        }    }    return 0}proc pBadnickDel {target chan} {    global vBadnickList    pBadnickRead    if {[info exists vBadnickList]} {        if {[set idx [lsearch -exact $vBadnickList [string tolower $target]]] != -1} {            set vBadnickList [lreplace $vBadnickList $idx $idx]            pBadnickWrite            pBadnickDone 02 0 $target $chan 0        } else {pBadnickError 08 0 $target $chan 0}    } else {pBadnickError 07 0 0 $chan 0}    return 0}proc pBadnickDone {number command target chan text} {    switch -- $number {        01 {set output "$target has been added to badnick.txt"}        02 {set output "$target has been removed from badnick.txt"}        03 {set output $text}        default {}    }    putserv "PRIVMSG $chan :$output"    return 0}proc pBadnickError {number command target chan text} {    switch -- $number {        01 {set output "$target is not a valid nick"}        02 {set output "correct syntax is [pBadnickTrigger]bad $command &lt;nick&gt;"}        03 {set output "correct syntax is [pBadnickTrigger]bad $command (without additional arguments)"}        04 {set output "unknown command [pBadnickTrigger]bad $command"}        05 {set output "[pBadnickTrigger]bad command must be followed by one of add, del or show"}        06 {set output "$target is already included in badnick.txt"}        07 {set output "badnick.txt does not have any nicks defined yet"}        08 {set output "badnick.txt does not contain the nick $target"}        default {}    }    putserv "PRIVMSG $chan :$output"    return 0}proc pBadnickJoin {nick uhost hand chan} {    global vBadnickList    if {[channel get $chan badnick]} {        pBadnickRead        if {[info exists vBadnickList]} {            if {[lsearch -exact $vBadnickList [string tolower $nick]] != -1} {                if {[botisop $chan]} {                    pBadnickPunish $nick $uhost $chan                }            }        }    }    return 0}proc pBadnickMask {nick uhost type} {    scan $uhost {%[^@]@%s} user host    set user [string trimleft $user ~]    switch -- [regexp -- {^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$} $host] {        0 {            switch -- [regexp -all -- {\.} $host] {                0 - 1 {set mask $host}                2 {set mask *.[join [lrange [split $host .] 1 end] .]}                default {set mask *.[join [lrange [split $host .] 2 end] .]}            }        }        1 {set mask [join [lrange [split $host .] 0 end-1] .].*}        default {}    }    switch -- $type {        1  {set hostmask ${nick}!*${user}@$host}        2  {set hostmask ${nick}!*@$host}        3  {set hostmask *!*${user}@$host}        4  {set hostmask *!*@$host}        5  {set hostmask ${nick}!*${user}@$mask}        6  {set hostmask ${nick}!*@$mask}        7  {set hostmask *!*${user}@$mask}        8  {set hostmask *!*@$mask}        9  {set hostmask ${nick}!*${user}@*}        10 {set hostmask ${nick}!*@*}        11 {set hostmask *!*${user}@*}        default {}    }    return $hostmask}proc pBadnickPub {nick uhost hand chan text} {    if {[channel get $chan badnick]} {        set arguments [split [string trim $text]]        if {[llength $arguments] &gt; 0} {            set command [lindex $arguments 0]            switch -- $command {                add {                    if {[llength $arguments] == 2} {                        set target [lindex $arguments 1]                        if {[regexp -- {^[\x41-\x7D][-\d\x41-\x7D]*$} $target]} {                            pBadnickAdd $target $chan                        } else {pBadnickError 01 0 $target $chan 0}                    } else {pBadnickError 02 $command 0 $chan 0}                }                del {                    if {[llength $arguments] == 2} {                        set target [lindex $arguments 1]                        if {[regexp -- {^[\x41-\x7D][-\d\x41-\x7D]*$} $target]} {                            pBadnickDel $target $chan                        } else {pBadnickError 01 0 $target $chan 0}                    } else {pBadnickError 02 del 0 $chan 0}                }                show {                    if {[llength $arguments] == 1} {                        pBadnickShow $chan                    } else {pBadnickError 03 show 0 $chan 0}                }                default {pBadnickError 04 $command 0 $chan 0}            }        } else {pBadnickError 05 0 0 $chan 0}    }    return 0}proc pBadnickPunish {target uhost chan} {    global vBadnickMode vBadnickTime vBadnickType    switch -- $vBadnickMode {        1 {            putserv "KICK $chan $target :badnick.txt"        }        2 - 3 {            set hostmask [pBadnickMask $target $uhost $vBadnickType]            putserv "MODE $chan +b $hostmask"            if {![string equal $vBadnickTime 0]} {timer $vBadnickTime [list pBadnickRemove $chan $hostmask]}            if {[string equal $vBadnickMode 3]} {putserv "KICK $chan $target :badnick.txt"}        }        default {}    }    return 0}proc pBadnickRead {} {    global vBadnickList    unset -nocomplain -- vBadnickList    if {[file exists badnick.txt]} {        set fp [open badnick.txt r]        set data [split [read -nonewline $fp] \n]        close $fp        if {[llength $data] != 0} {set vBadnickList $data}    }    return 0}proc pBadnickRemove {chan hostmask} {    putserv "MODE $chan -b $hostmask"    return 0}proc pBadnickShow {chan} {    global vBadnickList    pBadnickRead    if {[info exists vBadnickList]} {        while {[llength $vBadnickList] != 0} {            pBadnickDone 03 0 0 $chan [join [lrange $vBadnickList 0 9]]            set vBadnickList [lrange $vBadnickList 10 end]        }    } else {pBadnickError 07 0 0 $chan 0}    return 0}proc pBadnickWrite {} {    global vBadnickList    set fp [open badnick.txt w]    puts -nonewline $fp [join $vBadnickList \n]    close $fp    return 0}putlog "badnick.tcl version $vBadnickVersion loaded"# eof</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Mon Mar 28, 2011 5:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Regex]]></name></author>
		<updated>2011-03-19T13:28:46-04:00</updated>

		<published>2011-03-19T13:28:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96498#p96498</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96498#p96498"/>
		<title type="html"><![CDATA[.bad add/del/list Tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96498#p96498"><![CDATA[
Hi Guys!<br><br>How can we, .bad add/del/list TCL ?<br><br>If a Badnick will join the chan, This TCL will Kicked from the room.<br><br>Thanks For all <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Example:<br><br>&lt;u24&gt; .bad add *show*<br>&lt;eggdrop&gt; *show* has been added from the badnick list.<br><br>&lt;u24&gt; .bad del *show<br>&lt;eggdrop&gt; *show* has been removed from the badnick list.<br><br>&lt;u24&gt; .bad list<br>&lt;eggdrop&gt; Listing Bad File<br>&lt;eggdrop&gt;<br>&lt;eggdrop&gt; 1- *show*<br>&lt;eggdrop&gt; <br>&lt;eggdrop&gt; End of the file<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11617">Regex</a> — Sat Mar 19, 2011 1:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
