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

	<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>2022-05-28T10:59:26-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-05-28T10:59:26-04:00</updated>

		<published>2022-05-28T10:59:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111159#p111159</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111159#p111159"/>
		<title type="html"><![CDATA[question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111159#p111159"><![CDATA[
The simplest way imho is to add a flag to the channels to enable/disable the feature.<br><br>Now, I'm not sure to understand the query: do you want to disallow the usage of the pub command in channels or do you want to forbid the display of the message in channels ?<br><br>To block the command on channels:<div class="codebox"><p>Code: </p><pre><code>setudef flag nopubproc pub:global {nick uhost handle chan text} {   if {[matchattr $hand G]} {      if {[channel get $chan nopub]} { return }      foreach c [channels] {         putserv "PRIVMSG $c :\002AANKONDIGING:\002 $nick: $text"      }   } else {      putserv "NOTICE $nick :U hebt geen toegang."   }}</code></pre></div>To block the display of the message in channels:<div class="codebox"><p>Code: </p><pre><code>setudef flag nopubproc pub:global {nick uhost handle chan text} {   if {[matchattr $hand G]} {      if {[string tolower $chan] eq "#ircop"} { return }      foreach c [channels] {         if {[channel get $c nopub]} { continue }         putserv "PRIVMSG $c :\002AANKONDIGING:\002 $nick: $text"      }   } else {      putserv "NOTICE $nick :U hebt geen toegang."   }}</code></pre></div>And in the two case, you have to do <strong class="text-strong">.chanset #channel +nopub</strong> to forbid the usage or the display on #channel.<br>Note that the second script disallow the command in #ircop in any case<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat May 28, 2022 10:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2022-05-28T03:20:27-04:00</updated>

		<published>2022-05-28T03:20:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111158#p111158</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111158#p111158"/>
		<title type="html"><![CDATA[question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111158#p111158"><![CDATA[
Hi i have a little script and need some help with it.<br><div class="codebox"><p>Code: </p><pre><code>proc pub:global {nick host hand chan arg} {  global botnick opchan  if {[matchattr $hand G] == 1} {     if {$chan == "#IRCop"} {        return 0     }     foreach chan [channels] { putserv "PRIVMSG $chan :\002AANKONDIGING:\002 $nick: $arg" }     return 0  } else { putserv "NOTICE $nick :U hebt geen toegang." }}</code></pre></div>I want some help with it, if the channel is #IRCop it must say nothing.<br>Except other channels how do i change that ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Sat May 28, 2022 3:20 am</p><hr />
]]></content>
	</entry>
	</feed>
