| View previous topic :: View next topic |
| Author |
Message |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Mon Nov 06, 2006 12:52 am Post subject: Secure this deop on op script? |
|
|
Someone found a way around this script.. its suppose to deop those who were oped by someone..
Heres what they did.. they deoped and reoped, then oped user REAL FAST have to be fast for it to work..
[11:44pm] * TheOp sets mode: -o TheOp
[11:44pm] * TheOp sets mode: +o TheOp
[11:44pm] * TheOp sets mode: +o User
And bot didn't deop user
Anyway to secure this?
| Code: |
bind mode - * check_deop
proc check_deop {nick host hand chan mode target} {
if {$mode == "+o" && ![isbotnick $nick] && ![isbotnick $target]} {
pushmode $chan "-o" $target
}
}
|
|
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Nov 06, 2006 1:11 am Post subject: |
|
|
I think lag was your enemy on this occasion. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Mon Nov 06, 2006 1:15 am Post subject: |
|
|
| well can pushmode be changed to something slower? I don't have any lag, server is pretty fast on 6GB ram. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Nov 06, 2006 1:15 am Post subject: |
|
|
Question: If you put a "putcmdlog" string into that proc, does it in fact get triggered?
I'm wondering if it has to do with the "set double-mode" option in the eggdrop config, but I can't find much in the way of documentation for it, can't find much about it in the src either.. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Nov 06, 2006 1:17 am Post subject: |
|
|
| cache wrote: | | well can pushmode be changed to something slower? I don't have any lag, server is pretty fast on 6GB ram. |
Make a timer to delay execution? |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Nov 06, 2006 1:18 am Post subject: |
|
|
| Is there also a reason you can't enable "bitch" mode in the bot, to keep non-users from getting ops at all? |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Mon Nov 06, 2006 1:19 am Post subject: |
|
|
| I'm still not good with timers, can you help me? |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Mon Nov 06, 2006 1:58 am Post subject: |
|
|
I tried +bitch but it still lets me op a user real fast and does nothing unless i op them slow.
* TheOp sets mode: -o TheOp
* TheOp sets mode: +o TheOp
* TheOp sets mode: +o User
Seems to deop user when bot enters room but not when op deops and reops then ops user real fast. |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Mon Nov 06, 2006 3:05 am Post subject: |
|
|
| Just tried superbitch.tcl by slennox still does same when they flood it fast bot don't deop them. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Nov 06, 2006 11:03 am Post subject: |
|
|
Odd that bitch mode is so easily defeated too.. Put something like this into the proc before the "if" :
putcmdlog "proc check_deop running"
just to see if the proc is even being executed as it should be. If its not executing, I think you found a bona fide bug, which would likely be beyond this forum's ability to fix and should be reported to egghead's developers. |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Mon Nov 06, 2006 1:56 pm Post subject: |
|
|
Hi rosc..
I did as you asked..
Then I copy pasted this in to room real fast:
/mode #chan -o Me
/mode #chan +o Me
/mode #chan +o UsersNick
Then putty shows:
[12:48] #chan: mode change '-o Me' by Me!Me@Me
[12:48] proc check_deop running
[12:48] #chan: mode change '+o Me' by Me!Me@Me
[12:48] proc check_deop running
[12:48] #chan: mode change '+o UsersNick' by Me!Me@Me
[12:48] proc check_deop running
-------------------
If I do it slow:
[12:51pm] * Me sets mode: +o UsersNick
[12:52pm] * BOT sets mode: -o UsersNick
Putty:
[12:51] #chan: mode change '+o UsersNick' by Me!Me@Me
[12:51] proc check_deop running
[12:52] #chan: mode change '-o UsersNick' by Bot!Bot@Bot
[12:52] proc check_deop running |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Nov 06, 2006 6:53 pm Post subject: |
|
|
The proc is running then.. What do you have in your eggdrop.conf for
set double-mode
Try setting that to 1. If that does not help, then you'll need to add a timer and a proc to execute the timer's commands.
That would be like:
| Code: |
bind mode - * check_deop
proc check_deop {nick host hand chan mode target} {
utimer 2 [list timerproc $mode $chan $nick $target]
}
proc timerproc {mode chan nick target} {
if {$mode == "+o" && ![isbotnick $nick] && ![isbotnick $target]} {
pushmode $chan "-o" $target
}
}
|
That should do the trick |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Mon Nov 06, 2006 7:03 pm Post subject: |
|
|
Yeah I had double-mode set to 1 the whole time..
The time script works when I set it to 5 secs, thanks  |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Mon Nov 06, 2006 7:39 pm Post subject: |
|
|
| anyway I can have timer try at 2, 5, 10, 15, and 20 secs? Just want to be on safe side. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Nov 06, 2006 7:59 pm Post subject: |
|
|
Yep, just make duplicate timers with different times:
utimer 2 [list timerproc $mode $chan $nick $target]
utimer 5 [list timerproc $mode $chan $nick $target]
utimer 10 [list timerproc $mode $chan $nick $target]
etc. |
|
| Back to top |
|
 |
|