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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
-
Carlin0
- Voice
- Posts: 28
- Joined: Tue Dec 04, 2018 3:41 pm
- Location: Italy
Post
by Carlin0 »
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.
-
caesar
- Mint Rubber
- Posts: 3776
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
Code: Select all
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.
-
Carlin0
- Voice
- Posts: 28
- Joined: Tue Dec 04, 2018 3:41 pm
- Location: Italy
Post
by Carlin0 »
I have tested it and work fine , thank you so much caesar