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 

[Solved] set + m and -m channels at set times

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


Joined: 04 Dec 2018
Posts: 3
Location: Mars

PostPosted: Tue Dec 04, 2018 3:54 pm    Post subject: [Solved] set + m and -m channels at set times Reply with quote

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 pachisapiu on Thu Dec 06, 2018 5:11 am; edited 1 time in total
Back to top
View user's profile Send private message
caesar
Mint Rubber


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

PostPosted: Wed Dec 05, 2018 3:54 am    Post subject: Reply with quote

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.
_________________
I tawt I taw a puddy tat!
Back to top
View user's profile Send private message
pachisapiu
Voice


Joined: 04 Dec 2018
Posts: 3
Location: Mars

PostPosted: Thu Dec 06, 2018 5:10 am    Post subject: Reply with quote

I have tested it and work fine , thank you so much caesar
Back to top
View user's profile Send private message
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