| View previous topic :: View next topic |
| Author |
Message |
Carlin0 Voice

Joined: 04 Dec 2018 Posts: 24 Location: Italy
|
Posted: Tue Dec 04, 2018 3:54 pm Post subject: [Solved] set + m and -m channels at set times |
|
|
Hello , i need a simple script for eggdrop that set + m and -m channels at set times ... for example at 0,00 set +m and at 7,00 AM set -m
Last edited by Carlin0 on Thu Dec 06, 2018 5:11 am; edited 1 time in total |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Dec 05, 2018 3:54 am Post subject: |
|
|
| Code: |
namespace eval moderate {
setudef flag moderate
bind cron - {0 0 * * *} [namespace current]::lock
bind cron - {0 7 * * *} [namespace current]::unlock
proc lock {min hour day month weekday} {
push "+m"
}
proc unlock {min hour day month weekday} {
push "-m"
}
proc push {m} {
foreach chan [channels] {
if {![channel get $chan moderate]} continue
if {![botonchan $chan] || ![botisop $chan]} continue
pushmode $chan $m
}
}
}
|
Set +moderate on the channels you want this timed +m/-m.
Keep in mind that I haven't tested it, so load this on a test bot and reply back. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
Carlin0 Voice

Joined: 04 Dec 2018 Posts: 24 Location: Italy
|
Posted: Thu Dec 06, 2018 5:10 am Post subject: |
|
|
| I have tested it and work fine , thank you so much caesar |
|
| Back to top |
|
 |
|