def mode_cmd_no_target(mode, text, text_inp, chan, conn, notice):
 split = text_inp.split(' ')
 if split[0].startswith('#'):
  channel = split[0]
  notice('Attempting to {} {}...'.format(text, channel))
  conn.send('MODE {} {}'.format(channel, mode))
 else:
  channel = chan
  notice('Attempting to {} {}...'.format(text, channel))
  conn.send('MODE {} {}'.format(channel, mode))

def mode_cmd_no_target ( mode , text , text_inp , chan , conn , notice ) : split = text_inp . split ( ' ' ) if split [ 0 ] . startswith ( '#' ) : channel = split [ 0 ] notice ( 'Attempting to {} {}...' . format ( text , channel ) ) conn . send ( 'MODE {} {}' . format ( channel , mode ) ) else : channel = chan notice ( 'Attempting to {} {}...' . format ( text , channel ) ) conn . send ( 'MODE {} {}' . format ( channel , mode ) )
generic mode setting function without a target .