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

	<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-05-24T13:47:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2008-05-24T13:47:12-04:00</updated>

		<published>2008-05-24T13:47:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83162#p83162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83162#p83162"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83162#p83162"><![CDATA[
Looks like you are missing the "charfilter" proc, and I somehow doubt that it returns a list, in which case, you are still improperly using list commands on a string.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat May 24, 2008 1:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-05-24T06:10:55-04:00</updated>

		<published>2008-05-24T06:10:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83150#p83150</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83150#p83150"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83150#p83150"><![CDATA[
The issue solved, the code posted by me was succesfuly modified!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Sat May 24, 2008 6:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-05-23T12:24:18-04:00</updated>

		<published>2008-05-23T12:24:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83128#p83128</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83128#p83128"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83128#p83128"><![CDATA[
You should be splitting $text (clearly a string variable) when combining it with list commands (lindex/lrange). The consequence of forgetting this is that curly bracings and other special characters will crash your script whenever used as part of $text. To turn strings into lists use split, to turn lists into strings use join. To forget to do either will only work on predetermined things, user input into $text is anything but predetermined...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri May 23, 2008 12:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-05-22T11:15:13-04:00</updated>

		<published>2008-05-22T11:15:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83098#p83098</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83098#p83098"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83098#p83098"><![CDATA[
sorry.<br><br>change<br><div class="codebox"><p>Code: </p><pre><code>[putserv "KICK $chan $tnick :Ban: $reason"] </code></pre></div>for<div class="codebox"><p>Code: </p><pre><code>putserv "KICK $chan $tnick :Ban: $reason"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Thu May 22, 2008 11:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-05-22T10:50:13-04:00</updated>

		<published>2008-05-22T10:50:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83096#p83096</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83096#p83096"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83096#p83096"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>#set the ban time in minutes. (0 = permban)set bantime "60"bind pub o .b pub:banproc pub:ban {nick uhost hand chan text} {  global bantime  if {[botisop $chan]} {    if {[string length $text] &gt; 0} {      set tnick [lindex $text 0]      if {[onchan $tnick $chan]} {        if {[string length [lindex $text 1]] == 0} { set reason banned } else { set reason [lrange $text 1 end] }        newchanban $chan *!*@[lindex [split [getchanhost $tnick $chan] @] 1] $nick $reason $bantime        [putserv "KICK $chan $tnick :Ban: $reason"]      } else { puthelp "notice $nick :no such nick on channel!" }    } else { puthelp "NOTICE $nick :usage !kb &lt;nick&gt; reason - kicks and bans a nick" }  } else { puthelp "NOTICE $nick :algo falla" }} </code></pre></div> <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=8762">Nor7on</a> — Thu May 22, 2008 10:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-05-22T10:30:24-04:00</updated>

		<published>2008-05-22T10:30:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83095#p83095</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83095#p83095"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83095#p83095"><![CDATA[
I've modified a little bit the code it bans with !dr command and has a predifined reason, but I don't know where to set the ban time, I need it to be permident !<br>Help...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Thu May 22, 2008 10:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-05-22T07:24:13-04:00</updated>

		<published>2008-05-22T07:24:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83089#p83089</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83089#p83089"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83089#p83089"><![CDATA[
<blockquote class="uncited"><div>look here:<br><br><a href="http://forum.egghelp.org/viewtopic.php?p=81077&amp;highlight=#81077" class="postlink">http://forum.egghelp.org/viewtopic.php? ... ght=#81077</a></div></blockquote>k, 10x!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Thu May 22, 2008 7:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-05-22T07:17:06-04:00</updated>

		<published>2008-05-22T07:17:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83088#p83088</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83088#p83088"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83088#p83088"><![CDATA[
look here:<br><br><a href="http://forum.egghelp.org/viewtopic.php?p=81077&amp;highlight=#81077" class="postlink">http://forum.egghelp.org/viewtopic.php? ... ght=#81077</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Thu May 22, 2008 7:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-05-22T07:04:47-04:00</updated>

		<published>2008-05-22T07:04:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83087#p83087</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83087#p83087"/>
		<title type="html"><![CDATA[Re: Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83087#p83087"><![CDATA[
<blockquote class="uncited"><div>Search in the forum <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote>Search what ? <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=9905">eXtremer</a> — Thu May 22, 2008 7:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-05-22T05:57:42-04:00</updated>

		<published>2008-05-22T05:57:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83083#p83083</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83083#p83083"/>
		<title type="html"><![CDATA[Search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83083#p83083"><![CDATA[
Search in the forum <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=8762">Nor7on</a> — Thu May 22, 2008 5:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-05-22T03:29:09-04:00</updated>

		<published>2008-05-22T03:29:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83081#p83081</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83081#p83081"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83081#p83081"><![CDATA[
<blockquote class="uncited"><div>this aint your script</div></blockquote>I know, I didn't said that this is mine, is taken from LoL's TooLz !<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Thu May 22, 2008 3:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[edu]]></name></author>
		<updated>2008-05-22T00:57:02-04:00</updated>

		<published>2008-05-22T00:57:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83080#p83080</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83080#p83080"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83080#p83080"><![CDATA[
this aint your script<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8324">edu</a> — Thu May 22, 2008 12:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2008-05-19T23:44:30-04:00</updated>

		<published>2008-05-19T23:44:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83013#p83013</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83013#p83013"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83013#p83013"><![CDATA[
You have made attempts to contact the original author?<br><br>If not, please do so.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Mon May 19, 2008 11:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-05-19T05:29:23-04:00</updated>

		<published>2008-05-19T05:29:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82987#p82987</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82987#p82987"/>
		<title type="html"><![CDATA[Modify TCL code for my need (other chan cmd)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82987#p82987"><![CDATA[
This code bans somone with the !ban command:<br><br>&lt;Me&gt; !ban Nick test<br>*** Bot sets mode: +b *!*@host.com<br>*** Nick was kicked by Bot (test, by Me)<br><div class="codebox"><p>Code: </p><pre><code>bind pub o|o [string trim $lol(cmdchar)]ban pub_lol_banbind pub o|o +b pub_lol_ban### !BAN &lt;nick|mask&gt; [time] [reason]proc pub_lol_ban {nick host hand chan arg} {set arg [charfilter $arg]global lol botnickif {![check $hand $nick $host]} {if {$lol(silent) == 1 || [checksilent $hand]} {return 0}            puthelp "NOTICE $nick :You need to be identified to use this function. Type .identhelp in the partyline for more info. : \002/msg $botnick id &lt;password&gt;\002 or \002/msg $botnick silent &lt;password&gt;\002 to no more receive this warning."return 0}if {[llength $arg] &lt; 1} {puthelp "NOTICE $nick :\002Usage:\002 [string trim $lol(cmdchar)]ban &lt;nick|mask&gt; \[time\] \[reason\]"return 0}set who [lindex $arg 0]if {[strlwr $who] == [strlwr $botnick]} {puthelp "NOTICE $nick :Yeah right, like I'm going to let you ban ME!"return 0}set ti [lindex $arg 1]if {[isnumber $ti]} {set reason [lrange $arg, 2 end]} {set ti ""set reason [lrange $arg, 1 end]}if {$reason == ""} { set reason "Requested," }if {[onchan $who $chan]} {if { $lol(bantype) == 0 } { set ipmask [lindex [split [maskhost $who![getchanhost $who $chan]] "@"] 1]set usermask [lindex [split [getchanhost $who $chan] "@"] 0]set banmask *!*$usermask@$ipmask} else { set banmask [getchanhost $who $chan]           set banmask "*!*[string range $banmask [string first @ $banmask] e]" }} else {  set banmask [lindex $arg 0]if {[string first "!" $banmask] == -1 &amp;&amp; [string first "@" $banmask] == -1} {if {[isnumber [string index $banmask 0]]} { set banmask *!*@$banmask } else { set banmask $banmask*!*@* }}if {[string first "!" $banmask] == -1} { set banmask *!*$banmask }if {[string first "@" $banmask] == -1} { set banmask $banmask*@* }}   if {![botisop $chan]} { return 0 }putserv "MODE $chan +b $banmask"  foreach chanuser [chanlist $chan] {      if {[string match [strlwr $banmask] [strlwr "$chanuser![getchanhost $chanuser $chan]"]] &amp;&amp; $chanuser != $botnick } { if {[nick2hand $chanuser $chan] != "*"} {if {$hand != [nick2hand $chanuser $chan]} {if {[matchattr [nick2hand $chanuser $chan] o|o $chan] &amp;&amp; ![matchattr $hand o|o $chan]} {                              puthelp "NOTICE $nick :Sorry, you must be an operator to ban an operator."return 0}if {([matchattr [nick2hand $chanuser $chan] m|m $chan] || [matchattr [nick2hand $who $chan] b]) &amp;&amp; ![matchattr $hand m|m $chan]} {                              puthelp "NOTICE $nick :Sorry, you must be a master to ban a master or a bot."return 0}}}       putkick $chan $chanuser [join [lappend reason "by $nick"]]}       } switch $ti {""{newchanban $chan $banmask $nick [join [lappend reason "by $nick"]]puthelp "NOTICE $nick :New mask added : $banmask"}0{newchanban $chan $banmask $nick [join [lappend reason "by $nick"]] $tiputhelp "NOTICE $nick :New mask added permanently : $banmask"}default{newchanban $chan $banmask $nick [join [lappend reason "by $nick"]] $tiputhelp "NOTICE $nick :New mask added for $ti minutes : $banmask"}}return 0}</code></pre></div>I need the same thing but for the "!dr" command it should have a predifined reason with permident (0) ban.<br><br>Example:<br><br>&lt;Me&gt; !dr Dronenick<br>*** Bot sets mode: +b *!*@host.net<br>*** [Banned]: Dronenick<br>*** Dronenick was kicked by Bot (You are infected join /join #DMSetup for help!, by Me) <br><br>This ban should have this reason "You are infected join /join #DMSetup for help!" and ban for ever (permident).<br><br>Waiting for replies, thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Mon May 19, 2008 5:29 am</p><hr />
]]></content>
	</entry>
	</feed>
