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

	<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>2008-12-20T18:17:29-04:00</updated>

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

		<entry>
		<author><name><![CDATA[roughnecks]]></name></author>
		<updated>2008-12-20T18:17:29-04:00</updated>

		<published>2008-12-20T18:17:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86420#p86420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86420#p86420"/>
		<title type="html"><![CDATA[timebomb help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86420#p86420"><![CDATA[
<blockquote class="uncited"><div>compile all changes and release in egghelp.org database :]</div></blockquote>are you saying to me ?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10207">roughnecks</a> — Sat Dec 20, 2008 6:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[testebr]]></name></author>
		<updated>2008-12-20T15:52:22-04:00</updated>

		<published>2008-12-20T15:52:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86414#p86414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86414#p86414"/>
		<title type="html"><![CDATA[timebomb help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86414#p86414"><![CDATA[
compile all changes and release in egghelp.org database :]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7055">testebr</a> — Sat Dec 20, 2008 3:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ikaa]]></name></author>
		<updated>2008-12-19T18:09:03-04:00</updated>

		<published>2008-12-19T18:09:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86385#p86385</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86385#p86385"/>
		<title type="html"><![CDATA[timebomb help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86385#p86385"><![CDATA[
Very handy code change! Now my timebomb is <a href="http://forum.egghelp.org/viewtopic.php?t=16443&amp;start=0&amp;postdays=0&amp;postorder=asc&amp;highlight=" class="postlink">channel restricted</a> AND doesnt waste time trying to kick invalid names.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10365">Ikaa</a> — Fri Dec 19, 2008 6:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roughnecks]]></name></author>
		<updated>2008-12-17T08:03:18-04:00</updated>

		<published>2008-12-17T08:03:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86297#p86297</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86297#p86297"/>
		<title type="html"><![CDATA[timebomb help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86297#p86297"><![CDATA[
I've added a piece of code to yours:<br><div class="codebox"><p>Code: </p><pre><code># fix: nick exists?if {[onchan $theNick $chan]} {      StartTimeBomb $nick $theNick $chan  } else {      IRCPrivMSG $chan "Get a pair of glasses"    }</code></pre></div><br>Thats not a big thing, but...<br>I thing i 'll go and study some tcl scripting  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10207">roughnecks</a> — Wed Dec 17, 2008 8:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roughnecks]]></name></author>
		<updated>2008-12-17T07:37:18-04:00</updated>

		<published>2008-12-17T07:37:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86296#p86296</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86296#p86296"/>
		<title type="html"><![CDATA[timebomb help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86296#p86296"><![CDATA[
Thanks....it works perfectly<br>Now the bot ignores requests with wrong nicknames.<br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10207">roughnecks</a> — Wed Dec 17, 2008 7:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2008-12-17T06:56:02-04:00</updated>

		<published>2008-12-17T06:56:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86294#p86294</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86294#p86294"/>
		<title type="html"><![CDATA[timebomb help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86294#p86294"><![CDATA[
I didn't test it, but I think the bomb proc should check if the nick exist on the chan before start, try:<div class="codebox"><p>Code: </p><pre><code>proc doTimebomb {nick uhost hand chan arg} {   global botnick   set theNick $nick   if { [llength $arg] == 1 } {     set theNick [lindex [split $arg] 0]   }   if { [string tolower $theNick] == [string tolower $botnick] } {     set theNick $nick     IRCKick $theNick $chan "I will not tollerate this!"     return   }   if { [validuser $theNick] == 1 } {     if { [matchattr $theNick "+b"] == 1 } {       set theNick $nick       IRCKick $theNick $chan "I will not tollerate that!"       return     }   }  #here is fix  if {[onchan $theNick $chan]} {       StartTimeBomb $nick $theNick $chan   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Wed Dec 17, 2008 6:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roughnecks]]></name></author>
		<updated>2008-12-17T06:38:06-04:00</updated>

		<published>2008-12-17T06:38:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86292#p86292</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86292#p86292"/>
		<title type="html"><![CDATA[timebomb help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86292#p86292"><![CDATA[
Hi, i have a request, if it is possible, naturally...here i go:<br><br>In timebomb script, if you mispell a nick...or timebomb a non-existent one, the bot still<br>puts the bomb into the wrong nick's pants...this is a little bug i think<br><br>Would you like to help me fix this thing ? I am not able to do it myself.<br>Maybe the bot could put the bomb into the user who mispelld the nick,<br>some sort of revenge, i mean...but this is only a suggestion.<br><br>So, thank you for reading, hope you can help<br><br>I'm going to paste the tcl:<br><div class="codebox"><p>Code: </p><pre><code>###############################################################################bind  pub   -   timebomb  doTimebombbind  pub   -   cutwire   doCutWire################################################################################ Configuration#set gTimebombMinimumDuration 20set gTimebombMaximumDuration 60set gWireChoices "Red Orange Yellow Green Blue Indigo Violet Black White Grey Brown Pink Mauve Beige Aquamarine Chartreuse Bisque Crimson Fuchsia Gold Ivory Khaki Lavender Lime Magenta Maroon Navy Olive Plum Silver Tan Teal Turquoise"set gMaxWireCount 3################################################################################ Internal Globals#set gTheScriptVersion "0.4"set gTimebombActive 0set gTimerId 0set gTimebombTarget ""set gTimebombChannel ""set gCorrectWire ""set gNumberNames "zero one two three four five six seven eight nine ten eleven twelve"###############################################################################proc note {msg} {  putlog "% $msg"}proc IRCKick {theNick theChannel theReason} {  note "Kicking $theNick in $theChannel (Reason: $theReason)"  putserv "KICK $theChannel $theNick :$theReason"}proc IRCPrivMSG {theTarget messageString} {  putserv "PRIVMSG $theTarget :$messageString"}proc IRCAction {theTarget messageString} {  putserv "PRIVMSG $theTarget :\001ACTION $messageString\001"}proc MakeEnglishList {theList} {  set theListLength [llength $theList]  set returnString [lindex $theList 0]  for {set x 1} {$x &lt; $theListLength} {incr x} {    if { $x == [expr $theListLength - 1] } {      set returnString "$returnString and [lindex $theList $x]"    } else {      set returnString "$returnString, [lindex $theList $x]"    }  }  return $returnString}proc SelectWires {wireCount} {  global gWireChoices  set totalWireCount [llength $gWireChoices]  set selectedWires ""  for {set x 0} {$x &lt; $wireCount} {incr x} {    set currentWire [lindex $gWireChoices [expr int( rand() * $totalWireCount )]]    if { [lsearch $selectedWires $currentWire] == -1 } {      lappend selectedWires $currentWire    } else {      set x [expr $x - 1]    }  }  return $selectedWires}proc DetonateTimebomb {destroyTimer kickMessage} {  global gTimebombTarget gTimerId gTimebombChannel gTimebombActive  if { $destroyTimer } {    killutimer $gTimerId  }  set gTimerId 0  set gTimebombActive 0  IRCKick $gTimebombTarget $gTimebombChannel $kickMessage}proc DiffuseTimebomb {wireCut} {  global gTimerId gTimebombActive gTimebombTarget gTimebombChannel  killutimer $gTimerId  set gTimerId 0  set gTimebombActive 0  IRCPrivMSG $gTimebombChannel "$gTimebombTarget cut the $wireCut wire.  This has defused the bomb!"}proc StartTimeBomb {theStarter theNick theChannel} {  global gTimebombActive gTimebombTarget gTimerId gTimebombChannel gNumberNames gCorrectWire  global gMaxWireCount gTimebombMinimumDuration gTimebombMaximumDuration  if { $gTimebombActive == 1 } {    note "Timebomb not started for $theStarter (Reason: timebomb already active)"    if { $theChannel != $gTimebombChannel } {      IRCPrivMSG $theChannel "I don't have a single bomb to spare. :-("    } else {      IRCAction $theChannel "points at the bulge in the back of $gTimebombTarget's pants."    }  } else {    set timerDuration [expr $gTimebombMinimumDuration + [expr int(rand() * ($gTimebombMaximumDuration - $gTimebombMinimumDuration))]]    set gTimebombTarget $theNick    set gTimebombChannel $theChannel    set numberOfWires [expr 1 + int(rand() * ( $gMaxWireCount - 0 ))]    set listOfWires [SelectWires $numberOfWires]    set gCorrectWire [lindex $listOfWires [expr int( rand() * $numberOfWires )]]    set wireListAsEnglish [MakeEnglishList $listOfWires]    set wireCountAsEnglish [lindex $gNumberNames $numberOfWires]    IRCAction $theChannel "stuffs the bomb into $gTimebombTarget's pants.  The display reads \[\002$timerDuration\002\] seconds."    if { $numberOfWires == 1 } {      IRCPrivMSG $theChannel "Diffuse the bomb by cutting the correct wire. There is $wireCountAsEnglish wire. It is $wireListAsEnglish."    } else {      IRCPrivMSG $theChannel "Diffuse the bomb by cutting the correct wire. There are $wireCountAsEnglish wires. They are $wireListAsEnglish."    }    note "Timebomb started by $theStarter (Bomb handed to $theNick it will detonate in $timerDuration seconds)"    set gTimebombActive 1    set gTimerId [utimer $timerDuration "DetonateTimebomb 0 {\002*BOOM!*\002}"]  }}################################################################################ Eggdrop command binds#proc doCutWire {nick uhost hand chan arg} {  global gTimebombActive gCorrectWire gTimebombTarget  if { $gTimebombActive == 1 } {    if { [string tolower $nick] == [string tolower $gTimebombTarget] } {      if { [llength $arg] == 1 } {        if { [string tolower $arg] == [string tolower $gCorrectWire] } {          DiffuseTimebomb $gCorrectWire        } else {          DetonateTimebomb 1 "\002snip...*BOOM!*\002"        }      }    }  }}proc doTimebomb {nick uhost hand chan arg} {  global botnick  set theNick $nick  if { [llength $arg] == 1 } {    set theNick [lindex [split $arg] 0]  }  if { [string tolower $theNick] == [string tolower $botnick] } {    set theNick $nick    IRCKick $theNick $chan "I will not tollerate this!"    return  }  if { [validuser $theNick] == 1 } {    if { [matchattr $theNick "+b"] == 1 } {      set theNick $nick      IRCKick $theNick $chan "I will not tollerate that!"      return    }  }  StartTimeBomb $nick $theNick $chan}###############################################################################note "timebomb$gTheScriptVersion: loaded";note " with $gMaxWireCount wire maximum,"note " and time range of $gTimebombMinimumDuration to $gTimebombMaximumDuration seconds.";</code></pre></div>[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10207">roughnecks</a> — Wed Dec 17, 2008 6:38 am</p><hr />
]]></content>
	</entry>
	</feed>
