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

	<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-25T19:49:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-25T19:49:15-04:00</updated>

		<published>2003-02-25T19:49:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17069#p17069</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17069#p17069"/>
		<title type="html"><![CDATA[haha]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17069#p17069"><![CDATA[
FIRST<div class="codebox"><p>Code: </p><pre><code>putserv "MODE $chan +b $nick"putserv "KICK $chan $nick :Don't ban my friends, bud"</code></pre></div>this is a stupid way to ban him. bette use something like<div class="codebox"><p>Code: </p><pre><code>newchanban $chan $nick Friendprotection "Don't ban my friends, bud"</code></pre></div>note: if the ban matchs your bot, it will NOT set the ban and dont kick the user!<br><br>SECOND<br>dont use things like "putserv "MODE $chan -b $ban" use the command pushmode like "pushmode $chan -b $ban"<br><br>THIRD<br>to your deop, use something like a used for my channellamer script <div class="codebox"><p>Code: </p><pre><code>...      if { [matchattr $hand "d|d" $chan] } { return 1 }      if { $hand == "*" } {        set newhandle [addnewuser $nick $uhost]        if { $newhandle == "*" } { return 2 }      } else { set newhandle $hand }      chattr $newhandle |-o+d $chan      putcmdlog "Deopper $newhandle gegen $victimhandle auf $chan deoppt am [ctime [unixtime]]."      setuser $newhandle COMMENT "Deoppte $victimhandle auf $chan am [ctime [unixtime]]."...#function to ensure to get a new user and returns the new handle nameproc addnewuser {nick uhost} {  set handle $nick  if { !([adduser $nick [maskhost $uhost]]) } {    set handle bad[rand 999999]    if { !([adduser $handle [maskhost $uhost]]) } { return * }  }  return $handle}</code></pre></div>FOURTH<blockquote class="uncited"><div>mode changes are broken down into their component parts before being sent here, so the &lt;mode-change&gt; will always be a single mode, such as "+m" or "-o". victim will show the           argument of the mode change (for o/v/b/e/I) or "" if the set mode does not take an argument.</div></blockquote>means you dont need any foreach $victim or [string trimright [strlwr $victims] " "] or such things <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">.<br><br>PS: and please use this for codes:<div class="codebox"><p>Code: </p><pre><code>[code]...code...</code></pre></div>[/code]<br>i dont know why you have that often the kickban code, but im sure you could optimized your if structures. in the optimum you should only need this expression 2 times (1 for ban, 1 for deop).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Tue Feb 25, 2003 7:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Insectora]]></name></author>
		<updated>2003-02-25T08:12:01-04:00</updated>

		<published>2003-02-25T08:12:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17055#p17055</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17055#p17055"/>
		<title type="html"><![CDATA[Help with this script PART 3 :))))]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17055#p17055"><![CDATA[
Hello again <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">)<br>I have another problem with this script:))<br>With this script the bot is protecting itself and the its users to be banned.<br><br>FIRST : when the bad guy and the bot are on same address, to bot first kickban the bad guy , and then kickbans itself. I dont want the bot to kicks itself <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">)<br>SECOND : when the bad guy and a bot user ( also and me) are on same address the bot kickbans the bad guy , and then the bot user <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> I dont want kickbans me:((( <br>THIRD : Can you make the script to set ChanBans in his memory and to add the bud guy with flag +d ??<br><br>thank you in advance <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">)<br>Here is the script :<br><br>set daddy(ban_protect) 1<br><br>bind mode - * daddy_watch_mode<br><br>proc daddy_watch_mode {nick host hand chan mode who} {<br>        global daddy botnick botname<br>        if {$mode != "+b" || ![botisop $chan] || $daddy(ban_protect) == 0} {return 0}<br>        set victim ""<br><br>        set numbanlist [llength [chanbans $chan]]<br>      if {$numbanlist &gt; 26 } {<br>            set banhost ""<br>                set b_count 0<br>                for {set loop 0} {$loop &lt; 6} {incr loop} {<br>                        set banhost "$banhost [lindex [lindex [chanbans $chan] $loop] 0]"<br>                        set b_count [expr $b_count + 1]<br>                        if {$loop == 5 } {      putserv "MODE $chan -bbbbbb $banhost"<br>                                            set banhost ""<br>                                      set b_count 0<br>                        }<br>                }<br>      }<br><br>        if {[string first "!" $who] == -1 &amp;&amp; [string first "@" $who] == -1} {set who $who!*@*}<br>#       if {[string first "!" $who] == -1} {set who *!*$who}<br>        if {[string first "@" $who] == -1} {set who $who*@*}<br>        foreach user [userlist] {<br>                foreach userhost [getuser $user HOSTS] {<br>                        if {[string match [strlwr $who] [strlwr $userhost]] &amp;&amp; ([matchattr $user f|f $chan] || [matchattr $user f|f $chan])} {<br>                                append victim "$user "<br>                                break<br>                        }<br>                }<br>        }<br>        foreach user [chanlist $chan] {<br>                set userhand [nick2hand $user $chan]<br>                if {$userhand != "*"} {<br>                        set userhost $user![getchanhost $user $chan]<br>                        if {[string match [strlwr $who] [strlwr $userhost]]} {<br>                                if {[matchattr $userhand n|n $chan] || [matchattr $userhand m|m $chan] || [matchattr $userhand f|f $chan] || [matchattr $userhand f|f $chan]} {<br>                                        if {[string first $userhand $victim] == -1} {append victim "$userhand "}<br>                                }<br>                        }<br>                }<br>        }<br>        if {[string match [strlwr $who] [strlwr $botname]]} {<br>                if {![matchattr $hand m|m $chan] &amp;&amp; !([matchattr $hand b] &amp;&amp; [matchattr $hand f|f $chan])} {<br>                        putserv "MODE $chan +b $nick"<br>                        putserv "KICK $chan $nick :Don't ban me, bud"<br>                        return 0<br>                } {<br>                        append victim "$botnick"<br>                }<br>        }<br>        if {$victim != ""} {daddy_ban_warn $nick $hand $who $chan $victim}<br>        return 0<br>}<br><br><br>proc daddy_ban_warn {nick hand ban chan victims} {<br>        global daddy<br>        if {![botisop $chan] || [strlwr $hand] == [string trimright [strlwr $victims] " "] || $daddy(ban_protect) == 0} {return 0}<br>        if {$hand == "*"} {<br>                if {[string first +userbans [channel info $chan]] != -1} {<br>                         putserv "MODE $chan +b $nick"<br>                         putserv "KICK $chan $nick :Don't ban my friends, bud"<br>                }<br>        return 0<br>        }<br>        set remove 0<br>        foreach user $victims {<br>                if {([matchattr $user m|m $chan] || [matchattr $user b]) &amp;&amp; !([matchattr $hand m|m $chan] || ([matchattr $han f|f $chan] &amp;&amp; [matchattr $hand b]))} {<br>                        set remove 1<br>                        break<br>                }<br>                if {([matchattr $user f|f $chan] || [matchattr $user m|m $chan]) &amp;&amp; ![matchattr $hand n|n $chan]} {<br>                        set remove 1<br>                        break<br>                }<br>        }<br>        if {$remove == 1} {putserv "MODE $chan -b $ban"}<br>        if {![matchattr $hand b]} {<br>                if {[llength $victims] &gt; 1} {<br>                putserv "MODE $chan +b $nick"<br>                putserv "KICK $chan $nick :Don't ban my friends, bud"<br>                }                                 <br>        }<br>        return 0<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2732">Insectora</a> — Tue Feb 25, 2003 8:12 am</p><hr />
]]></content>
	</entry>
	</feed>
