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

	<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>2026-01-02T00:04:10-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2026-01-02T00:04:10-04:00</updated>

		<published>2026-01-02T00:04:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113435#p113435</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113435#p113435"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113435#p113435"><![CDATA[
After hours of trying, the issue with the `.slap` phrase was finally resolved. Here's the working TCL file... great work, CrazyCat! Thank you so much for the variations and for reorganizing the code.<br>I'm grateful to CrazyCat for the time and dedication they gave me when I requested assistance and help.<div class="codebox"><p>Code: </p><pre><code>`args` was replaced with `arg` in the variants.And in `regsub -all -- {&lt;nicks&gt;} $slapsxp $nick slapsxp`, `$nick` was replaced with `$arg`, resulting in: `regsub -all -- {&lt;nicks&gt;} $slapsxp $arg slapsxp`.And in the variant, `reason` was added to`\001ACTION slaps` to make it look like a real slap.</code></pre></div>tcl resolved <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><div class="codebox"><p>Code: </p><pre><code> set xphrases {"\001ACTION slaping :&lt; and spitting in the face of &lt;nicks&gt; slap's\001""&lt;nicks&gt; wake up, wake up""full of slaps, take take take &lt;nicks&gt;"}bind pub - !slap slapsnickbind pub - ¡slap slapsnickbind pub - .slap slapsnickproc slapsnick {nick uhost hand chan arg} {   global xphrases if {[string trim [join $arg]] eq ""} {  putserv "PRIVMSG $chan :\002The right thing\002 is \002!slap nick\002 example \002!slap sedition\002"  return } set target [join [lindex $arg 0]] if {![onchan $target $chan]} { putserv "PRIVMSG $chan :$target is not in $chan"  return  } if {[llength $arg] &gt; 1} {  set reason [join [lrange [split $arg] 1 end]]  putserv "PRIVMSG $chan :\001ACTION slaps $target $reason\001"  } else { set slapsxp [lindex $xphrases [rand [llength $xphrases]]] regsub -all -- {&lt;nicks&gt;} $slapsxp $arg slapsxp  putserv "PRIVMSG $chan :$slapsxp"   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Fri Jan 02, 2026 12:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-12-20T21:51:08-04:00</updated>

		<published>2025-12-20T21:51:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113422#p113422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113422#p113422"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113422#p113422"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>CrazyCat But explain me what you expect to have when there is a reason.</code></pre></div>If there is a reason, state the reason of the person who threw it, for example:<div class="codebox"><p>Code: </p><pre><code>[11:31] &lt;nicolassss&gt; !slap sedition stop sleeping[11:31] * @Kantuta stop sleeping sedition </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Sat Dec 20, 2025 9:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-12-20T21:45:55-04:00</updated>

		<published>2025-12-20T21:45:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113421#p113421</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113421#p113421"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113421#p113421"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set xphrases {   "\001ACTION full of slaps to &lt;nicks&gt; :-)"   "\001ACTION slaping :&lt; and spitting in the face of &lt;nicks&gt; slapppppppppppp\001"}bind pub - !slap slapsnickbind pub - ¡slap slapsnickbind pub - .slap slapsnickproc slapsnick {nick uhost hand chan args} {   global xphrases  if {[string trim [join $args]] eq ""} {      putserv "PRIVMSG $chan :\002The right thing\002 is \002!slap nick\002 example \002!slap sedition\002"      return   }   set target [join [lindex $args 0]]   if {![onchan $target $chan]} {      putserv "PRIVMSG $chan :$target is not in $chan"      return   }   if {[llength $args] &gt; 1} {      set reason [join [lrange [split $args] 1 end]]      putserv "PRIVMSG $chan :$target $reason"   } else {      set slapsxp [lindex $xphrases [rand [llength $xphrases]]]      regsub -all -- {&lt;nicks&gt;} $slapsxp $nick slapsxp      putserv "PRIVMSG $chan :$slapsxp"   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Sat Dec 20, 2025 9:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2025-12-05T03:56:14-04:00</updated>

		<published>2025-12-05T03:56:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113411#p113411</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113411#p113411"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113411#p113411"><![CDATA[
Ok, the trouble is that $args has a count of 1 event if there is no arg (contains {})<br><br>So the first check must be:<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark-reasonable.min.css"> <strong>script</strong>  <strong>script</strong> <div class="codebox"><pre><code class="language-tcl">   if {[string trim [join $args]] eq ""} {      putserv "PRIVMSG $chan :\002The right thing\002 is \002!slap nick\002 example \002!slap sedition\002"      return   }</code></pre></div> <strong>script</strong> When the argument is just a nick, I understand what you want and it works.<br><br>But explain me what you expect to have when there is a reason.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Fri Dec 05, 2025 3:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2025-12-03T16:35:17-04:00</updated>

		<published>2025-12-03T16:35:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113409#p113409</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113409#p113409"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113409#p113409"><![CDATA[
I've corrected the last putserv (based on yours, so I didn't removed a $target which wasn't needed).<br>For others troubles... did you restart your eggdrop ?<br><br>And please, if you have errors, just write:<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>&lt;nicolassss&gt; .slap&lt;@Kantuta &gt;  is not in #curmmer</code></pre></div></div></blockquote><blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>&lt;nicolassss&gt; .slap&lt;@Kantuta &gt; The right thing is !slap nick example !slap sedition</code></pre></div></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Dec 03, 2025 4:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-12-03T13:30:09-04:00</updated>

		<published>2025-12-03T13:30:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113408#p113408</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113408#p113408"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113408#p113408"><![CDATA[
I checked the code and it's fine, just as I requested.<br>But it's not working properly.<div class="codebox"><p>Code: </p><pre><code>&lt;nicolassss&gt; .slap&lt;@Kantuta &gt;  is not in #curmmer</code></pre></div>That's where I should launch this<div class="codebox"><p>Code: </p><pre><code>&lt;nicolassss&gt; .slap@Kantuta The right thing is !slap nick example !slap sedition</code></pre></div>and in this part of .slap nickname <div class="codebox"><p>Code: </p><pre><code>&lt;nicolassss&gt; .slap sedinne* @Kantuta  slaping :&lt; and spitting in the face of sedinne slapppppppppppp sedinne</code></pre></div>It should only launch like this (default phrase from set xphrases)<br>it would be like this:<div class="codebox"><p>Code: </p><pre><code>* @Kantuta  slaping :&lt; and spitting in the face of sedinne slapppppppppppp </code></pre></div>With the .slap nickname phrase option, this detail was observed: it indicates that the nickname is not in the channel.<div class="codebox"><p>Code: </p><pre><code>&lt;nicolassss&gt; .slap nicolassss don't sleep&lt;@Kantuta&gt; nicolassss don't sleep is not in #curmmer</code></pre></div>I don't know why the code is failing; it looks better organized and should work fine.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Dec 03, 2025 1:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2025-12-02T19:02:08-04:00</updated>

		<published>2025-12-02T19:02:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113407#p113407</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113407#p113407"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113407#p113407"><![CDATA[
Ok, so the trouble is that you don't check if $reason is set or not.<br>Here is a modified version of your script:<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark-reasonable.min.css"> <strong>script</strong>  <strong>script</strong> <div class="codebox"><pre><code class="language-tcl">set xphrases {   "\001ACTION full of slaps to &lt;nicks&gt; :-)"   "\001ACTION slaping :&lt; and spitting in the face of &lt;nicks&gt; slapppppppppppp\001"}bind pub - !slap slapsnickbind pub - ¡slap slapsnickbind pub - .slap slapsnickproc slapsnick {nick uhost hand chan args} {   global xphrases   if {[llength $args] == 0} {      putserv "PRIVMSG $chan :\002The right thing\002 is \002!slap nick\002 example \002!slap sedition\002"      return   }   set target [join [lindex $args 0]]   if {![onchan $target $chan]} {      putserv "PRIVMSG $chan :$target is not in $chan"      return   }   if {[llength $args] &gt; 1} {      set reason [join [lrange [split $args] 1 end]]      putserv "PRIVMSG $chan :$target $reason"   } else {      set slapsxp [lindex $xphrases [rand [llength $xphrases]]]      regsub -all -- {&lt;nicks&gt;} $slapsxp $nick slapsxp      putserv "PRIVMSG $chan :$slapsxp"   }}</code></pre></div> <strong>script</strong> It also contains some little optimisations / arrangements to avoid warnings and errors<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Dec 02, 2025 7:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-12-02T17:03:28-04:00</updated>

		<published>2025-12-02T17:03:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113406#p113406</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113406#p113406"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113406#p113406"><![CDATA[
.slap nickname (works fine -- launches default phrases in <strong class="text-strong">set xphrases</strong>)<br>.slap nickname phrases ( bad --- It works, but it throws predefined phrases from <strong class="text-strong">xphrases</strong> and also throws custom phrases.)<br>In this last option, it should only launch the custom phrase<br>example :<div class="codebox"><p>Code: </p><pre><code>[11:31] &lt;nicolassss&gt; !slap sedition You're distracted[11:31] * @Kantuta  sedition You're distracted</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Tue Dec 02, 2025 5:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-12-02T16:16:29-04:00</updated>

		<published>2025-12-02T16:16:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113405#p113405</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113405#p113405"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113405#p113405"><![CDATA[
that the first command works well :<div class="codebox"><p>Code: </p><pre><code>[11:31] &lt;nicolassss&gt; !slap sedition[11:31] * @Kantuta full of slaps to nicolassss :-) sedition </code></pre></div>It's in the second option slap, for example, !slap nickname phrase.<br>the right thing would be:<div class="codebox"><p>Code: </p><pre><code>[11:31] * @Kantuta full of slaps to sedition  :-) </code></pre></div>That's the detail; it blends in with the first slap.<br>[11:31] &lt;nicolassss&gt; !slap sedition wake up<div class="codebox"><p>Code: </p><pre><code>[11:31] * @Kantuta  slaping :&lt; and spitting in the face of nicolassss slapppppppppppp sedition wake up</code></pre></div>the right thing would be:<div class="codebox"><p>Code: </p><pre><code>[11:31] * @Kantuta  sedition wake up</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Tue Dec 02, 2025 4:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2025-12-02T13:34:58-04:00</updated>

		<published>2025-12-02T13:34:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113404#p113404</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113404#p113404"/>
		<title type="html"><![CDATA[Re: slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113404#p113404"><![CDATA[
Not sure to understand what you mean.<br>Can you give an example of the result of !slap nick and what you expected to have ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Dec 02, 2025 1:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-12-02T11:38:51-04:00</updated>

		<published>2025-12-02T11:38:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113402#p113402</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113402#p113402"/>
		<title type="html"><![CDATA[slap nick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113402#p113402"><![CDATA[
I put together this TCL and it works fine, the issue is that the !slap nick (default) gets mixed up with the !slap nick phrase.<div class="codebox"><p>Code: </p><pre><code>set xphrases {"\001ACTION full of slaps to &lt;nicks&gt; :-)""\001ACTION slaping :&lt; and spitting in the face of &lt;nicks&gt; slapppppppppppp\001"}bind pub - !slap slapsnickbind pub - ¡slap slapsnickbind pub - .slap slapsnickproc slapsnick {nick uhost hand chan arg} { global xphrases set target "[lindex [split $arg] 0]" ; set reason "[join [lrange [split $arg] 1 end]]" if {$arg == ""} { putserv "PRIVMSG $chan :\002The right thing\002 is \002!slap nick\002 example \002!slap sedition\002" ; return 0 } if {![onchan $target $chan]} { putserv "PRIVMSG $chan :$arg is not in $chan" -next ; return }set slapsxp [lindex $xphrases [rand [llength $xphrases]]] regsub -all -- {&lt;nicks&gt;} $slapsxp $nick slapsxpputserv "PRIVMSG $chan :$slapsxp $target $reason" -next } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Tue Dec 02, 2025 11:38 am</p><hr />
]]></content>
	</entry>
	</feed>
