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.

kick non ops from channel

Old posts that have not been replied to for several years.
Locked
P
PLUGGER
Voice
Posts: 24
Joined: Sat Nov 30, 2002 6:54 am
Contact:

kick non ops from channel

Post by PLUGGER »

Hi i am looking for a .tcl script i can add to my eggdrop that will kick any users who enter a room that chanserv has not auto oped after say 10 seconds of the user entering the room


anyone with any ideas or know of such a script
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

# what channel should it work ?
set thischan "#channel"

bind join - "$thischan *" check:op

proc check:op {nick uhost hand chan} {
if {![string equal -nocase $nick $::botnick]} {
 utimer 10 [list check kick:nonop $nick $uhost $chan]
 }
}

proc kick:nonop {nick uhost chan} {
if {![isop $nick $chan]} {
newchanban $chan *!*@[lindex [split $uhost @] 1] notoped "You do not hace ops in this channel" 10
 }
}
this will ban the user after 10 seconds from joining your chan if the nick didn't gain ops. Basicly it checks if nick is oped after 10secs from joining.
P
PLUGGER
Voice
Posts: 24
Joined: Sat Nov 30, 2002 6:54 am
Contact:

Post by PLUGGER »

thanks for the info


i have copied that code to a text file and saved it as a .tcl file, rehashed the bot, but doesnt seem to do anything, am i missing something...lol

having just checked the bot out it seems an error

[19:32] Tcl error in script for 'timer597':
[19:32] invalid command name "check"
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

utimer 10 [list check kick:nonop $nick $uhost $chan]
change this to

Code: Select all

utimer 10 [list kick:nonop $nick $uhost $chan]
I probably got messed up with the proc names :oops:
P
PLUGGER
Voice
Posts: 24
Joined: Sat Nov 30, 2002 6:54 am
Contact:

Post by PLUGGER »

thanx again, progress is cool, one slight exception



the script works to some point, it does not kick the user out of the chanel, and yes the bot is oped

it sets the ban on the channel ok it just doesnt kick the non-oped user out of the channel
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

quick solution, add:

Code: Select all

putserv "KICK $chan $nick :You do not have ops in this channel"
after newchanban $chan.....
P
PLUGGER
Voice
Posts: 24
Joined: Sat Nov 30, 2002 6:54 am
Contact:

Post by PLUGGER »

thats got it m8...cheers again
Locked