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

	<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>2003-12-29T10:40:56-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-12-29T10:40:56-04:00</updated>

		<published>2003-12-29T10:40:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31925#p31925</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31925#p31925"/>
		<title type="html"><![CDATA[Banning problem. Bot applies wrong banmask.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31925#p31925"><![CDATA[
<blockquote class="uncited"><div>I hope this will help<br><div class="codebox"><p>Code: </p><pre><code>  set host [string trimleft $host "~"]  set bmask *!*[lindex [split $host @] 0]@*"  newchanban $chan $bmask $handle "$reason" $time </code></pre></div>   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"></div></blockquote>This bans *!*ident@*, he wanted to ban *!*ident@host and trim the "~".<br><br>AsoAron, you're welcome <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=3085">Sir_Fz</a> — Mon Dec 29, 2003 10:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-12-29T09:48:08-04:00</updated>

		<published>2003-12-29T09:48:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31923#p31923</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31923#p31923"/>
		<title type="html"><![CDATA[Banning problem. Bot applies wrong banmask.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31923#p31923"><![CDATA[
I hope this will help<br><div class="codebox"><p>Code: </p><pre><code>  set host [string trimleft $host "~"]  set bmask *!*[lindex [split $host @] 0]@*"  newchanban $chan $bmask $handle "$reason" $time </code></pre></div>   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Mon Dec 29, 2003 9:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aron]]></name></author>
		<updated>2003-12-29T08:28:41-04:00</updated>

		<published>2003-12-29T08:28:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31919#p31919</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31919#p31919"/>
		<title type="html"><![CDATA[thanks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31919#p31919"><![CDATA[
thanks, its working now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>One more problem: <br><br>It bans *!*~<a href="mailto:ident@host.com">ident@host.com</a> now... is there a way to strip the ~ if it's there?<br><br><br>edit: Nevermind, i found out (using [string trim] <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>Thanks for the great help man <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=2858">Aron</a> — Mon Dec 29, 2003 8:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-12-29T06:52:13-04:00</updated>

		<published>2003-12-29T06:52:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31913#p31913</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31913#p31913"/>
		<title type="html"><![CDATA[Banning problem. Bot applies wrong banmask.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31913#p31913"><![CDATA[
<blockquote class="uncited"><div>set host [maskhost [getchanhost $nickhost $chan]]</div></blockquote>use <div class="codebox"><p>Code: </p><pre><code>set host [maskhost *[getchanhost $nickhost $chan]]</code></pre></div>this will add a * after ! (in ident)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Dec 29, 2003 6:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aron]]></name></author>
		<updated>2003-12-29T06:53:14-04:00</updated>

		<published>2003-12-29T06:31:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31910#p31910</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31910#p31910"/>
		<title type="html"><![CDATA[Banning problem. Bot applies wrong banmask.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31910#p31910"><![CDATA[
I wrote a script with 3 different userlevels (combined with some authentication script). These levels all have their different commands, including a !ban.<br><br>This is in the form om !ban Nickname/Hostmask [time] [reason]<br><br>It works fine, normally, but sometimes it refuses to work, but only adds a ban in the form of *!ident@*.host.com, instead of *!*ident. This causes the ban to fail if there is a ~ in the ident.<br><br>I already tried it on different users (with a ~ in their ident), and it worked fine. Just, with some users, the banmask gets applied incorrectly <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> <br><br>I can't seem to find the problem..<br><br>Here is a piece of code from my ban process:<br><div class="codebox"><p>Code: </p><pre><code>proc academy:ban {nick host handle chan text} {   global botnick guardmethod   if {(![authed $handle])} {return 0}  set userlevel [level $handle]    if {$userlevel == "Knight"} {return 0}  if {$chan != "#jedi-academy"} {return 0}  set nickhost [lindex $text 0]  set time [lindex $text 1]  set reason [lrange $text 2 end]  if {$time == "perm"} {     set time "0"  }  if {$nickhost == ""} {    return 0  }  if {$reason == ""} {    set reason "Banned via JAbot by $nick. No reason specified."  }  if {[nick2hand $nickhost] != "*"} {    if {[matchattr [nick2hand $nickhost $chan] f|f $chan]} { return 0 }     #putserv "PRIVMSG $chan :Debug line 1"  }  if {[botisop $chan]} {    if {[onchan $nick $chan]} {      #putserv "PRIVMSG $chan :Debug line 2"      if {[onchan $nickhost $chan]} {        #putserv "PRIVMSG $chan :Debug line 3"        set host [maskhost [getchanhost $nickhost $chan]]           if {[maskhost [getchanhost $botnick]] != $host &amp;&amp; [maskhost $nickhost] != [maskhost [getchanhost $botnick $chan]]} {          #putserv "PRIVMSG $chan :Debug line 4"            newchanban $chan $host [nick2hand $nick] "$reason" $time          #putserv "PRIVMSG $chan :Debug line 5. Variables: $chan - $host - $nick - $reason - $time"            webbanlist_createhtml          } else {              putserv "$guardmethod $nick : $nick whats wrong with you?"            }      } else {          if {[maskhost [getchanhost $botnick]] != $nickhost} {            newchanban $chan $nickhost $handle "$reason" $time            putserv "$guardmethod $nick : $nick, \002$nickhost\002 has been added to the $chan banlist, and will be banned when he enters."            webbanlist_createhtml          } else {            putserv "$guardmethod $nick : $nick, quit messing around."          }                    }    } else {        putserv "$guardmethod $nick : You are not on $chan"      }  } else {    putserv "$guardmethod $nick  : $botnick is not opped on $chan"    } }</code></pre></div>Any help would be greatly appreciated <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>The code is kind of messy, since i tried so many things to solve the problem, and didnt remove them yet.<br><br>edit: Ow, i forgat to mention:<br><br>Those debug lines were all messaged to the channel. The script just applied the wrong banmask. This seems to be the case for certain nicknames only. Over and over, the same people.<br><br><br>-Aron<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2858">Aron</a> — Mon Dec 29, 2003 6:31 am</p><hr />
]]></content>
	</entry>
	</feed>
