SHARE
TWEET

Untitled

a guest Feb 14th, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #--require-config healthcheck-url
  3.  
  4. from src import ModuleManager, utils
  5.  
  6. class Module(ModuleManager.BaseModule):
  7.     @utils.hook("cron")
  8.     @utils.kwarg("schedule", "0 6 * * *")
  9.     def day_mode(self, event):
  10.         try:
  11.             event["server"].send_message("chanserv","MODE #dominion SET -R")
  12.         except Exception as e:
  13.             self.log.error("Failed to set -R mode to the channel",exc_info=True)
  14.            
  15.            
  16.     @utils.hook("cron")
  17.     @utils.kwarg("schedule", cron_exp)
  18.     def night_mode(self, event):
  19.         try:
  20.             event["server"].send_message("chanserv","MODE #dominion SET +R")
  21.         except Exception as e:
  22.             self.log.error("Failed to set +R mode to the channel",exc_info=True)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top