egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Undernet eggrop protection script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
limpen
Voice


Joined: 14 Mar 2006
Posts: 8

PostPosted: Tue Mar 14, 2006 8:49 am    Post subject: Undernet eggrop protection script Reply with quote

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!
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Mar 14, 2006 9:34 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
limpen
Voice


Joined: 14 Mar 2006
Posts: 8

PostPosted: Tue Mar 14, 2006 9:46 am    Post subject: Reply with quote

I don't think there's such a setting Confused
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Tue Mar 14, 2006 4:46 pm    Post subject: Reply with quote

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:

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..
_________________
Once the game is over, the king and the pawn go back in the same box.


Last edited by caesar on Wed Mar 15, 2006 4:27 am; edited 3 times in total
Back to top
View user's profile Send private message
limpen
Voice


Joined: 14 Mar 2006
Posts: 8

PostPosted: Tue Mar 14, 2006 9:20 pm    Post subject: Reply with quote

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 Rolling Eyes
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Wed Mar 15, 2006 4:24 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
limpen
Voice


Joined: 14 Mar 2006
Posts: 8

PostPosted: Wed Mar 15, 2006 4:45 pm    Post subject: Reply with quote

Caesar, I actually added the new procedure to your xstuff script (which I use a long time now Cool ). 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!
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Mar 15, 2006 6:57 pm    Post subject: Reply with quote

You need .rehash after adding the new code.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
limpen
Voice


Joined: 14 Mar 2006
Posts: 8

PostPosted: Wed Mar 15, 2006 7:01 pm    Post subject: Reply with quote

yep. I've done this.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Mar 15, 2006 7:05 pm    Post subject: Reply with quote

Code:
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?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
limpen
Voice


Joined: 14 Mar 2006
Posts: 8

PostPosted: Wed Mar 15, 2006 7:36 pm    Post subject: Reply with quote

yep u were right, I had forgotten to add the setudef... Embarassed . 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
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Mar 16, 2006 3:45 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
limpen
Voice


Joined: 14 Mar 2006
Posts: 8

PostPosted: Fri Mar 17, 2006 5:33 am    Post subject: Reply with quote

Nothing changed Sad It doesn't work Sad
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Mar 17, 2006 1:50 pm    Post subject: Reply with quote

Get the updated version (2.1) that has this feature. Smile Got any other features? Just drop me a message, e-mail, snail mail or whatever. Smile
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
limpen
Voice


Joined: 14 Mar 2006
Posts: 8

PostPosted: Fri Mar 17, 2006 8:21 pm    Post subject: Reply with quote

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 Very Happy. 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!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber