@require_chanmsg(u'.setsfw is only permitted in channels')
@commands(u'setsafeforwork', u'setsfw')
@example(u'.setsfw true')
@example(u'.setsfw false')
def update_channel(bot, trigger):
 if (bot.privileges[trigger.sender][trigger.nick] < OP):
  return
 else:
  param = u'true'
  if (trigger.group(2) and trigger.group(3)):
   param = trigger.group(3).strip().lower()
  sfw = (param == u'true')
  bot.db.set_channel_value(trigger.sender, u'sfw', sfw)
  if sfw:
   bot.reply((u'Got it. %s is now flagged as SFW.' % trigger.sender))
  else:
   bot.reply((u'Got it. %s is now flagged as NSFW.' % trigger.sender))

@ require_chanmsg ( u'.setsfw is only permitted in channels' ) @ commands ( u'setsafeforwork' , u'setsfw' ) @ example ( u'.setsfw true' ) @ example ( u'.setsfw false' ) def update_channel ( bot , trigger ) : if ( bot . privileges [ trigger . sender ] [ trigger . nick ] < OP ) : return else : param = u'true' if ( trigger . group ( 2 ) and trigger . group ( 3 ) ) : param = trigger . group ( 3 ) . strip ( ) . lower ( ) sfw = ( param == u'true' ) bot . db . set_channel_value ( trigger . sender , u'sfw' , sfw ) if sfw : bot . reply ( ( u'Got it. %s is now flagged as SFW.' % trigger . sender ) ) else : bot . reply ( ( u'Got it. %s is now flagged as NSFW.' % trigger . sender ) )
sets the safe for work status for the current channel .