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

	<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>2004-06-13T16:27:45-04:00</updated>

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

		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-06-13T16:27:45-04:00</updated>

		<published>2004-06-13T16:27:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37312#p37312</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37312#p37312"/>
		<title type="html"><![CDATA[newchanban within a timer.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37312#p37312"><![CDATA[
For example...<br><br>If you have two procs declared as such:<br><div class="codebox"><p>Code: </p><pre><code>proc one_myproc {args} {  putlog "$args"}proc two_myproc {vars} {  putlog "$vars"}</code></pre></div>You may call one_myproc like such:<div class="codebox"><p>Code: </p><pre><code>one_myproc arg1 arg2 arg3 arg4 arg5</code></pre></div>But.. if you call two_myproc the same:<div class="codebox"><p>Code: </p><pre><code>two_myproc arg1 arg2 arg3 arg4 arg5</code></pre></div>You will get an error stating that you have called two_myproc with too many arguments...<br><br>$args can be thought of as a list, no matter what...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Jun 13, 2004 4:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dollar]]></name></author>
		<updated>2004-06-13T16:16:42-04:00</updated>

		<published>2004-06-13T16:16:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37308#p37308</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37308#p37308"/>
		<title type="html"><![CDATA[newchanban within a timer.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37308#p37308"><![CDATA[
<blockquote class="uncited"><div>Could be... however I've seen alot of scripts<br>using args and.. infact I think i've used them with<br>most of my scripts.. I haven't really seen a difference<br>however.<br><br>Maybe there is... maybe you just need to find it out, heh.</div></blockquote>Well I'll get my old example out again, "you can open a door by using the correct key, or by driving over it with your car". Why use the wrong way if you can use the good way and be less prone to errors?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4046">dollar</a> — Sun Jun 13, 2004 4:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-06-13T14:58:30-04:00</updated>

		<published>2004-06-13T14:58:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37304#p37304</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37304#p37304"/>
		<title type="html"><![CDATA[newchanban within a timer.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37304#p37304"><![CDATA[
Could be... however I've seen alot of scripts<br>using args and.. infact I think i've used them with<br>most of my scripts.. I haven't really seen a difference<br>however.<br><br>Maybe there is... maybe you just need to find it out, heh.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun Jun 13, 2004 2:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-06-13T12:49:01-04:00</updated>

		<published>2004-06-13T12:49:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37298#p37298</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37298#p37298"/>
		<title type="html"><![CDATA[newchanban within a timer.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37298#p37298"><![CDATA[
<blockquote class="uncited"><div>You can use any variable, usually people use<br>args, arg or text... that doesn't really affect much.</div></blockquote>Not true... $args has special meaning in Tcl... I recommend staying away from using this variable name, unless you know what you are doing and want it's behaviour.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Jun 13, 2004 12:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-06-13T09:36:03-04:00</updated>

		<published>2004-06-13T09:36:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37291#p37291</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37291#p37291"/>
		<title type="html"><![CDATA[newchanban within a timer.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37291#p37291"><![CDATA[
You can use any variable, usually people use<br>args, arg or text... that doesn't really affect much.<br><br>Secondly... this is the wrong way to use newchanban<br><blockquote class="uncited"><div>set test "newchanban $chan $name NCTrig \"$EngNickChangeMsgBan\" $EngNickChangeBanTime none" <br>timer 1 $test</div></blockquote>Using those extra \ and " (slashes and quotation marks) is quite messy.<br>See this:<br><blockquote class="uncited"><div>newchanban &lt;channel&gt; &lt;ban&gt; &lt;creator&gt; &lt;comment&gt; [lifetime] [options] <br>Description: adds a ban to the ban list of a channel; creator is given credit for the ban in the ban list. lifetime is specified in minutes. If lifetime is not specified, ban-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ban.</div></blockquote>It would be something like:<blockquote class="uncited"><div>newchanban $chan $name NCTrig $EngNickChangeMsgBan $EngNickChangeBanTime</div></blockquote>However, if you want to delay the ban for a with a timer or utimer<br>then you can make it call to a delayed procedure.<br><br>Instead of this:<div class="codebox"><p>Code: </p><pre><code>set test "newchanban $chan $name NCTrig \"$EngNickChangeMsgBan\" $EngNickChangeBanTime none" timer 1 $test </code></pre></div>Use this:<div class="codebox"><p>Code: </p><pre><code>proc EngNickChange:pubm:EngNickChangeTrig {nick uhost hand chan args} { global EngNickChangeMsgBan EngNickChangeBanTime ..........................timer 1 [list EngNickChangeNewChanBan $chan $name $EngNickChangeMsgBan $EngNickChangeBanTime] return 0  }  puthelp "PRIVMSG $chan :ACTION I don't see $name"  } } proc EngNickChangeNewChanBan {chan name EngNickChangeMsgBan EngNickChangeBanTime} {newchanban $chan $name NCTrig $EngNickChangeMsgBan $EngNickChangeBanTimereturn 1}</code></pre></div>Plus I would suggest if you would use smaller variable names as they are messy the longer they get and keep them in lowercase if possible as well.<br><br>For the enforcebans, basically you can use:<br><blockquote class="uncited"><div>channel set $chan +enforcebans<br>#This will enable enforce bans on a channel.<br><br>channel set $chan -enforcebans<br>#This will disable enforce bans on a channel.</div></blockquote>If you want to use enforce bans, with the newchanban for<br>a delayed timer, I suggest you use this:<br><div class="codebox"><p>Code: </p><pre><code>proc EngNickChange:pubm:EngNickChangeTrig {nick uhost hand chan args} { global EngNickChangeMsgBan EngNickChangeBanTime ..........................utimer 55 "channel set $chan +enforcebans"timer 1 [list EngNickChangeNewChanBan $chan $name $EngNickChangeMsgBan $EngNickChangeBanTime]utimer 65 "channel set $chan -enforcebans" return 0  }  puthelp "PRIVMSG $chan :ACTION I don't see $name"  } } proc EngNickChangeNewChanBan {chan name EngNickChangeMsgBan EngNickChangeBanTime} {newchanban $chan $name NCTrig $EngNickChangeMsgBan $EngNickChangeBanTime}</code></pre></div>#This would enable enforcebans on the channel just before the<br>bot would add the newchanban, and when its done, enforcebans<br>would be disabled, randomly set it to 5 secs in between your timer<br>for 1 minute.<br><br>You should read the sample .conf file what basically the enforcebans<br>does and what does the dynamicbans does and clear your concept.<br><br><blockquote class="uncited"><div>enforcebans<br>   When a ban is set, kick people who are on the channel and match<br>    the ban?<br><br> dynamicbans<br>    Only activate bans on the channel when necessary? This keeps<br>    the channel's ban list from getting excessively long. The bot<br>    still remembers every ban, but it only activates a ban on the<br>    channel when it sees someone join who matches that ban.</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun Jun 13, 2004 9:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Unknown1]]></name></author>
		<updated>2004-06-11T22:11:32-04:00</updated>

		<published>2004-06-11T22:11:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37235#p37235</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37235#p37235"/>
		<title type="html"><![CDATA[newchanban within a timer.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37235#p37235"><![CDATA[
OK.. Update..<br><br>Yes, I have +enforcebans on those channels..<br><br>But I also have +dynamicbans on those channels..<br><br>So, I must make them bans sticky for +enforcebans to work..<br><br>Isn't this a bug??????<br><br><br>It shouldn't matter if it's a sticky or not for +enforcebans to work...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5050">Unknown1</a> — Fri Jun 11, 2004 10:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Unknown1]]></name></author>
		<updated>2004-06-11T17:59:55-04:00</updated>

		<published>2004-06-11T17:59:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37227#p37227</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37227#p37227"/>
		<title type="html"><![CDATA[newchanban within a timer.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37227#p37227"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pubm - "$EngNickChangeWrkChan !nickchange*" EngNickChange:pubm:EngNickChangeTrigproc EngNickChange:pubm:EngNickChangeTrig {nick uhost hand chan args} {global EngNickChangeMsgBan EngNickChangeBanTimeset name [string range $args 13 end-1]if { [isop $nick] || [ishalfop $nick] || [isvoice $nick] } {              if { [onchan $name $chan ] } {if { [isop $name $chan] || [ishalfop $name $chan] || [isvoice $name $chan] || [string match "FreshIRC.com" $uhost] } {puthelp "PRIVMSG $chan :ACTION $name likes his name as it is.."return 0}puthelp "PRIVMSG $chan :ACTION $name, You have one minute to change your name to a more appropriate name. Use /nick newname to change it." set test "newchanban $chan $name NCTrig \"$EngNickChangeMsgBan\" $EngNickChangeBanTime none"timer 1 $testreturn 0}puthelp "PRIVMSG $chan :ACTION I don't see $name"}}bind pubm - "$EngNickChangeWrkChan *" EngNickChange:pubm:EngNickChangeproc EngNickChange:pubm:EngNickChange {nick uhost hand chan args} {global EngNickChangeWarn EngNickChangeMsgWarn EngNickChangeMsgKick EngNickChangeMsgBan EngNickChangeBanTimeif {[string tolower [string range $nick 0 7]] == "emuleirc" || [string tolower [string range $nick 0 4]] == "fresh"} {if {([info exists EngNickChangeWarn($uhost)] == 1)} {if {$EngNickChangeWarn($uhost) == 1} {  putserv "KICK $chan $nick : $EngNickChangeMsgKick"  incr EngNickChangeWarn($uhost)} elseif {$EngNickChangeWarn($uhost) == 2} {newchanban $chan $nick NCAuto $EngNickChangeMsgBan $EngNickChangeBanTime none}} else {puthelp "PRIVMSG $chan :ACTION $nick $EngNickChangeMsgWarn"set EngNickChangeWarn($uhost) 1timer 60 "unset $EngNickChangeWarn($uhost)"}}}</code></pre></div>Two questions here... This is a code segment I created.. <br><br>First: In the first proc, I use the "args" var.. Is it normal for the args string to look like "{!nickchange name}".. I didn't notice the "{}" in other procs I did..<br><br>Second: When I do the newchanban in the second proc, it adds the ban and instantly removes that user.. But when I do it in a timer, it adds the ban, but doesn't enfoced it until the user leaves and returns to the channel? How can I get it to enfoce the ban instantly?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5050">Unknown1</a> — Fri Jun 11, 2004 5:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
