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

	<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-09-12T12:30:58-04:00</updated>

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

		<entry>
		<author><name><![CDATA[darko``]]></name></author>
		<updated>2002-09-12T12:30:58-04:00</updated>

		<published>2002-09-12T12:30:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10811#p10811</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10811#p10811"/>
		<title type="html"><![CDATA[Whois only specified nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10811#p10811"><![CDATA[
You would need quite a sofisticated TCL script to do that. It is not all that hard to make it, but requires moderate knowladge of TCL and RFC. There are (afaik) scripts out there that do that.<br>However, here is some pseudo code to help you if you decide to write it yourself:<br><br># setup a bind that fires everytime nick containing "sex" joinsany channel<br> bind join - *sex* send:whois <br><br># setup a bind that intercepts part of whois reply that contains channel names<br> bind raw - 319 got:319<br><br># procedure send:whois should just dump WHOIS to server<br><br>proc send:whois {nick uhost handle channel} {<br> putquick "WHOIS $nick"<br>}<br><br># procedure got:319 should play a bit with the reply from the server to determine if user is on  a forbiden channel.<br><br>proc got:319 {from keyword text} {<br>  some arbitary code here....<br>  }<br><br>Note that procedure got:319 is quite tricky to write. It will return <strong class="text-strong">string</strong> that looks something like this:<br><br>&lt;your bot's nick&gt; &lt;nick that you whoised&gt; #foo @#bar -#foobar @!localfoobar<br><br>You've got to familiarise yourself with the possible combinations of !, #, +, @, -, % ect... and comeup with a code that will succesfully mask them out leaving you with pure channel name, that can then be matched. Info can be found on <a href="http://www.irchelp.org" class="postlink">www.irchelp.org</a> in RFC archives. Note that reply is a string and not a list, so i also suggest splitting it on whitespace to get a valid TCL list composed of elements that can be processed later.<br><br>Also, you should probably make something to do initial scan upon bot joining the channel to see if there already are users from the forbiden channels.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1881">darko``</a> — Thu Sep 12, 2002 12:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-12T02:29:16-04:00</updated>

		<published>2002-09-12T02:29:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10795#p10795</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10795#p10795"/>
		<title type="html"><![CDATA[Whois only specified nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10795#p10795"><![CDATA[
How can my bot do whois ONLY in *{sex-* nicks and ban them if they're in specified channels? Thanks<p>Statistics: Posted by Guest — Thu Sep 12, 2002 2:29 am</p><hr />
]]></content>
	</entry>
	</feed>
