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

	<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-01T18:57:09-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2010-01-01T18:57:09-04:00</updated>

		<published>2010-01-01T18:57:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91514#p91514</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91514#p91514"/>
		<title type="html"><![CDATA[A little help to modify script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91514#p91514"><![CDATA[
The problem in those procedures is that they're trying to remove a non-existing bind. For example in proc [whois:ircop] you'll find:<div class="codebox"><p>Code: </p><pre><code>unbind raw - 313 whois:server</code></pre></div>which is not bound (most probably what was meant is: <em class="text-italics">unbind raw - 313 whois:ircop</em> but that's just a guess).<br><br>Another unrecommended practice is applying string methods on lists. Look at<div class="codebox"><p>Code: </p><pre><code>set awayMessage [string range [lrange $arg 2 end] 1 end]</code></pre></div>[lrange] returns a list but [string] is supposed to be applied on strings and not lists. To fix this, it should be changed to:<div class="codebox"><p>Code: </p><pre><code>set awayMessage [string range [join [lrange [split $arg] 2 end]] 1 end]</code></pre></div>[join] returns a string from the elements of the list (there are more lines that need to be modified like this as well).<br><br>Edit: Oh, and you should use [split] on $arg before applying [lrange] on it since it's a string and supposed to be a list.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Jan 01, 2010 6:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2009-12-31T15:22:43-04:00</updated>

		<published>2009-12-31T15:22:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91499#p91499</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91499#p91499"/>
		<title type="html"><![CDATA[A little help to modify script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91499#p91499"><![CDATA[
Id like this changed from public commands to commands issued in bots private message<br><br>Also would like to get the nick is connecting from line added also to the whois proc<br><br>Theirs also some bindings that need taking out<br>&lt;ChanGuardian&gt; [19:15] Tcl error [whois:ircop]: no such binding<br>&lt;ChanGuardian&gt; [19:27] Tcl error [who:info]: no such binding<br>&lt;ChanGuardian&gt; [19:27] Tcl error [who:eof]: no such binding<br><br>if this isnt possible just a small script that will do a whois nickname and notice the details<br><br><div class="codebox"><p>Code: </p><pre><code># rsh-serverCmds.tcl - by rehash# Copyright (C) 2004, 2005 rehash.# All rights reserverd.##            _            _#    _ _ ___| |_  __ _ __| |_#   | '_/ -_) ' \/ _` (_-&lt; ' \#   |_| \___|_||_\__,_/__/_||_|#   rehash@relevant-undernet.org##  Contact: E-mail: rehash@relevant-undernet.org#  Web: www.relevant-undernet.org## 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 1, 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, write to the Free Software# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.######################################################################## Some CREDIT ################set whois(author) "rehash"set whois(version) "0.1"# Global Settings.# You cand set it like: "privmsg" if you want the bot to echo you the results in a separate# query window or "notice" for echo it via NOTICE command.set whois(echo) "notice"#################################################### Flags required for usage.                       ## - : anyone                                      ## o : +o flagged users                            ## m : bot masters..                               ## and so on see the EggDrops flags documentation. ## Default: "-".                                   ####################################################set whois(flags) "ho|ho"# Bindings.bind pub "$whois(flags)" "!whois" pub:whoisbind pub "$whois(flags)" "!whowas" pub:whowasbind pub "$whois(flags)" "!who" pub:whobind pub "$whois(flags)" "!version" pub:versionbind pub "$whois(flags)" "!userhost" pub:userhostbind pub "$whois(flags)" "!userip" pub:useripbind pub "$whois(flags)" "!help" pub:help# Proc for NOTICE command.proc notice {nick message} {putquick "NOTICE $nick :$message"}# Proc for PRIVMSG command.proc privmsg {nick message} {putquick "PRIVMSG $nick :$message"}################################# The main procedure of WHOIS. #################################proc pub:whois {nick host hand chan text} {set whom [lindex $text 0]if {$whom == ""} { notice $nick "Syntax: $::whois(cmdChar)whois &lt;nickname&gt;"; return 1; }if {[string length $whom] &gt;= "32"} { notice $nick "Nickname specified is more then 12 characters long!"; return 1; }putquick "WHOIS $whom $whom"# Setting global variables.set ::whoischan $chanset ::whoisnick $whomset ::whoisfrom $nick# Binds of RAW type.bind raw - 311 whois:infobind raw - 319 whois:chansbind raw - 301 whois:awaybind raw - 312 whois:serverbind raw - 313 whois:ircopbind raw - 317 whois:timebind raw - 330 whois:authbind raw - 401 whois:nosuchbind raw - 318 whois:eof}################################## The main procedure of WHOWAS. ##################################proc pub:whowas {nick host hand chan text} {set whom [lindex $text 0]if {$whom == ""} { notice $nick "Syntax: $::whois(cmdChar)whowas &lt;nickname&gt;"; return 1; }if {[string length $whom] &gt;= "32"} { notice $nick "Nickname specified is more then 12 characters long!"; return 1; }putquick "WHOWAS $whom"# Setting global variables.set ::whowaschan $chanset ::whowasnick $whomset ::whowasfrom $nick# Binds of RAW type.bind raw - 314 whowas:infobind raw - 369 whowas:eofbind raw - 301 whowas:awaybind raw - 406 whowas:nosuch}############################### The main procedure of WHO. ###############################proc pub:who {nick host hand chan text} {set whom [lindex $text 0]if {$whom == ""} { notice $nick "Syntax: $::whois(cmdChar)who &lt;nickname/hostmask&gt;"; return 1; }putquick "WHO $whom"# Setting global variables.set ::whochan $chanset ::whonick $whomset ::whofrom $nick# Binds of RAW type.bind raw - 352 who:infobind raw - 315 who:eofbind raw - 416 who:error}################################### The main procedure of VERSION. ###################################proc pub:version {nick host hand chan text} {putquick "VERSION"# Setting global variables.set ::versionfrom $nick# Binds of RAW type.bind raw - 351 version:info}#################################### The main procedure of USERHOST. ####################################proc pub:userhost {nick host hand chan text} {set whom [lindex $text 0]if {$whom == ""} { notice $nick "Syntax: $::whois(cmdChar)userhost &lt;nickname&gt;"; return 1; }if {[string length $whom] &gt;= "32"} { notice $nick "Nickname specified is more then 12 characters long!"; return 1; }putquick "USERHOST $whom"# Setting global variables.set ::userhostfrom $nickset ::userhostnick $whom# Binds of RAW type.bind raw - 302 userhost:info}################################## The main procedure of USERIP. ##################################proc pub:userip {nick host hand chan text} {set whom [lindex $text 0]if {$whom == ""} { notice $nick "Syntax: $::whois(cmdChar)userip &lt;nickname&gt;"; return 1; }if {[string length $whom] &gt;= "32"} { notice $nick "Nickname specified is more then 12 characters long!"; return 1; }putquick "USERIP $whom"# Setting global variables.set ::useripfrom $nickset ::useripnick $whom# Binds of RAW type.bind raw - 340 userip:info}##################### WHOIS PROCEDURES #####################proc whois:info {from keyword arg} {set chan $::whoischanset nick [lindex [split $arg] 1]set ident [lindex [split $arg] 2]set host [lindex [split $arg] 3]set realname [string range [join [lrange $arg 5 end]] 1 end]$::whois(echo) $::whoisfrom "$nick is $ident@$host * $realname"unbind raw - 311 whois:info}proc whois:chans {from keyword arg} {set nick $::whoisnickset chans [string range [join [lrange $arg 2 end]] 1 end]$::whois(echo) $::whoisfrom "$nick on $chans"unbind raw - 319 whois:chans}proc whois:away {from keyword arg} {set nick $::whoisnickset awayMessage [string range [lrange $arg 2 end] 1 end]$::whois(echo) $::whoisfrom "$nick is away: $awayMessage"unbind raw - 301 whois:away}proc whois:server {from keyword arg} {set nick $::whoisnickset server [lindex [split $arg] 2]set info [string range [join [lrange $arg 3 end]] 1 end]$::whois(echo) $::whoisfrom "$nick using $server $info"unbind raw - 312 whois:server}proc whois:ircop {from keyword arg} {set nick $::whoisnickset msg [string range [lrange $arg 2 end] 1 end]$::whois(echo) $::whoisfrom "$nick $msg"unbind raw - 313 whois:server}proc whois:time {from keyword arg} {set nick $::whoisnickset idle [lindex [split $arg] 2]set signedon [lindex [split $arg] 3]$::whois(echo) $::whoisfrom "$nick has been idle for [duration $idle]. signed on [ctime $signedon]"unbind raw - 317 whois:time}proc whois:auth {from keyword arg} {set nick $::whoisnickset authname [lindex [split $arg] 2]$::whois(echo) $::whoisfrom "$nick is logged in as $authname"unbind raw - 330 whois:auth}proc whois:nosuch {from keyword arg} {set nick $::whoisnick$::whois(echo) $::whoisfrom "$nick No such nick"unbind raw - 401 whois:nosuch}proc whois:eof {from keyword arg} {set nick $::whoisnickset eof [string range [join [lrange [split $arg] 2 end]] 1 end]$::whois(echo) $::whoisfrom "$nick $eof"unbind raw - 318 whois:eof}###################### WHOWAS PROCEDURES ######################proc whowas:info {from keyword arg} {set nick [lindex [split $arg] 1]set ident [lindex [split $arg] 2]set host [lindex [split $arg] 3]set realname [string range [join [lrange $arg 5 end]] 1 end]$::whois(echo) $::whowasfrom "$nick was $ident@$host * $realname"unbind raw - 314 whowas:info}proc whowas:nosuch {from keyword arg} {set nick $::whowasnick$::whois(echo) $::whowasfrom "$nick There was no such nickname"unbind raw - 406 whowas:nosuch}proc whowas:away {from keyword arg} {set nick $::whowasnickset awayMessage [string range [lrange $arg 2 end] 1 end]$::whois(echo) $::whoisfrom "$nick was away: $awayMessage"unbind raw - 301 whowas:away}proc whowas:eof {from keyword arg} {set eof [string range [join [lrange [split $arg] 2 end]] 1 end]$::whois(echo) $::whowasfrom "$eof"unbind raw - 369 whowas:eof}################### WHO PROCEDURES ###################proc who:info {from keyword arg} {set nick [lindex $arg 5]set ident [lindex $arg 2]set addr [lindex $arg 3]set server [lindex $arg 4]set flags [lindex $arg 6]set hops [lindex $arg 7]set info [string range [join [lrange $arg 8 end]] 0 end]$::whois(echo) $::whofrom "* $nick $flags $ident@$addr $hops $info"unbind raw - 314 who:info}proc who:error {from keyword arg} {$::whois(echo) $::whofrom "Too many lines in the output, restrict your query"unbind raw - 416 who:error}proc who:eof {from keyword arg} {$::whois(echo) $::whofrom "* End of /WHO list."unbind raw - 369 who:eof}####################### VERSION PROCEDURES #######################proc version:info {from keyword arg} {set version [lindex [split $arg] 1]set server [lindex [split $arg] 2]$::whois(echo) $::versionfrom "$version - $server"unbind raw - 351 version:info}######################## USERHOST PROCEDURES ########################proc userhost:info {from keyword arg} {set usershost [string range [join [lrange $arg 1 end]] 1 end]$::whois(echo) $::userhostfrom "userhost: $usershost"unbind raw - 302 userhost:info}###################### USERIP PROCEDURES ######################proc userip:info {from keyword arg} {set usersip [string range [join [lrange $arg 1 end]] 1 end]$::whois(echo) $::useripfrom "userip: $usersip"unbind raw - 340 userip:info}############# THE HELP #############proc pub:help {nick host hand chan text} {$::whois(echo) $nick "\002rsh-serverCmds\002 commands list:"$::whois(echo) $nick "---------------------------------------------------------------"$::whois(echo) $nick "!whois &lt;nickname&gt; : Returns the WHOIS info for NICKNAME."$::whois(echo) $nick "!whowas &lt;nickname&gt; : Returns the WHOWAS info for NICKNAME."$::whois(echo) $nick "!who &lt;nick/host/mask&gt; : Returns the WHO command results."$::whois(echo) $nick "!version : Returns the server VERSION."$::whois(echo) $nick "!userip &lt;nickname&gt; : Returns the USERIP info for NICKNAME."$::whois(echo) $nick "!userhost &lt;nickname&gt; : Returns the USERHOST info for NICKNAME."$::whois(echo) $nick "!about : Information regarding the script."$::whois(echo) $nick "---------------------------------------------------------------"$::whois(echo) $nick "End of HELP."}putlog "\002rsh-serverCmds.tcl\002 version \002$::whois(version)\002 by \002$::whois(author)\002 succesfully loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Thu Dec 31, 2009 3:22 pm</p><hr />
]]></content>
	</entry>
	</feed>
