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

	<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>2005-09-30T05:17:58-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-09-30T05:17:58-04:00</updated>

		<published>2005-09-30T05:17:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56220#p56220</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56220#p56220"/>
		<title type="html"><![CDATA[How do I get this to accept msged commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56220#p56220"><![CDATA[
ah sorry, just saw the binds are there, they will just only be activated if the the script has been enabled @_o.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Fri Sep 30, 2005 5:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amarth]]></name></author>
		<updated>2005-09-29T23:05:59-04:00</updated>

		<published>2005-09-29T23:05:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56212#p56212</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56212#p56212"/>
		<title type="html"><![CDATA[How do I get this to accept msged commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56212#p56212"><![CDATA[
Excellent, thanks heaps for your help! Funny how a simple thing can be the most annoying to work out!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6783">Amarth</a> — Thu Sep 29, 2005 11:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-09-29T12:58:38-04:00</updated>

		<published>2005-09-29T12:58:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56193#p56193</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56193#p56193"/>
		<title type="html"><![CDATA[Re: How do I get this to accept msged commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56193#p56193"><![CDATA[
<blockquote class="uncited"><div>2.<br>in addition in join, rehash and getlist etc I know how to exclude it listing ops or particular users with flags, but I want it to also exclude nicks that have {} in them or are all in lower case. from being listed. How do I do that?</div></blockquote>okay, the easy one first:<br><em class="text-italics">[string match {*[{}]*} $nick]</em> will return 1 if the nick contains braces<br><em class="text-italics">[string is lower $ick]</em> will return 1 if the nick only contains lowercase characters, but will be 0 if it contains any non alphabetical characters, so you might want this one:<br><em class="text-italics">[string match {*[A-Z]*} $nick]</em> will return 1 if the nick contains any uppercase character<br>just put them the conditions before you add them in a logical expression <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<br><blockquote class="uncited"><div>1.<br>Okay I have tried to get it to accept pm's for the commands, primarily the ones I need are !list, !served &lt;nick&gt; and !getlist. But what I have tried just doesn't seem to work. My tcl knowledge is mainly based on modifying existing scripts, so how do I get it to do this!</div></blockquote>It seems you deleted the "bind" commands to link the procs with the outworld. Please remeber to remove "chan" from the argument list and check the proc if it doesnt require $chan, if you move a proc from pub to msg bind.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Sep 29, 2005 12:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amarth]]></name></author>
		<updated>2005-09-29T09:19:11-04:00</updated>

		<published>2005-09-29T09:19:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56189#p56189</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56189#p56189"/>
		<title type="html"><![CDATA[How do I get this to accept msged commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56189#p56189"><![CDATA[
Hi All,<br><br>The following script is largely the next.tcl v2.0 written by mortician. I have removed all the stuff I don't need and rewritten stuff in it to get it to work how I need it to. What the script does is records nicks on join, and then enables helpers to help each person, removing them off the list, so marking them served.<br><br>1.<br>Okay I have tried to get it to accept pm's for the commands, primarily the ones I need are !list, !served &lt;nick&gt; and !getlist. But what I have tried just doesn't seem to work. My tcl knowledge is mainly based on modifying existing scripts, so how do I get it to do this!<br><br>2.<br>in addition in join, rehash and getlist etc I know how to exclude it listing ops or particular users with flags, but I want it to also exclude nicks that have {} in them or are all in lower case. from being listed. How do I do that?<br><br>The script works, only with public commands. Here is the script:<br><div class="codebox"><p>Code: </p><pre><code># --------------------------------------------------------------------##              ______________________________________#             |                                      |#             | served v1.0 by Amarth                |#             | email: aramarth@hotmail.com          |#             |                                      |#             | original script next v2.0            |#             |   by mortician                       |#             | IRC:   irc.undernet.org - #mortician |#             | email: mortician@linux.be            |#             | www:   www.mortician.tk              |#             |______________________________________|### --------------------------------------------------------------------# Commands# --------------------------------------------------------------------# Public Commands:#   --&gt; /msg &lt;botnick&gt; verify &lt;nick/handle&gt;# Trainee Commands:#   --&gt; /msg &lt;botnick&gt; auth &lt;pass&gt;#   --&gt; /msg &lt;botnick&gt; deauth# Regular Helper Commands:#   --&gt; !list              = notices you the list#   --&gt; !done              = notices you the list#   --&gt; !served &lt;nick&gt;     = remove &lt;nick&gt; from the list#   --&gt; !put &lt;nick&gt;        = puts &lt;nick&gt; into the list#   --&gt; !getlist           = rebuild the list#   --&gt; /msg &lt;botnick&gt; add &lt;nick&gt; &lt;option&gt;#   --&gt; /msg &lt;botnick&gt; del &lt;nick&gt;#             = removes &lt;nick&gt; from the bots userlist## --------------------------------------------------------------------# History# --------------------------------------------------------------------# September 2005 v1.0 - created from the original script next.tcl v2.0#                       by mortician## --------------------------------------------------------------------# VARIABLES# you have to change these# --------------------------------------------------------------------# The channel you will use this:set next(chan) "#channelname"# the char that marks public commands (!next, etc...)set next(char) "!"# automatic rebuild the offer list# users on the channel after a rehash? (1/0)set next(rehash) "1"# --------------------------------------------------------------------# OTHER VARIABLES# Don't cross this line unless you feel prepared to code# --------------------------------------------------------------------set next(list) {}set next(chan) [string tolower $next(chan)]set next(num2name) "none helper {helper2} {helper3} helper4 Owner"# --------------------------------------------------------------------# auth/deauth ... based on multi 3.3 by OUTsider# --------------------------------------------------------------------bind msg - auth next.msg:authbind msg - deauth next.msg:deauthproc next.msg:auth {nick uhost hand rest} {  global botnick  set pw [lindex $rest 0]  set op [lindex $rest 1]  if {$pw == ""} {  putnotc $nick "Usage: /msg $botnick auth &lt;password&gt; \[recover\]"  return 0 }  if {[matchattr $hand Q]} {  if {[string tolower $op] == "recover"} {  if {[passwdok $hand $pw]} {  setuser $hand XTRA SECNICK $nick  setuser $hand XTRA SECHOST $uhost  putnotc $nick "New Identity confirmed. Recover Successful" }  if {![passwdok $hand $pw]} {  putnotc $nick "Wrong password. Recover failed !"  return 0 }  return 0 }  putnotc $nick "You are already Authenticated."  putnotc $nick "Nick: [getuser $hand XTRA SECNICK]"  putnotc $nick "Host: [getuser $hand XTRA SECHOST]"  putnotc $nick "Try to login with /msg $botnick auth &lt;pass&gt; recover"  return 0 }  if {[passwdok $hand $pw] == 1} {  chattr $hand +Q  putnotc $nick "Authentication successful!"  setuser $hand XTRA SECNICK $nick  setuser $hand XTRA SECHOST $uhost }  if {[passwdok $hand $pw] == 0} {  putnotc $nick "Authentication failed!" }}proc next.msg:deauth {nick uhost hand rest} {  if {[getuser $hand XTRA SECNICK] == $nick} {  chattr $hand -Q  setuser $hand XTRA SECNICK $nick  setuser $hand XTRA SECHOST $nick  putnotc $nick "DeAuthentication successful!" }}# --------------------------------------------------------------------# procs# --------------------------------------------------------------------proc next.check:authed {nick host hand} {  global botnick  if {![matchattr $hand +Q]} {  putnotc $nick "You are not authenticated."  putnotc $nick "Please do so with /msg $botnick auth &lt;password&gt;."  return 0}  if {[getuser $hand XTRA SECNICK] != $nick} {  putnotc $nick "Sorry. But I think I missed one of your nickchanges"  return 0}  if {[getuser $hand XTRA SECHOST] != $host} {  putnotc $nick "Sorry. But you don't have the correct host right now."  return 0}  return 1}proc next.addflags {handle level} {  global next  switch $level {  4 { chattr $handle +h|+fvJ $next(chan); return 1 }  3 { chattr $handle +h|+fvM $next(chan); return 1 }  2 { chattr $handle +h|+fvL $next(chan); return 1 }  1 { chattr $handle +h|+fgvK $next(chan); return 1 }  }}proc next.getlevel {handle} {  global next  if {[matchattr $handle n|n $next(chan)]} { return 5  } elseif {[matchattr $handle J|J $next(chan)]} { return 4  } elseif {[matchattr $handle M|M $next(chan)]} { return 3  } elseif {[matchattr $handle L|L $next(chan)]} { return 2  } elseif {[matchattr $handle K|K $next(chan)]} { return 1  } else { return 0 }}# --------------------------------------------------------------------# mode handlers# --------------------------------------------------------------------#### join / rejoinproc next.add {nick uhost handle chan} {global botnick nextif {$nick == $botnick | $nick == "Warrior" || [string tolower $chan] != $next(chan) || [matchattr $handle g|g $next(chan)] || [matchattr $handle K|K $next(chan)]} { return }lappend next(list) $nickset num [lsearch -exact $next(list) $nick]incr num}#### part &amp; signproc next.purge {nick uhost handle chan msg} {global botnick nextif {$nick == $botnick || $nick == "Warrior" || [string tolower $chan] != $next(chan) || [matchattr $handle g|g $next(chan)] || [matchattr $handle K|K $next(chan)]} { return }set index [lsearch -exact $next(list) $nick]if {$index &gt;= 0} {set next(list) [lreplace $next(list) $index $index ]} else { return }}#### nickproc next.replace {nick uhost handle chan newnick} {global botnick nextif {$nick == $botnick || $nick == "Warrior" || [string tolower $chan] != $next(chan) || [matchattr $handle g|g $next(chan)] || [matchattr $handle K|K $next(chan)]} { return }set index [lsearch -exact $next(list) $nick]if {$index &gt;= 0} {set next(list) [lreplace $next(list) $index $index $newnick]} else { return }}#### splitproc next.splt {nick uhost handle chan} { global botnick nextif {$nick == $botnick || $nick == "Warrior" || [string tolower $chan] != $next(chan) || [matchattr $handle g|g $next(chan)] || [matchattr $handle K|K $next(chan)]} { return }set index [lsearch -exact $next(list) $nick]set next(list) [lreplace $next(list) $index $index ]}#### rehashproc next.rehash {type} {global botnick nextif {$next(rehash) &amp;&amp; [botonchan $next(chan)]} {set llength [llength $next(list)]foreach user [chanlist $next(chan)] {if {![isvoice $user $next(chan)] &amp;&amp; [onchan $user $next(chan)] &amp;&amp; $user != $botnick &amp;&amp; $user != "Warrior" &amp;&amp; ![matchattr [nick2hand $user $next(chan)] K $next(chan)] &amp;&amp; ![matchattr [nick2hand $user $next(chan)] g $next(chan)]} {set index [lsearch -exact $next(list) [lindex $user 0]]if {$index &lt; 0} {set next(list) [linsert $next(list) $llength $user ]}}}}}# --------------------------------------------------------------------# Regular command handlers# --------------------------------------------------------------------#### listproc next.pub:list {nick uhost handle chan arg} {global nextif {[string tolower $chan] != $next(chan)} { return 0 }if {[next.getlevel $handle] &gt;= 1} {if {$next(list) == ""} { putserv "NOTICE $nick :there are no Free requiring service."return }putserv "NOTICE $nick :The following are waiting to be offered, type \002!served &lt;nick&gt;\002 once you have offered: $next(list)"; return} else { return 0 }}#### putproc next.pub:put {nick uhost handle chan arg} {global botnick nextif {[string tolower $chan] != $next(chan)} { return 0 }if {[next.getlevel $handle] &gt;= 1} {if {[lindex [split $arg] 0] == ""} {putserv "NOTICE $nick :usage: .put &lt;nick&gt;"return }if {[lindex [split $arg] 0] == $botnick} {putserv "NOTICE $nick :this girl does not understand you?"return }if {[onchan [lindex [split $arg] 0] $next(chan)]} {lappend next(list) [lrange $arg 0 end]putserv "NOTICE $nick :[lindex [split $arg] 0] has been added to the offer list."return }putserv "NOTICE $nick :[lindex [split $arg] 0] isn't in $next(chan)"return} else { return }}#### servedproc next.pub:served {nick uhost handle chan arg} {global botnick nextif {[string tolower $chan] != $next(chan)} { return 0 }if {[next.getlevel $handle] &gt;= 1} {if {[lindex [split $arg] 0] == ""} {putserv "NOTICE $nick :\002Usage:\002 served &lt;nick&gt;"return}if {[lindex [split $arg] 0] == $botnick} {putserv "NOTICE $nick :this girl does not understand you?"return}set index [lsearch -exact $next(list) [lindex [split $arg] 0]]; set next(list) [lreplace $next(list) $index $index ]putserv "NOTICE $nick :[lindex [split $arg] 0] has been removed from the offer list."return} else { return }}# --------------------------------------------------------------------# Channel Op command handlers# --------------------------------------------------------------------bind pub - ${next(char)}op next.pub:op#### getlistproc next.pub:getlist {nick uhost handle chan arg} {global botnick nextif {[string tolower $chan] != $next(chan)} { return 0 }if {[next.getlevel $handle] &gt;= 2} {set llength [llength $next(list)]foreach user [chanlist $chan] {if {![isvoice $user $chan] &amp;&amp; [onchan $user $chan] &amp;&amp; $user != $botnick &amp;&amp; $user != "Warrior" &amp;&amp; ![matchattr [nick2hand $nick $chan] K] &amp;&amp; ![matchattr [nick2hand $nick $chan] g]} {set index [lsearch -exact $next(list) [lindex $user 0]]if {$index &lt; 0} {set next(list) [linsert $next(list) $llength $user ]}}}if {$next(list) == ""} { putserv "NOTICE $nick :No Free to be added. Offer list is empty"} else {putserv "NOTICE $nick :\002offer list completed\002. ( $next(list) )"}return} else { return }}# --------------------------------------------------------------------# Admin command handlers# --------------------------------------------------------------------bind msg m|m add next.msg:addbind msg m|m del next.msg:del#### addproc next.msg:add {nick uhost handle arg} {global next botnickif {![next.check:authed $nick $uhost $handle]} { return 0 }set who [lindex [split $arg] 0]set lvl [lindex [split $arg] 1]if {$who == "" || $lvl == ""} {putnotc $nick "Usage: /msg $botnick add &lt;nick&gt; &lt;level&gt;"; return 0}if {![onchan $who $next(chan)]} { putnotc $nick "Sorry, but I can't find $who on $next(chan)"; return 0 }if {[nick2hand $who $next(chan)] != "" &amp;&amp; [nick2hand $who $next(chan)] != "*"} {  putnotc $nick "$who is already known in the bot as [nick2hand $who $next(chan)], level [lindex $next(num2name) [next.getlevel $who]]"  if {[next.getlevel $who] &lt; 4} {    if {$lvl == 4 || $lvl == 3 || $lvl == 2 || $lvl == 1} {      next.addflags $who $lvl      putnotc $nick "Added\002 $who \002as a\002 [lindex $next(num2name) $lvl] \002in $next(chan) to the bot."      putnotc $who "You have been added as a\002 [lindex $next(num2name) $lvl] \002in $next(chan) to the bot."      return 1    } else {      putnotc $nick "the option can be 1, 2, 3 or 4"      return 0    }  }}if {[validuser $who]} { putnotc $nick "I was unable to add $who to the userlist. There is already a user with that handle"; return 0}if {$lvl == 1 || $lvl == 2 || $lvl == 3 || $lvl == 4} {    set host "[maskhost $who![getchanhost $who $next(chan)]]"    adduser $who $host    putnotc $who "You have been added to the bot. Please set your pass: type /msg $botnick pass &lt;your_pass&gt;"    putnotc $who "To authenticate, type /msg $botnick auth &lt;password&gt;"    next.addflags $who $lvl    putnotc $nick "Added\002 $who \002as a\002 [lindex $next(num2name) $lvl] \002in $next(chan) to the bot."    return 1} else {    putnotc $nick "the option can be 1, 2, 3 or 4"    return 0}}#### delproc next.msg:del {nick uhost handle arg} {global next botnick  if {![next.check:authed $nick $uhost $handle]} { return 0 }  set who [lindex [split $arg] 0]  if {$who == ""} {putnotc $nick "Usage: /msg $botnick del &lt;nick&gt;"; return 0}  if {![onchan $who $next(chan)]} {putnotc $nick "Sorry. But I can't find\002 $who \002on $next(chan)"; return 0}  if {[nick2hand $who $next(chan)] == "" || [nick2hand $who $next(chan)] == "*"} {  putnotc $nick "Sorry. But I can't find\002 $who \002 in the userlist"  return 0 }  if {[next.getlevel [nick2hand $who $next(chan)]] &gt;= [next.getlevel [nick2hand $nick $next(chan)]]} {  putnotc $nick "Sorry. But you can't delete a user with an eqaul or higher level then yourself"  return 0 }  deluser [nick2hand $who $next(chan)]  putnotc $nick "Deleted\002 $who \002from the userlist"}proc next.status {arg} {global next  switch $arg {on {bind join - * next.addbind rejn - * next.addbind part - * next.purgebind sign - * next.purgebind nick - * next.replacebind splt - * next.spltbind mode - *+v* next.voicedbind mode - *+o* next.voicedbind evnt - rehash next.rehashbind pub - ${next(char)}helped next.pub:helpedbind pub - ${next(char)}done next.pub:listbind pub - ${next(char)}list next.pub:listbind pub - ${next(char)}served next.pub:servedbind pub - ${next(char)}put next.pub:putbind pub - ${next(char)}getlist next.pub:getlistreturn 1}off {catch { unbind join - * next.add }catch { unbind rejn - * next.add }catch { unbind part - * next.purge }catch { unbind sign - * next.purge }catch { unbind nick - * next.replace }catch { unbind splt - * next.splt }catch { unbind mode - *+v* next.voiced }catch { unbind mode - *+o* next.voiced }catch { unbind evnt - rehash next.rehash }catch { unbind pub - ${next(char)}helped next.pub:helped }catch { unbind pub - ${next(char)}done next.pub:list }catch { unbind pub - ${next(char)}list next.pub:list }catch { unbind pub - ${next(char)}served next.pub:served }catch { unbind pub - ${next(char)}put next.pub:put }catch { unbind pub - ${next(char)}getlist next.pub:getlist }return 1}  }}# --------------------------------------------------------------------# the end# --------------------------------------------------------------------next.status onputlog ".served $next(version) by Amarth modified from a script by mortician loaded ..." </code></pre></div>I'd really appreciate any help that anyone could give Me!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6783">Amarth</a> — Thu Sep 29, 2005 9:19 am</p><hr />
]]></content>
	</entry>
	</feed>
