| View previous topic :: View next topic |
| Author |
Message |
illusionist Voice
Joined: 09 Mar 2020 Posts: 25
|
Posted: Sun Aug 29, 2021 12:53 am Post subject: After X mins Bot op himself if deopd |
|
|
Hello everyone 😊.
I'm here to request A Script for eggdrop...
Bot op himself if deopd after a specific Time which is set.
Any suggestions
Solutions ...
Pleased |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Sun Aug 29, 2021 4:07 am Post subject: |
|
|
Something like:
| Code: | # delay in seconds
set opdelay 60
bind mode - * deopped
proc deopped {nick uhost hand chan mode target} {
if {$mode eq "-o" && [isbotnick $target]} {
after [expr {$::opdelay * 1000}] [list putserv "MODE $chan +o $::botnick"]
}
}
|
_________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sun Aug 29, 2021 2:40 pm Post subject: |
|
|
Isn't after a synchronous process? I mean won't it block until after is processed? _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
|
| Back to top |
|
 |
illusionist Voice
Joined: 09 Mar 2020 Posts: 25
|
Posted: Tue Aug 31, 2021 1:44 am Post subject: |
|
|
Hello everyone ...
Thanks CraZyCat For responding ...
I Tried That above mentioned code ... But nothing happened... No response fom bot ... No error .. |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Tue Aug 31, 2021 6:17 am Post subject: |
|
|
Tested, it works.
| Code: | 12:13:18 -- Mode #raspfr [-o Raspdrop] par CrazyCat
#PartyLine [12:13] triggering bind deopped
12:14:19 -- Mode #raspfr [+o Raspdrop] par Raspdrop |
The only thing you have to adapt is the way you op the eggdrop. In my case, Raspdrop is ircop so it can override.
Change the MODE $chan +o $::botnick (which is an example) with something working, like MSG ChanServ :op $chan $::botnick _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
|