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

	<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-12-29T07:13:55-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-12-29T07:13:55-04:00</updated>

		<published>2002-12-29T07:13:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14658#p14658</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14658#p14658"/>
		<title type="html"><![CDATA[a kick_on_ban script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14658#p14658"><![CDATA[
Dear all , thanks alot , thanks ppslim , i have managed to do it some other way<br>here is a rough code , it has to be refined to check for ops ,and not to ban the botitself . the changes should be minor , i tried it , it works . Thanks again , and habbi  meaw yeeeez<br><br>set mchannel "#chan1"<br>bind  mode - "$mchannel +b"  mode:kick_banned<br>proc mode:kick_banned { nick uhost hand chan mc victim } {<br>global mchannel<br>foreach i [chanlist $mchannel] {<br>set v $i![getchanhost $i]<br># puthelp "PRIVMSG mynick : test $v nick $i victim $victim"<br>if {[string match -nocase "$victim" "$v"] == 1 } {<br>puthelp "PRIVMSG mynick : nick $i v $v "<br>putkick $mchannel $i "kick kick kick"<br>                     }<br>                                        }<br>                                                         }<p>Statistics: Posted by Guest — Sun Dec 29, 2002 7:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-12-26T11:39:04-04:00</updated>

		<published>2002-12-26T11:39:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14599#p14599</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14599#p14599"/>
		<title type="html"><![CDATA[a kick_on_ban script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14599#p14599"><![CDATA[
That is somthing totaly different.<br><br>handles, nicknames, banmasks, hostmasks are all different things, and muct be treated and obtained differently, on the information you have, and the information you can gain from it.<br><br>A handle is like a shell login username. While the person using the shell can be called somthing different each time, the login name allways remains the same. It is used as a persons identity in eggdrop. Each handle has a set of 1 or more hosts masks (can have 0, so they are never recognised on IRC) which are used to tell the differance from one person on IRC to another. Handles must follow the same rules for valid names, as defined for IRC nicknames in RFC 1459.<br><br>Nicknames are a persons <strong class="text-strong">CURRENT</strong> identity on IRC. They can change nickname at any time while they are on IRC. Eggdrop tells between them, as noted above, by there hostname, matching a certain mask.<br><div class="codebox"><p>Code: </p><pre><code>bind mode - "#chan1 +b" mode:kick_banned proc mode:kick_banned { nick uhost hand chan mc victim } { set vname "test" set vname [hand2nick $victim $chan] puthelp "PRIVMSG mynick : nick $vname is banned " }</code></pre></div>In your script, it displays a message to the channel, when some1 is banned. However, it only accounts for one person. When you set a ban mask, it can match more than one person.<br><br>Everything is fine, until the point of using "hand2nick".<br><blockquote class="uncited"><div>  hand2nick &lt;handle&gt; [channel]<br>    Returns: nickname of the first person on the specified channel (if one<br>      is specified) whose nick!user@host matches the given handle; "" is<br>      returned if no match is found. If no channel is specified, all channels<br>      are checked.<br>    Module: irc</div></blockquote>This command takes a handle as a comulsary argument. A handle is, as noted abovee, a eggdrop login name. It will then look through all channels (unless one is specified), looking for a nickname, that matches a userhost mask, as defined in that handles records. On top of this, handles only exist for users that have a record on the bot.<br><br>This command does not take a mask.<br><br>There is no command that exists for this sort of thing, as of yet. However, there are command, that can be used, to obtain all users, and search through them yourself. This can be make into a function, that can be reused other script, like in the way you wish in your script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Dec 26, 2002 11:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-12-26T10:23:05-04:00</updated>

		<published>2002-12-26T10:23:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14598#p14598</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14598#p14598"/>
		<title type="html"><![CDATA[a kick_on_ban script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14598#p14598"><![CDATA[
yes , but if u do a ban with the ip address , for example<br>bot set mode +o   *!*@200.134.134.100<br>So i need to convert this to a nick, to kick it , coz i have to kick using a nick , <br>so i have to use  hand2nick<br><br>if the $victim argument is  *!*@200.134.134.100<br>i need to have the corresponding nick for that<p>Statistics: Posted by Guest — Thu Dec 26, 2002 10:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-12-26T09:32:11-04:00</updated>

		<published>2002-12-26T09:32:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14596#p14596</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14596#p14596"/>
		<title type="html"><![CDATA[a kick_on_ban script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14596#p14596"><![CDATA[
YOu, you have the nickname of the victim allready.<br><br>Quoted from tcl-commands.doc<blockquote class="uncited"><div>Description: mode changes are broken down into their component<br>           parts before being sent here, so the &lt;mode-change&gt; will always<br>           be a single mode, such as "+m" or "-o". victim will show the<br>           argument of the mode change (for o/v/b/e/I) or "" if the set<br>           mode does not take an argument. Flags are ignored. The bot's<br>           automatic response to a mode change will happen AFTER all<br>           matching Tcl procs are called. The mask will be matched against<br>           '#channel +/-modes' and can contain wildcards.</div></blockquote>This means that victim is not actualy a sutiable name for the arguemnt.<br><br>In reality, it should be balled mode_argument<br><br>If you see this on a cvhannel<blockquote class="uncited"><div>PPSlim set mode +o hello</div></blockquote>Then arguments of your script are as follows.<br><br>$nick = My nickname, ie ppslim<br>$uhost = My userhost, ie <a href="mailto:ident@host.name">ident@host.name</a><br>$hand = My eggdrop handle, ie ppslim<br>$chan = The channel this mode took place on<br>$mc = The mode change, IE in this case +o<br>$victim = The argument applied to the mode, ie in this case hello<br><br>In the eggdrop bind system, only uses handles for the person triggering the event. IE, the person changing the mode.<br><br>If the mode change was a ban, $mc would equal +b and $victim would be the ban mask.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Dec 26, 2002 9:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-12-26T03:51:49-04:00</updated>

		<published>2002-12-26T03:51:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14595#p14595</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14595#p14595"/>
		<title type="html"><![CDATA[a kick_on_ban script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14595#p14595"><![CDATA[
actually i want to get the nick of the victim , not his handle , so i think hand2nick is what i really should use , since i already have the handle of the victim  ,  , , and by the way , merry christmas to ya all<p>Statistics: Posted by Guest — Thu Dec 26, 2002 3:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-12-25T14:42:51-04:00</updated>

		<published>2002-12-25T14:42:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14586#p14586</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14586#p14586"/>
		<title type="html"><![CDATA[a kick_on_ban script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14586#p14586"><![CDATA[
No, this is actualy due tot he fact, he has got 2 command muddled up.<br><br>The hand2nick command is used to locate the first person matching a hostmask for a specific handle, and return the nickname.<br><br>This command is used to detect nicknames from handles, and not handles from nicknames.<br><br>Try using the nick2hand command, rather than hand2nick.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Dec 25, 2002 2:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2002-12-25T14:19:23-04:00</updated>

		<published>2002-12-25T14:19:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14585#p14585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14585#p14585"/>
		<title type="html"><![CDATA[a kick_on_ban script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14585#p14585"><![CDATA[
If I'm not wrong that means the victim dosen't have access to the eggdrop, is not an known user.. or something like this anyway.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Dec 25, 2002 2:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-12-24T09:55:20-04:00</updated>

		<published>2002-12-24T09:55:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14563#p14563</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14563#p14563"/>
		<title type="html"><![CDATA[a kick_on_ban script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14563#p14563"><![CDATA[
this script doesn't work , it always gives null value "" for the vname variable , any idea why <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>it should msg mynick when a ban happens on #chan1  with the nick of the banned person , <br>it always gives  nick  is banned <br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>any help why hand2nick doesn't work right <br><br>bind  mode - "#chan1 +b"  mode:kick_banned<br>proc mode:kick_banned { nick uhost hand chan mc victim } {<br>set vname "test"<br>set vname [hand2nick $victim $chan]<br>puthelp "PRIVMSG mynick : nick  $vname  is banned  "<br>}<p>Statistics: Posted by Guest — Tue Dec 24, 2002 9:55 am</p><hr />
]]></content>
	</entry>
	</feed>
