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.
Help for those learning Tcl or writing their own scripts.
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Mon Nov 06, 2006 12:52 am
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: Select all
bind mode - * check_deop
proc check_deop {nick host hand chan mode target} {
if {$mode == "+o" && ![isbotnick $nick] && ![isbotnick $target]} {
pushmode $chan "-o" $target
}
}
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Mon Nov 06, 2006 1:11 am
I think lag was your enemy on this occasion.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Mon Nov 06, 2006 1:15 am
well can pushmode be changed to something slower? I don't have any lag, server is pretty fast on 6GB ram.
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Mon Nov 06, 2006 1:15 am
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..
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Mon Nov 06, 2006 1:17 am
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?
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Mon Nov 06, 2006 1:18 am
Is there also a reason you can't enable "bitch" mode in the bot, to keep non-users from getting ops at all?
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Mon Nov 06, 2006 1:19 am
I'm still not good with timers, can you help me?
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Mon Nov 06, 2006 1:58 am
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.
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Mon Nov 06, 2006 3:05 am
Just tried superbitch.tcl by slennox still does same when they flood it fast bot don't deop them.
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Mon Nov 06, 2006 11:03 am
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.
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Mon Nov 06, 2006 1:56 pm
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
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Mon Nov 06, 2006 6:53 pm
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: Select all
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
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Mon Nov 06, 2006 7:03 pm
Yeah I had double-mode set to 1 the whole time..
The time script works when I set it to 5 secs, thanks
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Mon Nov 06, 2006 7:39 pm
anyway I can have timer try at 2, 5, 10, 15, and 20 secs? Just want to be on safe side.
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Mon Nov 06, 2006 7:59 pm
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.