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

	<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-12T18:38:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Fill]]></name></author>
		<updated>2009-02-12T18:38:04-04:00</updated>

		<published>2009-02-12T18:38:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87382#p87382</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87382#p87382"/>
		<title type="html"><![CDATA[Working with timers...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87382#p87382"><![CDATA[
the utimer thing worked for me. Thanks for the help about the list and string problem. It worked fine, but tomorrow or so I'll try and fix it by using the split command. You see, I'm a beginner, so I need some help with these scripts, and those tips are good to improve my skills <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Once again, thanks<br>See ya<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10430">Fill</a> — Thu Feb 12, 2009 6:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-02-12T15:29:13-04:00</updated>

		<published>2009-02-12T15:29:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87378#p87378</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87378#p87378"/>
		<title type="html"><![CDATA[Working with timers...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87378#p87378"><![CDATA[
First off, don't do this:<div class="codebox"><p>Code: </p><pre><code>set user [lindex $text 1]</code></pre></div>Text is obviously not a list, and you should thus not use list-operations on it. You'll get away with it in some cases, but it'll come back to haunt you sooner or later. Consider using <strong class="text-strong">split</strong> to convert the string into a valid tcl-list.<br><br>Next, I'd suggest you create a second proc for the check'n'kick part (the code could be done directly in the timer, but it'd be "messy").<br>Simplest would probably be to pass the nickname as an argument to this proc, test using the <strong class="text-strong">onchan</strong> command, and if needed, kick/ban.<div class="codebox"><p>Code: </p><pre><code>proc checkkick {nickname} { if {[onchan $nickname #cyber-world]} {  newchanban "#cyber-world" "$nickname!*@*" "eggdrop" "Offensive nick, !nickchange" }}</code></pre></div>To create the timer, use something like this:<div class="codebox"><p>Code: </p><pre><code>utimer 60 [list checkkick $user]</code></pre></div>This is done to encapsulate the data, and protect your eggdrop from remote code execution.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Feb 12, 2009 3:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fill]]></name></author>
		<updated>2009-02-12T13:29:43-04:00</updated>

		<published>2009-02-12T13:29:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87372#p87372</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87372#p87372"/>
		<title type="html"><![CDATA[Working with timers...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87372#p87372"><![CDATA[
Hi again  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> <br><br>I'm trying to make a script that when I type !nickchange &lt;nickname&gt;, the bot will send a msg to the chan asking that user to change its' nickname.<br><br>If he doesn't change the nickname within a minute, the bot will set mode +b Nick!*@* and kick the user.<br><br>I've done this:<br><div class="codebox"><p>Code: </p><pre><code>bind pubm - "#cyber-world !nickchange*" nickchangeproc nickchange {nick host handle chan text} {set user [lindex $text 1]if { ([isop $nick $chan] == 1) || ([isvoice $nick $chan] == 1) || ([ishalfop $nick $chan] == 1) } { puthelp "PRIVMSG $chan :\001ACTION $user: You have a minute to change your nickname by typing /nick NewNick. If you don't change it, you'll get banned. Thanks.\001"  utimer  .... ?? What about now? }}</code></pre></div>So now what I need is to say the bot to wait a minute, and if the nickname, after a minute, is still on the channel, ban it and kick it. How could I do that?<br><br>Thanks in advance,<br>Fill<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10430">Fill</a> — Thu Feb 12, 2009 1:29 pm</p><hr />
]]></content>
	</entry>
	</feed>
