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

	<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-03-02T05:27:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-03-02T05:27:44-04:00</updated>

		<published>2005-03-02T05:27:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47123#p47123</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47123#p47123"/>
		<title type="html"><![CDATA[!unban $nick and probs to retrive the uhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47123#p47123"><![CDATA[
You can use [getchanhost $nick] or [getchanhost $nick $chan] but for this case it seems redundant as you said the user is out of the channel. This getchanhost only works if the user is on any of the channels as same with the bot, otherwise it returns "".<br><br>What you can do is bind raw after executing the proc:<br><div class="codebox"><p>Code: </p><pre><code>proc my:unban {nick uhost hand chan arg} {    ................   .......................   bind raw - 354 my:getuhost    putserv "who $nicks \[i]%h   }}#and unbind it after you have removed the ban.proc grp:getuhost {botnick hand arg} {   ................   .......................   unbind raw - 354 my:getuhost   putserv "MODE #mychannel -b $nn"   }}</code></pre></div>Or either you can make a global variable, and do something like this:<br><div class="codebox"><p>Code: </p><pre><code>if {($pub_unban == 1)} { bind raw - 354 my:getuhost }#Then in your both procs declare pub_unban as global.#After that in the first one:proc my:unban {nick uhost hand chan arg} {  global pub_unban   ................   .......................   set pub_unban 1   putserv "who $nicks \[i]%h   }}#And in the second one:proc grp:getuhost {botnick hand arg} { global pub_unban   ................   .......................   set pub_unban 0   unbind raw - 354 my:getuhost   putserv "MODE #mychannel -b $nn"   }}</code></pre></div>The only way to retrieve a userhost of a user outside a channel is in my knowledge, /who or /whois, or if you have nickserv services, say or some kind of services so the user is identified you can match them as well, but easier would be the first two. Secondly, when a bot joins a channel it does a /who upon the channel so thats why it is able to use getchanhost in the first place.<br><br>As for the channel thingy, this would be a bit complicated since you are doing /who and it has nothing todo with channels plus the user is not in the channel. You can make the bot do a foreach chan [channels] loop, and check with ischanban or some function and match if the ban is in the channel ban list then go ahead and remove it, something of that sort yeah.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Wed Mar 02, 2005 5:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Garp]]></name></author>
		<updated>2005-03-02T00:04:19-04:00</updated>

		<published>2005-03-02T00:04:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47122#p47122</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47122#p47122"/>
		<title type="html"><![CDATA[!unban $nick and probs to retrive the uhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47122#p47122"><![CDATA[
I want to have a !unban &lt;nick&gt; but I run into problems to retrive the uhost  while the banned nick is outside the channel. <br><br>I try at the moment with some bind raw to catch the nick's uhost.<div class="codebox"><p>Code: </p><pre><code>bind pub o|o !unban my:unbanproc my:unban {nick uhost hand chan arg} {    set nicks [join [lindex [split $arg] 0]]    if {$nicks == ""} {        return 0    }putserv "who $nicks \[i]%h"}bind raw - 354 my:getuhostproc grp:getuhost {botnick hand arg} {if { $hand == 354 } {set nn "*!*@[join [lindex [split $arg] 1]]"putserv "MODE #mychannel -b $nn"}}</code></pre></div>raw 354 returns something like nick host.domain.tcl<br><br>This code is working but .... it doesn't look good.<br><br>The problem is that all raw events interfer with other who and whois stuff such as the bots own checking if he is proper logged in.<br><br>Is there a way to retrive a userhost by nick while the nick is not on the channel from inside a proc?<br><br>putserv "MODE #mychannel -b $nn" is really bad, better would be a way to  use $chan so that I can use the script more variable for more then one channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3849">Garp</a> — Wed Mar 02, 2005 12:04 am</p><hr />
]]></content>
	</entry>
	</feed>
