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

	<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-02-05T07:45:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2009-02-05T07:45:28-04:00</updated>

		<published>2009-02-05T07:45:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87240#p87240</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87240#p87240"/>
		<title type="html"><![CDATA[Varable ban time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87240#p87240"><![CDATA[
I should also add, that if you wanted it to be bans made only by this script. You can add the following line <div class="codebox"><p>Code: </p><pre><code>timer 2 [list pushmode $channel -b $banmask]</code></pre></div> <span style="text-decoration:underline">after each of these lines</span> in the script <div class="codebox"><p>Code: </p><pre><code>putquick "KICK $channel $user :$::ocb::variable::kickmsg1" -next putquick "MODE $channel +b $banmask" -next</code></pre></div> <div class="codebox"><p>Code: </p><pre><code>putquick "KICK $channel $user :$::ocb::variable::kickmsg2" -next putquick "MODE $channel +b $banmask" -next</code></pre></div> This would get the script to set a timer to remove the bans after <strong class="text-strong">2 mins</strong>. Using the timer command. <blockquote class="uncited"><div>Usage: timer &lt;minutes&gt; &lt;tcl-command&gt;<br>Description: executes the given Tcl command after a certain number of minutes have passed<br>Returns: a timerID<br>Module: core</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Thu Feb 05, 2009 7:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2009-02-04T11:24:42-04:00</updated>

		<published>2009-02-04T11:24:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87228#p87228</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87228#p87228"/>
		<title type="html"><![CDATA[Varable ban time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87228#p87228"><![CDATA[
You should be able to do this without adding/editing the script. With the DCC/telnet command <strong class="text-strong">chanset</strong> an set the <em class="text-italics">ban-time</em> for the channels. Example:<div class="codebox"><p>Code: </p><pre><code>.chanset #mychannel ban-time 15</code></pre></div> <blockquote class="uncited"><div>Set here how long temporary bans will last (in minutes). If you set this setting to 0, the bot will never remove them.</div></blockquote> If you need more help with a good source is <a href="http://www.eggheads.org/support/egghtml/1.6.19/mod-channels.html" class="postlink">http://www.eggheads.org/support/egghtml ... nnels.html</a> and .help in DCC/telnet with the bot.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Wed Feb 04, 2009 11:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fraud]]></name></author>
		<updated>2009-01-04T08:56:23-04:00</updated>

		<published>2009-01-04T08:56:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86723#p86723</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86723#p86723"/>
		<title type="html"><![CDATA[Varable ban time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86723#p86723"><![CDATA[
Hello I would like to get added a Ban time so everybody gets just 2 mins banned from chan, and after that bantime the ban will be deleted. Thanks for helping<br><blockquote class="uncited"><div>setudef flag ocb<br>setudef flag ocb-require1<br>setudef flag ocb-require2<br><br>namespace eval ocb {<br>namespace eval variable {<br>variable home "#channel"<br>variable minchannels 2<br>variable trigger ".ocb"<br>variable signontime 600<br>               <span style="color:red"> Here maybe the variable bantime</span> <br><br>variable kickmsg1 "kickmessage for being on X channels."<br>variable kickmsg2 "kickmessage for users connected to quakenet under X seconds."<br>}<br><br>if {[array exists hostmasks]} {<br>array unset hostmasks<br>}<br><br>array set hostmasks {<br>*sp00fed.dk          ""<br>*hostname1""<br>*hostname2""<br>}<br><br><br><br><br><br>bind join - * [namespace current]::onjoin<br>bind PUB o $::ocb::variable::trigger [namespace current]::menu<br><br>proc onjoin {nickname hostname handle channel} {<br>global ocb<br><br>if {[channel get $channel ocb]} {<br><br>if {![isbotnick $nickname]} {<br><br>foreach {h i} [array get ocb::hostmasks] {<br>if {[string match $h $hostname]} { <br>return <br>}<br>}<br><br>set victim [string map {"\{" "\\\{" "\\" "\\\\" "\}" "\\\}" "\[" "\\\[" "\]" "\\\]"} [string tolower $nickname]]<br><br>set userhostname [string trim $hostname "~"]<br>set channel [string tolower $channel]<br><br>set ocb($victim) "{$victim} {$channel} {$userhostname} {0}"<br>#putlog "making whois $victim "<br>bind raw - {319} [namespace current]::raw319<br>bind raw - {317} [namespace current]::raw317<br>putquick "WHOIS [join $victim] [join $victim]"<br><br>}<br>}<br>}<br>proc raw319 {server raw arguments} {<br>global ocb<br>catch { unbind RAW - {319} [namespace current]::raw319 }<br><br><br>set victim [string map {"\{" "\\\{" "\\" "\\\\" "\}" "\\\}" "\[" "\\\[" "\]" "\\\]"} [string tolower [lindex [split $arguments] 1]]]<br>if {[info exists ocb($victim)]} {<br><br><br>set channel [join [lindex [split $ocb($victim)] 1]]<br>set hostname [join [lindex [split $ocb($victim)] 2]]<br>set result [join [lindex [split $ocb($victim)] 3]]<br>set channels [string tolower [lrange $arguments 2 e]]<br><br>if {[channel get $channel ocb-require1]} {<br><br>#putlog "channels $channels"<br>if {[llength $channels] &lt; $::ocb::variable::minchannels} {<br>foreach user [chanlist $channel] { <br>if {[string match "$hostname" "[string trim [getchanhost $user $channel] "~"]"]} {<br>set banmask *!*[string trim $hostname "~"]<br>putquick "KICK $channel $user :$::ocb::variable::kickmsg1" -next<br>putquick "MODE $channel +b $banmask" -next<br>putmsg $::ocb::variable::home "Kicked $user. Only [llength $channels] channels were were found."<br>}<br>set ocb($victim) "{$victim} {$channel} {$hostname} {1}"<br>}<br>}<br>}<br>}<br>}<br>proc raw317 {server raw arguments} {<br>global ocb<br>catch { unbind RAW - {317} [namespace current]::raw317 }<br>#putlog "Arguments: $arguments"<br>set victim [string map {"\{" "\\\{" "\\" "\\\\" "\}" "\\\}" "\[" "\\\[" "\]" "\\\]"} [string tolower [lindex [split $arguments] 1]]]<br>if {[info exists ocb($victim)]} {<br><br>set channel [join [lindex [split $ocb($victim)] 1]]<br>set hostname [join [lindex [split $ocb($victim)] 2]]<br>#set result [join [lindex [split $ocb($victim)] 3]]<br><br>set signontime [lindex [split $arguments] 3]<br>#putlog "Sign on time: $signontime"<br>if {[channel get $channel ocb-require2]} {<br>if {[expr [unixtime] - $signontime] &lt; $::ocb::variable::signontime} {<br>foreach user [chanlist $channel] { <br>if {[string match "$hostname" "[string trim [getchanhost $user $channel] "~"]"]} {<br>set banmask *!*[string trim $hostname "~"]<br>putquick "KICK $channel $user :$::ocb::variable::kickmsg2" -next<br>putquick "MODE $channel +b $banmask" -next<br><br>putmsg $::ocb::variable::home "Kicked $user. Under [duration [expr [unixtime] - $signontime]] on [lindex [split $::server .] 2]."<br><br>}<br>}<br>}<br>}<br>}<br>}<br><br><br>proc menu {nickname hostname handle channel arguments} {<br>set first "[lindex $arguments 0]"<br>switch $first {<br>"on" {<br>channel set $channel +ocb<br><br><br>set status ""<br>append status "(\002NCU\002) Newly connected users is "<br>if {[channel get $channel ocb-require1]} { append status "(\002\00309ON\003\002) " } { append status "(\002\00304OFF\003\002) " }<br>append status "(\002OC\002) One channel users is "<br>if {[channel get $channel ocb-require2]} { append status "(\002\00309ON\003\002) " } { append status "(\002\00304OFF\003\002) " }<br><br>puthelp "NOTICE $nickname <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">\002OCB\002) One channel ban is turned (\002\00309ON\003\002) - $status"<br>}<br>"off" {<br>channel set $channel -ocb<br><br><br>set status ""<br>append status "(\002NCU\002) Newly connected users is "<br>if {[channel get $channel ocb-require1]} { append status "(\002\00309ON\003\002) " } { append status "(\002\00304OFF\003\002) " }<br>append status "(\002OC\002) One channel users is "<br>if {[channel get $channel ocb-require2]} { append status "(\002\00309ON\003\002) " } { append status "(\002\00304OFF\003\002) " }<br><br>puthelp "NOTICE $nickname <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">\002OCB\002) One channel ban is turned (\002\00304OFF\003\002) - $status"<br>}<br>"ncu" {<br>set second "[lindex $arguments 1]"<br>switch $second {<br>"on" {<br>channel set $channel +ocb-require1<br>puthelp "NOTICE $nickname :One channel ban for \002newly connected users\002 is turned (\002\00309ON\003\002)"<br>}<br>"off" {<br>channel set $channel -ocb-require1<br>puthelp "NOTICE $nickname :One channel ban for \002newly connected users\002 is turned (\002\00304OFF\003\002)"<br>}<br>"default" {<br>if {[channel get $channel ocb-require1]} {<br>puthelp "NOTICE $nickname :One channel ban for \002newly connected users\002 is (\002\00309ON\003\002)"<br>} else {<br>puthelp "NOTICE $nickname :One channel ban for \002newly connected users\002 is (\002\00304OFF\003\002)"<br>}<br>}<br>}<br>}<br>"oc" {<br>set second "[lindex $arguments 1]"<br>switch $second {<br>"on" {<br>channel set $channel +ocb-require2<br>puthelp "NOTICE $nickname :One channel ban for \002One channel users\002 is turned (\002\00309ON\003\002)"<br>}<br>"off" {<br>channel set $channel -ocb-require2<br>puthelp "NOTICE $nickname :One channel ban for \002One channel users\002 is turned (\002\00304OFF\003\002)"<br>}<br>"default" {<br>if {[channel get $channel ocb-require2]} {<br>puthelp "NOTICE $nickname :One channel ban for \002One channel users\002 is (\002\00309ON\003\002)"<br>} else {<br>puthelp "NOTICE $nickname :One channel ban for \002One channel users\002 is (\002\00304OFF\003\002)"<br>}<br>}<br>}<br>}<br>"default" {<br>if {[channel get $channel ocb]} {<br>set status ""<br>append status "(\002NCU\002) Newly connected users is "<br>if {[channel get $channel ocb-require1]} { append status "(\002\00309ON\003\002) " } { append status "(\002\00304OFF\003\002) " }<br>append status "(\002OC\002) One channel users is "<br>if {[channel get $channel ocb-require2]} { append status "(\002\00309ON\003\002) " } { append status "(\002\00304OFF\003\002) " }<br><br>puthelp "NOTICE $nickname <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">\002OCB\002) One channel ban is (\002\00309ON\003\002) - $status"<br><br><br>} else {<br>set status ""<br>append status "(\002NCU\002) Newly connected users is "<br>if {[channel get $channel ocb-require1]} { append status "(\002\00309ON\003\002) " } { append status "(\002\00304OFF\003\002) " }<br>append status "(\002OC\002) One channel users is "<br>if {[channel get $channel ocb-require2]} { append status "(\002\00309ON\003\002) " } { append status "(\002\00304OFF\003\002) " }<br><br>puthelp "NOTICE $nickname <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">\002OCB\002) One channel ban is (\002\00304OFF\003\002) - $status"<br>}<br>}<br>}<br>}<br>}</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9931">Fraud</a> — Sun Jan 04, 2009 8:56 am</p><hr />
]]></content>
	</entry>
	</feed>
