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

	<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-31T01:38:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[IRC_MAC]]></name></author>
		<updated>2008-12-31T01:38:44-04:00</updated>

		<published>2008-12-31T01:38:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86608#p86608</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86608#p86608"/>
		<title type="html"><![CDATA[Topicmask by vigilant]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86608#p86608"><![CDATA[
i have this script also and it works great. i have my own channel, but i also serv 6 other channels, this script helps me alot. just has is, its the perfect script. i like it... and user is very smart dude, he knows alot about this stuff..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10360">IRC_MAC</a> — Wed Dec 31, 2008 1:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2008-02-04T19:08:28-04:00</updated>

		<published>2008-02-04T19:08:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80639#p80639</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80639#p80639"/>
		<title type="html"><![CDATA[Topicmask by vigilant]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80639#p80639"><![CDATA[
Hi.<br><br>Ive recently got my hands on this tcl from the egghelp tcl archive.<br>Its very nice, but im wondering if its possible to get it to work with more topicmasks for each channel and assign each one with a number or wildcard.<br>Lemme give you an example;<br><br>.topicmask set #channel "1" Welcome to #chan - news: <br>.topicmask set #channel "rules" Welcome to #chan - rules:<br><br>And then to use it like:<br><br>!tm 1 Sign up on the new website!<br>!tm rules READ THE NEW RULES!<br><br>Get it? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code># topicmask tcl# 12:39 PM 12/10/2007######################### AUTHOR INFORMATION######################### Author: vigilant# Contact: admin@anserq.com for bugs, suggestions and all that.###  This program is free software: you can redistribute it and/or modify#  it under the terms of the GNU General Public License as published by#  the Free Software Foundation, either version 3 of the License, or#  (at your option) any later version.##  This program is distributed in the hope that it will be useful,#  but WITHOUT ANY WARRANTY; without even the implied warranty of#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the#  GNU General Public License for more details.##  You should have received a copy of the GNU General Public License#  along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;. ########################## PURPOSE######################### Lets you add a * to your topic and then, replace the * with anything using a public command.########################### EXAMPLE######################### .chanset #channel +topicmask## .chanset #channel tmtopic welcome to #channel - news:  *# OR# .topicmask set #channel welcome to #channel - news:  *## Then in channel, !tm Sign up on the website!# and the channel topic would be: welcome to #channel - news: Sign up on the website!## To disable topicmask on a channel, .chanset #channel -topicmask# So this is the handy capability of this script.set tm(version) "0.1"# EDIT BELOW# The public channel command character to use for changing topic.set tm(cmdchar) "!"# The minimum flag needed to use public command# format, global|channelset tm(pub) "m|m"# The minimum flag to set/clear topicmasks# format, global|channelset tm(dcc) "m|m"# END OF EDITTING# varssetudef flag topicmasksetudef str tmtopic# bindsbind dcc -|- topicmask tm_dccbind pub -|- [string trim $tm(cmdchar)]tm tm_pub# code starts here...set tm(commands) "set help clear"proc tm_dcc { h i t } {global tmset cmd [lindex $t 0]switch -glob -- $cmd { set {if {![matchattr $h $tm(dcc) [lindex $t 1]]} {putdcc $i "You do not have enough access to use this command"return 1}if {![validchan [lindex $t 1]]} {putdcc $i "This channel does not exist"return 1} if {![channel get [lindex $t 1] topicmask]} {putdcc $i "This channel does not have topicmask enabled"return 1} if {[validchan [lindex $t 1]] &amp;&amp; [channel get [lindex $t 1] topicmask] &amp;&amp; [lindex $t 2] == ""} {putdcc $i "Please enter a valid topic"putdcc $i "Such as: Welcome to #channel, news: *"putdcc $i "\002Make sure to enter the *\002"return 1} if {![string match {*\**} [lrange $t 2 end]]} {putdcc $i "Make sure to enter a * for topicmask"} else {set topicreq [lrange $t 2 end]set newtopic [channel set [lindex $t 1] tmtopic $topicreq]putdcc $i "New topic for [lindex $t 1] is [channel get [lindex $t 1] tmtopic]"putquick "TOPIC [lindex $t 1] :$topicreq"return 0} }clear {if {[matchattr $h $tm(dcc) [lindex $t 1]] == 0} {putdcc $i "You do not have enough access to use this command"return 1}if {![validchan [lindex $t 1]]} {putdcc $i "Please enter a valid channel"return 1} else {set empty ""channel set [lindex $t 1] tmtopic $emptyputdcc $i "Cleared the topicmask for [lindex $t 1]"return 0}}help { set tm(helpcmds) "set clear"if {[lindex $t 1] == ""} {putdcc $i "Get help with what? Available commands: \002$tm(helpcmds)"}if {[lindex $t 1] == "set"} { putdcc $i "\002set\002"putdcc $i "To set a topicmask for a channel simply type: .topicmask set #channel topicmask topic here"putdcc $i "Include the * in this topicmask, then in the channel, !tm topic here"} if {[lindex $t 1] == "clear"} {putdcc $i "\002clear\002"putdcc $i "To clear a topicmask of a channel, type: .topicmask clear #channel"}}default {putdcc $i "Enter a command: \002$tm(commands)"} }}# The public command to use topicmask'ed topicproc tm_pub { n u h c a } {global tmset gettopic [channel get $c tmtopic]if {![matchattr $h $tm(pub) $c]} {putnotc $n "You don't have enough access to use this command"return 1} elseif {![channel get $c topicmask]} {putnotc $n "This channel does not have topicmask setting enabled"return 1} elseif {![string match {*\**} $gettopic]} {putnotc $n "This channel does not have a setup topicmask"return 1} elseif {[string match {*\**} $gettopic] &amp;&amp; [lindex $a 0] == ""} {putnotc $n "Cannot enter an empty topic."return 1} else {set newtopic [lreplace $gettopic [lsearch -glob $gettopic {*\**}] [lsearch -glob $gettopic {*\**}] $a]putquick "TOPIC $c :[join $newtopic]"return 0}}putlog "Topicmask version: $tm(version) by vigilant initialized"</code></pre></div>I hope someone knows an easy way to do this. <br><br>Thanks in advance!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8985">nsrafk</a> — Mon Feb 04, 2008 7:08 pm</p><hr />
]]></content>
	</entry>
	</feed>
