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.

After X mins Bot op himself if deopd

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
i
illusionist
Voice
Posts: 25
Joined: Mon Mar 09, 2020 11:22 am

After X mins Bot op himself if deopd

Post by illusionist »

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
Online
User avatar
CrazyCat
Revered One
Posts: 1305
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Something like:

Code: Select all

# 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"]
   }
}
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
Online
User avatar
CrazyCat
Revered One
Posts: 1305
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

I alway confuse with vwait.
But it could be done using timer too
i
illusionist
Voice
Posts: 25
Joined: Mon Mar 09, 2020 11:22 am

Post by illusionist »

Hello everyone ...

Thanks CraZyCat For responding ...

I Tried That above mentioned code ... But nothing happened... No response fom bot ... No error ..
Online
User avatar
CrazyCat
Revered One
Posts: 1305
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Tested, it works.

Code: Select all

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
Post Reply