| View previous topic :: View next topic |
| Author |
Message |
limpen Voice
Joined: 14 Mar 2006 Posts: 8
|
Posted: Tue Mar 14, 2006 8:49 am Post subject: Undernet eggrop protection script |
|
|
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 |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Mar 14, 2006 9:34 am Post subject: |
|
|
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 |
|
 |
limpen Voice
Joined: 14 Mar 2006 Posts: 8
|
Posted: Tue Mar 14, 2006 9:46 am Post subject: |
|
|
I don't think there's such a setting  |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Mar 14, 2006 4:46 pm Post subject: |
|
|
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 |
|
 |
limpen Voice
Joined: 14 Mar 2006 Posts: 8
|
Posted: Tue Mar 14, 2006 9:20 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Mar 15, 2006 4:24 am Post subject: |
|
|
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 |
|
 |
limpen Voice
Joined: 14 Mar 2006 Posts: 8
|
Posted: Wed Mar 15, 2006 4:45 pm Post subject: |
|
|
Caesar, I actually added the new procedure to your xstuff script (which I use a long time now ). 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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
limpen Voice
Joined: 14 Mar 2006 Posts: 8
|
Posted: Wed Mar 15, 2006 7:01 pm Post subject: |
|
|
| yep. I've done this. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Mar 15, 2006 7:05 pm Post subject: |
|
|
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 |
|
 |
limpen Voice
Joined: 14 Mar 2006 Posts: 8
|
Posted: Wed Mar 15, 2006 7:36 pm Post subject: |
|
|
yep u were right, I had forgotten to add the setudef... . 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 |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Thu Mar 16, 2006 3:45 pm Post subject: |
|
|
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 |
|
 |
limpen Voice
Joined: 14 Mar 2006 Posts: 8
|
Posted: Fri Mar 17, 2006 5:33 am Post subject: |
|
|
Nothing changed It doesn't work  |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Mar 17, 2006 1:50 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
limpen Voice
Joined: 14 Mar 2006 Posts: 8
|
Posted: Fri Mar 17, 2006 8:21 pm Post subject: |
|
|
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 . 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 |
|
 |
|