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 

Secure this deop on op script?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Mon Nov 06, 2006 12:52 am    Post subject: Secure this deop on op script? Reply with quote

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 Sad

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


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

PostPosted: Mon Nov 06, 2006 1:11 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Mon Nov 06, 2006 1:15 am    Post subject: Reply with quote

well can pushmode be changed to something slower? I don't have any lag, server is pretty fast on 6GB ram.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Nov 06, 2006 1:15 am    Post subject: Reply with quote

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
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Nov 06, 2006 1:17 am    Post subject: Reply with quote

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
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Nov 06, 2006 1:18 am    Post subject: Reply with quote

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
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Mon Nov 06, 2006 1:19 am    Post subject: Reply with quote

I'm still not good with timers, can you help me?
Back to top
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Mon Nov 06, 2006 1:58 am    Post subject: Reply with quote

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
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Mon Nov 06, 2006 3:05 am    Post subject: Reply with quote

Just tried superbitch.tcl by slennox still does same when they flood it fast bot don't deop them.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Nov 06, 2006 11:03 am    Post subject: Reply with quote

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
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Mon Nov 06, 2006 1:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Nov 06, 2006 6:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Mon Nov 06, 2006 7:03 pm    Post subject: Reply with quote

Yeah I had double-mode set to 1 the whole time..

The time script works when I set it to 5 secs, thanks Smile
Back to top
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Mon Nov 06, 2006 7:39 pm    Post subject: Reply with quote

anyway I can have timer try at 2, 5, 10, 15, and 20 secs? Just want to be on safe side.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Nov 06, 2006 7:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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