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

	<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>2007-06-10T21:06:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-06-10T21:06:36-04:00</updated>

		<published>2007-06-10T21:06:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73405#p73405</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73405#p73405"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73405#p73405"><![CDATA[
<blockquote class="uncited"><div>Skip the string-match completely, and just test wether deleting the host works or not?</div></blockquote>Thank you <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> ..it works but it was not necessary to remove the string-match...I`ve replaced the <br><div class="codebox"><p>Code: </p><pre><code>{![string match -nocase $dhost $dhuser]} {</code></pre></div>with your suggestion ..<br><div class="codebox"><p>Code: </p><pre><code>{![delhost $dhuser $dhost]} { </code></pre></div>and the scripts works perfectly  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> <br><blockquote class="uncited"><div>&lt;me&gt; .delhost<br>-|EGG- SYNTAX: <strong class="text-strong">.delhost &lt;user&gt; &lt;*!*@host&gt;</strong><br>&lt;me&gt; .delhost lol<br>-|EGG- Error <strong class="text-strong">lol</strong> is not a valid user. Check <strong class="text-strong">.userlist </strong><br>&lt;me&gt; .delhost test 34893948<br>-|EGG- Error <strong class="text-strong">34893948</strong> is not a valid host.<br>&lt;me&gt; .delhost test *!*@domain.name<br>-|EGG- Error <strong class="text-strong">*!*@domain.name</strong> was not added to <strong class="text-strong">test</strong>.<br>&lt;me&gt; .delhost test *!*@test.ro<br>-|EGG- Deleted host <strong class="text-strong">*!*@test.ro</strong> from user <strong class="text-strong">test</strong></div></blockquote> <br><br>Thanks again for the help nml375 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Sun Jun 10, 2007 9:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-06-10T19:30:16-04:00</updated>

		<published>2007-06-10T19:30:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73401#p73401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73401#p73401"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73401#p73401"><![CDATA[
Skip the string-match completely, and just test wether deleting the host works or not?<br><div class="codebox"><p>Code: </p><pre><code>proc s:delhost {nick uhost hand chan text} { global botnick dj if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {  set dhuser [lindex [split $text] 0]  set dhost [lindex [split $text] 1]  if {$dhuser == ""} {   puthelp "NOTICE $nick :SYNTAX:\002 .delhost &lt;user&gt; &lt;*!*@host&gt;\002"  } elseif {![validuser $dhuser]} {   puthelp "NOTICE $nick :Error\002 $dhuser \002is not a valid user. Check\002 .userlist \002"  } elseif {![delhost $dhuser $dhost]} {   puthelp "NOTICE $nick :Error\002 $dhost \002was not added to $dhuser."  } else {   puthelp "NOTICE $nick :Deleted host\002 $dhost \002from user\002 $dhuser \002"  } }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Jun 10, 2007 7:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-06-10T18:40:29-04:00</updated>

		<published>2007-06-10T18:40:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73399#p73399</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73399#p73399"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73399#p73399"><![CDATA[
<blockquote class="uncited"><div>Easiest, I'd guess, would just to use delhost, and test the returncode to see wether the hostmask was successfully removed...<blockquote class="uncited"><div>  delhost &lt;handle&gt; &lt;hostmask&gt;<br>    Description: deletes a hostmask from a user's host list<br>    Returns: 1 on success; 0 if the hostmask (or user) doesn't exist<br>    Module: core</div></blockquote></div></blockquote>Well I`ve tried that also and still not the results I want....<br><br>The new code <br><div class="codebox"><p>Code: </p><pre><code>proc s:delhost {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set dhuser [lindex [split $text] 0]     set dhost [lindex [split $text] 1]     if {$dhuser == ""} {     puthelp "NOTICE $nick :SYNTAX:\002 .delhost &lt;user&gt; &lt;*!*@host&gt;\002"     } elseif {![validuser $dhuser]} {     puthelp "NOTICE $nick :Error\002 $dhuser \002is not a valid user. Check\002 .userlist \002"     } elseif {![string match -nocase *!*@* $dhost]} {     puthelp "NOTICE $nick :Error\002 $dhost \002is not a valid host."     } else {     delhost $dhuser $dhost     puthelp "NOTICE $nick :Deleted host\002 $dhost \002from user\002 $dhuser \002"     return 0 }     puthelp "NOTICE $nick :Error\002 $dhost \002is not added as host for user\002 $dhuser \002"     }}</code></pre></div>a nother suggestion/ideea  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_idea.gif" width="15" height="15" alt=":idea:" title="Idea"> ? pls <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Sun Jun 10, 2007 6:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-06-07T16:49:57-04:00</updated>

		<published>2007-06-07T16:49:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73336#p73336</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73336#p73336"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73336#p73336"><![CDATA[
Well, this piece confuses me:<div class="codebox"><p>Code: </p><pre><code>string match -nocase $dhost $dhuser</code></pre></div>You're only checking wether the the two parameters you've entered "match" eachother. It does no test whatsoever if the hostmask entered on the commandline is added to the user record.<br>Easiest, I'd guess, would just to use delhost, and test the returncode to see wether the hostmask was successfully removed...<blockquote class="uncited"><div>  delhost &lt;handle&gt; &lt;hostmask&gt;<br>    Description: deletes a hostmask from a user's host list<br>    Returns: 1 on success; 0 if the hostmask (or user) doesn't exist<br>    Module: core</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Jun 07, 2007 4:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-06-07T16:44:06-04:00</updated>

		<published>2007-06-07T16:44:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73334#p73334</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73334#p73334"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73334#p73334"><![CDATA[
I`ve neglected something to ask you and everyone else... I`ve gone forth with a nother set of commands, and at the .delhost command I get a little error <br><br>Code: <div class="codebox"><p>Code: </p><pre><code>proc s:delhost {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set dhuser [lindex [split $text] 0]     set dhost [lindex [split $text] 1]     if {$dhuser == ""} {     puthelp "NOTICE $nick :SYNTAX:\002 .delhost &lt;user&gt; &lt;*!*@host&gt;\002"     } elseif {![validuser $dhuser]} {     puthelp "NOTICE $nick :Error\002 $dhuser \002is not a valid user. Check\002 .userlist \002"     } elseif {![string match -nocase *!*@* $dhost]} {     puthelp "NOTICE $nick :Error\002 $dhost \002is not a valid host."     } elseif {![string match -nocase $dhost $dhuser]} {     puthelp "NOTICE $nick :Error\002 $dhost \002is not added as host for user\002 $dhuser \002"     } else {     delhost $dhuser $dhost     puthelp "NOTICE $nick :Deleted host\002 $dhost \002from user\002 $dhuser \002"    }  }}</code></pre></div>and the Error: <br><blockquote class="uncited"><div>&lt;me&gt; .delhost<br>-|EGG- SYNTAX: <strong class="text-strong">.delhost &lt;user&gt; &lt;*!*@host&gt;</strong><br>&lt;me&gt; .delhost lol<br>-|EGG- Error <strong class="text-strong">lol</strong> is not a valid user. Check <strong class="text-strong">.userlist </strong><br>&lt;me&gt; .delhost user1 34787<br>-|EGG- Error <strong class="text-strong">34787</strong> is not a valid host.<br>&lt;me&gt; .delhost user1 *!*@1.1.1.1<br>-|EGG- Error <strong class="text-strong">*!*@1.1.1.1</strong> is not added as host for user <strong class="text-strong">user1</strong><br>&lt;me&gt; .delhost user1 *!*@user1.users.undernet.org<br>-|EGG- Error <strong class="text-strong">*!*@user1.users.undernet.org</strong> is not added as host for user <strong class="text-strong">user1</strong></div></blockquote> <br><br><br>The host <em class="text-italics">*!*@1.1.1.1</em> dosen`t exists... but the host <em class="text-italics">*!*@user1.users.undernet.org</em> exists, it`s the default one... and the bot reply's that it dosen`t ..  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation"> <br><br>This is the way it should answer:<br><blockquote class="uncited"><div>&lt;me&gt; .delhost<br>-|EGG- SYNTAX: <strong class="text-strong">.delhost &lt;user&gt; &lt;*!*@host&gt;</strong><br>&lt;me&gt; .delhost lol<br>-|EGG- Error <strong class="text-strong">lol</strong> is not a valid user. Check <strong class="text-strong">.userlist </strong><br>&lt;me&gt; .delhost user1 34787<br>-|EGG- Error <strong class="text-strong">34787</strong> is not a valid host.<br>&lt;me&gt; .delhost user1 *!*@1.1.1.1<br>-|EGG- Error <strong class="text-strong">*!*@1.1.1.1</strong> is not added as host for user <strong class="text-strong">user1</strong><br>&lt;me&gt; .delhost user1 *!*@user1.users.undernet.org<br>-|EGG- Deleted host <strong class="text-strong">*!*@user1.users.undernet.org</strong> from user <strong class="text-strong">user1</strong></div></blockquote> <br><br>any suggestion/hints ?! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Thu Jun 07, 2007 4:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-06-07T14:36:06-04:00</updated>

		<published>2007-06-07T14:36:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73321#p73321</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73321#p73321"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73321#p73321"><![CDATA[
Huh, nml375 your one in a million <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> the syntax code was<div class="codebox"><p>Code: </p><pre><code>set allu [lindex [userlist -|MASDTOV $chan]]</code></pre></div>Thank you <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">...  cheers again mate  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Thu Jun 07, 2007 2:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-06-06T18:39:06-04:00</updated>

		<published>2007-06-06T18:39:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73314#p73314</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73314#p73314"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73314#p73314"><![CDATA[
Check the <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/join.htm" class="postlink">join</a>-command to see how to easily convert a list of items (such as handles) into a string..<br>And skip the foreach-loop :p<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Jun 06, 2007 6:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-06-06T18:24:51-04:00</updated>

		<published>2007-06-06T18:24:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73313#p73313</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73313#p73313"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73313#p73313"><![CDATA[
That`s it nml375 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> it works, at last it works... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> cheers mate<br>Now all I need to add is a .userlist command to show the users on the bot ...<br><br>I`ve try to code something....<br><div class="codebox"><p>Code: </p><pre><code>proc s:userlist {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set listu [lindex [split $text] 0]     if {$listu == ""} {     puthelp "NOTICE $nick :SYNTAX:\002 .userlist all|voice|op|test|dj|senior|admin|manager|suspend|none|bot \002"     } elseif {$listu == "all"} {     foreach allu [userlist -|MASDTOV $chan] {     puthelp "NOTICE $nick :All Users on $chan:\002 $allu \002" }    }  }}</code></pre></div>it works, but not like I desire...when I type <em class="text-italics">.userlist all</em>, the reply is :<br><blockquote class="uncited"><div>&lt;me&gt; .userlist<br>-|EGG- SYNTAX: <strong class="text-strong">.userlist all|voice|op|test|dj|senior|admin|manager|suspend|none|bot </strong><br>&lt;me&gt; .userlist all<br>-|EGG- All Users on #channel: <strong class="text-strong">user1</strong> <br>-|EGG- All Users on #channel: <strong class="text-strong">user2</strong> <br>-|EGG- All Users on #channel: <strong class="text-strong">user3</strong> <br>-|EGG- All Users on #channel: <strong class="text-strong">user4</strong> <br>etc...</div></blockquote>....I`ve like to show the list like this :<br><blockquote class="uncited"><div>&lt;me&gt; .userlist<br>-|EGG- SYNTAX: <strong class="text-strong">.userlist all|voice|op|test|dj|senior|admin|manager|suspend|none|bot </strong><br>&lt;me&gt; .userlist all<br>-|EGG- All Users on #channel: <strong class="text-strong">user1 user2 user3 user4</strong> etc...</div></blockquote>It save's the time and I don`t get flooded by the but, or the but can go offline with the "Excess Flood" reason ...<br><br>.... a little hint  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Wed Jun 06, 2007 6:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-06-06T14:52:53-04:00</updated>

		<published>2007-06-06T14:52:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73306#p73306</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73306#p73306"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73306#p73306"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc s:deluser {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set username [lindex [split $text] 0]     if {$username == ""} {       puthelp "NOTICE $nick :SYNTAX:\002 .deluser &lt;user&gt; \002"     } elseif {[validuser $username]} {       # The username was valid, do some stuff here...       puthelp "NOTICE $nick :User \002$username\002 doesn't exist! User\002 .userlist \002"     } {      # The username was not valid, do some other stuff here...      deluser $username      puthelp "NOTICE $nick :User \002$username\002 has been deleted."    }  }} </code></pre></div>Think added comments should shed some light on the typo/bug..<br>Same thing goes with "chuser".<br><br>Hint, to negate an expression (turn true into false, and false into true; use ! )<br>Ie: if {!$true} {...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Jun 06, 2007 2:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-06-06T14:37:09-04:00</updated>

		<published>2007-06-06T14:37:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73305#p73305</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73305#p73305"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73305#p73305"><![CDATA[
ok, so, this is the code ..<br><div class="codebox"><p>Code: </p><pre><code># Set here levels for accessesset dj(l1) "Voice Access"set dj(l2) "OP Access"set dj(l3) "Test DJ Access"set dj(l4) "DJ Access"set dj(l5) "Senior DJ Access"set dj(l6) "Administrator Access"set dj(l7) "Manager Access"bind pub n|MAS .adduser s:adduserbind pub n|MAS .addacc s:addaccbind pub n|MAS .delacc s:delaccbind pub n|MAS .deluser s:deluserbind pub n|MAS .chuser s:chusersetudef flag djtoolsproc s:adduser {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set username [lindex [split $text] 0]     if {$username == ""} {     puthelp "NOTICE $nick :SYNTAX:\002 .adduser &lt;Xuser&gt; \002"     } elseif {[validuser $username]} {     puthelp "NOTICE $nick :User \002$username\002 is already added. Add another!"     } {     adduser $username *!*@$username.users.undernet.org     puthelp "NOTICE $nick :Added new user \002$username\002 with host \002*!*@$username.users.undernet.org\002"    }  }}proc s:addacc {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set auseracc [lindex [split $text] 0]     set uhand [lindex [split $text] 1]     if {$auseracc == ""} {     puthelp "NOTICE $nick :SYNTAX: .addacc &lt;voice|op|test|dj|senior|admin|manager&gt; &lt;user&gt;"     } elseif {$auseracc == "voice"} {     chattr $uhand -|-VOTDSAM $chan     chattr $uhand -|+loV $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l1) on $chan"     } elseif {$auseracc == "op"} {     chattr $uhand -|-VOTDSAM $chan     chattr $uhand -|+loO $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l2) on $chan"     } elseif {$auseracc == "test"} {     chattr $uhand -|-VOTDSAM $chan     chattr $uhand -|+loT $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l3) on $chan"     } elseif {$auseracc == "dj"} {     chattr $uhand -|-VOTDSAM $chan     chattr $uhand -|+loD $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l4) on $chan"     } elseif {$auseracc == "senior"} {     chattr $uhand -|-VOTDSAM $chan     chattr $uhand -|+loS $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l5) on $chan"     } elseif {$auseracc == "admin"} {     chattr $uhand -|-VOTDSAM $chan     chattr $uhand -|+loA $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l6) on $chan"     } elseif {$auseracc == "manager"} {     chattr $uhand -|-VOTDSAM $chan     chattr $uhand -|+loM $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l7) on $chan"     }   }}proc s:delacc {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set duseracc [lindex [split $text] 0]     if {$duseracc == ""} {     puthelp "NOTICE $nick :SYNTAX: .delacc &lt;user&gt;"     } else {     chattr $duseracc -|-VOTDSAM $chan     chattr $duseracc -|+lo $chan     puthelp "NOTICE $nick :Deleted access for\002 $duseracc \002on $chan"    }  }}proc s:deluser {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set username [lindex [split $text] 0]     if {$username == ""} {     puthelp "NOTICE $nick :SYNTAX:\002 .deluser &lt;user&gt; \002"     } elseif {[validuser $username]} {     puthelp "NOTICE $nick :User \002$username\002 doesn't exist! User\002 .userlist \002"     } {     deluser $username     puthelp "NOTICE $nick :User \002$username\002 has been deleted."    }  }}proc s:chuser {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set username [lindex [split $text] 0]     if {$username == ""} {     puthelp "NOTICE $nick :SYNTAX:\002 .chuser &lt;olduser&gt; &lt;newuser&gt; \002"     } elseif {[validuser $username]} {     puthelp "NOTICE $nick :Error,\002 $username \002is not a valid user. Use:\002 .userlist \002"     } {     set n1 [lindex $text 0]     set n2 [lindex $text 1]     chhandle $n1 $n2     puthelp "NOTICE $nick :Successfully changed\002 $n1 \002username to\002 $n2 \002"    }  }}putlog "Loaded: usermrg.tcl"</code></pre></div>I`ve tested it, and here are the results:<br><br>.adduser = working great ( thanks to Sir_Fz's help  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> )<br>.addacc = working ( thanks to nml375 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> )<br>.delacc = working ( thanks to nml375 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> )<br>.deluser = error -&gt;<br><blockquote class="uncited"><div>&lt;me&gt; .deluser<br>-|EGG- SYNTAX: <strong class="text-strong">.deluser &lt;user&gt; </strong><br>&lt;me&gt; .deluser t3st3<br>-|EGG- User <strong class="text-strong">t3st3</strong> doesn't exist! User <strong class="text-strong">.userlist </strong><br>&lt;me&gt; .deluser lol<br>-|EGG- User <strong class="text-strong">lol</strong> has been deleted.</div></blockquote> <br><br>user "t3st3" exists... but it says that it dosen't !  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question"> <br><br>user "lol" dosen't exist ....but the bot deleted it ( How can you delete nothing  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question"> ) ...<br><br>.chuser = error -&gt;<br><br>approximately the same type of error as the .deluser command <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_arrow.gif" width="15" height="15" alt=":arrow:" title="Arrow"> <br><blockquote class="uncited"><div>&lt;me&gt; .chuser<br>-|EGG SYNTAX: <strong class="text-strong">.chuser &lt;olduser&gt; &lt;newuser&gt;</strong> <br>&lt;me&gt; .chuser t3st3 test1<br>-|EGG- Error, <strong class="text-strong">t3st3</strong> is not a valid user. Use: <strong class="text-strong">.userlist</strong> <br>&lt;me&gt; .chuser lol test1<br>-|EGG- Successfully changed <strong class="text-strong">lol</strong> username to <strong class="text-strong">test1</strong> </div></blockquote>user "t3st3" exists... but it says that it's not a valid one...  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"> <br><br>user "lol" dosen't exist ....but the bot say's that it successfully changed him ....  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"> <br><br>...uofff ...my head aches ....  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mad.gif" width="15" height="15" alt=":x" title="Mad">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mad.gif" width="15" height="15" alt=":x" title="Mad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Wed Jun 06, 2007 2:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-06-06T14:10:16-04:00</updated>

		<published>2007-06-06T14:10:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73304#p73304</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73304#p73304"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73304#p73304"><![CDATA[
Hence a hint <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=8052">nml375</a> — Wed Jun 06, 2007 2:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-06-06T14:03:12-04:00</updated>

		<published>2007-06-06T14:03:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73303#p73303</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73303#p73303"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73303#p73303"><![CDATA[
<blockquote class="uncited"><div>(...) Also, I really don't see why you modify the flags for a single handle multiple times. Especially in the cases where you first remove a flag just to add it right back again...</div></blockquote>Ok, thanks for the hint, I`ll include them and see if it works <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><blockquote class="uncited"><div>A hint while we're at it, when you build large blocks of if-ifelse-ifelse..., you might considder using <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/switch.htm" class="postlink">switch</a> instead. Yields cleaner code and slightly faster execution.</div></blockquote>.... easy for you to say, but hard to do ( for me  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"> )... because I`m not a excellent coder...I`m new in public commands, and I`m still learning <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Wed Jun 06, 2007 2:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-06-06T13:47:40-04:00</updated>

		<published>2007-06-06T13:47:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73302#p73302</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73302#p73302"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73302#p73302"><![CDATA[
<blockquote class="uncited"><div>  chattr &lt;handle&gt; [changes [channel]]<br>    Description: changes the attributes for a user record, if you include any.<br>      Changes are of the form '+f', '-o', '+dk', '-o+d', etc. If changes are<br>      specified in the format of |&lt;changes&gt; &lt;channel&gt;, the channel-specific<br>      flags for that channel are altered. You can now use the +o|-o #channel<br>      format here too.<br>    Returns: new flags for the user (if you made no changes, the current<br>      flags are returned). If a channel was specified, the global AND the<br>      channel-specific flags for that channel are returned in the format of<br>      globalflags|channelflags. "*" is returned if the specified user does<br>      not exist.<br>    Module: core</div></blockquote>To make changes channel-speciffic, you'll have to do something like this:<div class="codebox"><p>Code: </p><pre><code>chattr |+Tol-VODSAM $chanchattr |+Vol-TODSAM $chanetc</code></pre></div>Also, I really don't see why you modify the flags for a single handle multiple times. Especially in the cases where you first remove a flag just to add it right back again...<br><br>A hint while we're at it, when you build large blocks of if-ifelse-ifelse..., you might considder using <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/switch.htm" class="postlink">switch</a> instead. Yields cleaner code and slightly faster execution.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Jun 06, 2007 1:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-06-06T13:28:36-04:00</updated>

		<published>2007-06-06T13:28:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73301#p73301</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73301#p73301"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73301#p73301"><![CDATA[
<blockquote class="uncited"><div>I'd suggest something like this:<div class="codebox"><p>Code: </p><pre><code>chattr $hand "+olT-VODSAM"</code></pre></div>It will remove all but the desired flags of your userdefined ones, along with making sure ol is set aswell.<br><br>As for your problems with t3st, you do not trim any "extra" spaces or such, which could cause problems. That is, ".deluser t3st" would work, yet ".deluser t3st " would not. Could you confirm wether this might be the case?</div></blockquote>I understand nml375, so...I`ve changed a little of the tcl code....<br><div class="codebox"><p>Code: </p><pre><code># Set here levels for accessesset dj(l1) "Voice Access"set dj(l2) "OP Access"set dj(l3) "Test DJ Access"set dj(l4) "DJ Access"set dj(l5) "Senior DJ Access"set dj(l6) "Administrator Access"set dj(l7) "Manager Access"bind pub n|MAS .adduser s:adduserbind pub n|MAS .addacc s:addaccbind pub n|MAS .delacc s:delaccsetudef flag djtoolsproc s:adduser {nick uhost hand chan text} { global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set username [lindex [split $text] 0]     if {$username == ""} {     puthelp "NOTICE $nick :SYNTAX:\002 .adduser &lt;Xuser&gt; \002"     } elseif {[validuser $username]} {     puthelp "NOTICE $nick :User \002$username\002 is already added. Add another!"     } {     adduser $username *!*@$username.users.undernet.org     puthelp "NOTICE $nick :Added new user \002$username\002 with host \002*!*@$username.users.undernet.org\002"    }  }}proc s:addacc {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools] &amp;&amp; ![isbotnick $nick]} {     set auseracc [lindex [split $text] 0]     set uhand [lindex [split $text] 1]     if {$auseracc == ""} {     puthelp "NOTICE $nick :SYNTAX: .addacc &lt;voice|op|test|dj|senior|admin|manager&gt; &lt;user&gt;"     } elseif {$auseracc == "voice"} {     chattr $uhand -VODSAM $chan     chattr $uhand +loV $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l1) on $chan"     } elseif {$auseracc == "op"} {     chattr $uhand -VODSAM $chan     chattr $uhand +loO $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l2) on $chan"     } elseif {$auseracc == "test"} {     chattr $uhand -VODSAM $chan     chattr $uhand +loT $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l3) on $chan"     } elseif {$auseracc == "dj"} {     chattr $uhand -VODSAM $chan     chattr $uhand +loD $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l4) on $chan"     } elseif {$auseracc == "senior"} {     chattr $uhand -VODSAM $chan     chattr $uhand +loS $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l5) on $chan"     } elseif {$auseracc == "admin"} {     chattr $uhand -VODSAM $chan     chattr $uhand +loA $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l6) on $chan"     } elseif {$auseracc == "manager"} {     chattr $uhand -VODSAM $chan     chattr $uhand +loM $chan     puthelp "NOTICE $nick :User\002 $uhand \002added with $dj(l7) on $chan"     } else {     puthelp "NOTICE $nick :Error,\002 $uhand \002doesn't exists! Use:\002 .userlist \002"     }   }}proc s:delacc {nick uhost hand chan text} {  global botnick dj   if {[channel get $chan djtools]&amp;&amp; ![isbotnick $nick]} {     set duseracc [lindex [split $text] 0]     if {$duseracc == ""} {     puthelp "NOTICE $nick :SYNTAX: .delacc &lt;user&gt;"     } else {     chattr $duseracc -VODSAM $chan     chattr $duseracc +lo $chan     puthelp "NOTICE $nick :Deleted access for\002 $duseracc \002on $chan"    }  }}putlog "Loaded: usermrg.tcl"</code></pre></div>and now the commands work, but not as I want  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> ... instead of giveing that user the access on the channel ( <em class="text-italics">+lo</em> and one of the <em class="text-italics">V</em>, <em class="text-italics">O</em>, etc ).... it give's him global access...<br><blockquote class="uncited"><div>&lt;me&gt; .addacc<br>-|EGG- SYNTAX: .<strong class="text-strong">addacc &lt;voice|op|test|dj|senior|admin|manager&gt; &lt;user&gt;</strong> <br>----<br>&lt;me&gt; .addacc voice t3st3<br>-|EGG- User <strong class="text-strong">t3st3</strong> added with Voice Access on #channel<br>----</div></blockquote>and now the .whois looks like this<br><div class="codebox"><p>Code: </p><pre><code>.whois t3st3[18:40] #me# whois t3st3HANDLE       PASS NOTES FLAGS           LASTt3st3        no       0 hlopV          never (nowhere)     #channel           -             never  HOSTS: *!*@t3st3.users.undernet.org</code></pre></div>----<br><br>strange ....normaly this is the way that it shoud look like on the .whois command..<br><div class="codebox"><p>Code: </p><pre><code>.whois t3st3[18:40] #me# whois t3st3HANDLE       PASS NOTES FLAGS           LASTt3st3        no       0 hp          never (nowhere)     #channel           loV            never  HOSTS: *!*@t3st3.users.undernet.org</code></pre></div>... what shoud I do ?<br><br>P.S.: nml375, I`m still working on the .deluser and .chuser commands, after I will test them, I`ll include them in this script...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Wed Jun 06, 2007 1:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-06-06T11:18:53-04:00</updated>

		<published>2007-06-06T11:18:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73300#p73300</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73300#p73300"/>
		<title type="html"><![CDATA[[SOLVED] A little UserMRG.tcl script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73300#p73300"><![CDATA[
I'd suggest something like this:<div class="codebox"><p>Code: </p><pre><code>chattr $hand "+olT-VODSAM"</code></pre></div>It will remove all but the desired flags of your userdefined ones, along with making sure ol is set aswell.<br><br>As for your problems with t3st, you do not trim any "extra" spaces or such, which could cause problems. That is, ".deluser t3st" would work, yet ".deluser t3st " would not. Could you confirm wether this might be the case?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Jun 06, 2007 11:18 am</p><hr />
]]></content>
	</entry>
	</feed>
