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.

Undernet eggrop protection script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
l
limpen
Voice
Posts: 8
Joined: Tue Mar 14, 2006 8:31 am

Undernet eggrop protection script

Post by limpen »

Hi,
Is there any script that protects the eggdrop when it gets deoped/kicked/banned from X by users who have access in the channel?
I assume that the eggdrop is logged-in. What I'm looking for, is a script that "reads" the username of the user, unbans its self (if banned),regains op and places a 4-days suspension to the "abuser's" username using it's max access (Users have less access than the eggdrops, so they cannnot unsuspend theirselves).
Thnx in advance!
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Doesn't Undernet have that weird peace setting that prevents all that?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
l
limpen
Voice
Posts: 8
Joined: Tue Mar 14, 2006 8:31 am

Post by limpen »

I don't think there's such a setting :?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Check my Xstuff script. Unfortunaly I don't have a function like the one you asked already included. Something like this should do that anyway:

Code: Select all

setudef flag xkick

bind kick * * xstuff:kick

proc xstuff:kick {nick uhost hand chan vict reas} { 
  if {![isbotnick $vict]} return
  if {[channel get $chan xkick] && $nick == "X"} {
    set kicker [string trim [lindex [split $reas] 0] {()}] 
    putserv "PRIVMSG X :SUSPEND $chan $kicker 4d 100"
  }
}
Edit: Fixed it. Damn typos..
Last edited by caesar on Wed Mar 15, 2006 4:27 am, edited 3 times in total.
Once the game is over, the king and the pawn go back in the same box.
l
limpen
Voice
Posts: 8
Joined: Tue Mar 14, 2006 8:31 am

Post by limpen »

Thnx for the fast replies!
Unfortunately the solution doesn't work at all.
Any other ideas? Someone told me that a script like the one I'm looking for already exists, but although I made a search, I had no results :roll:
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Oups, forgot to add and change something. Just '.chanset #channel +xkick' to enable it. Try that code again. Have you tried my xstuff script?
Once the game is over, the king and the pawn go back in the same box.
l
limpen
Voice
Posts: 8
Joined: Tue Mar 14, 2006 8:31 am

Post by limpen »

Caesar, I actually added the new procedure to your xstuff script (which I use a long time now 8) ). I hope i did it correctly. When I try to set the xkick mode i receive the msg "Error trying to set +xkick for #channel, invalid mode". Btw I don't know script programming. I put the bind section below the other binds and the procedure below the last procedure of the xstuff script. Thnx again for your help!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You need .rehash after adding the new code.
l
limpen
Voice
Posts: 8
Joined: Tue Mar 14, 2006 8:31 am

Post by limpen »

yep. I've done this.
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

setudef flag xkick
This definitely means that 'xkick' chansetting should exist and your bot should not tell you that it's an invalid mode. Did you forget to add it in the script?
l
limpen
Voice
Posts: 8
Joined: Tue Mar 14, 2006 8:31 am

Post by limpen »

yep u were right, I had forgotten to add the setudef... :oops: . I fixed that, rehashed and still doesn't work
I set the flag, but still when someone kicks the bot using X, the bot doesn't suspend him. btw, the user who kicks the bot has less access level than the bot. So I don't think this could be the problem
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Add after or before the 'putserv' line something like: putlog "suspend?" then kick it wia X and see what happens.
Once the game is over, the king and the pawn go back in the same box.
l
limpen
Voice
Posts: 8
Joined: Tue Mar 14, 2006 8:31 am

Post by limpen »

Nothing changed :( It doesn't work :(
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Get the updated version (2.1) that has this feature. :) Got any other features? Just drop me a message, e-mail, snail mail or whatever. :)
Once the game is over, the king and the pawn go back in the same box.
l
limpen
Voice
Posts: 8
Joined: Tue Mar 14, 2006 8:31 am

Post by limpen »

Thnx for the great help Caesar! Your new script solved the case.I appreciate. I find it amazing how helpful are the people in this forum :D. To the problem now: It didn't work at first but finally I found out what was going on. It's the syntax of the SUSPEND command which was wrong. Change the line:
set action {SUSPEND $chan $kicker 1d 100}
to:
set action {SUSPEND $chan $kicker 1 D 100}

A big thanx to all of you guys!
Post Reply