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 

After X mins Bot op himself if deopd

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
illusionist
Voice


Joined: 09 Mar 2020
Posts: 25

PostPosted: Sun Aug 29, 2021 12:53 am    Post subject: After X mins Bot op himself if deopd Reply with quote

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


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sun Aug 29, 2021 4:07 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Sun Aug 29, 2021 2:40 pm    Post subject: Reply with quote

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


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sun Aug 29, 2021 3:08 pm    Post subject: Reply with quote

I alway confuse with vwait.
But it could be done using timer too
_________________
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
View user's profile Send private message Visit poster's website
illusionist
Voice


Joined: 09 Mar 2020
Posts: 25

PostPosted: Tue Aug 31, 2021 1:44 am    Post subject: Reply with quote

Hello everyone ...

Thanks CraZyCat For responding ...

I Tried That above mentioned code ... But nothing happened... No response fom bot ... No error ..
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Tue Aug 31, 2021 6:17 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
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