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

	<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-09-08T19:31:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[neoclust]]></name></author>
		<updated>2009-09-08T19:31:25-04:00</updated>

		<published>2009-09-08T19:31:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90185#p90185</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90185#p90185"/>
		<title type="html"><![CDATA[A script for a bot support]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90185#p90185"><![CDATA[
I use this script on Undernet where nicknames does not register it so there's that someone else takes, is why i referred to the host that the script is much more reliable, I could get rid of BIND kick and MODE as they use target<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10812">neoclust</a> — Tue Sep 08, 2009 7:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-09-08T19:17:26-04:00</updated>

		<published>2009-09-08T19:17:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90184#p90184</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90184#p90184"/>
		<title type="html"><![CDATA[A script for a bot support]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90184#p90184"><![CDATA[
I don't think you can reliably do that with the script as it stands.<br><br>Some binds return the nick/uhost of the user they effect and can be used directly. Other binds return the nick/uhost that did the action and seperately return the target of the action (but not the uhost of the target).<br><br>Hence you see some of my bind procs use nick whilst others use target.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Tue Sep 08, 2009 7:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[neoclust]]></name></author>
		<updated>2009-09-08T19:10:50-04:00</updated>

		<published>2009-09-08T19:10:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90183#p90183</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90183#p90183"/>
		<title type="html"><![CDATA[A script for a bot support]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90183#p90183"><![CDATA[
Thanks a lot man good script, and if i want change the nick to host of bots it will be effective since their addresses are fixed, Ex *!*@blah.com i replace the $nick of uhost  and setting <br>set vSupportBots {<br>    "*!*@blah.com"<br>} <br>right ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10812">neoclust</a> — Tue Sep 08, 2009 7:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-09-08T17:48:31-04:00</updated>

		<published>2009-09-08T17:48:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90181#p90181</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90181#p90181"/>
		<title type="html"><![CDATA[A script for a bot support]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90181#p90181"><![CDATA[
I have done a limited amount of checking on the following script and it seems fine:-<br><div class="codebox"><p>Code: </p><pre><code># support.tcl# if none of the preconfigured bots is op in a preconfigured channel then the bot ..# .. that this script is loaded on will attempt to op itself in the channel ..# .. through chanserv services (if it is not already op'd)# if one or more of the preconfigured bots is op in a preconfigured channel then ..# .. the bot that this script is loaded on will will attempt to deop itself in ..# .. the channel through chanserv services (if it is not already deop'd)# requires a restart (not rehash) due to use of init-server evnt bind# reacts to join/part/quit/split/kick plus +o/-o mode changes and additionally has a ..# .. preconfigured scheduled check for all the preconfigured channels# for the op command to succeed, the bot that this script is loaded on must be on ..# .. the channel access list### ------------------------------------------------------------- ###### ---------- CONFIGURATION ------------------------------------ #### set here a list of the channels to add support services toset vSupportChannels {    "#eggtcl"    "#atlantis"    "#tcl"}# set here a list of other bots that the script is supportingset vSupportBots {    "Baal"    "McKay"}# set here the address of services to op or deopset vSupportServices "chanserv@services.dal.net"# set here the frequency of the additional checking in minutesset vSupportTimerFrequency 2### ------------------------------------------------------------- ###### ---------- CODE --------------------------------------------- ###set vSupportVersion 1.0bind EVNT - init-server pSupportTimerStartbind PART - * pSupportPartCodebind SIGN - * pSupportSignCodebind KICK - * pSupportKickCodebind SPLT - * pSupportSpltCodebind JOIN - * pSupportJoinCodebind MODE - "#% +o" pSupportModeCodebind MODE - "#% -o" pSupportModeCodeproc pSupportCheck {nick chan} {    global vSupportBots vSupportChannels    set botstolower [split [string tolower [join $vSupportBots]]]    set chanstolower [split [string tolower [join $vSupportChannels]]]    if {[lsearch -exact $botstolower [string tolower $nick]] != -1} {        if {[lsearch -exact $chanstolower [string tolower $chan]] != -1} {            return 1        }    }    return 0}proc pSupportModeCode {nick uhost hand chan change target} {    if {[pSupportCheck $target $chan]} {        utimer 10 [list pSupportOpCode $chan]    }    return 0}proc pSupportJoinCode {nick uhost hand chan} {    if {([pSupportCheck $nick $chan]) || ([isbotnick $nick])} {        utimer 10 [list pSupportOpCode $chan]    }    return 0}proc pSupportSpltCode {nick uhost hand chan} {    if {[pSupportCheck $nick $chan]} {        utimer 10 [list pSupportOpCode $chan]    }    return 0}proc pSupportKickCode {nick uhost hand chan target reason} {    if {[pSupportCheck $target $chan]} {        utimer 10 [list pSupportOpCode $chan]    }    return 0}proc pSupportSignCode {nick uhost hand chan reason} {    if {[pSupportCheck $nick $chan]} {        utimer 10 [list pSupportOpCode $chan]    }    return 0}proc pSupportPartCode {nick uhost hand chan msg} {    if {[pSupportCheck $nick $chan]} {        utimer 10 [list pSupportOpCode $chan]    }    return 0}proc pSupportTimerStart {type} {    global vSupportTimerFrequency    if {[string is integer -strict $vSupportTimerFrequency]} {        if {$vSupportTimerFrequency &gt; 0} {            pSupportTimerSchedule        }    }    return 0}proc pSupportTimerSchedule {} {    global vSupportTimerFrequency    foreach schedule [binds TIME] {        if {[string equal pSupportTimerCode [join [lindex $schedule 4]]]} {            set minute [join [lindex [lindex $schedule 2] 0]]            set hour [join [lindex [lindex $schedule 2] 1]]            unbind TIME - "$minute $hour * * *" pSupportTimerCode        }    }    set minute [strftime %M [expr {[unixtime] + ($vSupportTimerFrequency * 60)}]]    set hour [strftime %H [expr {[unixtime] + ($vSupportTimerFrequency * 60)}]]    bind TIME - "$minute $hour * * *" pSupportTimerCode    return 0}proc pSupportTimerCode {minute hour day month year} {    global vSupportBots vSupportChannels    if {([llength $vSupportBots] != 0) &amp;&amp; ([llength $vSupportChannels] != 0)} {        pSupportOpCode 0    }    return 0}proc pSupportOpCode {chan} {    global botnick vSupportBots vSupportChannels vSupportServices    switch -- $chan {        0 {            foreach channel $vSupportChannels {                set oped 0                if {[validchan $channel]} {                    if {[botonchan $channel]} {                        foreach bot $vSupportBots {                            if {[onchan $bot $channel]} {                                if {[isop $bot $channel]} {                                    incr oped                                }                            }                        }                        switch -- $oped {                            0 {                                if {![botisop $channel]} {                                    putserv "PRIVMSG $vSupportServices :OP $channel $botnick"                                }                            }                            default {                                if {[botisop $channel]} {                                    putserv "PRIVMSG $vSupportServices :DEOP $channel $botnick"                                }                            }                        }                    }                }            }            pSupportTimerSchedule        }        default {            set oped 0            if {[validchan $chan]} {                if {[botonchan $chan]} {                    foreach bot $vSupportBots {                        if {[onchan $bot $chan]} {                            if {[isop $bot $chan]} {                                incr oped                            }                        }                    }                }            }            switch -- $oped {                0 {                    if {![botisop $chan]} {                        putserv "PRIVMSG $vSupportServices :OP $chan $botnick"                    }                }                default {                    if {[botisop $chan]} {                        putserv "PRIVMSG $vSupportServices :DEOP $chan $botnick"                    }                }            }        }    }    return 0}putlog "support.tcl version $vSupportVersion by arfer loaded"# eof</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Tue Sep 08, 2009 5:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[neoclust]]></name></author>
		<updated>2009-09-08T12:54:36-04:00</updated>

		<published>2009-09-08T12:54:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90176#p90176</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90176#p90176"/>
		<title type="html"><![CDATA[A script for a bot support]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90176#p90176"><![CDATA[
I have a bot to support it's role is to replace Bot1 &amp; bot2 when they disconnect or they are not @, and he must deop when he sees that one of the two bots oped, <br> If you can help me solve this theory, thank you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10812">neoclust</a> — Tue Sep 08, 2009 12:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
