This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Ban from a Internal Channel

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
d
delaa
Voice
Posts: 3
Joined: Tue Mar 23, 2010 8:56 am

Ban from a Internal Channel

Post by delaa »

Hi,

i looking for a Ban script how Allows any user from chan #yy to kickbans user in chan #xx

The users in the Internal Chanel have only +v.

There somebody can help me?
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

Code: Select all

# Author: tomekk
# e-mail:  tomekk/@/oswiecim/./eu/./org
# home page: http://tomekk.oswiecim.eu.org/
#
# Version 0.1
#
# This file is Copyrighted under the GNU Public License.
# http://www.gnu.org/copyleft/gpl.html

# channel with users
set command_channel "#xx"

# channel with !kbu command
set users_channel "#yy"

# host mask type
# 1)  *!*@*.domain.com
# 2)  *!*@some.domain.com
# 3)  *nick*!*@some.domain.com
# 4)  *!*ident*@some.domain.com
set host_mask 1

#########################################################
bind pub -|- !kbu kbu_proc

proc kbu_proc { nick uhost hand chan arg } {
	global command_channel users_channel

	if {$chan == $command_channel} {
		set user_nick [lindex [split $arg] 0]

		if {$user_nick != ""} {
			if {![isbotnick $user_nick]} {
				if {[botonchan $users_channel]} {
					if {[onchan $user_nick $users_channel]} {
						putquick "MODE $users_channel +b [banmask [getchanhost $user_nick $users_channel] $user_nick]"
						putkick $users_channel $user_nick
					}
				}
			}
		}
	}
}

proc banmask { host nick } {
	global host_mask

	switch -- $host_mask {
		1 {
			set mask "*!*@[lindex [split [maskhost $host] "@"] 1]"
		}

		2 {
			set mask "*!*@[lindex [split $host @] 1]"
		}

		3 {
			set mask "*$nick*!*@[lindex [split $host "@"] 1]"
		}
	
		4 {
			set mask "*!*[lindex [split $host "@"] 0]*@[lindex [split $host "@"] 1]"
		}
	}

	return $mask
}


putlog "kickhim.tcl ver 0.1 by tomekk loaded"
type proper channels and try it,
d
delaa
Voice
Posts: 3
Joined: Tue Mar 23, 2010 8:56 am

Post by delaa »

Hi tomekk,

the eggdropt drop this error

Code: Select all

[ 17:12:00 ]  11[08 BOT 11]12 [17:12] Tcl error [pub:kb]: bad index "o": must be integer?[+-]integer? or end?[+-]integer?
[ 17:12:07 ]  11[08 BOT 11]12 [17:12] Tcl error [pub:kb]: bad index "o": must be integer?[+-]integer? or end?[+-]integer?
And the command !kbu dosent works in the Intern channel.
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

script is working for me without any problems,
try to copy it again please

or download it from here
http://temp.tomekk.org/kickhim-0.1.tcl
d
delaa
Voice
Posts: 3
Joined: Tue Mar 23, 2010 8:56 am

Post by delaa »

tomekk

thank you very much!!
Post Reply