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

	<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>2002-10-08T18:08:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2002-10-08T18:08:50-04:00</updated>

		<published>2002-10-08T18:08:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11818#p11818</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11818#p11818"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11818#p11818"><![CDATA[
<blockquote class="uncited"><div>... another small problem... Ive narrowed this down to the endofwhois raw bind using:<br><div class="codebox"><p>Code: </p><pre><code>bind raw - 319 rawendofwhoisproc rawendofwhois {from keyw arg} { putlog "test"}</code></pre></div></div></blockquote>You will need to check RFC 1459 for the numerics. 319 is a different reply from 318 <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=282">egghead</a> — Tue Oct 08, 2002 6:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simonbell]]></name></author>
		<updated>2002-10-08T15:34:12-04:00</updated>

		<published>2002-10-08T15:34:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11813#p11813</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11813#p11813"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11813#p11813"><![CDATA[
ive also noticed another small problem. If the person that the whois is on is in a channel, the script executes ok. However, if the person is not on any channels, nothing happens. Ive narrowed this down to the endofwhois raw bind using:<br><blockquote class="uncited"><div>bind raw - 319 rawendofwhois<br>proc rawendofwhois {from keyw arg} {<br> putlog "test"<br>}</div></blockquote>When the person is not in a channel, the bind is not triggered at all. Is there a different raw numeric when doing a whois on someone who is not in a channel or something?<br><br>~ Simon<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1696">simonbell</a> — Tue Oct 08, 2002 3:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simonbell]]></name></author>
		<updated>2002-10-06T09:31:20-04:00</updated>

		<published>2002-10-06T09:31:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11748#p11748</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11748#p11748"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11748#p11748"><![CDATA[
one last problem. I have the script working now. However, when it comes to listing channels using this part of the script:<br><blockquote class="uncited"><div>    foreach chanout $chanremrbrak {<br>     putnotc $userreqnick "Listing channels that $rawendnick is on:"<br>     putnotc $userreqnick "$chanout"<br>     putnotc $userreqnick "End of user info"<br>     }</div></blockquote>i get the following output:<br><blockquote class="uncited"><div>-H4- Listing channels that bob is on:<br>-H4- @#MillsNet<br>-H4- End of user info<br>-H4- *#TheLight</div></blockquote>So, the question is, how can i get the bot to wait for the last channel to be listed before outputting "End of user info"<br><br>~ Simon<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1696">simonbell</a> — Sun Oct 06, 2002 9:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-10-05T15:58:31-04:00</updated>

		<published>2002-10-05T15:58:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11734#p11734</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11734#p11734"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11734#p11734"><![CDATA[
That will just overwrite it. You could either make 2 entries arrayname(bob,1) arrayname(bob,2) or use a list, like set arrayname(bob) <ul><li>.<br><br>Commas are good for the multiple entries because nicks can't contain commas.</li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sat Oct 05, 2002 3:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simonbell]]></name></author>
		<updated>2002-10-05T15:55:51-04:00</updated>

		<published>2002-10-05T15:55:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11733#p11733</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11733#p11733"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11733#p11733"><![CDATA[
ok that worked thanks. Now is it possible to use arrays in the form of<br><br>set arrayname(bob) "info"<br>set arrayname(bob) "other info"<br><br>which would store 2 items in (bob) or would i have to do it a different way?<br><br>~ Simon<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1696">simonbell</a> — Sat Oct 05, 2002 3:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-10-05T15:09:05-04:00</updated>

		<published>2002-10-05T15:09:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11732#p11732</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11732#p11732"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11732#p11732"><![CDATA[
You have to use 'global' in the first proc as well, otherwise the array will be created locally.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sat Oct 05, 2002 3:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simonbell]]></name></author>
		<updated>2002-10-05T14:46:15-04:00</updated>

		<published>2002-10-05T14:46:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11729#p11729</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11729#p11729"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11729#p11729"><![CDATA[
egghead: what exactly did you mean by 'check if a request is pending'? cant say i know how to do that.<br><br>I have found the first problem. If i use a putlog, i can output the names of the array after i have set it using the<br><blockquote class="uncited"><div>array names arrayname</div></blockquote>command, and this does output the names in the array. However, if i try this in the next part of the script, it does not do anything, but i know its reaching this part of the script by putting a putlog "test" just above the command to retrieve the array.<br><br>So as far as i can see, this part of the script is working:<br><blockquote class="uncited"><div>proc rawnickinfo {from keyw arg} { <br>set reqwithcolon [lindex $arg 1] <br>set reqnick [lindex $arg 2] <br>set req [string range $reqwithcolon 1 end] <br>if { $reqnick == "" } { <br>putnotc $req "Error: User with that nick is offline" <br>return 0 <br>} <br>putserv "WHOIS $reqnick" <br>set userinfoarray("$reqnick") "[unixtime] $req" <br>} </div></blockquote>and this part is not:<br><blockquote class="uncited"><div>proc rawwhoisuser {from keyw arg} { <br>global userinfoarray <br>set whoisusernick [lindex $arg 1] <br>if { [array exists $whoisusernick] == 1 } { <br>etc</div></blockquote>i think that when i set the array in the first proc is isnt becoming global, or when i do "global userinfoarray" in the 2nd proc, ive done something wrong. As far as i can see when looking at the SUNiNET tcl tutorials ive done it correctly so im at a bit of a dead end.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1696">simonbell</a> — Sat Oct 05, 2002 2:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-10-05T00:45:34-04:00</updated>

		<published>2002-10-05T00:45:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11719#p11719</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11719#p11719"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11719#p11719"><![CDATA[
If you don't see an error message, then you need to add debugging statements to find out where the flaw is.<br><br>Add putlogs to the part where the request is formed and where the server response is received. That's a start.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sat Oct 05, 2002 12:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simonbell]]></name></author>
		<updated>2002-10-04T21:19:15-04:00</updated>

		<published>2002-10-04T21:19:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11717#p11717</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11717#p11717"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11717#p11717"><![CDATA[
ok this is as far as ive gotten and i think ive probably completely mucked up here somewhere because i dont even get an error message when i try running the script but here it is:<br><br><blockquote class="uncited"><div>proc msg_userinfo {nick uhost hand arg} {<br> set nick_requested [lindex $arg 0]<br> putserv "ISON $nick $nick_requested"<br>}<br><br>proc rawnickinfo {from keyw arg} {<br> set reqwithcolon [lindex $arg 1]<br> set reqnick [lindex $arg 2]<br> set req [string range $reqwithcolon 1 end]<br> if { $reqnick == "" } {<br>  putnotc $req "Error: User with that nick is offline"<br>  return 0<br>  }<br> putserv "WHOIS $reqnick"<br> set userinfoarray("$reqnick") "[unixtime] $req"<br>}<br><br>proc rawwhoisuser {from keyw arg} {<br> global userinfoarray<br> set whoisusernick [lindex $arg 1]<br> if { [array exists $whoisusernick] == 1 } {<br>  set whoisuseruser [lindex $arg 2]<br>  set whoisuserhost [lindex $arg 3]<br>  set whoisuseruhost "$whoisuseruser@$whoisuserhost"<br>  set whoisuserhand [finduser $whoisusernick!$whoisuseruser@$whoisuserhost]<br>  set userinfoarray($whoisusernick) "Nick: $whoisusernick"<br>  set userinfoarray($whoisusernick) "Address: $whoisuseruhost"<br>  if { $whoisuserhand != "*" } {<br>   set whoisuserinfo [getuser $whoisuserhand INFO]<br>   if { ($whoisuserinfo != "") || ($whoisuserinfo != "*") } {<br>    set userinfoarray($whoisusernick) "Info: $whoisuserinfo"<br>    }<br>  }<br> }<br>}<br><br>proc rawmodes {from keyw arg} {<br> global userinfoarray<br> set rawmodenick [lindex $arg 1]<br> if { [array exists $rawmodenick] == 1 } {<br>  set rawmodemode [lindex $arg 5]<br>  set userinfoarray($rawmodenick) "Modes: $rawmodemoe"<br>  }<br>}<br><br>proc rawwhoisserver {from keyw arg} {<br> global userinfoarray<br> set rawservernick [lindex $arg 1]<br> if { [array exists $rawservernick] == 1 } {<br>  set rawserverserver [lindex $arg 2]<br>  set userinfoarray($rawservernick) "Server: $rawserverserver"<br>  }<br>}<br><br>proc rawwhoischans {from keyw arg} {<br> global userinfoarray<br> set rawchannick [lindex $arg 1]<br> if { [array exists $rawchannick] == 1 } {<br>  set rawchanchans [lrange $arg 2 end]<br>  set userinfoarray($rawchannick) "Channels: $rawchanchans"<br>  }<br>}<br><br>proc rawendofwhois {from keyw arg} {<br> global userinfoarray<br> set rawendnick [lindex $arg 1]<br> if { [array exists $rawendnick] == 1 } {<br>  putlog "$userinfoarray($rawendnick)"<br>  }<br>}</div></blockquote># End of userinfo<br><br>any advise appreciated thanks.<br><br>Simon<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1696">simonbell</a> — Fri Oct 04, 2002 9:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2002-09-21T02:14:08-04:00</updated>

		<published>2002-09-21T02:14:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11210#p11210</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11210#p11210"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11210#p11210"><![CDATA[
<blockquote class="uncited"><div>ok yes i know the specific numeric replies, what i mean is, at present im telling the bind to catch raw 303, if i wanted to catch more than one bind numeric, and output the results as one list inside one proc, how can it be done?<br><br>Simon</div></blockquote>An example of how it can be done.<br><br>Upon sending the WHOIS request create an global array "information($nick)" with the time in it when the WHOIS request was send out and the name of the requester.<br><br>Upon receiving each of the associated numeric replies: check if a request is pending for the $nick mentioned in the numeric reply, if so add the response the global array "information($nick)". Upon receiving the terminating numeric, e.g. 318 RPL_ENDOFWHOIS, return the information stored in the array for $nick.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Sat Sep 21, 2002 2:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simonbell]]></name></author>
		<updated>2002-09-20T20:35:27-04:00</updated>

		<published>2002-09-20T20:35:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11202#p11202</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11202#p11202"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11202#p11202"><![CDATA[
ok yes i know the specific numeric replies, what i mean is, at present im telling the bind to catch raw 303, if i wanted to catch more than one bind numeric, and output the results as one list inside one proc, how can it be done?<br><br>Simon<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1696">simonbell</a> — Fri Sep 20, 2002 8:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-20T20:15:28-04:00</updated>

		<published>2002-09-20T20:15:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11201#p11201</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11201#p11201"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11201#p11201"><![CDATA[
Yes it's completely possible. Look up the whois command and it will tell you the numeric replies and what they mean. Or simply telnet to an irc server and look at the output for yourself.. that is usually easier.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Sep 20, 2002 8:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simonbell]]></name></author>
		<updated>2002-09-20T19:59:30-04:00</updated>

		<published>2002-09-20T19:59:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11200#p11200</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11200#p11200"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11200#p11200"><![CDATA[
Hi<br><br>The purpose of my question wasnt primarily anything to do with accessing the userlist of the bot, but as a secondary function it would be useful.<br><br>The checking whether a nick is online script i was trying to write is to provide information about a particular user. So someone can type:<br><br>/msg bot userinfo nick<br><br>and the bot would give them basic details like nick, uhost etc. I wanted to make a check so that if there was no such nick, an error message would be noticed back to the person who requested the info.<br><br>egghead's idea did actually work and i now have this script working properly.<br><br>On the other note, in my bot no user hostmasks are permanently stored in the userfile. When a user comes online they issue a:<br><br>/msg bot login handle password<br><br>command which adds there whole hostmask temporatily to there record. If they dont join a channel which the bot is in within a certain amount of time the user is logged out and this hostmask is removed from the userfile. Otherwise either leaving a channel or manually logging out will do the same thing. Because im using a temporary but full hostmask i can use the nick2hand function securely to give the user access to the bots functions, but only after they have logged in. This method seems more secure than automatically recognising users via a hostmask.<br><br>---<br><br>ok, now i have that working i was wondering if it was possible to expand this a little.<br><br>If i were to want to display information from more than one raw command. Such as gathering whether the nick is online and displaying<br><br>nick: nickname<br><br>then gathering information from a /whois on the user to display there ip address, or which server theyre on etc. So it would show:<br><br>info on nick:<br>nick: nickname<br>address: hostmask<br>server: irc.blah.net<br><br>etc<br><br>is this possible?<br><br>thanks<br>Simon<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1696">simonbell</a> — Fri Sep 20, 2002 7:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darko``]]></name></author>
		<updated>2002-09-20T13:06:33-04:00</updated>

		<published>2002-09-20T13:06:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11190#p11190</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11190#p11190"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11190#p11190"><![CDATA[
If user is not on a channel, there still will be a reply from the bot, providing the bot knows that user IS a real user on the bot and not some person simply matching the someone's hostmask. You question infact prompted me to think in a different light now, cause i couldn't have ever imagined that someone is going to script something purely on the basis of matching hostmasks. Now that i know that such people do exist, i'll have to reconsider the way i give advices, taking into account all possible (no metter how insecure) requests.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1881">darko``</a> — Fri Sep 20, 2002 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2002-09-20T12:40:43-04:00</updated>

		<published>2002-09-20T12:40:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11186#p11186</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11186#p11186"/>
		<title type="html"><![CDATA[nick check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11186#p11186"><![CDATA[
<blockquote class="uncited"><div>Why not use nick2hand function? It will give you the handle of the user that matches specified nickname and from there on there are a lot of commands available to manipulate userinfo.</div></blockquote>Sure. Now what if the requested nick is not on a channel monitored by the bot?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Fri Sep 20, 2002 12:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
