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

	<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>2004-08-19T10:16:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[feroz]]></name></author>
		<updated>2004-08-19T10:16:25-04:00</updated>

		<published>2004-08-19T10:16:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39917#p39917</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39917#p39917"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39917#p39917"><![CDATA[
oki, maybe one of my older scripts usin raw 302 returning 1 prolly, will check that.. <br><br>And have a look at that script too.<br><br>Thx.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5289">feroz</a> — Thu Aug 19, 2004 10:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-08-19T05:19:23-04:00</updated>

		<published>2004-08-19T05:19:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39912#p39912</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39912#p39912"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39912#p39912"><![CDATA[
if it is for the bots its own ip use  look at this code its in there somewhere  <a href="http://cvs.ofloo.net/ip-to-country/ip-to-country.tcl?rev=1.5.2.2&amp;content-type=text/vnd.viewcvs-markuplook" class="postlink">http://cvs.ofloo.net/ip-to-country/ip-t ... markuplook</a> below in old script support section<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Thu Aug 19, 2004 5:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-08-18T09:26:16-04:00</updated>

		<published>2004-08-18T09:26:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39898#p39898</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39898#p39898"/>
		<title type="html"><![CDATA[tcl-commands.doc is your friend]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39898#p39898"><![CDATA[
The raw bind is marked as "stackable", which means there should be no problem having several binds on the same keyword triggering different procs, BUT <blockquote class="uncited"><div>If the proc returns 1, Eggdrop will not process the line any further (this could cause unexpected behavior in some cases).</div></blockquote>(1 in this case means anything that will NOT be interpreted as a boolean "false" - my example should be fine as the empty value returned should be interpreted as "false")<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Aug 18, 2004 9:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[feroz]]></name></author>
		<updated>2004-08-18T07:05:26-04:00</updated>

		<published>2004-08-18T07:05:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39896#p39896</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39896#p39896"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39896#p39896"><![CDATA[
Thx user that works too, works even better  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>Just an other question, i tried bidding a same raw event to two diff procs.. And i think there was some sort of "conflict" is there anyway to fix that?<br><br>thx again for your help  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5289">feroz</a> — Wed Aug 18, 2004 7:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-08-17T21:04:52-04:00</updated>

		<published>2004-08-17T21:04:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39885#p39885</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39885#p39885"/>
		<title type="html"><![CDATA[How about this?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39885#p39885"><![CDATA[
What's keeping you from storing the reason in a global variable instead of the host? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><div class="codebox"><p>Code: </p><pre><code># if you're on a non RFC 1459 compliant network, remove this alias# and replace the calls to it with 'string tolower' or whatever...interp alias {} irc2lower {} string map {A a B b C c D d E e F f G g H h I i J j K k L l M m N n O o P p Q q R r S s T t U u V v W w X x Y y Z z \[ \{ \] \} \\ |}proc userhostGline {nick why} {upvar #0 gline_on_302 reason# store the reason in a global array...set reason([irc2lower $nick]) $why# ...and let the other proc do the restputserv "USERHOST $nick"}bind raw - 302 userhostGline:rawproc userhostGline:raw {server 302 arg} {upvar #0 gline_on_302 reason# trim off the unwanted "prefix" and check if the reply was emptyif {[scan $arg "%*s :%\[^\n\]" arg]} {# support for several hosts in a single replyforeach host [split $arg] {# dig out the nick and @host parts...scan $host {%[^*=]%*[^@]%s} nick hostset nick [irc2lower $nick]# and gline if there's a reason :)if {[info exists reason($nick)]} {putserv "GLINE add *$host 3600s $reason($nick)"unset reason($nick)}}}}</code></pre></div>...not tested - as usual <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Aug 17, 2004 9:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[feroz]]></name></author>
		<updated>2004-08-17T17:20:34-04:00</updated>

		<published>2004-08-17T17:20:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39876#p39876</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39876#p39876"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39876#p39876"><![CDATA[
Because it need to give it the gline reason var which is $breason.. <br><br>Ready to try if there's better way doin these things. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Hmm.. just noticed, it still doesnt give me the right host time to time... like when i restart it..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5289">feroz</a> — Tue Aug 17, 2004 5:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-08-17T16:50:25-04:00</updated>

		<published>2004-08-17T16:50:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39875#p39875</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39875#p39875"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39875#p39875"><![CDATA[
why don't you just put that gline code straight in the raw:realhost proc and get rid of the timer?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Aug 17, 2004 4:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[feroz]]></name></author>
		<updated>2004-08-17T16:07:55-04:00</updated>

		<published>2004-08-17T16:07:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39873#p39873</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39873#p39873"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39873#p39873"><![CDATA[
ooook i got it to work  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"> <br><br>Finally!<br><div class="codebox"><p>Code: </p><pre><code>bind raw - 302 raw:realhostproc raw:realhost { from key text } {upvar #0 g_host g_hostset g_host [lindex [lrange [split $text "@"] 1 end] 0] putlog "$g_host from realhost"}proc user:host {bnick breason} {putserv "userhost $bnick"utimer 2 [list userhost:gline $breason] }proc userhost:gline {breason} { global g_host set g_host $g_host putserv "gline add *@$g_host 3600s $breason"putlog "$g_host $breason from gline"} </code></pre></div>thx for helpin ppl. <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=5289">feroz</a> — Tue Aug 17, 2004 4:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[feroz]]></name></author>
		<updated>2004-08-17T14:52:27-04:00</updated>

		<published>2004-08-17T14:52:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39870#p39870</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39870#p39870"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39870#p39870"><![CDATA[
Isnt there any other way of doin this? coz i'd really like to get that script working..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5289">feroz</a> — Tue Aug 17, 2004 2:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[feroz]]></name></author>
		<updated>2004-08-16T07:26:43-04:00</updated>

		<published>2004-08-16T07:26:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39836#p39836</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39836#p39836"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39836#p39836"><![CDATA[
thx for tryin   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br>tryed to execute the script but still vwait causing trouble.. bot just freezes..   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5289">feroz</a> — Mon Aug 16, 2004 7:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2004-08-16T05:17:25-04:00</updated>

		<published>2004-08-16T05:17:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39832#p39832</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39832#p39832"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39832#p39832"><![CDATA[
*sigh  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"> <br>I can never seem to get the vwait function to work correctly in eggdrop-scripts <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>try this, it'll be my last test with eggdrop/vwait <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><div class="codebox"><p>Code: </p><pre><code>bind pubm - "* *" badword:pubm:check bind raw - 302  realhost proc badword:pubm:check { nick uhost handle chan arg } {    global BadwordWarn g_message g_host    set input " [bad:filter $arg] "    #Search through the list to see if the badword is present.    if { [file exists badword.txt] } {       set read [open badword.txt r]       while  { ![eof $read] } {          gets $read line          set helpwanted [string range $line 0 [expr [string first # $line]-1]]          set g_message [string range $line [expr [string first # $line]+1] end]          if { [string match -nocase "* $helpwanted *" $input] &amp;&amp; $helpwanted != "" } {             if {([info exists BadwordWarn($uhost)] == 1)} {                putserv "userhost $nick" #gline part goes here, need the g_host to do that..       utimer 2 [list dummy]       vwait g_host #and now you got he g_host....                unset BadwordWarn($uhost)             } else {                set BadwordWarn($uhost) 1                timer 60 "unset BadwordWarn($uhost)"                putserv "kill $nick $message"             }          }       }       close $read    } } proc realhost { from key arg } {    upvar #0 g_host g_host    set g_host [lindex [lrange [split $arg "@"] 1 end] 0] } proc dummy {} {   global g_host   set g_host $g_host}</code></pre></div>note: I don't have a eggdrop running atm, so I'm unable to test it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Mon Aug 16, 2004 5:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[feroz]]></name></author>
		<updated>2004-08-15T11:51:20-04:00</updated>

		<published>2004-08-15T11:51:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39805#p39805</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39805#p39805"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39805#p39805"><![CDATA[
The prob is i dont know how to get a var "global" that's all... no ircd things, user modes and all <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Well n/m <br>i got a small prob, <br><div class="codebox"><p>Code: </p><pre><code>bind raw - 302 realhostproc realhost { from key text } {putlog "$text"upvar #0 g_host g_hostset g_host [lindex [lrange [split $text "@"] 1 end] 0] putlog "$g_host"}proc get:host { arg } {global g_hostputserv "userhost $arg"putlog "$g_host from get:host proc"return $g_host}</code></pre></div>Looks like when it userhosts someone the var doesnt get set on time<br>so it always displayes the previous var... Its just what papillon suggested, but removed the vwait from there coz it makes bot not respond..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5289">feroz</a> — Sun Aug 15, 2004 11:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2004-08-15T10:15:23-04:00</updated>

		<published>2004-08-15T10:15:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39804#p39804</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39804#p39804"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39804#p39804"><![CDATA[
The problem is that even though the bot (with the proper flags) can see the real host it may not be able to capture it via script. Opers usually have to manually copy the hostmask to add it to any ban. There's no problem if the offending user has his mode set -x.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sun Aug 15, 2004 10:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-08-15T09:45:51-04:00</updated>

		<published>2004-08-15T09:45:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39801#p39801</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39801#p39801"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39801#p39801"><![CDATA[
I am not good with linking pointers, like upvar. Papillon is good, he might give you the working solution. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><br><br>In my case you need to make one or two more procedures one to get the variable, the other to return the variable back to the main proc and then utilize it, which will be a bit longer.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun Aug 15, 2004 9:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[feroz]]></name></author>
		<updated>2004-08-14T06:28:08-04:00</updated>

		<published>2004-08-14T06:28:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39773#p39773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39773#p39773"/>
		<title type="html"><![CDATA[Var probs..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39773#p39773"><![CDATA[
That's what i'm tryin to do  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"> <br><br>The prob is just that i can get a var at the right place to gline... nothin more  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5289">feroz</a> — Sat Aug 14, 2004 6:28 am</p><hr />
]]></content>
	</entry>
	</feed>
