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

	<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-09T12:07:52-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-08-09T12:07:52-04:00</updated>

		<published>2009-08-09T12:07:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89812#p89812</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89812#p89812"/>
		<title type="html"><![CDATA[chanmodes lock]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89812#p89812"><![CDATA[
The native "chanmode" mode-locking feature in eggdrop is not limited to lowercase modes, but a limited set of rfc1459 modes + a few other psuedo-standard modes in major irc network softwares. As such, it's more restrictive than just lowercase.<br><br>You could patch your eggdrop to recognize other channel modes available on your network, although this would require some coding experience.<br>This would involve creating a macro definition for your custom channel mode, as well as modifying a few functions to take this new mode into account:<br><strong class="text-strong">getchanmode</strong>() (<em class="text-italics">mod/irc.mod/chan.c</em>),<br><strong class="text-strong">recheck_channel_modes</strong>() (<em class="text-italics">mod/irc.mod/chan.c</em>),<br><strong class="text-strong">get324</strong>() (<em class="text-italics">mod/irc.mod/chan.c</em>),<br><strong class="text-strong">set_mode_protect</strong>() (<em class="text-italics">mod/channels.mod/channels.c</em>),<br><strong class="text-strong">get_mode_protect</strong>() (<em class="text-italics">mod/channels.mod/channels.c</em>)<br><br>Possible some other function as well, although those are the core functions for the chanmode channel setting.<br>I havn't checked arfer's script throughout, but it would seem it gets the job done as well.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Aug 09, 2009 12:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-08-09T10:56:10-04:00</updated>

		<published>2009-08-09T10:56:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89810#p89810</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89810#p89810"/>
		<title type="html"><![CDATA[chanmodes lock]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89810#p89810"><![CDATA[
I can't imagine you literally mean mode locked as in the IRC sense of the phrase (for example \cs set #channelname mlock +m).<br><br>The bot would require founder access. The command and response would probably differ for different networks anyway.<br><br>Usually a script would watch for mode changes from channel users or changes in channel numbers or a flood and correct the appropriate mode if not conforming to the script's preconfigured settings. This is the case with a topiclock or limit script.<br><br>The following script has limited functionality but has been tested and works fine. I don't know iof this is what you mean. You can set any single character mode (not requiring an additional argument) to be maintained + or - on any channel for which the bot has op status.<br><div class="codebox"><p>Code: </p><pre><code># script to retain preconfigured channel modes# checks current modes when the bot comes online and corrects them if required# checks mode changes and reverses them if required# script has limited functionality (will not deal with channel modes requuiring an additional argument +b, -b, +k, +l etc)# modes configured below must not conflict with mlocked modes otherwise the script will attempt to fight channel services# set here the channel modes not allowed to be set +mode# maximum one line per channel# channel name must be lower case# modes must be a space delimited listarray set vRetainMode0 {    "#eggtcl" {c R}    "#atlantis" {M}}# set here the channel modes required to be set +mode# maximum one line per channel# channel name must be lower case# modes must be a space delimited listarray set vRetainMode1 {    "#eggtcl" {M}}bind JOIN - * pRetainModeJoinbind MODE - * pRetainModeModeproc pRetainModeJoin {nick uhost hand chan} {    if {[isbotnick $nick]} {        set channel [string tolower $chan]        utimer 10 [list pRetainModeDelay $channel]    }    return 0}proc pRetainModeMode {nick uhost hand chan mode target} {    global vRetainMode0 vRetainMode1    set channel [string tolower $chan]    switch -- [string index $mode 0] {        - {            if {[info exists vRetainMode1($channel)]} {                if {[lsearch -exact $vRetainMode1($channel) [string index $mode 1]] != -1} {                    pRetainModeSet 1 $channel [string index $mode 1]                }                          }        }        + {            if {[info exists vRetainMode0($channel)]} {                if {[lsearch -exact $vRetainMode0($channel) [string index $mode 1]] != -1} {                    pRetainModeSet 0 $channel [string index $mode 1]                }                          }        }        default {}    }    return 0}proc pRetainModeDelay {chan} {    global vRetainMode0 vRetainMode1    if {[info exists vRetainMode0($chan)]} {        foreach mode $vRetainMode0($chan) {            if {[regexp -- [subst -nocommands -nobackslashes {\+[^\-]*$mode}] [getchanmode $chan]]} {                pRetainModeSet 0 $chan $mode            }        }    }    if {[info exists vRetainMode1($chan)]} {        foreach mode $vRetainMode1($chan) {            if {![regexp -- [subst -nocommands -nobackslashes {\+[^\-]*$mode}] [getchanmode $chan]]} {                pRetainModeSet 1 $chan $mode            }        }    }    return 0}proc pRetainModeSet {type chan mode} {    if {[botisop $chan]} {        switch -- $type {            0 {pushmode $chan -$mode}            1 {pushmode $chan +$mode}            default {}        }        flushmode $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> — Sun Aug 09, 2009 10:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[McMilan]]></name></author>
		<updated>2009-08-09T04:36:20-04:00</updated>

		<published>2009-08-09T04:36:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89808#p89808</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89808#p89808"/>
		<title type="html"><![CDATA[chanmodes lock]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89808#p89808"><![CDATA[
Hi.<br><br>can someone tell me some chanmodes locker script? Because i am trying use normal chanmode of eggdrop, but it isn't sensitive to uppercase.<br><br>Regards,<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10539">McMilan</a> — Sun Aug 09, 2009 4:36 am</p><hr />
]]></content>
	</entry>
	</feed>
