@commands(u'getsafeforwork', u'getsfw')
@example(u'.getsfw [channel]')
def get_channel_sfw(bot, trigger):
 channel = trigger.group(2)
 if (not channel):
  channel = trigger.sender
  if channel.is_nick():
   return bot.say(u'.getsfw with no channel param is only permitted in channels')
 channel = channel.strip()
 sfw = bot.db.get_channel_value(channel, u'sfw')
 if sfw:
  bot.say((u'%s is flagged as SFW' % channel))
 else:
  bot.say((u'%s is flagged as NSFW' % channel))

@ commands ( u'getsafeforwork' , u'getsfw' ) @ example ( u'.getsfw [channel]' ) def get_channel_sfw ( bot , trigger ) : channel = trigger . group ( 2 ) if ( not channel ) : channel = trigger . sender if channel . is_nick ( ) : return bot . say ( u'.getsfw with no channel param is only permitted in channels' ) channel = channel . strip ( ) sfw = bot . db . get_channel_value ( channel , u'sfw' ) if sfw : bot . say ( ( u'%s is flagged as SFW' % channel ) ) else : bot . say ( ( u'%s is flagged as NSFW' % channel ) )
gets the preferred channels safe for work status .