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

	<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>2010-01-07T06:04:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[BhasIRC]]></name></author>
		<updated>2010-01-07T06:04:28-04:00</updated>

		<published>2010-01-07T06:04:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91616#p91616</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91616#p91616"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91616#p91616"><![CDATA[
thanks alot guys its working<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11039">BhasIRC</a> — Thu Jan 07, 2010 6:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BhasIRC]]></name></author>
		<updated>2010-01-07T02:20:40-04:00</updated>

		<published>2010-01-07T02:20:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91615#p91615</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91615#p91615"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91615#p91615"><![CDATA[
the script is loaded and yes i did try the .chanset #help +help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11039">BhasIRC</a> — Thu Jan 07, 2010 2:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2010-01-06T21:37:02-04:00</updated>

		<published>2010-01-06T21:37:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91613#p91613</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91613#p91613"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91613#p91613"><![CDATA[
If the channel's name is #whatever where you wanted to use the script then you would need to use <strong class="text-strong">.chanset #whatever +help</strong> in the partyline<br><br>However, this would have to be AFTER the script has been properly loaded otherwise the bot would not recognise the user defined flag <strong class="text-strong">help</strong> as set by the line in the tcl <strong class="text-strong">setudef flag help</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Wed Jan 06, 2010 9:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2010-01-06T20:31:53-04:00</updated>

		<published>2010-01-06T20:31:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91612#p91612</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91612#p91612"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91612#p91612"><![CDATA[
<blockquote class="uncited"><div>i get this msg<br>Error trying to set +help for #help, invalid mode.</div></blockquote>have you tryed .chanset #help +help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Wed Jan 06, 2010 8:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BhasIRC]]></name></author>
		<updated>2010-01-06T11:56:40-04:00</updated>

		<published>2010-01-06T11:56:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91603#p91603</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91603#p91603"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91603#p91603"><![CDATA[
i get this msg<br>Error trying to set +help for #help, invalid mode.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11039">BhasIRC</a> — Wed Jan 06, 2010 11:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2010-01-06T07:42:21-04:00</updated>

		<published>2010-01-06T07:42:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91602#p91602</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91602#p91602"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91602#p91602"><![CDATA[
Did you do <strong class="text-strong">.chanset #channelname +help</strong> for the channel(s) you want the script to function in.<br><br>Otherwise, what error are you getting?<br><br>Could I also urge you to properly indent your code so that it is more easily readable.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Wed Jan 06, 2010 7:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BhasIRC]]></name></author>
		<updated>2010-01-06T07:31:16-04:00</updated>

		<published>2010-01-06T07:31:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91601#p91601</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91601#p91601"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91601#p91601"><![CDATA[
thanks alot i think i understand a bit but can you tell me what i am doing wrong here?<div class="codebox"><p>Code: </p><pre><code># help.tcl ### ---------- CONFIGURATION -------------------------- ### set vHelpTrigger ! set vHelpFlag - ### ---------- CODE ----------------------------------- ### proc pHelpTrigger {} { global vHelpTrigger return $vHelpTrigger } setudef flag help bind PUB $vHelpFlag [pHelpTrigger]help pHelpProc proc pHelpProc {nick uhost hand chan text} { if {[channel get $chan help]} { set command [regsub -all -- {[\s]} $text {}] if {[llength [split $command]] != 0} { switch -- $command { registerchannel { set output(1) "ensure the channel is not already registered by typing \002/cs info #channelname\002" set output(2) "register the channel by typing \002/cs register #channelname password description\002" } registernick { set output(1) "\00314Auto Helper: change to the nick you wish to register" set output(2) "\00314Auto Helper: register the nick by typing \002/ns register password email\002" } setautovoice { set output(1) "\00314Auto Helper: change to the nick you wish to register" } addaccess { set output(1) "\00314Auto Helper: check to see if the nick you want to add is registered by typing /ns info nick" set output(2) "\00314Auto Helper: add access by typing /cs access #channel-name add nick level" } removeaccess { set output(1) "\00314Auto Helper: to remove a nick from the access typ /cs access #channel-name del nick" } invite { set output(1) "\00314Auto Helper: How to invite people into your channel: Type /invite &lt;nickname&gt; #&lt;channel-name&gt;" } setaway { set output(1) "\00314Auto Helper: Type /away &lt;reason&gt; &gt;&gt; Using /away without a reason will set you as no longer being away (back at computer)" } pmuser { set output(1) "\00314Auto Helper: How to private message someone: 1. Double click the users nickname in the nicklist, and begin chatting in the new window. 2. Alternatively you can use /query &lt;nickname&gt; &lt;message&gt;" } identify { set output(1) "\00314Auto Helper: How to identify to your nickname: 1. Change to the appropriate nickname by using /nick &lt;your-registered-nickname&gt;" set output(2) "\00314Auto Helper: Type /nickserv identify &lt;your-nick's-password&gt;" } partchannel { set output(1) "\00314Auto Helper: Type /part #&lt;channel-name&gt;" set output(2) "\00314Auto Helper: How to part all channels your on: Type /partall" } changechannelpassword { set output(1) "\00314Auto Helper: Typ /cs set #channel-name password newpass" } getnickdetails { set output(1) "\00314Auto Helper: typ /whois nick" set output(2) "\00314Auto Helper: to get more detail about a nick typ /ns info nick" } changenickpassword { set output(1) "\00314Auto Helper: Typ /ns setpassword newpass" } getvhost { set output(1) "\00314Auto Helper: register your nick and wait for 3 months then pick a vhost that has no bad words in it and you all join #help and ask an ircop to assign the vhost for you" } default { set output(1) "\00304-error-\003 ($nick) unrecognised command \002$text\002" } } } else { set output(1) "help commands are as follows \00314 !help register nick, !help register channel, !help change nick password, !help get nick details, !help change channel password, !help part #channel, !help identify, !help set away, !help set away, !help add access, !help remove access, !help set autovoice, !help get vhost" } foreach item [lsort -increasing [array names output]] { putserv "PRIVMSG $chan :$output($item)" } } return 0 } putlog "help.tcl loaded" </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11039">BhasIRC</a> — Wed Jan 06, 2010 7:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2010-01-05T20:22:39-04:00</updated>

		<published>2010-01-05T20:22:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91595#p91595</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91595#p91595"/>
		<title type="html"><![CDATA[Re: what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91595#p91595"><![CDATA[
<blockquote class="uncited"><div>i made this and i am realy new to tcl anyways it does not seem to be working can you guys please help me with this<div class="codebox"><p>Code: </p><pre><code>#Command Bindingsbind pub - "*how*register*channel*" pub:registerchannelbind pub - "*how*register*nick*" pub:registernickbind pub - "*how*autovoice*" pub:autovoice#The Commands helpproc pub:registerchannel {nick uh hand chan args} {  putquick "PRIVMSG $nick \00314Auto Helper: To Register a Channel, you need to join a channel get @ status then typ (/msg chanserv register #channel-name password description) expl (/msg chanserv register #help helpers fun)"  return 1}proc pub:registernick {nick uh hand chan args} {  putquick "PRIVMSG $nick \00314Auto Helper: To Register your nick typ /msg nickserv register password email expl /msg nickserv register 12345 lovers@gmail.com"  return 1}proc pub:autovoice {nick uh hand chan args} {  putquick "PRIVMSG $nick \00314Auto Helper: To set a channel on auto voice typ /msg chanserv levels #channel-name set autovoice 0 expl /msg chanserv levels #help set autovoice 0"  return 1}</code></pre></div></div></blockquote><a href="http://forum.egghelp.org/viewtopic.php?t=15889&amp;start=17" class="postlink">http://forum.egghelp.org/viewtopic.php?t=15889&amp;start=17</a><div class="codebox"><p>Code: </p><pre><code>variable mycommands { "*how*register*channel*|#mychan|NOTICE %n :\002\00314Auto Helper:\002 To Register a Channel:""*how*register*channel*|#mychan|NOTICE %n :You need to join a channel get @ status then""*how*register*channel*|#mychan|NOTICE %n :type: /msg chanserv register #channel-name password description""*how*register*channel*|#mychan|NOTICE %n :for example: /msg chanserv register #help helpers fun""*how*register*nick*|#mychan|NOTICE %n :\002\00314Auto Helper:\002 To Register your nick:"*how*register*nick*|#mychan|NOTICE %n :type: /msg nickserv register password email""*how*register*nick*|#mychan|NOTICE %n :for example: /msg nickserv register 12345 lovers@gmail.com""*how*autovoice*|#mychan|NOTICE %n :\002\00314Auto Helper:\002 To set a channel on auto voice:"*how*autovoice*|#mychan|NOTICE %n :type: /msg chanserv levels #channel-name set autovoice 0""*how*autovoice*|#mychan|NOTICE %n :for example: /msg chanserv levels #help set autovoice 0"}</code></pre></div>Putserv-O-matic can do this, simple putserv'd messages with replacement variables. This was done to make it easier for those converting "mIRC script" which looks similar to how mycommands does. Replace the scripts mycommands with the mycommands shown above and it does just that. Change #mychan of course to #yourchan of choice, or use wildcards (* for all channels). Arfer's script does this as well, but his requires the user use "!help" as a command, while the good-ole putserv-O-matic works the same as your script would've (if pubm and colon were where they needed to be) based off words within what a user says. Also spread your message out into several lines, this gives a cleaner look to it. Putserv-O-matic supports this ability. Keep in mind that when getting help, the last thing a person wants is "the help" to be displayed in an unreadable style.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Tue Jan 05, 2010 8:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2010-01-05T18:55:07-04:00</updated>

		<published>2010-01-05T18:55:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91594#p91594</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91594#p91594"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91594#p91594"><![CDATA[
I hope the following working script gives you some useful ideas.<br><br>It is built on the premise that a single bind can be used to handle several/many commands by making use of the &lt;text&gt; argument that a PUB bind passes to the associated proc (everything that comes after the command).<br><br>For example, if the command is <strong class="text-strong">!help</strong> then typing <strong class="text-strong">!help me</strong> would pass <strong class="text-strong">me</strong> to the proc as the &lt;text&gt; argument.<br><br>There are other features which I will try to explain after the pasted code :-<br><div class="codebox"><p>Code: </p><pre><code># help.tcl### ---------- CONFIGURATION -------------------------- ###set vHelpTrigger !set vHelpFlag -### ---------- CODE ----------------------------------- ###proc pHelpTrigger {} {    global vHelpTrigger    return $vHelpTrigger}setudef flag helpbind PUB $vHelpFlag [pHelpTrigger]help pHelpProcproc pHelpProc {nick uhost hand chan text} {    if {[channel get $chan help]} {        set command [regsub -all -- {[\s]} $text {}]        if {[llength [split $command]] != 0} {            switch -- $command {                registerchannel {                    set output(1) "ensure the channel is not already registered by typing \002/cs info #channelname\002"                    set output(2) "register the channel by typing \002/cs register #channelname password description\002"                }                registernick {                    set output(1) "change to the nick you wish to register"                    set output(2) "register the nick by typing \002/ns register password email\002"                }                default {                    set output(1) "\00304-error-\003 ($nick) unrecognised command \002$text\002"                }            }        } else {            set output(1) "\00304-error-\003 ($nick) correct syntax is \002[pHelpTrigger]help &lt;command&gt;\002"        }        foreach item [lsort -increasing [array names output]] {            putserv "PRIVMSG $chan :$output($item)"        }    }    return 0}putlog "help.tcl loaded"</code></pre></div>A configuration section allows you to preset the command trigger (! for !help, . for .help, ^ for ^help etc etc) and also allows you to define which bot user flags are permitted to use the script (the default setting of - means literally anybody).<br><br>I have created a user defined flag <strong class="text-strong">help</strong> in order to restrict which channels the script can be used in. To activate the script in any channel you would have to use partyline command <strong class="text-strong">.chanset #channelname +help</strong>.<br><br>The regsub command inside the proc is used to remove all space characters from the &lt;text&gt; argument. That means <strong class="text-strong">!help register channel</strong> would work equally as well as <strong class="text-strong">!help registerchannel</strong>.<br><br>A switch command is used to define different outputs depending on what the user types with the command. Hence <strong class="text-strong">!help register channel</strong> has a different output from <strong class="text-strong">!help register nick</strong>. I have tried to maintain the script in a readable format such that you can simply add further options (as many as you like) to the switch command for different help items.<br><br>An array named <strong class="text-strong">output</strong> is used for output lines which makes it easy to have as many lines as you need. They will be output one after the other in the order output(1), output(2), output(3) etc etc (up to 9 as it stands).<br><br>Finally, I have used the command source channel $chan as the destination for the output. This is because using $nick has the annoying impact of the bot opening a pm window. If you must have $nick as the destination, then I would suggest a NOTICE and not a PRIVMSG.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Tue Jan 05, 2010 6:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BhasIRC]]></name></author>
		<updated>2010-01-05T17:09:43-04:00</updated>

		<published>2010-01-05T17:09:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91593#p91593</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91593#p91593"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91593#p91593"><![CDATA[
ok thanks i will try and add that i have like 50 different help commands i want added lol so i know if i get the hang of atleast 2 or so i will get the rest<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11039">BhasIRC</a> — Tue Jan 05, 2010 5:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2010-01-05T15:23:20-04:00</updated>

		<published>2010-01-05T15:23:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91589#p91589</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91589#p91589"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91589#p91589"><![CDATA[
Look up a bind type in tcl-commands.html for the correct syntax before you use it. There are many types and they have different syntax. Some binds accept a mask. A PUB bind does not, it is defined with the arguments &lt;flags&gt; &lt;command&gt; &lt;procname&gt;<br><br>The following PUB bind is triggered using the command !register by any user, including those without a bot user record :-<br><div class="codebox"><p>Code: </p><pre><code>bind PUB - !register pRegisterproc pRegister {nick uhost hand chan text} {  # code here}</code></pre></div>Additionally, a colon is used in output statements to seperate the destination ($nick in your case) from the text :-<br><div class="codebox"><p>Code: </p><pre><code>putquick "PRIVMSG $nick :text here"</code></pre></div>Additional colons in the text may well mess up the output so they should be escaped with a backslash :-<br><div class="codebox"><p>Code: </p><pre><code>putquick "PRIVMSG $nick :helper \:text here"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Tue Jan 05, 2010 3:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BhasIRC]]></name></author>
		<updated>2010-01-05T14:59:07-04:00</updated>

		<published>2010-01-05T14:59:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91588#p91588</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91588#p91588"/>
		<title type="html"><![CDATA[what am i doing wrong here guys]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91588#p91588"><![CDATA[
i made this and i am realy new to tcl anyways it does not seem to be working can you guys please help me with this<div class="codebox"><p>Code: </p><pre><code>#Command Bindingsbind pub - "*how*register*channel*" pub:registerchannelbind pub - "*how*register*nick*" pub:registernickbind pub - "*how*autovoice*" pub:autovoice#The Commands helpproc pub:registerchannel {nick uh hand chan args} {  putquick "PRIVMSG $nick \00314Auto Helper: To Register a Channel, you need to join a channel get @ status then typ (/msg chanserv register #channel-name password description) expl (/msg chanserv register #help helpers fun)"  return 1}proc pub:registernick {nick uh hand chan args} {  putquick "PRIVMSG $nick \00314Auto Helper: To Register your nick typ /msg nickserv register password email expl /msg nickserv register 12345 lovers@gmail.com"  return 1}proc pub:autovoice {nick uh hand chan args} {  putquick "PRIVMSG $nick \00314Auto Helper: To set a channel on auto voice typ /msg chanserv levels #channel-name set autovoice 0 expl /msg chanserv levels #help set autovoice 0"  return 1}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11039">BhasIRC</a> — Tue Jan 05, 2010 2:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
